hwq 2 年之前
父節點
當前提交
409a0e5808
共有 2 個文件被更改,包括 15 次插入10 次删除
  1. 2 2
      pages/index/index.vue
  2. 13 8
      pages/product/supermarket.vue

+ 2 - 2
pages/index/index.vue

@@ -51,7 +51,7 @@
 				<image src="../../static/icon/in5.png"></image>
 				<text>消费券商城</text>
 			</view>
-			<view class="cate-item" @click="navTo('/pages/shoping/shopService','1')">
+			<view class="cate-item" @click="navTo('/pages/shoping/shopService','2')">
 				<image src="../../static/icon/in6.png"></image>
 				<text>养发馆</text>
 			</view>
@@ -969,4 +969,4 @@
 			}
 		}
 	}
-</style>
+</style>

+ 13 - 8
pages/product/supermarket.vue

@@ -15,12 +15,12 @@
 			</view>
 			<uni-load-more :status="loadingType"></uni-load-more>
 		</view>
-		
+
 		<view class="cart">
-			
+
 		</view>
-		
-		
+
+
 	</view>
 </template>
 
@@ -41,7 +41,7 @@
 				limit: 20,
 				loadingType: 'more',
 				list: [],
-				total:0
+				total: 0
 			};
 		},
 		components: {
@@ -50,7 +50,7 @@
 		},
 		onLoad() {
 			this.loadData();
-			
+
 		},
 		onShow() {
 			this.loadCart();
@@ -63,8 +63,8 @@
 			async loadCart() {
 				let obj = this;
 				getCartList({
-					type:1
-				})
+						type: 1
+					})
 					.then(function(e) {
 						obj.total = e.data.valid.length;
 					})
@@ -72,6 +72,11 @@
 						console.log(e);
 					});
 			},
+			navToDetailPage(opt) {
+				uni.navigateTo({
+					url: '/pages/product/product?id=' + opt.id
+				})
+			},
 			loadData() {
 				if (this.loadingType == 'loading' || this.loadingType == 'nomore') {
 					return