|
@@ -1,8 +1,8 @@
|
|
|
<template>
|
|
<template>
|
|
|
<view>
|
|
<view>
|
|
|
- <view class="navbar">
|
|
|
|
|
|
|
+ <!-- <view class="navbar">
|
|
|
<view v-for="(item, index) in navList" :key="index" class="nav-item" :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
|
|
<view v-for="(item, index) in navList" :key="index" class="nav-item" :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
|
|
|
- </view>
|
|
|
|
|
|
|
+ </view> -->
|
|
|
|
|
|
|
|
<!-- 地址 -->
|
|
<!-- 地址 -->
|
|
|
<navigator v-if="tabCurrentIndex == 0" url="/pages/set/address?source=1" class="address-section">
|
|
<navigator v-if="tabCurrentIndex == 0" url="/pages/set/address?source=1" class="address-section">
|
|
@@ -73,19 +73,19 @@
|
|
|
|
|
|
|
|
<!-- 优惠明细 -->
|
|
<!-- 优惠明细 -->
|
|
|
<view class="yt-list">
|
|
<view class="yt-list">
|
|
|
- <view class="yt-list-cell b-b" @click="couponListshow ? toggleMask('show') : ''">
|
|
|
|
|
|
|
+ <!-- <view class="yt-list-cell b-b" @click="couponListshow ? toggleMask('show') : ''">
|
|
|
<view class="cell-icon">券</view>
|
|
<view class="cell-icon">券</view>
|
|
|
<text class="cell-tit clamp">优惠券</text>
|
|
<text class="cell-tit clamp">优惠券</text>
|
|
|
<text class="cell-tip active" v-if="couponListshow && !couponChecked.coupon_price">选择优惠券</text>
|
|
<text class="cell-tip active" v-if="couponListshow && !couponChecked.coupon_price">选择优惠券</text>
|
|
|
<text class="cell-tip red" v-if="couponChecked.coupon_price">-¥{{ couponChecked.coupon_price }}</text>
|
|
<text class="cell-tip red" v-if="couponChecked.coupon_price">-¥{{ couponChecked.coupon_price }}</text>
|
|
|
<text class="cell-tip disabled" v-if="!couponListshow && !couponChecked.coupon_price">没有优惠券</text>
|
|
<text class="cell-tip disabled" v-if="!couponListshow && !couponChecked.coupon_price">没有优惠券</text>
|
|
|
<text class="cell-more wanjia wanjia-gengduo-d"></text>
|
|
<text class="cell-more wanjia wanjia-gengduo-d"></text>
|
|
|
- </view>
|
|
|
|
|
- <view class="yt-list-cell b-b" v-if="moneyAll.storeFreePostage > 0">
|
|
|
|
|
|
|
+ </view> -->
|
|
|
|
|
+ <!-- <view class="yt-list-cell b-b" v-if="moneyAll.storeFreePostage > 0">
|
|
|
<view class="cell-icon hb">减</view>
|
|
<view class="cell-icon hb">减</view>
|
|
|
<text class="cell-tit clamp">商家促销</text>
|
|
<text class="cell-tit clamp">商家促销</text>
|
|
|
<text class="cell-tip disabled">满{{ moneyAll.storeFreePostage }}包邮</text>
|
|
<text class="cell-tip disabled">满{{ moneyAll.storeFreePostage }}包邮</text>
|
|
|
- </view>
|
|
|
|
|
|
|
+ </view> -->
|
|
|
</view>
|
|
</view>
|
|
|
<!-- 金额明细 -->
|
|
<!-- 金额明细 -->
|
|
|
<view class="yt-list">
|
|
<view class="yt-list">
|
|
@@ -93,10 +93,10 @@
|
|
|
<text class="cell-tit clamp">优惠金额</text>
|
|
<text class="cell-tit clamp">优惠金额</text>
|
|
|
<text class="cell-tip red">-¥35</text>
|
|
<text class="cell-tip red">-¥35</text>
|
|
|
</view> -->
|
|
</view> -->
|
|
|
- <view class="yt-list-cell b-b">
|
|
|
|
|
|
|
+ <!-- <view class="yt-list-cell b-b">
|
|
|
<text class="cell-tit clamp">积分抵扣{{ '(当前积分:' + integralAll + ')' }}</text>
|
|
<text class="cell-tit clamp">积分抵扣{{ '(当前积分:' + integralAll + ')' }}</text>
|
|
|
<view class="cell-tip"><radio @click="checkedPoints = !checkedPoints" color=" #5dbc7c" :checked="checkedPoints" /></view>
|
|
<view class="cell-tip"><radio @click="checkedPoints = !checkedPoints" color=" #5dbc7c" :checked="checkedPoints" /></view>
|
|
|
- </view>
|
|
|
|
|
|
|
+ </view> -->
|
|
|
<view class="yt-list-cell b-b">
|
|
<view class="yt-list-cell b-b">
|
|
|
<text class="cell-tit clamp">运费</text>
|
|
<text class="cell-tit clamp">运费</text>
|
|
|
<text class="cell-tip">{{ Postage }}</text>
|
|
<text class="cell-tip">{{ Postage }}</text>
|
|
@@ -111,14 +111,14 @@
|
|
|
<text class="cell-tit clamp">商品金额</text>
|
|
<text class="cell-tit clamp">商品金额</text>
|
|
|
<text class="cell-tip">¥{{ payAllMoney }}</text>
|
|
<text class="cell-tip">¥{{ payAllMoney }}</text>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="yt-list-cell b-b" v-if="checkedPoints && integralShow">
|
|
|
|
|
|
|
+ <!-- <view class="yt-list-cell b-b" v-if="checkedPoints && integralShow">
|
|
|
<text class="cell-tit clamp">积分抵扣</text>
|
|
<text class="cell-tit clamp">积分抵扣</text>
|
|
|
<text class="cell-tip">-¥{{ integralMoney }}</text>
|
|
<text class="cell-tip">-¥{{ integralMoney }}</text>
|
|
|
- </view>
|
|
|
|
|
- <view class="yt-list-cell b-b" v-if="moneyAll.vipPrice > 0">
|
|
|
|
|
|
|
+ </view> -->
|
|
|
|
|
+ <!-- <view class="yt-list-cell b-b" v-if="moneyAll.vipPrice > 0">
|
|
|
<text class="cell-tit clamp">VIP优惠</text>
|
|
<text class="cell-tit clamp">VIP优惠</text>
|
|
|
<text class="cell-tip">-¥{{ moneyAll.vipPrice }}</text>
|
|
<text class="cell-tip">-¥{{ moneyAll.vipPrice }}</text>
|
|
|
- </view>
|
|
|
|
|
|
|
+ </view> -->
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
<!-- 底部 -->
|
|
<!-- 底部 -->
|
|
@@ -157,7 +157,7 @@
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import { confirm,computedOrderkey,couponsOrder } from '@/api/order.js';
|
|
import { confirm,computedOrderkey,couponsOrder } from '@/api/order.js';
|
|
|
-import { userinfo } from '@/api/user.js';
|
|
|
|
|
|
|
+import { getUserInfo } from '@/api/user.js';
|
|
|
import { cartAdd } from '@/api/product.js';
|
|
import { cartAdd } from '@/api/product.js';
|
|
|
export default {
|
|
export default {
|
|
|
data() {
|
|
data() {
|
|
@@ -212,10 +212,15 @@ export default {
|
|
|
integralMoney: 0, //积分抵扣金额
|
|
integralMoney: 0, //积分抵扣金额
|
|
|
integralShow: false, //是否显示积分抵扣金额
|
|
integralShow: false, //是否显示积分抵扣金额
|
|
|
payType: true, //是否可支付
|
|
payType: true, //是否可支付
|
|
|
- pinkid: '' //保存拼团商品id
|
|
|
|
|
|
|
+ pinkid: '' ,//保存拼团商品id
|
|
|
|
|
+ is_gp:0,
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
onLoad(option) {
|
|
onLoad(option) {
|
|
|
|
|
+ // 是否公排商品
|
|
|
|
|
+ if(option.is_gp){
|
|
|
|
|
+ this.is_gp = option.is_gp
|
|
|
|
|
+ }
|
|
|
// 判断是否为拼团商品
|
|
// 判断是否为拼团商品
|
|
|
if (option.type == 'pink') {
|
|
if (option.type == 'pink') {
|
|
|
this.pinkid = option.pinkId;
|
|
this.pinkid = option.pinkId;
|
|
@@ -270,7 +275,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
// 加载用户基础信息
|
|
// 加载用户基础信息
|
|
|
userinfo() {
|
|
userinfo() {
|
|
|
- userinfo({}).then(({ data }) => {
|
|
|
|
|
|
|
+ getUserInfo({}).then(({ data }) => {
|
|
|
this.integralAll = data.integral;
|
|
this.integralAll = data.integral;
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
@@ -337,7 +342,7 @@ export default {
|
|
|
// 计算金额
|
|
// 计算金额
|
|
|
this.payMoneyNub();
|
|
this.payMoneyNub();
|
|
|
// 加载优惠券
|
|
// 加载优惠券
|
|
|
- obj.couponsOrder(data.priceGroup.totalPrice);
|
|
|
|
|
|
|
+ // obj.couponsOrder(data.priceGroup.totalPrice);
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
// 购买数量变化
|
|
// 购买数量变化
|
|
@@ -362,6 +367,9 @@ export default {
|
|
|
if(this.pinkid){
|
|
if(this.pinkid){
|
|
|
url += '&pinkid='+this.pinkid
|
|
url += '&pinkid='+this.pinkid
|
|
|
}
|
|
}
|
|
|
|
|
+ if(this.is_gp==1){
|
|
|
|
|
+ url += '&is_gp=1'
|
|
|
|
|
+ }
|
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
|
url
|
|
url
|
|
|
});
|
|
});
|