diff --git a/pages/common/common.wxml b/pages/common/common.wxml index 384d242..3b6b68a 100644 --- a/pages/common/common.wxml +++ b/pages/common/common.wxml @@ -411,7 +411,7 @@ - 发布成功 + {{ isPageState == 'edit' ? '发布' : '操作' }}成功 完成房源认证更快租出去 diff --git a/pages/edit/edit.wxml b/pages/edit/edit.wxml index 48a4f0f..ede2b37 100644 --- a/pages/edit/edit.wxml +++ b/pages/edit/edit.wxml @@ -226,7 +226,7 @@ - + diff --git a/pages/user/user.js b/pages/user/user.js index 1b37ca5..13ba6e2 100644 --- a/pages/user/user.js +++ b/pages/user/user.js @@ -117,7 +117,6 @@ Page({ identityObj: { 1: { text: "中介认证", - // bgcolor: "rgba(46, 207, 226, 1)", bgcolor: "#9EB1F6", }, 0: { @@ -135,6 +134,7 @@ Page({ validityidentity: "", // 中介有效日期 failPopState: false, // 提交失败的弹窗状态 QRCodePopState: false, // 客服弹窗的状态 + authenticatePopupStatus: false, // 认证弹窗状态 }, launchAppError(e) { @@ -193,6 +193,9 @@ Page({ } this.getUserInit() } + // this.setTopUpState() + console.log("getTopUpState:", this.getTopUpState()); + this.bindtopUp() }, getTopTitle() { @@ -630,38 +633,36 @@ Page({ bindtopUp(e) { let token, index, isding + + + const upState = this.getTopUpState() + console.log("upState", upState); + // upState: false 代表24小时内 没有弹出认证弹窗 + if (!upState) { + console.log("1234567899"); + } + return + token = e.detail.token index = e.detail.index isding = e.detail.isding - if (isding == 1) { this.setData({ raisePopupMessage: "今天已顶过啦,明天再来吧!", raisePopupState: true, isdingState: 1 }) - setTimeout(() => { - this.setData({ - raisePopupState: false, - }) - setTimeout(() => { - this.setData({ - isdingState: 0 - }) - }, 500) - }, 1500) + this.bindtopUpAnimation() return } miucms.request(app.globalData.baseURL + "/tenement/post/ding", { token }).then(res => { if (res.code == 200) { - if (isding == 0) this.data.publish.data[index].isding = 1 else this.data.publish.data[index].isding = 0 - this.setData({ raisePopupMessage: res.message, raisePopupState: true, @@ -680,19 +681,53 @@ Page({ raisePopupState: true, isdingState: 1 }) - setTimeout(() => { - this.setData({ - raisePopupState: false, - }) - setTimeout(() => { - this.setData({ - isdingState: 0 - }) - }, 500) - }, 1500) + this.bindtopUpAnimation() }) }, + // 顶上去动画 + bindtopUpAnimation(e) { + setTimeout(() => { + this.setData({ + raisePopupState: false, + }) + setTimeout(() => { + this.setData({ + isdingState: 0 + }) + }, 500) + }, 1500) + }, + + // 设置 topUpState 状态为 true,并设置过期时间为24小时后 + setTopUpState() { + var now = new Date(); + // var expireTime = now.getTime() + 24 * 60 * 60 * 1000; // 24小时后的时间戳 + var expireTime = now.getTime() + 10000; // 10 秒的时间戳 + now.setTime(expireTime); + + wx.setStorageSync('topUpState', { + value: true, + expireTime: now.getTime() + }); + }, + + // 获取 topUpState 状态 + getTopUpState() { + var topUpState = wx.getStorageSync('topUpState'); + if (topUpState) { + var now = new Date().getTime(); + if (now < topUpState.expireTime) { + console.log("用户在24小时内进行了充值操作,topUpState 为 true"); + return true; + } + } + + console.log("用户超过24小时未进行充值操作,topUpState 为 false"); + return false; + }, + + // 撤销审核 cancelAudit(e) { let that = this @@ -1191,4 +1226,9 @@ Page({ }) }, + // 点击顶一顶后的暂不认证 + goShowPage() { + + }, + }) \ No newline at end of file diff --git a/pages/user/user.wxml b/pages/user/user.wxml index 6651e0f..1f160fb 100644 --- a/pages/user/user.wxml +++ b/pages/user/user.wxml @@ -153,4 +153,6 @@ - + + + \ No newline at end of file