fix:肯德基下单参数
This commit is contained in:
parent
5116080d0a
commit
59dac8d2a0
1
App.vue
1
App.vue
|
|
@ -143,6 +143,7 @@
|
||||||
// 全局初始化参数中存在isWechat属性则代表就是从小程序跳入
|
// 全局初始化参数中存在isWechat属性则代表就是从小程序跳入
|
||||||
if (this['globalData']['parameters']?.isWechat) {
|
if (this['globalData']['parameters']?.isWechat) {
|
||||||
store.commit('SetcityInfor', this['globalData']['parameters']['cityInfor']);
|
store.commit('SetcityInfor', this['globalData']['parameters']['cityInfor']);
|
||||||
|
store.commit('SetToken', this['globalData']['parameters']['token']);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// 反之则代表从APP进入H5
|
// 反之则代表从APP进入H5
|
||||||
|
|
|
||||||
|
|
@ -12,13 +12,12 @@
|
||||||
<view class="input-number-top-Tips" :style="{color:Brand()['ThemeColor']}">用于接收订单进度,请正确填写</view>
|
<view class="input-number-top-Tips" :style="{color:Brand()['ThemeColor']}">用于接收订单进度,请正确填写</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="input-number-region">
|
<view class="input-number-region">
|
||||||
<input type="number" maxlength="11" placeholderStyle="fontSize:28rpx" style="height: 100%;"
|
<input type="number" maxlength="11" placeholderStyle="fontSize:28rpx" style="height: 100%;" v-model="FormInfor['phone_number']" placeholder="请输入手机号">
|
||||||
v-model="FormInfor['phone_number']" placeholder="请输入手机号">
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="box_4" v-if="BrandInfor['brand_id'] == 13 || BrandInfor['brand_id'] == 2">
|
<view class="box_4" v-if="BrandInfor['brand_id'] == 13 || BrandInfor['brand_id'] == 2">
|
||||||
<text lines="1" class="text_18">就餐方式瑞幸瑞幸瑞幸瑞幸</text>
|
<text lines="1" class="text_18">就餐方式</text>
|
||||||
<view class="Way">
|
<view class="Way">
|
||||||
<!-- 在店 -->
|
<!-- 在店 -->
|
||||||
<view class="Way-item" @tap="FormInfor['eat_type'] = 'EAT_IN'"
|
<view class="Way-item" @tap="FormInfor['eat_type'] = 'EAT_IN'"
|
||||||
|
|
@ -63,7 +62,6 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
@ -77,7 +75,7 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 新增计算抵扣逻辑 -->
|
<!-- 新增计算抵扣逻辑 -->
|
||||||
<view class="Commodity Commodity-Item" style="margin-bottom: 0rpx; padding-bottom: 0rpx; padding-top: 0rpx" @click="isCoin()">
|
<view class="Commodity Commodity-Item" style="margin-bottom: 0rpx; padding-bottom: 0rpx; padding-top: 0rpx" @click="isBroker()">
|
||||||
<view class="discount" style="width: 100%; display: flex; justify-content: space-between">
|
<view class="discount" style="width: 100%; display: flex; justify-content: space-between">
|
||||||
<view>
|
<view>
|
||||||
<text lines="1" class="quantity">抵用券</text>
|
<text lines="1" class="quantity">抵用券</text>
|
||||||
|
|
@ -86,7 +84,7 @@
|
||||||
<view class="Checkbox" :style="{'--aftercolor':Brand()['ThemeColor']}" :class="{'active-Checkbox': use_coin? true : false}"></view>
|
<view class="Checkbox" :style="{'--aftercolor':Brand()['ThemeColor']}" :class="{'active-Checkbox': use_coin? true : false}"></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="Commodity Commodity-Item" @click="isBroker()">
|
<view class="Commodity Commodity-Item" @click="isCoin()">
|
||||||
<view class="discount" style="width: 100%; display: flex; justify-content: space-between">
|
<view class="discount" style="width: 100%; display: flex; justify-content: space-between">
|
||||||
<view>
|
<view>
|
||||||
<text lines="1" class="quantity">余额</text>
|
<text lines="1" class="quantity">余额</text>
|
||||||
|
|
@ -191,7 +189,7 @@
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:confirmButton>
|
<template v-slot:confirmButton>
|
||||||
<view class="confirmButton">
|
<view class="confirmButton">
|
||||||
<view class="btn replace" @tap="zeroshow = false" :style="{border:`1rpx solid ${Brand()['ThemeColor']}`,color:Brand()['ThemeColor']}">
|
<view class="btn replace" @tap="zeroshow = false" :style="{border:`1rpx solid ${Brand()['ThemeColor']}`}">
|
||||||
取消
|
取消
|
||||||
</view>
|
</view>
|
||||||
<view class="btn confirm" @tap="surePay" :style="Brand()['customStyle']['BtnStyle'][0]">
|
<view class="btn confirm" @tap="surePay" :style="Brand()['customStyle']['BtnStyle'][0]">
|
||||||
|
|
@ -248,6 +246,8 @@
|
||||||
deduction_amount_total: 0,
|
deduction_amount_total: 0,
|
||||||
// 产品集合
|
// 产品集合
|
||||||
products: [],
|
products: [],
|
||||||
|
use_coin: 0,
|
||||||
|
use_broker: 0,
|
||||||
// products>product_id
|
// products>product_id
|
||||||
// products>amount
|
// products>amount
|
||||||
// products>is_deduction
|
// products>is_deduction
|
||||||
|
|
@ -294,8 +294,6 @@
|
||||||
type:4
|
type:4
|
||||||
}).then(res=>{
|
}).then(res=>{
|
||||||
this.SETPHONE(res['data'].phone)
|
this.SETPHONE(res['data'].phone)
|
||||||
console.log('获取手机号', res.data.phone)
|
|
||||||
|
|
||||||
this.getCart();
|
this.getCart();
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
@ -986,8 +984,8 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.replace {
|
.replace {
|
||||||
border: 1rpx solid #00AF66;
|
border: 1rpx solid #000;
|
||||||
color: #00AF66;
|
color: #000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.confirm {
|
.confirm {
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="text-group_2" v-if="index == FormInfor['products']['length']-1">
|
<view class="text-group_2" v-if="index == FormInfor['products']['length']-1">
|
||||||
<text lines="1" class="text_16">余额:¥{{ _amount(amount)}}</text>
|
<!-- <text lines="1" class="text_16">余额:¥{{ _amount(amount)}}</text> -->
|
||||||
<text lines="1" class="text_17">共{{shoptotalnum}}件</text>
|
<text lines="1" class="text_17">共{{shoptotalnum}}件</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -90,22 +90,22 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 新增计算抵扣逻辑 -->
|
<!-- 新增计算抵扣逻辑 -->
|
||||||
<view class="Commodity Commodity-Item" style="margin-bottom: 0rpx; padding-bottom: 0rpx; padding-top: 0rpx" @click="isCoin()">
|
<view class="Commodity Commodity-Item" style="margin-bottom: 0rpx; padding-bottom: 0rpx; padding-top: 0rpx" @click="isBroker()">
|
||||||
<view class="discount" style="width: 100%; display: flex; justify-content: space-between">
|
<view class="discount" style="width: 100%; display: flex; justify-content: space-between">
|
||||||
<view>
|
<view>
|
||||||
<text lines="1" class="quantity">抵用券</text>
|
<text lines="1" class="quantity">抵用券</text>
|
||||||
<text lines="1" class="amount">( 余额:¥{{ computedTotal.broker_balance }} )</text>
|
<text lines="1" class="amount">( 余额:¥{{ computedTotal.broker_balance }} )</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="Checkbox" :style="{'--aftercolor':Brand()['ThemeColor']}" :class="{'active-Checkbox': use_coin? true : false}"></view>
|
<view class="Checkbox" :style="{'--aftercolor':Brand()['ThemeColor']}" :class="{'active-Checkbox': use_broker? true : false}"></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="Commodity Commodity-Item" @click="isBroker()">
|
<view class="Commodity Commodity-Item" @click="isCoin()">
|
||||||
<view class="discount" style="width: 100%; display: flex; justify-content: space-between">
|
<view class="discount" style="width: 100%; display: flex; justify-content: space-between">
|
||||||
<view>
|
<view>
|
||||||
<text lines="1" class="quantity">余额</text>
|
<text lines="1" class="quantity">余额</text>
|
||||||
<text lines="1" class="amount">( 余额:¥{{ computedTotal.coin_balance }} )</text>
|
<text lines="1" class="amount">( 余额:¥{{ computedTotal.coin_balance }} )</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="Checkbox" :style="{'--aftercolor':Brand()['ThemeColor']}" :class="{'active-Checkbox': use_broker? true : false}"></view>
|
<view class="Checkbox" :style="{'--aftercolor':Brand()['ThemeColor']}" :class="{'active-Checkbox': use_coin? true : false}"></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
@ -216,7 +216,7 @@
|
||||||
brand_id: this['BrandInfor']['brand_id'],
|
brand_id: this['BrandInfor']['brand_id'],
|
||||||
type: 4
|
type: 4
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.SETPHONE(res['data'])
|
this.SETPHONE(res['data'].phone)
|
||||||
this.getCart();
|
this.getCart();
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
@ -337,7 +337,7 @@
|
||||||
|
|
||||||
createFoodOrder(FormInfor).then(res => {
|
createFoodOrder(FormInfor).then(res => {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
this.$Payment.H5_Payment({
|
this.$Payment.H5TOWX_Payment({
|
||||||
pay_price: res['data']['pay_price'],
|
pay_price: res['data']['pay_price'],
|
||||||
order_sn: res['data']['order_sn'],
|
order_sn: res['data']['order_sn'],
|
||||||
type: res['data']['type'],
|
type: res['data']['type'],
|
||||||
|
|
@ -353,16 +353,16 @@
|
||||||
ischoiceDiscount(index) {
|
ischoiceDiscount(index) {
|
||||||
let current = this['FormInfor']['products'][index];
|
let current = this['FormInfor']['products'][index];
|
||||||
// 当前余额为0并且用户准备勾选补贴选项则直接打断
|
// 当前余额为0并且用户准备勾选补贴选项则直接打断
|
||||||
if (this['amount'] == 0 && !current['is_deduction']) {
|
// JIN
|
||||||
uni.showToast({
|
// if (this['amount'] == 0 && !current['is_deduction']) {
|
||||||
title: '余额不足',
|
// uni.showToast({
|
||||||
icon: 'none'
|
// title: '余额不足',
|
||||||
});
|
// icon: 'none'
|
||||||
return
|
// });
|
||||||
}
|
// return
|
||||||
|
// }
|
||||||
// 状态取反
|
// 状态取反
|
||||||
current['is_deduction'] = current['is_deduction'] ? 0 : 1;
|
current['is_deduction'] = current['is_deduction'] ? 0 : 1;
|
||||||
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -173,6 +173,11 @@ class Request {
|
||||||
Requestintercept(config) {
|
Requestintercept(config) {
|
||||||
// 请求时需要携带用定位
|
// 请求时需要携带用定位
|
||||||
let cityInfor = state['getters']['GetcityInfor'];
|
let cityInfor = state['getters']['GetcityInfor'];
|
||||||
|
let token = state['getters']['GetcityInfor'];
|
||||||
|
|
||||||
|
// 固定写入
|
||||||
|
config['header']['authori-zation'] = state['getters']['GetToken'];
|
||||||
|
|
||||||
console.log(cityInfor, '定位信息头')
|
console.log(cityInfor, '定位信息头')
|
||||||
if (cityInfor?.city) {
|
if (cityInfor?.city) {
|
||||||
// config['header']['city'] = encodeURIComponent(cityInfor['city']);
|
// config['header']['city'] = encodeURIComponent(cityInfor['city']);
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,8 @@ const store = new Vuex.Store({
|
||||||
cityId: "", // 市ID
|
cityId: "", // 市ID
|
||||||
regionName: "", // 区名
|
regionName: "", // 区名
|
||||||
regionId: "" // 区ID
|
regionId: "" // 区ID
|
||||||
}
|
},
|
||||||
|
token: ''
|
||||||
},
|
},
|
||||||
getters: {
|
getters: {
|
||||||
// 获取操作端
|
// 获取操作端
|
||||||
|
|
@ -72,7 +73,9 @@ const store = new Vuex.Store({
|
||||||
// 获取用户选择的城市code
|
// 获取用户选择的城市code
|
||||||
GetCityCode: state => state['AraeCityCode'],
|
GetCityCode: state => state['AraeCityCode'],
|
||||||
// 获取电影城市数据
|
// 获取电影城市数据
|
||||||
GetFilmData: state => state['FilmCityDate']
|
GetFilmData: state => state['FilmCityDate'],
|
||||||
|
|
||||||
|
GetToken: state => state['token']
|
||||||
},
|
},
|
||||||
mutations: {
|
mutations: {
|
||||||
// 用户自主选择位置之后
|
// 用户自主选择位置之后
|
||||||
|
|
@ -107,6 +110,9 @@ const store = new Vuex.Store({
|
||||||
*/
|
*/
|
||||||
GetState(state) {
|
GetState(state) {
|
||||||
// uni.setStorageSync('VUEXSTATE', JSON.stringify(store));
|
// uni.setStorageSync('VUEXSTATE', JSON.stringify(store));
|
||||||
|
},
|
||||||
|
SetToken(state, data) {
|
||||||
|
state['token'] = data;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
modules: {
|
modules: {
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>消费补贴卡</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
|
<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>消费补贴卡</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
|
||||||
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><script src="https://h5.dhcc.wang/api/apilink-native.min.js?v=20200701"></script><link rel=stylesheet href=/privilege/static/index.2da1efab.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/privilege/static/js/chunk-vendors.2a9d3084.js></script><script src=/privilege/static/js/index.f9aee9e3.js></script></body></html>
|
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><script src="https://h5.dhcc.wang/api/apilink-native.min.js?v=20200701"></script><link rel=stylesheet href=/privilege/static/index.2da1efab.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/privilege/static/js/chunk-vendors.2a9d3084.js></script><script src=/privilege/static/js/index.71fe66c1.js></script></body></html>
|
||||||
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
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue