Bläddra i källkod

修改首页及商城

sakura 1 år sedan
förälder
incheckning
d6d7e7cdc0

+ 183 - 136
pages/home/home.vue

@@ -1,170 +1,217 @@
 <template>
-    <view class="container">
-  <page-top-bar  />
-  
-  <view class="banner">
-<swiper style="height: 240px;"
-  indicator-dots="true"
-  autoplay="true"
-  interval="2000"
-  duration="500">
-  <swiper-item   v-for="hot in eventshot" @click="onView(hot.id)">
-    <image :src=hot.imgList[0] class="slide-image"></image>
-  </swiper-item>
- 
-</swiper>
-  </view>
-  
-  <view class="section1">
-	  <view class="row">
-	  <view class="column" v-for="tag in eventstag">
-		  
-		  <view class="cell" ><view class="cl"><image :src="'/static/images/chart_alt'+index+'.png'" style="width: 24px; height: 24px;"></image></view><view class="cl">{{tag.name}}</view> </view>
-		   
-	  </view>
-
-	  </view>
-	<view class="full-row">
-			 
-			  <view class="column">
-上海市 </view><view class="column2"><image src="/static/images/arr.png" style="width: 10px; height: 10px;"></image></view>
-			   <view class="column">类型</view>
-			   <view class="column2"><image src="/static/images/arr.png" style="width: 10px; height: 10px;"></image></view>
-	</view>  
-
-  </view>
-<view class="section3" style="padding-bottom: 75px;">
-	
-	<view class="item"  @click="onView(event.id)"  v-for="event in events" :key="event.id" >
-		<view class="item_img">
-		  <img :src="event.imgList[0]"></img>
+	<view class="container">
+		<!-- <page-top-bar /> -->
+		<view class="top-bar">
+			<view class="row">
+				<view class="column column1" @click="navTo(1,'/pages/home/home')">
+					<image src="@/static/images/backhome.png" style="width: 24px; height: 24px;"></image>
+				</view>
+				<view class="column column2"><input @input="KeyName" class="input-box" type="text" placeholder="搜索内容"
+						style="width: 100%;" /></view>
+				<view class="column column3">
+					<image src="@/static/images/fangdajing.png" style="width: 21px; height: 21px;" @click="seachText">
+					</image>
+				</view>
+				<view class="column column4"></view>
+			</view>
+
 		</view>
-		<view class="item_info"><view class="title"> {{ event.title }}</view>
-		<view class="time_yuyue"><view class="ico"><image src="/static/images/time.png" style="width: 12px; height: 12px;"></image></view>
-		<view class="time">{{ event.openTime }} - {{ event.closeTime }}</view>
-		<view class="time_yuyue" ><view class="ico"><image src="/static/images/daohang.png" style="width: 12px; height: 12px;"></image></view>
-		<view class="didian">{{ event.address }}</view>
-		
+		<view class="banner">
+			<swiper style="height: 240px;" indicator-dots="true" autoplay="true" interval="2000" duration="500">
+				<swiper-item v-for="hot in eventshot" @click="onView(hot.id)">
+					<image :src=hot.imgList[0] class="slide-image"></image>
+				</swiper-item>
+
+			</swiper>
 		</view>
-		<view class="yuyue_btn" @click="onView(event.id)"><image src="/static/images/lijiyuyue.jpg" style="width: 89px;height: 25px;"></image></view>
-		
-		
+
+		<view class="section1">
+			<view class="row">
+				<view class="column" v-for="(tag,index) in eventstag">
+
+					<view class="cell" :class="active == index?'active':''" @click="selActive(tag,index)">
+						<view class="cl">
+							<image :src="'/static/images/chart_alt'+index+'.png'" style="width: 24px; height: 24px;">
+							</image>
+						</view>
+						<view class="cl">{{tag.name}}</view>
+					</view>
+
+				</view>
+
+			</view>
+			<view class="full-row">
+				<view class="column">
+					上海市 </view>
+				<view class="column2">
+					<image src="/static/images/arr.png" style="width: 10px; height: 10px;"></image>
+				</view>
+				<view class="column">类型</view>
+				<view class="column2">
+					<image src="/static/images/arr.png" style="width: 10px; height: 10px;"></image>
+				</view>
+			</view>
+			<!-- <view class="selected" v-if="">
+				城市
+			</view> -->
 		</view>
