fix:修复支付问题
This commit is contained in:
parent
d329ab031f
commit
b4dfe55e97
@ -89,7 +89,7 @@ export const checkPhoneFdd = () => {
|
||||
//获取openid
|
||||
export const getOpenId = (data) => {
|
||||
return http.request({
|
||||
url: "/api/wxuser/openid",
|
||||
url: "/api/wxuser/get/openid",
|
||||
method: "POST",
|
||||
data,
|
||||
});
|
||||
|
@ -764,9 +764,8 @@ export default {
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: async ({ code }) => {
|
||||
console.log('code', code)
|
||||
const res3 = await this.$api.login.getOpenId({ code })
|
||||
if (res3.status === 0) {
|
||||
if (res3.code === 200) {
|
||||
const res2 = await postDataByParams(
|
||||
'/api/v2/warehouse/paid',
|
||||
{
|
||||
@ -786,6 +785,9 @@ export default {
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.loading = false
|
||||
this.$common.msgToast(res2.msg)
|
||||
}
|
||||
} else {
|
||||
this.$common.msgToast(res3.msg)
|
||||
|
@ -255,26 +255,20 @@ export default {
|
||||
this.messageText = `确认补款吗`
|
||||
this.$refs.alertDialog.open()
|
||||
},
|
||||
async getOpenId() {
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: async ({ code }) => {
|
||||
const res = await this.$api.login.getOpenId({ code })
|
||||
this.status = res.data.status
|
||||
if (res.data.status !== 0) this.$common.msgToast(res.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
async supplementaryPayment() {
|
||||
const data = {
|
||||
ID: this.item.ID
|
||||
}
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: async ({ code }) => {
|
||||
const res3 = await this.$api.login.getOpenId({ code })
|
||||
if (res3.code === 200) {
|
||||
const res = await postDataByParams(
|
||||
'/api/warehouse/supply/paid',
|
||||
data
|
||||
)
|
||||
await this.getOpenId()
|
||||
if (res.code === 200 && this.status === 0) {
|
||||
if (res.code === 200) {
|
||||
uni.requestPayment({
|
||||
...res.data,
|
||||
fail: (res) => {},
|
||||
@ -292,6 +286,11 @@ export default {
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.$common.msgToast(res3.msg)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
async getDistanceFromTopToPageBottom(classValue) {
|
||||
const { windowHeight, windowWidth } = await uni.getSystemInfo()
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user