zhaoyun 3 gün önce
ebeveyn
işleme
988311776a

+ 11 - 10
mer_uniapp/pages.json

@@ -1,16 +1,7 @@
 {
 	"lazyCodeLoading": "requiredComponents",
 	"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
-		{
-			"path": "pages/order_addcart/order_addcart",
-			"style": {
-				"app-plus": {
-					"titleNView": false //禁用原生导航栏
-				},
-				"navigationStyle": "custom",
-				"disableScroll": true
-			}
-		},
+		
 		{
 			"path": "pages/guide/index",
 			"style": {
@@ -42,6 +33,16 @@
 			}
 		},
 		{
+			"path": "pages/order_addcart/order_addcart",
+			"style": {
+				"app-plus": {
+					"titleNView": false //禁用原生导航栏
+				},
+				"navigationStyle": "custom",
+				"disableScroll": true
+			}
+		},
+		{
 			"path": "pages/user/index",
 			"style": {
 				"navigationBarTitleText": "个人中心",

+ 1 - 1
mer_uniapp/pages/goods/browsing_history/index.vue

@@ -13,7 +13,7 @@
 							<text class="buy-count">买过{{item.buyCount}}次</text>
 						</view>
 						<view class="item-info">
-							<text class="mr10 score">⭐️ {{item.starLevel}}分</text><text class="mr10">{{lastBrowseTag[item.lastBrowseTag]}}</text><text class="mr10">|</text><text class="mr10">{{item.distance}}km</text><text>24分钟</text>
+							<text class="mr10 score">⭐️ {{item.starLevel}}分</text><text class="mr10">{{lastBrowseTag[item.lastBrowseTag]}}</text><text class="mr10">|</text><text class="mr10">{{item.distance}}km</text>
 						</view>
 					</view>
 				</view>

+ 12 - 6
mer_uniapp/pages/merchant_search/index.vue

@@ -167,14 +167,19 @@
 			if (e.searchVal) that.searchValue = e.searchVal;
 			e.navTitle ? that.navTitle = e.navTitle : ''
 			e.id ? that.cateId = e.id : ''
+			const allData = {
+				name : '全部',
+				id : 0,
+				icon :  '/static/img/quanbu.png',
+			}; 
 			getProduct(that.cateId).then(res => {
 				const data = res.data;
-				// data[0].id = 0;
 				if (data.length !== 0) {
-					that.optionIndex = data[0].id;
-					data[0].name = '全部';
-					data[0].icon = '/static/img/quanbu.png';
-					that.optionData = data
+					that.optionIndex =0; 
+					that.optionData.push(allData)
+					data.forEach(function(item) {
+					  that.optionData.push(item);
+					}); 
 				}
 				that.getMatchedData()
 			})
@@ -186,8 +191,9 @@
 				getMerchantSearchList({
 					latitude: uni.getStorageSync('user_latitude'),
 					longitude: uni.getStorageSync('user_longitude'),
-					productType: this.optionIndex || this.cateId,
+					productType: this.cateId,
 					keywords: this.searchValue,
+					typeIds: this.optionIndex==0?"":this.optionIndex,
 					page: this.page,
 					limit: 10
 				}).then(res => {

+ 2 - 2
mer_uniapp/pages/takeout/index.vue

@@ -185,7 +185,7 @@
 				that.optionData = data || []
 				that.getMatchedData()
 				console.log(that.optionData, '12312321321312321321312312')
-			})
+			})  
 
 			getTakeoutList({
 				latitude: uni.getStorageSync('user_latitude'),
@@ -212,7 +212,7 @@
 				getMerchantList({
 					latitude: uni.getStorageSync('user_latitude'),
 					longitude: uni.getStorageSync('user_longitude'),
-					cateId: this.optionIndex
+					cateId: this.takeoutId
 				}).then(res => {
 					this.merchantList = res.data.list;
 					this.noDataTip = this.merchantList.length ? '' : ' 暂无外卖商家 ';