xiaogang 4 年之前
父節點
當前提交
173a0cb645

+ 1 - 1
components/page-component/goods/bd-info.vue

xqd
@@ -84,7 +84,7 @@
         <view class="bd-margin" v-if="flashSale">
             <bd-flash-sale :flash-sale="flashSale" :theme="theme"></bd-flash-sale>
         </view>
-		<view class="bd-margin main-between box-grow-1" style="font-size: 30upx;" v-if="goods.sign==''" >
+		<view class="bd-margin main-between box-grow-1" style="font-size: 30upx;" v-if="goods.sign=='' || goods.sign=='mch'" >
 		    <view class="box-grow-0 box-grow-0 bd-share" @click="gotoPriceMove">
 		        <image mode="aspectFill" class="nbd-icon" src="https://t12.9026.com/web/statics/icon1/价格走势.png"></image>
 		        <text class="">价格走势</text>

+ 22 - 22
pages/share/index/index.vue

xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd
@@ -3,12 +3,12 @@
         <view v-if="status == 1">
             <!-- 用户信息开始 -->
             <view class="info" :style="{'background-image': 'url('+share_setting.pic_url_home_head + ')'}">
-                <view class="user-info dir-left-nowrap cross-center">
+                <view v-if="userInfo" class="user-info dir-left-nowrap cross-center">
                     <image class="user-avatar box-grow-0" :src="userInfo.avatar"></image>
                     <view class="box-grow-1 dir-top-nowrap main-center">
                         <view class="user-name t-omit">{{name ? name:userInfo.nickname}}</view>
                         <view class="mtb-10 t-omit">{{custom_setting.words.parent_name.name}}:{{userInfo.identity.parent_name}}</view>
-                        <view v-if="index && index.level > 0">分销等级:{{index ? index.level_name : '无'}}</view>
+                        <view v-if="index">分销等级:{{index.level_name ? index.level_name : '无'}}</view>
                     </view>
                     <view class="box-grow-0" v-if="share_setting.is_show_share_level == 1"
                           @click="$jump({url: '/pages/share/level/level', open_type: 'navigate'})">升级条件</view>
@@ -20,7 +20,7 @@
                     <view>
                         <text style="font-family:DIN">{{index.money?index.money:0}}</text>元</view>
                 </view>
-                <view @click="route('/pages/share/cash/cash?money=' + index.money)">
+                <view @click="jump('/pages/share/cash/cash?money=' + index.money)">
                     <view class="withdraw-btn">{{custom_setting.words.cash.name}}</view>
                 </view>
             </view>
@@ -39,7 +39,7 @@
             <view class="list dir-left-wrap">
                 <!-- 分销佣金 -->
                 <view class="list-item">
-                    <view @click="route('/pages/share/money/money')">
+                    <view @click="jump('/pages/share/money/money')">
                         <image :src="custom_setting.menus.money.icon"></image>
                         <view>{{custom_setting.menus.money.name}}</view>
                         <view>
@@ -49,7 +49,7 @@
                 </view>
                 <!-- 分销订单 -->
                 <view class="list-item">
-                    <view @click="route('/pages/share/order/order')">
+                    <view @click="jump('/pages/share/order/order')">
                         <image :src="custom_setting.menus.order.icon"></image>
                         <view>{{custom_setting.menus.order.name}}</view>
                         <view>
@@ -59,7 +59,7 @@
                 </view>
                 <!-- 提现明细 -->
                 <view class="list-item">
-                    <view @click="route('/pages/share/cash-detail/cash-detail')">
+                    <view @click="jump('/pages/share/cash-detail/cash-detail')">
                         <image :src="custom_setting.menus.cash.icon"></image>
                         <view>{{custom_setting.menus.cash.name}}</view>
                         <view>
@@ -69,7 +69,7 @@
                 </view>
                 <!-- 我的团队 -->
                 <view class="list-item">
-                    <view @click="route('/pages/share/team/team')">
+                    <view @click="jump('/pages/share/team/team')">
                         <image :src="custom_setting.menus.team.icon"></image>
                         <view>{{custom_setting.menus.team.name}}</view>
                         <view>
@@ -79,28 +79,28 @@
                 </view>
                 <!-- 推广二维码 -->
                 <view class="list-item">
-                    <view @click="route('/pages/share/qrcode/qrcode')">
+                    <view @click="jump('/pages/share/qrcode/qrcode')">
                         <image :src="custom_setting.menus.qrcode.icon"></image>
                         <view>{{custom_setting.menus.qrcode.name}}</view>
                     </view>
                 </view>
                 <!-- 团队分红 -->
