fix:修复获取openid的code

This commit is contained in:
hanlin 2024-12-11 10:26:58 +08:00
parent 03138b7089
commit 409d5f0ab8
8 changed files with 718 additions and 610 deletions

View File

@ -489,7 +489,8 @@ export default {
day,
value: [9999, month - 1, day - 1],
visible: true,
url: ''
url: '',
status: 0
}
},
computed: {
@ -750,6 +751,16 @@ 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 = {
@ -759,31 +770,24 @@ export default {
'/api/v2/warehouse/create',
data1
)
if (res1.code === 200) {
const res3 = await this.$api.login.getOpenId()
if (res3.status === 0) {
const res2 = await postDataByParams(
'/api/v2/warehouse/paid',
{
ID: res1.data.ID
await this.getOpenId()
if (res1.code === 200 && this.status === 0) {
const res2 = await postDataByParams('/api/v2/warehouse/paid', {
ID: res1.data.ID
})
if (res2.code === 200) {
uni.requestPayment({
...res2.data,
fail: (res) => {
this.loading = false
},
success: () => {
this.loading = false
uni.navigateTo({
url: `/pages/paySuccess/paySuccess?ID=${res1.data.ID}`
})
}
)
if (res2.code === 200) {
uni.requestPayment({
...res2.data,
fail: (res) => {
this.loading = false
},
success: () => {
this.loading = false
uni.navigateTo({
url: `/pages/paySuccess/paySuccess?ID=${res1.data.ID}`
})
}
})
}
} else {
this.$common.msgToast(res3.msg)
})
}
}
},

File diff suppressed because it is too large Load Diff

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

View File

@ -54,7 +54,7 @@
align-items: center;
height: 228rpx;
width: 154rpx;
background-color: #B7C0C8;
background-color: #b7c0c8;
right: -144rpx;
position: absolute;
z-index: -1;
@ -75,34 +75,34 @@
color: #939393;
}
.order-goods .content3 .wrap1 .wrap1_3.status1.data-v-c0c42e9e {
background: #FFBA00;
background: #ffba00;
}
.order-goods .content3 .wrap1 .wrap1_3.status1 .wrap1_3_3_1.data-v-c0c42e9e {
color: #FFBA00;
color: #ffba00;
}
.order-goods .content3 .wrap1 .wrap1_3.status2.data-v-c0c42e9e {
background: #76C458;
background: #76c458;
}
.order-goods .content3 .wrap1 .wrap1_3.status2 .wrap1_3_3_1.data-v-c0c42e9e {
color: #76C458;
color: #76c458;
}
.order-goods .content3 .wrap1 .wrap1_3.status7.data-v-c0c42e9e {
background: #76C458;
background: #76c458;
}
.order-goods .content3 .wrap1 .wrap1_3.status7 .wrap1_3_3_1.data-v-c0c42e9e {
font-size: 23rpx !important;
}
.order-goods .content3 .wrap1 .wrap1_3.status3.data-v-c0c42e9e {
background: #76C458;
background: #76c458;
}
.order-goods .content3 .wrap1 .wrap1_3.status3 .wrap1_3_3_1.data-v-c0c42e9e {
color: #FF4848;
color: #ff4848;
}
.order-goods .content3 .wrap1 .wrap1_3.status4.data-v-c0c42e9e {
background: #FF4848;
background: #ff4848;
}
.order-goods .content3 .wrap1 .wrap1_3.status4 .wrap1_3_3_1.data-v-c0c42e9e {
color: #FF4848;
color: #ff4848;
}
.order-goods .content3 .wrap1 .wrap1_3 .wrap1_3_4.data-v-c0c42e9e {
display: flex;
@ -169,11 +169,11 @@
}
.order-goods .content3 .wrap1 .wrap1_3 .wrap1_3_1 .wrap1_3_1_1.data-v-c0c42e9e {
font-size: 16rpx;
color: #FF4848;
color: #ff4848;
}
.order-goods .content3 .wrap1 .wrap1_3 .wrap1_3_1 .wrap1_3_1_2.data-v-c0c42e9e {
font-size: 24rpx;
color: #FF4848;
color: #ff4848;
}
.order-goods .content3 .wrap1 .wrap1_3 .wrap1_3_1 .wrap1_3_1_3.data-v-c0c42e9e {
display: flex;
@ -208,7 +208,7 @@
font-size: 24rpx;
}
.order-goods .content3 .wrap1 .wrap1_2 .wrap1_2_4.data-v-c0c42e9e {
color: #FF4848;
color: #ff4848;
font-size: 24rpx;
}
.order-goods .content3 .wrap1 .wrap1_1 image.data-v-c0c42e9e {
@ -229,7 +229,7 @@
font-size: 20rpx;
width: 94rpx;
height: 52rpx;
background-color: #4E964D;
background-color: #4e964d;
}
.order-goods .content2 .wrap1.data-v-c0c42e9e {
align-items: center;
@ -262,7 +262,7 @@
color: #fff;
width: 132rpx;
height: 52rpx;
background-color: #76C458;
background-color: #76c458;
display: flex;
justify-content: center;
align-items: center;
@ -274,11 +274,11 @@
align-items: center;
}
.order-goods .content1 .wrap2 .wrap2_1.data-v-c0c42e9e {
color: #4E964D;
color: #4e964d;
font-size: 32rpx;
}
.order-goods .content1 .wrap2 .wrap2_2.data-v-c0c42e9e {
color: #7C9F6F;
color: #7c9f6f;
font-size: 16rpx;
}
.order-goods .content1 .wrap1 .wrap1_1.data-v-c0c42e9e {
@ -286,7 +286,7 @@
border-radius: 20rpx;
width: 156rpx;
height: 52rpx;
background-color: #4E964D;
background-color: #4e964d;
color: #fff;
font-size: 24rpx;
display: flex;