fix: app 0元购
This commit is contained in:
parent
6fcfd499d0
commit
163728334c
|
|
@ -20,7 +20,7 @@
|
|||
},
|
||||
{
|
||||
"customPlaygroundType" : "device",
|
||||
"playground" : "custom",
|
||||
"playground" : "standard",
|
||||
"type" : "uni-app:app-android"
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -226,6 +226,7 @@
|
|||
// 商品组件
|
||||
import bRxCommodityItem from '@/components/b-rx-commodity-item/b-rx-commodity-item.vue';
|
||||
import { launchWechatMiniProgram } from '@/utils/index.js';
|
||||
import webView from '@/static/js/uni.webview.1.5.2.js'
|
||||
|
||||
let self;
|
||||
export default {
|
||||
|
|
@ -438,25 +439,32 @@
|
|||
|
||||
// 创建订单
|
||||
createFoodOrder(from).then(res => {
|
||||
console.log(res.adta)
|
||||
|
||||
let redirect_url = '/pages/restaurant/order/order-details/details';
|
||||
uni.hideLoading();
|
||||
|
||||
if (res.data.is_zero_pay) {
|
||||
uni.showLoading({ title: '支付成功, 跳转订单页' });
|
||||
setTimeout(() => {
|
||||
this.$wx.miniProgram.getEnv((wx) => {
|
||||
if (this.$wx.miniprogram) {
|
||||
this.$wx.miniProgram.navigateTo({
|
||||
url: `/pages/goods/order_list/index`
|
||||
});
|
||||
} else {
|
||||
window.location.href = `${HTTP_REQUEST_URL}/JXH5/pages/goods/order_list/index`;
|
||||
}
|
||||
})
|
||||
uni.hideLoading();
|
||||
}, 1000)
|
||||
if (this.GetIsApp) {
|
||||
setTimeout(() => {
|
||||
uni.webView.reLaunch({
|
||||
url: '/pages/goods/order_list/index'
|
||||
});
|
||||
uni.hideLoading();
|
||||
}, 1000)
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
this.$wx.miniProgram.getEnv((wx) => {
|
||||
if (this.$wx.miniprogram) {
|
||||
this.$wx.miniProgram.navigateTo({
|
||||
url: `/pages/goods/order_list/index`
|
||||
});
|
||||
} else {
|
||||
window.location.href = `${HTTP_REQUEST_URL}/JXH5/pages/goods/order_list/index`;
|
||||
}
|
||||
})
|
||||
uni.hideLoading();
|
||||
}, 1000)
|
||||
}
|
||||
} else {
|
||||
if (this.GetIsApp) {
|
||||
launchWechatMiniProgram(res.data.miniProgramOrgId, 0, res.data.prePayTn);
|
||||
|
|
|
|||
|
|
@ -248,6 +248,7 @@
|
|||
} from '@/request/restaurant/index.js';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { launchWechatMiniProgram } from '@/utils/index.js';
|
||||
import webView from '@/static/js/uni.webview.1.5.2.js'
|
||||
|
||||
let self;
|
||||
export default {
|
||||
|
|
@ -449,24 +450,32 @@
|
|||
FormInfor.products = JSON.parse(FormInfor.products)
|
||||
|
||||
createFoodOrder(FormInfor).then(res => {
|
||||
uni.hideLoading();
|
||||
let redirect_url = '/pages/restaurant/order/order-details/details';
|
||||
uni.hideLoading();
|
||||
|
||||
if (res.data.is_zero_pay) {
|
||||
uni.showLoading({ title: '支付成功, 跳转订单页' });
|
||||
setTimeout(() => {
|
||||
this.$wx.miniProgram.getEnv((wx) => {
|
||||
if (this.$wx.miniprogram) {
|
||||
this.$wx.miniProgram.navigateTo({
|
||||
url: `/pages/goods/order_list/index`
|
||||
});
|
||||
}else {
|
||||
window.location.href = `${HTTP_REQUEST_URL}/JXH5/pages/goods/order_list/index`;
|
||||
}
|
||||
})
|
||||
uni.hideLoading();
|
||||
}, 1000)
|
||||
if (this.GetIsApp) {
|
||||
setTimeout(() => {
|
||||
uni.webView.reLaunch({
|
||||
url: '/pages/goods/order_list/index'
|
||||
});
|
||||
uni.hideLoading();
|
||||
}, 1000)
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
this.$wx.miniProgram.getEnv((wx) => {
|
||||
if (this.$wx.miniprogram) {
|
||||
this.$wx.miniProgram.navigateTo({
|
||||
url: `/pages/goods/order_list/index`
|
||||
});
|
||||
}else {
|
||||
window.location.href = `${HTTP_REQUEST_URL}/JXH5/pages/goods/order_list/index`;
|
||||
}
|
||||
})
|
||||
uni.hideLoading();
|
||||
}, 1000)
|
||||
}
|
||||
} else {
|
||||
if (this.GetIsApp) {
|
||||
launchWechatMiniProgram(res.data.miniProgramOrgId, 0, res.data.prePayTn);
|
||||
|
|
|
|||
|
|
@ -208,8 +208,6 @@ class Request {
|
|||
config['header']['form-type'] = 'app';
|
||||
}
|
||||
|
||||
config['header']['form-type'] = 'app';
|
||||
|
||||
console.log(cityInfor, '定位信息头')
|
||||
if (cityInfor?.adcode) {
|
||||
// config['header']['city'] = encodeURIComponent(cityInfor['city']);
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue