Browse Source

套餐bug修改

huangzhe 3 years ago
parent
commit
c6598de46a

+ 10 - 9
src/pages/case/projectInfo.vue

xqd xqd xqd xqd xqd xqd xqd
@@ -1,7 +1,7 @@
 <template>
 	<app-layout>
-		<view v-if="!compositionList" class="u-goods-detail"></view>
-		<template v-if="compositionList">
+		<view v-if="!Object.keys(compositionList).length" class="u-goods-detail"></view>
+		<template v-else>
 			<app-nav-bar v-if="true" :fixed="true" :background-color="''" :xStyle="1" :hasMallSetting="2"
 				:hasHeight="false"></app-nav-bar>
 
@@ -224,10 +224,11 @@
 		},
 		data() {
 			return {
+				id:'',//套餐id
 				isCouponShow: false,
 				list: [],
 				isOpen: false, //hxj套装内商品是否展开
-				compositionList:[], //套餐详情
+				compositionList:{}, //套餐详情
 
 				showClose: false,
 				is_open: 0,
@@ -410,9 +411,9 @@
 			if (this.isLogin) {
 				this.$store.dispatch('user/info');
 			}
-			this.compositionList.id = options.id;
+			this.id = options.id;
 			// #ifndef MP-ALIPAY
-			this.loadData(this.compositionList.id, options);
+			this.loadData(this.id, options);
 			// #endif
 			this.sendPath = '/pages/goods/goods?id=' + options.id;
 			console.log(this.sendPath);
@@ -427,7 +428,7 @@
 			setTimeout(() => {
 				this.showClose = true;
 				// #ifdef MP-ALIPAY
-				this.loadData(this.compositionList.id, this.exchange);
+				this.loadData(this.id, this.exchange);
 				// #endif
 			});
 		},
@@ -441,7 +442,7 @@
 				title: this.compositionList.name,
 				imageUrl: this.goods.pic_url[0].pic_url,
 				query: {
-					id: this.compositionList.id
+					id: this.id
 				}
 			});
 		},
@@ -694,7 +695,7 @@
 				this.$request({
 					url: this.$api.composition.collect,
 					data: {
-						composition_id: this.compositionList.id
+						composition_id: this.id
 					},
 					method:'post'
 				}).then(response => {
@@ -729,7 +730,7 @@
 				// 	return;
 				// }
 				uni.navigateTo({
-					url: `/plugins/composition/detail/detail?composition_id=${this.compositionList.id}`
+					url: `/plugins/composition/detail/detail?composition_id=${this.id}`
 				});
 				// this.attrShow = true;
 			},

+ 45 - 6
src/pages/favorite/favorite.vue

xqd xqd xqd
@@ -232,8 +232,45 @@
 			</view>
 
 
-			<view class="f-topic" v-if="getCurrent === 1" :class="getCurrent === 1 ? 'f-good-show' : 'f-good-hidden'">
-			        <app-special-topic-list :cat-show="false" :topic-list="topicList"></app-special-topic-list>
+			<view class="f-good" style="margin-top: 115rpx;" v-if="getCurrent === 1" :class="getCurrent === 1 ? 'f-good-show' : 'f-good-hidden'">
+			        <!-- <app-special-topic-list :cat-show="false" :topic-list="topicList"></app-special-topic-list> -->
+					<view class="dir-left-nowrap" v-for="(item,index) in topicList" :key="index">
+						<good-action style="width: 750rpx" :index="index" :theme="getTheme" @del="del" @open="openAction" @share="share" :disabled="touch" :show="item.show">
+							<view class="f-item u-border-bottom dir-left-nowrap" @click="routeUrl({page_url:`/pages/case/projectInfo?id=${item.id}`})">
+								<image class="f-img" :src="item.cover_img" />
+								<!-- 此层wrap在此为必写的,否则可能会出现标题定位错误 -->
+								<view class="f-content dir-top-wrap main-between">
+									<text class="t-omit-two f-title">{{ item.name }}</text>
+									<view>
+										<!-- <view class="f-invalid dir-left-nowrap cross-center main-between" v-if="item.status_type === 3">
+											<image src="https://shop.9026.com/web/statics/image/mall/static/icon/invalid.png"></image>
+											<text>失效</text>
+										</view>
+										<view class="f-low-stock dir-left-nowrap cross-center main-between" v-if="item.status_type === 2">
+											<image src="https://shop.9026.com/web/statics/image/mall/static/icon/low_stock.png"></image>
+											<text>低库存</text>
+										</view>
+										<view class="f-low-price dir-left-nowrap" v-if="item.status_type === 1">
+											<view class="dir-left-nowrap main-between cross-center">
+												<image src="https://shop.9026.com/web/statics/image/mall/static/icon/low_price.png"></image>
+												比收藏时降价{{ item.low_price }}元
+											</view>
+										</view> -->
+										<view class="dir-left-nowrap main-between" v-if="item.status_type !== 3">
+											<template v-if="item.is_negotiable == 1">
+												<view :style="{ color: getTheme.color, 'margin-bottom': '8rpx' }">价格面议</view>
+											</template>
+											<view v-else class="dir-top-wrap main-between">
+												<text class="f-price" :style="{ color: getTheme.color }">¥{{ item.price }}</text>
+												<text class="f-scale">已售{{ item.sale_num }}</text>
+											</view>
+										</view>
+									</view>
+								</view>
+							</view>
+						</good-action>
+					</view>
+					
 			</view>
 		</view>
 	</app-layout>
@@ -428,11 +465,14 @@ export default {
 			}
 		},
 
