From f285559f4bdedde25952ce92c80b25dd2b48b168 Mon Sep 17 00:00:00 2001 From: lanzhihui <503792708@qq.com> Date: Sun, 29 Sep 2024 19:32:43 +0800 Subject: [PATCH 1/3] update --- src/pages/tabBar/welcome.wpy | 3 +++ src/pages/users/logout.wpy | 1 + src/pages/users/unmarri.wpy | 4 +++- src/pages/users/upgradeVIP.wpy | 11 ++++++----- src/utils/util.js | 3 +++ 5 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/pages/tabBar/welcome.wpy b/src/pages/tabBar/welcome.wpy index 4122326..a46d4e0 100644 --- a/src/pages/tabBar/welcome.wpy +++ b/src/pages/tabBar/welcome.wpy @@ -42,6 +42,9 @@ wepy.page({ }, onShow() { setTimeout(() => { + // if (wx.getStorageSync('logoutCode')) { + // return + // } wx.switchTab({url: `/pages/tabBar/home`}) }, 100) }, diff --git a/src/pages/users/logout.wpy b/src/pages/users/logout.wpy index 2244020..57f6706 100644 --- a/src/pages/users/logout.wpy +++ b/src/pages/users/logout.wpy @@ -195,6 +195,7 @@ data = { type: 'ALLSEX', reason: vm.value + // convert_marriage: 0 } if (vm.throttling) { vm.throttling = false diff --git a/src/pages/users/unmarri.wpy b/src/pages/users/unmarri.wpy index 4607706..5f6a579 100644 --- a/src/pages/users/unmarri.wpy +++ b/src/pages/users/unmarri.wpy @@ -421,7 +421,9 @@ ensureData(data) { // 保存 this.$put({url: `${service.host}/user/base/profile`, data}).then(({code, data}) => { console.log('参数保存成功!') - this.$gotoBack(1) + wx.navigateBack({ + delta: 1 + }) }) }, diff --git a/src/pages/users/upgradeVIP.wpy b/src/pages/users/upgradeVIP.wpy index 66b5154..e30c2d7 100644 --- a/src/pages/users/upgradeVIP.wpy +++ b/src/pages/users/upgradeVIP.wpy @@ -180,10 +180,10 @@ this.rankList = [] this.system = app.globalData.systemInfo.system.split(' ')[0] console.log(this.system, '2224') - if (this.system == 'iOS') { - this.$redirectTo(`/pages/users/upgradeVIP2?chat_user_id=${this.chat_user_id}`) - return - } + // if (this.system == 'iOS') { + // this.$redirectTo(`/pages/users/upgradeVIP2?chat_user_id=${this.chat_user_id}`) + // return + // } // share_type console.log(this.system) this.getPageData() @@ -257,6 +257,7 @@ vm.rankList.push(item) // } }) + console.log(vm.rankList, 'rankList-====') if (vm.system == 'iOS') { vm.rankList = [ {pic: 'https://images.ufutx.com/202004/11/3ccfd5478ea792e8793c7eebbf152511.png'}, @@ -356,7 +357,7 @@ pay_type: this.wxPayShow } that.$post({url: url, data}).then(({code, data}) => { - that.trade_no = data.trade_no + that.trade_no = data.order.trade_no if (data.length == 0) { that.$post({url: `${service.host}/order/${that.trade_no}/callback`}).then(({code, data}) => { that.getUserData() diff --git a/src/utils/util.js b/src/utils/util.js index 646e06e..ebd4644 100644 --- a/src/utils/util.js +++ b/src/utils/util.js @@ -52,6 +52,9 @@ const wx_login = () => { wx.setStorageSync('openid', (data.openid)) wx.setStorageSync('user_id', data.user.id) // 用户id wx.setStorageSync('mobile', data.user.mobile) // 用户手机号 + if (data.user.hidden_profile !== 'NONE' && data.frozen_state !== 1) { // 资料是否关闭 + wx.redirectTo({url: '/pages/users/logoutDefault'}) + } let userInfo = { is_moment_admin: data.is_moment_admin, is_base_profile: data.is_base_profile, From 98d8c1f67b99a09b433cf7659f22e8026c7c2adc Mon Sep 17 00:00:00 2001 From: lanzhihui <503792708@qq.com> Date: Mon, 30 Sep 2024 09:18:12 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=85=B3=E9=97=AD=E8=B5=84=E6=96=99update?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/tabBar/welcome.wpy | 6 +++--- src/utils/util.js | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/pages/tabBar/welcome.wpy b/src/pages/tabBar/welcome.wpy index a46d4e0..e86a42c 100644 --- a/src/pages/tabBar/welcome.wpy +++ b/src/pages/tabBar/welcome.wpy @@ -42,9 +42,9 @@ wepy.page({ }, onShow() { setTimeout(() => { - // if (wx.getStorageSync('logoutCode')) { - // return - // } + if (wx.getStorageSync('logoutCode')) { + return + } wx.switchTab({url: `/pages/tabBar/home`}) }, 100) }, diff --git a/src/utils/util.js b/src/utils/util.js index ebd4644..33a578d 100644 --- a/src/utils/util.js +++ b/src/utils/util.js @@ -52,7 +52,8 @@ const wx_login = () => { wx.setStorageSync('openid', (data.openid)) wx.setStorageSync('user_id', data.user.id) // 用户id wx.setStorageSync('mobile', data.user.mobile) // 用户手机号 - if (data.user.hidden_profile !== 'NONE' && data.frozen_state !== 1) { // 资料是否关闭 + if (data.user.hidden_profile !== 'NONE') { // 资料是否关闭 + wx.setStorageSync('logoutCode', 1) wx.redirectTo({url: '/pages/users/logoutDefault'}) } let userInfo = { From 4fa0955255cc4555bcf98cb04f5c4b258f603302 Mon Sep 17 00:00:00 2001 From: lanzhihui <503792708@qq.com> Date: Mon, 30 Sep 2024 09:39:24 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E9=A1=B5=E5=BC=B9?= =?UTF-8?q?=E7=AA=97=E6=94=AF=E4=BB=98=E9=97=AE=E9=A2=98=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/UnlockingDialog.wpy | 39 ++++++++++++------------------ 1 file changed, 16 insertions(+), 23 deletions(-) diff --git a/src/components/UnlockingDialog.wpy b/src/components/UnlockingDialog.wpy index 55aa919..ad3064f 100644 --- a/src/components/UnlockingDialog.wpy +++ b/src/components/UnlockingDialog.wpy @@ -179,60 +179,53 @@ import https from '../mixins/https' }, conversion(item) { let that = this, - url = `${service.host}/user/recharge/v2` + url = `${service.host}/rank/buy` that.modalName = '' that.$showLoading('支付中...') let data = { sub_rank_id: that.payId, - chat_user_id: that.chat_user_id + pay_type: 'cash' + // chat_user_id: that.chat_user_id } - that.$post({url: url, data}, { - success: ({code, data}) => { - that.trade_no = data.trade_no - if (data.wx_pay.length == 0) { - that.$post({url: `${service.orderpay}/${that.trade_no}/v2`}).then(({code, data}) => { + that.$post({url: url, data}).then(({code, data}) => { + that.trade_no = data.order.trade_no + if (data.length == 0) { + that.$post({url: `${service.host}/order/${that.trade_no}/callback`}).then(({code, data}) => { // that.getUserData() that.$emit('toUpdateCut') that.$Toast_success('支付成功') - }) + }) } else { - let wxconfig = data.wx_pay.config + let wxconfig = data.config if (wxconfig.payment_debug) { - return that.$post({url: `${service.orderpay}/${that.trade_no}/v2`}).then(({code, data}) => { + return that.$post({url: `${service.host}/order/${that.trade_no}/callback`}).then(({code, data}) => { // that.getUserData() that.$emit('toUpdateCut') that.$Toast_success('支付成功') - }) + }) } wx.requestPayment({ - timeStamp: wxconfig.timestamp, // 支付签名时间戳,注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符 + timeStamp: wxconfig.timeStamp, // 支付签名时间戳,注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符 nonceStr: wxconfig.nonceStr, // 支付签名随机串,不长于 32 位 package: wxconfig.package, // 统一支付接口返回的prepay_id参数值,提交格式如:prepay_id=***) signType: wxconfig.signType, // 签名方式,默认为'SHA1',使用新版支付需传入'MD5' paySign: wxconfig.paySign, // 支付签名 success: function (res) { - that.$post({url: `${service.orderpay}/${that.trade_no}/v2`}).then(({code, data}) => { + that.$post({url: `${service.host}/order/${that.trade_no}/callback`}).then(({code, data}) => { // that.getUserData() that.$emit('toUpdateCut') that.$Toast_success('支付成功') - }) + }) }, fail: function (res) { + console.log(res, '===') wx.showToast({ title: '已取消支付', icon: 'none', duration: 2000 }) } - }) - } - }, - fail: ({code, data}) => { - }, - complete: () => { - setTimeout(() => { - wx.hideLoading() - }, 1200) + }) } }) },