-                <view v-if="setting.is_bonus == 1" class="list-item">
-                    <view @click="route('/plugins/bonus/index/index')">
-                        <image src="/static/image/WechatIMG134.png"></image>
+                <view v-if="setting && setting.is_bonus == 1" class="list-item">
+                    <view @click="jump('/plugins/bonus/index/index')">
+                        <image src="./../image/img-bonus-price.png"></image>
                         <view>{{setting.form.entry_bonus?setting.form.entry_bonus:"团队分红"}}</view>
                     </view>
                 </view>
                 <!-- 股东分红 -->
-                <view v-if="stock.is_stock == 1" class="list-item">
-                    <view @click="route('/plugins/stock/index/index?name=' + share.name + '&mobile=' + share.mobile)">
+                <view v-if="stock && stock.is_stock == 1" class="list-item">
+                    <view @click="jump('/plugins/stock/index/index?name=' + share.name + '&mobile=' + share.mobile)">
                         <image src="/static/image/share/img-stock-price.png"></image>
                         <view>{{stock.form.entry_bonus?stock.form.entry_bonus:"股东分红"}}</view>
                     </view>
                 </view>
                 <!-- 股东分红 -->
-                <view v-if="region.is_region == 1" class="list-item">
-                    <view @click="route('/plugins/region/index/index?name=' + share.name + '&mobile=' + share.mobile)">
+                <view v-if="region && region.is_region == 1" class="list-item">
+                    <view @click="jump('/plugins/region/index/index?name=' + share.name + '&mobile=' + share.mobile)">
                         <image src="/static/image/share/img-region-price.png"></image>
                         <view>{{region.form.entry_bonus?region.form.entry_bonus:"区域代理"}}</view>
                     </view>
@@ -111,7 +111,7 @@
         <view class="no-pass" v-else-if="status == 2">
             <image class="no-pass-img" src="./../image/icon-share-tip.png"></image>
             <view>您还不是{{custom_setting.words.share_name.name ? custom_setting.words.share_name.name : custom_setting.words.share_name.default}},请先提交申请!</view>
-            <view v-if="share_setting.share_condition != '3'" @click="route('/pages/share/add/add?template_message=' + JSON.stringify(template_message))">
+            <view v-if="share_setting.share_condition != '3'" @click="jump('/pages/share/add/add?template_message=' + JSON.stringify(template_message))">
                 <button :class="['no-pass-btn']">立即前往</button>
             </view>
             <view v-if="share_setting.share_condition == '3'" @click="toApply">
@@ -124,7 +124,7 @@
                 <image src="./../image/img-share-info.png"></image>
                 <view>谢谢您的支持,请等待审核</view>
             </view>
-            <view @click="route('/pages/index/index')">
+            <view @click="jump('/pages/index/index')">
                 <view class="submit" style="margin:0">
                     <button >去商城逛逛</button>
                 </view>
@@ -164,7 +164,7 @@
                     </view>
                 </view>
             </template>
-            <template v-if="share_setting.become_condition == 4">
+            <template v-else-if="share_setting.become_condition == 4">
                 <view class="apply-status-3">
                     <view class="dir-left-nowrap">
                         <image class="money" src="./../image/money.png"></image>
@@ -275,7 +275,7 @@
         <view class="dir-top-nowrap cross-center disabled" v-else-if="status == 6">
             <image src="./../image/disabled.png" class="disabled-img"></image>
             <view class="disabled-text">当前功能未开放</view>
-            <view class="disabled-btn" @click="route('/pages/index/index')">去商城逛逛</view>
+            <view class="disabled-btn" @click="jump('/pages/index/index')">去商城逛逛</view>
         </view>
         <view class="bg" v-if="apply">
             <view class="dialog">
@@ -352,7 +352,7 @@
             toApply() {
                 this.apply = !this.apply;
             },
-            route(url) {
+            jump(url) {
                 uni.navigateTo({
                     url: url
                 })
@@ -472,7 +472,7 @@
                     if (this.share_setting.share_condition == '1' || this.share_setting.share_condition == 3) {
                         this.apply = true;
                     } else {
-                        this.route('/pages/share/add/add?template_message=' + JSON.stringify(this.template_message));
+                        this.jump('/pages/share/add/add?template_message=' + JSON.stringify(this.template_message));
                     }
                 } else {
                     this.status = 3;
@@ -485,7 +485,7 @@
                 });
             }
         },
-        onLoad() {
+        onLoad() { this.$commonLoad.onload();
             if (this.$user.isLogin()) {
                 this.$store.dispatch('user/refreshInfo');
             }

+ 30 - 7
plugins/composition/detail/detail.vue

xqd xqd xqd xqd
@@ -85,6 +85,7 @@
                 });
             },
 			isCanbuy(goods){
+				console.log(goods)
 				if (this.$user.isLogin() && this.$store.state.user.info) {
 				    let  member_level =this.$store.state.user.info.identity.member_level;
 					if(member_level<goods.member_level){
@@ -109,7 +110,7 @@
 						})
 						return true;
 					}