-		
-		
+		<view class="section3" style="padding-bottom: 75px;">
+
+			<view class="item" @click="onView(event.id)" v-for="event in events" :key="event.id">
+				<view class="item_img">
+					<img :src="event.imgList[0]"></img>
+				</view>
+				<view class="item_info">
+					<view class="title"> {{ event.title }}</view>
+					<view class="time_yuyue">
+						<view class="ico">
+							<image src="/static/images/time.png" style="width: 12px; height: 12px;"></image>
+						</view>
+						<view class="time">{{ event.openTime }} - {{ event.closeTime }}</view>
+						<view class="time_yuyue">
+							<view class="ico">
+								<image src="/static/images/daohang.png" style="width: 12px; height: 12px;"></image>
+							</view>
+							<view class="didian">{{ event.address }}</view>
+
+						</view>
+						<view class="yuyue_btn" @click="onView(event.id)">
+							<image src="/static/images/lijiyuyue.jpg" style="width: 89px;height: 25px;"></image>
+						</view>
+
+
+					</view>
+
+
+				</view>
+
+			</view>
+
 		</view>
-	
+
+		<page-btm-bar :active="1" />
 	</view>
-		
-</view>
-  
-  <page-btm-bar :active="1" />
-    </view>
 </template>
 <script>
-
-	
-
- 	import {
+	import {
 		mapState,
 		mapGetters,
 		mapMutations
 	} from 'vuex'
-	
+
 	const app = getApp();
 	export default {
-		
-		
+
+
 		computed: {
-			...mapState(['store_id','systemInfo'])
+			...mapState(['store_id', 'systemInfo'])
 		},
-		
-		
-data() {
+
+
+		data() {
 			return {
-				
-				events: [] , // 用于存储事件数据
-				eventshot:[],
-				eventstag:[],
+
+				events: [], // 用于存储事件数据
+				eventshot: [],
+				eventstag: [],
+				active: 0,
+				tagId: 5,
+				keyword: ''
 			};
 		},
 
-mounted() {
-  this.fetchEventsData();
-  this.fetchEventsHotData();
-  this.fetchEventsTag();
-},
+		mounted() {
+			this.fetchEventsData();
+			this.fetchEventsHotData();
+			this.fetchEventsTag();
+		},
+
 
-		
 
 		methods: {
-			
-			
-		  fetchEventsData() {
-			let _this=this;
-		    _this.$http.request('events/searchEvents',{
-		     page:1,
-		     pageSize:10,
-		     	
-			
-		    }).then(response => {
-				 console.log(response);  // 先打印整个响应对象查看结构
-				   this.events = response.data;
-				       console.log(response.data)
-				  }).catch(error => {
-				    console.error('数据获取失败:', error);
-				  });
-				},
-				
+			//搜索内容
+			seachText() {
+				this.$http.request('events/searchEvents', {
+					page: 1,
+					pageSize: 10,
+					keyword: this.keyword
+				}).then(response => {
+					this.events = response.data;
+				}).catch(error => {
+					console.error('数据获取失败:', error);
+				});
+			},
+			KeyName(t) {
+				this.keyword = t.detail.value;
+			},
+			//切换筛选条件
+			selActive(item, index) {
+				this.tagId = item.id
+				this.active = index
+				this.fetchEventsData()
+			},
+
+			fetchEventsData() {
+				let _this = this;
+				_this.$http.request('events/searchEvents', {
+					page: 1,
+					pageSize: 10,
+					tagId: _this.tagId,
+				}).then(response => {
+					console.log(response); // 先打印整个响应对象查看结构
+					this.events = response.data;
+					console.log(response.data)
+				}).catch(error => {
+					console.error('数据获取失败:', error);
+				});
+			},
+
 			fetchEventsHotData() {
-						let _this=this;
-			  _this.$http.request('events/searchEvents',{
-			   page:1,
-			   pageSize:5,
-			   hot:1,
-			   	
-						
-			  }).then(response => {
-							 console.log(response);  // 先打印整个响应对象查看结构
-							   this.eventshot = response.data;
-							       console.log(response.data)
-							  }).catch(error => {
-							    console.error('数据获取失败:', error);
-							  });
-							},	
+				let _this = this;
+				_this.$http.request('events/searchEvents', {
+					page: 1,
+					pageSize: 5,
+					hot: 1,
+
+
+				}).then(response => {
+					console.log(response); // 先打印整个响应对象查看结构
+					this.eventshot = response.data;
+					console.log(response.data)
+				}).catch(error => {
+					console.error('数据获取失败:', error);
+				});
+			},
 			fetchEventsTag() {
-						let _this=this;
-			  _this.$http.request('events/searchTags',{
-			   page:1,
-			   pageSize:5,
-			   	
-						
-			  }).then(response => {
-							 console.log(response);  // 先打印整个响应对象查看结构
-							   this.eventstag = response.data;
-							       console.log(response.data)
-							  }).catch(error => {
-							    console.error('数据获取失败:', error);
-							  });
-							},	
-			
-					 
-			onView(e){
+				let _this = this;
+				_this.$http.request('events/searchTags', {
+					page: 1,
+					pageSize: 5,
+
+
+				}).then(response => {
+					console.log(response); // 先打印整个响应对象查看结构
+					this.eventstag = response.data;
+					console.log(response.data)
+				}).catch(error => {
+					console.error('数据获取失败:', error);
+				});
+			},
+
+
+			onView(e) {
 				console.log('传递的ID:', e);
 				uni.navigateTo({
-					url:'/pages/home/detail/detail?id='+e,
+					url: '/pages/home/detail/detail?id=' + e,
 				})
 			},
-			
-			
-			},
-			
-			
-			
-			}
 
-			
 
+		},
+
+
+
+	}
 </script>
 
 <style lang="scss">

