From b80bfdb7a348c90cd2014d7c1db92efb91ee5514 Mon Sep 17 00:00:00 2001 From: jiazhipeng Date: Mon, 16 Jun 2025 14:59:14 +0800 Subject: [PATCH] 1 --- static/js/CommonFunction.js | 10 +++ store/modules/user.js | 19 +++++- subPackages/order/orderCoupon.vue | 2 +- subPackages/techan/detail.vue | 110 ++++++++++++++++++++++++++++-- subPackages/techan/order.vue | 8 +-- subPackages/ticket/detail.vue | 6 +- subPackages/ticket/order.vue | 32 ++++----- 7 files changed, 157 insertions(+), 30 deletions(-) diff --git a/static/js/CommonFunction.js b/static/js/CommonFunction.js index 854aadd..e702cfa 100644 --- a/static/js/CommonFunction.js +++ b/static/js/CommonFunction.js @@ -225,6 +225,16 @@ Vue.prototype.getHeadImg = id => { }); } +// 获取最大优惠券 params:{money:100,sku_ids:1,2} money单位分 +Vue.prototype.getMaxCoupon = async function (param) { + param.money = (param.money||0) + let res = await this.Post(param, "/api/coupon/use_max_coupon_list") + if (res.code == 1 && res.data.id) { + this.$store.commit("choseCoupon",res.data); + } + return res.data +} + // 根据类型跳转详情 Vue.prototype.gotoDetailByType = item => { let url = '' diff --git a/store/modules/user.js b/store/modules/user.js index ff06ba9..2e2f80b 100644 --- a/store/modules/user.js +++ b/store/modules/user.js @@ -14,6 +14,11 @@ export default { coupon: "",//景点下单选择优惠券 eshoppingCart: [],//自提产品购物车下单数据 sshoppingCart: [],//邮寄产品购物车下单数据 + + ticketOrderList: [], // 门票类下单 + foodOrderList: [], // 农家烟火下单 + techanOrderList: [], // 邮寄自提下单 + meetRoomReserve: { date: null, //使用日期信息 coupon: null, // 优惠券信息 @@ -75,6 +80,18 @@ export default { // 线路下单 changeLineInfo(state, data){ state.lineInfo = data - } + }, + // 特产下单 + changeTechanOrderList(state, data){ + state.techanOrderList = data + }, + // 门票下单 + changeTicketOrderList(state, data){ + state.ticketOrderList = data + }, + // 农家烟火下单 + changeFoodOrderList(state, data){ + state.foodOrderList = data + }, } } diff --git a/subPackages/order/orderCoupon.vue b/subPackages/order/orderCoupon.vue index 60e2a95..5f7e6d2 100644 --- a/subPackages/order/orderCoupon.vue +++ b/subPackages/order/orderCoupon.vue @@ -86,7 +86,7 @@ this.getList(); }, onLoad(options) { - this.allPrice = (options.allprice) /100 + this.allPrice = (options.allprice) this.sku_ids = options.sku_ids this.needDefault = options.needDefault console.log('11111',options); diff --git a/subPackages/techan/detail.vue b/subPackages/techan/detail.vue index b1a9c36..b947878 100644 --- a/subPackages/techan/detail.vue +++ b/subPackages/techan/detail.vue @@ -1,6 +1,15 @@