Browse Source

前端小程序 sdy

zhongtianhaoyuan 3 years ago
parent
commit
cd35d13b7d
2 changed files with 26 additions and 5 deletions
  1. 21 0
      pageD/myRelease/buyDetails.vue
  2. 5 5
      pages/release/release.vue

+ 21 - 0
pageD/myRelease/buyDetails.vue

@@ -194,13 +194,34 @@
 			return {
 				types:'',
 				typesType:["现货","期货"],
+				procurementPlanInfos:{}
 		
 			}
 		},
+		onLoad(options){
+				
+			this.getList(options.id)
+			console.log(options.id,"idwei1")
+		},
 		methods: {
 			typeChange(e){
 				this.typesIndex = e.detail.value
 				this.types = this.typesType[this.typesIndex];
+			},
+			getList(id1){
+				this.$api.doRequest('get','/procurementPlanInfo/getProcurementPlan',{id:id1}).then(res => {
+					console.log("dsjfid")
+					this.procurementPlanInfos = res.data.data.records
+					console.log(this.procurementPlanInfos,"对象")
+					
+				})
+				.catch(res => {
+					uni.showToast({
+						title: res.errmsg,
+						icon:'none',
+						duration: 2000
+					})
+				});
 			}
 		}
 	}

+ 5 - 5
pages/release/release.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="center">
 		<view class="introduce-section">
-			<view class="informations" @click="details" v-for="(item , index) in procurementPlanInfos" :Key="index">
+			<view class="informations" @click="details(item)" v-for="(item , index) in procurementPlanInfos" :Key="index">
 				<view class="labels">{{item.goodsName}}</view>
 				<view class="labels">{{item.weight}}</view>
 				<view class="labels">{{item.unitPrice}}</view>
@@ -12,7 +12,7 @@
 		</view>
 		<!-- <button type="default" class="fabuBut" @change="releaseChange">发布 -->
 		<view class="c-row b-b">
-			
+			<text class="tit" >发布</text>
 			<!-- <view class="con-list"> -->
 			<picker @change="releaseChange" :value="releaseIndex" :range="releaseType" class="con-list">
 				<view class="picker " >
@@ -24,7 +24,7 @@
 		<!-- </button> -->
 		<view class="page-bottom">
 			<view class="action-btn-group">
-				<button type="primary" class=" action-btn no-border add-cart-btn" @click="tradeNow">发布</button>
+				<button  type="primary" class=" action-btn no-border add-cart-btn" @click="tradeNow">发布</button>
 			</view>
 		</view>
 	</view>
@@ -65,9 +65,9 @@
 							})
 						}
 			},
-			details(){
+			details(item){
 				uni.navigateTo({
-					url: `/pageD/myRelease/buydetails`
+					url: `/pageD/myRelease/buyDetails?id=${item.id}`
 				})
 			},
 			getList(){