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