Commit 83eddcba by 李嘉林

优化

parent b2aa54c1
...@@ -41,6 +41,12 @@ export default { ...@@ -41,6 +41,12 @@ export default {
}, },
components: {}, components: {},
computed: {}, computed: {},
created() {
console.log("进入created")
},
onLoad() {
console.log("进入onLoad")
},
onShow() { onShow() {
let _this = this; let _this = this;
wx.getScreenBrightness({ wx.getScreenBrightness({
...@@ -58,19 +64,20 @@ export default { ...@@ -58,19 +64,20 @@ export default {
}, },
onHide() { onHide() {
this.setScreenBrightness(this.currentBrightness); this.setScreenBrightness(this.currentBrightness);
clearInterval(this.TimeOut);
}, },
onUnload() { onUnload() {
this.setScreenBrightness(this.currentBrightness); this.setScreenBrightness(this.currentBrightness);
clearInterval(this.TimeOut);
}, },
methods: { methods: {
// 获取缓存用户信息 // 获取缓存用户信息
getSync() { getSync() {
log.info(this.getStep,'getSync')
if (this.getStep > 10) return; if (this.getStep > 10) return;
this.getStep++; this.getStep++;
let loginUserInfo = wx.getStorageSync("loginUserInfo") || null; 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.mobilephone = loginUserInfo.mobilephone;
this.getStep = 0; this.getStep = 0;
this.init(); this.init();
...@@ -82,6 +89,7 @@ export default { ...@@ -82,6 +89,7 @@ export default {
}, },
init() { init() {
console.log("开始初始化"); console.log("开始初始化");
log.info('开始初始化生成码')
this.getBarCode(); this.getBarCode();
this.getQrCode(); this.getQrCode();
}, },
...@@ -155,7 +163,7 @@ export default { ...@@ -155,7 +163,7 @@ export default {
width: 308rpx; width: 308rpx;
height: 308rpx; height: 308rpx;
border: 1px solid #F3F3F3; border: 1px solid #F3F3F3;
padding: 20px; padding: 16px;
justify-content: center; justify-content: center;
align-items: 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