|
|
|
@ -63,7 +63,9 @@ |
|
|
|
centerInfo: {balance: 0}, |
|
|
|
show_code: false, |
|
|
|
show_code_count: 0, |
|
|
|
show_count: 0 |
|
|
|
show_count: 0, |
|
|
|
is_scan_code: false, |
|
|
|
first_http: 0 |
|
|
|
} |
|
|
|
}, |
|
|
|
onLoad(){ |
|
|
|
@ -72,7 +74,14 @@ |
|
|
|
this.getIsSetPayPwd(); |
|
|
|
this.getMeInfo(); |
|
|
|
this.getUcenter(); |
|
|
|
|
|
|
|
}, |
|
|
|
onShow(){ |
|
|
|
this.show_count++; |
|
|
|
if(this.show_count > 1){ |
|
|
|
this.first_http = 0; |
|
|
|
this.is_scan_code = false; |
|
|
|
this.getIsSetPayPwd(); |
|
|
|
} |
|
|
|
// 设置手机屏幕亮度 |
|
|
|
uni.getScreenBrightness({ |
|
|
|
success: (res) => { |
|
|
|
@ -84,20 +93,16 @@ |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
onShow(){ |
|
|
|
this.show_count++; |
|
|
|
if(this.show_count > 1){ |
|
|
|
this.getIsSetPayPwd(); |
|
|
|
} |
|
|
|
onHide(){ |
|
|
|
uni.setScreenBrightness({ |
|
|
|
value: this.brightness |
|
|
|
}) |
|
|
|
}, |
|
|
|
onUnload(){ |
|
|
|
if(this.timer){ |
|
|
|
clearInterval(this.timer); |
|
|
|
this.timer = null; |
|
|
|
} |
|
|
|
uni.setScreenBrightness({ |
|
|
|
value: this.brightness |
|
|
|
}) |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 获取用户是否设置了支付密码 |
|
|
|
@ -187,10 +192,11 @@ |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
this.first_http++; |
|
|
|
this.$http.get({ |
|
|
|
api: 'api/offline/get_pay', |
|
|
|
data: { |
|
|
|
refresh: 0 |
|
|
|
refresh: this.first_http <= 1 ? 1 : 0 |
|
|
|
}, |
|
|
|
header: { |
|
|
|
Authorization: this.token |
|
|
|
@ -219,7 +225,14 @@ |
|
|
|
url += `?clerk_id=${clerk_id}`; |
|
|
|
url += `&brand_id=${brand_id}`; |
|
|
|
url += `&amount=${amount}`; |
|
|
|
this.$url(url); |
|
|
|
if(this.timer){ |
|
|
|
clearInterval(this.timer); |
|
|
|
this.timer = null; |
|
|
|
} |
|
|
|
if(!this.is_scan_code){ |
|
|
|
this.$url(url); |
|
|
|
} |
|
|
|
this.is_scan_code = true; |
|
|
|
} |
|
|
|
} |
|
|
|
if(!options.silence){ |
|
|
|
|