diff --git a/src/App.vue b/src/App.vue index bff5c03..f571f3c 100644 --- a/src/App.vue +++ b/src/App.vue @@ -111,13 +111,13 @@ export default { wx.ready(() => { wx.updateAppMessageShareData(shareinfo); wx.updateTimelineShareData(shareinfo); - // wx.getLocation({ - // type: 'gcj02', - // success: (e) => { - // localStorage.setItem('user_latitude', e.latitude) - // localStorage.setItem('user_longitude', e.longitude) - // } - // }); + wx.getLocation({ + type: 'gcj02', + success: (e) => { + localStorage.setItem('user_latitude', e.latitude) + localStorage.setItem('user_longitude', e.longitude) + } + }); }); wx.error((e) => { }); diff --git a/src/views/Cashout/Cashout.vue b/src/views/Cashout/Cashout.vue index 5902c95..97a35ac 100644 --- a/src/views/Cashout/Cashout.vue +++ b/src/views/Cashout/Cashout.vue @@ -9,7 +9,7 @@
- {{ card.bankcardnumber }} + {{ card.realname }}({{ card.bankcardnumber }})
请选择到账账户 @@ -29,9 +29,9 @@

注:

-

1、提现手续费{{ cashoutConfig.CommissionRate * 100 }}%

-

2、最低提现金额{{ cashoutConfig.BaseCash }}元

-

3、提现后{{ cashoutConfig.Cycle }}个工作日内审核发放

+

1、提现手续费{{ (cashoutConfig.wdfeeratio * 100)?.toFixed(2) }}%

+

2、最低提现金额{{ cashoutConfig.wdnumsmin?.toFixed(2) }}元

+

3、提现后{{ cashoutConfig.reviewdays }}个工作日内审核发放

提现 @@ -46,7 +46,7 @@
- {{ item.bankcardnumber }} + {{ item.realname }}({{ item.bankcardnumber }})
@@ -83,11 +83,17 @@ export default { }, methods: { init() { - this.$get('/v1/client/DUsersClient').then(data => { - this.wallet.Balance = data.data.zijin; - }).catch(err => { - this.$showFailToast(err.message); - }); + Promise.all([ + this.$get('/v1/client/DUsersClient').then(data => { + this.wallet.Balance = data.data.zijin; + }).catch(err => { + this.$showFailToast(err.message); + }), + this.$get('/v1/client/DUserwithdrawsClient/param').then(res => { + this.cashoutConfig = res.data; + }) + ]) + }, selectCard(item) { this.card = item; @@ -99,14 +105,14 @@ export default { this.$showFailToast('请选择到账账户'); return; } - if (!this.form.amount || this.form.amount < this.cashoutConfig.BaseCash) { - this.$showFailToast(`提现金额必须大于${this.cashoutConfig.BaseCash}`); + if (!this.form.amount || this.form.amount < this.cashoutConfig.wdnumsmin) { + this.$showFailToast(`提现金额必须大于${this.cashoutConfig.wdnumsmin}`); return; } - const commission = (this.form.amount * this.cashoutConfig.CommissionRate).toFixed(2); + const commission = (this.form.amount * this.cashoutConfig.wdfeeratio).toFixed(2); this.$showConfirmDialog({ title: "提示", - message: `您本次提现${this.form.amount}元${commission > 0 ? `,提现手续费${commission}元` : ''},是否确认提现?`, + message: `您本次提现${this.form.amount}元,扣除${this.cashoutConfig.wdfeeratio * 100}%手续费,实际到账${(this.form.amount * (1 - this.cashoutConfig.wdfeeratio)).toFixed(2)}元,是否确认提现?`, }).then(() => { this.$post('/v1/client/DUserwithdrawsClient', { bankcardid: this.form.bankcardid, diff --git a/src/views/Cashout/CashoutRecord.vue b/src/views/Cashout/CashoutRecord.vue index f94fefd..cee1b67 100644 --- a/src/views/Cashout/CashoutRecord.vue +++ b/src/views/Cashout/CashoutRecord.vue @@ -11,24 +11,32 @@ -
- -
-
- {{ item.wdfromname }} -> {{ item.wdtoname }} - {{ $formatGMT(item.wdaddtime, 'yyyy-MM-dd HH:mm:ss') }} -
-
- {{ item.realname }} {{ item.bankname }}{{ item.bankcardnumber?.substr(-4) }} - - {{ item.wdstatename }} - -
-
- 手续费: ¥{{ item.wdfee }} - ¥{{ item.wdnums }} +
+
+ +
+
+ {{ item.wdfromname }} -> {{ item.wdtoname }} + + {{ $formatGMT(item.reviewtime, 'yyyy-MM-dd HH:mm:ss') }} + + {{ $formatGMT(item.wdaddtime, 'yyyy-MM-dd HH:mm:ss') }} +
+
+ {{ item.realname }} {{ item.bankname }}{{ item.bankcardnumber?.substr(-4) }} + + {{ item.wdstatename }} + +
+
+ 手续费: ¥{{ item.wdfee }} + ¥{{ item.wdnums }} +
+
+ {{ item.reviewremark }} +
@@ -90,9 +98,10 @@ export default { this.list.push(...items); this.page++; this.finished = items.length < this.pageSize; - // 计算累计提现 + // 计算累计提现(只排除已拒绝的) if (this.page === 2) { - this.totalCash = items.reduce((sum, item) => sum + (item.wdnums || 0), 0); + const filteredItems = items.filter(item => item.wdstate !== 2); + this.totalCash = filteredItems.reduce((sum, item) => sum + (item.wdnums || 0), 0); } }).catch(() => { this.finished = true; @@ -101,7 +110,7 @@ export default { }); }, getStateType(state) { - const map = { 0: 'warning', 1: 'success', 2: 'danger', 3: 'default' }; + const map = { 0: 'warning', 2: 'danger', 7: 'success' }; return map[state] || 'default'; }, } @@ -130,15 +139,18 @@ export default { padding: 3.333vw; } +.record-box { + margin-bottom: 3.333vw; + background: #fff; + padding: 2vw 2vw; + border-radius: 1.333vw; + width: 93.333vw; +} + .record { position: relative; display: flex; align-items: center; - margin-bottom: 3.333vw; - width: 93.333vw; - background: #fff; - padding: 1vw 2vw; - border-radius: 1.333vw; } .record .content { diff --git a/src/views/Tabbars/Social.vue b/src/views/Tabbars/Social.vue index e268bef..e830f83 100644 --- a/src/views/Tabbars/Social.vue +++ b/src/views/Tabbars/Social.vue @@ -76,8 +76,8 @@ export default { active: 0, categories: [], searchparams: { - latitude: 29.309300, - longitude: 120.070380, + latitude: localStorage.getItem('user_latitude') || 29.309300, + longitude: localStorage.getItem('user_longitude') || 120.070380, shopcateid: '', orderby: '', shopname: '', @@ -145,48 +145,52 @@ export default { this.searchparams.shopname = this.searchQuery; }, initLocation() { - if (wx && this.$isWechat()) { - this.$post('/v1/client/HWxinfoClient/share', JSON.stringify(location.href)).then(res => { - const data = res.data || {}; - const jsApiList = data.jsApiList || ['getLocation']; - const openTagList = data.openTagList || ['wx-open-launch-weapp']; - jsApiList.push('wx-open-launch-weapp'); - wx.config({ - debug: false, - appId: data.appid, - timestamp: Number(data.timestamp) || 0, - nonceStr: data.noncestr, - signature: data.signature, - jsApiList: jsApiList, - openTagList: openTagList - }); - wx.ready(() => { - wx.getLocation({ - type: 'gcj02', - success: (e) => { - this.searchparams.latitude = e.latitude; - this.searchparams.longitude = e.longitude; - }, - fail: (err) => { - console.log('定位失败:', err) - // this.$showToast('定位被拒绝,请重新进入页面获取定位') - }, - }); - }); - wx.error((e) => { - if (localStorage.getItem('latitude') && localStorage.getItem('longitude')) { - this.searchparams.latitude = localStorage.getItem('latitude'); - this.searchparams.longitude = localStorage.getItem('longitude'); - return - } else { - this.$geo.getWebGeo().then(res => { - this.searchparams.latitude = res.lat; - this.searchparams.longitude = res.lon; - }); - } - }); - }); - } else { + // if (wx && this.$isWechat()) { + // this.$post('/v1/client/HWxinfoClient/share', JSON.stringify(location.href)).then(res => { + // const data = res.data || {}; + // const jsApiList = data.jsApiList || ['getLocation']; + // const openTagList = data.openTagList || ['wx-open-launch-weapp']; + // jsApiList.push('wx-open-launch-weapp'); + // wx.config({ + // debug: false, + // appId: data.appid, + // timestamp: Number(data.timestamp) || 0, + // nonceStr: data.noncestr, + // signature: data.signature, + // jsApiList: jsApiList, + // openTagList: openTagList + // }); + // wx.ready(() => { + // wx.getLocation({ + // type: 'gcj02', + // success: (e) => { + // this.searchparams.latitude = e.latitude; + // this.searchparams.longitude = e.longitude; + // }, + // fail: (err) => { + // console.log('定位失败:', err) + // // this.$showToast('定位被拒绝,请重新进入页面获取定位') + // }, + // }); + // }); + // wx.error((e) => { + // if (localStorage.getItem('latitude') && localStorage.getItem('longitude')) { + // this.searchparams.latitude = localStorage.getItem('latitude'); + // this.searchparams.longitude = localStorage.getItem('longitude'); + // return + // } else { + // this.$geo.getWebGeo().then(res => { + // this.searchparams.latitude = res.lat; + // this.searchparams.longitude = res.lon; + // }); + // } + // }); + // }); + // } else { + + // } + + if (!this.$isWechat()) { this.$geo.getWebGeo().then(res => { this.searchparams.latitude = res.lat; this.searchparams.longitude = res.lon;