完善
This commit is contained in:
		
							parent
							
								
									765d42adaa
								
							
						
					
					
						commit
						831c4dbfc3
					
				|  | @ -122,12 +122,14 @@ | |||
| 				token: '', | ||||
| 				userImgs: '', | ||||
| 				url: '', | ||||
| 				modelid:[] | ||||
| 				modelid:[], | ||||
| 				sn:'' | ||||
| 			} | ||||
| 		}, | ||||
| 		onLoad(option) { | ||||
| 			let id = option.id | ||||
| 			this.id = id | ||||
| 			this.sn = option.sn | ||||
| 			this.getDevice(id) | ||||
| 
 | ||||
| 		}, | ||||
|  | @ -185,12 +187,12 @@ | |||
| 							if (this.modelid.some(item => item == 2)) {   | ||||
| 							    console.log('wifi');   | ||||
| 							    uni.navigateTo({   | ||||
| 							        url: '/page_components/bindsztwo?id=' + this.id   | ||||
| 							        url: '/page_components/bindsztwo?id=' + this.id  + '&sn=' + this.sn | ||||
| 							    });   | ||||
| 							} else {   | ||||
| 							    console.log('4g');   | ||||
| 							    uni.navigateTo({   | ||||
| 							        url: '/page_components/bindszthr?id=' + this.id   | ||||
| 							        url: '/page_components/bindszthr?id=' + this.id  + '&sn=' + this.sn | ||||
| 							    });   | ||||
| 							} | ||||
| 						} | ||||
|  | @ -198,11 +200,6 @@ | |||
| 				} | ||||
| 				 | ||||
| 
 | ||||
