zhangdan 4 năm trước cách đây
mục cha
commit
b8499e1432

+ 11 - 11
pages/index/index.vue

@@ -28,29 +28,29 @@
 			<view class="bottom-statistics">
 			<view class="bottom-statistics">
 				<view class="statistics-rubbishType">
 				<view class="statistics-rubbishType">
 					<view class="statistics-box" v-if="rubbishPaperList.length">
 					<view class="statistics-box" v-if="rubbishPaperList.length">
-						<view class="rubbishType-type"><span class="t-icon t-icon-home_icon_paper" style="display: inline-block;margin: 0 10upx;"></span>{{rubbishPaperName ? rubbishPaperName :''}}</view>
+						<view class="rubbishType-type"><span class="t-icon t-icon-home_icon_paper" style="display: inline-block;margin-right:10upx;"></span>{{rubbishPaperName ? rubbishPaperName :''}}</view>
 						<view v-for="item in rubbishPaperList" class="rubbishType-item">
 						<view v-for="item in rubbishPaperList" class="rubbishType-item">
-							<view>{{item.name ? item.name+':' :''}}{{item.customerPrice ? (item.customerPrice/1000).toFixed(2)/1 :0}} 元/kg</view>
+							<span>{{item.name ? item.name+':' :''}}</span><span>{{item.customerPrice ? (item.customerPrice).toFixed(2)/1 :0}} 元/kg</span>
 						</view>
 						</view>
 					</view>
 					</view>
 					<view class="statistics-box" v-if="rubbishYWList.length">
 					<view class="statistics-box" v-if="rubbishYWList.length">
-						<view class="rubbishType-type"><span class="t-icon t-icon-home_icon_clothing" style="display: inline-block;margin: 0 10upx;"></span>{{rubbishYWName ? rubbishYWName :''}}</view>
+						<view class="rubbishType-type"><span class="t-icon t-icon-home_icon_clothing" style="display: inline-block;margin-right:10upx;"></span>{{rubbishYWName ? rubbishYWName :''}}</view>
 						<view v-for="item in rubbishYWList" class="rubbishType-item">
 						<view v-for="item in rubbishYWList" class="rubbishType-item">
-							<view>{{item.name ? item.name+':' :''}}{{item.customerPrice ? (item.customerPrice/1000).toFixed(2)/1 :0}} 元/kg</view>
+							<view>{{item.name ? item.name+':' :''}}{{item.customerPrice ? (item.customerPrice).toFixed(2)/1 :0}} 元/kg</view>
 						</view>
 						</view>
 					</view>
 					</view>
 				</view>
 				</view>
 				<view class="statistics-rubbishType">
 				<view class="statistics-rubbishType">
 					<view class="statistics-box" v-if="rubbishSLList.length">
 					<view class="statistics-box" v-if="rubbishSLList.length">
-						<view class="rubbishType-type"><span class="t-icon t-icon-home_icon_plastic" style="display: inline-block;margin: 0 10upx;"></span>{{rubbishSLName ? rubbishSLName :''}}</view>
+						<view class="rubbishType-type"><span class="t-icon t-icon-home_icon_plastic" style="display: inline-block;margin-right:10upx;"></span>{{rubbishSLName ? rubbishSLName :''}}</view>
 						<view v-for="item in rubbishSLList" class="rubbishType-item">
 						<view v-for="item in rubbishSLList" class="rubbishType-item">
-							<view>{{item.name ? item.name+':' :''}}{{item.customerPrice ? (item.customerPrice/1000).toFixed(2)/1 :0}} 元/kg</view>
+							<view>{{item.name ? item.name+':' :''}}{{item.customerPrice ? (item.customerPrice).toFixed(2)/1 :0}} 元/kg</view>
 						</view>
 						</view>
 					</view>
 					</view>
 					<view class="statistics-box" v-if="rubbishJSList.length">
 					<view class="statistics-box" v-if="rubbishJSList.length">
-						<view class="rubbishType-type"><span class="t-icon t-icon-home_icon_metal" style="display: inline-block;margin: 0 10upx;"></span>{{rubbishJSName ? rubbishJSName :''}}</view>
+						<view class="rubbishType-type"><span class="t-icon t-icon-home_icon_metal" style="display: inline-block;margin-right:10upx;"></span>{{rubbishJSName ? rubbishJSName :''}}</view>
 						<view v-for="item in rubbishJSList" class="rubbishType-item">
 						<view v-for="item in rubbishJSList" class="rubbishType-item">
-							<view>{{item.name ? item.name+':' :''}}{{item.customerPrice ? (item.customerPrice/1000).toFixed(2)/1 :0}} 元/kg</view>
+							<view>{{item.name ? item.name+':' :''}}{{item.customerPrice ? (item.customerPrice).toFixed(2)/1 :0}} 元/kg</view>
 						</view>
 						</view>
 					</view>
 					</view>
 				</view>
 				</view>
