yf_elsa.cui 3 недель назад
Родитель
Сommit
f5c6de91a2

+ 29 - 2
App.vue

@@ -1,11 +1,38 @@
 <script>
 	export default {
 		onShow: function() {
-			console.log('App Show')
+			console.log('App Show app页面')
 		},
 		onHide: function() {
 			console.log('App Hide')
-		}
+		},
+		  // 分享给朋友
+		  onShareAppMessage() {
+		    return {
+		      title: '云飞智控', // 分享标题
+		      path: 'pages/index/index', // 分享路径,通常包含页面参数
+		      imageUrl: 'http://www.hnyfwlw.com:8006/data/home_logo/log1.jpg', // 分享图片,可选
+		      success: (res) => {
+		        // 分享成功回调
+		        uni.showToast({
+		          title: '分享成功',
+		          icon: 'success'
+		        })
+		      },
+		      fail: (err) => {
+		        // 分享失败回调
+		        console.log('分享失败', err)
+		      }
+		    }
+		  },
+		  // 分享到朋友圈(基础库2.11.3+)
+		  onShareTimeline() {
+		    return {
+		      title:  '云飞智控', // 分享标题
+		      query: 'id=123', // 页面参数,不同于分享给朋友的path,这里用query
+		      imageUrl: 'http://www.hnyfwlw.com:8006/data/home_logo/log1.jpg' // 分享图片,可选
+		    }
+		  }
 	}
 </script>
 <style lang="scss">

+ 49 - 13
main.js

@@ -10,27 +10,44 @@ Vue.config.productionTip = false;
 App.mpType = 'app';
 
 import config from './util/neutral.js';
-Vue.prototype.$imageURL_58003 = config.imageURL_58003;// 线上图片服务器路径常量 58003
-Vue.prototype.$imageURL = config.imageURL;//8006
-
+Vue.prototype.$imageHost = config.imageHost;// 线上图片服务器路径常量 58003
+Vue.prototype.$imageURL = config.imageURL;
+console.log(Vue.prototype)
 import { QueryPermission } from './util/QueryPermission.js';
 // Vue.use(QueryPermission)
 Vue.prototype.$QueryPermission = QueryPermission;
 
 import customCard from './components/customCard/customCard.vue';
 Vue.component('customCard', customCard);
