فهرست منبع

1、马铃薯
2、毫米测报灯

zhangsijie 1 سال پیش
والد
کامیت
a0876ed5e6

+ 1 - 1
App.vue

@@ -6,7 +6,7 @@
 		},
 		},
 		onHide: function() {
 		onHide: function() {
 			console.log('App Hide')
 			console.log('App Hide')
-		},
+		}
 	}
 	}
 </script>
 </script>
 <style lang="scss">
 <style lang="scss">

+ 56 - 1
pages.json

@@ -671,7 +671,16 @@
 		        "navigationBarTitleText": "设备详情",
 		        "navigationBarTitleText": "设备详情",
 		        "enablePullDownRefresh": false
 		        "enablePullDownRefresh": false
 		    }
 		    }
-		}
+		},{
+            "path" : "pages/cb/zjxydetail/photolist",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "图片列表",
+                "enablePullDownRefresh": false,
+				"navigationStyle": "custom"
+            }
+            
+        }
 		,{
 		,{
 		    "path" : "pages/cb/xctdetail/xctdetail",
 		    "path" : "pages/cb/xctdetail/xctdetail",
 		    "style" :                                                                                    
 		    "style" :                                                                                    
@@ -813,6 +822,52 @@
         	{
         	{
         		"navigationBarTitleText" : "详情"
         		"navigationBarTitleText" : "详情"
         	}
         	}
+        },
+        {
+        	"path" : "pages/disease/mls/mls",
+        	"style" : 
+        	{
+        		"navigationBarTitleText" : "马铃薯晚疫病详情页"
+				// "navigationStyle": "custom"
+        	}
+        },
+        {
+        	"path" : "pages/disease/mls/forecastResult",
+        	"style" : 
+        	{
+        		"navigationBarTitleText" : "防控决策"
+				// "navigationStyle": "custom"
+        	}
+        },
+        {
+        	"path" : "pages/cb/smallPest/smallPest",
+        	"style" : 
+        	{
+        		"navigationBarTitleText" : "毫米虫情测报"
+        	}
+        },
+        {
+        	"path" : "pages/cb/smallPest/analyse",
+        	"style" : 
+        	{
+        		"navigationBarTitleText" : "虫情分析"
+        	}
+        },
+        {
+        	"path" : "pages/cb/smallPest/photolist",
+        	"style" : 
+        	{
+        		"navigationBarTitleText" : "图片列表",
+				"navigationStyle": "custom"
+        	}
+        },
+        {
+        	"path" : "pages/cb/smallPest/xctset",
+        	"style" : 
+        	{
+        		"navigationBarTitleText" : "设备控制"
+				// "navigationStyle": "custom"
+        	}
         }
         }
     ],
     ],
 	"condition": { //模式配置,仅开发期间生效
 	"condition": { //模式配置,仅开发期间生效

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1064 - 0
pages/cb/smallPest/analyse.vue


+ 278 - 0
pages/cb/smallPest/photolist.vue

@@ -0,0 +1,278 @@
+<template>
+	<view>
+		<view class="status_bar"></view>
+		<view class="" style="position: relative;top: 44px;">
+			<view style="position: fixed;z-index: 100;">
+				<uni-nav-bar @clickLeft="clickLeft" left-icon="back" title="查看图片" rightIcon="camera"
+					@clickRight="clickRight"></uni-nav-bar>
+			</view>
+			<!-- <p class="tishi" v-if="tishi">暂无数据</p> -->
+			<view class="selecttimes" @click="tiemshow=!tiemshow">
+				<view class="timesbox">
+					<image
+						:src="'http://www.hnyfwlw.com:8006/bigdata_app'+'/image/prevention/1acfe2751c01d3786cdc49b83d7e505.png'"
+						mode=""></image>
+					<p>{{timetab(timestate)}}</p>
+					<p class="or">~</p>
+					<p>{{timetab(timeend)}}</p>
+					<u-icon name="rili" custom-prefix="custom-icon" class="icon"></u-icon>
+				</view>
+				<u-calendar v-model="tiemshow" mode="range" @change="tiemchange"></u-calendar>
+			</view>
+			<view class="imglist">
+				<view class="imglist_box" v-for="(item,index) in imglists" :key="index">
+					<view class="imglist_left">
+						<image src="http://www.hnyfwlw.com:8006/bigdata_app/image/cb/jiazai.ui.gif" mode="">
+						</image>
+						<image :src="item.addr" mode="" @click="examine(index)"></image>
+					</view>
+					<view class="imglist_right">
+						<view class="">
+							{{item.time}}
+						</view>
+						<view class="">
+							害虫数量:{{item.pest_counts}}
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="top" v-if="isTop" @click="top">
+			<image :src="'http://www.hnyfwlw.com:8006/bigdata_app'+'/image/6209a98f0cb3b5086f2ca36152c9269.png'"
+				mode=""></image>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				tiemshow:false,
+				timestate:"",
+				timeend:"",
+				isTop:false,
+				imglists:[],
+				device_id:"",
+				page:1,
+				d_id:""
+			}
+		},
+		methods: {
+			clickLeft(){
+				uni.navigateBack({
+					delta:1
+				})
+			},
+			clickRight(){
+				this.takephoto()
+			},
+			timetab(e) {
+				e = new Date(e * 1000)
+				var year = e.getFullYear()
+				var month = e.getMonth() + 1 < 10 ? "0" + (e.getMonth() + 1) : e.getMonth() + 1
+				var day = e.getDate() < 10 ? "0" + e.getDate() : e.getDate()
+				var time = year + "/" + month + "/" + day
+				return time
+			},
+			examine(index){
+				var imgarr = []
+				for (var i = 0; i < this.imglists.length; i++) {
+					imgarr.push(this.imglists[i].addr)
+				}
+				uni.previewImage({
+					urls: imgarr,
+					current: index
+				});
+			},
+			async getimglist(){
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=forecast.forecast_system.device_photo_list',
+					data: {
+						cmd: "cbd_XCT",
+						device_id: this.device_id,
+						page: this.page,
+						page_number: "12",
+						time_begin: Math.floor(this.timestate),
+						time_end: Math.floor(this.timeend),
+					}
+				})
+				console.log(res)
+				this.imglists = res.data
+			},
+			top() {
+				uni.pageScrollTo({
+					scrollTop: 0,
+					duration: 500
+				})
+			},
+			tiemchange(e){
+				// console.log(e)
+				this.imglists = []
+				this.page = 1
+				console.log(e)
+				this.timestate = +new Date(e.startDate) / 1000 - 8 * 60 * 60
+				this.timeend = +new Date(e.endDate) / 1000 + 16 * 60 * 60
+				this.getimglist()
+			},
+			async takephoto() { //拍照
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=forecast.send_control.admin_device_control',
+					data: {
+						device_type_id: 12,
+						d_id: this.d_id,
+						cmd: "takephoto"
+					}
+				})
+				console.log(res)
+				if (res == true) {
+					uni.showToast({
+						title: '指令下发成功!',
+						duration: 2000
+					});
+					var that = this
+					setTimeout(() => {
+						that.getimglist()
+					}, 1000)
+				} else {
+					uni.showToast({
+						title: '指令下发失败!',
+						duration: 2000,
+						icon: "none"
+					});
+				}
+			
+			},
+		},
+		onLoad(option) {
+			this.d_id =  option.d_id
+			this.device_id = option.device_id
+			this.timeend = +new Date() / 1000
+			this.timestate = this.timeend - 60 * 60 * 24
+			this.getimglist()
+		},
+		onReachBottom() {
+			this.page++
+			this.getimglist()
+		},
+		onPageScroll(e) { //nvue暂不支持滚动监听,可用bindingx代替
+			if (e.scrollTop > 200) { //距离大于200时显示
+				this.isTop = true
+			} else { //距离小于200时隐藏
+				this.isTop = false
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.tishi {
+		position: absolute;
+		top: 104px;
+		width: 95%;
+		left: 2.5%;
+		text-align: center;
+		font-size: 40rpx;
+	}
+
+	.selecttimes {
+		width: 100%;
+		position: fixed;
+		top: 85px;
+		left: 0;
+		z-index: 100;
+		background-color: #fff;
+		padding-top: 30rpx;
+
+		.timesbox {
+			display: flex;
+			width: 95%;
+			margin: 0 auto;
+			justify-content: space-around;
+			box-shadow: 0 0 10rpx #bcb9ca;
+			padding: 10rpx 20rpx;
+			box-sizing: border-box;
+
+			image {
+				width: 30rpx;
+				height: 30rpx;
+				margin-top: 6rpx;
+			}
+
+			.icon {
+				color: #949494;
+				text-align: right;
+				margin-left: 30rpx;
+
+			}
+		}
+
+		/deep/.u-calendar__action {
+			display: flex;
+			justify-content: space-around;
+
+			.u-calendar__action__text {
+				line-height: 25px;
+			}
+		}
+	}
+	.imglist {
+		position: absolute;
+		top: 100px;
+		width: 95%;
+		left: 2.5%;
+	
+		.imglist_box {
+			display: flex;
+			box-shadow: 0 0 10rpx #bcb9ca;
+			padding: 20rpx;
+			margin-bottom: 20rpx;
+			height: 140px;
+		}
+	
+		.imglist_left {
+			width: 50%;
+			position: relative;
+	
+			image {
+				position: absolute;
+				top: 0;
+				left: 0;
+				width: 100%;
+				height: 280rpx;
+			}
+		}
+	
+		.imglist_right {
+			margin-left: 40rpx;
+			padding: 10rpx 0;
+	
+			.icon_box {
+				margin-bottom: 12rpx;
+				font-size: 24rpx;
+	
+				.iconfont {
+					margin-right: 20rpx;
+					color: #56C877;
+					font-size: 32rpx;
+				}
+			}
+	
+			p:last-child {
+				margin-bottom: 0;
+			}
+	
+		}
+	}
+.top {
+		position: fixed;
+		right: 30px;
+		bottom: 100px;
+		z-index: 100;
+
+		image {
+			width: 100rpx;
+			height: 100rpx;
+		}
+	}
+</style>

+ 598 - 0
pages/cb/smallPest/smallPest.vue

@@ -0,0 +1,598 @@
+<template>
+	<view>
+		<view :class="['info',equipInfo.is_online==1?'on':'off']">
+			<view class="" @click="copy(equipInfo)">
+				设备ID:{{equipInfo.imei||equipInfo.device_id}}
+				<image src="http://www.hnyfwlw.com:8006/bigdata_app/image/environment/fuzhi.png" mode="" class="tishi">
+				</image>
+			</view>
+			<view class="">
+				设备名称:{{equipInfo.device_name==""?"无":equipInfo.device_name}}
+			</view>
+			<!-- <view class="">
+				设备类型:吸虫塔
+			</view> -->
+			<view class="">
+				最新上报时间:{{equipInfo.uptime||equipInfo.uptime | timeFormat}}
+			</view>
+			<view class="">
+				设备地址:{{equipInfo.address||city}}
+			</view>
+		</view>
+		<view class="caobox">
+			<view class="caobox_item" v-if="$QueryPermission(351)" @click="tophoto">
+				<image src="http://www.hnyfwlw.com:8006/bigdata_app/image/cb/1.png" mode="widthFix"></image>
+				<view class="">
+					查看图片
+				</view>
+			</view>
+			<view class="caobox_item" v-if="$QueryPermission(350)" @click="toset">
+				<image src="http://www.hnyfwlw.com:8006/bigdata_app/image/cb/4.png" mode="widthFix"></image>
+				<view class="">
+					设备控制
+				</view>
+			</view>
+			<view class="caobox_item" v-if="$QueryPermission(353)" @click="toanal">
+				<image src="http://www.hnyfwlw.com:8006/bigdata_app/image/cb/3.png" mode="widthFix"></image>
+				<view class="">
+					虫情分析
+				</view>
+			</view>
+			<view class="caobox_item" @click="simRouter">
+				<image src="http://www.hnyfwlw.com:8006/bigdata_app/image/cb/6.png" mode="widthFix"></image>
+				<view class="">
+					SIM卡
+				</view>
+			</view>
+		</view>
+		<view class="" v-if="$QueryPermission(352)">
+			<view class="">
+				历史数据
+			</view>
+			<view class="timebox">
+				<view class="firsttime" @click="timeshow=true">
+					<view class="" v-if="start_time!=''">
+						{{start_time/1000|timeFormat()}}
+					</view>
+					<view class="" v-else>
+						{{start_time==""?'请选择开始时间':start_time}}
+					</view>
+				</view>
+				<view class="jiange">
+					-
+				</view>
+				<view class="endtime" @click="timeshow=true">
+					<view class="" v-if="end_time!=''">
+						{{end_time/1000|timeFormat()}}
+					</view>
+					<view class="" v-else>
+						{{end_time==""?'请选择结束时间':end_time}}
+					</view>
+				</view>
+				<u-calendar v-model="timeshow" :mode="mode" @change="timechange"></u-calendar>
+			</view>
+			<view class="shuju_one">
+				<view class="canvastishi" v-if="!canvastishiTF && !dataloadingtf">
+					暂无数据
+				</view>
+				<view class="canvastishi" v-if="dataloadingtf">
+					<p class="dataloading">加载中</p>
+				</view>
+				<canvas v-if="canvastishiTF" canvas-id="canvasColumnA" id="canvasColumnA" class="charts"
+					@touchstart="touchLineA($event)" @touchmove="moveLineA($event)" @touchend="touchEndLineA($event)"
+					disable-scroll=true
+					:style="{'width':cWidth*pixelRatio+'px','height':cHeight*pixelRatio+'px', 'transform': 'scale('+(1/pixelRatio)+')','margin-left':-cWidth*(pixelRatio-1)/2+'px','margin-top':-cHeight*(pixelRatio-1)/2+'px'}"></canvas>
+			</view>
+			<view class="condition">
+				<scroll-view scroll-top="0" scroll-x="true" class="scroll-X">
+					<table class="table" v-if="$QueryPermission(354)">
+						<tr class="tr">
+							<th class="th" v-for="(item,index) in tableHeadTxt" :key="'a'+index">{{item}}</th>
+						</tr>
+						<tr class="tr" v-for="(items,indexs) in historylistdata" :key="'b'+indexs" v-if="!forbidden">
+							<td class="td">{{items.d_h_t.addtime|timeFormat()}}</td>
+							<td class="td">{{items.d_h_t.at}}</td>
+							<td class="td">{{items.d_h_t.ah}}</td>
+							<td class="td">{{items.d_h_t.dver}}</td>
+							<td class="td">{{items.d_h_t.nrps}}</td>
+							<td class="td">{{items.d_h_t.ntps}}</td>
+							<td class="td">{{items.d_h_t.lps}}</td>
+							<td class="td">{{items.d_h_t.lamp}}</td>
+							<td class="td">{{items.d_h_t.current}}</td>
+							<td class="td">{{items.d_h_t.vbat}}</td>
+							<td class="td">{{items.d_h_t.lng}}</td>
+							<td class="td">{{items.d_h_t.lat}}</td>
+						</tr>
+						<tr class="tr" v-if="forbidden">
+							<td class="td" v-for="item in 9">暂无数据</td>
+						</tr>
+					</table>
+					<table class="table" v-else>
+						<tr class="tr">
+							<th class="th" v-for="(item,index) in tableHeadTxt2" :key="'a'+index">{{item}}</th>
+						</tr>
+						<tr class="tr" v-for="(items,indexs) in historylistdata" :key="'b'+indexs" v-if="!forbidden">
+							<td class="td">{{items.d_h_t.addtime|timeFormat()}}</td>
+							<td class="td">{{items.d_h_t.at}}</td>
+							<td class="td">{{items.d_h_t.ah}}</td>
+							<td class="td">{{items.d_h_t.dver}}</td>
+							<td class="td">{{items.d_h_t.lps}}</td>
+							<td class="td">{{items.d_h_t.lng}}</td>
+							<td class="td">{{items.d_h_t.lat}}</td>
+						</tr>
+						<tr class="tr" v-if="forbidden">
+							<td class="td" v-for="item in 7">暂无数据</td>
+						</tr>
+					</table>
+				</scroll-view>
+				<view class="pagenumber">
+					<button @click="prev">上一页</button>
+					<view class="pagenumber_page">
+						第 {{page}} 页
+					</view>
+					<view class="pagenumber_page">
+						共 {{pagesum}} 页
+					</view>
+					<button @click="next" :disabled="forbidden">下一页</button>
+				</view>
+			</view>
+		</view>
+		<view class="" v-else>
+			暂无数据
+		</view>
+	</view>
+</template>
+
+<script>
+	import uCharts from '../../../components/js_sdk/u-charts/u-charts/u-charts.js';
+	// import Circulation from "../../../static/js/equipState_dict.json"
+	var canvaColumnA = null;
+	export default {
+		data() {
+			return {
+				equipInfo: {},
+				canvastishiTF: false,
+				dataloadingtf: false,
+				cWidth: '400',
+				cHeight: '400',
+				pixelRatio: 1,
+				start_time: "",
+				end_time: "",
+				timeshow: false,
+				mode: 'range',
+				historydatas: [],
+				tableHeadTxt: [
+					"上报时间",
+					"环境温度(°C)",
+					"环境湿度(%)",
+					"版本号",
+					"雨控状态",
+					"温控状态",
+					"光控状态",
+					"灯管状态",
+					"电流(mA)",
+					"电压(V)",
+					"经度",
+					"纬度",
+
+				],
+				tableHeadTxt2: [
+					"上报时间",
+					"环境温度(°C)",
+					"环境湿度(%)",
+					"版本号",
+					"光控状态",
+					"经度",
+					"纬度",
+				],
+				historylistdata: [],
+				pagesum: 10,
+				page: 1,
+				forbidden: false
+			}
+		},
+		methods: {
+			copy(item) {
+				console.log(item)
+				uni.setClipboardData({
+					data: item.imei || item.device_id,
+					success: function() {
+						console.log('success');
+					}
+				});
+			},
+			toset() {
+				uni.navigateTo({
+					url: "./xctset?device_id=" + this.equipInfo.imei + "&d_id=" + this.equipInfo.d_id + "&dtype=" +
+						this.equipInfo.dtype +
+						"&device_name=" + this.equipInfo.device_name
+				})
+			},
+			tophoto() {
+				uni.navigateTo({
+					url: "./photolist?device_id=" + this.equipInfo.imei + "&d_id=" + this.equipInfo.d_id
+				})
+			},
+			toanal() {
+				uni.navigateTo({
+					url: "./analyse?d_id=" + this.equipInfo.d_id + "&device_id=" + this.equipInfo.imei +
+						"&device_type=12&disable=" + this.equipInfo.disable
+				})
+			},
+			simRouter() {
+				uni.navigateTo({
+					url: "/pages/prevention/sim?id=" + this.equipInfo.d_id
+				})
+			},
+			timechange(e) {
+				this.start_time = +new Date(e.startDate)
+				this.end_time = +new Date(e.endDate)
+				this.history()
+				this.getwind()
+			},
+			async history() { //历史数据列表折线图
+				this.dataloadingtf = true
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=forecast.haomi.haomi_line',
+					data: {
+						d_id: this.equipInfo.d_id,
+						device_type_id: 28,
+						start: Math.floor(+new Date(this.start_time) / 1000),
+						end: Math.floor(+new Date(this.end_time) / 1000),
+					}
+				})
+				console.log(res)
+				this.dataloadingtf = false
+				this.historydatas = res
+				console.log(this.historydatas)
+				if (this.historydatas.length == 0) {
+					this.canvastishiTF = false
+				} else {
+					this.canvastishiTF = true
+
+					var arr1 = []
+					var arr2 = []
+					var arr3 = []
+					var xtitle = []
+					for (var i = 0; i < res.length; i++) {
+						var times = new Date(res[i].addtime * 1000)
+						xtitle.push(times.getMonth() + 1 + "/" + times.getDate() + "-" + times.getHours() + ":" + times
+							.getMinutes())
+						arr1.push(res[i].at == "" ? "0" : res[i].at)
+						arr2.push(res[i].ah == "" ? "0" : res[i].ah)
+					}
+					// console.log(arr1)
+					var obj = [{
+						name: '温度',
+						data: arr1,
+						color: '#00E29D'
+					}, {
+						name: '湿度',
+						data: arr2,
+						color: '#6CBBFF'
+					}]
+					this.showColumn("canvasColumnA", xtitle, obj)
+				}
+			},
+			showColumn(id, xtitle, xinfo) {
+				var _self = this
+				canvaColumnA = new uCharts({
+					canvasId: id,
+					type: 'line',
+					legend: {
+						position: "top"
+					},
+					fontSize: 11,
+					background: '#FFFFFF',
+					pixelRatio: 1,
+					animation: true,
+					dataLabel: false,
+					categories: xtitle,
+					series: xinfo,
+					enableScroll: true, //开启图表拖拽功能
+					xAxis: {
+						disableGrid: true,
+						type: 'grid',
+						gridType: 'dash',
+						itemCount: 4, //x轴单屏显示数据的数量,默认为5个
+						scrollShow: true, //新增是否显示滚动条,默认false
+						// scrollAlign: 'left', //滚动条初始位置
+						scrollBackgroundColor: '#F7F7FF', //默认为 #EFEBEF
+						scrollColor: '#DEE7F7', //默认为 #A6A6A6
+					},
+					yAxis: {
+						gridType: 'dash',
+						gridColor: '#CCCCCC',
+						dashLength: 8,
+						splitNumber: 5,
+						format: (val) => {
+							return val.toFixed(1)
+						}
+					},
+					width: _self.cWidth * 1,
+					height: _self.cHeight * 1,
+					extra: {
+						line: {
+							type: 'curve'
+						}
+					}
+				});
+			},
+			touchLineA(e) {
+				console.log(e)
+				canvaColumnA.scrollStart(e);
+			},
+			moveLineA(e) {
+				canvaColumnA.scroll(e);
+			},
+			touchEndLineA(e) {
+				canvaColumnA.scrollEnd(e);
+				//下面是toolTip事件,如果滚动后不需要显示,可不填写
+				canvaColumnA.showToolTip(e, {
+					format: function(item, category) {
+						return category + ' ' + item.name + ':' + item.data
+					}
+				});
+			},
+			async getwind() {
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=forecast.haomi.haomi_data',
+					data: {
+						d_id: this.equipInfo.d_id,
+						start_time: Math.floor(+new Date(this.start_time) / 1000),
+						end_time: Math.floor(+new Date(this.end_time) / 1000),
+						page: this.page,
+						page_size: "10"
+					}
+				})
+				console.log(res)
+				if (res.data.length) {
+					this.historylistdata = res.data
+					this.pagesum = Math.ceil(res.counts / 10)
+					this.forbidden = false
+				} else {
+					this.forbidden = true
+				}
+			},
+			prev() { //上一页
+				if (this.page > 1) {
+					this.page--
+					this.getwind()
+				}
+			},
+			next() { //下一页
+				if(this.page < this.pagesum){
+					this.page++
+					this.getwind()
+				}
+			},
+		},
+		onLoad(option) {
+			console.log(JSON.parse(option.info))
+			this.equipInfo = JSON.parse(option.info)
+			this.end_time = +new Date()
+			this.start_time = +new Date() - 30 * 24 * 60 * 60 * 1000
+			this.cWidth = uni.upx2px(650);
+			this.cHeight = uni.upx2px(500);
+			this.history()
+			this.getwind()
+		},
+	}
+</script>
+
+<style lang='scss'>
+	page {
+		padding: 20rpx;
+		box-sizing: border-box;
+
+		.info {
+			padding: 20rpx 40rpx;
+			color: #fff;
+			line-height: 50rpx;
+			font-size: 26rpx;
+			background-size: 100% auto;
+			background-repeat: no-repeat;
+			background-color: #0DC6B6;
+			background-position: top left;
+			box-sizing: border-box;
+			width: 100%;
+
+			.tishi {
+				width: 28rpx;
+				height: 28rpx;
+				margin: 0rpx 0 0 20rpx;
+			}
+		}
+
+		.on {
+			background-image: url('http://www.hnyfwlw.com:8006/bigdata_app/image/cb/onBg.png')
+		}
+
+		.off {
+			background-image: url('http://www.hnyfwlw.com:8006/bigdata_app/image/cb/offBg.png')
+		}
+
+		.caobox {
+			display: flex;
+			flex-wrap: wrap;
+			text-align: center;
+			font-size: 28rpx;
+			color: #666;
+			line-height: 50rpx;
+
+			image {
+				width: 52rpx;
+			}
+
+			.caobox_item {
+				padding: 20rpx 0;
+				box-sizing: border-box;
+				flex-basis: 25%;
+			}
+		}
+
+		.timebox {
+			box-shadow: 0 0 10rpx #bcb9ca;
+			display: flex;
+			background-color: #fff;
+			padding: 10px;
+			border-top-right-radius: 5px;
+			border-top-left-radius: 5px;
+			margin-top: 30rpx;
+
+			.jiange {
+				width: 5%;
+				text-align: center;
+			}
+
+			.firsttime,
+			.endtime {
+				width: 45%;
+				text-align: center;
+			}
+		}
+
+		.shuju_one {
+			position: relative;
+			width: 100%;
+			margin: 40rpx auto;
+			box-shadow: 0 0 10rpx #bcb9ca;
+			padding-top: 20rpx;
+			height: 550rpx;
+
+			.canvastishi {
+				font-size: 32rpx;
+				position: absolute;
+				top: 50%;
+				left: 50%;
+				margin-left: -64rpx;
+				margin-top: -21rpx;
+
+				.dataloading:after {
+					overflow: hidden;
+					display: inline-block;
+					vertical-align: bottom;
+					animation: ellipsis 2s infinite;
+					content: "\2026";
+				}
+
+				@keyframes ellipsis {
+					from {
+						width: 2px;
+					}
+
+					to {
+						width: 15px;
+					}
+				}
+			}
+
+			.shuju_one_title {
+				width: 70%;
+				margin: 0 auto;
+				display: flex;
+
+				.tltle_text {
+					width: 25%;
+					border: 2rpx solid #B2B2B2;
+					color: #57c878;
+					text-align: center;
+					font-size: 24rpx;
+					height: 50rpx;
+					line-height: 50rpx;
+				}
+
+				.title_text_color {
+					width: 25%;
+					border: 2rpx solid #57c878;
+					background-color: #57c878;
+					color: #fff;
+					text-align: center;
+					font-size: 24rpx;
+					height: 50rpx;
+					line-height: 50rpx;
+				}
+			}
+		}
+	}
+
+	.condition {
+		display: flex;
+		flex-wrap: wrap;
+		width: 100%;
+		margin: 30rpx auto;
+		box-shadow: 0 0 10rpx #bcb9ca;
+		margin-bottom: 30rpx;
+
+		.scroll-X {
+			width: 95%;
+			margin: 20rpx auto;
+
+			.table {
+				// width: 1672px;
+			}
+
+			.tr {
+				display: flex;
+				overflow: hidden;
+
+				.th,
+				.td {
+					display: inline-block;
+					padding: 5rpx;
+					width: 240rpx;
+					text-align: center;
+					height: 52rpx;
+					line-height: 52rpx;
+					border: 2rpx solid #F1F1F1;
+				}
+
+				.th:first-child,
+				.td:first-child {
+					width: 300rpx;
+				}
+			}
+
+			.tr:nth-child(2n-1) {
+				background-color: #f5fff8;
+			}
+
+			.tr:first-child {
+				background-color: #57c878;
+				color: #fff;
+			}
+		}
+
+		.pagenumber {
+			display: flex;
+			margin: 20rpx auto;
+
+			button {
+				width: 150rpx;
+				height: 50rpx;
+				line-height: 50rpx;
+				font-size: 26rpx;
+				text-align: center;
+				background-color: #57c878;
+				color: #FFFFFF;
+			}
+
+			.pagenumber_page {
+				width: 150rpx;
+				height: 50rpx;
+				line-height: 50rpx;
+				font-size: 26rpx;
+				text-align: center;
+			}
+		}
+	}
+
+	/deep/.u-calendar__action {
+		display: flex;
+		justify-content: space-around;
+
+		.u-calendar__action__text {
+			line-height: 25px;
+		}
+	}
+</style>

