修改小程序与app的兼容文件

This commit is contained in:
gaoxs
2020-04-06 17:18:09 +08:00
parent c837a94363
commit 57ae931f2d
31 changed files with 1257 additions and 1101 deletions

View File

@ -481,6 +481,26 @@
uni.showLoading({
title: "生成订单中"
});
let form = {}
if (this.$deviceType == 'app') {
form.form = 'app'
}
console.log(this.orderGroupInfo.orderKey, {
realName: this.contacts,
phone: this.contactsTel,
addressId: this.addressInfo.id,
useIntegral: this.useIntegral ? 1 : 0,
couponId: this.usableCoupon.id || 0,
payType: this.active,
pinkId: this.pinkId,
seckillId: this.orderGroupInfo.seckill_id,
combinationId: this.orderGroupInfo.combination_id,
bargainId: this.orderGroupInfo.bargain_id,
from: this.from,
mark: this.mark || "",
shippingType: parseInt(shipping_type) + 1,
...form
})
createOrder(this.orderGroupInfo.orderKey, {
realName: this.contacts,
phone: this.contactsTel,
@ -494,9 +514,11 @@
bargainId: this.orderGroupInfo.bargain_id,
from: this.from,
mark: this.mark || "",
shippingType: parseInt(shipping_type) + 1
shippingType: parseInt(shipping_type) + 1,
...form
})
.then(res => {
.then(res => {
console.log(res)
uni.hideLoading();
const data = res.data;
switch (data.status) {
@ -541,7 +563,8 @@
}, 100);
break;
case "WECHAT_PAY":
weappPay(data.result.jsConfig).then(res => {
weappPay(data.result.jsConfig).then(res => {
console.log(res)
this.$yrouter.replace({
path: "/pages/order/OrderDetails/index",
query: {
@ -569,4 +592,4 @@
}
}
};
</script>
</script>