-					
+					//return true;
 				}
 			},
             toBuy() {
@@ -121,13 +122,35 @@
                         composition_list: []
                     }
                 ]
+				
+				let isCanbuy = true;
+				
+			
+				for(let i in that.list) {					
+					if(!that.isCanbuy(that.list[i].host_list[0])){
+						isCanbuy = false;
+					}
+					
+					for(let j in that.list[i].goods_list){					
+						if(!that.isCanbuy(that.list[i].goods_list[j])){
+							isCanbuy = false;
+						}
+					}
+				}
+				
+				if(!isCanbuy){
+					return;
+				}
+				
+				
                 if(that.noAttrList.length > 0) {
                     that.showNoAttr = true;
-					for(let i in that.noAttrList) {
-					if(!that.isCanbuy(that.noAttrList[i]))
-						return;
-					}
-                }else {
+					// for(let i in that.noAttrList) {
+					// if(!that.isCanbuy(that.noAttrList[i]))
+					// 	return;
+					// }
+                }
+				//else {
                     for(let i in that.list) {
                         attr = [];
                         if(that.list[i].choose) {
@@ -244,7 +267,7 @@
                             });
                         }
                     }
-                }
+                //}
             },
             close () {
                 this.showNoAttr = false;

+ 1 - 1
plugins/exchange/goods/goods.vue

xqd
@@ -57,7 +57,7 @@
                 :theme="themeObject"
             ></bd-hc>
             <bd-comments :goods-id="goods.id"></bd-comments>
-            <bd-detail :detail="goods.detail"></bd-detail>
+            <bd-detail :detail="goods.detail" :showTab="false"></bd-detail>
             <!-- 底部空格 -->
             <view class="safe-area-inset-bottom">
                 <view :class="full_reduce ? 'u-bottom-height-1' : 'u-bottom-height-0'"></view>

+ 25 - 1
plugins/lottery/goods/goods.vue

xqd
@@ -319,9 +319,33 @@ export default {
                     func(info)
                 }, 1000)
             },
-            subscribe: function () {
+            subscribe: function () {		
                 if (this.award_bg) return;
                 const self = this;
+				
+				if (this.$user.isLogin() && this.$store.state.user.info) {
+					let member_level = this.$store.state.user.info.identity.member_level;
+					if (member_level < this.lottery.goods.member_level) {
+						uni.showModal({
+							title: "提示",
+							content: "需达到" + this.lottery.goods.member_name + "会员才可购买",
+							showCancel: true,
+							confirmText: '升级',
+							success: (res) => {
+								if (res.confirm) {
+									uni.navigateTo({
+										url: '/pages/member/upgrade/upgrade?level=' + member_level + '&other=' + this.goods.member_level
+									})
+								} else if (res.cancel) {
+									console.log('用户点击取消');
+									console.log(this.goods)
+								}
+							}
+						})
+						return;
+					}
+				}
+				
                 self.$subscribe(this.template_message).then(res => {
                     self.buyZero();
                 }).catch(res => {

+ 9 - 5
plugins/lottery/index/index.vue

xqd
@@ -174,11 +174,15 @@
                 });
             },
             detail(id) {
-                this.$subscribe(this.template_message).then(res => {
-                    uni.navigateTo({url: `/plugins/lottery/detail/detail?lottery_id=` + id});
-                }).catch(res => {
-                    uni.navigateTo({url: `/plugins/lottery/detail/detail?lottery_id=` + id});
-                });
+				uni.navigateTo({
+				    url: `/plugins/lottery/goods/goods?lottery_id=`+id
+				});
+				
+                // this.$subscribe(this.template_message).then(res => {
+                //     uni.navigateTo({url: `/plugins/lottery/detail/detail?lottery_id=` + id});
+                // }).catch(res => {
+                //     uni.navigateTo({url: `/plugins/lottery/detail/detail?lottery_id=` + id});
+                // });
             },
             setTimeStart(info) {
                 const self = this;

+ 4 - 0
plugins/mch/goods/goods.vue

xqd
@@ -33,7 +33,11 @@
                 :poster-generate="poster_generate + `&goods_id=` + goods.id + `&mch_id=` + goods.mch_id"
                 :has-poster-nav="true"
                 :share-url="poster + `&goods_id=` + goods.id + `&mch_id=` + goods.mch_id"
+				:signid="selectAttr?selectAttr.sign_id :''"
+				:attrid="selectAttr?selectAttr.id :''" 
+				:checkprice="selectAttr?selectAttr.price :''"
                 v-bind:goods="goods"
+				 @gotoOpenPic="openPic"
             ></bd-info>
             <template v-if="mch_store">
                 <view class="shop-info dir-left-nowrap cross-center" :clas="mch_store.distance ? 'shop-info-2' : 'shop-info-1'">