| 			}, | ||||
| 			btntiao() { | ||||
| 				uni.navigateTo({ | ||||
| 					url: '/page_components/bindsztwo?id=' + this.id | ||||
| 				}) | ||||
| 			}, | ||||
| 			btnlyqx() { | ||||
| 				this.shibaiflag = false | ||||
|  |  | |||
|  | @ -153,12 +153,14 @@ | |||
| 				isActive: [], | ||||
| 				countdown: 10, // 初始倒计时时间   | ||||
| 				intervalId: null, | ||||
| 				contwz:'' | ||||
| 				contwz:'', | ||||
| 				sn:'' | ||||
| 			} | ||||
| 		}, | ||||
| 		onLoad(option) { | ||||
| 			let id = option.id | ||||
| 			this.id = id | ||||
| 			this.sn = option.sn | ||||
| 		}, | ||||
| 		onShow() { | ||||
| 			this.wateringList = [] | ||||
|  | @ -349,6 +351,9 @@ | |||
| 											duration: 1000, | ||||
| 										}) | ||||
| 										this.getao() | ||||
| 										let data = { | ||||
| 											deviceNo: this.sn | ||||
| 										} | ||||
| 										setTimeout(() => { | ||||
| 											this.btnmsk = false | ||||
| 											uni.reLaunch({ | ||||
|  |  | |||
|  | @ -132,12 +132,14 @@ | |||
| 				token: '', | ||||
| 				userImgs: '', | ||||
| 				url: '', | ||||
| 				wifi: '' | ||||
| 				wifi: '', | ||||
| 				sn:'' | ||||
| 			} | ||||
| 		}, | ||||
| 		onLoad(option) { | ||||
| 			let id = option.id | ||||
| 			this.id = id | ||||
| 			this.sn = option.sn | ||||
| 		}, | ||||
| 		onShow() { | ||||
| 			this.wateringList = [] | ||||
|  | @ -193,7 +195,7 @@ | |||
| 			// 点击进行下一步 | ||||
| 			btnxia() { | ||||
| 				uni.navigateTo({ | ||||
| 					url: '/page_components/bindszthr?id=' + this.id | ||||
| 					url: '/page_components/bindszthr?id=' + this.id + '&sn=' + this.sn | ||||
| 				}) | ||||
| 			}, | ||||
| 			btnlyqx() { | ||||
|  |  | |||
|  | @ -146,7 +146,7 @@ | |||
| 		<!-- 防诈骗提示 --> | ||||
| 		<view class="fangswindle" v-if="swindleflag"> | ||||
| 			<image src="https://api.ccttiot.com/smartmeter/img/static/uvJcZhPixU1trBud6xTa" mode=""></image> | ||||
| 			<view class="zhixiao" @click="swindleflag = false"> | ||||
| 			<view class="zhixiao" @click="btnswindleflag"> | ||||
| 				我已知晓 | ||||
| 			</view> | ||||
| 		</view> | ||||
|  | @ -202,7 +202,8 @@ | |||
| 				swindleflag:true, | ||||
| 				phonenumber:'', | ||||
| 				mchShowBillMobile:'', | ||||
| 				telslag:false | ||||
| 				telslag:false, | ||||
| 				userId:'' | ||||
| 			} | ||||
| 		}, | ||||
| 		onLoad(option) { | ||||
|  | @ -246,6 +247,7 @@ | |||
| 					this.$u.get("/app/user/userInfo").then((res) => { | ||||
| 						if (res.code == 200) { | ||||
| 							this.phonenumber = res.data.phonenumber | ||||
| 							this.userId = res.data.userId | ||||
| 					        this.getone() | ||||
| 						} else { | ||||
| 							uni.navigateTo({ | ||||
|  | @ -279,6 +281,26 @@ | |||
| 			}) | ||||
| 		}, | ||||
| 		methods: { | ||||
| 			// 点击我已知晓 | ||||
| 			btnswindleflag(){ | ||||
| 				this.swindleflag = false | ||||
| 				if(this.userId == this.deviceobj.userId && this.deviceobj.suitList == null || this.deviceobj.suitList.length == 0){ | ||||
| 					uni.showModal({ | ||||
| 						title: '提示', | ||||
| 						content: '该设备暂无套餐,是否前去配置?', | ||||
| 						success: function(res) { | ||||
| 							if (res.confirm) { | ||||
| 								uni.navigateTo({ | ||||
| 									url: '/page_components/newtaocan' | ||||
| 								}) | ||||
| 							} else if (res.cancel) { | ||||
| 					 | ||||
| 							} | ||||
| 						} | ||||
| 					}) | ||||
| 				} | ||||
| 			}, | ||||
| 			 | ||||
| 			getzfqd(){ | ||||
| 				this.$u.get(`/app/channel/recharge/enabledList`).then(res =>{ | ||||
| 					if(res.code == 200){ | ||||
|  |  | |||
|  | @ -24,6 +24,25 @@ | |||
| 				<input type="text" style="padding-right: 28rpx;box-sizing: border-box;" v-model="name" | ||||
| 					placeholder="输入套餐名称" /> | ||||
| 			</view> | ||||
| 			<view class="feems1" style="border-radius: 0;" v-if="yjflag"> | ||||
| 				<view class="one"> | ||||
| 					<view class="feelt"> | ||||
| 						预存 | ||||
| 					</view> | ||||
| 					<view class="feert"> | ||||
| 						<input type="text" class="yj" v-model="yajinvalue" /> <text>元</text> | ||||
| 					</view> | ||||
| 				</view> | ||||
| 			</view> | ||||
| 			<view class="feems1" style="border: 0;padding-bottom: 40rpx;box-sizing: border-box;"> | ||||
| 				<view class="feelt"> | ||||
| 					套餐说明 | ||||
| 				</view> | ||||
| 				<view class="feert" style="margin-top: 16rpx;width: 600rpx;"> | ||||
| 					<!-- <input type="text" placeholder="请输入套餐说明" v-model="description" /> --> | ||||
| 					<textarea name="" id="" cols="30" rows="10" placeholder="请输入套餐说明" style="height: 100rpx" v-model="description"></textarea> | ||||
| 				</view> | ||||
| 			</view> | ||||
| 
 | ||||
| 			<view class="feebox"> | ||||
| 				<view class="feems"> | ||||
|  | @ -64,53 +83,42 @@ | |||
| 						</view> | ||||
| 					</view> | ||||
| 				</view> | ||||
| 				<view class="feemss" v-if="gmsjflag"> | ||||
| 					<view class="feelt"> | ||||
| 						<text class="txt">购买时间</text> <input type="text" v-model="duvalue" /> | ||||
|                  | ||||
| 				<view class="" style="display: flex;justify-content: space-between;margin-bottom: 20rpx;"> | ||||
| 					<view class="feems" v-if="jeflag" style="display: block;"> | ||||
| 						<view class="feelt" style="margin-bottom: 10rpx;"> | ||||
| 							单价 | ||||
| 						</view> | ||||
| 						<view class="feert" style="width: 100%;"> | ||||
| 							<input type="text" class="yj" v-model="qianvalue" /> <text>元</text> | ||||
| 						</view> | ||||
| 					</view> | ||||
| 					<view class="feert"> | ||||
| 						<view class=""> | ||||
| 							<u-radio-group v-model="valuethr" @change="radioGroupChangetime"> | ||||
| 								<u-radio @change="radioChangetime" v-for="(item, index) in gmsj" :key="index" | ||||
| 									active-color="#8883f0" :name="item.name" :disabled="item.disabled"> | ||||
| 									{{item.name}} | ||||
| 								</u-radio> | ||||
| 							</u-radio-group> | ||||
| 					<view class="feemss" v-if="gmsjflag" style="max-width: 430rpx;padding-left: 50rpx;box-sizing: border-box;"> | ||||
| 						<view class="feelt" style="display: block;"> | ||||
| 							<text class="txt" style="width: 60rpx;margin-bottom: 10rpx;">时间</text> <input type="text" v-model="duvalue" /> | ||||
| 						</view> | ||||
| 						<view class="feert" style="margin-top: 80rpx;margin-left: 0;"> | ||||
| 							<view class=""> | ||||
| 								<u-radio-group v-model="valuethr" @change="radioGroupChangetime"> | ||||
| 									<u-radio @change="radioChangetime" v-for="(item, index) in gmsj" :key="index" | ||||
| 										active-color="#8883f0" :name="item.name" :disabled="item.disabled"> | ||||
| 										{{item.name}} | ||||
| 									</u-radio> | ||||
| 								</u-radio-group> | ||||
| 							</view> | ||||
| 						</view> | ||||
| 					</view> | ||||
| 					<view class="feems" v-if="duflag" style="display: block;padding-left: 50rpx;box-sizing: border-box;"> | ||||
| 						<view class="feelt" style="margin-bottom: 10rpx;"> | ||||
| 							购买度数 | ||||
| 						</view> | ||||
| 						<view class="feert"> | ||||
| 							<input type="text" class="yj" v-model="duvalue" /> <text>度</text> | ||||
| 						</view> | ||||
| 					</view> | ||||
| 				</view> | ||||
| 				<view class="feems" v-if="duflag"> | ||||
| 					<view class="feelt"> | ||||
| 						购买度数 | ||||
| 					</view> | ||||
| 					<view class="feert"> | ||||
| 						<input type="text" class="yj" v-model="duvalue" /> <text>度</text> | ||||
| 					</view> | ||||
| 				</view> | ||||
| 				<view class="feems" v-if="yjflag"> | ||||
| 					<view class="feelt"> | ||||
| 						押金 | ||||
| 					</view> | ||||
| 					<view class="feert"> | ||||
| 						<input type="text" class="yj" v-model="yajinvalue" /> <text>元</text> | ||||
| 					</view> | ||||
| 				</view> | ||||
| 				<view class="feems" v-if="jeflag"> | ||||
| 					<view class="feelt"> | ||||
| 						金额 | ||||
| 					</view> | ||||
| 					<view class="feert"> | ||||
| 						<input type="text" class="yj" v-model="qianvalue" /> <text>元</text> | ||||
| 					</view> | ||||
| 				</view> | ||||
| 				<view class="feems" style="border: 0;"> | ||||
| 					<view class="feelt"> | ||||
| 						详细说明 | ||||
| 					</view> | ||||
| 					<view class="feert"> | ||||
| 						<input type="text" placeholder="请输入详细说明" v-model="description" /> | ||||
| 					</view> | ||||
| 				</view> | ||||
| 				 | ||||
| 				<text style="font-size: 24rpx;color: #999;">消费金额为单价的倍数,结束订单后将返回剩余预存款</text> | ||||
| 			</view> | ||||
| 			<view class="batterybox" v-if="djflag"> | ||||
| 				<view class="dianj"> | ||||
|  | @ -295,7 +303,7 @@ | |||
| 			 		<view class="">剩余时长</view> <input type="text" v-model="powes" style="text-align: right;width: 380rpx;" placeholder="低于该值将结束订单并断电"/>分钟 | ||||
| 			 	</view> | ||||
| 			 	<view class="" style="color: #FF4444;margin-top: 20rpx;"> | ||||
| 			 	    该功能仅在在线状态下才能正常使用! | ||||
| 			 	    仅限于语音版设备并在线状态才能正常使用! | ||||
| 			 	</view> | ||||
| 			  </view> | ||||
| 			  | ||||
|  | @ -327,16 +335,6 @@ | |||
| 
 | ||||
| 		<view v-if="btnmsk" style="width: 100%;height: 100vh;position: fixed;top: 0;left: 0;background-color: #000;opacity: .1;z-index: 98;"> | ||||
| 		</view> | ||||
| 		 | ||||
| 		<!-- 弹出框 --> | ||||
| 		<!-- <view class="tishi" style="width: 100%;height: 100%;background-color: #fff;position: fixed;top: 0;left: 0;z-index: 99;" v-if="contwzflag"> | ||||
| 			<view class="" style="margin-top: 180rpx;padding: 30rpx;box-sizing: border-box;overflow: scroll;height: 80vh;font-size: 32rpx;" v-html="contwz"> | ||||
| 				 | ||||
| 			</view> | ||||
| 			<view @click="btnzx" class="btnzd" style="width: 650rpx;height: 90rpx;text-align: center;line-height: 90rpx;background-color: #8883F0;color: #fff;font-size: 36rpx;border-radius: 50rpx;margin: auto;"> | ||||
| 				我已知晓 | ||||
| 			</view> | ||||
| 		</view> -->	 | ||||
| 
 | ||||
| 	</view> | ||||
| </template> | ||||
|  | @ -522,16 +520,6 @@ | |||
| 					} | ||||
| 				}) | ||||
| 			}, | ||||
| 			// 点击我已知晓 | ||||
| 			btnzx(){ | ||||
| 				this.$u.put(`/app/user/readMchLicence`).then((res) => { | ||||
| 					if (res.code == 200) { | ||||
| 						this.getuser() | ||||
| 						this.btnmsk = false | ||||
| 						this.contwzflag = false | ||||
| 					} | ||||
| 				}) | ||||
| 			}, | ||||
| 			// 获取用户信息 | ||||
| 			getuser(){ | ||||
| 				this.$u.get("/app/user/userInfo").then((res) => { | ||||
|  | @ -549,7 +537,7 @@ | |||
| 				let regexs = /^\d+$/ | ||||
| 				if (this.description == '') { | ||||
| 					uni.showToast({ | ||||
| 						title: '详细说明不能为空', | ||||
| 						title: '套餐说明不能为空', | ||||
| 						icon: 'none', | ||||
| 						duration: 1000, | ||||
| 					}) | ||||
|  | @ -1070,7 +1058,53 @@ | |||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
|   .feems1 { | ||||
|    | ||||
|   	padding-bottom: 20rpx; | ||||
|   	box-sizing: border-box; | ||||
|     background: #fff; | ||||
|     width: 654rpx; | ||||
|     margin: auto; | ||||
| 	padding: 15rpx 24rpx; | ||||
|     // margin-top: 20rpx; | ||||
|     border-radius:0 0 20rpx 20rpx; | ||||
| 	.one{ | ||||
| 		display: flex; | ||||
| 		align-items: center; | ||||
| 	} | ||||
|   	.feert { | ||||
|   		width: 430rpx; | ||||
|   		display: flex; | ||||
|   		align-items: center; | ||||
|    | ||||
|   		.yj { | ||||
|   			width: 172rpx; | ||||
|   			height: 58rpx; | ||||
|   			background: #D8D8D8; | ||||
|   			border-radius: 6rpx 6rpx 6rpx 6rpx; | ||||
|   			// padding-left: 30rpx; | ||||
|   			text-align: center; | ||||
|   			box-sizing: border-box; | ||||
|   			margin-right: 20rpx; | ||||
|   		} | ||||
|   	} | ||||
|    | ||||
|   	.feelt { | ||||
|   		width: 174rpx; | ||||
|   		height: 42rpx; | ||||
|   		font-size: 30rpx; | ||||
|   		color: #000000; | ||||
|    | ||||
|   		input { | ||||
|   			width: 172rpx; | ||||
|   			height: 58rpx; | ||||
|   			background: #D8D8D8; | ||||
|   			border-radius: 6rpx 6rpx 6rpx 6rpx; | ||||
|   			text-align: center; | ||||
|   			margin-right: 20rpx; | ||||
|   		} | ||||
|   	} | ||||
|   } | ||||
| 	.feebox { | ||||
| 		width: 654rpx; | ||||
| 		max-height: 100%; | ||||
|  | @ -1307,7 +1341,7 @@ | |||
| 				margin-top: 24rpx; | ||||
| 				background: #FFFFFF; | ||||
| 				box-shadow: 0rpx 16rpx 40rpx 0rpx rgba(42, 130, 228, 0.1); | ||||
| 				border-radius: 20rpx; | ||||
| 				border-radius: 20rpx 20rpx 0 0; | ||||
| 				display: flex; | ||||
| 				padding-left: 28rpx; | ||||
| 				box-sizing: border-box; | ||||
|  |  | |||
|  | @ -373,8 +373,7 @@ | |||
| 									that.$u.get(`/app/device/${id}/withSuitList`).then((res) => { | ||||
| 										if (res.code == 200) { | ||||
| 											uni.navigateTo({ | ||||
| 												url: '/page_components/fuwu/index?id=' + | ||||
| 													id | ||||
| 												url: '/page_components/fuwu/index?id=' + id | ||||
| 											}) | ||||
| 										} | ||||
| 									}) | ||||
|  | @ -384,19 +383,19 @@ | |||
| 										content: '该设备未绑定,你需进行绑定吗?', | ||||
| 										success: function(res) { | ||||
| 											if (res.confirm) { | ||||
| 												that.$u.put("/app/device/bind", data).then( | ||||
| 													res => { | ||||
| 												// that.$u.get(`/app/device/${id}/bySn`).then((res) => { | ||||
| 												// 	if (res.code == 200) { | ||||
| 												// 		uni.navigateTo({ | ||||
| 												// 			url: '/page_components/bindsz?id=' + res.data.deviceId + '&sn=' + id | ||||
| 												// 		}) | ||||
| 												// 	} | ||||
| 												// }) | ||||
| 												that.$u.put("/app/device/bind", data).then(res => { | ||||
| 														if (res.code == 200) { | ||||
| 															that.$u.get( | ||||
| 																`/app/device/${id}/bySn` | ||||
| 															).then((res) => { | ||||
| 																if (res.code == | ||||
| 																	200) { | ||||
| 															that.$u.get(`/app/device/${id}/bySn`).then((res) => { | ||||
| 																if (res.code == 200) { | ||||
| 																	uni.navigateTo({ | ||||
| 																		url: '/page_components/bindsz?id=' + | ||||
| 																			res | ||||
| 																			.data | ||||
| 																			.deviceId | ||||
| 																		url: '/page_components/bindsz?id=' + res.data.deviceId | ||||
| 																	}) | ||||
| 																} | ||||
| 															}) | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user