zhangdan 4 years ago
parent
commit
9bc2ed5f73
3 changed files with 26 additions and 25 deletions
  1. 7 7
      pages/index/index.vue
  2. 4 4
      pages/store/addStore.vue
  3. 15 14
      pages/store/storeList.vue

+ 7 - 7
pages/index/index.vue

@@ -55,7 +55,7 @@
 							<text>{{item.distance}}KM</text>
 							<text>{{item.distance}}KM</text>
 						</view>
 						</view>
 					</view>
 					</view>
-					<view class="greey-font">{{item.address || '--'}}</view>
+					<view class="greey-font">{{item.address? item.address:'--'}}</view>
 					<!-- <view class="greey-font">{{item.reserveTime}}</view>
 					<!-- <view class="greey-font">{{item.reserveTime}}</view>
 					<view class="type">
 					<view class="type">
 						<text v-for="(key,index) in item.reserveTypeList" :key="index" class="mark">
 						<text v-for="(key,index) in item.reserveTypeList" :key="index" class="mark">
@@ -272,16 +272,16 @@
 						this.listdata.forEach(item => {
 						this.listdata.forEach(item => {
 							item.distance = item.distanct && item.distanct.distance ? (item.distanct
 							item.distance = item.distanct && item.distanct.distance ? (item.distanct
 								.distance / 1000).toFixed(2) : ''
 								.distance / 1000).toFixed(2) : ''
-							item.reserveTime = moment(item.reserveDateBegin).format('YYYY-MM-DD') + item
-								.reserveTimeTypeDictValue
-							item.reserveTypeList = item.reserveRubbishType.split(',')
+							// item.reserveTime = moment(item.reserveDateBegin).format('YYYY-MM-DD') + item
+							// 	.reserveTimeTypeDictValue
+							// item.reserveTypeList = item.reserveRubbishType.split(',')
 							
 							
 							
 							
-							if(item.receiveAreasName){
-								item.cityAddress=this.getArea(item.receiveAreasName,1)
+							if(item.contactAddress){
+								item.cityAddress=this.getArea(item.contactAddress,1)
 							}
 							}
 							console.log(item.cityAddress,'-----------item.cityAddress=============')
 							console.log(item.cityAddress,'-----------item.cityAddress=============')
-							item.address=(item.houseAddress? item.receiveAddress:'')+(item.cityAddress? '('+item.cityAddress+')':'')
+							item.address=(item.houseAddress? item.houseAddress:'')+(item.cityAddress? '('+item.cityAddress+')':'')
 						})
 						})
 						this.noDataText = '暂无数据'
 						this.noDataText = '暂无数据'
 					} else {
 					} else {

+ 4 - 4
pages/store/addStore.vue

@@ -23,14 +23,14 @@
 				<view class="flex flex_column data-item">
 				<view class="flex flex_column data-item">
 					<text>地址</text>
 					<text>地址</text>
 					<view class="list-item-right flex_1 flex justify_between">
 					<view class="list-item-right flex_1 flex justify_between">
-						<u-input class="flex_1" :custom-style="inputClass" v-model="form.receiveAddress.receiveAreasName" @click="selectAddress" :disabled="true" placeholder="请选择通信地址" placeholder-style="color:'#bbb';font-size:18px"/>
+						<u-input class="flex_1" :custom-style="inputClass" v-model="reverseReceiveAddress.receiveAreasName" @click="selectAddress" :disabled="true" placeholder="请选择通信地址" placeholder-style="color:'#bbb';font-size:18px"/>
 						<u-icon class="back-img" name="arrow-right" color="#9DA8B5"  @click="selectAddress"></u-icon>
 						<u-icon class="back-img" name="arrow-right" color="#9DA8B5"  @click="selectAddress"></u-icon>
 					</view>
 					</view>
 				</view>
 				</view>
 				<view class="flex flex_column data-item last">
 				<view class="flex flex_column data-item last">
 					<text>详细地址</text>
 					<text>详细地址</text>
 					<view class="list-item-right flex_1 flex justify_between">
 					<view class="list-item-right flex_1 flex justify_between">
-						<u-input class="flex_1" :custom-style="inputClass" v-model="form.receiveAddress.receiveAddress" placeholder="请输入详细地址" placeholder-style="color:'#bbb';font-size:18px"/>
+						<u-input class="flex_1" :custom-style="inputClass" v-model="reverseReceiveAddress.receiveAddress" placeholder="请输入详细地址" placeholder-style="color:'#bbb';font-size:18px"/>
 					</view>
 					</view>
 				</view>
 				</view>
 			</view>
 			</view>
@@ -96,13 +96,13 @@
 					if(res.status==200){
 					if(res.status==200){
 						this.form.name=res.data.name? res.data.name:''
 						this.form.name=res.data.name? res.data.name:''
 						this.form.mobile=res.data.mobile
 						this.form.mobile=res.data.mobile
-						this.reverseReceiveAddress=Object.assign(this.reverseReceiveAddress,res.data.this.reverseReceiveAddress?res.data.this.reverseReceiveAddress:null)
+						this.reverseReceiveAddress=Object.assign(this.reverseReceiveAddress,res.data.reverseReceiveAddress?res.data.reverseReceiveAddress:null)
 						// this.form.receiveAddress.provinceName=res.data.receiveAddressVO?res.data.receiveAddressVO.provinceName:''
 						// this.form.receiveAddress.provinceName=res.data.receiveAddressVO?res.data.receiveAddressVO.provinceName:''
 						// this.form.receiveAddress.cityName=res.data.receiveAddressVO?res.data.receiveAddressVO.cityName:''
 						// this.form.receiveAddress.cityName=res.data.receiveAddressVO?res.data.receiveAddressVO.cityName:''
 						// this.form.receiveAddress.districtName=res.data.receiveAddressVO?res.data.receiveAddressVO.districtName:''
 						// this.form.receiveAddress.districtName=res.data.receiveAddressVO?res.data.receiveAddressVO.districtName:''
 						// this.form.receiveAddress.receiveAddress=res.data.receiveAddressVO?res.data.receiveAddressVO.receiveAddress:''
 						// this.form.receiveAddress.receiveAddress=res.data.receiveAddressVO?res.data.receiveAddressVO.receiveAddress:''
 						// this.form.receiveAddress.receiveAreasName=res.data.receiveAddressVO?res.data.receiveAddressVO.receiveAreasName:''
 						// this.form.receiveAddress.receiveAreasName=res.data.receiveAddressVO?res.data.receiveAddressVO.receiveAreasName:''
-						this.photograph=res.data.this.reverseReceiveAddress?res.data.this.reverseReceiveAddress.headerImageList:[]
+						this.photograph=res.data.reverseReceiveAddress?res.data.reverseReceiveAddress.headerImageList:[]
 					}else{
 					}else{
 						uni.showToast({
 						uni.showToast({
 							title: res.message,
 							title: res.message,

+ 15 - 14
pages/store/storeList.vue

@@ -76,18 +76,19 @@
 			// scroll-view到底部加载更多
 			// scroll-view到底部加载更多
 			onreachBottom() {
 			onreachBottom() {
 				this.action = 'onreachBottom'
 				this.action = 'onreachBottom'
-				if (this.list.length < this.total) {
-					this.pageNo += 1
-					this.getRow()
-				} else {
-					if(this.list.length) {
-						uni.showToast({
-							title: '已经到底了',
-							icon: 'none'
-						});
+					if (this.list.length < this.total) {
+						this.pageNo += 1
+						this.getRow()
+					} else {
+						if(this.list.length) {
+							uni.showToast({
+								title: '已经到底了',
+								icon: 'none'
+							});
+						}
+						this.status = "nomore"
 					}
 					}
-					this.status = "nomore"
-				}
+				
 			},
 			},
 			getArea(obj,state) {
 			getArea(obj,state) {
 			var index=obj.lastIndexOf("\市");
 			var index=obj.lastIndexOf("\市");
@@ -114,11 +115,11 @@
 				shopList(params).then(res => {
 				shopList(params).then(res => {
 					if (res.status == 200) {
 					if (res.status == 200) {
 						res.data.list.map(item=>{
 						res.data.list.map(item=>{
-							if(item.receiveAddressVO.receiveAreasName){
-								item.cityAddress=this.getArea(item.receiveAddressVO.receiveAreasName,1)
+							if(item.reverseReceiveAddress.receiveAreasName){
+								item.cityAddress=this.getArea(item.reverseReceiveAddress.receiveAreasName,1)
 							}
 							}
 							console.log(item.cityAddress,'-----------item.cityAddress=============')
 							console.log(item.cityAddress,'-----------item.cityAddress=============')
-							item.address=item.receiveAddressVO ? ((item.receiveAddressVO.receiveAddress? item.receiveAddressVO.receiveAddress:'')+(item.cityAddress? '('+item.cityAddress+')':'')) : ''
+							item.address=item.reverseReceiveAddress ? ((item.reverseReceiveAddress.receiveAddress? item.reverseReceiveAddress.receiveAddress:'')+(item.cityAddress? '('+item.cityAddress+')':'')) : ''
 						})
 						})
 						if (this.pageNo > 1) {
 						if (this.pageNo > 1) {
 							this.list = this.list.concat(res.data.list || [])
 							this.list = this.list.concat(res.data.list || [])