-		async getTopicList(bool) {
+		async getTopicList(bool) { //老版专题
 			const e = await this.$request({
-				url: this.$api.user.my_favorite_topic,
-				method: 'get',
+				// url: this.$api.user.my_favorite_topic,
+				// method: 'get',
+				url: this.$api.composition.list,
+				method: 'post',
 				data: {
+					is_my_collect:1,
 					page: this.topic_page
 				}
 			});
@@ -445,7 +485,6 @@ export default {
 			} else {
 				this.topicList.push(...list);
 			}
-			console.log('list', list);
 		},
 		del(index) {
 			if (this.getCurrent === 0) {

+ 2 - 2
src/pages/index/binding/binding.vue

xqd xqd
@@ -1,5 +1,5 @@
 <template>
-	<view>
+	<app-layout>
 		<view class="properties_list">
 			<view class="item main-left" v-for="(item,index) in dataList" :key="index" @click="selectMasterEstate(index,item.id)">
 				<view class="left">
@@ -66,7 +66,7 @@
 		</view>
 		<button type="default" @click="addmyEstate" :class="{'add':true, 'allow-add':true, 'not-add':false}"
 			:disabled="fasle">添加楼盘</button>
-	</view>
+	</app-layout>
 </template>
 
 <script>

+ 22 - 22
src/pages/index/hxj_index_component.vue

xqd xqd xqd
@@ -41,12 +41,12 @@
 					</view>
 				</view>
 			</view>
-			<view class="more">
+			<!-- <view class="more">
 				<view>VIEW MORE</view>
 				<view>
 					<image src="https://t17.9026.com/web/statics/image/index/viewmore.png" mode=""></image>
 				</view>
-			</view>
+			</view> -->
 		</view>
 		<view class="link ">
 			<view class="title1 main-left cross-center">优惠券<image class="coupon_1"
@@ -156,7 +156,7 @@
 			<view class="title1" style="margin-right: 61rpx;color: #A7A7A7;">精选类别</view>
 			<view class="title1" style="margin-right: 61rpx;color: #A7A7A7;">精选类别</view>
 			<view class="title1" style="margin-right: 61rpx;color: #A7A7A7;">精选类别</view> -->
-			<view class="title1" style="margin-right: 61rpx;" :style="{'color':bottom_goods_index===index?'':'#A7A7A7'}" v-for="(item,index) in homePages[11].data.catList" @click="selectCat(index)">{{item.menuName}}</view>
+			<view class="title1" style="margin-right: 61rpx;" :style="{'color':bottom_goods_index===index?'':'#A7A7A7'}" v-for="(item,index) in homePages[11].data.catList" :key="index" @click="selectCat(index)">{{item.menuName}}</view>
 			<image class="tyx" src="https://t17.9026.com/web/statics/image/index/tyx.png" mode=""></image>
 		</view>
 		<view class="hxzy">
@@ -246,25 +246,25 @@
 						tag: '套装'
 					}
 				],
-				jdlg: [{
-						title: '兴城人居ins风套装',
-						sub_title: '细节控·轻奢风',
-						price: '65622',
-						cover_image: '3',
-					},
-					{
-						title: '风创造「最大坪效」85m²MUJI',
-						sub_title: '细节控·轻奢风',
-						price: '7486',
-						cover_image: 'temporary/jhk-1634283447190'
-					},
-					{
-						title: '85m²MUJI风创造「最大坪效」',
-						sub_title: '细节控·轻奢风',
-						price: '27853',
-						cover_image: 'temporary/jhk-1634284367308'
-					}
-				],
+				// jdlg: [{
+				// 		title: '兴城人居ins风套装',
+				// 		sub_title: '细节控·轻奢风',
+				// 		price: '65622',
+				// 		cover_image: '3',
+				// 	},
+				// 	{
+				// 		title: '风创造「最大坪效」85m²MUJI',
+				// 		sub_title: '细节控·轻奢风',
+				// 		price: '7486',
+				// 		cover_image: 'temporary/jhk-1634283447190'
+				// 	},
+				// 	{
+				// 		title: '85m²MUJI风创造「最大坪效」',
+				// 		sub_title: '细节控·轻奢风',
+				// 		price: '27853',
+				// 		cover_image: 'temporary/jhk-1634284367308'
+				// 	}
+				// ],
 				qwe: [
 					{
 						'title': '兴城人居',

+ 1 - 0
src/pages/index/index.vue

xqd
@@ -108,6 +108,7 @@
 		},
 		onLoad(options) {
 			this.$commonLoad.onload(options);
+			this.$store.dispatch('user/isEnterSales',false);
 			// #ifdef H5
 			this.$jwx.config();
 			// #endif

+ 4 - 5
src/pages/order-submit/order-submit.vue

xqd xqd xqd xqd
@@ -22,7 +22,7 @@
 					</view> -->
 					<view :key="mchIndex" class="group">
 						<!-- 循环商户列表start -->
-						<view style="padding: 26rpx 32rpx;">
+						<view style="padding: 26rpx 32rpx;" v-if="false">
 							<view class="dir-left-nowrap cross-center" style="padding: 10rpx 0;line-height: 1.2;">
 								<!-- 商户名start -->
 								<view class="box-grow-0">
@@ -108,7 +108,7 @@
 							</template>
 							<!-- 自提门店信息end -->
 						</view>
-						<view class="line"></view>
+						<!-- <view class="line"></view> -->
 						<!-- 选择配送方式start -->
 						<!-- <view v-if="mch.show_delivery !== false" style="padding: 18rpx 32rpx;">
 							<view class="dir-left-nowrap cross-center" style="padding: 18rpx 0;">
@@ -150,7 +150,7 @@
 								</view>
 							</view>
 						</template><!-- 同城配送信息end -->
-						<view class="line"></view>
+						<!-- <view class="line"></view> -->
 						<view v-if="!mch.pick_up_enable"
 							style="height: 80rpx;line-height: 80rpx; background: #fff4f3;padding: 0 24rpx;">
 							<view>以下商品满{{mch.pick_up_price}}元起送</view>
@@ -160,8 +160,7 @@
 						<view class="line"></view>
 						<template v-if="(mch.coupon && mch.coupon.enabled) ||
                                 (mch.member_discount > 0 || mch.member_discount < 0) ||
-                                (mch.integral && mch.integral.can_use) ||
-                                mch.temp_vip_discount ||
+                                (mch.integral && mch.integral.can_use) || mch.temp_vip_discount ||
                                 (mch.insert_rows && mch.insert_rows.length) ||
                                 (mch.full_reduce_discount > 0 || mch.full_reduce_discount < 0)">
 							<view style="padding: 20rpx 32rpx;">

+ 17 - 13
src/pages/sale/cusmter/addCustomer.vue

xqd xqd xqd xqd
@@ -78,18 +78,7 @@
 					avatar: '',
 					mobile: '',
 					name: '',
-					estates: [
-					// 	{
-					// 	estate_id: '',
-					// 	estate_no: '',
-					// 	room_no: '',
-						
-					// 	regionId:{},
-					// 	region:'',
-					// 	multiIndex:[],
-					// 	estate_name: '',
-					// },
-					]
+					estates: []
 				}
 			};
 		},