@@ -306,7 +306,7 @@
 						.statistics-box{
 						.statistics-box{
 							margin-bottom:30upx ;
 							margin-bottom:30upx ;
 							background-color: #fff;
 							background-color: #fff;
-							padding: 20upx;
+							padding: 20upx 10upx 20upx 20upx;
 							border-radius:16upx;
 							border-radius:16upx;
 						}
 						}
 						.statistics-box:last-child{
 						.statistics-box:last-child{
@@ -316,7 +316,7 @@
 					.rubbishType-type{
 					.rubbishType-type{
 						display: flex;
 						display: flex;
 						align-items: center;
 						align-items: center;
-						justify-content: center;
+						justify-content: flex-start;
 						font-size: 28upx;
 						font-size: 28upx;
 						font-family: PingFang SC;
 						font-family: PingFang SC;
 						font-weight: 400;
 						font-weight: 400;
@@ -324,7 +324,7 @@
 					}
 					}
 					.rubbishType-item{
 					.rubbishType-item{
 						display: flex;
 						display: flex;
-						justify-content: center;
+						justify-content: flex-start;
 						margin:10upx 0 ;
 						margin:10upx 0 ;
 						font-size: 26upx;
 						font-size: 26upx;
 						font-family: PingFang SC;
 						font-family: PingFang SC;

+ 9 - 11
pages/index/userInfo.vue

@@ -20,7 +20,7 @@
 							<u-input placeholder="请选择通讯地址" v-model="form.contactAddress" @click="selectAddress" :disabled="true"/>
 							<u-input placeholder="请选择通讯地址" v-model="form.contactAddress" @click="selectAddress" :disabled="true"/>
 							<u-icon name="arrow-right" slot="right"></u-icon>
 							<u-icon name="arrow-right" slot="right"></u-icon>
 						</u-form-item>
 						</u-form-item>
-						<u-form-item prop="houseAddress" label="详细信息:" >
+						<u-form-item prop="houseAddress" label="详细信息:" required>
 							<u-input placeholder="请输入详细信息" v-model="form.houseAddress"/>
 							<u-input placeholder="请输入详细信息" v-model="form.houseAddress"/>
 						</u-form-item>
 						</u-form-item>
 				</u-form>
 				</u-form>
@@ -111,7 +111,7 @@
 						this.form.contactName=res.data.contactName
 						this.form.contactName=res.data.contactName
 						this.form.contactAddress=res.data.contactAddress
 						this.form.contactAddress=res.data.contactAddress
 						this.form.houseAddress=res.data.houseAddress
 						this.form.houseAddress=res.data.houseAddress
-						this.imageHeader=res.data.imageHeader
+						this.photograph=res.data.imageHeader.split()
 						this.form.lat=res.data.latitude
 						this.form.lat=res.data.latitude
 						this.form.lng=res.data.longitude
 						this.form.lng=res.data.longitude
 						console.log(res,'------------------------res')
 						console.log(res,'------------------------res')
@@ -138,15 +138,6 @@
 					}
 					}
 				})
 				})
 			},
 			},
-			// 选择用户类型
-			// selectTime(){
-			// 	wx.hideKeyboard()
-			// 	setTimeout(()=>{
-			// 		this.show=true
-			// 	},500)
-				
-				
-			// },
 			confirm(e) {
 			confirm(e) {
 				console.log(e);
 				console.log(e);
 				this.form.time=e[0].label + e[1].label
 				this.form.time=e[0].label + e[1].label
@@ -236,6 +227,13 @@
 							})
 							})
 							return false
 							return false
 						}
 						}
+						if (this.form.houseAddress ==='') {
+							uni.showToast({
+								title: '请输入详细地址',
+								icon: 'none'
+							})
+							return false
+						}
 						const params=this.form
 						const params=this.form
 						if(this.photograph){
 						if(this.photograph){
 							params.imageHeader=this.imageHeader
 							params.imageHeader=this.imageHeader

+ 4 - 1
pages/index/yuyue.vue

@@ -143,7 +143,7 @@
 		},
 		},
 		onLoad(option) {
 		onLoad(option) {
 			console.log(option,option.pageType,'ppppppppp')
 			console.log(option,option.pageType,'ppppppppp')
-			this.pageInfo()
+			// this.pageInfo()
 			// if(!option.pageType){
 			// if(!option.pageType){
 			// 	this.pageInfo()
 			// 	this.pageInfo()
 			// }
 			// }
@@ -172,6 +172,9 @@
 				this.getRiderStatus()
 				this.getRiderStatus()
 			},300)
 			},300)
 		},
 		},
+		onShow() {
+			this.pageInfo()
+		},
 		onUnload() {
 		onUnload() {
 		},
 		},
 		watch:{
 		watch:{