|
@@ -236,11 +236,11 @@ export default {
|
|
|
// #ifdef APP-PLUS
|
|
// #ifdef APP-PLUS
|
|
|
let type = uni.getSystemInfoSync().platform
|
|
let type = uni.getSystemInfoSync().platform
|
|
|
if(type == 'android'){
|
|
if(type == 'android'){
|
|
|
- this.popRenew()
|
|
|
|
|
|
|
+ this.beginShowRenew()
|
|
|
}
|
|
}
|
|
|
// #endif
|
|
// #endif
|
|
|
// #ifdef MP-WEIXIN
|
|
// #ifdef MP-WEIXIN
|
|
|
- this.popRenew()
|
|
|
|
|
|
|
+ this.beginShowRenew()
|
|
|
// #endif
|
|
// #endif
|
|
|
},
|
|
},
|
|
|
onPullDownRefresh() {
|
|
onPullDownRefresh() {
|
|
@@ -268,19 +268,63 @@ export default {
|
|
|
this.$refs.renewRef.close()
|
|
this.$refs.renewRef.close()
|
|
|
noRemind().then(res=>{ })
|
|
noRemind().then(res=>{ })
|
|
|
},
|
|
},
|
|
|
- popRenew(){
|
|
|
|
|
|
|
+ beginShowRenew(){
|
|
|
let that = this
|
|
let that = this
|
|
|
- needRemind().then(res=>{
|
|
|
|
|
- if(res.code == 1){
|
|
|
|
|
- that.currentDeadline = res.data.currentDeadline
|
|
|
|
|
- that.newDeadline = res.data.newDeadline
|
|
|
|
|
- if(res.data.need && res.data.need == 1){
|
|
|
|
|
- that.$refs.renewRef.open('center')
|
|
|
|
|
|
|
+ setTimeout(function(){
|
|
|
|
|
+ needRemind().then(res=>{
|
|
|
|
|
+ if(res.code == 1){
|
|
|
|
|
+ that.currentDeadline = res.data.currentDeadline
|
|
|
|
|
+ that.newDeadline = res.data.newDeadline
|
|
|
|
|
+ if(res.data.need && res.data.need == 1){
|
|
|
|
|
+ that.$refs.renewRef.open('center')
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ })
|
|
|
|
|
+ },1500)
|
|
|
},
|
|
},
|
|
|
startRenew(){
|
|
startRenew(){
|
|
|
|
|
+
|
|
|
|
|
+ // #ifdef APP-PLUS
|
|
|
|
|
+ let that = this
|
|
|
|
|
+ let type = uni.getSystemInfoSync().platform
|
|
|
|
|
+ that.$msg("请在小程序上续期")
|
|
|
|
|
+ if(type == 'android'){
|
|
|
|
|
+
|
|
|
|
|
+ if(plus.runtime.isApplicationExist({pname:'com.tencent.mm',action:'weixin://'})){
|
|
|
|
|
+ plus.share.getServices(function(s){
|
|
|
|
|
+ var sweixin
|
|
|
|
|
+ for (var i = 0; i < s.length; i++) {
|
|
|
|
|
+ var t = s[i];
|
|
|
|
|
+ if (t.id == 'weixin') {
|
|
|
|
|
+ sweixin = t;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ let miniOriginalId = that.dictInfo.miniOriginalId && that.dictInfo.miniOriginalId.current && that.dictInfo.miniOriginalId.current.ghs ? that.dictInfo.miniOriginalId.current.ghs : ''
|
|
|
|
|
+ if (sweixin && sweixin.nativeClient) {
|
|
|
|
|
+ sweixin.launchMiniProgram({
|
|
|
|
|
+ id: miniOriginalId,
|
|
|
|
|
+ path: '/admin/home/workbench',
|
|
|
|
|
+ type: 0
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ that.$msg("没有找到微信服务")
|
|
|
|
|
+ //that.$msg("获取微信失败:" + e.message)
|
|
|
|
|
+ //console.log(JSON.stringify(e));
|
|
|
|
|
+ }
|
|
|
|
|
+ }, function(e){
|
|
|
|
|
+ that.$msg("没有找到微信服务哦")
|
|
|
|
|
+ //that.$msg("获取微信失败:" + e.message)
|
|
|
|
|
+ //console.log(JSON.stringify(e));
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ that.$msg("请安装微信,再打开小程序")
|
|
|
|
|
+ return false
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return true
|
|
|
|
|
+ }
|
|
|
|
|
+ // #endif
|
|
|
|
|
+ // #ifdef MP-WEIXIN
|
|
|
uni.showLoading({mask:true})
|
|
uni.showLoading({mask:true})
|
|
|
renewShop().then(res=>{
|
|
renewShop().then(res=>{
|
|
|
uni.hideLoading()
|
|
uni.hideLoading()
|
|
@@ -288,6 +332,7 @@ export default {
|
|
|
wexinPay(res.data, this.getSuccess, this.getError)
|
|
wexinPay(res.data, this.getSuccess, this.getError)
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
+ // #endif
|
|
|
},
|
|
},
|
|
|
getSuccess(){
|
|
getSuccess(){
|
|
|
this.closeRenew();
|
|
this.closeRenew();
|