|
@@ -101,7 +101,7 @@
|
|
|
<navigator url="/pages/car/index" open-type="switchTab" class="to_car">
|
|
|
<image src="https://kailin-mp.oss-cn-shenzhen.aliyuncs.com/static/icon/car.png" class="car_icon"></image>
|
|
|
</navigator>
|
|
|
- <button class="show_order" v-if="!productInfo.hide_orderbtn" data-eventsync="true" @click="showSpecPopup(1)">立即购买</button>
|
|
|
+ <button class="show_order" v-if="!productInfo.hide_orderbtn" data-eventsync="true" @click="showSpecPopup(1)">{{is_pay?'立即购买':'立即预约'}}</button>
|
|
|
<button :class="productInfo.hide_orderbtn?'show_car hide_orderbtn ':'show_car'" data-eventsync="true" @click="showSpecPopup(2)">加入购物车</button>
|
|
|
</view>
|
|
|
<view class="to_bottom"> --- 到底了 --- </view>
|
|
@@ -170,10 +170,10 @@
|
|
|
</view>
|
|
|
<view class="order_price" v-if="specBtnType == 1 || specBtnType == 3">合计: ¥{{ priceTotal }}</view>
|
|
|
<view class="order_btn">
|
|
|
- <button class="to_order" @click="createOrder()" v-if="specBtnType == 1" data-eventsync="true">购买</button>
|
|
|
+ <button class="to_order" @click="createOrder()" v-if="specBtnType == 1" data-eventsync="true">{{is_pay?'购买':'预约'}}</button>
|
|
|
<button class="to_car" @click="createCart()" v-if="specBtnType == 2" data-eventsync="true">加入购物车</button>
|
|
|
- <button class="to_order" @click="createOrder()" v-if="specBtnType == 3" data-eventsync="true">拼团购买</button>
|
|
|
- <button class="to_order" @click="createOrder()" v-if="specBtnType == 4" data-eventsync="true">{{ productInfo.regiment_title }}购买</button>
|
|
|
+ <button class="to_order" @click="createOrder()" v-if="specBtnType == 3" data-eventsync="true">{{is_pay?'拼团购买':'拼团预约'}}</button>
|
|
|
+ <button class="to_order" @click="createOrder()" v-if="specBtnType == 4" data-eventsync="true">{{ productInfo.regiment_title }}{{is_pay?'购买':'预约'}}</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
</uni-popup>
|
|
@@ -332,8 +332,6 @@ export default {
|
|
|
priceTotal: "0.00",
|
|
|
// 优惠券列表
|
|
|
couponList: [],
|
|
|
- // 总价
|
|
|
- priceTotal: "0.00",
|
|
|
// 优惠券使用
|
|
|
couponUsed: "去使用 >",
|
|
|
// 扣减金额
|
|
@@ -367,7 +365,7 @@ export default {
|
|
|
sku_id: 0,
|
|
|
sku_thumb: "",
|
|
|
regiment_id: 0,
|
|
|
- specBtnType: 0,
|
|
|
+ is_pay: 0,
|
|
|
};
|
|
|
},
|
|
|
onLoad(param) {
|
|
@@ -441,6 +439,7 @@ export default {
|
|
|
}
|
|
|
//设置默认sku
|
|
|
this.sku_id = 0;
|
|
|
+ this.is_pay = this.productInfo.is_pay;
|
|
|
// 显示图片
|
|
|
this.sku_thumb = this.productInfo.thumb;
|
|
|
// 如果只有一个SKU,默认选择一个
|
|
@@ -689,6 +688,7 @@ export default {
|
|
|
btn_type: this.specBtnType,
|
|
|
regiment_id: this.regiment_id,
|
|
|
regiment_active_id: this.productInfo.regiment_active_id,
|
|
|
+ is_pay: this.is_pay,
|
|
|
},
|
|
|
"post"
|
|
|
)
|
|
@@ -699,12 +699,19 @@ export default {
|
|
|
this.productInfo.stock = this.productInfo.stock - this.quantity;
|
|
|
// 关闭弹窗
|
|
|
this.$refs.specPopup.close();
|
|
|
- //订单详情
|
|
|
- let orderInfo = re.data;
|
|
|
- orderInfo = JSON.stringify(orderInfo)
|
|
|
- let params = encodeURIComponent(orderInfo);
|
|
|
- // 跳转到确认支付页面
|
|
|
- uni.navigateTo({url:`/pages/orders/confirm?params=${params}`});
|
|
|
+ if (this.is_pay){
|
|
|
+ //订单详情
|
|
|
+ let orderInfo = re.data;
|
|
|
+ orderInfo = JSON.stringify(orderInfo)
|
|
|
+ let params = encodeURIComponent(orderInfo);
|
|
|
+ // 跳转到确认支付页面
|
|
|
+ uni.navigateTo({url:`/pages/orders/confirm?params=${params}`});
|
|
|
+ }else {
|
|
|
+ // 跳转到报单完成页面
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pages/orders/completion?params=${encodedArray}`,
|
|
|
+ });
|
|
|
+ }
|
|
|
} else {
|
|
|
uni.showModal({
|
|
|
title: re.msg,
|
|
@@ -721,6 +728,7 @@ export default {
|
|
|
product_list: productList,
|
|
|
custom_coupon_id: this.customCoupon,
|
|
|
addr_id: this.checkedAddr.id,
|
|
|
+ is_pay: this.is_pay,
|
|
|
},
|
|
|
"post"
|
|
|
)
|
|
@@ -731,12 +739,19 @@ export default {
|
|
|
this.productInfo.stock = this.productInfo.stock - this.quantity;
|
|
|
// 关闭弹窗
|
|
|
this.$refs.specPopup.close();
|
|
|
- //订单详情
|
|
|
- let orderInfo = re.data;
|
|
|
- orderInfo = JSON.stringify(orderInfo)
|
|
|
- let params = encodeURIComponent(orderInfo);
|
|
|
- // 跳转到确认支付页面
|
|
|
- uni.navigateTo({url:`/pages/orders/confirm?params=${params}`});
|
|
|
+ if (this.is_pay){
|
|
|
+ //订单详情
|
|
|
+ let orderInfo = re.data;
|
|
|
+ orderInfo = JSON.stringify(orderInfo)
|
|
|
+ let params = encodeURIComponent(orderInfo);
|
|
|
+ // 跳转到确认支付页面
|
|
|
+ uni.navigateTo({url:`/pages/orders/confirm?params=${params}`});
|
|
|
+ }else {
|
|
|
+ // 跳转到报单完成页面
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pages/orders/completion?params=${encodedArray}`,
|
|
|
+ });
|
|
|
+ }
|
|
|
} else {
|
|
|
uni.showModal({
|
|
|
title: re.msg,
|