zhangdan 4 anos atrás
pai
commit
f9c51b154f
3 arquivos alterados com 35 adições e 62 exclusões
  1. 1 1
      App.vue
  2. 25 53
      pages/index/index.vue
  3. 9 8
      pages/index/userInfo.vue

+ 1 - 1
App.vue

@@ -1,6 +1,6 @@
 <script>
 	const uat_domain = 'https://cust.test.sxzxyj.net' // 预发布
-	// const uat_domain = 'http://192.168.16.213:8308' // 本地
+	// const uat_domain = 'http://192.168.16.148:8308' // 本地
 	const pro_domain = 'https://gather.zyucgj.cn' // 生产
 	const uat_URL = uat_domain+'/gc-cust/' // 预发布
 	const pro_URL = pro_domain+'/gc-cust/'  // 生产

+ 25 - 53
pages/index/index.vue

@@ -25,7 +25,7 @@
 			</view>
 			<!-- 收回统计 -->
 			<view class="statistics-title">今日上门回收价格</view>
-			<view class="bottom-statistics" v-if="hasLogin">
+			<view class="bottom-statistics">
 				<view class="statistics-rubbishType">
 					<view class="statistics-box">
 						<view class="rubbishType-type"><span class="t-icon t-icon-home_icon_paper" style="display: inline-block;margin: 0 10upx;"></span>{{rubbishPaperName ? rubbishPaperName :''}}</view>
@@ -156,9 +156,13 @@
 				})
 			},
 			gotoYueYu(){
-				uni.navigateTo({
-				    url: '/pages/index/yuyue'
-				})
+				if(hasLogin){
+					uni.navigateTo({
+					    url: '/pages/index/yuyue'
+					})
+				}else{
+					
+				}
 			},
 			// 回收指引
 			toZY(){
@@ -166,6 +170,22 @@
 				    url: '/pages/index/zhiyin'
 				})
 			},
+			// 未登录弹窗
+			loginModal(){
+				uni.showModal({
+				  title: '提示',
+				  content: '您尚未登录或登录已过期,请登录后使用',
+				  success: (res)=> {
+				    if (res.confirm) {
+				     uni.navigateTo({
+				         url: '/pages/login/login'
+				     })
+				    } else if (res.cancel) {
+				      console.log('用户点击取消');
+				    }
+				  }
+				});
+			},
 			// 检查更新
 			checkUpdate(){
 				if (uni.canIUse('getUpdateManager')) {
@@ -200,55 +220,7 @@
 				      })
 				    }
 			},
-			// scroll-view到底部加载更多
-			onreachBottom() {
-			},
-			// 总计
-			getTotal(){
-				// this.titleStatus = true
-				// gatherTotal({
-				// 	beginDate: this.searchForm.beginDate?moment(this.searchForm.beginDate).format('YYYY-MM-DD 00:00:00'):'',
-				// 	endDate: this.searchForm.endDate ? moment(this.searchForm.endDate).format('YYYY-MM-DD 23:59:59'):''}).then(res=>{
-				// 		if(res.status==200){
-				// 			const a = res.data.find(item=>item.rubbishType=='GATHER_BUILDING')
-				// 			const b = res.data.find(item=>item.rubbishType=='GATHER_OTHER')
-				// 			const c = res.data.find(item=>item.rubbishType=='GATHER_KITCHEN')
-				// 			this.jianzhuTotal= a ? (a.rubbishWeight/1000).toFixed(3)/1 : '0'
-				// 			this.chuyuTotal= c ? (c.rubbishWeight/1000).toFixed(3)/1 : '0'
-				// 			this.otherTotal= b ? (b.rubbishWeight/1000).toFixed(3)/1 : '0'
-				// 		}
-				// 	console.log(res)
-				// 	this.titleStatus = false
-				// })
-			},
-			// 打开垃圾数据录入页面
-			intoPage(item) {
-				// const flag=item ? item.gatherId : ''
-				// console.log(flag,'---------hangid,;;;;')
-				// let url = flag ? `/pages/index/addData?id=${flag}` : `/pages/index/addData`
-				// // uni.navigateTo({
-				// //     url: url
-				// // })
-				// if(!this.hasLogin){
-				// 	uni.showModal({
-				// 	  title: '提示',
-				// 	  content: '您尚未登录或登录已过期,请登录后使用',
-				// 	  success: (res)=> {
-				// 	    if (res.confirm) {
-				// 	     uni.navigateTo({
-				// 	         url: '/pages/login/login'
-				// 	     })
-				// 	    } else if (res.cancel) {
-				// 	      console.log('用户点击取消');
-				// 	    }
-				// 	  }
-				// 	});
-				// } else {
-				// 	uni.navigateTo({
-				// 	    url: url
-				// 	})
-				// }
-			}
+		
 		}
 	}
 </script>

+ 9 - 8
pages/index/userInfo.vue

@@ -3,8 +3,8 @@
 		<view class="content-form">
 			<view class="form-data">
 				<u-form :model="form" ref="uForm" :label-width="140" :error-type="['toast']">
-						<u-form-item prop="addressType" label="用户类型:" required>
-							<v-select ref="addressType" placeholder="请选择用户类型" @itemChange="chooseType" code="ORDER_ADDRESS_TYPE" style="width: 100%"></v-select>	
+						<u-form-item prop="addressType" label="用户类型:" required >
+							<v-select ref="addressType" placeholder="请选择用户类型" @itemChange="chooseType" code="ORDER_ADDRESS_TYPE" style="width: 100%" :disabled="true"></v-select>	
 						</u-form-item>
 						<u-form-item prop="contactName" label="用户名称:" required>
 							<u-input placeholder="请输入用户名称"  v-model="form.contactName"/>
@@ -120,6 +120,7 @@
 			},
 			// 选择用户类型
 			chooseType(v){
+				wx.hideKeyboard()
 				this.form.addressType = v
 			},
 			selectAddress(){
@@ -138,14 +139,14 @@
 				})
 			},
 			// 选择用户类型
-			selectTime(){
-				wx.hideKeyboard()
-				setTimeout(()=>{
-					this.show=true
-				},500)
+			// selectTime(){
+			// 	wx.hideKeyboard()
+			// 	setTimeout(()=>{
+			// 		this.show=true
+			// 	},500)
 				
 				
-			},
+			// },
 			confirm(e) {
 				console.log(e);
 				this.form.time=e[0].label + e[1].label