@@ -132,6 +121,16 @@
 				uni.setNavigationBarTitle({
 				    title: '添加客户'
 				});
+				this.form.estates.push({
+						estate_id: '',
+						estate_no: '',
+						room_no: '',
+						
+						regionId:{},
+						region:'',
+						multiIndex:[],
+						estate_name: '',
+					})
 			}
 			
 			// wx.enableAlertBeforeUnload({
@@ -251,11 +250,11 @@
 					}
 				}
 				let data={
-					sale_customer_id:this.form.sale_customer_id,
 					avatar:this.form.avatar,
 					mobile:this.form.mobile,
 					name:this.form.name,
 				}
+				this.form.sale_customer_id?data.sale_customer_id=this.form.sale_customer_id:''
 				for(let i in this.form.estates){
 					for (let j in this.form.estates[i]) {
 						if(j==='estate_id' || j==='estate_no' || j==='room_no'){
@@ -274,6 +273,11 @@
 						uni.showToast({
 							title:this.form.sale_customer_id?'编辑成功':'添加成功',
 						})
+					}else{
+						uni.showToast({
+							title:res.msg,
+							icon:'none'
+						})
 					}
 				}).catch(rej=>{
 					uni.showToast({

+ 21 - 3
src/pages/sale/properties/addProperties.vue

xqd xqd xqd xqd
@@ -18,6 +18,7 @@
 				<image class="bg" src="https://t17.9026.com/web/statics/image/sale/properties_gradual.png" mode="">
 				</image>
 			</view>
+			<view class="no-more" v-if="noMore">没有更多了...</view>
 			<app-no-goods v-if="dataList.length === 0" :title="'暂无数据'" background="#f7f7f7"></app-no-goods>
 		</view>
 		<u-popup v-model="show" mode="center" border-radius="14" @close="show = false">
@@ -58,6 +59,7 @@
 				name:'',
 				
 				dataList:[],
+				noMore:false,
 				selectIndex:-1,
 				regionId:{},
 			};
@@ -120,14 +122,23 @@
 					method: 'post'
 				}).then(res=>{
 					if(res.code===0){
-						this.dataList=res.data.list
+						if(this.page===1){
+							this.dataList=res.data.list
+						}else{
+							this.dataList=this.dataList.concat(res.data.list)
+						}
+						if(res.data.list.length<20){
+							this.noMore=true
+						}
 					}
 				})
 			}
 		},
 		onReachBottom() {
-			this.page++
-			this.getData(this.page)
+			if(!noMore){
+				this.page++
+				this.getData(this.page)
+			}
 		}
 	}
 </script>
