fix: 修改参数
This commit is contained in:
parent
4c311b5cb2
commit
845d797d09
|
|
@ -362,9 +362,13 @@
|
||||||
let from = JSON.parse(JSON.stringify(self['FormInfor']))
|
let from = JSON.parse(JSON.stringify(self['FormInfor']))
|
||||||
if (typeof from['products'] == 'object') {
|
if (typeof from['products'] == 'object') {
|
||||||
from['products'] = JSON.stringify(from['products'])
|
from['products'] = JSON.stringify(from['products'])
|
||||||
};
|
};
|
||||||
|
|
||||||
|
from.phone = from.phone_number;
|
||||||
|
from.products = JSON.parse(from.products);
|
||||||
|
|
||||||
// 创建订单
|
// 创建订单
|
||||||
createOrderNewAPI(from).then(res => {
|
createFoodOrder(from).then(res => {
|
||||||
const { pay_price, order_sn, type, openid} = res['data'];
|
const { pay_price, order_sn, type, openid} = res['data'];
|
||||||
console.log(pay_price, order_sn, type, openid)
|
console.log(pay_price, order_sn, type, openid)
|
||||||
this.$Payment.H5_Payment({
|
this.$Payment.H5_Payment({
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@
|
||||||
<text lines="1" class="text_21">联系方式</text>
|
<text lines="1" class="text_21">联系方式</text>
|
||||||
</view>
|
</view>
|
||||||
<view lines="1" class="text_22">
|
<view lines="1" class="text_22">
|
||||||
<input maxlength="11" v-model="FormInfor['phone_number']" type="text" placeholder="请填写您的手机号码">
|
<input maxlength="11" v-model="FormInfor['phone_number']" type="text" placeholder="请填写您的手机号">
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
@ -298,7 +298,7 @@
|
||||||
* @结算
|
* @结算
|
||||||
* */
|
* */
|
||||||
settlement() {
|
settlement() {
|
||||||
let FormInfor = JSON.parse(JSON.stringify(self['FormInfor']))
|
let FormInfor = JSON.parse(JSON.stringify(self['FormInfor']))
|
||||||
if (!FormInfor['phone_number'] || FormInfor['phone_number']['length'] < 11 || !uni.$u.test
|
if (!FormInfor['phone_number'] || FormInfor['phone_number']['length'] < 11 || !uni.$u.test
|
||||||
.mobile(FormInfor['phone_number'])) {
|
.mobile(FormInfor['phone_number'])) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|
@ -336,6 +336,7 @@
|
||||||
// })
|
// })
|
||||||
|
|
||||||
FormInfor.phone = FormInfor.phone_number;
|
FormInfor.phone = FormInfor.phone_number;
|
||||||
|
FormInfor.products = JSON.parse(FormInfor.products)
|
||||||
|
|
||||||
createFoodOrder(FormInfor).then(res => {
|
createFoodOrder(FormInfor).then(res => {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
|
|
|
||||||
|
|
@ -183,12 +183,16 @@ class Request {
|
||||||
config['header']['lat'] = cityInfor['lat'];
|
config['header']['lat'] = cityInfor['lat'];
|
||||||
// config['header']['lng'] = cityInfor['lon'];
|
// config['header']['lng'] = cityInfor['lon'];
|
||||||
config['header']['lng'] = cityInfor['lng'];
|
config['header']['lng'] = cityInfor['lng'];
|
||||||
config['header']['adcode'] = cityInfor['adcode'];
|
config['header']['adcode'] = cityInfor['adcode'];
|
||||||
|
|
||||||
|
// type
|
||||||
|
config['header']['form-type'] = 'routine';
|
||||||
} else {
|
} else {
|
||||||
// 后台判定该参数为空所以在没有的情况下需要传空值
|
// 后台判定该参数为空所以在没有的情况下需要传空值
|
||||||
config['header']['city'] = '';
|
config['header']['city'] = '';
|
||||||
config['header']['lat'] = '';
|
config['header']['lat'] = '';
|
||||||
config['header']['adcode'] = '';
|
config['header']['adcode'] = '';
|
||||||
|
config['header']['form-type'] = 'routine';
|
||||||
};
|
};
|
||||||
// config['header']['ApiToken'] =
|
// config['header']['ApiToken'] =
|
||||||
// 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2NjM4MTYzMTAsIm5iZiI6MTY2MzgxNjMxMCwiZXhwIjoxNjY2NDA4MzEwLCJkYXRhIjp7ImNsaWVudF9pZCI6MX19.db_hFkDJ2dogkvDkhaBj5W5gti3bFHWWRCVf3-PyF-E';
|
// 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2NjM4MTYzMTAsIm5iZiI6MTY2MzgxNjMxMCwiZXhwIjoxNjY2NDA4MzEwLCJkYXRhIjp7ImNsaWVudF9pZCI6MX19.db_hFkDJ2dogkvDkhaBj5W5gti3bFHWWRCVf3-PyF-E';
|
||||||
|
|
|
||||||
|
|
@ -311,8 +311,20 @@ const restaurantmixins = {
|
||||||
// 佣金计算
|
// 佣金计算
|
||||||
computedOfflineOrder(this.FormInfor).then(res => {
|
computedOfflineOrder(this.FormInfor).then(res => {
|
||||||
this.computedTotal = res.data;
|
this.computedTotal = res.data;
|
||||||
|
if (!res.data.used_broker) {
|
||||||
|
this.use_broker = false
|
||||||
|
};
|
||||||
|
if (!res.data.used_coin) {
|
||||||
|
this.use_coin = false
|
||||||
|
}
|
||||||
}).catch(res => {
|
}).catch(res => {
|
||||||
this.computedTotal = res.data;
|
this.computedTotal = res.data;
|
||||||
|
if (!res.data.used_broker) {
|
||||||
|
this.use_broker = false
|
||||||
|
};
|
||||||
|
if (!res.data.used_coin) {
|
||||||
|
this.use_coin = false
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue