fix:肯德基下单参数

This commit is contained in:
whitechiina 2025-04-01 20:31:09 +08:00
parent 5116080d0a
commit 59dac8d2a0
12 changed files with 46 additions and 36 deletions

View File

@ -143,6 +143,7 @@
// isWechat
if (this['globalData']['parameters']?.isWechat) {
store.commit('SetcityInfor', this['globalData']['parameters']['cityInfor']);
store.commit('SetToken', this['globalData']['parameters']['token']);
} else {
// APPH5

View File

@ -12,13 +12,12 @@
<view class="input-number-top-Tips" :style="{color:Brand()['ThemeColor']}">用于接收订单进度请正确填写</view>
</view>
<view class="input-number-region">
<input type="number" maxlength="11" placeholderStyle="fontSize:28rpx" style="height: 100%;"
v-model="FormInfor['phone_number']" placeholder="请输入手机号">
<input type="number" maxlength="11" placeholderStyle="fontSize:28rpx" style="height: 100%;" v-model="FormInfor['phone_number']" placeholder="请输入手机号">
</view>
</view>
<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-item" @tap="FormInfor['eat_type'] = 'EAT_IN'"
@ -63,7 +62,6 @@
</view>
</view>
</view>
</template>
</view>
@ -77,7 +75,7 @@
</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>
<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>
</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>
<text lines="1" class="quantity">余额</text>
@ -191,7 +189,7 @@
</template>
<template v-slot: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 class="btn confirm" @tap="surePay" :style="Brand()['customStyle']['BtnStyle'][0]">
@ -247,7 +245,9 @@
//
deduction_amount_total: 0,
//
products: [],
products: [],
use_coin: 0,
use_broker: 0,
// products>product_id
// products>amount
// products>is_deduction
@ -294,8 +294,6 @@
type:4
}).then(res=>{
this.SETPHONE(res['data'].phone)
console.log('获取手机号', res.data.phone)
this.getCart();
})
},
@ -986,8 +984,8 @@
align-items: center;
.replace {
border: 1rpx solid #00AF66;
color: #00AF66;
border: 1rpx solid #000;
color: #000;
}
.confirm {

View File

@ -42,7 +42,7 @@
</view>
</view>
<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>
</view>
</view>
@ -90,22 +90,22 @@
</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>
<text lines="1" class="quantity">抵用券</text>
<text lines="1" class="amount">( 余额{{ computedTotal.broker_balance }} )</text>
</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 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>
<text lines="1" class="quantity">余额</text>
<text lines="1" class="amount">( 余额{{ computedTotal.coin_balance }} )</text>
</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>
@ -215,8 +215,8 @@
getPhoneAPI({
brand_id: this['BrandInfor']['brand_id'],
type: 4
}).then(res => {
this.SETPHONE(res['data'])
}).then(res => {
this.SETPHONE(res['data'].phone)
this.getCart();
})
},
@ -337,7 +337,7 @@
createFoodOrder(FormInfor).then(res => {
uni.hideLoading();
this.$Payment.H5_Payment({
this.$Payment.H5TOWX_Payment({
pay_price: res['data']['pay_price'],
order_sn: res['data']['order_sn'],
type: res['data']['type'],
@ -351,18 +351,18 @@
* @商品是否优惠
* */
ischoiceDiscount(index) {
let current = this['FormInfor']['products'][index];
// 0
if (this['amount'] == 0 && !current['is_deduction']) {
uni.showToast({
title: '余额不足',
icon: 'none'
});
return
}
let current = this['FormInfor']['products'][index];
// 0
// JIN
// if (this['amount'] == 0 && !current['is_deduction']) {
// uni.showToast({
// title: '',
// icon: 'none'
// });
// return
// }
//
current['is_deduction'] = current['is_deduction'] ? 0 : 1;
},
}
}

View File

@ -173,6 +173,11 @@ class Request {
Requestintercept(config) {
// 请求时需要携带用定位
let cityInfor = state['getters']['GetcityInfor'];
let token = state['getters']['GetcityInfor'];
// 固定写入
config['header']['authori-zation'] = state['getters']['GetToken'];
console.log(cityInfor, '定位信息头')
if (cityInfor?.city) {
// config['header']['city'] = encodeURIComponent(cityInfor['city']);

View File

@ -60,7 +60,8 @@ const store = new Vuex.Store({
cityId: "", // 市ID
regionName: "", // 区名
regionId: "" // 区ID
}
},
token: ''
},
getters: {
// 获取操作端
@ -72,7 +73,9 @@ const store = new Vuex.Store({
// 获取用户选择的城市code
GetCityCode: state => state['AraeCityCode'],
// 获取电影城市数据
GetFilmData: state => state['FilmCityDate']
GetFilmData: state => state['FilmCityDate'],
GetToken: state => state['token']
},
mutations: {
// 用户自主选择位置之后
@ -107,6 +110,9 @@ const store = new Vuex.Store({
*/
GetState(state) {
// uni.setStorageSync('VUEXSTATE', JSON.stringify(store));
},
SetToken(state, data) {
state['token'] = data;
}
},
modules: {

View File

@ -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)'))
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