-Vue.filter('timeFormat', function (time) {
+Vue.filter('timeFormat', function (time,fmt = 'yyyy-MM-dd hh:mm:ss') {
   function fun(a) {
     return String(a).length == 1 ? '0' + a : a;
   }
-  let date = new Date(time * 1000);
-  let y = date.getFullYear();
-  let m = date.getMonth() + 1;
-  let d = date.getDate();
-  let h = date.getHours();
-  let min = date.getMinutes();
-  let sec = date.getSeconds();
-  return `${y}-${fun(m)}-${fun(d)} ${fun(h)}:${fun(min)}:${fun(sec)}`;
+  let $this = new Date(time*1000);
+  let o = {
+    'M+': $this.getMonth() + 1,
+    'd+': $this.getDate(),
+    'h+': $this.getHours(),
+    'm+': $this.getMinutes(),
+    's+': $this.getSeconds(),
+    'q+': Math.floor(($this.getMonth() + 3) / 3),
+    S: $this.getMilliseconds(),
+  };
+  if (/(y+)/.test(fmt)) {
+    fmt = fmt.replace(
+      RegExp.$1,
+      ($this.getFullYear() + '').substr(4 - RegExp.$1.length)
+    );
+  }
+  for (var k in o) {
+    if (new RegExp('(' + k + ')').test(fmt)) {
+      fmt = fmt.replace(
+        RegExp.$1,
+        RegExp.$1.length === 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length)
+      );
+    }
+  }
+  return fmt;
 });
 
 Vue.prototype.formatTime = function (thistime, fmt = 'yyyy-MM-dd hh:mm:ss') {
@@ -60,7 +77,26 @@ Vue.prototype.formatTime = function (thistime, fmt = 'yyyy-MM-dd hh:mm:ss') {
   }
   return fmt;
 };
-
+Vue.mixin({
+  data() {
+    return {
+      $imageURL: Vue.prototype.$imageURL,
+      $imageHost: Vue.prototype.$imageHost,
+      // 其他需要混入的全局变量
+    };
+  },
+  // 如果需要,也可以在created中赋值,但上面这样直接赋值也可以,因为mixin的data会在每个组件创建时合并
+  // 但是注意,如果这些值在运行时改变,那么这种方式可能不会更新,因为data只初始化一次。如果需要在运行时响应变化,可以使用计算属性。
+  // 另一种方式是用计算属性:
+  // computed: {
+  //   $imageURL() {
+  //     return Vue.prototype.$imageURL;
+  //   },
+  //   $imageHost() {
+  //     return Vue.prototype.$imageHost;
+  //   }
+  // }
+});
 const app = new Vue({
   ...App,
 });

+ 3 - 3
manifest.json

@@ -154,9 +154,9 @@
         "devServer" : {
             "port" : 8000,
             "disableHostCheck" : true,
-            "proxy" : {
-                "/ksy" : {
-                    "target" : "http://114.115.147.140:8002",
+			"proxy" : {
+			    "/ksy" : {
+                    "target" : "http://dev.hnyfwlw.com",
                     "changeOrigin" : true,
                     "ws" : true,
                     "pathRewrite" : {

+ 3 - 1
pages.json

@@ -6,7 +6,9 @@
 			"path": "pages/index/index",
 			"style": {
 				"navigationBarTitleText": "首页",
-				"navigationBarBackgroundColor": "#00B075"
+				"navigationBarBackgroundColor": "#00B075",
+				"enableShareAppMessage": true,
+				        "enableShareTimeline": true
 			}
 		},
 		{

+ 1 - 1
pages/afterSale/index.vue

@@ -56,7 +56,7 @@
 	export default {
 		data() {  
 			return {
-				BASE_URL: 'http://114.115.147.140:8002',
+				BASE_URL: 'http://dev.hnyfwlw.com',
 				faultdata: [],
 				title:"",//弹框标题
 				show: false,//弹框先显示

+ 1 - 1
pages/cb/cbd/equip-set/equip-set-new.vue

@@ -463,7 +463,7 @@
 				this.dataSelectShow = true
 		
 				this.singleSelectList = []
-				for (let i = min; i < max; i+=5) {
+				for (let i = min; i < max; i+=1) {
 					this.singleSelectList.push({
 						value:i,
 						label:i.toString()

+ 6 - 5
pages/cb/cbd/equip-set/equip-set-sy2.vue

@@ -50,7 +50,7 @@
 				<u-icon class="arrow" name="arrow-right"></u-icon>
 			</view>
 		</view>
-		<view class="uni-list-cell" @click="shikongshow = true" v-if="equipContrlForm.ctrlMode=='0'">
+		<view class="uni-list-cell" @click="shikongshow = true" v-if="equipContrlForm.ctrlMode=='1'">
 			<span class="tit">
 				时控时长
 			</span>
@@ -60,7 +60,7 @@
 			</view>
 			
 		</view>
-		<view class="uni-list-cell" @click="gkongShow = true" v-if="equipContrlForm.ctrlMode=='1'">
+		<view class="uni-list-cell" @click="gkongShow = true" v-if="equipContrlForm.ctrlMode=='0'">
 			<span class="tit">
 				光控时长
 			</span>
@@ -141,8 +141,8 @@
 					{ value: 0, label: '时控模式' },
 				],
 				syArr:[
-					{ value: 1, label: '光控模式' },
-					{ value: 0, label: '时控模式' }
+					{ value: "0", label: '光控模式' },
+					{ value: "1", label: '时控模式' }
 				  ],
 				tsIndex: 0,
 				imgresArr: ['高', '中', '低'],
@@ -387,6 +387,7 @@
 				this.currentFormKey = formKey
 			},
 			tsArrConfirm(e){
+				console.log(e,'---')
 				this.tsArrLabel = e[0].label
 				this.equipContrlForm.ctrlMode = e[0].value
 			},
@@ -430,7 +431,7 @@
 					return 
 				}
 				this.equipContrlForm = res
-				this.tsArrLabel = res.ctrlMode=='1' ? '光控模式':'时控模式'
+				this.tsArrLabel = res.ctrlMode=='0' ? '光控模式':'时控模式'
 				this.gkongLabel = res.lightDuration + 'h'
 				this.shikongLabel = res.startHour + ':00' +  ' - '+res.endHour + ':00' 
 				console.log(this.equipContrlForm)

+ 4 - 2
pages/cb/cbd/equip-set/new-analyse.vue

@@ -403,7 +403,8 @@
 				forbidden1: false,
 				forbidden2: false,
 				show: false,
-				pest_dict: {}
+				pest_dict: {},
+				device_type:32
 			}
 		},
 		methods: {
@@ -432,7 +433,7 @@
 					url: '/api/api_gateway?method=forecast.worm_lamp.pest_raise_info',
 					data: {
 						d_ids: this.d_id,
-						identify_model: this.modelList[this.identify_model].value,
+						device_type:34,
 						year: this.yservalue,
 					}
 				})
@@ -801,6 +802,7 @@
 		},
 		onLoad(option) {
 			this.d_id = option.d_id
+			this.device_type = option.device_type
 			var date = +new Date()
 			this.oldtime = this.formatTime(date, 'yyyy-MM-dd');
 			this.newtime = this.formatTime(date, 'yyyy-MM-dd');

+ 193 - 154
pages/cb/cbd/equip-set/photoResults.vue

@@ -1,211 +1,238 @@
 <template>
-	<view style="background-color: #f7f7f7;padding-top: 88rpx;height: calc(100vh - 88rpx);">
-		
+	<view style="
+      background-color: #f7f7f7;
+      padding-top: 88rpx;
+      height: calc(100vh - 88rpx);
+    ">
 		<uni-nav-bar @clickLeft="clickLeft" left-icon="back" title="识别结果" backgroundColor="#F7F7F7"></uni-nav-bar>
 		<u-calendar v-model="calendarShow" mode="range" @change="change" @maxDate="maxDate"></u-calendar>
 		<view class="img-result">
 			<view class="tile-item">
-				
-				<view @click="calendarShow = true" class="calendar">{{start_time}} <span style="margin: 0 40rpx;"> -</span> {{end_time}}</view>
-				
+				<view @click="calendarShow = true" class="calendar">{{ start_time }} <span style="margin: 0 40rpx">
+						-</span>
+					{{ end_time }}
+				</view>
 			</view>
 
-		<view class="images_box">
-
-			<view class="canvas-bg">
-				<img v-if="photos.length>0" :src="photos[active].addr+'?x-oss-process=image/resize,w_130/quality,q_90'" alt=""  @click="examine()"/>
-			</view>
-			<view class="image-flex" >
-				<view v-for="(item,index) in photos" :key="index">
-					<image class="my-img" :class="active==index?'active':''" :src="item.addr" @click="imgClick(item,index)" mode=""></image>
+			<view class="images_box">
+				<view class="canvas-bg">
+					<!-- <canvas-mark /> -->
+					<img v-if="photos.length>0"
+						:src="photos[active].addr+'?x-oss-process=image/resize,w_130/quality,q_90'" alt=""
+						@click="examine()" />
+				</view>
+				<view class="image-flex">
+					<view v-for="(item, index) in photos" :key="index">
+						<image class="my-img" :class="active == index ? 'active' : ''" :src="item.addr"
+							@click="imgClick(item, index)" mode=""></image>
+					</view>
 				</view>
 			</view>
-		</view>
-		<view class="information">
-			<view class="btn">
-				<p class="title">当前图片识别结果</p>
-				<u-button size="mini" :loading='respetLoading' class="btn_box" throttle-time="500" @click="resetPest" :customStyle="customStyle">重新识别</u-button>
-			</view>
-			<view class="notip" v-if="isObject(pestResult)">
-				暂无识别结果
-			</view>
-			<view v-else class="information_data" v-for="(value,key) in pestResult">
-				<p> <span>{{key}}</span> <span>{{value}}头</span> </p>
+			<view class="information">
+				<view class="btn">
+					<p class="title">当前图片识别结果</p>
+					<u-button size="mini" :loading="respetLoading" class="btn_box" throttle-time="500"
+						@click="resetPest" :customStyle="customStyle">重新识别</u-button>
+				</view>
+				<view class="notip" v-if="isObject(pestResult)"> 暂无识别结果 </view>
+				<view v-else class="information_data" v-for="(value, key) in pestResult">
+					<p>
+						<span>{{ key }}</span> <span>{{ value }}头</span>
+					</p>
+				</view>
 			</view>
 		</view>
-		
-			
-		</view>
 	</view>
 </template>
 
 <script>
 	import jsencrypt from '@/components/jsencrypt/jsencrypt.vue';
-	import insect_dict from "../../../../static/data/cbd_pest_library.js"
+	// import insect_dict from '../../../../static/data/cbd_pest_library.js';
+	import canvasMark from '@/components/Draw/index.vue';
 	export default {
 		data() {
 			return {
-				maxDate:'2050-12-31',
-				device_type:'',
-				device_id:'',
-				d_id:'',
-				calendarShow:false,
-				start_time:'',
-				end_time:'',
-				photos:[],
-				
-				active:0,
-				respetLoading:false
-			}
+				maxDate: '2050-12-31',
+				device_type: '',
+				device_id: '',
+				d_id: '',
+				calendarShow: false,
+				start_time: '',
+				end_time: '',
+				photos: [],
+
+				active: 0,
+				respetLoading: false,
+				typeName: 1, // 1: 测报灯  2:病虫害可视监测 3:吸虫塔 4:孢子仪 5:毫米虫情测报 6:智慧虫情测报平台(定制)
+				insect_dict: {}
+			};
+		},
+		components: {
+			canvasMark
 		},
-		computed:{
-			customStyle(){
+		computed: {
+			customStyle() {
 				return {
 					background: '#018B3F',
-					fontSize:'12px',
-					border:'none',
-					color:'#fff'
-				}
+					fontSize: '12px',
+					border: 'none',
+					color: '#fff',
+				};
 			},
-			pestResult(){
-				if(this.photos==0){
-					return {}
+			pestResult() {
+				if (this.photos == 0) {
+					return {};
 				}
-				let obj = {}
-				let item = this.photos[this.active]
-				console.log('选中',item)
-				if(item.is_mark==0){
+				let obj = {};
+				let item = this.photos[this.active];
+				
+				if (item.is_mark == 0) {
 					// 机器识别
-					let aiLabel = []
+					let aiLabel = [];
 					if (item.label) {
-					    aiLabel = JSON.parse(item.label.replace(/'/g, '"'))
-						aiLabel.forEach(label => {
-							const text = Object.keys(label)[0]
-							if (obj[insect_dict[text]]) {
-								obj[insect_dict[text]]++
+						aiLabel = JSON.parse(item.label.replace(/'/g, '"'));
+						console.log(this.insect_dict,'---')
+						aiLabel.forEach((label) => {
+							const text = Object.keys(label)[0];
+							if (obj[this.insect_dict[text]]) {
+								obj[this.insect_dict[text]]++;
 							} else {
-								obj[insect_dict[text]] = 1
-							} 
-						})
+								obj[this.insect_dict[text]] = 1;
+							}
+						});
 					}
-				}else{
-					item.mark.forEach(item => {
-					  if (obj[item.text]) {
-						obj[item.text]++
-					  } else {
-						obj[item.text] = 1
-					  }
-					})
+				} else {
+					item.mark.forEach((item) => {
+						if (obj[item.text]) {
+							obj[item.text]++;
+						} else {
+							obj[item.text] = 1;
+						}
+					});
 				}
-				return obj
+				return obj;
 			},
-			previewImages(){
-				let list = []
-				if(this.photos.length>0){
-					this.photos.forEach(photo=>{
-						list.push(photo.addr)
-					})
-					return list
-				}else{
-					return []
+			previewImages() {
+				let list = [];
+				if (this.photos.length > 0) {
+					this.photos.forEach((photo) => {
+						list.push(photo.addr);
+					});
+					return list;
+				} else {
+					return [];
 				}
-				
-			}
+			},
 		},
 		methods: {
 			clickLeft() {
-				uni.navigateBack()
+				uni.navigateBack();
 			},
-			isObject(obj){
-				return Object.keys(obj).length==0
+			isObject(obj) {
+				return Object.keys(obj).length == 0;
 			},
-			change(e){
-				this.start_time = e.startDate 
-				this.end_time = e.endDate 
-				this.page = 1
-				this.photos = []
-				this.getImgData()
+			change(e) {
+				this.start_time = e.startDate;
+				this.end_time = e.endDate;
+				this.page = 1;
+				this.photos = [];
+				this.getImgData();
 			},
-			async getImgData(){
+			async getImgData() {
 				const res = await this.$myRequest({
 					url: '/api/api_gateway?method=new_gateway.photo_info.photo_list',
 					data: {
 						id: this.d_id,
-						device_type_id:this.device_type,
+						device_type_id: this.device_type,
 						page: 1,
 						page_number: 99999,
-						start: +new Date(this.start_time+' 00:00:00') / 1000,
-						end: +new Date(this.end_time+' 23:59:59') / 1000
-					}
-				})
-				this.photos = this.photos.concat(res.data)
-				console.log(this.photos,'---')
+						start: +new Date(this.start_time + ' 00:00:00') / 1000,
+						end: +new Date(this.end_time + ' 23:59:59') / 1000,
+					},
+				});
+				this.photos = this.photos.concat(res.data);
+				console.log(this.photos, '---');
 				// this.photos = res.data
 			},
-			async resetPest(){
-				this.respetLoading = true
+			async resetPest() {
+				this.respetLoading = true;
 				const res = await this.$myRequest({
 					url: '/api/api_gateway?method=new_gateway.photo_info.identify_again',
 					data: {
 						id: this.photos[this.active].id,
-						device_type_id:this.device_type
-					}
-				})
-				this.respetLoading = false
-				if(res.code==2000){
+						device_type_id: this.device_type,
+					},
+				});
+				this.respetLoading = false;
+				if (res.code == 2000) {
 					uni.showToast({
 						title: '操作成功',
-						duration: 2000
-					})
-				}else{
+						duration: 2000,
+					});
+				} else {
 					uni.showToast({
 						title: res.msg,
-						duration: 2000
-					})
+						duration: 2000,
+					});
 				}
 			},
 			examine() {
 				uni.previewImage({
-					urls: this.previewImages
+					urls: this.previewImages,
 				});
 			},
-			imgClick(item,index){
-				this.active = index	
+			imgClick(item, index) {
+				this.active = index;
+			},
+			async getAllPestList() {
+				const res = await this.$myRequest({
+
+					url: '/api/api_gateway?method=forecast.pest_info.pest_dict',
+					data:{type_name: this.typeName}
+				})
+			
+				this.insect_dict = res
+				this.getImgData();
 			}
 		},
 		onLoad(option) {
-			console.log('结果页面:',option)
-			this.device_id = option.device_id
-			this.d_id = option.d_id
-			this.device_type = option.device_type
-			let endTime = +new Date(option.time)/1000 + 60 * 60 * 24
-			let startTime = +new Date(option.time)/1000
-			
-			this.end_time = this.formatTime(endTime*1000,'yyyy-MM-dd')
-			this.start_time = this.formatTime(startTime*1000,'yyyy-MM-dd')
-			this.getImgData()
-		}
-	}
+			console.log('结果页面:', option);
+			this.device_id = option.device_id;
+			this.d_id = option.d_id;
+			this.device_type = option.device_type;
+			let endTime = +new Date(option.time) / 1000 + 60 * 60 * 24;
+			let startTime = +new Date(option.time) / 1000;
+
+			this.end_time = this.formatTime(endTime * 1000, 'yyyy-MM-dd');
+			this.start_time = this.formatTime(startTime * 1000, 'yyyy-MM-dd');
+			this.getAllPestList()
+
+
+		},
+	};
 </script>
 
 <style lang="scss" scoped>
-	/deep/.u-calendar__action {
+	::v-deep .u-calendar__action {
 		display: flex;
 		justify-content: space-around;
-	
+
 		.u-calendar__action__text {
 			line-height: 25px;
 		}
 	}
-	page{
-		background: #F7F7F7;
+
+	page {
+		background: #f7f7f7;
 	}
-	.img-result{
+
+	.img-result {
 		padding: 0rpx 48rpx;
-		background-color: #F7F7F7;
+		background-color: #f7f7f7;
 		// height: calc(100vh - 120rpx);
 	}
-	.tile-item{
+
+	.tile-item {
 		margin-top: 32rpx;
 		// padding: 0rpx 32rpx;
 		box-sizing: border-box;
@@ -213,19 +240,20 @@
 		line-height: 92rpx;
 		display: flex;
 		justify-content: space-between;
-		background: #F7F7F7;
-		.calendar{
+		background: #f7f7f7;
+
+		.calendar {
 			width: 100%;
 			background-color: #fff;
 			border-radius: 24rpx;
 			padding: 0 18rpx;
-			color: #5C5C5C;
+			color: #5c5c5c;
 			text-align: center;
 		}
-		.camera{
-			
-		}
+
+		.camera {}
 	}
+
 	.images_box {
 		width: 100%;
 		height: 742rpx;
@@ -234,15 +262,18 @@
 		box-sizing: border-box;
 		background: #fff;
 		border-radius: 24rpx;
-		.canvas-bg{
+
+		.canvas-bg {
 			height: 558rpx;
 			position: relative;
 			margin-bottom: 16rpx;
-			img{
+
+			img {
 				width: 100%;
 				height: 100%;
 			}
 		}
+
 		.image-flex {
 			width: 100%;
 			overflow-x: scroll;
@@ -251,13 +282,15 @@
 			gap: 20rpx;
 			padding: 10rpx 0;
 			box-sizing: border-box;
+
 			.my-img {
 				width: 96rpx;
 				height: 96rpx;
 				border-radius: 4rpx;
 				opacity: 0.5;
 			}
-			.active{
+
+			.active {
 				border: 4px solid #ccc;
 				animation: borderAnimation 1s;
 				position: relative;
@@ -269,19 +302,23 @@
 
 	.information {
 		padding-bottom: 2rpx;
-		.btn{
+
+		.btn {
 			overflow: hidden;
 		}
+
 		.title {
 			float: left;
 			color: #999999;
 		}
-		.notip{
+
+		.notip {
 			text-align: center;
 			color: #999999;
 			margin-top: 100rpx;
 		}
-		.btn_box{
+
+		.btn_box {
 			float: right;
 			// border-radius: 8rpx;
 			// background: #018B3F;
@@ -289,6 +326,7 @@
 			// color: #fff;
 			// font-size: 24rpx;
 		}
+
 		.information_data {
 			margin: 32rpx 0;
 			display: flex;
@@ -298,21 +336,22 @@
 			line-height: 104rpx;
 			border-radius: 24rpx;
 			padding: 0 32rpx;
+
 			p {
 				// margin-right: 20rpx;
 				font-size: 24rpx;
 				color: #666666;
-				
 			}
 		}
 	}
-	
+
 	@keyframes borderAnimation {
-	  0% { 
-		opacity: 0.5;
-	  }
-	  100% { 
-		opacity: 1;
-	  }
+		0% {
+			opacity: 0.5;
+		}
+
+		100% {
+			opacity: 1;
+		}
 	}
-</style>
+</style>

Разница между файлами не показана из-за своего большого размера
+ 839 - 646
pages/cb/equip-detail/equip-detail-new.vue


+ 2 - 2
pages/disandpests/index.vue

@@ -99,7 +99,7 @@
 				if (this.flag == 2) {
 					// pest.pests.insect_discern 虫害
 					uni.uploadFile({
-						// url: 'http://114.115.147.140:8002/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
+						// url: 'http://dev.hnyfwlw.com/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
 						url: 'https://wx.hnyfwlw.com/api/api_gateway?method=pest.pests.insect_discern', //仅为示例,非真实的接口地址
 						filePath: ev.path,
 						name: 'img_file',
@@ -115,7 +115,7 @@
 				} else if (this.flag == 1) {
 					//pest.pests.insect_discern病害识别
 					uni.uploadFile({
-						// url: 'http://114.115.147.140:8002/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
+						// url: 'http://dev.hnyfwlw.com/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
 						url: 'https://wx.hnyfwlw.com/api/api_gateway?method=pest.pests.plant_discern', //仅为示例,非真实的接口地址
 						filePath: ev.path,
 						name: 'img_file',

+ 3 - 3
pages/discernRecord/discernRecord.vue

@@ -10,7 +10,7 @@
 			<!-- 虫害 -->
 			<view class="plant_ul" v-show="Inv == 0">
 				<view class="plant_li" v-for="(item, index) in insectArr" :key="index">
-					<u-image width="320rpx" height="200rpx"  class="plant_li_img" :src="$imageURL_58003+'/bigservers/' + item.img"></u-image>
+					<u-image width="320rpx" height="200rpx"  class="plant_li_img" :src="$imageHost+'/bigservers/' + item.img"></u-image>
 
 					<view class="plant_liBox">
 						<view class="plant_liBox_top">{{ item.name == '' ? '识别失败' : item.name }}</view>
@@ -26,7 +26,7 @@
 			<!-- 病害 -->
 			<view class="plant_ul" v-show="Inv == 1">
 				<view class="plant_li" v-for="(item, index) in plantArr" :key="index">
-					<u-image width="320rpx" height="200rpx"  class="plant_li_img" :src="$imageURL_58003+'/bigservers/' + item.img"></u-image>
+					<u-image width="320rpx" height="200rpx"  class="plant_li_img" :src="$imageHost+'/bigservers/' + item.img"></u-image>
 
 					<view class="plant_liBox">
 						<view class="plant_liBox_top">{{ item.name == '' ? '识别失败' : item.name }}</view>
@@ -44,7 +44,7 @@
 
 		<!-- 暂无 -->
 		<view class="notDataBox" v-else>
-			<image :src="$imageURL_58003+'/bigservers/' + 'images/detail_11.png'" class="notDataBox_img" mode=""></image>
+			<image :src="$imageHost+'/bigservers/' + 'images/detail_11.png'" class="notDataBox_img" mode=""></image>
 		</view>
 
 		<!-- 返回顶部 -->

+ 135 - 34
pages/distribution/index.vue

@@ -3,7 +3,7 @@
 		<view class="page-body">
 			<view class="utabs">
 				<view style="width: 95%;margin: 0 auto;">
-					<u-tabs :list="list" :is-scroll="true" :current="current" @change="change" item-width="140"
+					<u-tabs :list="list" :is-scroll="true" :current="current" @change="change"
 						font-size="24" gutter="20" bar-width="60" active-color="#42b983"></u-tabs>
 				</view>
 			</view>
@@ -188,39 +188,140 @@
 			serTFs() {
 				this.history()
 			},
-			eqinfo(item) { //设备信息
-				if (this.punctuation_type == '') {
-					uni.showToast({
-						title: '请点击需查看的设备',
-						duration: 2000,
-						icon: "none"
-					});
-				} else {
-					switch (this.punctuation_type) {
-						case 2:
-							uni.navigateTo({
-								url: "../prevention/equipmentdetails?shebei=" + JSON.stringify(item)
-							})
-							break;
-						case 5:
-							uni.navigateTo({
-								url: "../environment/equipment?shebei=" + JSON.stringify(item)
-							})
-							break;
-						case 10:
-							uni.navigateTo({
-								url: "../cb/xy2.0/particulars?info=" + JSON.stringify(item)
-							})
-							break;
-						default:
-							uni.navigateTo({
-								url: "../cb/equip-detail/equip-detail?info=" + JSON.stringify(item)
-							})
-							break;
-					}
-
-				}
-			}
+			async eqinfo(item) { //设备信息
+							item.type = this.punctuation_type
+							if (this.punctuation_type == '') {
+								uni.showToast({
+									title: '请点击需查看的设备',
+									duration: 2000,
+									icon: "none"
+								});
+							} else {
+			
+								const resDefault = await this.$myRequest({
+									url: '/api/api_gateway?method=forecast.worm_lamp.lamp_list',
+									data: {
+										device_type_id: this.punctuation_type,
+										page: 1,
+										page_size: "10",
+										device_id: item.device_id,
+									}
+								})
+								let itemDefault = {
+									...item
+								}
+								if (resDefault.counts == 1) {
+									itemDefault = {
+										...item,
+										...resDefault.data[0]
+									}
+								}
+								switch (this.punctuation_type) {
+									case 15:
+										uni.navigateTo({
+											url: '../environment/gsequipment?shebei=' + JSON.stringify(itemDefault),
+										});
+										break;
+									case 2:
+										uni.navigateTo({
+											url: "../prevention/equipmentdetails?shebei=" + JSON.stringify(itemDefault)
+										})
+										break;
+										// case 3:
+			
+										// case 4:
+										// 	uni.navigateTo({
+										// 		url: "../cb/xy/equip-set/xyhistoryile?d_id=" + this.punctuation_did + "&device_id=" + this.device_id
+										// 	})
+										// 	break;
+									case 5:
+										const res = await this.$myRequest({
+											url: '/api/api_gateway?method=weather.weather.qxz_page',
+											data: {
+												page: 1,
+												device_status: '',
+												page_size: 10,
+												device_id: item.device_id,
+											},
+										})
+										let items = {
+											...item
+										}
+										if (res.nums == 1) {
+											items = {
+												...item,
+												...res.ids[0]
+											}
+										}
+										uni.navigateTo({
+											url: "../environment/equipment?shebei=" + JSON.stringify(items)
+										})
+										break;
+									case 45:
+										const res45 = await this.$myRequest({
+											url: '/api/api_gateway?method=weather.weather.shang_qing_qxz_page',
+											data: {
+												page: 1,
+												page_size: "10",
+												device_id: item.device_id,
+											}
+										})
+										let item45 = {
+											...item
+										}
+										if (res45.nums == 1) {
+											item45 = {
+												...items,
+												...res45.ids[0]
+											}
+										}
+										uni.navigateTo({
+											url: "../environment/equipment?shebei=" + JSON.stringify(item45)
+										})
+										break;
+									case 6:
+										uni.navigateTo({
+											url: "/pages/webview?device_id=" + item.device_id + "&accessToken=" + uni
+												.getStorageSync('session_key')
+										})
+										break;
+									case 43:
+										uni.navigateTo({
+											url: "../fmSys/details?info=" + JSON.stringify(itemDefault)
+										})
+										break;
+									case 44:
+										uni.navigateTo({
+											url: "/pages/webview?device_id=" + item.device_id + "&accessToken=" + uni
+												.getStorageSync('session_key') +
+												'&type=dgp'
+										})
+										break;
+										// case 7:
+										// 	uni.navigateTo({
+										// 		url: "../cb/bzy/equip-set/bzyhistoryile?d_id=" + this.punctuation_did + "&device_id=" + this.device_id
+										// 	})
+										// 	break;
+									case 10:
+										uni.navigateTo({
+											url: "../cb/xy2.0/particulars?info=" + JSON.stringify(itemDefault)
+										})
+										break;
+									case 26:
+									case 11:
+										uni.navigateTo({
+											url: '../disease/cmb?shebei=' + JSON.stringify(itemDefault),
+										});
+										break;
+									default:
+										uni.navigateTo({
+											url: "../cb/equip-detail/equip-detail?info=" + JSON.stringify(itemDefault)
+										})
+										break;
+								}
+			
+							}
+						}
 		}
 	}
 </script>

+ 3 - 3
pages/identifyPest/cerealPlant/cerealPlant.vue

@@ -15,7 +15,7 @@
 
 				<view class="plantList_li_ul">
 					<view class="plantList_li_List" @click="recognizeData(allPlantData[lastTimeIndex].num, allPlantData[lastTimeIndex].name, lastTimeIndex)">
-						<image :lazy-load="true" :src="$imageURL_58003+'/bigservers/' + allPlantData[lastTimeIndex].img" mode=""></image>
+						<image :lazy-load="true" :src="$imageHost+'/bigservers/' + allPlantData[lastTimeIndex].img" mode=""></image>
 						<view class="">
 							{{ allPlantData[lastTimeIndex].name }}
 						</view>
@@ -31,7 +31,7 @@
 
 				<view class="plantList_li_ul">
 					<view @click="recognizeData(item.num, item.name, index)" class="plantList_li_List" v-for="(item, index) in allPlantData" :key="index">
-						<image :src="$imageURL_58003+'/bigservers/' + item.img" mode=""></image>
+						<image :src="$imageHost+'/bigservers/' + item.img" mode=""></image>
 						<view class="">
 							{{ item.name }}
 						</view>
@@ -48,7 +48,7 @@
 
 				<view class="plantList_li_ul">
 					<view class="plantList_li_List" @click="restsData()">
-						<image :src="$imageURL_58003+'/bigservers/' + 'images/detail_9.png'" mode=""></image>
+						<image :src="$imageHost+'/bigservers/' + 'images/detail_9.png'" mode=""></image>
 						<view class="">
 							其他
 						</view>

+ 5 - 5
pages/identifyPest/collect/collect.vue

@@ -21,11 +21,11 @@
 
 						<view class="plant_btmHandle">
 							<view class="plant_btmHandle_cancel" @click="noCollect(index, item.id)">
-								<image :src="$imageURL_58003+'/bigservers/' + 'images/starA.png'" mode="" class="plant_btmHandle_cancelImg"></image>
+								<image :src="$imageHost+'/bigservers/' + 'images/starA.png'" mode="" class="plant_btmHandle_cancelImg"></image>
 								<text class="plant_btmHandle_cancelTxt">取消收藏</text>
 							</view>
 							<view class="plant_btmHandle_record" @click="defail(item.id)">
-								<image :src="$imageURL_58003+'/bigservers/' + 'images/detail_8.png'" class="plant_btmHandle_recordImg" mode=""></image>
+								<image :src="$imageHost+'/bigservers/' + 'images/detail_8.png'" class="plant_btmHandle_recordImg" mode=""></image>
 								<text class="plant_btmHandle_recordTxt">查看详情</text>
 							</view>
 						</view>
@@ -48,11 +48,11 @@
 
 						<view class="plant_btmHandle">
 							<view class="plant_btmHandle_cancel"  @click="noCollect(index, item.id)">
-								<image :src="$imageURL_58003+'/bigservers/' + 'images/starA.png'" mode="" class="plant_btmHandle_cancelImg"></image>
+								<image :src="$imageHost+'/bigservers/' + 'images/starA.png'" mode="" class="plant_btmHandle_cancelImg"></image>
 								<text class="plant_btmHandle_cancelTxt">取消收藏</text>
 							</view>
 							<view class="plant_btmHandle_record" @click="defail(item.id)">
-								<image :src="$imageURL_58003+'/bigservers/' + 'images/detail_8.png'" class="plant_btmHandle_recordImg" mode=""></image>
+								<image :src="$imageHost+'/bigservers/' + 'images/detail_8.png'" class="plant_btmHandle_recordImg" mode=""></image>
 								<text class="plant_btmHandle_recordTxt">查看详情</text>
 							</view>
 						</view>
@@ -64,7 +64,7 @@
 
 		<!-- 暂无 -->
 		<view class="notDataBox" v-else>
-			<image :src="$imageURL_58003+'/bigservers/' + 'images/detail_11.png'" class="notDataBox_img" mode=""></image>
+			<image :src="$imageHost+'/bigservers/' + 'images/detail_11.png'" class="notDataBox_img" mode=""></image>
 		</view>
 
 

+ 3 - 3
pages/identifyPest/economicsPlant/economicsPlant.vue

@@ -21,7 +21,7 @@
             "
           >
             <image
-              :src= "$imageURL_58003+'/bigservers/' +
+              :src= "$imageHost+'/bigservers/' +
                 allPlantData[lastTimeIndex].img
               "
               mode=""
@@ -45,7 +45,7 @@
             :key="index"
           >
             <image
-              :src="$imageURL_58003+'/bigservers/' + item.img"
+              :src="$imageHost+'/bigservers/' + item.img"
               mode=""
             ></image>
             <view class="">
@@ -64,7 +64,7 @@
 
 				<view class="plantList_li_ul">
 					<view class="plantList_li_List" @click="restsData()">
-						<image :src="$imageURL_58003+'/bigservers/' + 'images/detail_9.png'" mode=""></image>
+						<image :src="$imageHost+'/bigservers/' + 'images/detail_9.png'" mode=""></image>
 						<view class="">
 							其他
 						</view>

+ 3 - 3
pages/identifyPest/fruitsPlant/fruitsPlant.vue

@@ -14,7 +14,7 @@
 
 				<view class="plantList_li_ul">
 					<view class="plantList_li_List" @click="recognizeData(allPlantData[lastTimeIndex].num, allPlantData[lastTimeIndex].name, lastTimeIndex)">
-						<image :src="$imageURL_58003+'/bigservers/' + allPlantData[lastTimeIndex].img" mode=""></image>
+						<image :src="$imageHost+'/bigservers/' + allPlantData[lastTimeIndex].img" mode=""></image>
 						<view class="">
 							{{ allPlantData[lastTimeIndex].name }}
 						</view>
@@ -31,7 +31,7 @@
 				<view class="plantList_li_ul">
 					<view @click="recognizeData(item.num, item.name, index)" class="plantList_li_List" v-for="(item, index) in allPlantData"
 					 :key="index">
-						<image :src="$imageURL_58003+'/bigservers/' + item.img" mode=""></image>
+						<image :src="$imageHost+'/bigservers/' + item.img" mode=""></image>
 						<view class="">
 							{{ item.name }}
 						</view>
@@ -48,7 +48,7 @@
 
 				<view class="plantList_li_ul">
 					<view class="plantList_li_List" @click="restsData()">
-						<image :src="$imageURL_58003+'/bigservers/' + 'images/detail_9.png'" mode=""></image>
+						<image :src="$imageHost+'/bigservers/' + 'images/detail_9.png'" mode=""></image>
 						<view class="">
 							其他
 						</view>

+ 17 - 17
pages/identifyPest/guidance/guidance.vue

@@ -5,7 +5,7 @@
 			<view class="fingerpost_li">
 				<!-- 标题 -->
 				<view class="fingerpost_tltBox">
-					<image :src="$imageURL_58003+'/bigservers/' + 'images/Photoguide_1.png'" mode=""></image>
+					<image :src="$imageHost+'/bigservers/' + 'images/Photoguide_1.png'" mode=""></image>
 					<view class="fingerpost_tltBox_div">
 						<view class="fingerpost_tltBox_divtlt">
 							作物分类
@@ -24,9 +24,9 @@
 				<!-- 例图 -->
 				<view class="fingerpost_illustration">
 					<view class="illustration_true">
-						<image :src="$imageURL_58003+'/bigservers/' + 'images/Photoguide_4.png'" class="illustration_true_img" mode=""></image>
+						<image :src="$imageHost+'/bigservers/' + 'images/Photoguide_4.png'" class="illustration_true_img" mode=""></image>
 						<view class="illustration_true_div">
-							<image :src="$imageURL_58003+'/bigservers/' + 'images/detail_4.png'" class="illustration_true_divIcon" mode=""></image>
+							<image :src="$imageHost+'/bigservers/' + 'images/detail_4.png'" class="illustration_true_divIcon" mode=""></image>
 							<view class="illustration_true_divTxt">
 								正确
 							</view>
@@ -34,9 +34,9 @@
 					</view>
 					
 					<view class="illustration_true">
-						<image :src="$imageURL_58003+'/bigservers/' + 'images/Photoguide_5.png'" class="illustration_true_img" mode=""></image>
+						<image :src="$imageHost+'/bigservers/' + 'images/Photoguide_5.png'" class="illustration_true_img" mode=""></image>
 						<view class="illustration_true_div">
-							<image style="width: 40rpx; height: 40rpx; margin: 10rpx 0 0 0;" :src="$imageURL_58003+'/bigservers/' + 'images/detail_3.png'" class="illustration_true_divIcon" mode=""></image>
+							<image style="width: 40rpx; height: 40rpx; margin: 10rpx 0 0 0;" :src="$imageHost+'/bigservers/' + 'images/detail_3.png'" class="illustration_true_divIcon" mode=""></image>
 							<view class="illustration_true_divTxt">
 								错误
 							</view>
@@ -48,7 +48,7 @@
 			<view class="fingerpost_li">
 				<!-- 标题 -->
 				<view class="fingerpost_tltBox">
-					<image :src="$imageURL_58003+'/bigservers/' + 'images/Photoguide_2.png'" mode=""></image>
+					<image :src="$imageHost+'/bigservers/' + 'images/Photoguide_2.png'" mode=""></image>
 					<view class="fingerpost_tltBox_div">
 						<view class="fingerpost_tltBox_divtlt">
 							拍摄清晰
@@ -67,9 +67,9 @@
 				<!-- 例图 -->
 				<view class="fingerpost_illustration">
 					<view class="illustration_true">
-						<image :src="$imageURL_58003+'/bigservers/' + 'images/Photoguide_4.png'" class="illustration_true_img" mode=""></image>
+						<image :src="$imageHost+'/bigservers/' + 'images/Photoguide_4.png'" class="illustration_true_img" mode=""></image>
 						<view class="illustration_true_div">
-							<image :src="$imageURL_58003+'/bigservers/' + 'images/detail_4.png'" class="illustration_true_divIcon" mode=""></image>
+							<image :src="$imageHost+'/bigservers/' + 'images/detail_4.png'" class="illustration_true_divIcon" mode=""></image>
 							<view class="illustration_true_divTxt">
 								正确
 							</view>
@@ -77,9 +77,9 @@
 					</view>
 					
 					<view class="illustration_true">
-						<image :src="$imageURL_58003+'/bigservers/' + 'images/Photoguide_6.png'" class="illustration_true_img" mode=""></image>
+						<image :src="$imageHost+'/bigservers/' + 'images/Photoguide_6.png'" class="illustration_true_img" mode=""></image>
 						<view class="illustration_true_div">
-							<image style="width: 40rpx; height: 40rpx; margin: 10rpx 0 0 0;" :src="$imageURL_58003+'/bigservers/' + 'images/detail_3.png'" class="illustration_true_divIcon" mode=""></image>
+							<image style="width: 40rpx; height: 40rpx; margin: 10rpx 0 0 0;" :src="$imageHost+'/bigservers/' + 'images/detail_3.png'" class="illustration_true_divIcon" mode=""></image>
 							<view class="illustration_true_divTxt">
 								错误
 							</view>
@@ -91,7 +91,7 @@
 			<view class="fingerpost_li">
 				<!-- 标题 -->
 				<view class="fingerpost_tltBox">
-					<image :src="$imageURL_58003+'/bigservers/' + 'images/Photoguide_3.png'" mode=""></image>
+					<image :src="$imageHost+'/bigservers/' + 'images/Photoguide_3.png'" mode=""></image>
 					<view class="fingerpost_tltBox_div">
 						<view class="fingerpost_tltBox_divtlt">
 							适当距离
@@ -110,9 +110,9 @@
 				<!-- 例图 -->
 				<view class="fingerpost_illustration">
 					<view class="illustration_true">
-						<image :src="$imageURL_58003+'/bigservers/' + 'images/Photoguide_4.png'" class="illustration_true_img" mode=""></image>
+						<image :src="$imageHost+'/bigservers/' + 'images/Photoguide_4.png'" class="illustration_true_img" mode=""></image>
 						<view class="illustration_true_div">
-							<image :src="$imageURL_58003+'/bigservers/' + 'images/detail_4.png'" class="illustration_true_divIcon" mode=""></image>
+							<image :src="$imageHost+'/bigservers/' + 'images/detail_4.png'" class="illustration_true_divIcon" mode=""></image>
 							<view class="illustration_true_divTxt">
 								正确
 							</view>
@@ -120,9 +120,9 @@
 					</view>
 					
 					<view class="illustration_true">
-						<image :src="$imageURL_58003+'/bigservers/' + 'images/Photoguide_7.png'" class="illustration_true_img" mode=""></image>
+						<image :src="$imageHost+'/bigservers/' + 'images/Photoguide_7.png'" class="illustration_true_img" mode=""></image>
 						<view class="illustration_true_div">
-							<image style="width: 40rpx; height: 40rpx; margin: 10rpx 0 0 0;" :src="$imageURL_58003+'/bigservers/' + 'images/detail_3.png'" class="illustration_true_divIcon" mode=""></image>
+							<image style="width: 40rpx; height: 40rpx; margin: 10rpx 0 0 0;" :src="$imageHost+'/bigservers/' + 'images/detail_3.png'" class="illustration_true_divIcon" mode=""></image>
 							<view class="illustration_true_divTxt">
 								错误
 							</view>
@@ -137,8 +137,8 @@
 			<view class="referenceBtn">
 				参考图片
 			</view>
-			<image :src="$imageURL_58003+'/bigservers/' + 'images/Photoguide_8.png'" class="referenceIcon" mode=""></image>
-			<image :src="$imageURL_58003+'/bigservers/' + 'images/Photoguide_9.png'" class="referenceIcon" mode=""></image>
+			<image :src="$imageHost+'/bigservers/' + 'images/Photoguide_8.png'" class="referenceIcon" mode=""></image>
+			<image :src="$imageHost+'/bigservers/' + 'images/Photoguide_9.png'" class="referenceIcon" mode=""></image>
 		</view>
 	</view>
 </template>

+ 5 - 5
pages/identifyPest/identifyPest.vue

@@ -17,7 +17,7 @@
           :key="index"
         >
           <image
-            :src="$imageURL_58003+'/bigservers/' + item.url"
+            :src="$imageHost+'/bigservers/' + item.url"
             mode=""
             class="photograph_list_img"
           ></image>
@@ -26,7 +26,7 @@
     </view>
 
     <!-- 拍照指南 -->
-    <image :src="$imageURL_58003+'/bigservers/' + 'images/home_5.png'" @click="photoGuide('/pages/identifyPest/guidance/guidance')"
+    <image :src="$imageHost+'/bigservers/' + 'images/home_5.png'" @click="photoGuide('/pages/identifyPest/guidance/guidance')"
 		 class="photo_img" mode=""></image>
 
     <!-- 更多操作 -->
@@ -36,12 +36,12 @@
 				<text class="operation_txt">更多操作</text>
 			</view>
 			<view class="operation_ul">
-				<image @click="photoGuide('/pages/repository/repository')" :src="$imageURL_58003+'/bigservers/' + 'images/home_6.png'"
+				<image @click="photoGuide('/pages/repository/repository')" :src="$imageHost+'/bigservers/' + 'images/home_6.png'"
 				 class="operation_left" mode=""></image>
 				<view class="operation_list">
-					<image @click="photoGuide('/pages/discernRecord/discernRecord')" :src="$imageURL_58003+'/bigservers/' + 'images/home_7.png'"
+					<image @click="photoGuide('/pages/discernRecord/discernRecord')" :src="$imageHost+'/bigservers/' + 'images/home_7.png'"
 					 class="operation_rightTop" mode=""></image>
-					<image @click="photoGuide('/pages/collect/collect')" :src="$imageURL_58003+'/bigservers/' + 'images/home_8.png'"
+					<image @click="photoGuide('/pages/collect/collect')" :src="$imageHost+'/bigservers/' + 'images/home_8.png'"
 					 class="operation_rightBottom" mode=""></image>
 				</view>
 			</view>

+ 3 - 3
pages/identifyPest/identifyPestIndex/identifyPestIndex.vue

@@ -13,7 +13,7 @@
 		            lastTimeIndex
 		          )
 		        ">
-						<image :src="$imageURL_58003+'/bigservers/' +
+						<image :src="$imageHost+'/bigservers/' +
 		            (identifyPestObj[type].data)[lastTimeIndex].img
 		          " mode=""></image>
 						<view class="">
@@ -30,7 +30,7 @@
 				<view class="plantList_li_ul">
 					<view @click="recognizeData(item.num, item.name, index)" class="plantList_li_List"
 						v-for="(item, index) in (identifyPestObj[type].data)" :key="index">
-						<image :src="$imageURL_58003+'/bigservers/' + item.img" mode=""></image>
+						<image :src="$imageHost+'/bigservers/' + item.img" mode=""></image>
 						<view class="">
 							{{ item.name }}
 						</view>
@@ -47,7 +47,7 @@
 		
 					<view class="plantList_li_ul">
 						<view class="plantList_li_List" @click="restsData()">
-							<image :src="$imageURL_58003+'/bigservers/' + 'images/detail_9.png'" mode=""></image>
+							<image :src="$imageHost+'/bigservers/' + 'images/detail_9.png'" mode=""></image>
 							<view class="">
 								其他
 							</view>

+ 1 - 1
pages/identifyPest/recognizeFail/recognizeFail.vue

@@ -30,7 +30,7 @@
 				<view class="failTxt_listTop">
 					示例照片
 				</view>
-				<image class="failTxt_listImg" :src="$imageURL_58003+'/bigservers/' + 'images/Photoguide_4.png'" mode=""></image>
+				<image class="failTxt_listImg" :src="$imageHost+'/bigservers/' + 'images/Photoguide_4.png'" mode=""></image>
 				<view class="failTxt_listBtnBox">
 					<u-button @click="returnInterface" class="failTxt_listBtn" type="success" shape="circle" size="medium">再拍一张</u-button>
 				</view>

+ 3 - 3
pages/identifyPest/repository/repository.vue

@@ -40,7 +40,7 @@
 			</view>
 			<!-- 暂无 -->
 			<view class="notDataBox" v-else>
-				<image :src="$imageURL_58003+'/bigservers/' + 'images/detail_11.png'" class="notDataBox_img" mode=""></image>
+				<image :src="$imageHost+'/bigservers/' + 'images/detail_11.png'" class="notDataBox_img" mode=""></image>
 			</view>
 
 			<!--  -->
@@ -51,7 +51,7 @@
 
 		<!-- 搜索 -->
 		<view class="searchBox" v-else>
-			<!-- <image class="searchBox_img" :src="$imageURL_58003+'/bigservers/' + 'images/search.gif'" mode=""></image> -->
+			<!-- <image class="searchBox_img" :src="$imageHost+'/bigservers/' + 'images/search.gif'" mode=""></image> -->
 			<view v-if="isShow">
 				<!-- 虫害 -->
 				<view class="" v-show="Inv == 0">
@@ -80,7 +80,7 @@
 			</view>
 			<!-- 暂无 -->
 			<view class="notDataBox" v-else>
-				<image :src="$imageURL_58003+'/bigservers/' + 'images/detail_11.png'" class="notDataBox_img" mode=""></image>
+				<image :src="$imageHost+'/bigservers/' + 'images/detail_11.png'" class="notDataBox_img" mode=""></image>
 			</view>
 
 			<!--  -->

+ 3 - 3
pages/identifyPest/vegetablesPlant/vegetablesPlant.vue

@@ -15,7 +15,7 @@
 
 				<view class="plantList_li_ul">
 					<view class="plantList_li_List" @click="recognizeData(allPlantData[lastTimeIndex].num, allPlantData[lastTimeIndex].name, lastTimeIndex)">
-						<image :src="$imageURL_58003+'/bigservers/' + allPlantData[lastTimeIndex].img" mode=""></image>
+						<image :src="$imageHost+'/bigservers/' + allPlantData[lastTimeIndex].img" mode=""></image>
 						<view class="">
 							{{ allPlantData[lastTimeIndex].name }}
 						</view>
@@ -31,7 +31,7 @@
 
 				<view class="plantList_li_ul">
 					<view @click="recognizeData(item.num, item.name, index)" class="plantList_li_List" v-for="(item, index) in allPlantData" :key="index">
-						<image :src="$imageURL_58003+'/bigservers/' + item.img" mode=""></image>
+						<image :src="$imageHost+'/bigservers/' + item.img" mode=""></image>
 						<view class="">
 							{{ item.name }}
 						</view>
@@ -48,7 +48,7 @@
 
 				<view class="plantList_li_ul">
 					<view class="plantList_li_List" @click="restsData()">
-						<image :src="$imageURL_58003+'/bigservers/' + 'images/detail_9.png'" mode=""></image>
+						<image :src="$imageHost+'/bigservers/' + 'images/detail_9.png'" mode=""></image>
 						<view class="">
 							其他
 						</view>

+ 32 - 4
pages/index/index.vue

@@ -135,6 +135,33 @@
 
 <script>
 	export default {
+		// 分享给朋友
+		onShareAppMessage() {
+		  return {
+		    title: '云飞智控', // 分享标题
+		    path: 'pages/index/index', // 分享路径,通常包含页面参数
+		    imageUrl: 'http://www.hnyfwlw.com:8006/data/home_logo/log1.jpg', // 分享图片,可选
+		    success: (res) => {
+		      // 分享成功回调
+		      uni.showToast({
+		        title: '分享成功',
+		        icon: 'success'
+		      })
+		    },
+		    fail: (err) => {
+		      // 分享失败回调
+		      console.log('分享失败', err)
+		    }
+		  }
+		},
+		// 分享到朋友圈(基础库2.11.3+)
+		onShareTimeline() {
+		  return {
+		    title:  '云飞智控', // 分享标题
+		    query: 'id=123', // 页面参数,不同于分享给朋友的path,这里用query
+		    imageUrl: 'http://www.hnyfwlw.com:8006/data/home_logo/log1.jpg' // 分享图片,可选
+		  }
+		},
 		data() {
 			return {
 				weatherinfo: {
@@ -157,7 +184,7 @@
 				},
 				show: false,
 				url: '',
-				loadTF: false,
+				loadTF: false
 			};
 		},
 		watch: {
@@ -334,7 +361,7 @@
 			//     console.log('111');
 			//     // pest.pests.insect_discern 虫害
 			//     uni.uploadFile({
-			//       // url: 'http://114.115.147.140:8002/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
+			//       // url: 'http://dev.hnyfwlw.com/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
 			//       url: 'https://wx.hnyfwlw.com/api/api_gateway?method=pest.pests.insect_discern', //仅为示例,非真实的接口地址
 			//       filePath: ev.path,
 			//       name: 'img_file',
@@ -363,7 +390,7 @@
 			//     // 	title: '加载中'
 			//     // });
 			//     uni.uploadFile({
-			//       // url: 'http://114.115.147.140:8002/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
+			//       // url: 'http://dev.hnyfwlw.com/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
 			//       url: 'https://wx.hnyfwlw.com/api/api_gateway?method=pest.pests.plant_discern', //仅为示例,非真实的接口地址
 			//       filePath: ev.path,
 			//       name: 'img_file',
@@ -509,7 +536,8 @@
 			}
 		},
 		onLoad() {
-			console.log(this.$isneutral);
+		
+			console.log(this.$imageURL)
 			var time = new Date();
 			var hours = time.getHours();
 			if (hours < 12) {

+ 1 - 1
pages/login/login.vue

@@ -59,7 +59,7 @@
 				setbgtf: false,
 				setTF: false,
 				value: "http://8.136.98.49:8002",
-				httparr: ["http://8.136.98.49:8002", "http://114.115.147.140:8002"],
+				httparr: ["http://8.136.98.49:8002", "http://dev.hnyfwlw.com"],
 				arrowtf: false,
 				showA: false, //
 				contentA: '',

+ 1 - 1
pages/monitor/imagelist.vue

@@ -27,7 +27,7 @@
 					</view>
 					<view class="imglist_right">
 						<view class="icon_box" @click="delimg(item.photo_id)">
-							<p class="iconfont icon-shanchu">删除</p>
+							<p class="yficonfont icon-shanchu">删除</p>
 						</view>
 						<p style="color: #06B535;">{{item.addtime|timeFormat()}}</p>
 					</view>

+ 2 - 2
pages/monitor/sim.vue

@@ -92,9 +92,9 @@
 					this.state = arr[res.data.data.account_status]
 					this.simnew = "旧"
 				}
-				this.siminfo = res.data
+				this.siminfo = res.data||{data:{}}
 				this.loding = false
-				console.log(this.siminfo.data)
+				console.log(res)
 			},
 			clickLeft() {
 				uni.navigateBack({

+ 1 - 1
pages/my/about/about.vue

@@ -119,7 +119,7 @@
 			// },
 			// upgrade() {
 			// 	console.log(this.appName)
-			// 	var url = "http://114.115.147.140:8002/app_file/" + this.appName
+			// 	var url = "http://dev.hnyfwlw.com/app_file/" + this.appName
 			// 	console.log(url)
 			// 	const downloadTask = uni.downloadFile({
 			// 		url: url, //仅为示例,并非真实的资源

+ 30 - 13
pages/prevention/index.vue

@@ -3,13 +3,26 @@
 		<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" left-text="返回" title="防治系统" right-icon="search"
-					@clickRight="clickRight" size="16"></uni-nav-bar>
-				<view class="inputs" :style="{'width':width+'rpx'}">
+			
+				<!-- <view class="inputs" :style="{'width':width+'rpx'}">
+					<u-icon name="search" size="40" class="icon" @click="search"></u-icon>
 					<input type="text" value="" placeholder="请输入设备ID或设备名称" v-model="imports" @input="searchinp"
 						class="inputbox" :clearable="false" />
-					<u-icon name="search" size="40" class="icon" @click="search"></u-icon>
-				</view>
+					
+				</view> -->
+				<uni-nav-bar  @clickLeft="clickLeft">
+					    <block slot="left">
+					            <view class="city" >
+					              <uni-icons type="back" color="#666" size="16" /> 返回
+					            </view>
+					          </block>
+							  <view class="inputs" :style="{'width':width+'rpx'}">
+							  	<u-icon name="search" size="36" class="icon" @click="search"></u-icon>
+							  	<input type="text" value="" placeholder="请输入设备ID或设备名称" v-model="imports" @input="searchinp"
+							  		class="inputbox" :clearable="false" />
+							  	
+							  </view>
+					</uni-nav-bar>
 			</view>
 			<image :src="$imageURL+'/bigdata_app'+'/image/prevention/1.png'" mode="" class="image">
 			</image>
@@ -90,7 +103,7 @@
 				isTop: false,
 				filtrateTF: false,
 				device_status: "",
-				width: 0,
+				width: 380,
 				imports: "", //搜索内容
 				loadingtf: false, //loading
 				show: false,
@@ -151,7 +164,7 @@
 						page_size: "10",
 						device_status: this.device_status,
 						device_id: this.imports,
-						device_model:this.equipArr[this.active].device_model
+						device_model:this.equipArr[this.active].device_model>0?this.equipArr[this.active].device_model: ""
 					}
 				})
 				this.loadingtf = false
@@ -295,23 +308,27 @@
 		background-color: #E4E4E4;
 		border-radius: 27rpx;
 		position: absolute;
-		right: 20rpx;
-		top: 24rpx;
+		left: 150rpx;
+		top: 17rpx;
 		transition: width 0.5s;
 		overflow: hidden;
 		padding-top: 8rpx;
 		box-sizing: border-box;
-
+		padding-left: 16rpx;
 		.inputbox {
 			width: 85%;
-			text-indent: 1rem;
+			// text-indent: 2rem;
 			font-size: 26rpx;
+			padding-left: 50rpx;
 		}
 
 		.icon {
+			// float: left;
+			color: #666;
 			position: absolute;
-			top: 8rpx;
-			right: 26rpx;
+			top: -12rpx;
+			left: 16rpx;
+			
 		}
 	}
 

+ 2 - 2
pages/webview/webview.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="webview">
-		<web-view :src="url" id="webcon">
+		<web-view :src="url" id="webcon"  cache-control="no-cache">
 		</web-view>
 	</view>
 </template>
@@ -18,7 +18,7 @@
 			this.device_id = options.device_id
 			this.accessToken = uni.getStorageSync('session_key')
 			
-			this.url = "https://wx.hnyfwlw.com/wexin/index.html?device_id=" + this.device_id + "&accessToken=" + this.accessToken
+			this.url = "https://wx.hnyfwlw.com/wexin/h52.html?device_id=" + this.device_id + "&accessToken=" + this.accessToken
 			// this.url = "http://192.168.2.167:5500/index.html?device_id=" + this.device_id + "&accessToken=" + this.accessToken
 			// this.url = "https://demo.nyzhwlw.com/wechat?device_id=" + this.device_id + "&accessToken=" + this.accessToken
 			//设置 webview 界面的状态栏的 title

+ 1 - 1
util/neutral.js

@@ -6,5 +6,5 @@ export default {
   productAPI:'https://api.hnyfwlw.com',//生产环境
   // imageURL:'http://www.hnyfwlw.com:8006',//图片访问路径
   imageURL:'https://s3.hnyfwlw.com/webstaticimg',//图片访问路径原8006端口
-  imageURL_58003:'https://s3.hnyfwlw.com/bigdata-image'//原58003端口
+  imageHost:'https://s3.hnyfwlw.com/bigdata-image'//原58003端口
 };