|
|
@@ -270,25 +270,35 @@
|
|
|
</view>
|
|
|
|
|
|
<view class="bottomBox" v-if="!hideBuyState">
|
|
|
- <view class="icons">
|
|
|
- <view class="icon_item ones">
|
|
|
- <image src="/static/index/share.png" class="share"></image>
|
|
|
- <button type="default" open-type="share" class="bt_share"></button>
|
|
|
- <view class="share_w">分享</view>
|
|
|
+ <template v-if="!isAct">
|
|
|
+ <view class="icons">
|
|
|
+ <view class="icon_item ones">
|
|
|
+ <image src="/static/index/share.png" class="share"></image>
|
|
|
+ <button type="default" open-type="share" class="bt_share"></button>
|
|
|
+ <view class="share_w">分享</view>
|
|
|
+ </view>
|
|
|
+ <view class="icon_item">
|
|
|
+ <image
|
|
|
+ src="/static/index/shopcar.png"
|
|
|
+ class="shopcar"
|
|
|
+ @click="toShopcar()"
|
|
|
+ ></image>
|
|
|
+ <view class="share_w">购物车</view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- <view class="icon_item">
|
|
|
- <image
|
|
|
- src="/static/index/shopcar.png"
|
|
|
- class="shopcar"
|
|
|
- @click="toShopcar()"
|
|
|
- ></image>
|
|
|
- <view class="share_w">购物车</view>
|
|
|
+ <view style="display: flex; color: #ffffff; align-items: center">
|
|
|
+ <view class="btn1" @click="addCart()">加购物车</view>
|
|
|
+ <view class="btn2" @click="buy()">立即购买 </view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <view style="display: flex; color: #ffffff; align-items: center">
|
|
|
- <view class="btn1" @click="addCart()">加购物车</view>
|
|
|
- <view class="btn2" @click="buy()">立即购买 </view>
|
|
|
- </view>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <view
|
|
|
+ class="btn2"
|
|
|
+ style="color: #ffffff; position: absolute; right: 24rpx"
|
|
|
+ @click="drawBuy()"
|
|
|
+ >立即领取
|
|
|
+ </view>
|
|
|
+ </template>
|
|
|
</view>
|
|
|
|
|
|
<!-- 已购买过课程的弹窗 -->
|
|
|
@@ -439,6 +449,7 @@ export default {
|
|
|
checkedAttrs: [],
|
|
|
selectGoodIndex: 0,
|
|
|
specAttrPriceList: [],
|
|
|
+ isAct: undefined, //活动 区分是否隐藏身份证注册
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -494,6 +505,7 @@ export default {
|
|
|
// this.id => goodsId
|
|
|
this.id = option.id;
|
|
|
this.goodsType = option.goodsType || option.gt;
|
|
|
+ this.isAct = option.isAct;
|
|
|
if (option.sac) {
|
|
|
uni.setStorageSync("shareActivityCode", option.sac);
|
|
|
if (this.$method.isLogin()) {
|
|
|
@@ -934,6 +946,26 @@ export default {
|
|
|
}
|
|
|
this.$navTo.togo("/pages2/order/confirm_list?id=" + this.id);
|
|
|
},
|
|
|
+ drawBuy() {
|
|
|
+ if (!this.$method.isLogin()) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: "/pages4/login/login?isBack=" + true + "&isAct=" + this.isAct,
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.$api
|
|
|
+ .drowActGoods({
|
|
|
+ url: location.href,
|
|
|
+ goodsList: [this.detail],
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ this.$u.toast("领取成功");
|
|
|
+ } else {
|
|
|
+ this.$u.toast(res.data.msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
addCart() {
|
|
|
if (this.$method.isGoLogin()) {
|
|
|
return;
|
|
|
@@ -1249,7 +1281,7 @@ export default {
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
-<style >
|
|
|
+<style>
|
|
|
page {
|
|
|
background-color: #f2f2f2;
|
|
|
}
|
|
|
@@ -1528,4 +1560,4 @@ page {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|