@@ -271,4 +282,11 @@
 			color: #FFFFFF;
 		}
 	}
+	.no-more {
+		font-size: 24rpx;
+		font-weight: 500;
+		color: #666666;
+		margin-top: 37rpx;
+		text-align: center;
+	}
 </style>

+ 7 - 0
src/pages/user-center/about-mall/ComplaintsSuggestions.vue

xqd
@@ -38,6 +38,13 @@
 		},
 		methods:{
 			submit(){
+				if(this.content===''){
+					uni.showToast({
+						title:'请填写评价内容',
+						icon:'none'
+					})
+					return
+				}
 				this.$request({
 					url:this.$api.user.suggestion,
 					data:{

+ 10 - 4
src/pages/user-center/evaluate/list.vue

xqd xqd xqd xqd
@@ -59,7 +59,7 @@
 				</view>
 			</view>
 
-			<view class="no-more">没有更多了...</view>
+			<view class="no-more" v-if="noMore">没有更多了...</view>
 		</view>
 	</app-layout>
 </template>
@@ -72,7 +72,8 @@
 		data() {
 			return {
 				page: 1,
-				evaluateList: []
+				evaluateList: [],
+				noMore:false
 			};
 		},
 		computed: {
@@ -84,8 +85,10 @@
 			this.getData()
 		},
 		onReachBottom() {
-			this.page++
-			this.getData()
+			if(!this.noMore){
+				this.page++
+				this.getData()
+			}
 		},
 		methods: {
 			getData() {
@@ -105,6 +108,9 @@
 						} else {
 							this.evaluateList = this.evaluateList.concat(evaluateList)
 						}
+						if(res.data.list.length<20){
+							this.noMore=true
+						}
 					}
 					this.$hideLoading()
 				}).catch(rej => {

+ 13 - 9
src/plugins/composition/components/app-list/app-list.vue

xqd xqd xqd xqd xqd
@@ -24,7 +24,7 @@
 						        </view>
 						        <image class="item-good-attr-arrow" src="https://t17.9026.com/web/statics/image/index/arrow-right-A18353.png"></image>
 						    </view>
-							<view class="price"><text class="ought_price">¥{{goods.max_price}}</text><text class="paid_price" v-show="goods.total_price">实付:¥<text>{{goods.total_price}}</text></text></view>
+							<view class="price"><text class="ought_price">¥{{goods.choose_attr?goods.choose_attr.price*goods.choose_attr.number:goods.min_price}}</text><text class="paid_price" v-show="goods.total_price">实付:¥<text>{{goods.total_price}}</text></text></view>
 						</view>
 					</view>
 					<app-add-subtract :xStyle="2" :stock="goods.stock" :good_id="goods.id" :min="1" :value="goods.choose_attr.number" @change="addsubChange($event,goods,index,index1,0)"></app-add-subtract>
@@ -51,7 +51,7 @@
                             </view>
                             <image class="item-good-attr-arrow" src="https://t17.9026.com/web/statics/image/index/arrow-right-A18353.png"></image>
                         </view>
-                        <view class="price"><text class="ought_price">¥{{goods.max_price}}</text><text class="paid_price" v-show="goods.total_price">实付:¥<text>{{goods.total_price}}</text></text></view>
+                        <view class="price"><text class="ought_price">¥{{goods.choose_attr?goods.choose_attr.price*goods.choose_attr.number:goods.min_price}}</text><text class="paid_price" v-show="goods.total_price">实付:¥<text>{{goods.total_price}}</text></text></view>
                     </view>
 					</view>
 					<app-add-subtract :xStyle="2" :stock="goods.stock" :good_id="goods.id" :min="0" :value="goods.choose_attr.number" @change="addsubChange($event,goods,index,idx,1)"></app-add-subtract>
@@ -175,6 +175,7 @@
                 that.list[that.index].goods_list.forEach(v => {
                     if(v.id == that.goods.id) {
                         v.choose_attr = selectAttr;
+						!v.choose_attr.number?v.choose_attr.number=1:''
                         v.detail.selectAttr = selectAttr;
                         for(let i in selectAttr.attr_list) {
                             for(let j in v.attr_groups) {
@@ -273,15 +274,18 @@
                     that.list[i].total_price = 0;
                     let allchoose = true;
                     for(let x in that.list[i].goods_list) {
-                        if(that.list[i].goods_list[x].choose_attr) {
-                            if(that.list[i].goods_list[x].choose_attr.price > 0) {
-                                that.list[i].total_price += +that.list[i].goods_list[x].choose_attr.price;
-                            }
+						let item = that.list[i].goods_list[x]
+                        if(item.choose_attr && item.choose_attr.number) {
+                            // if(item.choose_attr.price > 0) {
+                                that.list[i].total_price += item.choose_attr.price*item.choose_attr.number;
+								item.total_price = +item.choose_attr.price*item.choose_attr.number
+								that.max_discount += (+item.price)*item.choose_attr.number
+                            // }
                         }else {
                             allchoose = false;
                         }
-                        if(that.list[i].choose && that.list[i].goods_list[x].choose_attr == null ) {
-                            that.noAttrList.push(that.list[i].goods_list[x])
+                        if(that.list[i].choose && item.choose_attr == null ) {
+                            that.noAttrList.push(item)
                         }
                     }
                     if(that.list[i].total_price < 0) {
@@ -319,7 +323,7 @@
 					}
                     for(let x in that.list[i].goods_list) {
 						let item=that.list[i].goods_list[x]
-                        if(item.choose_goods && item.choose_attr) {
+                        if(item.choose_goods && item.choose_attr && item.choose_attr.number) {
                             item.total_price = (+item.choose_attr.price - +item.price)*item.choose_attr.number
                             that.max_discount += (+item.price)*item.choose_attr.number
                             if(item.total_price < 0) {

+ 1 - 1
src/plugins/composition/detail/detail.vue

xqd
@@ -189,7 +189,7 @@
 							let noChoose = true;
 							for (let y in that.list[i].goods_list) {
 								if (that.list[i].goods_list[y].choose_goods && that.list[i].goods_list[y].choose_attr
-									.attr_list) {
+									.attr_list && that.list[i].goods_list[y].choose_attr.number>=1) {
 									noChoose = false;
 									for (let x in that.list[i].goods_list[y].choose_attr.attr_list) {
 										attr.push({

+ 161 - 153
src/store/modules/user.js

xqd
@@ -1,175 +1,183 @@
 import user from '../../core/user.js';
 
 const state = {
-    accessToken: null,
-    info: null,
-    showLoginModal: false,
-    tempParentId: 0,
-    showAttention: false,
-    showAttentionTwo:false,
-    sign: {
-        mobile: '',
-        pic_captcha: '',
-        sms_captcha: '',
-        validate_code_id: -1
-    },
-    isSign: false,
-	
-	selectedProperties:{
-		name:'绑定楼盘'
-	},
-	
-	isEnterSales:false,//是否进入销售端
+	accessToken: null,
+	info: null,
+	showLoginModal: false,
+	tempParentId: 0,
+	cart_nums: 0,
+	showAttention: false,
+	showAttentionTwo: false,
+	sign: {
+		mobile: '',
+		pic_captcha: '',
+		sms_captcha: '',
+		validate_code_id: -1
+	},
+	isSign: false,
+
+	selectedProperties: {
+		name: '绑定楼盘'
+	},
+
+	isEnterSales: false, //是否进入销售端
 };
 
 const getters = {
-    accessToken(state) {
-        return state.accessToken;
-    },
-    info(state) {
-        return state.info;
-    },
-    showLoginModal(state) {
-        return state.showLoginModal;
-    },
-    tempParentId(state) {
-        return state.tempParentId;
-    },
-    is_vip(state) {
-        return state.is_vip_card_user;
-    },
-    showAttention(state) {
-        return state.showAttention;
-    },
-    showAttentionTwo(state) {
-        return state.showAttentionTwo;
-    },
-    sign(state) {
-        return state.sign;
-    },
-    isSign(state) {
-        return state.isSign;
-    },
+	accessToken(state) {
+		return state.accessToken;
+	},
+	info(state) {
+		return state.info;
+	},
+	cart_nums(state) {
+		return state.cart_nums;
+	},
+	showLoginModal(state) {
+		return state.showLoginModal;
+	},
+	tempParentId(state) {
+		return state.tempParentId;
+	},
+	is_vip(state) {
+		return state.is_vip_card_user;
+	},
+	showAttention(state) {
+		return state.showAttention;
+	},
+	showAttentionTwo(state) {
+		return state.showAttentionTwo;
+	},
+	sign(state) {
+		return state.sign;
+	},
+	isSign(state) {
+		return state.isSign;
+	},
 	getIsEnterSales(state) {
-	    return state.isEnterSales;
+		return state.isEnterSales;
 	}
 };
 
 const mutations = {
-    accessToken(state, data) {
-        state.accessToken = data;
-    },
-    info(state, data) {
-        state.info = data;
-    },
-    showLoginModal(state, data) {
-        state.showLoginModal = data;
-    },
-    tempParentId(state, data) {
-        state.tempParentId = data;
-    },
-    showAttention(state, data) {
-        state.showAttention = data;
-    },
-    showAttentionTwo(state, data) {
-        state.showAttentionTwo = data;
-    },
-    sign(state, data) {
-        state.sign = data;
-    },
-    isSign(state, data) {
-        state.isSign = data;
-    },
-	isEnterSales(state,data) {
-		if(data){
-			console.log('进入销售端',data)
-		}else{
-			console.log('退出销售端',data)
+	accessToken(state, data) {
+		state.accessToken = data;
+	},
+	info(state, data) {
+		state.info = data;
+	},
+	cart_nums(state, data) {
+		state.cart_nums = data;
+	},
+	showLoginModal(state, data) {
+		state.showLoginModal = data;
+	},
+	tempParentId(state, data) {
+		state.tempParentId = data;
+	},
+	showAttention(state, data) {
+		state.showAttention = data;
+	},
+	showAttentionTwo(state, data) {
+		state.showAttentionTwo = data;
+	},
+	sign(state, data) {
+		state.sign = data;
+	},
+	isSign(state, data) {
+		state.isSign = data;
+	},
+	isEnterSales(state, data) {
+		if (data) {
+			console.log('进入销售端', data)
+		} else {
+			console.log('退出销售端', data)
 		}
-	    state.isEnterSales = data;
+		state.isEnterSales = data;
 	},
-	selectedProperties(state,data){
-		state.selectedProperties=data
+	selectedProperties(state, data) {
+		state.selectedProperties = data
 	}
 };
 
 const actions = {
 	isEnterSales(context, data) {
-	    context.commit('isEnterSales', data);
-	},
-    sign(context, data) {
-        context.commit('sign', data);
-    },
-    isSign(context, data) {
-        context.commit('isSign', data);
-    },
-    accessToken(context) {
-        if (!user.isLogin()) {
-            context.commit('accessToken', null);
-        }
-        user.getAccessToken().then(accessToken => {
-            context.commit('accessToken', accessToken);
-        });
-    },
-    info(context, options) {
-        if (!user.isLogin()) {
-            context.commit('accessToken', null);
-        }
-        user.getAccessToken().then(accessToken => {
-            context.commit('accessToken', accessToken);
-            user.getInfo(options).then(data => {
-                context.commit('info', data);
-            });
-        }).catch((err) => {
-            context.commit('showLoginModal', true);
-        });
-    },
-    refreshInfo(context) {
-        context.commit('accessToken', null);
-    },
-    refresh(context) {
-        if (!user.isLogin()) {
-            context.commit('accessToken', null);
-        }
-        user.getAccessToken().then(accessToken => {
-            context.commit('accessToken', accessToken);
-            user.getInfo({
-                refresh: true,
-            }).then(data => {
-                context.commit('info', data);
-            }).catch(e => {
-            });
-        }).catch(e => {
-        });
-    },
-    setTempParentId(context, data) {
-        context.commit('tempParentId', data);
-    },
-    loadAccessTokenFormCache(context) {
-        if (context.accessToken) return;
-        user.getAccessToken({
-            cacheOnly: true,
-        }).then(e => {
-            if (!e) return;
-            context.commit('accessToken', e);
-        });
-    },
-    logout(context) {
-        context.commit('accessToken', null);
-        user.loginByToken(null);
-    },
-    showAttention(context, data) {
-        context.commit('showAttention', data);
-    },
-    showAttentionTwo(context, data) {
-        context.commit('showAttentionTwo', data);
-    }
+		context.commit('isEnterSales', data);
+	},
+	sign(context, data) {
+		context.commit('sign', data);
+	},
+	isSign(context, data) {
+		context.commit('isSign', data);
+	},
+	cart_nums(context, data) {
+		context.commit('cart_nums', data);
+	},
+	accessToken(context) {
+		if (!user.isLogin()) {
+			context.commit('accessToken', null);
+		}
+		user.getAccessToken().then(accessToken => {
+			context.commit('accessToken', accessToken);
+		});
+	},
+	info(context, options) {
+		if (!user.isLogin()) {
+			context.commit('accessToken', null);
+		}
+		user.getAccessToken().then(accessToken => {
+			context.commit('accessToken', accessToken);
+			user.getInfo(options).then(data => {
+				context.commit('info', data);
+			});
+		}).catch((err) => {
+			context.commit('showLoginModal', true);
+		});
+	},
+	refreshInfo(context) {
+		context.commit('accessToken', null);
+	},
+	refresh(context) {
+		if (!user.isLogin()) {
+			context.commit('accessToken', null);
+		}
+		user.getAccessToken().then(accessToken => {
+			context.commit('accessToken', accessToken);
+			user.getInfo({
+				refresh: true,
+			}).then(data => {
+				context.commit('info', data);
+			}).catch(e => {});
+		}).catch(e => {});
+	},
+	setTempParentId(context, data) {
+		context.commit('tempParentId', data);
+	},
+	loadAccessTokenFormCache(context) {
+		if (context.accessToken) return;
+		user.getAccessToken({
+			cacheOnly: true,
+		}).then(e => {
+			if (!e) return;
+			context.commit('accessToken', e);
+		});
+	},
+	logout(context) {
+		context.commit('accessToken', null);
+		user.loginByToken(null);
+	},
+	showAttention(context, data) {
+		context.commit('showAttention', data);
+	},
+	showAttentionTwo(context, data) {
+		context.commit('showAttentionTwo', data);
+	}
 };
 
 export default {
-    namespaced: true,
-    state,
-    getters,
-    mutations,
-    actions
+	namespaced: true,
+	state,
+	getters,
+	mutations,
+	actions
 }