+ 64 - 1
pages/home/index.scss

@@ -1,6 +1,58 @@
+
+.top-bar {
+		/* background-color: #745A42; */
+		background-color: #593320;
+		width: 100vw;
+		
+		/*兼容 IOS<11.2*/
+		padding-bottom: constant(safe-area-inset-bottom);
+		/*兼容 IOS>11.2*/
+		padding-bottom: env(safe-area-inset-bottom);
+		height: 120px;
+		display: flex;
+		flex-flow: row nowrap;
+		justify-tab-bar: space-around;
+		align-items: center;
+		padding-top: 30px;
+		
+		position: fixed;
+		left: 0;
+		top: 0;
+		z-index: 900;
+
+	}
+	.row {
+		padding-top: 40px;
+	    display: flex;
+		justify-content: space-between;
+		width: 100%;
+	  }
+	  .column {
+	    padding: 10px 0px 0px 0px;
+	
+	    text-align: left; /* 文本居中 */
+		width: 100%;
+	  }
+	  .column1 { width: 24%; padding-left: 30px; }
+	  .column2 { width: 48%;padding-left:20px }
+	  .column3 { width: 20px; padding-left:10px; padding-top: 12px;}
+	  .column4 { width: 20%;margin-right: 30px; }
+
+ .input-box {
+     border: 1px solid #CCC; /* 白色边框 */
+     border-radius: 10px; /* 边框弧形角度 */
+     padding: 0px 5px; /* 内边距 */
+	 height: 24px;
+	 color: #FFF;
+	
+   }
+    .input-box::placeholder {
+       color: #FFF; /* 占位符文字颜色 */
+       
+     }
 .container{
 	
-	margin-top: 90px;
+	margin-top: 70px;
 	background-color: #E5E5E5;
 	min-height: 760px;
 	width: 100%;
@@ -55,6 +107,10 @@
 					
 				}
 			  }
