|
@@ -237,8 +237,29 @@ Page({
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ isRenew() {
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
+ const idname = this.data.sys_payincidence == 1 ? 'userid' : 'sa_agentsid',
|
|
|
+ renew = this.data.users.map(v => this.data.userList.find(s => s[idname] == v)).filter(v => v.enddate[this.data.sys_site_systempartitionid]).map(v => v[this.data.sys_payincidence == 1 ? 'name' : 'agentname']).join(',');
|
|
|
+ if (renew) {
|
|
|
+ wx.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: `${renew}付费还未到期,是否继续付费`,
|
|
|
+ confirmText: "继续付费",
|
|
|
+ complete: (res) => {
|
|
|
+ if (res.cancel) resolve(false)
|
|
|
+ if (res.confirm) resolve(true)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ resolve(true)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
/* 支付 */
|
|
|
async payment() {
|
|
|
+ let isRenew = await this.isRenew();
|
|
|
+ if (!isRenew) return;
|
|
|
let isPayment = await this.examine();
|
|
|
if (!isPayment) return;
|
|
|
let that = this;
|