+ 377 - 0
pages/cb/smallPest/xctset.vue

@@ -0,0 +1,377 @@
+<template>
+	<view>
+		<view class="" v-if="myuser_type">
+			<view class="tit adminTit">
+				联网模块
+			</view>
+			<view class="btns">
+				<button type="warn" @click="equipBtnControl('dtu_update')" size="mini">升级</button>
+				<button type="warn" @click="equipBtnControl('dtu_reboot')" size="mini">重启</button>
+				<button type="warn" @click="equipBtnControl('yfwlw')" size="mini">平台切换</button>
+			</view>
+			<view class="tit adminTit">
+				强制操作
+			</view>
+			<view class="btns">
+				<button type="warn" @click="equipBtnControl('takephoto')" size="mini">拍照</button>
+				<button type="warn" @click="equipBtnControl('update')" size="mini">升级</button>
+				<button type="warn" @click="equipBtnControl('reboot')" size="mini">重启</button>
+				<button type="warn" @click="equipBtnControl('close_shake')" size="mini">震动关闭</button>
+				<button type="warn" @click="equipBtnControl('open_shake')" size="mini">震动开启</button>
+			</view>
+		</view>
+		<view class="setitem">
+			设备编号:{{option.device_id}}
+		</view>
+		<view class="setitem">
+			设备名称:{{option.device_name}}
+		</view>
+		<view class="setitem">
+			设备版本:{{option.dtype}}
+		</view>
+		<!-- <view class="setitem">
+			设备开关:
+			<view class="uni-list-cell" style="margin-top: 30rpx;">
+				<picker @change="turnChange($event,'ds')" value="equipContrlForm.ds" :range="dsArr">
+					<text class="uni-input">{{dsArr[equipContrlForm.ds]}}</text>
+					<view class="arrow"></view>
+				</picker>
+			</view>
+		</view> -->
+		<u-form :model="equipContrlForm" :label-width="180">
+			<u-form-item label="温控开关" :label-width="240">
+				<u-radio-group v-model="equipContrlForm.limit_temp">
+					<u-radio :name="1">开</u-radio>
+					<u-radio :name="0">关</u-radio>
+				</u-radio-group>
+			</u-form-item>
+			<u-form-item label="雨控开关" :label-width="240">
+				<u-radio-group v-model="equipContrlForm.limit_rain">
+					<u-radio :name="1">开</u-radio>
+					<u-radio :name="0">关</u-radio>
+				</u-radio-group>
+			</u-form-item>
+			<u-form-item label="定时模式" :label-width="240">
+				<u-radio-group v-model="equipContrlForm.ts">
+					<u-radio :name="1">光控</u-radio>
+					<u-radio :name="0">时控</u-radio>
+				</u-radio-group>
+			</u-form-item>
+			<u-form-item label="定时时长" :label-width="240" v-if="equipContrlForm.ts == 0">
+				<text @click="equipContrlForm.show_st= true">{{equipContrlForm.collstart}}</text>-
+				<text @click="equipContrlForm.show_et= true">{{equipContrlForm.collend}}</text>
+				<u-picker mode="time" v-model="equipContrlForm.show_st" :default-time="`${equipContrlForm.collstart}:00`"
+					:params="params" @confirm="(e) => changeControlTime(e, 'collstart')"></u-picker>
+				<u-picker mode="time" v-model="equipContrlForm.show_et" :default-time="`${equipContrlForm.collend}:00`"
+					:params="params" @confirm="(e) => changeControlTime(e, 'collend')"></u-picker>
+			</u-form-item>
+			<u-form-item label="定时时长(H)" :label-width="200" v-if="equipContrlForm.ts == 1">
+				<u-input v-model="equipContrlForm.tt" type="number" />
+			</u-form-item>
+			<u-form-item label="拍照间隔(min)" :label-width="200">
+				<u-input v-model="equipContrlForm.pho_f" type="number" />
+			</u-form-item>
+			<u-form-item label="高温保护阈值(℃)" :label-width="250">
+				<u-input v-model="equipContrlForm.tph" type="number" />
+			</u-form-item>
+			<u-form-item label="低温保护阈值(℃)" :label-width="250">
+				<u-input v-model="equipContrlForm.tpl" type="number" />
+			</u-form-item>
+			<u-form-item label="数据上传间隔(min)" :label-width="260">
+				<u-input v-model="equipContrlForm.dat_f" type="number" />
+			</u-form-item>
+		</u-form>
+		<view class="submit-box">
+			<u-button @click="submit" type="success">确定</u-button>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				myuser_type: false,
+				option: {},
+				equipContrlForm: {
+					"tpl ": "",
+					"tph": "",
+					"dat_f": "",
+					"pho_f": "",
+					"limit_temp": "",
+					"limit_rain": "",
+					"tt": "",
+					"ts": "",
+					"collstart": "",
+					"collend": "",
+					show_st: false,
+					show_et: false,
+				},
+				params: {
+					year: false,
+					month: false,
+					day: false,
+					hour: true,
+					minute: false,
+					second: false
+				},
+				list: [{
+						value: 0,
+						label: '00:00'
+					},
+					{
+						value: 1,
+						label: '01:00'
+					},
+					{
+						value: 2,
+						label: '02:00'
+					},
+					{
+						value: 3,
+						label: '03:00'
+					},
+					{
+						value: 4,
+						label: '04:00'
+					},
+					{
+						value: 5,
+						label: '05:00'
+					},
+					{
+						value: 6,
+						label: '06:00'
+					},
+					{
+						value: 7,
+						label: '04:00'
+					}, {
+						value: 8,
+						label: '08:00'
+					},
+					{
+						value: 9,
+						label: '09:00'
+					},
+					{
+						value: 10,
+						label: '10:00'
+					},
+					{
+						value: 11,
+						label: '11:00'
+					},
+					{
+						value: 12,
+						label: '12:00'
+					},
+					{
+						value: 13,
+						label: '13:00'
+					},
+					{
+						value: 14,
+						label: '14:00'
+					}, {
+						value: 15,
+						label: '15:00'
+					},
+					{
+						value: 16,
+						label: '16:00'
+					},
+					{
+						value: 17,
+						label: '17:00'
+					},
+					{
+						value: 18,
+						label: '18:00'
+					},
+					{
+						value: 19,
+						label: '19:00'
+					},
+					{
+						value: 20,
+						label: '20:00'
+					},
+					{
+						value: 21,
+						label: '21:00'
+					}, {
+						value: 22,
+						label: '22:00'
+					},
+					{
+						value: 23,
+						label: '23:00'
+					},
+				],
+			}
+		},
+		methods: {
+			async getconf() {
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=forecast.haomi.haomi_get_config',
+					data: {
+						cmd: "paramconf",
+						d_id: this.option.d_id
+					}
+				})
+				console.log(res)
+				if (res && Object.keys(res).length > 0) {
+					let data = res;
+					console.log(data);
+					let newObj = {
+						...data,
+						show_st: false,
+						show_et: false,
+					};
+					newObj.collstart = newObj.collstart > 9 ? newObj.collstart : `0${newObj.collstart}`;
+					newObj.collend = newObj.collend > 9 ? newObj.collend : `0${newObj.collend}`;
+					console.log(newObj);
+					this.equipContrlForm = newObj;
+				}
+			},
+			changeControlTime(e, type) {
+				console.log(e);
+				this.equipContrlForm[type] = `${e.hour}`;
+				console.log(this.equipContrlForm);
+			},
+			async submit() {
+				console.log(this.equipContrlForm)
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=forecast.haomi.haomi_config',
+					data: {
+						d_id: this.option.d_id,
+						device_id: this.option.device_id,
+						...this.equipContrlForm
+					}
+				})
+				if (res == true) {
+					uni.showToast({
+						title: '指令下发成功!',
+						duration: 2000
+					});
+				} else {
+					uni.showToast({
+						title: '指令下发失败!',
+						duration: 2000,
+						icon: "none"
+					});
+				}
+			},
+			async equipBtnControl(cmd) {
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=forecast.send_control.admin_device_control',
+					data: {
+						cmd,
+						d_id: this.option.d_id,
+					}
+				})
+				console.log(res)
+				if (res == true) {
+					uni.showToast({
+						title: '指令下发成功!',
+						duration: 2000
+					});
+				} else {
+					uni.showToast({
+						title: '指令下发失败!',
+						duration: 2000,
+						icon: "none"
+					});
+				}
+			}
+		},
+		onLoad(option) {
+			this.option = option
+			uni.getStorage({
+				key: "myuser_type",
+				success: (res) => {
+					console.log(res.data)
+					if (Number(res.data) == 1) {
+						this.myuser_type = true
+					}
+				}
+			})
+			this.getconf()
+		}
+	}
+</script>
+
+<style lang="scss">
+	page {
+		padding: 20rpx;
+		box-sizing: border-box;
+
+		.tit {
+			line-height: 30rpx;
+			font-size: 30rpx;
+			padding-left: 20rpx;
+			border-left-width: 2px;
+			border-left-style: solid;
+			border-left-color: $uni-color-success;
+			margin: 30rpx 0;
+		}
+
+		.adminTit {
+			border-left-color: #e64340;
+		}
+
+		.btns {
+			display: flex;
+			justify-content: flex-start;
+			flex-wrap: no-wrap;
+
+			button {
+				margin: 0;
+				margin-right: 10rpx;
+				padding: 0 25rpx;
+			}
+		}
+
+		.setitem {
+			margin-top: 30rpx;
+
+			.selectTime {
+				margin-top: 30rpx;
+				display: flex;
+
+				.time {
+					width: 350rpx;
+					display: flex;
+					justify-content: space-between;
+				}
+
+				.line {
+					width: 50rpx;
+					text-align: center;
+				}
+			}
+		}
+
+		.uni-list-cell {
+			background: #F7F8FA;
+			padding: 10rpx 40rpx;
+			font-size: 28rpx;
+			box-sizing: border-box;
+
+			/* margin-top: 30rpx; */
+			.arrow {
+				display: inline-block;
+				border-width: 12rpx 8rpx;
+				border-style: solid;
+				float: right;
+				margin-top: 10rpx;
+				border-color: #888 transparent transparent transparent;
+			}
+		}
+
+		.submit-box {
+			margin-top: 60rpx
+		}
+	}
+</style>

