路径调整

This commit is contained in:
13405411873 2025-04-28 19:23:49 +08:00
parent a7ea70534f
commit 53d909a4ba
2 changed files with 82 additions and 38 deletions

View File

@ -24,3 +24,12 @@ export function gzhLogin(data) {
'data': data 'data': data
}) })
} }
// 提现接口
export function entPay(orderNo) {
return request({
'url': '/payApi/entPay?orderNo=' + orderNo,
'method': 'get'
})
}

View File

@ -64,9 +64,20 @@
<script> <script>
import navigationBarVue from '@/components/navigation/navigationBar.vue'; import navigationBarVue from '@/components/navigation/navigationBar.vue';
import {formatNumberWithCommas} from '@/utils/common.js' import {
import {pointList,payout} from '@/api/business/member.js' formatNumberWithCommas
import {toast} from '@/utils/common.js' } from '@/utils/common.js'
import {
pointList,
payout
} from '@/api/business/member.js'
import {
toast
} from '@/utils/common.js'
import {
entPay
} from '@/api/wxApi.js'
export default { export default {
components: { components: {
navigationBarVue, navigationBarVue,
@ -96,17 +107,17 @@
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
userId:null userId: null
}, },
total: 0, total: 0,
// //
isTriggered: false, isTriggered: false,
userId:null, userId: null,
pointsBalance:0 pointsBalance: 0
} }
}, },
onLoad(option){ onLoad(option) {
this.userId = option.userId this.userId = option.userId
this.queryParams.userId = option.userId this.queryParams.userId = option.userId
this.pointsBalance = option.pointsBalance this.pointsBalance = option.pointsBalance
@ -123,9 +134,9 @@
}, },
/**初始化数据*/ /**初始化数据*/
initData(){ initData() {
pointList(this.queryParams).then(res=>{ pointList(this.queryParams).then(res => {
if (res.code == 200){ if (res.code == 200) {
if (this.queryParams.pageNum == 1) { if (this.queryParams.pageNum == 1) {
this.dataList = res.data.records this.dataList = res.data.records
} else { } else {
@ -142,18 +153,42 @@
outData() { outData() {
this.$refs.inputDialog.open() this.$refs.inputDialog.open()
}, },
dialogInputConfirm(val) { dialogInputConfirm(val) {
if (val) { if (val) {
payout({points:val}).then(res => { payout({
points: val
}).then(res => {
if (res.code == 200) { if (res.code == 200) {
toast("已生成提现订单,请耐心等待")
// //
entPay(res.data.orderNo).then(payS => {
if (wx.canIUse('requestMerchantTransfer')) {
wx.requestMerchantTransfer({
mchId: payS.config.mchId,
appId: payS.config.appId,
package: payS.runData.packageInfo,
success: (res) => {
// res.err_msgok
console.log('success:', res);
},
fail: (res) => {
console.log('fail:', res);
},
});
} else {
wx.showModal({
content: '你的微信版本过低,请更新至最新版本。',
showCancel: false,
});
}
})
this.$refs.inputDialog.close() this.$refs.inputDialog.close()
} }
}).catch((e) => { }).catch((e) => {
toast(e) toast(e)
}) })
}else { } else {
toast("请填写提现金额,单次提交金额小于200") toast("请填写提现金额,单次提交金额小于200")
} }