fix: 调整参数
This commit is contained in:
parent
37aff89f3e
commit
3ec459bacb
|
|
@ -18,8 +18,8 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="commodity-sku-Inofr-commodity-sku-Price">
|
<view class="commodity-sku-Inofr-commodity-sku-Price">
|
||||||
<text class="text1">¥</text>
|
<text class="text1">¥</text>
|
||||||
<text class="text2">{{RetainDecimalPoint(skuinfor['adj_pay'] * skuinfor['num'])}}</text>
|
<!-- <text class="text2">{{RetainDecimalPoint(skuinfor['adj_pay'] * skuinfor['num'])}}</text> -->
|
||||||
<!-- <text class="text2">{{skuinfor['product_price'] * skuinfor['num']}}</text> -->
|
<text class="text2">{{skuinfor['adj_pay'] * skuinfor['num']}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -152,7 +152,8 @@
|
||||||
let newarr = r.filter(item => {
|
let newarr = r.filter(item => {
|
||||||
if (item['checked']) {
|
if (item['checked']) {
|
||||||
if (item?.price) {
|
if (item?.price) {
|
||||||
add_price = item['price'] * 100;
|
// add_price = item['price'] * 100;
|
||||||
|
add_price = item['price']; // jin
|
||||||
// 商品的原价与配料价格相加
|
// 商品的原价与配料价格相加
|
||||||
pay += add_price
|
pay += add_price
|
||||||
};
|
};
|
||||||
|
|
@ -171,6 +172,7 @@
|
||||||
// 设置规格code
|
// 设置规格code
|
||||||
this['skuinfor']['sku_code'] = str.join(',');
|
this['skuinfor']['sku_code'] = str.join(',');
|
||||||
this['skuinfor']['add_price'] = add_price;
|
this['skuinfor']['add_price'] = add_price;
|
||||||
|
console.log(add_price, 'xxxxxxxxxxxxx')
|
||||||
// this['skuinfor']['adj_pay'] = (+this['skuinfor']['pay_price']) + (+add_price);
|
// this['skuinfor']['adj_pay'] = (+this['skuinfor']['pay_price']) + (+add_price);
|
||||||
this['skuinfor']['adj_pay'] = (+this['skuinfor']['product_price']) + (+add_price); //Jin
|
this['skuinfor']['adj_pay'] = (+this['skuinfor']['product_price']) + (+add_price); //Jin
|
||||||
console.log(this['skuinfor'],'星巴克筛选');
|
console.log(this['skuinfor'],'星巴克筛选');
|
||||||
|
|
|
||||||
|
|
@ -172,7 +172,8 @@
|
||||||
import {
|
import {
|
||||||
conWalletInfoAPI,
|
conWalletInfoAPI,
|
||||||
createOrderNewAPI,
|
createOrderNewAPI,
|
||||||
getPhoneAPI
|
getPhoneAPI,
|
||||||
|
createFoodOrder
|
||||||
} from '@/request/restaurant/index.js';
|
} from '@/request/restaurant/index.js';
|
||||||
// 商品组件
|
// 商品组件
|
||||||
import bRxCommodityItem from '@/components/b-rx-commodity-item/b-rx-commodity-item.vue'
|
import bRxCommodityItem from '@/components/b-rx-commodity-item/b-rx-commodity-item.vue'
|
||||||
|
|
|
||||||
|
|
@ -145,7 +145,8 @@
|
||||||
createOrderNewAPI,
|
createOrderNewAPI,
|
||||||
conWalletInfoAPI,
|
conWalletInfoAPI,
|
||||||
getPhoneAPI,
|
getPhoneAPI,
|
||||||
computedOfflineOrder
|
computedOfflineOrder,
|
||||||
|
createFoodOrder
|
||||||
} from '@/request/restaurant/index.js';
|
} from '@/request/restaurant/index.js';
|
||||||
let self;
|
let self;
|
||||||
export default {
|
export default {
|
||||||
|
|
@ -315,7 +316,28 @@
|
||||||
});
|
});
|
||||||
console.log(FormInfor, 'FormInfor');
|
console.log(FormInfor, 'FormInfor');
|
||||||
// return
|
// return
|
||||||
createOrderNewAPI(FormInfor).then(res => {
|
// createOrderNewAPI(FormInfor).then(res => {
|
||||||
|
// uni.hideLoading();
|
||||||
|
// this.$Payment.H5_Payment({
|
||||||
|
// pay_price: res['data']['pay_price'],
|
||||||
|
// order_sn: res['data']['order_sn'],
|
||||||
|
// type: res['data']['type'],
|
||||||
|
// openid: res['data']['openid'],
|
||||||
|
// return_url: `/pages/restaurant/order/order-status/order-status?order_sn=${res['data']['order_sn']}`
|
||||||
|
// });
|
||||||
|
// // 支付
|
||||||
|
// // this.payment({
|
||||||
|
// // order_sn:res['data']['order_sn'],
|
||||||
|
// // type:res['data']['type'],
|
||||||
|
// // // 仅微信环境下存在参数
|
||||||
|
// // money:res['data']['money'],
|
||||||
|
// // redirect_url:`/pages/restaurant/order/order-status/order-status`
|
||||||
|
// // });
|
||||||
|
// })
|
||||||
|
|
||||||
|
FormInfor.phone = FormInfor.phone_number;
|
||||||
|
|
||||||
|
createFoodOrder(FormInfor).then(res => {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
this.$Payment.H5_Payment({
|
this.$Payment.H5_Payment({
|
||||||
pay_price: res['data']['pay_price'],
|
pay_price: res['data']['pay_price'],
|
||||||
|
|
@ -324,16 +346,7 @@
|
||||||
openid: res['data']['openid'],
|
openid: res['data']['openid'],
|
||||||
return_url: `/pages/restaurant/order/order-status/order-status?order_sn=${res['data']['order_sn']}`
|
return_url: `/pages/restaurant/order/order-status/order-status?order_sn=${res['data']['order_sn']}`
|
||||||
});
|
});
|
||||||
// 支付
|
|
||||||
// this.payment({
|
|
||||||
// order_sn:res['data']['order_sn'],
|
|
||||||
// type:res['data']['type'],
|
|
||||||
// // 仅微信环境下存在参数
|
|
||||||
// money:res['data']['money'],
|
|
||||||
// redirect_url:`/pages/restaurant/order/order-status/order-status`
|
|
||||||
// });
|
|
||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -98,3 +98,9 @@ export const getPhoneAPI = parameters => request.Request({ url: "/api/merchant_o
|
||||||
* @计算点餐金额
|
* @计算点餐金额
|
||||||
*/
|
*/
|
||||||
export const computedOfflineOrder = parameters => request.Request({ url: "/api/client/orders/computedOfflineOrder", parameters, method:'POST'});
|
export const computedOfflineOrder = parameters => request.Request({ url: "/api/client/orders/computedOfflineOrder", parameters, method:'POST'});
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @下单
|
||||||
|
*/
|
||||||
|
export const createFoodOrder = parameters => request.Request({ url: "/api/client/orders/createFoodOrder", parameters, method:'POST'});
|
||||||
|
|
|
||||||
|
|
@ -46,9 +46,13 @@ class Payment {
|
||||||
OrderData['WechatRetreat'] = true;
|
OrderData['WechatRetreat'] = true;
|
||||||
// 先跳转至微信支付页面
|
// 先跳转至微信支付页面
|
||||||
try{
|
try{
|
||||||
|
// wx.miniProgram.navigateTo({
|
||||||
|
// url: `/pages/wxpay/h5pay/h5pay?data=${encodeURIComponent(JSON.stringify(OrderData))}`
|
||||||
|
// });
|
||||||
wx.miniProgram.navigateTo({
|
wx.miniProgram.navigateTo({
|
||||||
url: `/pages/wxpay/h5pay/h5pay?data=${encodeURIComponent(JSON.stringify(OrderData))}`
|
url: `/pages/extension/shop/wxPay/wxPay?data=${encodeURIComponent(JSON.stringify(OrderData))}`
|
||||||
});
|
}); // Jin
|
||||||
|
|
||||||
// 延迟两秒后H5内部跳转
|
// 延迟两秒后H5内部跳转
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
|
|
|
||||||
|
|
@ -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.99eb07b9.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.effaffc7.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
|
|
@ -46,9 +46,13 @@ class Payment {
|
||||||
OrderData['WechatRetreat'] = true;
|
OrderData['WechatRetreat'] = true;
|
||||||
// 先跳转至微信支付页面
|
// 先跳转至微信支付页面
|
||||||
try{
|
try{
|
||||||
|
// wx.miniProgram.navigateTo({
|
||||||
|
// url: `/pages/wxpay/h5pay/h5pay?data=${encodeURIComponent(JSON.stringify(OrderData))}`
|
||||||
|
// });
|
||||||
wx.miniProgram.navigateTo({
|
wx.miniProgram.navigateTo({
|
||||||
url: `/pages/wxpay/h5pay/h5pay?data=${encodeURIComponent(JSON.stringify(OrderData))}`
|
url: `/pages/extension/shop/wxPay/wxPay?data=${encodeURIComponent(JSON.stringify(OrderData))}`
|
||||||
});
|
}); // Jin
|
||||||
|
|
||||||
// 延迟两秒后H5内部跳转
|
// 延迟两秒后H5内部跳转
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ import {
|
||||||
import {
|
import {
|
||||||
createOrderNewAPI,
|
createOrderNewAPI,
|
||||||
agOrderPayAPI,
|
agOrderPayAPI,
|
||||||
|
computedOfflineOrder
|
||||||
} from '@/request/restaurant/index.js';
|
} from '@/request/restaurant/index.js';
|
||||||
const restaurantmixins = {
|
const restaurantmixins = {
|
||||||
data() {
|
data() {
|
||||||
|
|
@ -305,6 +306,16 @@ const restaurantmixins = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 计算佣金
|
||||||
|
computedOrder() {
|
||||||
|
// 佣金计算
|
||||||
|
computedOfflineOrder(this.FormInfor).then(res => {
|
||||||
|
this.computedTotal = res.data;
|
||||||
|
}).catch(res => {
|
||||||
|
this.computedTotal = res.data;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
// 重新下单
|
// 重新下单
|
||||||
Reorder(commodity) {
|
Reorder(commodity) {
|
||||||
console.log(commodity, '重新下单商品');
|
console.log(commodity, '重新下单商品');
|
||||||
|
|
|
||||||
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
1
unpackage/dist/build/web/static/js/pages-restaurant-home-shop_home-shop_home.54656875.js
vendored
Normal file
1
unpackage/dist/build/web/static/js/pages-restaurant-home-shop_home-shop_home.54656875.js
vendored
Normal file
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
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
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