Commit 83eddcba by 李嘉林

优化

parent b2aa54c1
......@@ -41,6 +41,12 @@ export default {
},
components: {},
computed: {},
created() {
console.log("进入created")
},
onLoad() {
console.log("进入onLoad")
},
onShow() {
let _this = this;
wx.getScreenBrightness({
......@@ -58,19 +64,20 @@ export default {
},
onHide() {
this.setScreenBrightness(this.currentBrightness);
clearInterval(this.TimeOut);
},
onUnload() {
this.setScreenBrightness(this.currentBrightness);
clearInterval(this.TimeOut);
},
methods: {
// 获取缓存用户信息
getSync() {
log.info(this.getStep,'getSync')
if (this.getStep > 10) return;
this.getStep++;
let loginUserInfo = wx.getStorageSync("loginUserInfo") || null;
if (loginUserInfo && loginUserInfo.mobilephone && !this.mobilephone) {
log.info(this.mobilephone,loginUserInfo,'loginUserInfo')
console.log(this.mobilephone,loginUserInfo,'loginUserInfo')
if (loginUserInfo && loginUserInfo.mobilephone) {
this.mobilephone = loginUserInfo.mobilephone;
this.getStep = 0;
this.init();
......@@ -82,6 +89,7 @@ export default {
},
init() {
console.log("开始初始化");
log.info('开始初始化生成码')
this.getBarCode();
this.getQrCode();
},
......@@ -155,7 +163,7 @@ export default {
width: 308rpx;
height: 308rpx;
border: 1px solid #F3F3F3;
padding: 20px;
padding: 16px;
justify-content: center;
align-items: center;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment