|
|
@@ -12,7 +12,12 @@
|
|
|
<button type="primary" class=" action-btn no-border add-cart-btn" @click="buy(2)">加入购物车</button>
|
|
|
<button type="primary" class=" action-btn no-border buy-now-btn" @click="buy(1)">立即购买</button>
|
|
|
</view> -->
|
|
|
- <view class="btm-btn">
|
|
|
+ <view class="btm-btn" v-if="option==17&&userInfo.uid">
|
|
|
+ <button type="primary" class="buy-btn" @click="buy(1)" :class="{'quck':!showAdd }"v-if="userInfo.uid && userInfo.level==1" >立即领取</button>
|
|
|
+ <button type="primary" class="add-btn1" v-else >非礼包会员</button>.
|
|
|
+
|
|
|
+ </view>
|
|
|
+ <view class="btm-btn" v-else>
|
|
|
<button type="primary" class="add-btn" @click="buy(2)" v-if="showAdd&&jifen==0">加入购物车</button>
|
|
|
<button type="primary" class="buy-btn" @click="buy(1)" :class="{'quck':!showAdd }">立即购买</button>
|
|
|
</view>
|
|
|
@@ -20,6 +25,13 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import {
|
|
|
+ mapState,
|
|
|
+ mapMutations
|
|
|
+ } from 'vuex';
|
|
|
+ import {
|
|
|
+ getCategoryList
|
|
|
+ } from '@/api/product.js';
|
|
|
import {
|
|
|
collectAdd,
|
|
|
collectDel
|
|
|
@@ -29,6 +41,9 @@
|
|
|
} from '@/api/index.js'
|
|
|
export default {
|
|
|
props: {
|
|
|
+ option:{
|
|
|
+
|
|
|
+ },
|
|
|
jifen: {
|
|
|
|
|
|
},
|
|
|
@@ -50,8 +65,27 @@
|
|
|
data() {
|
|
|
return {};
|
|
|
},
|
|
|
+ computed:{
|
|
|
+ ...mapState('user', ['hasLogin', 'userInfo']),
|
|
|
+ // putvip(){
|
|
|
+ // let obj = this;
|
|
|
+ // getCategoryList({}).then(function(e) {
|
|
|
+ // console.log(e);
|
|
|
+ // e.data.forEach(function(e) {
|
|
|
+ // if (e.id == fid) {
|
|
|
+ // obj.cateList = e.children;
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // console.log(obj.cateList,diasadiji);
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ },
|
|
|
onLoad() {
|
|
|
addJifen()
|
|
|
+
|
|
|
+
|
|
|
+ // putvip()
|
|
|
},
|
|
|
methods: {
|
|
|
buy(type) {
|
|
|
@@ -236,6 +270,17 @@
|
|
|
color: #ff4c4c;
|
|
|
line-height: 90rpx;
|
|
|
}
|
|
|
+ .add-btn1 {
|
|
|
+ width: 100%;
|
|
|
+ height: 90rpx;
|
|
|
+ border: 1px solid #F3F4F6;
|
|
|
+ border-radius: 45rpx;
|
|
|
+ background-color: #DCDFE6;
|
|
|
+ font-size: 36rpx;
|
|
|
+ font-weight: 500;
|
|
|
+ color: black;
|
|
|
+ line-height: 90rpx;
|
|
|
+ }
|
|
|
|
|
|
.buy-btn {
|
|
|
width: 100%;
|