Browse Source

前端gjy

gjy 3 years ago
parent
commit
94fd674785
2 changed files with 23 additions and 8 deletions
  1. 5 1
      pageA/product/detail.vue
  2. 18 7
      pages/business/business.vue

+ 5 - 1
pageA/product/detail.vue

@@ -1,8 +1,11 @@
 <template>
 	<!--采购详情-->
 	<view class="container">
-		<view class="back-btn cuIcon-back" @click="navBack"></view>
+		<view class="">
+			<view class="back-btn cuIcon-back" @click="navBack"></view>
 		<view class='title1'>采购详情</view>
+		</view>
+		
 		<image style='width:100%;' src='../../static/img/jiaoyi/bg@3x.png'></image>
 		<view class="introduce-section">
 			<view style='height:70px;'>
@@ -555,6 +558,7 @@
 		left:50%;
 		transform: translateX(-50%);
 		top: 40upx;
+		padding-top: var(--status-bar-height);
 		z-index:9999;
 		color:#fff;
 	}

+ 18 - 7
pages/business/business.vue

@@ -3,7 +3,12 @@
 		<view class="top-style">
 			<view style='background:#fff;border-bottom:1px solid #EEE;padding-bottom:10px;'>
 				<view class="cu-bar search">
-					<view style='position:absolute;left:30px;top:50%;transform: translateY(-50%);'>
+					<view style='position:absolute;left:30px;top:50%;transform: translateY(-50%);' @click='status=true'>
+						{{location}}<image style='width:10px;height:6px;margin-left:4px;position:relative;top:-2px;'
+							src='../../static/img/jiaoyi/down.png'></image>
+					</view>
+					<u-picker mode="selector" @confirm='locationChange' v-model="status" :range="locationType"></u-picker>
+					<!-- <view>
 						<picker style='display:inline-block;' @change="locationChange" :value="location"
 							:range="locationType">
 							<view class="picker">
@@ -12,7 +17,8 @@
 						</picker>
 						<image style='width:10px;height:6px;margin-left:4px;position:relative;top:-2px;'
 							src='../../static/img/jiaoyi/down.png'></image>
-					</view>
+					</view> -->
+					
 					<view class="search-form round" @click="naviageToPage('/pageA/product/lookup?TabCur=')">
 						<text style='color: #ccc;text-indent:56px;' class="cuIcon-search"></text>
 						<input type="text" placeholder="请输入货名或标题" confirm-type="search"></input>
@@ -93,9 +99,10 @@
 				isLoadMore: false, //是否加载中
 				showTran: true,
 				scrollTop: 0,
+				status:false,
 				pageSize: 10,
 				searchKeyWord: '',
-				receivePrivate: '',
+				receivePrivate: '全国',
 				currentPage: 1,
 				categoryList: [{
 					title: '我要买粮',
@@ -106,7 +113,10 @@
 				}],
 				TabCur: 0,
 				current: 1,
-				location: 0,
+				location: '全国',
+				params:{
+					province: true,
+				},
 				locationType: ['全国', '黑龙江', '河南', '山东', '安徽', '吉林', '河北', '江苏', '内蒙古', '四川', '湖南', '湖北', '辽宁',
 					'江西', '云南', '新疆', '山西', '广西', '陕西', '广东', '甘肃', '重庆', '贵州', '浙江', '福建',
 					'宁夏', '天津', '海南', '青海', '西藏', '上海', '北京'
@@ -203,8 +213,9 @@
 				})
 			},
 			locationChange(e) {
-				this.location = e.detail.value
-				this.receivePrivate = e.detail.value
+				console.log(e)
+				this.location = this.locationType[e[0]]
+				this.receivePrivate = this.locationType[e[0]]
 				this.currentPage = 1
 				this.loadData()
 			},
@@ -246,7 +257,7 @@
 						showFlag: 1,
 						currentPage: this.currentPage,
 						searchKeyWord: this.searchKeyWord,
-						receivePrivate: this.receivePrivate =="0" ? '':this.locationType[this.receivePrivate]
+						receivePrivate: this.receivePrivate
 					}).then(res => {
 						uni.hideLoading()
 						this.buyInfo = res.data.data.records