Quellcode durchsuchen

Merge branch 'master' of http://git.aseanbusiness.cn/qzyReal/market-app-ui

mym vor 1 Jahr
Ursprung
Commit
bec8b32c01
1 geänderte Dateien mit 21 neuen und 13 gelöschten Zeilen
  1. 21 13
      pages/market/one/detail.vue

+ 21 - 13
pages/market/one/detail.vue

@@ -9,30 +9,30 @@
 				<u-divider text="规格参数"></u-divider>
 				<view class="item">
 					<text class="desc">净重:</text>
-					<text>{{item.netWeight}}</text>
+					<text>{{ item.netWeight }}</text>
 				</view>
 				<view class="item">
 					<text class="desc">毛重:</text>
-					<text>{{item.grossWeight}}</text>
+					<text>{{ item.grossWeight }}</text>
 				</view>
 				<view class="item">
 					<text class="desc">计量单位:</text>
-					<text>{{item.goodsUnits}}</text>
+					<text>{{ item.goodsUnits }}</text>
 				</view>
 				<view class="item">
 					<text class="desc">商户:</text>
-					<text>{{item.merchantName}}</text>
+					<text>{{ item.merchantName }}</text>
 				</view>
 				<view class="item">
 					<text class="desc">互市区:</text>
-					<text>{{item.tradeAreaName}}</text>
+					<text>{{ item.tradeAreaName }}</text>
 				</view>
 				<view class="item">
 					<text class="desc">发布时间:</text>
-					<text>{{item.createTime}}</text>
+					<text>{{ item.createTime }}</text>
 				</view>
 				<u-divider text="商品介绍"></u-divider>
-				<view class="contents" v-if="item.description">{{item.description}}</view>
+				<view class="contents" v-if="item.description">{{ item.description }}</view>
 				<view class="contents">暂无关于该商品的介绍</view>
 			</view>
 		</view>
@@ -92,13 +92,21 @@ export default {
 		},
 		// 立即购买
 		buy() {
-			this.http.request({
-				url: '/level-one-server/app/TbGoodsTransit/purchaseLevelOntGoodsTransit',
-				data: { goodsTransitId: this.item.id },
-				method: 'POST',
-				contentType: 'application/json; charset=utf-8',
+			uni.showModal({
+				title: '提示',
+				content: '确定购买?',
 				success: res => {
-					uni.redirectTo({ url: '/pages/market/one/leader/success' });
+					if (res.confirm) {
+						this.http.request({
+							url: '/level-one-server/app/TbGoodsTransit/purchaseLevelOntGoodsTransit',
+							data: { goodsTransitId: this.item.id },
+							method: 'POST',
+							contentType: 'application/json; charset=utf-8',
+							success: res => {
+								uni.redirectTo({ url: '/pages/market/one/leader/success' });
+							}
+						});
+					}
 				}
 			});
 		}