+			   .active{
+			  					color: rgb(160, 124, 90);
+			  					font-weight: bold;
+			  				}
 			  .full-row {
 			      font-size: 14px;
 			   margin-top: -20px;
@@ -80,6 +136,13 @@
 										 
 					  }
 			    }
+				.selected{
+					position: absolute;
+					width: 100px;
+					height: 100px;
+					z-index: 999;
+					background-color: #fff;
+				}
 		
 	 }
 	

+ 114 - 92
pages/index/index.vue

@@ -1,13 +1,12 @@
 <template>
 	<view class="container">
 		<view class="utop"></view>
-		<uni-nav-bar :fixed="true" class="unibar" title="Coffunity"
-		
-		 left-icon="home" backgroundColor="white" :border="false"  height="60px" @clickLeft="onHome"/>
-		
-		
-		
-		 <view class="loading" :style="{height:(windowHeight-statusBarHeight-50-height)+'px'}" v-if="isloading">
+		<uni-nav-bar :fixed="true" class="unibar" title="Coffunity" left-icon="home" backgroundColor="white"
+			:border="false" height="60px" @clickLeft="onHome" />
+
+
+
+		<view class="loading" :style="{height:(windowHeight-statusBarHeight-50-height)+'px'}" v-if="isloading">
 			<image src="https://business.coffunity.cn/upload/loading4.gif" style="width:20px;height:20px"></image>
 		</view>
 		<block v-else>
@@ -22,19 +21,19 @@
 							</view>
 						</block> -->
 						<!-- <block v-if="(teen_index==1 || teen_index==3) && (systemInfo.is_hall ==1 || systemInfo.is_ziti==1)"> -->
-							<!-- <i class="iconfont icon-canyin icon-1" :style="{color:setColor}"></i> -->
-							<navigator url="../../menber/shop" class="page-title text-nowarp store-title">
-								{{storeInfo.title || ''}} <uni-icons type="right" size="3"></uni-icons> 
-							</navigator>
+						<!-- <i class="iconfont icon-canyin icon-1" :style="{color:setColor}"></i> -->
+						<navigator url="../../menber/shop" class="page-title text-nowarp store-title">
+							{{storeInfo.title || ''}} <uni-icons type="right" size="3"></uni-icons>
+						</navigator>
 						<!-- </block> -->
 					</view>
 					<view class="flex-grow-1 flex-y-center" style="justify-content: flex-end; align-items: center;">
-						
-						<view  @click="onMyOrder" style="margin-right:10px;font-size:12px;font-weight:bold;">我的订单</view>
+
+						<view @click="onMyOrder" style="margin-right:10px;font-size:12px;font-weight:bold;">我的订单</view>
 					</view>
 
 					<!--is_ziti 自提 is_waimai 外卖  is_hall 堂食 -->
-				<!-- 	<view class="por flex-grow-0"
+					<!-- 	<view class="por flex-grow-0"
 						v-if="(systemInfo.is_hall==1||systemInfo.is_ziti==1) && systemInfo.is_waimai==1">
 						<view class="item-off flex">
 							<view class="flex-grow-1 flex-center" @click="bindCheck" :data-index="item.teenIndex"
@@ -52,29 +51,28 @@
 				</view> -->
 			</view>
 
-			<view :class="['main-block','flex','flex-nowarp','flex-x-between']"
-				>
+			<view :class="['main-block','flex','flex-nowarp','flex-x-between']">
 				<scroll-view scroll-y class="left-bar" :scroll-into-view="menuScrollIntoView" scroll-with-animation>
 					<view v-for="(item,index) in goodsList" :id="`menu-${item.id}`" :key="index"
 						:class="['item',currentCateId == item.id?'active':'']" @click="handleMenuTap(index,item.id)">
