Browse Source

数据更换

mym 1 year ago
parent
commit
d02ae9d8b3

+ 9 - 8
pages/market/one/detail.vue

@@ -9,30 +9,31 @@
 				<u-divider text="规格参数"></u-divider>
 				<view class="item">
 					<text class="desc">净重:</text>
-					<text>25吨</text>
+					<text>{{item.netWeight}}吨</text>
 				</view>
 				<view class="item">
 					<text class="desc">毛重:</text>
-					<text>25吨</text>
+					<text>{{item.grossWeight}}吨</text>
 				</view>
 				<view class="item">
-					<text class="desc">净重:</text>
-					<text>25吨</text>
+					<text class="desc">计量单位:</text>
+					<text>{{item.goodsUnits}}</text>
 				</view>
 				<view class="item">
 					<text class="desc">商户:</text>
-					<text>基栋收购商</text>
+					<text>{{item.merchantName}}</text>
 				</view>
 				<view class="item">
 					<text class="desc">互市区:</text>
-					<text>东兴一桥互市区</text>
+					<text>{{item.tradeAreaName}}</text>
 				</view>
 				<view class="item">
 					<text class="desc">发布时间:</text>
-					<text>2023-08 15:35</text>
+					<text>{{item.createTime}}</text>
 				</view>
 				<u-divider text="商品介绍"></u-divider>
-				<view class="contents">八角茴香是木兰科八角属的常绿乔木。树皮灰褐色或红褐色;叶互生或叶簇生于枝端;叶片革质,椭圆状倒卵</view>
+				<view class="contents" v-if="item.description">{{item.description}}</view>
+				<view class="contents">暂无关于该商品的介绍</view>
 			</view>
 		</view>
 		<view class="mfooter" v-if="user.userType == 2">

+ 19 - 22
pages/market/two/detail.vue

@@ -1,44 +1,41 @@
 <template>
 	<view>
 		<view class="product_detail">
+			<!-- <image :src="item.goodsImg" mode="widthFix" class="pic"></image> -->
 			<image src="../../../static/news.jpg" mode="widthFix" class="pic"></image>
 			<view class="box">
-				<view class="title">八角茴香(未磨)(可食用)</view>
-				<view class="price">¥ 5000</view>
+				<view class="title">{{item.goodsName}}</view>
+				<!-- <view class="price">¥ 5000</view> -->
 				<view class="clear"></view>
 				<u-divider text="规格参数"></u-divider>
 				<view class="item">
-					<text class="desc">净重:</text>
-					<text>25吨</text>
+					<text class="desc">商品量:</text>
+					<text>{{item.goodsQuantity}}</text>
 					<view class="clear"></view>
 				</view>
 				<view class="item">
-					<text class="desc">毛重:</text>
-					<text>25吨</text>
-					<view class="clear"></view>
-				</view>
-				<view class="item">
-					<text class="desc">净重:</text>
-					<text>25吨</text>
+					<text class="desc">计量单位:</text>
+					<text>{{item.goodsUnit}}</text>
 					<view class="clear"></view>
 				</view>
+				<!-- 商户后续查,目前商户不对 -->
 				<view class="item">
 					<text class="desc">商户:</text>
-					<text>基栋收购商</text>
+					<text>{{item.createName}}</text>
 					<view class="clear"></view>
 				</view>
 				<view class="item">
 					<text class="desc">互市区:</text>
-					<text>东兴一桥互市区</text>
+					<text>{{item.tradeAreaName}}</text>
 					<view class="clear"></view>
 				</view>
 				<view class="item">
 					<text class="desc">发布时间:</text>
-					<text>2023-08 15:35</text>
+					<text>{{item.createTime}}</text>
 					<view class="clear"></view>
 				</view>
