路径调整

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

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

View File

@ -64,9 +64,20 @@
<script>
import navigationBarVue from '@/components/navigation/navigationBar.vue';
import {formatNumberWithCommas} from '@/utils/common.js'
import {pointList,payout} from '@/api/business/member.js'
import {toast} from '@/utils/common.js'
import {
formatNumberWithCommas
} 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 {
components: {
navigationBarVue,
@ -96,22 +107,22 @@
queryParams: {
pageNum: 1,
pageSize: 10,
userId:null
userId: null
},
total: 0,
//
isTriggered: false,
userId:null,
pointsBalance:0
userId: null,
pointsBalance: 0
}
},
onLoad(option){
this.userId = option.userId
this.queryParams.userId = option.userId
this.pointsBalance = option.pointsBalance
this.initData()
},
onLoad(option) {
this.userId = option.userId
this.queryParams.userId = option.userId
this.pointsBalance = option.pointsBalance
this.initData()
},
methods: {
/**
@ -122,19 +133,19 @@
return formatNumberWithCommas(number)
},
/**初始化数据*/
initData(){
pointList(this.queryParams).then(res=>{
if (res.code == 200){
if (this.queryParams.pageNum == 1) {
this.dataList = res.data.records
} else {
this.dataList = this.dataList.concat(res.data.records)
}
this.total = res.data.total
}
})
},
/**初始化数据*/
initData() {
pointList(this.queryParams).then(res => {
if (res.code == 200) {
if (this.queryParams.pageNum == 1) {
this.dataList = res.data.records
} else {
this.dataList = this.dataList.concat(res.data.records)
}
this.total = res.data.total
}
})
},
/**
* 提现
@ -142,20 +153,44 @@
outData() {
this.$refs.inputDialog.open()
},
dialogInputConfirm(val) {
if (val) {
payout({points:val}).then(res => {
if (res.code == 200) {
toast("已生成提现订单,请耐心等待")
//
this.$refs.inputDialog.close()
}
}).catch((e) => {
toast(e)
})
}else {
toast("请填写提现金额,单次提交金额小于200")
}
if (val) {
payout({
points: val
}).then(res => {
if (res.code == 200) {
//
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()
}
}).catch((e) => {
toast(e)
})
} else {
toast("请填写提现金额,单次提交金额小于200")
}
},
/**