路径调整
This commit is contained in:
parent
a7ea70534f
commit
53d909a4ba
@ -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'
|
||||
})
|
||||
}
|
@ -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_msg将在页面展示成功后返回应用时返回ok,并不代表付款成功
|
||||
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")
|
||||
}
|
||||
|
||||
},
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user