-						
-						
-						
-						<view class="name" >{{item.title}}</view>
+
+
+
+						<view class="name">{{item.title}}</view>
 						<view class="num" v-if="item.num>0">{{item.num}}</view>
 						<!-- <view class="rund" :style="[currentCateId == item.id?{'background-color':setColor}:'']"></view> -->
-						
+
 					</view>
 				</scroll-view>
 
 				<view class="right-bar">
 					<!-- <view class="top flex flex-nowarp flex-x-between flex-y-center"> -->
-						<!-- <view class="active-cat flex flex-nowarp flex-y-center text-nowarp">
+					<!-- <view class="active-cat flex flex-nowarp flex-y-center text-nowarp">
 							<text class="name">{{goodsList[catActive].title}}</text>
 							<text class="desc text-nowarp"
 								v-if="goodsList[catActive].desc">({{goodsList[catActive].desc}})</text>
 						</view> -->
-						<!-- <navigator :url="`/pages/search/search?store_id=${store_id}&table_id=${table_id}`"
+					<!-- <navigator :url="`/pages/search/search?store_id=${store_id}&table_id=${table_id}`"
 							class="search-btn flex flex-x-center flex-y-center flex-nowarp">
 							<image src="../../static/icon_4.png" mode="aspectFit" class="icon-4"></image>
 							<view class="btn-name">搜索</view>
@@ -110,11 +108,10 @@
 											</view>
 										</view>
 										<view class="flex flex-x-end flex-y-center">
-											<view class="spec-btn"  
-												v-if="item2.is_gg == 2" @click="showSpec(item2.id)">
-												
+											<view class="spec-btn" v-if="item2.is_gg == 2" @click="showSpec(item2.id)">
+
 												<!-- <view class="spec-num" v-if="item2.num>0">{{item2.num}}</view> -->
-												<view class="circle" >选规格</view>
+												<view class="circle">选规格</view>
 												<view class="spec-num-gg" v-if="item2.num !== 0">{{item2.num}}</view>
 											</view>
 
@@ -153,7 +150,7 @@
 
 			<shopping-car v-on:catActive="bindCatActive" :carNum="carNum" :isDistance="is_distance"
 				:deliveryPrice="delivery_price" :carTotal="carTotal" :carGoods="carGoods" :userInfo="userInfo"
-				:eat_people="choosepeoples" @choosebag="choosebag" :checked="pocket"/>
+				:eat_people="choosepeoples" @choosebag="choosebag" :checked="pocket" />
 
 			<view class="mask flex flex-column flex-nowarp flex-x-center flex-y-center" v-show="maskPop">
 				<!-- 详情弹窗 -->
@@ -224,9 +221,9 @@
 
 		<float-modal v-if="shopId" :shopId="shopId" @modalStatusBack="handleModalBack"></float-modal>
 		<!-- 2021041200077000000019093688 -->
-		<page-btm-bar :active="3" />
+		<page-btm-bar :active="4" />
 
-<!-- 		<uni-popup ref="popup" type="center">
+		<!-- 		<uni-popup ref="popup" type="center">
 			<view class="shopping">
 
 				<form @submit="Shoppingbag">
@@ -321,8 +318,8 @@
 				shopId: '',
 				shoppingObj: {},
 				pocket: 1,
-				is_checkeds:1,
-				storeInfo:null,
+				is_checkeds: 1,
+				storeInfo: null,
 			}
 		},
 
@@ -391,10 +388,10 @@
 				if (val.store_id && val.userInfo.id) {
 					this.getIndexInfo();
 					this.setCopy();
-					this.isovertime(); 
+					this.isovertime();
 				}
 			},
