优化
This commit is contained in:
		
							parent
							
								
									2312e57e82
								
							
						
					
					
						commit
						c9d35bb92e
					
				|  | @ -20,8 +20,8 @@ const install = (Vue, vm) => { | |||
| 	// 	},
 | ||||
| 	// }); 
 | ||||
| 	Vue.prototype.$u.http.setConfig({  | ||||
| 			// baseUrl: 'http://192.168.2.143:10002',
 | ||||
| 			baseUrl: 'https://kg.chuangtewl.com/prod-api', | ||||
| 			baseUrl: 'http://192.168.2.143:10002', | ||||
| 			// baseUrl: 'https://kg.chuangtewl.com/prod-api',
 | ||||
| 			// loadingText: '努力加载中~',
 | ||||
| 			// loadingTime: 1000,
 | ||||
| 			// 设置自定义头部content-type
 | ||||
|  | @ -126,7 +126,6 @@ const install = (Vue, vm) => { | |||
| 				        	}) | ||||
| 				        } | ||||
| 				    }, | ||||
| 				   | ||||
| 				}) | ||||
| 				 | ||||
| 			} | ||||
|  |  | |||
|  | @ -329,7 +329,7 @@ | |||
| 				} else { | ||||
| 					this.tcidlist.push(id); | ||||
| 				} | ||||
| 				console.log(this.tcidlist); | ||||
| 				// console.log(this.tcidlist); | ||||
| 				this.$emit('update:tcidlist', this.tcidlist) | ||||
| 			}, | ||||
| 			 | ||||
|  | @ -349,9 +349,9 @@ | |||
| 			}, | ||||
| 			 | ||||
| 			initList() { | ||||
| 				console.log(this.list,'020202'); | ||||
| 				// console.log(this.list,'020202'); | ||||
| 				let tmpList = JSON.parse(JSON.stringify(this.list)); | ||||
| 				console.log(tmpList); | ||||
| 				// console.log(tmpList); | ||||
| 				for (let i = 0, len = tmpList.length; i < len; i++) { | ||||
| 					// 组件内赋予临时id和sort | ||||
| 					if (!tmpList[i].hasOwnProperty('HMDrag_id')) { | ||||
|  |  | |||
|  | @ -5,27 +5,27 @@ | |||
| 		<view class="box"> | ||||
| 			<view class="list"> | ||||
| 				<view class="" style="display: flex; | ||||
|     justify-content: space-between; | ||||
|     width: 100%; | ||||
|     align-items: center;margin-top: 30rpx;"> | ||||
|                         justify-content: space-between; | ||||
|                         width: 100%; | ||||
|                         align-items: center;"> | ||||
| 					<view class="title"> | ||||
| 						套餐名称 | ||||
| 					</view> | ||||
| 					<input type="text" v-model="name" placeholder="输入套餐名称" /> | ||||
| 				</view> | ||||
| 				<view class="" style="display: flex; | ||||
|     justify-content: space-between; | ||||
|     width: 100%; | ||||
|     align-items: center;margin-top: 30rpx;"> | ||||
|                         justify-content: space-between; | ||||
|                         width: 100%; | ||||
|                         align-items: center;margin-top: 30rpx;"> | ||||
| 					<view class="title"> | ||||
| 						价格(元) | ||||
| 					</view> | ||||
| 					<input type="text" v-model="price" placeholder="输入价格" /> | ||||
| 				</view> | ||||
| 			<view class="" style="display: flex; | ||||
|     justify-content: space-between; | ||||
|     width: 100%; | ||||
|     align-items: center;margin-top: 30rpx;"> | ||||
|                         justify-content: space-between; | ||||
|                         width: 100%; | ||||
|                         align-items: center;margin-top: 30rpx;"> | ||||
| 				<view class="title"> | ||||
| 					通电时长 | ||||
| 				</view> | ||||
|  | @ -67,6 +67,9 @@ | |||
| 			<view v-if="title == '修改'" class="truess" @click="btndel"> | ||||
| 				删除 | ||||
| 			</view> | ||||
| 			<view v-else class="trueqx" @click="btnqx"> | ||||
| 				取消 | ||||
| 			</view> | ||||
| 		</view> | ||||
| 
 | ||||
| 	</view> | ||||
|  | @ -120,6 +123,9 @@ | |||
| 			} | ||||
| 		}, | ||||
| 		methods: { | ||||
| 			btnqx(){ | ||||
| 				uni.navigateBack() | ||||
| 			}, | ||||
| 			// bindPickerChange(e) { | ||||
| 			// 	this.index = e.detail.value | ||||
| 			// }, | ||||
|  | @ -153,22 +159,33 @@ | |||
| 				}) | ||||
| 			}, | ||||
| 			btndel() { | ||||
| 				this.$u.delete(`/app/suit/${this.suitId}`).then((res) => { | ||||
| 					if (res.code == 200) { | ||||
| 						uni.showToast({ | ||||
| 							title: '删除成功', | ||||
| 							icon: 'success', | ||||
| 							duration: 1000, | ||||
| 						}) | ||||
| 						setTimeout(() => { | ||||
| 							uni.navigateBack() | ||||
| 						}, 1000) | ||||
| 					} else { | ||||
| 						uni.showToast({ | ||||
| 							title: res.msg, | ||||
| 							icon: 'none', | ||||
| 							duration: 1000, | ||||
| 						}) | ||||
| 				let that = this | ||||
| 				uni.showModal({ | ||||
| 					title: '提示', | ||||
| 					content: '您确定要删除该套餐吗?', | ||||
| 					success: function(res) { | ||||
| 						if (res.confirm) { | ||||
| 							that.$u.delete(`/app/suit/${that.suitId}`).then((res) => { | ||||
| 								if (res.code == 200) { | ||||
| 									uni.showToast({ | ||||
| 										title: '删除成功', | ||||
| 										icon: 'success', | ||||
| 										duration: 1000, | ||||
| 									}) | ||||
| 									setTimeout(() => { | ||||
| 										uni.navigateBack() | ||||
| 									}, 1000) | ||||
| 								} else { | ||||
| 									uni.showToast({ | ||||
| 										title: res.msg, | ||||
| 										icon: 'none', | ||||
| 										duration: 1000, | ||||
| 									}) | ||||
| 								} | ||||
| 							}) | ||||
| 						} else if (res.cancel) { | ||||
| 				 | ||||
| 						} | ||||
| 					} | ||||
| 				}) | ||||
| 			}, | ||||
|  | @ -387,7 +404,7 @@ | |||
| 				filter: blur(0px); | ||||
| 				margin: auto; | ||||
| 				border-radius: 30rpx; | ||||
| 				padding: 15rpx 38rpx; | ||||
| 				padding: 30rpx 38rpx; | ||||
| 				box-sizing: border-box; | ||||
| 
 | ||||
| 				.title { | ||||
|  | @ -434,6 +451,21 @@ | |||
| 				color: #FFFFFF; | ||||
| 				border-radius: 50rpx; | ||||
| 			} | ||||
| 			.trueqx { | ||||
| 				width: 290rpx; | ||||
| 				height: 84rpx; | ||||
| 				background: #ccc; | ||||
| 				filter: blur(0px); | ||||
| 				text-align: center; | ||||
| 				line-height: 84rpx; | ||||
| 				position: fixed; | ||||
| 				bottom: 76rpx; | ||||
| 				right: 33%; | ||||
| 				transform: translateX(-50%); | ||||
| 				font-size: 36rpx; | ||||
| 				color: #FFFFFF; | ||||
| 				border-radius: 50rpx; | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| </style> | ||||
|  | @ -111,7 +111,7 @@ | |||
| 		methods: { | ||||
| 			handleTcidlistUpdate(newTcidlist) { | ||||
| 				// 这里是处理接收到的新 tcidlist 的地方   | ||||
| 				console.log('接收到的 tcidlist:', newTcidlist); | ||||
| 				// console.log('接收到的 tcidlist:', newTcidlist); | ||||
| 				this.tcidlist = newTcidlist | ||||
| 			}, | ||||
| 
 | ||||
|  | @ -125,7 +125,7 @@ | |||
| 						} | ||||
| 				}) | ||||
| 				let filteredArr = newSortedList.filter(item => item.suitId !== undefined) | ||||
| 				console.log("新的排列数据:", filteredArr) | ||||
| 				// console.log("新的排列数据:", filteredArr) | ||||
| 				setTimeout(() => { | ||||
| 					this.$u.put("/app/suit/sort", filteredArr).then((res) => { | ||||
| 						if (res.code == 200) { | ||||
|  | @ -152,13 +152,13 @@ | |||
| 					if (res.code == 200) { | ||||
| 						if (res.data.length > 0) { | ||||
| 							this.titaoc = res.data | ||||
| 								let uniqueSuitIds = new Set(); | ||||
| 								let uniqueSuitIds = new Set() | ||||
| 								this.list.forEach(item => { | ||||
| 									if (this.titaoc.some(titaocItem => titaocItem.sourceId === item.suitId || titaocItem.suitId === item.suitId)) { | ||||
| 										uniqueSuitIds.add(item.suitId); | ||||
| 										uniqueSuitIds.add(item.suitId) | ||||
| 									} | ||||
| 								}) | ||||
| 								this.tcidlist = Array.from(uniqueSuitIds); | ||||
| 								this.tcidlist = Array.from(uniqueSuitIds) | ||||
| 								let matchedItems = this.list.filter(item => uniqueSuitIds.has(item.suitId)) | ||||
| 								let unmatchedItems = this.list.filter(item => !uniqueSuitIds.has(item.suitId)) | ||||
| 								this.list = matchedItems.concat(unmatchedItems) | ||||
|  |  | |||
|  | @ -12,24 +12,30 @@ | |||
| 						<view class="wz">消费时间:{{item.createTime}}</view> | ||||
|         			</view> | ||||
| 					<view class="rt"> | ||||
| 						<!-- <view class="top" v-if="item.status == 2"> | ||||
| 							已支付 <u-icon name="arrow-right" color="#808080" size="20" style="margin-left: 10rpx;"></u-icon> | ||||
| 						<view class="top" v-if="item.status == 2"> | ||||
| 							已支付  | ||||
| 							<!-- <u-icon name="arrow-right" color="#808080" size="20" style="margin-left: 10rpx;"></u-icon> --> | ||||
| 						</view> | ||||
| 						<view class="top" v-if="item.status == 1"> | ||||
| 							未支付 <u-icon name="arrow-right" color="#808080" size="20" style="margin-left: 10rpx;"></u-icon> | ||||
| 							未支付  | ||||
| 							<!-- <u-icon name="arrow-right" color="#808080" size="20" style="margin-left: 10rpx;"></u-icon> --> | ||||
| 						</view> | ||||
| 						<view class="top" v-if="item.status == 3"> | ||||
| 							已退款 <u-icon name="arrow-right" color="#808080" size="20" style="margin-left: 10rpx;"></u-icon> | ||||
| 							已退款  | ||||
| 							<!-- <u-icon name="arrow-right" color="#808080" size="20" style="margin-left: 10rpx;"></u-icon> --> | ||||
| 						</view> | ||||
| 						<view class="top" v-if="item.status == 4"> | ||||
| 							已取消(用户) <u-icon name="arrow-right" color="#808080" size="20" style="margin-left: 10rpx;"></u-icon> | ||||
| 							已取消(用户)  | ||||
| 							<!-- <u-icon name="arrow-right" color="#808080" size="20" style="margin-left: 10rpx;"></u-icon> --> | ||||
| 						</view> | ||||
| 						<view class="top" v-if="item.status == 5"> | ||||
| 							已取消(系统) <u-icon name="arrow-right" color="#808080" size="20" style="margin-left: 10rpx;"></u-icon> | ||||
| 							已取消(系统)  | ||||
| 							<!-- <u-icon name="arrow-right" color="#808080" size="20" style="margin-left: 10rpx;"></u-icon> --> | ||||
| 						</view> | ||||
| 						<view class="top" v-if="item.status == 6"> | ||||
| 							支付中 <u-icon name="arrow-right" color="#808080" size="20" style="margin-left: 10rpx;"></u-icon> | ||||
| 						</view> --> | ||||
| 							支付中  | ||||
| 							<!-- <u-icon name="arrow-right" color="#808080" size="20" style="margin-left: 10rpx;"></u-icon> --> | ||||
| 						</view> | ||||
| 						<view class="je" style="text-align: right;"> | ||||
| 							{{item.money}}元 | ||||
| 						</view> | ||||
|  |  | |||
|  | @ -116,6 +116,8 @@ | |||
|              | ||||
| 		}, | ||||
| 		onShow() { | ||||
| 			this.wateringList = [] | ||||
| 			this.pagenum = 1 | ||||
| 			this.getList() | ||||
| 		}, | ||||
| 		// 分享到好友(会话) | ||||
|  |  | |||
|  | @ -2,9 +2,16 @@ | |||
| 	<view class="pages"> | ||||
| 		<u-navbar title="提现记录" :border-bottom="false" :background="bgc" back-icon-color="#fff" title-color='#fff' title-size='36' | ||||
| 			height='50'></u-navbar> | ||||
| 		<view class="cards" v-for="(item,index) in list" :key="index"> | ||||
| 		<view class="cards" v-for="(item,index) in list" :key="index" @click="btntx(item.billId)"> | ||||
| 			<view class="card_left"> | ||||
| 				<view class="top">成功提现</view> | ||||
| 				<view class="top">提现 | ||||
| 				  <text style="color: rgb(233, 178, 116);" v-if="item.status == 11">(审核中)</text> | ||||
| 				  <text style="color: rgb(109, 195, 68);" v-if="item.status == 12">(审核通过)</text> | ||||
| 				  <text style="color: rgb(246, 111, 116);" v-if="item.status == 13">(已拒绝)</text> | ||||
| 				  <text style="color: rgb(109, 195, 68);" v-if="item.status == 14">(已打款)</text> | ||||
| 				  <text style="color: rgb(246, 111, 116);" v-if="item.status == 15">(打款失败)</text> | ||||
| 				  <text style="color: rgb(177, 168, 246);" v-if="item.status == 16">(打款中)</text> | ||||
| 				</view> | ||||
| 				<view class="bot"> | ||||
| 					{{item.createTime}} | ||||
| 				</view> | ||||
|  | @ -53,6 +60,11 @@ | |||
| 		    }   | ||||
| 		  }, | ||||
| 		methods: { | ||||
| 			btntx(billId){ | ||||
| 				uni.navigateTo({ | ||||
| 					url:'/page_user/mapditu/withdraw_xq?billId=' + billId | ||||
| 				}) | ||||
| 			}, | ||||
|             getDeviceList(){ | ||||
|             	this.$u.get("/app/bill/withdrawList?pageNum=1&pageSize=10").then((res) => { | ||||
|             		if (res.code == 200) { | ||||
|  |  | |||
|  | @ -16,7 +16,7 @@ | |||
| 					余额提现 | ||||
| 				</view> | ||||
| 				<view class="" style="color: #8883f0;" @click="btntxrecord"> | ||||
| 					提现明细 | ||||
| 					提现记录 | ||||
| 				</view> | ||||
| 			</view> | ||||
| 			<view class="input_box"> | ||||
|  | @ -24,12 +24,15 @@ | |||
| 					¥ | ||||
| 				</view> | ||||
| 				<view class="ipt"> | ||||
| 					 <u-input v-model="money" placeholder='输入自定义金额' placeholder-style='font-size: 24rpx;'/> | ||||
| 					 <u-input v-model="money" @input="change" placeholder='输入自定义金额' placeholder-style='font-size: 24rpx;'/> | ||||
| 				</view> | ||||
| 				<view class="altx" @click="all()"> | ||||
| 					全部提现 | ||||
| 				</view> | ||||
| 			</view> | ||||
| 			<view class="" style="color: red;font-size: 24rpx;padding-top: 30rpx;box-sizing: border-box;"> | ||||
| 				提现服务费为 ¥{{serviceRates}}  | ||||
| 			</view> | ||||
| 			<view class="tit"> | ||||
| 				<view class="" style="display: flex;"> | ||||
| 					<view class="tit_line" style="margin-top: 4rpx;"> | ||||
|  | @ -51,7 +54,7 @@ | |||
| 					</view> | ||||
| 				</view> | ||||
| 				 | ||||
| 				<view class="type_box" @click="pay(1,'3')"> | ||||
| 				<!-- <view class="type_box" @click="pay(1,'3')"> | ||||
| 					<view class="box_left"> | ||||
| 						<image style="border-radius: 50%;" src="https://api.ccttiot.com/smartmeter/img/static/umHaHtYaD540zBB7NXQ7" mode=""></image> | ||||
| 						<view class="text"> | ||||
|  | @ -61,7 +64,8 @@ | |||
| 					<view class="box_right" :class="currentindex==1?'act1':''"> | ||||
| 						<span v-if="currentindex==1" style="color: #fff;"> <u-icon style="margin-top: 22rpx;" name="checkbox-mark" color="#fff" size="28"></u-icon> </span> | ||||
| 					</view> | ||||
| 				</view> | ||||
| 				</view> --> | ||||
| 				 | ||||
| 				<!-- <view class="type_box"   @click="pay(1,'2')"> | ||||
| 					<view class="box_left"> | ||||
| 						<image src="https://api.ccttiot.com/smartmeter/img/static/uRsKrUoCa4XXCKyIMTwb" mode=""></image> | ||||
|  | @ -74,7 +78,7 @@ | |||
| 					</view> | ||||
| 				</view> --> | ||||
| 				 | ||||
| 				<view class="type_box" v-for="(item,index) in infoList.BANK_CARD" :key="index"  @click="pay(index+2,'3',item.accountNo)"> | ||||
| 				<!-- <view class="type_box" v-for="(item,index) in infoList.BANK_CARD" :key="index"  @click="pay(index+2,'3',item.accountNo)"> | ||||
| 					<view class="box_left"> | ||||
| 					<image :src="'http://bkaear.market.alicloudapi.com/banklogo/' + item.cardInfo.Icon" mode=""></image> | ||||
| 						<view class="text"> | ||||
|  | @ -84,7 +88,7 @@ | |||
| 					<view class="box_right" :class="currentindex==index+2?'act1':''"> | ||||
| 						<span v-if="currentindex==index+2"> √</span> | ||||
| 					</view> | ||||
| 				</view> | ||||
| 				</view> --> | ||||
| 			</view> | ||||
| 			<view class="btn" @click="sub()"> | ||||
| 				确认提现 | ||||
|  | @ -107,11 +111,15 @@ | |||
| 				currentindex:0, | ||||
| 				payType:1, | ||||
| 				accountNo:'', | ||||
| 				userinfo:{} | ||||
| 				 | ||||
| 				userinfo:{}, | ||||
| 				serviceType:'', | ||||
| 				serviceRate:'', | ||||
| 				serviceRates:'', | ||||
| 				sjmeoey:'' | ||||
| 			} | ||||
| 		}, | ||||
| 		onShow() { | ||||
| 			this.getfuwu() | ||||
| 			this.getinfo() | ||||
| 			this.getuserinfo() | ||||
| 		}, | ||||
|  | @ -132,6 +140,17 @@ | |||
| 		    }   | ||||
| 		  }, | ||||
| 		methods: { | ||||
| 			change(){ | ||||
| 				if(this.serviceType == 2){ | ||||
| 					this.serviceRates = this.serviceRate | ||||
| 					this.sjmeoey = Number(this.money) - Number(this.serviceRates) | ||||
| 				}else{ | ||||
| 					let qian = this.money * this.serviceRate / 100 | ||||
| 					this.serviceRates = qian | ||||
| 					this.sjmeoey = Number(this.money) - Number(this.serviceRates) | ||||
| 				} | ||||
| 
 | ||||
| 			}, | ||||
| 			// 跳转到提现记录 | ||||
| 			btntxrecord(){ | ||||
| 				uni.navigateTo({ | ||||
|  | @ -157,6 +176,28 @@ | |||
| 			}, | ||||
| 			all(){ | ||||
| 				this.money=this.userinfo.balance | ||||
| 				if(this.serviceType == 2){ | ||||
| 					this.serviceRates = this.serviceRate | ||||
| 					this.sjmeoey = Number(this.money) - Number(this.serviceRates) | ||||
| 				}else{ | ||||
| 					let qian = this.money * this.serviceRate / 100 | ||||
| 					this.serviceRates = qian | ||||
| 					this.sjmeoey = Number(this.money) - Number(this.serviceRates) | ||||
| 				} | ||||
| 			}, | ||||
| 			// 获取提现服务费 | ||||
| 			getfuwu(){ | ||||
| 				this.$u.get('/app/bill/getWithdrawService?channelId=1').then((res) => { | ||||
| 					if (res.code == 200) { | ||||
| 						this.serviceType = res.data.serviceType | ||||
| 						this.serviceRate = res.data.serviceRate | ||||
| 						if(this.serviceType == 2){ | ||||
| 							this.serviceRates = this.serviceRate | ||||
| 						}else{ | ||||
| 							this.serviceRates = 0 | ||||
| 						} | ||||
| 					} | ||||
| 				}) | ||||
| 			}, | ||||
| 			sub(){ | ||||
| 				if(this.money<20){ | ||||
|  | @ -173,12 +214,12 @@ | |||
| 					}); | ||||
| 				}else{ | ||||
| 					let data ={ | ||||
| 						// payPassword:'123456', | ||||
| 						money:this.money, | ||||
| 						arrivalAmount:this.money, | ||||
| 						serviceCharge:0, | ||||
| 						channelId:this.payType, | ||||
| 						accountNo:this.accountNo | ||||
| 						arrivalAmount:this.sjmeoey, | ||||
| 						serviceCharge:this.serviceRates, | ||||
| 						channelId:1, | ||||
| 						serviceRate:this.serviceRate , //服务费 | ||||
| 						serviceType:this.serviceType  //服务费收取方式 | ||||
| 					} | ||||
| 					this.$u.post('/app/bill/withdraw',data).then((res) => { | ||||
| 						if (res.code == 200) { | ||||
|  | @ -288,10 +329,10 @@ | |||
| 		} | ||||
| 		.ipt{ | ||||
| 			width: 60%; | ||||
| 			.u-input::placeholder { | ||||
| 			    font-size: 20px; | ||||
| 			    color: red; | ||||
| 			} | ||||
| 			// .u-input::placeholder { | ||||
| 			//     font-size: 20px; | ||||
| 			//     color: red; | ||||
| 			// } | ||||
| 		} | ||||
| 		.altx{ | ||||
| 			display: flex; | ||||
|  |  | |||
							
								
								
									
										10
									
								
								pages.json
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								pages.json
									
									
									
									
									
								
							|  | @ -98,6 +98,16 @@ | |||
| 						"navigationStyle": "custom" | ||||
| 					} | ||||
| 				}, | ||||
| 				{ | ||||
| 					"path": "mapditu/withdraw_xq", | ||||
| 					"style": { | ||||
| 						"navigationBarTitleText": "", | ||||
| 						"enablePullDownRefresh": false, | ||||
| 						"navigationBarBackgroundColor": "#3996FD", | ||||
| 						"navigationBarTextStyle": "#FFFFFF", | ||||
| 						"navigationStyle": "custom" | ||||
| 					} | ||||
| 				}, | ||||
| 				{ | ||||
| 					"path": "shouzhi", | ||||
| 					"style": { | ||||
|  |  | |||
|  | @ -30,9 +30,9 @@ | |||
| 		<view class="fd"> | ||||
| 			<!-- 刷新动画 --> | ||||
| 			<view class="shuaxin" v-if="shuaxin"> | ||||
| 				<image src="https://api.ccttiot.com/smartmeter/img/static/uoJ3GHWs14BwXetAlZTW" mode=""></image> | ||||
| 				<!-- <view class="">努力刷新中</view> --> | ||||
| 				<image src="https://api.ccttiot.com/smartmeter/img/static/uO9UFjzbzS9YlabzL4HV" mode=""></image> | ||||
| 			</view> | ||||
| 			 | ||||
| 			<view class="fd_top"> | ||||
| 				<view class="fd_da"> | ||||
| 					<view class="fd_lt" | ||||
|  | @ -91,7 +91,7 @@ | |||
| 						<view class="" style="font-size: 28rpx;color: #808080;margin-top: 30rpx;">该店铺暂无设备...</view> | ||||
| 					</view> | ||||
| 					<view class="swiper_item"> | ||||
| 						<view class="card_box" v-for="(item,index) in items.wateringList" :key="index"> | ||||
| 						<view class="card_box" v-for="(item,indexs) in items.wateringList" :key="indexs"> | ||||
| 							<view class="card"> | ||||
| 								<view class="card_left"> | ||||
| 									<view class="card_left_tit" @click="todetail(item.deviceId)"> | ||||
|  | @ -219,6 +219,8 @@ | |||
| 
 | ||||
| 				touchStartX: 0, // 触屏起始点x | ||||
| 				touchStartY: 0, // 触屏起始点y   | ||||
| 				 | ||||
| 				xiaflag:true | ||||
| 			} | ||||
| 		}, | ||||
| 		onLoad() { | ||||
|  | @ -311,11 +313,14 @@ | |||
| 					} else { | ||||
| 						console.log(deltaY) | ||||
| 						if (deltaY > 250) { | ||||
| 							this.shuaxin = true | ||||
| 							this.pagenum = 1 | ||||
| 							setTimeout(() => { | ||||
| 								this.getlist() | ||||
| 							}, 1000) | ||||
| 							if(this.xiaflag){ | ||||
| 								this.xiaflag = false | ||||
| 								this.shuaxin = true | ||||
| 								this.pagenum = 1 | ||||
| 								setTimeout(() => { | ||||
| 									this.getlist() | ||||
| 								}, 1000) | ||||
| 							} | ||||
| 						} | ||||
| 					} | ||||
| 				} | ||||
|  | @ -359,16 +364,10 @@ | |||
| 											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 | ||||
| 																}) | ||||
| 															} | ||||
| 														}) | ||||
|  | @ -534,7 +533,7 @@ | |||
| 						this.groupList = res.data.filter(item => { | ||||
| 							return item.name === '全部' | ||||
| 						}) | ||||
| 						// console.log(this.groupLists); | ||||
| 						// console.log(this.groupLists,'第一'); | ||||
| 						this.storeId = this.groupList[0].storeId | ||||
| 						this.getlist() | ||||
| 					} | ||||
|  | @ -545,6 +544,7 @@ | |||
| 				// if (this.storeId == null) { | ||||
| 					this.$u.get(`/app/device/list?pageNum=${this.pagenum}&pageSize=${this.pagesize}`).then((res) => { | ||||
| 						if (res.code == 200) { | ||||
| 							this.xiaflag = true | ||||
| 							this.shuaxin = false | ||||
| 							this.total = res.total | ||||
| 							if (res.rows.length > 0) { | ||||
|  | @ -569,7 +569,7 @@ | |||
| 								}) | ||||
| 								this.wateringList.forEach(wateringItem => {   | ||||
| 								    this.groupLists.forEach(groupItem => {   | ||||
| 								        if (groupItem.storeId !== null && wateringItem.storeId !== null && groupItem.storeId === wateringItem.storeId) {   | ||||
| 								        if (groupItem.storeId !== null && wateringItem.storeId !== null && groupItem.storeId == wateringItem.storeId) {   | ||||
| 								            if (!groupItem.wateringList.some(item => item.storeId === wateringItem.storeId)) {   | ||||
| 								                groupItem.wateringList.push(wateringItem);   | ||||
| 								            }   | ||||
|  | @ -594,18 +594,20 @@ | |||
| 								this.wateringList.forEach(wateringItem => {   | ||||
| 								    this.groupLists[0].wateringList.push(wateringItem);   | ||||
| 								}) | ||||
| 								// console.log(this.groupLists,'020202'); | ||||
| 								this.wateringList.forEach(wateringItem => {   | ||||
| 								    this.groupLists.forEach(groupItem => {   | ||||
| 								       if (groupItem.storeId !== null && wateringItem.storeId !== null && groupItem.storeId === wateringItem.storeId) {   | ||||
| 								       if (groupItem.storeId !== null && wateringItem.storeId !== null && groupItem.storeId == wateringItem.storeId) {   | ||||
| 								           groupItem.wateringList.push(wateringItem) | ||||
| 								       } | ||||
| 								    }) | ||||
| 								})  | ||||
| 								// console.log(this.groupLists) | ||||
| 								console.log(this.groupLists) | ||||
| 							}  | ||||
| 							this.isLoading = false; | ||||
| 						} else { | ||||
| 							this.shuaxin = false | ||||
| 							this.xiaflag = true | ||||
| 						} | ||||
| 					}) | ||||
| 				// } else { | ||||
|  | @ -973,7 +975,9 @@ | |||
| 				this.pagenum = 1 | ||||
| 				this.curtitidx = e.detail.current | ||||
| 				this.storeId = this.groupLists[this.curtitidx].storeId | ||||
| 				this.getlist() | ||||
| 				// if(this.curtitidx == 0){ | ||||
| 				// 	this.getlist() | ||||
| 				// } | ||||
| 			}, | ||||
| 
 | ||||
| 			getdevice() { | ||||
|  | @ -1008,6 +1012,7 @@ | |||
| 				}) | ||||
| 			}, | ||||
| 			todetail(id) { | ||||
| 				console.log(id); | ||||
| 				uni.navigateTo({ | ||||
| 					url: '/page_user/sbdetail?id=' + id | ||||
| 				}) | ||||
|  | @ -1023,18 +1028,19 @@ | |||
| </script> | ||||
| 
 | ||||
| <style lang="scss"> | ||||
| 	 | ||||
| 	.shuaxin { | ||||
| 		width: 100%; | ||||
| 		height: 110rpx; | ||||
| 		z-index: 99; | ||||
| 		animation: fadeIn 1s forwards; | ||||
| 		// animation: fadeIn 1s forwards; | ||||
| 		text-align: center; | ||||
| 
 | ||||
| 		image { | ||||
| 			width: 80rpx; | ||||
| 			height: 80rpx; | ||||
| 			transform: translateX(-50%); | ||||
| 			animation: spin 1s linear infinite; | ||||
| 			// transform: translateX(-50%); | ||||
| 			// animation: spin 1s linear infinite; | ||||
| 		} | ||||
| 
 | ||||
| 		view { | ||||
|  |  | |||
|  | @ -272,7 +272,6 @@ page{ | |||
| 			width: 750rpx; | ||||
| 			height: 352rpx; | ||||
| 			background-color: #8883F0; | ||||
| 			 | ||||
| 		} | ||||
| 		.bot_box{ | ||||
| 			position: relative; | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user