-				<u-divider text="商品介绍"></u-divider>
-				<view class="contents">八角茴香是木兰科八角属的常绿乔木。树皮灰褐色或红褐色;叶互生或叶簇生于枝端;叶片革质,椭圆状倒卵</view>
+				<!-- <u-divider text="商品介绍"></u-divider>
+				<view class="contents">八角茴香是木兰科八角属的常绿乔木。树皮灰褐色或红褐色;叶互生或叶簇生于枝端;叶片革质,椭圆状倒卵</view> -->
 			</view>
 		</view>
 		<view class="mfooter">
@@ -61,12 +58,12 @@ export default {
 	},
 	onLoad(e) {
 		if (e.id) {
-			// this.http.request({
-			// 	url: '/level-two-server/app/TbGoodsDemand/getById?id=' + e.id,
-			// 	success: res => {
-			// 		this.content = res.data.data;
-			// 	}
-			// });
+			this.http.request({
+				url: '/level-two-server/app/TbGoodsDemand/getById?id=' + e.id,
+				success: res => {
+					this.item = res.data.data;
+				}
+			});
 		}
 	},
 	methods: {

+ 15 - 8
pages/market/two/leader/confirm.vue

@@ -41,7 +41,7 @@
 				<view class="item">
 					<text class="label">出价金额(必填)</text>
 					<text class="desc">
-						<input type="number" placeholder="请输入" />
+						<input type="number" v-model="price" placeholder="请输入" />
 					</text>
 				</view>
 			</view>
@@ -60,17 +60,24 @@
 export default {
 	data() {
 		return {
-			item: {}
+			item: {},
+			price: ''
 		};
 	},
 	onLoad(e) {
 		if (e.id) {
-			/* this.http.request({
-				url: '/level-one-server/app/TbPortNews/getPortNewsDetails',
-				success: res => {
-					this.content = res.data.data;
-				}
-			}); */
+			// let params = {
+			// 	goodsDemandId: e.id,
+			// 	isOrders: 1,
+			// 	price: parseInt(this.price),
+			// 	purchaserId: 
+			// }
+			// this.http.request({
+			// 	url: '/level-two-server/app/TbDemandQuotation/quotation',
+			// 	success: res => {
+			// 		this.content = res.data.data;
+			// 	}
+			// });
 		}
 	},
 	methods: {

+ 10 - 7
pages/market/two/list.vue

@@ -17,15 +17,15 @@
 				</view>
 				<view class="clear"></view>
 			</view>
-			<view class="item" v-for="(item, index) in list" :key="index" @click="detail(item)">
-				<view class="title">{{item.createName}}</view>
+			<view class="item" v-for="(item, index) in list" :key="index" >
+				<view class="title" @click="detail(item)">{{item.createName}}</view>
 				<!-- <image :src="item.goodsImg" mode="aspectFill" class="pic"></image> -->
-				<image src="../../../static/news.jpg" mode="aspectFill" class="pic"></image>
+				<image @click="detail(item)" src="../../../static/news.jpg" mode="aspectFill" class="pic"></image>
 				<view class="con">
-					<view class="productName omit">{{item.goodsName}}</view>
-					<view class="desc">{{item.goodsQuantity}}吨</view>
+					<view class="productName omit" @click="detail(item)">{{item.goodsName}}</view>
+					<view class="desc" @click="detail(item)">{{item.goodsQuantity}}吨</view>
 					<!-- <view class="price">¥ 5000</view> -->
-					<view class="btn" v-if="user.userType == 2">立即接单</view>
+					<view class="btn" v-if="user.userType == 2" @click="confirm(item)">立即接单</view>
 				</view>
 				<view class="clear"></view>
 			</view>
@@ -64,6 +64,9 @@ export default {
 		detail(item) {
 			uni.navigateTo({ url: '/pages/market/two/detail?id=' + item.id });
 		},
+		confirm(item){
+			uni.navigateTo({ url: '/pages/market/two/leader/confirm?id=' + item.id })
+		},
 		//刷新数据
 		refresh() {
 			this.loadMore = true;
@@ -103,7 +106,7 @@ page {
 	color: #000;
 	border: #B5B5B5 1px solid;
 	position: relative;
-	left: 340rpx;
+	left: 350rpx;
 	font-size: 14px;
 }
 </style>