Quellcode durchsuchen

二级市场购物车

李书文 vor 1 Jahr
Ursprung
Commit
eec1e1ed5a
2 geänderte Dateien mit 48 neuen und 39 gelöschten Zeilen
  1. 38 35
      pages.json
  2. 10 4
      pages/market/two/purchaser/order/cart.vue

+ 38 - 35
pages.json

@@ -424,42 +424,45 @@
 
 		},
 		{
-            "path" : "pages/market/two/leader/resale",
-            "style" :
-            {
-                "navigationBarTitleText": "转售确认",
-                "enablePullDownRefresh": false
-            }
-
-        },
+			"path": "pages/market/two/leader/resale",
+			"style": {
+				"navigationBarTitleText": "转售确认",
+				"enablePullDownRefresh": false
+			}
+
+		},
 		{
-            "path" : "pages/market/two/purchaser/buy/buy",
-            "style" :
-            {
-                "navigationBarTitleText": "收购商购买",
-                "enablePullDownRefresh": false
-            }
-
-        },
+			"path": "pages/market/two/purchaser/buy/buy",
+			"style": {
+				"navigationBarTitleText": "收购商购买",
+				"enablePullDownRefresh": false
+			}
+
+		},
 		{
-            "path" : "pages/market/one/cooperative/peopleOrders",
-            "style" :
-            {
-                "navigationBarTitleText": "合作社边民订单",
-                "enablePullDownRefresh": false
-            }
-
-        }
-        ,{
-            "path" : "pages/market/two/purchaser/order/cart",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "购物车",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-    ],
+			"path": "pages/market/one/cooperative/peopleOrders",
+			"style": {
+				"navigationBarTitleText": "合作社边民订单",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/market/two/purchaser/order/cart",
+			"style": {
+				"navigationBarTitleText": "购物车",
+				"enablePullDownRefresh": false,
+				"app-plus": {
+					"titleNView": {
+						"buttons": [{
+							"text": "清空",
+							"fontSize": "14px"
+						}]
+					}
+				}
+			}
+
+		}
+	],
 	"tabBar": {
 		"color": "#7A7E83",
 		"selectedColor": "#4581fb",
@@ -490,4 +493,4 @@
 		"navigationBarTitleText": "边民互市贸易",
 		"navigationBarBackgroundColor": "#4581fb"
 	}
-}
+}

+ 10 - 4
pages/market/two/purchaser/order/cart.vue

@@ -27,7 +27,7 @@
 		<view class="mfooter" v-if="selects.length > 0">
 			<view class="flex">
 				<view class="f">
-					<button class="btn" @click="pay()">立即购买({{ selects.length }})</button>
+					<button class="btn" @click="buy({})">立即购买({{ selects.length }})</button>
 				</view>
 			</view>
 		</view>
@@ -62,9 +62,15 @@ export default {
 		},
 		// 立即购买
 		buy(item) {
-			uni.navigateTo({
-				url: '/pages/market/two/purchaser/buy/buy?order=' + item.id
-			});
+			if (item.orderId) {
+				uni.navigateTo({
+					url: '/pages/market/two/purchaser/buy/buy?orderId=' + item.orderId
+				});
+			} else {
+				uni.navigateTo({
+					url: '/pages/market/two/purchaser/buy/buy?orderId=' + this.selects.map(item => item.orderId)
+				});
+			}
 		},
 		del(item) {
 			let ids = item.id || this.list.map(i => i.id);