Compare commits
2 Commits
409d5f0ab8
...
b4dfe55e97
Author | SHA1 | Date | |
---|---|---|---|
b4dfe55e97 | |||
d329ab031f |
@ -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,
|
||||
});
|
||||
|
@ -751,16 +751,6 @@ export default {
|
||||
fileListLen++
|
||||
}
|
||||
},
|
||||
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 signContract() {
|
||||
this.loading = true
|
||||
const data1 = {
|
||||
@ -770,11 +760,18 @@ export default {
|
||||
'/api/v2/warehouse/create',
|
||||
data1
|
||||
)
|
||||
await this.getOpenId()
|
||||
if (res1.code === 200 && this.status === 0) {
|
||||
const res2 = await postDataByParams('/api/v2/warehouse/paid', {
|
||||
if (res1.code === 200) {
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: async ({ code }) => {
|
||||
const res3 = await this.$api.login.getOpenId({ code })
|
||||
if (res3.code === 200) {
|
||||
const res2 = await postDataByParams(
|
||||
'/api/v2/warehouse/paid',
|
||||
{
|
||||
ID: res1.data.ID
|
||||
})
|
||||
}
|
||||
)
|
||||
if (res2.code === 200) {
|
||||
uni.requestPayment({
|
||||
...res2.data,
|
||||
@ -788,7 +785,15 @@ export default {
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.loading = false
|
||||
this.$common.msgToast(res2.msg)
|
||||
}
|
||||
} else {
|
||||
this.$common.msgToast(res3.msg)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
async obtainAmount() {
|
||||
|
@ -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