+ 1 - 1
pages/cb/xylps/detail.vue

@@ -171,7 +171,7 @@
 						<u-radio :name="3">定时</u-radio>
 						<u-radio :name="3">定时</u-radio>
 					</u-radio-group>
 					</u-radio-group>
 				</u-form-item>
 				</u-form-item>
-				<u-form-item label="定时时长" :label-width="240">
+				<u-form-item label="定时时长" :label-width="240" v-if="equipContrlForm1.dev_work_mode == 3">
 					<text @click="equipContrlForm1.show_st= true">{{equipContrlForm1.st}}</text>-
 					<text @click="equipContrlForm1.show_st= true">{{equipContrlForm1.st}}</text>-
 					<text @click="equipContrlForm1.show_et= true">{{equipContrlForm1.et}}</text>
 					<text @click="equipContrlForm1.show_et= true">{{equipContrlForm1.et}}</text>
 					<u-picker mode="time" v-model="equipContrlForm1.show_st" :default-time="equipContrlForm1.st"
 					<u-picker mode="time" v-model="equipContrlForm1.show_st" :default-time="equipContrlForm1.st"

+ 1 - 1
pages/cb/zjxydetail/photolist.vue

@@ -89,7 +89,7 @@
 				const res = await this.$myRequest({
 				const res = await this.$myRequest({
 					url: '/api/api_gateway?method=forecast.forecast_system.device_photo_list',
 					url: '/api/api_gateway?method=forecast.forecast_system.device_photo_list',
 					data: {
 					data: {
-						cmd: "xy_three",
+						cmd: "zjxy",
 						device_id: this.device_id,
 						device_id: this.device_id,
 						page: this.page,
 						page: this.page,
 						page_number: "12",
 						page_number: "12",

+ 2 - 2
pages/cb/zjxydetail/thxydetail.vue

@@ -43,13 +43,13 @@
 		</u-popup>
 		</u-popup>
 		<u-calendar v-model="tiemshow" mode="date" :max-date="date" @change="tiemchange"></u-calendar>
 		<u-calendar v-model="tiemshow" mode="date" :max-date="date" @change="tiemchange"></u-calendar>
 		<view class="caobox">
 		<view class="caobox">
-			<!-- <view class="caobox_item" v-if="$QueryPermission(200)" @click="tophoto">
+			<view class="caobox_item" v-if="$QueryPermission(336)" @click="tophoto">
 				<image src="http://www.hnyfwlw.com:8006/bigdata_app/image/cb/1.png" mode="widthFix"></image>
 				<image src="http://www.hnyfwlw.com:8006/bigdata_app/image/cb/1.png" mode="widthFix"></image>
 				<view class="">
 				<view class="">
 					查看图片
 					查看图片
 				</view>
 				</view>
 			</view>
 			</view>
-			<view class="caobox_item" v-if="$QueryPermission(248)" @click="toset">
+			<!-- <view class="caobox_item" v-if="$QueryPermission(248)" @click="toset">
 				<image src="http://www.hnyfwlw.com:8006/bigdata_app/image/cb/4.png" mode="widthFix"></image>
 				<image src="http://www.hnyfwlw.com:8006/bigdata_app/image/cb/4.png" mode="widthFix"></image>
 				<view class="">
 				<view class="">
 					设备控制
 					设备控制

+ 179 - 0
pages/disease/mls/forecastResult.vue

@@ -0,0 +1,179 @@
+<template>
+	<view class="bigBox">
+		<u-card :show-head="false" margin="0rpx 20rpx" :show-foot="false">
+			<view class="cardBox" slot="body">
+				<view class="selecttimes" @click="tiemshow = !tiemshow">
+					<view class="timesbox">
+						<image
+							:src="'http://www.hnyfwlw.com:8006/bigdata_app/image/prevention/1acfe2751c01d3786cdc49b83d7e505.png'"
+							mode=""></image>
+						<p>{{ initTime ? '出苗期' : begintime }}</p>
+						<p class="or">~</p>
+						<p>{{ initTime ? '收获期' : end }}</p>
+						<u-icon name="rili" custom-prefix="custom-icon" class="icon"></u-icon>
+					</view>
+					<u-calendar v-model="tiemshow" mode="range" @change="tiemchange"></u-calendar>
+				</view>
+				<view class="empty" v-if="initTime">
+					请先选择出苗期和收获期
+				</view>
+				<view class="empty" v-else-if="list.length == 0">
+						数据为空
+				</view>
+				<scroll-view scroll-top="0" scroll-x="true" class="scroll-X" v-else>
+					<table class="table">
+						<tr class="tr">
+							<th class="th" v-for="(value, key) in param" :key="'a' + key">
+								{{ value }}
+							</th>
+						</tr>
+						<tr class="tr" v-for="(items, indexs) in list" :key="'b' + indexs">
+							<td class="td" v-for="(value, key) in param">{{ items[key]}}</td>
+						</tr>
+					</table>
+				</scroll-view>
+			</view>
+			<view class="" slot="foot"><u-icon name="chat-fill" size="34" color="" label="30评论"></u-icon></view>
+		</u-card>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				tiemshow: false,
+				initTime: true,
+				forecastId:'',
+				end:'',
+				begintime:'',
+				list: [],
+				param: {
+					ciDai: '代/次',
+					sTime: '本次侵染开始时间',
+					eTime: '本次侵染结束时间',
+					awsDeg: '本次侵染程度',
+					awsFen: '本次侵染的分值',
+					awsYao: '是否使用预报数据',
+				}
+			}
+		},
+		onLoad(option) {
+			this.forecastId = option.id;
+			this.end = parseInt(+new Date() / 1000);
+			this.begintime = parseInt(this.end - 24 * 60 * 60);
+		},
+		methods: {
+			async histprydatas() {
+				//表格历史数据
+				const res = await this.$myRequest({
+					url: "/api/api_gateway?method=wheat.potato.potato_time",
+					data: {
+						device_id: this.forecastId,
+						start:this.begintime,
+						end: this.end
+					},
+				});
+				console.log(res);
+				this.list = res.data.list;
+			},
+			tiemchange(e) {
+				console.log(e);
+				this.initTime = false;
+				//切换时间
+				// this.begintime = parseInt(+new Date(e.startDate) / 1000);
+				this.begintime = e.startDate;
+				this.end = e.endDate;
+				this.histprydatas();
+			}
+		}
+	}
+</script>
+
+<style scoped lang="less">
+	.bigBox {
+		width: 100vw;
+		height: calc(100vh - 80rpx);
+		background: #eee;
+		box-sizing: border-box;
+		padding-top: 20rpx;
+		overflow: hidden;
+
+		.cardBox {
+			height: 75vh;
+			overflow-y: auto;
+			padding-top: 20rpx;
+			.empty{
+				display: flex;
+				justify-content: center;
+				align-items: center;
+				height: calc(100% - 60rpx);
+			}
+			.selecttimes {
+				width: 90%;
+				box-shadow: 0 0 10rpx #bcb9ca;
+				padding: 10rpx 20rpx;
+				box-sizing: border-box;
+				margin: 0 auto;
+				font-size: 28rpx;
+			
+				.timesbox {
+					display: flex;
+					justify-content: space-around;
+			
+					image {
+						width: 30rpx;
+						height: 30rpx;
+						margin-top: 6rpx;
+					}
+			
+					.icon {
+						color: #949494;
+						text-align: right;
+						margin-left: 30rpx;
+					}
+				}
+			
+				/deep/.u-calendar__action {
+					display: flex;
+					justify-content: space-around;
+			
+					.u-calendar__action__text {
+						line-height: 25px;
+					}
+				}
+			}
+			
+			.scroll-X {
+				width: 100%;
+				margin: 20rpx auto;
+				height: calc(100% - 120rpx);
+				overflow-y: auto;
+				.tr {
+					display: flex;
+					overflow: hidden;
+
+					.th,
+					.td {
+						display: inline-block;
+						padding: 5rpx;
+						width: 300rpx;
+						text-align: center;
+						height: 52rpx;
+						line-height: 52rpx;
+						border: 2rpx solid #f1f1f1;
+					}
+				}
+
+				.tr:nth-child(2n-1) {
+					background-color: #f5fff8;
+				}
+
+				.tr:first-child {
+					background-color: #57c878;
+					color: #fff;
+				}
+			}
+		}
+	}
+</style>

+ 646 - 0
pages/disease/mls/mls.vue

@@ -0,0 +1,646 @@
+<template>
+	<view>
+		<!-- <view class="status_bar"></view> -->
+		<view class="" style="position: relative;">
+			<!-- <view style="position: fixed; z-index: 100; width: 100%">
+				<uni-nav-bar @clickLeft="clickLeft" left-icon="back" left-text="返回" title="设备详情"></uni-nav-bar>
+			</view> -->
+			<view class="info">
+				<view class="info_item">
+					<image src="http://www.hnyfwlw.com:8006/bigdata_app/image/cb/onBg.png" mode="" class="bgi"></image>
+					<p style="font-size: 32rpx" @click="copy(eqinfo.device_id)">
+						设备 ID:{{ eqinfo.device_id }}
+						<image src="http://www.hnyfwlw.com:8006/bigdata_app/image/environment/fuzhi.png" mode=""
+							class="tishi"></image>
+					</p>
+					<p>设备名称:{{ eqinfo.device_name || "无" }}</p>
+					<p>
+						最近上报时间:<span v-if="eqinfo.uptime">{{ eqinfo.uptime == 0 ? '无' : eqinfo.uptime | timeFormat()
+            }}</span><span v-else>{{eqinfo.uptime == 0 ? '无' : eqinfo.uptime | timeFormat() }}</span>
+					</p>
+					<p>地址:{{ eqinfo.location || "暂无地址" }}</p>
+				</view>
+			</view>
+			<view class="control">
+				<view class="control_item" v-if="kongtf" @click="control">
+					<image :src="
+              'http://www.hnyfwlw.com:8006/bigdata_app' +
+              '/image/environment/forecastResult.png'
+            " mode=""></image>
+					<p>防控决策</p>
+				</view>
+			</view>
+			<view class="his_box" v-if="datatf">
+				<view class="selecttimes" @click="tiemshow = !tiemshow">
+					<view class="timesbox">
+						<image
+							:src="'http://www.hnyfwlw.com:8006/bigdata_app/image/prevention/1acfe2751c01d3786cdc49b83d7e505.png'"
+							mode=""></image>
+						<p>{{ timetab(begintime) }}</p>
+						<p class="or">~</p>
+						<p>{{ timetab(end) }}</p>
+						<u-icon name="rili" custom-prefix="custom-icon" class="icon"></u-icon>
+					</view>
+					<u-calendar v-model="tiemshow" mode="range" @change="tiemchange"></u-calendar>
+				</view>
+				<view class="shuju_one">
+					<view class="canvastishi" v-if="!canvastishiTF && !dataloadingtf">
+						暂无数据
+					</view>
+					<view class="canvastishi" v-if="dataloadingtf">
+						<p class="dataloading">加载中</p>
+					</view>
+					<canvas v-show="!tiemshow" canvas-id="canvasColumnA" id="canvasColumnA" class="charts"
+						@touchstart="touchLineA($event)" @touchmove="moveLineA($event)"
+						@touchend="touchEndLineA($event)" disable-scroll="true" :style="{
+              width: cWidth * pixelRatio + 'px',
+              height: cHeight * pixelRatio + 'px',
+              transform: 'scale(' + 1 / pixelRatio + ')',
+              'margin-left': (-cWidth * (pixelRatio - 1)) / 2 + 'px',
+              'margin-top': (-cHeight * (pixelRatio - 1)) / 2 + 'px',
+            }"></canvas>
+					<canvas v-show="!tiemshow" canvas-id="canvasColumnB" id="canvasColumnB" class="charts"
+						@touchstart="touchLineB($event)" @touchmove="moveLineB($event)"
+						@touchend="touchEndLineB($event)" disable-scroll="true" :style="{
+              width: cWidth * pixelRatio + 'px',
+              height: cHeight * pixelRatio + 'px',
+              transform: 'scale(' + 1 / pixelRatio + ')',
+              'margin-left': (-cWidth * (pixelRatio - 1)) / 2 + 'px',
+              'margin-top': (-cHeight * (pixelRatio - 1)) / 2 + 'px',
+            }"></canvas>
+				</view>
+				<view class="condition">
+					<scroll-view scroll-top="0" scroll-x="true" class="scroll-X">
+						<table class="table">
+							<tr class="tr">
+								<th class="th" v-for="(value, key) in param" :key="'a' + key">
+									{{ value }}
+								</th>
+							</tr>
+							<tr class="tr" v-for="(items, indexs) in historylistdata" :key="'b' + indexs"
+								v-if="!forbidden">
+								<td class="td" v-for="(value, key) in param">{{ items[key]}}</td>
+							</tr>
+							<tr class="tr" v-if="forbidden">
+								<td class="td" v-for="item in 13">暂无数据</td>
+							</tr>
+						</table>
+					</scroll-view>
+					<view class="pagenumber">
+						<button @click="prev">上一页</button>
+						<view class="pagenumber_page"> 第 {{ page }} 页 </view>
+						<view class="pagenumber_page"> 共 {{ pagesum }} 页 </view>
+						<button @click="next">下一页</button>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import uCharts from "../../../components/js_sdk/u-charts/u-charts/u-charts.js";
+	var canvaColumnA = null;
+	var canvaColumnB = null;
+	export default {
+		data() {
+			return {
+				basetype: "",
+				kongtf: false,
+				datatf: false,
+				eqinfo: {},
+				city: "河南省",
+				tiemshow: false, //时间筛选弹框
+				begintime: "", //开始时间
+				end: "", //结束时间
+				dataloadingtf: true,
+				canvastishiTF: false,
+				device_id: "", //设备ID
+				forbidden: false,
+				historylistdata: [], //历史数据
+				pagesum: 1,
+				page: 1,
+				cWidth: "",
+				cHeight: "",
+				pixelRatio: 1,
+				param: {
+					
+				},
+				color: [
+					"#ff7b30",
+					"#f93948",
+					"#fb2ea4",
+					"#bc59db",
+					"#7457ec",
+					"#307dfd",
+					"#31bfff",
+					"#46e9b1",
+					"#19cd48",
+					"#b2e409",
+					"#f0f254",
+					"#fed000",
+					"#f06f14",
+					"#a74040",
+					"#90bb71",
+					"#a07635",
+					"#6502bd",
+					"#048bbb",
+					"#9ebb01",
+					"#cc9202",
+					"#ff8fa0",
+					"#a3d55f",
+					"#d9bedd",
+					"#00a6b6",
+					"#236093",
+					"#009fff",
+					"#ddc0a6",
+					"#c4a6dd",
+					"#dda6a6",
+					"#779e33",
+					"#a6ddb0",
+				],
+			};
+		},
+		methods: {
+			copy(item) {
+				uni.setClipboardData({
+					data: item,
+					success: function() {
+						console.log("success");
+					},
+				});
+			},
+			control() {
+				//设备控制
+				uni.navigateTo({
+					url: "./forecastResult?id=" + this.eqinfo.device_id,
+				});
+			},
+			tiemchange(e) {
+				console.log(e);
+				//切换时间
+				// this.begintime = parseInt(+new Date(e.startDate) / 1000);
+				this.begintime = parseInt(+new Date(`${e.startDate} 00:00:00`) / 1000);
+				this.end = parseInt(+new Date(`${e.endDate} 00:00:00`) / 1000);
+				this.histprydatas();
+				this.getChartLine();
+			},
+			timetab(e) {
+				//时间转换
+				e = new Date(e * 1000);
+				var year = e.getFullYear();
+				var month =
+					e.getMonth() + 1 < 10 ? "0" + (e.getMonth() + 1) : e.getMonth() + 1;
+				var day = e.getDate() < 10 ? "0" + e.getDate() : e.getDate();
+				var time = year + "/" + month + "/" + day;
+				return time;
+			},
+			// 表格数据
+			async histprydatas() {
+				//表格历史数据
+				const res = await this.$myRequest({
+					url: "/api/api_gateway?method=wheat.potato.potato_data_list",
+					data: {
+						device_id: this.eqinfo.device_id,
+						page: this.page,
+						begin: this.begintime,
+						end: this.end,
+					},
+				});
+				console.log(res);
+				this.param = res.ele
+				this.pagesum = Math.ceil(res.nums / 10) || 1;
+				if (this.pagesum > 0) {
+					var dat = res.sta;
+					this.historylistdata = [];
+					for (var i = 0; i < dat.length; i++) {
+						var item = eval("(" + dat[i] + ")");
+						var obj = {};
+						for (var i1 in item) {
+							// if (i1 == "uploadTime") {
+							//   obj[i1] = this.formatTime(item[i1] * 1000);
+							// } else {
+							obj[i1] = item[i1];
+							// }
+						}
+						this.historylistdata.push(obj);
+					}
+				} else {
+					this.historylistdata = [];
+				}
+			},
+			//获取折线图数据
+			async getChartLine() {
+				const res = await this.$myRequest({
+					method: "POST",
+					url: "/api/api_gateway?method=wheat.potato.potato_data",
+					data: {
+						device_id: this.eqinfo.device_id,
+						begin: this.begintime,
+						end: this.end,
+					},
+				});
+				this.dataloadingtf = false;
+				var dat = res.data;
+				this.param = res.ele;
+				if (dat.length) {
+					var regroupData = []; //重组数据
+					var kindArr = []; //通道数组
+					var time = [];
+					var xtitle = [];
+					for (var i = 0; i < dat.length; i++) {
+						var item = eval("(" + dat[i] + ")");
+						console.log(item)
+						var tim = new Date(item["dataTime"]).getTime();
+						var times = new Date(tim);
+						xtitle.unshift(
+							times.getMonth() +
+							1 +
+							"/" +
+							times.getDate() +
+							"-" +
+							times.getHours() +
+							":" +
+							times.getMinutes()
+						);
+						time.unshift(tim);
+						for (var j in item) {
+							var arr = "";
+							if (j == "id" || j == "dataTime" || j=='windDir') {
+								continue;
+							} else if (kindArr.indexOf(j) == "-1") {
+								kindArr.push(j);
+								regroupData.push({
+									name: this.param[j],
+									color: this.color[kindArr.length - 1],
+									data: [],
+								});
+								// arr.push(tim);
+								arr = parseFloat(item[j]);
+								regroupData[kindArr.indexOf(j)].data.unshift(arr);
+							} else {
+								// arr.push(tim);
+								// arr.push(parseFloat(item[j]));
+								arr = parseFloat(item[j]);
+								regroupData[kindArr.indexOf(j)].data.unshift(arr);
+							}
+						}
+					}
+					console.log(regroupData);
+					// 分割折线图
+					const regroupDataNum = Math.ceil(regroupData.length / 2);
+					const options1 = regroupData.filter((v, i) => {
+						return i < regroupDataNum;
+					});
+					const options2 = regroupData.filter((v, i) => {
+						return i >= regroupDataNum;
+					});
+					console.log(options1, options2);
+
+					this.showColumn("canvasColumnA", xtitle, options1);
+					this.showColumn("canvasColumnB", xtitle, options2);
+					this.canvastishiTF = true;
+				} else {
+					this.canvastishiTF = false;
+					this.showColumn("canvasColumnA", xtitle, []);
+					this.showColumn("canvasColumnB", xtitle, []);
+				}
+			},
+			prev() {
+				//上一页
+				if (this.page > 1) {
+					this.page--;
+					this.histprydatas();
+				}
+			},
+			next() {
+				//下一页
+				if (this.page < this.pagesum) {
+					this.page++;
+					this.histprydatas();
+				}
+			},
+			clickLeft() {
+				uni.navigateBack({
+					delta: 1,
+				});
+			},
+			showColumn(id, xtitle, xinfo) {
+				console.log(id);
+				var _self = this;
+				if (id === "canvasColumnA") {
+					canvaColumnA = new uCharts({
+						canvasId: id,
+						type: "line",
+						legend: {
+							position: "top",
+						},
+						fontSize: 11,
+						background: "#FFFFFF",
+						pixelRatio: 1,
+						animation: true,
+						dataLabel: false,
+						categories: xtitle,
+						series: xinfo,
+						enableScroll: true, //开启图表拖拽功能
+						xAxis: {
+							disableGrid: true,
+							type: "grid",
+							gridType: "dash",
+							itemCount: 4, //x轴单屏显示数据的数量,默认为5个
+							scrollShow: true, //新增是否显示滚动条,默认false
+							// scrollAlign: 'left', //滚动条初始位置
+							scrollBackgroundColor: "#F7F7FF", //默认为 #EFEBEF
+							scrollColor: "#DEE7F7", //默认为 #A6A6A6
+						},
+						yAxis: {},
+						width: _self.cWidth * 1,
+						height: _self.cHeight * 1,
+						extra: {
+							line: {
+								type: "curve",
+							},
+						},
+					});
+				} else if (id === "canvasColumnB") {
+					canvaColumnB = new uCharts({
+						canvasId: id,
+						type: "line",
+						legend: {
+							position: "top",
+						},
+						fontSize: 11,
+						background: "#FFFFFF",
+						pixelRatio: 1,
+						animation: true,
+						dataLabel: false,
+						categories: xtitle,
+						series: xinfo,
+						enableScroll: true, //开启图表拖拽功能
+						xAxis: {
+							disableGrid: true,
+							type: "grid",
+							gridType: "dash",
+							itemCount: 4, //x轴单屏显示数据的数量,默认为5个
+							scrollShow: true, //新增是否显示滚动条,默认false
+							// scrollAlign: 'left', //滚动条初始位置
+							scrollBackgroundColor: "#F7F7FF", //默认为 #EFEBEF
+							scrollColor: "#DEE7F7", //默认为 #A6A6A6
+						},
+						yAxis: {},
+						width: _self.cWidth * 1,
+						height: _self.cHeight * 1,
+						extra: {
+							line: {
+								type: "curve",
+							},
+						},
+					});
+				}
+			},
+
+			touchLineA(e) {
+				console.log(e);
+				canvaColumnA.scrollStart(e);
+			},
+			moveLineA(e) {
+				canvaColumnA.scroll(e);
+			},
+			touchEndLineA(e) {
+				canvaColumnA.scrollEnd(e);
+				//下面是toolTip事件,如果滚动后不需要显示,可不填写
+				canvaColumnA.showToolTip(e, {
+					format: function(item, category) {
+						return category + " " + item.name + ":" + item.data;
+					},
+				});
+			},
+			touchLineB(e) {
+				console.log(e);
+				canvaColumnB.scrollStart(e);
+			},
+			moveLineB(e) {
+				canvaColumnB.scroll(e);
+			},
+			touchEndLineB(e) {
+				canvaColumnB.scrollEnd(e);
+				//下面是toolTip事件,如果滚动后不需要显示,可不填写
+				canvaColumnB.showToolTip(e, {
+					format: function(item, category) {
+						return category + " " + item.name + ":" + item.data;
+					},
+				});
+			},
+		},
+		onLoad(option) {
+			this.eqinfo = JSON.parse(option.shebei);
+			this.basetype = this.eqinfo.type
+			this.cWidth = uni.upx2px(650);
+			this.cHeight = uni.upx2px(500);
+			this.device_id = option.id;
+			this.end = parseInt(+new Date() / 1000);
+			this.begintime = parseInt(this.end - 24 * 60 * 60);
+			this.histprydatas();
+			this.getChartLine();
+			this.kongtf = this.$QueryPermission(347)
+			this.datatf = this.$QueryPermission(348)
+		},
+	};
+</script>
+
+<style lang="scss">
+	.info {
+		width: 100%;
+
+		.info_item {
+			width: 90%;
+			margin: 0 auto;
+			height: 240rpx;
+			padding: 40rpx 50rpx;
+			position: relative;
+			box-sizing: border-box;
+
+			.bgi {
+				width: 100%;
+				height: 100%;
+				position: absolute;
+				top: 0;
+				left: 0;
+				z-index: -1;
+			}
+
+			p {
+				font-size: 24rpx;
+				color: #ffffff;
+				margin-bottom: 10rpx;
+
+				.tishi {
+					width: 30rpx;
+					height: 30rpx;
+					margin: 0rpx 0 0 20rpx;
+				}
+			}
+		}
+	}
+
+	.control {
+		width: 90%;
+		margin-top: 30rpx;
+		display: flex;
+		text-align: center;
+		// padding: 0 30rpx;
+		box-sizing: border-box;
+
+		.control_item {
+			width: 128rpx;
+			height: 120rpx;
+			width: 20%;
+
+			image {
+				width: 70rpx;
+				height: 70rpx;
+			}
+
+			p {
+				font-size: 24rpx;
+			}
+		}
+	}
+
+	.his_box {
+		width: 100%;
+		margin-top: 30rpx;
+		position: relative;
+	}
+
+	.selecttimes {
+		width: 90%;
+		box-shadow: 0 0 10rpx #bcb9ca;
+		padding: 10rpx 20rpx;
+		box-sizing: border-box;
+		margin: 0 auto;
+		font-size: 28rpx;
+
+		.timesbox {
+			display: flex;
+			justify-content: space-around;
+
+			image {
+				width: 30rpx;
+				height: 30rpx;
+				margin-top: 6rpx;
+			}
+
+			.icon {
+				color: #949494;
+				text-align: right;
+				margin-left: 30rpx;
+			}
+		}
+
+		/deep/.u-calendar__action {
+			display: flex;
+			justify-content: space-around;
+
+			.u-calendar__action__text {
+				line-height: 25px;
+			}
+		}
+	}
+
+	.shuju_one {
+		width: 90%;
+		margin: 20px auto;
+		box-shadow: 0 0 10rpx #bcb9ca;
+		padding-top: 20rpx;
+		height: 1000rpx;
+
+		.canvastishi {
+			font-size: 32rpx;
+			position: absolute;
+			top: 50%;
+			left: 50%;
+			margin-left: -64rpx;
+			margin-top: -21rpx;
+
+			.dataloading:after {
+				overflow: hidden;
+				display: inline-block;
+				vertical-align: bottom;
+				animation: ellipsis 2s infinite;
+				content: "\2026";
+			}
+
+			@keyframes ellipsis {
+				from {
+					width: 2px;
+				}
+
+				to {
+					width: 15px;
+				}
+			}
+		}
+	}
+
+	.condition {
+		display: flex;
+		flex-wrap: wrap;
+		width: 90%;
+		box-shadow: 0 0 10rpx #bcb9ca;
+		margin: 0 auto 30rpx;
+
+		.scroll-X {
+			width: 95%;
+			margin: 20rpx auto;
+
+			.tr {
+				display: flex;
+				overflow: hidden;
+
+				.th,
+				.td {
+					display: inline-block;
+					padding: 5rpx;
+					width: 300rpx;
+					text-align: center;
+					height: 52rpx;
+					line-height: 52rpx;
+					border: 2rpx solid #f1f1f1;
+				}
+			}
+
+			.tr:nth-child(2n-1) {
+				background-color: #f5fff8;
+			}
+
+			.tr:first-child {
+				background-color: #57c878;
+				color: #fff;
+			}
+		}
+
+		.pagenumber {
+			display: flex;
+			margin: 20rpx auto;
+
+			button {
+				width: 150rpx;
+				height: 50rpx;
+				line-height: 50rpx;
+				font-size: 26rpx;
+				text-align: center;
+				background-color: #57c878;
+				color: #ffffff;
+			}
+
+			.pagenumber_page {
+				width: 100rpx;
+				height: 50rpx;
+				line-height: 50rpx;
+				font-size: 26rpx;
+				text-align: center;
+			}
+		}
+	}
+</style>

+ 22 - 0
pages/equipList/index.vue

@@ -299,6 +299,13 @@ export default {
             url: "../cb/equip-detail/equip-detail?info=" + JSON.stringify(item),
             url: "../cb/equip-detail/equip-detail?info=" + JSON.stringify(item),
           });
           });
           break;
           break;
