diff --git a/compoents/addressAdd.vue b/compoents/addressAdd.vue index dd80ecb..c8a527a 100644 --- a/compoents/addressAdd.vue +++ b/compoents/addressAdd.vue @@ -304,7 +304,7 @@ }) } - return res + return {...res,data: {id: this.id}} } } } diff --git a/pages.json b/pages.json index afb3b9f..bd2287a 100644 --- a/pages.json +++ b/pages.json @@ -74,6 +74,12 @@ "navigationBarTitleText": "选择自提点" } }, + { + "path": "order/orderCoupon", + "style": { + "navigationBarTitleText": "选择优惠券" + } + }, { "path": "line/lineList", "style": { diff --git a/store/modules/user.js b/store/modules/user.js index 2704c9c..f5810c4 100644 --- a/store/modules/user.js +++ b/store/modules/user.js @@ -6,6 +6,7 @@ export default { }, //保存用户登录信息, toPath: "", //要跳转过去的页面, }, + coupon: "",//下单选择优惠券 // 类似 vue 里的 mothods(同步方法) mutations: { //改变用户信息,自动保存到本地的COOKIE @@ -23,5 +24,9 @@ export default { url: '/pages/login/login' }) }, + // 选择优惠券 + choseCoupon(state, data) { + state.coupon = data + }, } } diff --git a/subPackages/hotelHomestay/hotelHomestay.vue b/subPackages/hotelHomestay/hotelHomestay.vue index 41959d1..e99754f 100644 --- a/subPackages/hotelHomestay/hotelHomestay.vue +++ b/subPackages/hotelHomestay/hotelHomestay.vue @@ -121,7 +121,7 @@ // 收藏按钮 like(item){ this.Post({ - type: 2, + type: 4, id: item.id }, 'https://yjdtadmin.sz-trip.com/api/scenic/collect').then(res => { if (res.code == 200) { diff --git a/subPackages/order/orderCoupon.vue b/subPackages/order/orderCoupon.vue new file mode 100644 index 0000000..242f487 --- /dev/null +++ b/subPackages/order/orderCoupon.vue @@ -0,0 +1,424 @@ + + + + + + + + + + {{item.discounts/100}}元 + + + {{getPecenet(item.percent)}}折 + + + 满{{item.min_limit/100}}元可用 + + + + + {{item.title}} + + + {{item.open_time.slice(0,10)}}-{{item.end_time.slice(0,10)}}可用 + + + + + + + + + + + + + + + 使用规则:{{item.content}} + 使用规则:{{item.content}} + + + + + + + + + + 暂无优惠券 + + + + + 优惠: + ¥ + {{reducePrice}} + + + 优惠: + {{reducePrice}} + + + + 确定 + + + + + + + + diff --git a/subPackages/techan/detail.vue b/subPackages/techan/detail.vue index 17e504b..45f62e3 100644 --- a/subPackages/techan/detail.vue +++ b/subPackages/techan/detail.vue @@ -189,7 +189,7 @@ // 收藏 collect() { this.Post({ - type: 3, + type: 5, id: this.id }, '/api/scenic/collect' diff --git a/subPackages/techan/order.vue b/subPackages/techan/order.vue index 40e991c..5967d60 100644 --- a/subPackages/techan/order.vue +++ b/subPackages/techan/order.vue @@ -2,13 +2,13 @@ - + 邮寄配送 - - 到店自提 + @@ -16,8 +16,9 @@ 收货地址 - + + 更多 + @@ -30,16 +31,17 @@ {{ contacts.province_text + contacts.city_text + contacts.district_text + contacts.detail_addr }} - + + + + 添加 - - - + + @@ -115,11 +117,12 @@ - - 优惠券 - - 请选择 - + + 优惠券 + + 请选择 + + -¥{{coupon.discounts/100}} -{{coupon.percent}}% @@ -156,19 +159,19 @@ 添加收货地址 - + - + {{ item.name }} {{ item.tel }} 默认 - {{ item.address }} + {{ item.province_text + item.city_text + item.district_text + item.detail_addr }} + + + - - - @@ -200,7 +203,6 @@