-		
+
 
 			is_creatOrder(val) {
 				this.getCarList();
@@ -424,13 +421,13 @@
 			this.BarHeight();
 			uni.hideTabBar();
 			this.userInfo = uni.getStorageSync('userInfo');
-			
-			
-			
+
+
+
 			if (this.systemInfo) {
 				this.shopId = this.systemInfo.shopid;
 			}
-		 
+
 			if (this.store_id) {
 				this.getIndexInfo()
 				this.setCopy();
@@ -444,13 +441,14 @@
 						teenIndex: 2,
 					},
 				];
-			}else{
-				uni.navigateTo({
-					url:'/shop/index/index'
-				})
+			} else {
+				this.getStore()
+				// uni.navigateTo({
+				// 	url: '/shop/index/index'
+				// })
 			}
 		},
-
+		
 		onHide() {
 			clearInterval(this._timer)
 		},
@@ -485,8 +483,8 @@
 			if (this.store_id && this.userInfo.id) {
 				this.teen_index == 1 ? this.isovertime() : ''; //距离上一次是否超时 是否选择人数
 			}
-			
-			
+
+
 		},
 
 		onPullDownRefresh() {
@@ -510,19 +508,43 @@
 
 		methods: {
 			...mapMutations(['SET_ADDRESS', 'SET_TEEN_INDEX']),
-	
-			onMyOrder(e){
+			getStore() {
+				let list = [{
+					address: "上海市黄浦区普安路189号曙光大厦20D",
+					height: 60,
+					iconPath: "/shop/static/images/storeIcon.png",
+					id: 3,
+					juli: 11.38,
+					latitude: "31.203889",
+					longitude: "121.437643",
+					store_id: 3,
+					thumb: "/uploads/admin/admin_thumb/20240402/3d53071f7a0fa63535ad25553e93cf11.png",
+					title: "2ndhome",
+					width: 50,
+				}];
+				let store_id = list[0].store_id;
+				this.$store.commit('SET_STORE_ID', store_id)
+				this.$store.commit('SET_TEEN_INDEX', 1) //重置默认
+				this.$store.commit('SET_TABLE_ID', "")
+				this.$store.commit('SET_CATE_ID', '')
+				this.$store.dispatch('getSystemStup', store_id);
+				this.$store.dispatch('getOpenid', store_id);
+				uni.switchTab({
+					url: "/pages/index/index"
+				})
+			},
+			onMyOrder(e) {
 				uni.navigateTo({
-					url:"/pages/myOrderList/myOrderList"
+					url: "/pages/myOrderList/myOrderList"
 				})
 			},
 			handleModalBack(res) {
 				console.log(res, '-----123')
 			},
-			
-			onHome(e){
+
+			onHome(e) {
 				uni.switchTab({
-					url:'/pages/home/home'
+					url: '/pages/home/home'
 				})
 			},
 
@@ -557,7 +579,7 @@
 			Socket() {
 				if (this.systemInfo.is_qian_many == 1) {
 					app.globalData.callback = (r) => {
-						let res = JSON.parse(r.data); 
+						let res = JSON.parse(r.data);
 						if (res.type == 'clear_list') {
 							if (this.goodsList.length > 0) {
 								this.carGoods = []
@@ -749,7 +771,7 @@
 					lat: this.address.lat || '',
 					lng: this.address.lng || '',
 					store_id: this.store_id,
-				}, "", "", hideLoading).then(res => { 
+				}, "", "", hideLoading).then(res => {
 					let distance = Number(res.data.distance);
 					if (distance) {
 						if (!distance) {
@@ -789,28 +811,28 @@
 				}).then(res => {
 					this.sizeCalcState = false;
 					let is_rebate = 2
-					
-					this.storeInfo=res.data;
+
+					this.storeInfo = res.data;
 					try {
 						is_rebate = res.data.set.is_rebate
 					} catch (err) {
 						console.log(err)
 					}
-					
-					console.log('res',res);
-				 
+
+					console.log('res', res);
+
 					if (is_rebate == 1) {
 						this.getCategoryList()
 						return false
-					} 
+					}
 					this.$http.request('xcx/index', {
 						store_id: this.store_id,
 						state: Number(this.teen_index),
 					}, "", "", hideLoading).then(res => {
 						uni.stopPullDownRefresh();
 						let list = res.data;
-						this.goodsList = list;   
-						
+						this.goodsList = list;
+
 						// diy跳转分类
 						let cate_id = this.$store.state.cate_id;
 						if (cate_id) {
@@ -822,16 +844,16 @@
 								this.catActive = index; //选中分类
 								this.cateGoods = `cate-${obj.id}`
 							}
-						}else{
-							if(list.length>0){
-								var obj=list[0];
+						} else {
+							if (list.length > 0) {
+								var obj = list[0];
 								this.currentCateId = obj.id; //选中分类id
 								this.currentCateDId = obj.id; //选中分类id
 								this.catActive = index; //选中分类
 								this.cateGoods = `cate-${obj.id}`
 							}
 						}
-						
+
 						this.getCarList();
 					}).catch(err => {
 						uni.stopPullDownRefresh()
@@ -841,27 +863,27 @@
 			//获取购物车数据
 			getCarList() {
 				var url = 'xcx/cart_list',
-					datas; 
-					console.log(this.systemInfo);
+					datas;
+				console.log(this.systemInfo);
 				if (this.systemInfo.is_qian_many == 1) {
 					return
 				}
-				
+
 				datas = {
 					user_id: this.userInfo.id,
 					store_id: this.store_id,
 				}
 				if (this.userInfo.id && this.store_id) {
 					this.$http.request(url, datas, "", "", hideLoading).then(res => {
-						if(res.data.list<=0){
+						if (res.data.list <= 0) {
 							this.pocket = 1
 						}
 						let arr = this.$utils.removal(res.data.list)
 						this.new_list = res.data.new_list;
 						this.computGoodsNum(arr, res.data.total_price, 0, res.data.new_list)
 						this.isloading = false
-						
-						
+
+
 					}).catch(err => {})
 				}
 			},
@@ -927,7 +949,7 @@
 					spec = '',
 					new_list = this.new_list,
 					carItem = false;
-				    carGoods = this.carGoods;
+				carGoods = this.carGoods;
 				pocket = idx === '' ? pocket : idx;
 				if (type == 2) {
 					for (let i of new_list) {
@@ -937,24 +959,24 @@
 					}
 				}
 				if (type == 1) {
-					function getData(new_list,pocket,goods_id) {
-	                    let as = false
+					function getData(new_list, pocket, goods_id) {
+						let as = false
 						for (let i of new_list) {
-							for(let j of i.list){	
+							for (let j of i.list) {
 								if (i.pocket == pocket && j.goods_id == goods_id) {
-									  as = true
+									as = true
 								}
 							}
 						}
-						return as	
+						return as
 					}
 					// 判断当前选中的购物口袋是否选中并且还有产品
-					let isAllStudentType = getData(new_list,pocket,goods_id)
+					let isAllStudentType = getData(new_list, pocket, goods_id)
 					if (isAllStudentType) {
 						for (let i of new_list) {
-						  if (i.pocket == pocket) {
-						        carGoods = i.list;
-						   }
+							if (i.pocket == pocket) {
+								carGoods = i.list;
+							}
 						}
 					} else {
 						for (let i of new_list) {
@@ -992,7 +1014,7 @@
 						spec = specArr.join(',')
 						money = this.goodsDetail.spec_price
 						// 调用 showSpec 方法
-						   this.showSpec(goods_id);
+						this.showSpec(goods_id);
 					}
 				} else if (data_from == 'goods') {
 					//无规格商品
@@ -1056,20 +1078,20 @@
 					})
 				} else {
 					this.$http.request('xcx/add_cart', datas, 'POST', false, true).then(res => {
-						
+
 						if (res.data.list.length == 0 && data_from == 'car') {
-							this.pocket = 1 
+							this.pocket = 1
 							this.maskPop = false
 							this.carGoodsPop = false
 						}
-						
+
 						let arr = this.$utils.removal(res.data.list)
 						this.new_list = res.data.new_list;
-						
+
 						this.computGoodsNum(arr, res.data.total_price, num, res.data.new_list)
-						
-						 
-						  }).catch(err => {})
+
+
+					}).catch(err => {})
 				}
 			},
 
@@ -1172,7 +1194,7 @@
 					this.detailPop = false
 				}).catch(err => {})
 			},
-			
+
 			//选择规格
 			chooseSpec(index, specIndex) {
 				let spec = this.goodsDetail.edit_value[index].spec
@@ -1187,7 +1209,7 @@
 				this.goodsDetail.num = 0
 				this.computSpecPrice()
 			},
-			
+
 			//计算规格价格
 			computSpecPrice() {
 				let edit_value = this.goodsDetail.edit_value
@@ -1412,4 +1434,4 @@
 
 <style lang="scss">
 	@import url("./index.css");
-</style>
+</style>

+ 7 - 5
pages/myOrderList/myOrderList.vue

@@ -2,13 +2,15 @@
 	<view class="container">
 		<view class="tab-h flex flex-nowarp flex-y-center">
 			<view :class="['item',tabActive == 1?'active':'']" :style="[tabActive == 1?{color:setColor}:'']"
-				@click="changeTab(1)">已支付</view>
+				@click="changeTab(1)">待付款</view>
 			<view :class="['item',tabActive == 2?'active':'']" :style="[tabActive == 2?{color:setColor}:'']"
-				@click="changeTab(2)">待完成</view>
+				@click="changeTab(2)">已支付</view>
 			<view :class="['item',tabActive == 3?'active':'']" :style="[tabActive == 3?{color:setColor}:'']"
-				@click="changeTab(3)">自提</view>
+				@click="changeTab(3)">待收货</view>
+			<view :class="['item',tabActive == 4?'active':'']" :style="[tabActive == 4?{color:setColor}:'']"
+				@click="changeTab(4)">已完成</view>
 			<view class="tab-h-border"
-				:style="{'background-color':setColor,left:tabActive==1?'26%':tabActive==2?'59%':'93%'}"></view>
+				:style="{'background-color':setColor,left:tabActive==1?'22%':tabActive==2?'47%':tabActive==3?'71.5%':'98%'}"></view>
 		</view>
 		<view class="tab-b">
 			<no-none v-if="orderList.length<=0"></no-none>
@@ -315,7 +317,7 @@
 		font-size: 30rpx;
 		font-weight: 500;
 		flex: none;
-		width: 33.3%;
+		width: 25%;
 	}
 
 	.tab-h .item.active {

+ 5 - 3
shop/index/index.vue

@@ -115,6 +115,7 @@
 
 		methods: {
 			getStore(e) {
+				console.log(this.list);
 				let store_id = this.list[this.act_index].store_id;
 				this.$store.commit('SET_STORE_ID', store_id)
 				this.$store.commit('SET_TEEN_INDEX', 1) //重置默认
@@ -122,8 +123,8 @@
 				this.$store.commit('SET_CATE_ID', '')
 				this.$store.dispatch('getSystemStup', store_id);
 				this.$store.dispatch('getOpenid', store_id);
-				uni.navigateTo({
-					url: "../../pages/index/index"
+				uni.switchTab({
+					url: "/pages/index/index"
 				})
 			},
 			getNavigation({
@@ -139,7 +140,8 @@
 					name: title,
 					success: function() {
 						console.log('success');
-					}
+					},
+					
 				});
 			},
 

+ 0 - 0
static/images/chart_alt.png → static/images/chart_alt0.png


+ 0 - 0
static/images/bar_chart.png → static/images/chart_alt1.png


+ 0 - 0
static/images/chart_horizontal.png → static/images/chart_alt2.png


+ 0 - 0
static/images/chart_circle.png → static/images/chart_alt3.png


+ 0 - 0
static/images/chart_square.png → static/images/chart_alt4.png