+		case 28:
+		item.addtime = item.uptime;
+		item.type = this.type_id;
+		uni.navigateTo({
+			url: "../cb/smallPest/smallPest?info=" + JSON.stringify(item),
+		});
+	  break;
         case 4:
         case 4:
 		item.addtime = item.uptime;
 		item.addtime = item.uptime;
           item.type = this.type_id;
           item.type = this.type_id;
@@ -445,6 +452,21 @@ export default {
 		      url: "../disease/cmb?shebei=" + JSON.stringify(obj),
 		      url: "../disease/cmb?shebei=" + JSON.stringify(obj),
 		    });
 		    });
 		    break;
 		    break;
+			case 27:
+			  var obj = {};
+			  obj.d_id = item.d_id;
+			  obj.device_id = item.imei;
+			  obj.is_online = item.is_online;
+			  obj.lat = item.lat;
+			  obj.lng = item.lng;
+			  obj.equip_name = item.device_name;
+			  obj.uptime = item.uptime;
+			  obj.location = item.address;
+			  obj.type = 26;
+			  uni.navigateTo({
+			    url: "../disease/mls/mls?shebei=" + JSON.stringify(obj),
+			  });
+			  break;
 		  case 25:
 		  case 25:
 			item.addtime = item.uptime;
 			item.addtime = item.uptime;
 		    uni.navigateTo({
 		    uni.navigateTo({

+ 27 - 3
pages/my/index/index.vue

@@ -2,13 +2,13 @@
 	<view>
 	<view>
 		<view class="subject">
 		<view class="subject">
 			<view style="width: 100%;background-color: #FFFFFF;position: relative;">
 			<view style="width: 100%;background-color: #FFFFFF;position: relative;">
-				<view class="personal">
+				<view class="personal" v-if="isLogin">
 					<view class="personal_left">
 					<view class="personal_left">
 						<image :src="userinfos.image" mode="" @error="imageError"></image>
 						<image :src="userinfos.image" mode="" @error="imageError"></image>
 					</view>
 					</view>
 					<view class="personal_center">
 					<view class="personal_center">
 						<p>{{usernames}}</p>
 						<p>{{usernames}}</p>
-						<p>{{userinfos.email?userinfos.email:userinfos.mobile}}</p>
+						<p>{{ userinfos.email || userinfos.mobile }}</p>
 					</view>
 					</view>
 					<view class="personal_right" @click="userinfo">
 					<view class="personal_right" @click="userinfo">
 						<uni-icons type="compose" style="color: #FFFFFF;margin-right: 10rpx;"></uni-icons>
 						<uni-icons type="compose" style="color: #FFFFFF;margin-right: 10rpx;"></uni-icons>
@@ -24,13 +24,24 @@
 					<uni-icons type="arrowright" class="icon_right"></uni-icons>
 					<uni-icons type="arrowright" class="icon_right"></uni-icons>
 				</view>
 				</view>
 			</view>
 			</view>
-			<view style="background-color: #FFFFFF;">
+			<view style="background-color: #FFFFFF;" v-if="isLogin">
 				<view class="quit" @click="outto">
 				<view class="quit" @click="outto">
 					<u-icon name="tuichudenglu" custom-prefix="custom-icon" class="icon_left"></u-icon>
 					<u-icon name="tuichudenglu" custom-prefix="custom-icon" class="icon_left"></u-icon>
 					退出登录
 					退出登录
 					<uni-icons type="arrowright" class="icon_right"></uni-icons>
 					<uni-icons type="arrowright" class="icon_right"></uni-icons>
 				</view>
 				</view>
 			</view>
 			</view>
+			<view style="background-color: #ffffff" v-else>
+			  <view class="quit" @click="handleLogin">
+			    <u-icon
+			      name="tuichudenglu"
+			      custom-prefix="custom-icon"
+			      class="icon_left"
+			    ></u-icon>
+			    去登录
+			    <uni-icons type="arrowright" class="icon_right"></uni-icons>
+			  </view>
+			</view>
 		</view>
 		</view>
 	</view>
 	</view>
 </template>
 </template>
@@ -38,6 +49,7 @@
 	export default {
 	export default {
 		data() {
 		data() {
 			return {
 			return {
+				isLogin: false,
 				usernames: '',
 				usernames: '',
 				userinfos: {},
 				userinfos: {},
 				versions: "",
 				versions: "",
@@ -45,6 +57,12 @@
 			}
 			}
 		},
 		},
 		methods: {
 		methods: {
+			handleLogin() {
+			  console.log('---------------------- login');
+			  uni.navigateTo({
+			    url: '/pages/login/login',
+			  });
+			},
 			async getEquipList() {
 			async getEquipList() {
 				const res = await this.$myRequest({
 				const res = await this.$myRequest({
 					url: '/api/api_gateway?method=home.homes.app_version_record',
 					url: '/api/api_gateway?method=home.homes.app_version_record',
@@ -65,6 +83,12 @@
 			//user.login.user_login_info
 			//user.login.user_login_info
 			//home.homes.personal_center
 			//home.homes.personal_center
 			async getUserlogin() {
 			async getUserlogin() {
+				const session_key = uni.getStorageSync('session_key');
+				this.isLogin = !!session_key;
+				console.log(this.isLogin);
+				if (!this.isLogin) {
+				  return;
+				}
 				const res = await this.$myRequest({
 				const res = await this.$myRequest({
 					url: '/api/api_gateway?method=user.login.user_login_info',
 					url: '/api/api_gateway?method=user.login.user_login_info',
 				})
 				})

+ 19 - 3
util/api.js

@@ -5,9 +5,9 @@ export const myRequest = (options) => {
 	console.log(BASE_URL,'my request',process.env.NODE_ENV)
 	console.log(BASE_URL,'my request',process.env.NODE_ENV)
 	if (BASE_URL == '') {
 	if (BASE_URL == '') {
 		// BASE_URL = 'http://114.55.0.7:8002'//测试
 		// BASE_URL = 'http://114.55.0.7:8002'//测试
-		// BASE_URL = process.env.NODE_ENV === 'development' ? "http://192.168.2.110:8003" : "http://8.136.98.49:8002"
+		// BASE_URL = process.env.NODE_ENV === 'development' ? "http://192.168.2.118:8003" : "http://8.136.98.49:8002"
 		// BASE_URL = process.env.NODE_ENV === 'development' ? "http://114.55.0.7:8002" : "http://8.136.98.49:8002"
 		// BASE_URL = process.env.NODE_ENV === 'development' ? "http://114.55.0.7:8002" : "http://8.136.98.49:8002"
-		BASE_URL = process.env.NODE_ENV === 'development' ? "http://192.168.2.118:8003" : "http://8.136.98.49:8002"
+		BASE_URL = process.env.NODE_ENV === 'development' ? "http://192.168.2.163:8003" : "http://8.136.98.49:8002"
 		// BASE_URL = 'http://192.168.1.77:8002'
 		// BASE_URL = 'http://192.168.1.77:8002'
 	}
 	}
 	// BASE_URL = 'http://192.168.1.52:8003'
 	// BASE_URL = 'http://192.168.1.52:8003'
@@ -51,6 +51,21 @@ export const myRequest = (options) => {
 			},
 			},
 			data: data,
 			data: data,
 			success: (res) => {
 			success: (res) => {
+				if(res.data.errorCode == 403) {
+					uni.removeStorageSync('session_key');
+					uni.showToast({
+						title: '登录已过期,请重新登录!',
+						icon: "none"
+					})
+					if(uni.getStorageSync('isLink')) {
+						return false
+					} else {
+						uni.setStorageSync('isLink', true);
+						return uni.navigateTo({
+							url: '/pages/login/login'
+						});
+					}
+				}
 				if (res.data.message) {
 				if (res.data.message) {
 					if (res.data.message == "识别无结果" ||res.data.message == "该设备未绑定SIM") {
 					if (res.data.message == "识别无结果" ||res.data.message == "该设备未绑定SIM") {
 						resolve(res.data.data)
 						resolve(res.data.data)
@@ -65,7 +80,8 @@ export const myRequest = (options) => {
 			},
 			},
 			fail: (err) => {
 			fail: (err) => {
 				uni.showToast({
 				uni.showToast({
-					title: '请求接口失败'
+					title: '请求接口失败',
+					icon: 'none'
 				})
 				})
 				reject(err)
 				reject(err)
 			}
 			}