fix:修复获取openid的code
This commit is contained in:
parent
03138b7089
commit
409d5f0ab8
@ -489,7 +489,8 @@ export default {
|
|||||||
day,
|
day,
|
||||||
value: [9999, month - 1, day - 1],
|
value: [9999, month - 1, day - 1],
|
||||||
visible: true,
|
visible: true,
|
||||||
url: ''
|
url: '',
|
||||||
|
status: 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -750,6 +751,16 @@ export default {
|
|||||||
fileListLen++
|
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() {
|
async signContract() {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
const data1 = {
|
const data1 = {
|
||||||
@ -759,31 +770,24 @@ export default {
|
|||||||
'/api/v2/warehouse/create',
|
'/api/v2/warehouse/create',
|
||||||
data1
|
data1
|
||||||
)
|
)
|
||||||
if (res1.code === 200) {
|
await this.getOpenId()
|
||||||
const res3 = await this.$api.login.getOpenId()
|
if (res1.code === 200 && this.status === 0) {
|
||||||
if (res3.status === 0) {
|
const res2 = await postDataByParams('/api/v2/warehouse/paid', {
|
||||||
const res2 = await postDataByParams(
|
ID: res1.data.ID
|
||||||
'/api/v2/warehouse/paid',
|
})
|
||||||
{
|
if (res2.code === 200) {
|
||||||
ID: res1.data.ID
|
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
@ -54,7 +54,7 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
height: 228rpx;
|
height: 228rpx;
|
||||||
width: 154rpx;
|
width: 154rpx;
|
||||||
background-color: #B7C0C8;
|
background-color: #b7c0c8;
|
||||||
right: -144rpx;
|
right: -144rpx;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: -1;
|
z-index: -1;
|
||||||
@ -75,34 +75,34 @@
|
|||||||
color: #939393;
|
color: #939393;
|
||||||
}
|
}
|
||||||
.order-goods .content3 .wrap1 .wrap1_3.status1.data-v-c0c42e9e {
|
.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 {
|
.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 {
|
.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 {
|
.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 {
|
.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 {
|
.order-goods .content3 .wrap1 .wrap1_3.status7 .wrap1_3_3_1.data-v-c0c42e9e {
|
||||||
font-size: 23rpx !important;
|
font-size: 23rpx !important;
|
||||||
}
|
}
|
||||||
.order-goods .content3 .wrap1 .wrap1_3.status3.data-v-c0c42e9e {
|
.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 {
|
.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 {
|
.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 {
|
.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 {
|
.order-goods .content3 .wrap1 .wrap1_3 .wrap1_3_4.data-v-c0c42e9e {
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -169,11 +169,11 @@
|
|||||||
}
|
}
|
||||||
.order-goods .content3 .wrap1 .wrap1_3 .wrap1_3_1 .wrap1_3_1_1.data-v-c0c42e9e {
|
.order-goods .content3 .wrap1 .wrap1_3 .wrap1_3_1 .wrap1_3_1_1.data-v-c0c42e9e {
|
||||||
font-size: 16rpx;
|
font-size: 16rpx;
|
||||||
color: #FF4848;
|
color: #ff4848;
|
||||||
}
|
}
|
||||||
.order-goods .content3 .wrap1 .wrap1_3 .wrap1_3_1 .wrap1_3_1_2.data-v-c0c42e9e {
|
.order-goods .content3 .wrap1 .wrap1_3 .wrap1_3_1 .wrap1_3_1_2.data-v-c0c42e9e {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #FF4848;
|
color: #ff4848;
|
||||||
}
|
}
|
||||||
.order-goods .content3 .wrap1 .wrap1_3 .wrap1_3_1 .wrap1_3_1_3.data-v-c0c42e9e {
|
.order-goods .content3 .wrap1 .wrap1_3 .wrap1_3_1 .wrap1_3_1_3.data-v-c0c42e9e {
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -208,7 +208,7 @@
|
|||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
}
|
}
|
||||||
.order-goods .content3 .wrap1 .wrap1_2 .wrap1_2_4.data-v-c0c42e9e {
|
.order-goods .content3 .wrap1 .wrap1_2 .wrap1_2_4.data-v-c0c42e9e {
|
||||||
color: #FF4848;
|
color: #ff4848;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
}
|
}
|
||||||
.order-goods .content3 .wrap1 .wrap1_1 image.data-v-c0c42e9e {
|
.order-goods .content3 .wrap1 .wrap1_1 image.data-v-c0c42e9e {
|
||||||
@ -229,7 +229,7 @@
|
|||||||
font-size: 20rpx;
|
font-size: 20rpx;
|
||||||
width: 94rpx;
|
width: 94rpx;
|
||||||
height: 52rpx;
|
height: 52rpx;
|
||||||
background-color: #4E964D;
|
background-color: #4e964d;
|
||||||
}
|
}
|
||||||
.order-goods .content2 .wrap1.data-v-c0c42e9e {
|
.order-goods .content2 .wrap1.data-v-c0c42e9e {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@ -262,7 +262,7 @@
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
width: 132rpx;
|
width: 132rpx;
|
||||||
height: 52rpx;
|
height: 52rpx;
|
||||||
background-color: #76C458;
|
background-color: #76c458;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@ -274,11 +274,11 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
.order-goods .content1 .wrap2 .wrap2_1.data-v-c0c42e9e {
|
.order-goods .content1 .wrap2 .wrap2_1.data-v-c0c42e9e {
|
||||||
color: #4E964D;
|
color: #4e964d;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
}
|
}
|
||||||
.order-goods .content1 .wrap2 .wrap2_2.data-v-c0c42e9e {
|
.order-goods .content1 .wrap2 .wrap2_2.data-v-c0c42e9e {
|
||||||
color: #7C9F6F;
|
color: #7c9f6f;
|
||||||
font-size: 16rpx;
|
font-size: 16rpx;
|
||||||
}
|
}
|
||||||
.order-goods .content1 .wrap1 .wrap1_1.data-v-c0c42e9e {
|
.order-goods .content1 .wrap1 .wrap1_1.data-v-c0c42e9e {
|
||||||
@ -286,7 +286,7 @@
|
|||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
width: 156rpx;
|
width: 156rpx;
|
||||||
height: 52rpx;
|
height: 52rpx;
|
||||||
background-color: #4E964D;
|
background-color: #4e964d;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
Loading…
Reference in New Issue
Block a user