Преглед на файлове

Merge branch 'develop' of http://code.nyzhwlw.com:10202/yf_zhb/bigdata_WX into develop

leo преди 2 дни
родител
ревизия
798949f4ec

+ 1 - 0
pages.json

@@ -62,6 +62,7 @@
 			"style": {
 				"navigationBarTitleText": "个人中心",
 				"enablePullDownRefresh": false,
+				"navigationStyle": "custom",
 				"navigationBarBackgroundColor": "#00B075"
 			}
 		}

BIN
pages/assets/logout.png


BIN
pages/assets/personBg.png


BIN
pages/assets/personIcon.png


+ 7 - 2
pages/banner/index.vue

@@ -1,11 +1,13 @@
 <template>
   <view class="banner-ad">
-    <view class="device-detail__header">
+    <view
+      class="device-detail__header"
+      @click="handleBack"
+    >
       <u-icon
         size="36"
         class="arrow-left"
         name="arrow-left"
-        @click="handleBack"
       ></u-icon>
     </view>
     <image :src="bannerURL" mode="" class="banner-image"></image>
@@ -35,8 +37,11 @@ export default {
     position: absolute;
     top: 32rpx;
     left: 32rpx;
+    width:88rpx;
+    height: 48rpx;
     z-index: 999;
     color:#fff;
+    margin-top: 64rpx;
   }
   .banner-image{
     width: 100%;

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

@@ -21,7 +21,7 @@
 				<u-picker v-model="pickertfone" mode="selector" @confirm="confirmFun" :default-selector="[yserindex]"
 					:range="yearlist"></u-picker>
 				<view class="schedule" @click="pickertfworm=!pickertfworm">
-					<p class="schedule_value">{{wormvalue}}</p>
+					<p class="schedule_value">{{wormvalue || ''}}</p>
 					<!-- {{titletext[indexone]}} -->
 					<p class="schedule_icon">
 						<u-icon name="arrow-down"></u-icon>
@@ -71,12 +71,12 @@
 					:default-value="defaultValue"></u-select>
 			</view>
 			<view >
-			<view class="tendency">
+			<view class="tendency" v-show="!pickertfone && !pickertfworm && !tiemshow">
 				<canvas  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="tendency">
+			<view  class="tendency" v-show="!pickertfone && !pickertfworm && !tiemshow">
 				<canvas v-if="progresslist.length>0" canvas-id="canvasRing" id="canvasRing" class="charts" @touchstart="touchRing"
 					: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 class="" v-else style="margin-top: 20px;">

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

@@ -37,7 +37,7 @@
 			</view>
 			<view v-if="type==4">
 				<text space="emsp">诱芯更新时间</text>
-				<text style="margin: 0 10px;">{{equipInfo.xy_uptime}}</text>
+				<text style="margin: 0 10px;">{{formatTime(equipInfo.xy_uptime * 1000)}}</text>
 			</view>
 			<view v-if="type==4">
 				<text space="emsp">诱芯到期时间</text>

+ 1 - 1
pages/cb/sy/imgList.vue

@@ -31,7 +31,7 @@
 					</view>
 					<view class="imglist_right">
 						<view class="">
-							{{item.time}}
+							{{timetab(item.addtime)}}
 						</view>
 						<view class="">
 							害虫数量:{{item.pest_counts}}

+ 122 - 15
pages/cbd/components/deviceData.vue

@@ -60,7 +60,7 @@
         </view>
         <view class="data-column-right">
           <view class="device-image-container">
-            <image class="device-image" src="https://s3.hnyfwlw.com/webstaticimg/bigdata_app/image/cbd.png" mode="aspectFit"></image>
+            <image class="device-image" :src="formatDevImg" mode="aspectFit"></image>
           </view>
         </view>
       </view>
@@ -86,7 +86,7 @@
       <view class="chart-content">
         <view class="chart-canvas-container" v-if="!show" :key="chartKey">
           <!-- <div id="tempChart" class="chart-canvas"></div> -->
-		      <qiun-data-charts type="line" :chartData="chartData" :canvas2d="true" :inScrollView="true" />
+		      <qiun-data-charts type="line" :chartData="chartData" :canvas2d="true" :inScrollView="true" :opts="opts" :ontouch="true" v-show="xData.length"/>
         </view>
       </view>
     </view>
@@ -110,7 +110,7 @@
                 class="fixed-row"
                 :class="{ even: index % 2 === 0 }"
               >
-                <text class="body-cell fixed">{{ formatTime(item.addtime) }}</text>
+                <view class="body-cell fixed">{{ formatTime(item.addtime) }}</view>
               </view>
             </view>
           </view>
@@ -189,7 +189,7 @@
           </view>
           <view class="sim-item">
             <text class="sim-label">已使用:</text>
-            <text class="sim-value"><text style="color: #0BBC58">{{ deviceInfoStatic.used }}</text>/{{ deviceInfoStatic.total }}</text>
+            <text class="sim-value"><text style="color: #0BBC58">{{ deviceInfoStatic.used || ''}}</text>/{{ deviceInfoStatic.total || '' }}</text>
           </view>
           <view class="sim-item">
             <text class="sim-value">
@@ -221,15 +221,18 @@
       </view>
       <view slot="expanded">
         <view class="general-images">
-          <view class="general-image edit-border" @click="editData">
+          <view class="general-image edit-border" :class="{'edit-border2':isShowPhoto}" @click="editData">
             <image :src="editBorder" class="image-icon"></image>
           </view>
-          <view class="general-image sim-border" @click="simData">
+          <view class="general-image sim-border" :class="{'sim-border2':isShowPhoto}" @click="simData">
             <image :src="simBorder" class="image-icon"></image>
           </view>
-          <view class="general-image setting-border" @click="openSettings">
+          <view class="general-image setting-border" :class="{'setting-border2':isShowPhoto}" @click="openSettings">
             <image :src="settingBorder" class="image-icon"></image>
           </view>
+          <view class="general-image photo-border" @click="openPhoto" v-if="isShowPhoto">
+            <image :src="photoBorder" class="image-icon"></image>
+          </view>
         </view>
       </view>
     </floatButton>
@@ -246,6 +249,7 @@ import general from '../assets/general.png';
 import editBorder from '../assets/editBorder.png';
 import settingBorder from '../assets/settingBorder.png';
 import simBorder from '../assets/simBorder.png';
+import photoBorder from '../assets/photoBorder.png';
 let chartInstance = null;
 
 export default {
@@ -283,22 +287,22 @@ export default {
   components: {
     floatButton,
   },
-  computed:{
-    totalPages(){
-      return Math.ceil(this.totalPage / this.page_size)
-    }
-  },
   data() {
     return {
       setting,
       general,
       editBorder,
       settingBorder,
+      photoBorder,
       simBorder,
+      devImage:'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/image/cbd.png',
+      baseDevice:'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/image',
+      devImg:'',
       activeTab: 0,
       edit,
       sim,
       show:false,
+      isShowPhoto:false,
       show1:true,
       equipStateDict:{},
       chartTabs: [
@@ -306,6 +310,37 @@ export default {
         { name: '湿度', id: 'new_hum' },
         { name: '加热仓温度', id: 'others' },
       ],
+      opts: {
+        type: 'line',
+        xAxis: {
+          disableGrid: true,
+          itemCount: 3,
+          scrollShow: true
+        },
+        yAxis: {
+          disableGrid: true,
+          gridType: 'dash',
+          splitNumber: 5,
+          min: 0,
+          format: (val) => {
+            return Math.round(val)
+          }
+        },
+        extra: {
+          line: {
+            type: 'curve'
+          },
+          tooltip: {
+            format: {
+              name: '',
+              value: (val) => Math.round(val)
+            }
+          }
+        },
+        legend: {
+        },
+        enableScroll: true
+      },
       xData:[],
       yData:[],
       activeChartTab: 0,
@@ -321,12 +356,47 @@ export default {
   mounted(){
     this.equipStateDict = Circulation
   },
+  computed: {
+    totalPages(){
+      return Math.ceil(this.totalPage / this.page_size) || 1
+    },
+    formatDevImg() {
+      return `https://s3.hnyfwlw.com/webstaticimg/bigdata_app/image/${this.devImg}.png`;
+    },
+  },
   watch:{
     polylineList:{
       handler(newVal, oldVal){
         this.xData = newVal.map(item => this.formatDate(new Date(item.addtime)));
         this.yData = newVal.map(item => Number(item.new_tem) || 0);
-        this.initChart();
+        if(this.xData.length){
+          this.initChart();
+        }
+      },
+      deep:true,
+      immediate:true,
+    },
+    deviceInfo:{
+      handler(newVal, oldVal){
+        if (newVal.device_model == '11'){
+          this.devImg = 'cbd4.1'
+          this.isShowPhoto = true
+        } else if(newVal.device_model == '12'){
+          this.devImg = 'cbd1'
+          this.isShowPhoto = false
+        } else if(newVal.device_model == '13'){
+          this.devImg = 'cbd5'
+          this.isShowPhoto = true
+        } else if(newVal.device_model == '14'){
+          this.devImg = 'cbd6'
+          this.isShowPhoto = true
+        } else if(newVal.device_model == '15'){
+          this.devImg = 'gkcbd1'
+          this.isShowPhoto = false
+        } else{
+          this.devImg = 'cbd'
+          this.isShowPhoto = true
+        }
       },
       deep:true,
       immediate:true,
@@ -345,6 +415,20 @@ export default {
     },
   },
   methods: {
+    async openPhoto(){
+       const res = await this.$myRequest({
+        url: '/api/api_gateway?method=forecast.send_control.admin_device_control',
+        method: 'POST',
+        data: {
+          device_type_id: this.deviceInfo.type,
+          d_id: this.deviceInfo.d_id,
+          cmd: 'takephoto',
+        },
+      });
+      if(res){
+        this.$u.toast('拍照成功')
+      }
+    },
     editData(){
       uni.navigateTo({
         url: '/pages/afterSale/addafter?d_id=' + this.deviceInfo.d_id +'&device_id='+this.deviceInfo.id + '&device_type=' + this.deviceInfo.type,
@@ -598,8 +682,9 @@ export default {
       });
     },
     updateChartsData(){
+      const categories = this.xData.length ? this.xData : [];
       const lineData = {
-        categories: this.xData,
+        categories,
         series: [
           {
             name: this.chartTabs[this.activeChartTab].name,
@@ -694,6 +779,7 @@ export default {
   display: flex;
   align-items: center;
   justify-content: center;
+  background: #ffffff;
   transition: all 0.3s ease;
   box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
   .general-icon{
@@ -712,6 +798,7 @@ export default {
     width: 80rpx;
     height: 80rpx;
     border-radius: 50%;
+    background: #ffffff;
     box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
     display:flex;
     align-items: center;
@@ -733,6 +820,22 @@ export default {
     top: -40rpx;
     left: -180rpx;
   }
+  .edit-border2{
+    top: 60rpx;
+    left: -70rpx;
+  }
+  .sim-border2{
+    top: -75rpx;
+    left: -150rpx;
+  }
+  .setting-border2{
+    top: 20rpx;
+    left: -150rpx;
+  }
+  .photo-border{
+    top: -135rpx;
+    left: -70rpx;
+  }
 }
 /* 主要数据面板 */
 .main-data-panel {
@@ -999,7 +1102,7 @@ export default {
 
       /* 固定列 */
       .fixed-column {
-        width: 240rpx;
+        width: 250rpx;
         position: relative;
         z-index: 2;
         background: #FFFFFF;
@@ -1037,6 +1140,10 @@ export default {
               color: #042118;
               text-align: left;
               padding-left: 0;
+              // 超出隐藏
+              overflow: hidden;
+              text-overflow: ellipsis;
+              white-space: nowrap;
             }
           }
         }

+ 8 - 1
pages/cbd/components/photoImage.vue

@@ -1,6 +1,9 @@
 <template>
   <view class="photo-image">
-    <view class="photo-image__tabs">
+    <view
+      class="photo-image__tabs"
+      v-if="disableShow"
+    >
       <view
         class="photo-image__tab"
         v-for="(pest, index) in pestList"
@@ -36,6 +39,10 @@
 <script>
 export default {
   props:{
+    disableShow:{
+      type: Boolean,
+      default: true
+    },
     pestList:{
       type: Array,
       default: () => []

+ 14 - 7
pages/cbd/detail.vue

@@ -69,6 +69,7 @@
       </view>
       <view v-if="activeTab === 'viewImage'">
         <photoImage
+          :disableShow="disableShow"
           :images="imageList"
           :pestList="pestList"
           @changeTab="changeTab"
@@ -122,8 +123,8 @@ export default {
       maxDate: this.formatDate(new Date()),
       minDate: this.formatDate(new Date(new Date().getFullYear(), 0, 1)),
       show: false,
-      // 当前年份的第一天 格式2026-01-01 月份和日期小于10的时候前面加个0
-      startDate: this.formatDate(new Date(new Date().getFullYear(), 0, 1)),
+      // 当前日期向前推30天 格式2026-01-01 月份和日期小于10的时候前面加个0
+      startDate: this.formatDate(new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000)),
       endDate: this.formatDate(new Date()),
       mode: 'range',
       imageList: [],
@@ -183,6 +184,7 @@ export default {
         this.disableShow = false;
         if(showStatus){
           this.activeTab = 'viewImage';
+          this.handleTabClick('viewImage');
         }
       }else{
         this.disableShow = true;
@@ -210,13 +212,19 @@ export default {
     confirmHandler(e){
       this.currentYear = this.selectorRange[e].id;
       if(this.currentYear == new Date().getFullYear()){
-        this.startDate = this.formatDate(new Date(new Date().getFullYear(), 0, 1));
-        this.endDate = this.formatDate(new Date());
+        // 结束日期为this.endDate的月份和日期加上选择的年份
+        const timeDate = this.currentYear + '-' + this.endDate.split('-')[1] + '-' + this.endDate.split('-')[2];
+        this.endDate = this.formatDate(new Date(timeDate));
+        // 开始日期为结束日期前30天
+        this.startDate = this.formatDate(new Date(new Date(this.endDate).getTime() - 30 * 24 * 60 * 60 * 1000));
         this.maxDate = this.formatDate(new Date());
         this.minDate = this.formatDate(new Date(new Date().getFullYear(), 0, 1));
       }else{
-        this.startDate = this.formatDate(new Date(this.currentYear, 0, 1));
-        this.endDate = this.formatDate(new Date(this.currentYear, 11, 31));
+        // 结束日期为this.endDate的月份和日期加上选择的年份
+        const timeDate = this.currentYear + '-' + this.endDate.split('-')[1] + '-' + this.endDate.split('-')[2];
+        this.endDate = this.formatDate(new Date(timeDate));
+        // 开始日期为结束日期前30天
+        this.startDate = this.formatDate(new Date(new Date(this.endDate).getTime() - 30 * 24 * 60 * 60 * 1000));
         this.maxDate = this.formatDate(new Date(this.currentYear, 11, 31));
         this.minDate = this.formatDate(new Date(this.currentYear, 0, 1));
       }
@@ -396,7 +404,6 @@ export default {
   .device-detail__header {
     width: 100%;
     font-size: 28rpx;
-    color: #999;
     color: #042118;
     font-family: 'Source Han Sans CN VF';
     font-weight: 700;

+ 7 - 1
pages/deviceDetails/weatherStation/eleDetail.vue

@@ -73,6 +73,7 @@
 
       <view class="chart-container" v-if="hasData">
         <canvas
+          v-show="!show"
           canvas-id="temperatureChart"
           id="temperatureChart"
           class="chart"
@@ -506,7 +507,9 @@ export default {
   padding: 0 32rpx;
   padding-top: 98rpx;
 }
-
+.nav-title{
+  text-align: center;
+}
 .date-picker {
   display: flex;
   align-items: center;
@@ -606,6 +609,7 @@ export default {
       padding-left: 16rpx;
       margin-left: 16rpx;
       cursor: pointer;
+      display: none;
     }
   }
   /* 展开后的要素容器样式 */
@@ -648,6 +652,8 @@ export default {
     position: relative;
     padding: 10rpx;
     overflow: hidden;
+    height: 336rpx;
+    z-index:0;
     .chart {
       width: 100%;
       height: 336rpx;

+ 1 - 1
pages/disease/cmb.vue

@@ -13,7 +13,7 @@
 						<image :src="$imageURL+'/bigdata_app/image/environment/fuzhi.png'" mode=""
 							class="tishi"></image>
 					</p>
-					<p>设备名称:{{ eqinfo.device_name || eqinfo.name || "无" }}</p>
+					<p>设备名称:{{ eqinfo.device_name || eqinfo.name || eqinfo.equip_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>

+ 33 - 55
pages/environment/gshistory.vue

@@ -41,12 +41,10 @@
 							<th class="th" v-for="(item,index) in thdata" :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.uptime|timeFormat()}}</td>
-							<td class="td">{{items.ats}}</td>
-							<td class="td">{{items.at}}</td>
+							<td class="td">{{items.upl_time|timeFormat()}}</td>
 							<td class="td" v-for="(item,index) in items.temp" :key="'c'+index">{{item}}</td>
 							<td class="td" v-for="(item,index) in items.swc" :key="'d'+index">{{item}}</td>
-							<td class="td">{{items.atm}}</td>
+							<td class="td" v-for="(item,index) in items.ecs" :key="'e'+index">{{item}}</td>
 						</tr>
 						<tr class="tr" v-if="forbidden">
 							<td class="td" v-for="item in 13">暂无数据</td>
@@ -80,9 +78,7 @@
 				dataloadingtf: true,
 				canvastishiTF: false,
 				device_id: '', //设备ID
-				thdata: ["上传时间", "空气湿度(%RH)", "空气温度(℃)", "10cm土壤温度(%RH)", "20cm土壤温度(%RH)", "30cm土壤温度(%RH)", "10cm土壤湿度(%RH)", "20cm土壤湿度(%RH)", "30cm土壤湿度(%RH)",
-					"大气压强(Pa)"
-				], //表格抬头
+				thdata: ["上传时间"], //表格抬头
 				forbidden: false,
 				historylistdata: [], //历史数据
 				pagesum: 1,
@@ -129,59 +125,41 @@
 				var arr1 = []
 				var arr2 = []
 				var xtitle = []
-				var obj = [{
-					name: '空气温度',
-					data: [],
-					color: '#00E29D'
-				}, {
-					name: '空气湿度',
-					data: [],
-					color: '#6CBBFF'
-				}]
-				var arr3 = []
+				var obj = []
 				var k = 0
 				for (var i = 0; i < res.dat_char.length; i++) {
-					var times = new Date(res.dat_char[i].uptime * 1000)
+					var times = new Date(res.dat_char[i].upl_time * 1000)
 					xtitle.unshift(times.getMonth() + 1 + "/" + times.getDate() + "-" + times.getHours() + ":" + times
 						.getMinutes())
-					arr1.unshift(res.dat_char[i].at == "" ? "0" : res.dat_char[i].at) //空气温度
-					arr2.unshift(res.dat_char[i].ats == "" ? "0" : res.dat_char[i].ats) //空气湿度
-					res.dat_char[i].temp = res.dat_char[i].temp.split(",")
-					res.dat_char[i].swc = res.dat_char[i].swc.split(",")
-					res.dat_char[i].ecs = res.dat_char[i].ecs.split(",")
-					for (var j = 0; j < res.dat_char[i].temp.length; j++) {
-						arr3.unshift(res.dat_char[i].temp[j] == "" ? "0" : res.dat_char[i].temp[j]) //10cm土壤温度
-					}
+					const temp = res.dat_char[i].temp.split(",")
+					const swc = res.dat_char[i].swc.split(",")
+					const ecs = res.dat_char[i].ecs.split(",")
 					this.thdata.length = 1;
 					res.depth.split(',').forEach((dep, index) => {
 						this.thdata.push(`${dep}cm土壤温度(℃)`)
-						res.dat_char[i].temp.forEach((items, indexs) => {
-							var tempdata = [];
-							var tempdatas = [];
-							var ecsarr = [];
-							tempdata.push(Number(items));
-							tempdatas.push(Number(res.dat_char[i].swc[indexs]));
-							if((res.dat_char[i]).ecs[indexs]) {
-								ecsarr.push(Number(res.dat_char[i].ecs[indexs]));
-							}
-							var temparrs = {
-								name: dep + "cm土壤温度(℃)",
-								data: tempdata,
-							};
-							var temparr = {
-								name: dep + "cm土壤湿度(%RH)",
-								data: tempdatas,
-							};
-							var ecsparr = {
-								name: dep + "cm电导率(ms/cm)",
-								data: ecsarr,
-							};
-							obj.push(temparr);
-							obj.push(temparrs);
-							if(ecsarr.length > 0) {
-								obj.push(ecsparr);
-							}
-						});
+						var tempdata = [];
+						var tempdatas = [];
+						var ecsarr = [];
+						tempdata.push(Number(temp[index]));
+						tempdatas.push(Number(swc[index]));
+						ecsarr.push(Number(ecs[index]));
+						var temparrs = {
+							name: dep + "cm土壤温度(℃)",
+							data: tempdata,
+						};
+						var temparr = {
+							name: dep + "cm土壤湿度(%RH)",
+							data: tempdatas,
+						};
+						var ecsparr = {
+							name: dep + "cm电导率(ms/cm)",
+							data: ecsarr,
+						};
+						obj.push(temparr);
+						obj.push(temparrs);
+						if(ecsarr.length > 0) {
+							obj.push(ecsparr);
+						}
 					})
 					res.depth.split(',').forEach((dep, index) => {
 						this.thdata.push(`${dep}cm土壤湿度(%RH)`)
@@ -207,8 +185,8 @@
 						data: el.data,
 					});
 				});
-				console.log(listArr)
-				if(listArr.length==0){
+				console.log(listArr,'listArrlistArrlistArr')
+				if(listArr.length == 0){
 					this.canvastishiTF = false
 				}else{
 					this.canvastishiTF = true

+ 7 - 2
pages/equipList2/index.vue

@@ -16,9 +16,10 @@
 								<view class="text">{{ getSlice(item.purview_name) }}</view>
 							</view>
 						</view>
+						<u-empty v-if="!menuList.length && !loading" :image-size="100" text="暂无设备权限,请联系工作人员添加"></u-empty>
 					</view>
 				</view>
-				<view class="listbox">
+				<view class="listbox" v-if="menuList.length">
 				<view class="second-tab">
 					<view class="tab-box">
 						<view
@@ -118,6 +119,7 @@
 			return {
 				list: [],
         pur_id: '',
+				loading: false,
 				currentPur_id:'',
         device_status: '',
         counts:0,
@@ -167,6 +169,7 @@
       },
 			async getUserlogin() {
         this.list = [];
+				this.loading = true;
 				const res = await this.$myRequest({
 					url: '/api/api_gateway?method=user.login.user_login_info',
 					method: 'POST',
@@ -174,6 +177,7 @@
 						is_app: 1,
 					},
 				});
+				this.loading = false;
         res.forEach(item=>{
           item.icon = '/bigdata_app/newImg/home/sqjd.png'
         })
@@ -284,7 +288,7 @@
       },
 			historys(item) {
 				const type_id = item.type_id;
-				item.pur_id = this.currentPur_id;
+				item.pur_id = this.pur_id;
 				switch (type_id) {
 					// 水肥新设备
 					case 22:
@@ -384,6 +388,7 @@
 					case 35:
 						item.addtime = item.uptime;
 						item.type = item.type_id;
+						console.log(item,'itemitmeteitmeimtei')
 						uni.navigateTo({
 							url: '../cb/equip-detail/equip-detail-new?info=' +
 								JSON.stringify(item),

+ 159 - 88
pages/equipList2/seabox/modification.vue

@@ -1,40 +1,60 @@
 <template>
-	<view>
-		<view class="status_bar"></view>
-		<view class="" style="position: relative;top: 40px;">
-			<view style="position: fixed;z-index: 100;">
-				<uni-nav-bar @clickLeft="clickLeft" left-icon="back" title="修改名称"></uni-nav-bar>
+	<view class="modification">
+		<view class="modification__header">
+      <u-icon
+        size="36"
+        class="arrow-left"
+        name="arrow-left"
+        @click="handleBack"
+      ></u-icon>
+			信息修改
+    </view>
+		<view class="modification__content">
+			<view class="modification__content__item">
+				<view class="modification__content__item__title">
+					设备名称
+				</view>
+				<view class="modification__content__item__input">
+					<u-input v-model="moddata.device_name" placeholder="请输入设备名称" clearable class="input" :custom-style="{ 'text-align': 'right' }"></u-input>
+				</view>
 			</view>
-			<view class="mod">
-				<view class="mod_name">
-					<p>设备名称</p>
-					<input type="text" v-model="moddata.device_name" :class="quanxian.namealter?'namebg':''" />
+			<view class="modification__content__item">
+				<view class="modification__content__item__title">
+					设备ID
 				</view>
-				<view class="mod_id">
-					<p>设备ID</p>
-					<input type="text" :value="moddata.imei || moddata.device_id || moddata.id" disabled />
+				<view class="modification__content__item__input">
+					<u-input disabled :value="moddata.imei || moddata.device_id || moddata.id" placeholder="请输入设备ID" clearable class="input" :custom-style="{ 'text-align': 'right' }"></u-input>
 				</view>
-				<view class="mod_user">
-					<p>适配用户</p>
-					<input type="text" :value="moddata.real_name==''?'无':moddata.real_name" disabled />
+			</view>
+			<view class="modification__content__item">
+				<view class="modification__content__item__title">
+					适配用户
 				</view>
-				<view class="mod_city" @click="amendcity">
-					<view style="width: 90%;">
-						<p><span style="color: #ff0000;" v-if="quanxian.cityalter">*</span>设备位置</p>
-						<input type="text" :value="city" disabled />
-					</view>
+				<view class="modification__content__item__input">
+					<u-input disabled :value="moddata.real_name || '无'" placeholder="请输入用户名" clearable class="input" :custom-style="{ 'text-align': 'right' }"></u-input>
+				</view>
+			</view>
+			<view class="modification__content__item">
+				<view class="modification__content__item__title">
+					设备位置
+				</view>
+				<view class="modification__content__item__input" @click.native="amendcity">
+					<view class="location-city">{{ city }}</view>
 					<u-icon name="arrow-right"></u-icon>
 				</view>
-				<view class="mod_time">
-					<p>设备添加时间</p>
-					<input type="text" :value="moddata.addtime|timeFormat()" disabled />
+			</view>
+			<view class="modification__content__item">
+				<view class="modification__content__item__title">
+					设备添加时间
 				</view>
-				<p style="width: 90%;margin: 0 auto;text-align: right;color: #06B535;"><span style="color: #ff0000;">*</span>为可修改</p>
-				<view class="sub" @click="btn">
-					提 交
+				<view class="modification__content__item__input">
+					<u-input disabled :value="moddata.addtime | timeFormat()" placeholder="请输入设备添加时间" clearable class="input" :custom-style="{ 'text-align': 'right' }"></u-input>
 				</view>
 			</view>
 		</view>
+		<view class="sub" @click="btn">
+			提 交
+		</view>
 	</view>
 </template>
 
@@ -45,6 +65,8 @@
 				moddata: [],
 				city: "",
 				selectcityTF: false,
+				locationCity: "",
+				locationName: "",
 				quanxian:{
 					namealter:false,
 					cityalter:false,
@@ -53,7 +75,12 @@
 			}
 		},
 		methods: {
-			async eqlistcity(lat, lng) { //修改设备定位
+			handleBack() {
+				uni.navigateBack({
+					delta: 1
+				});
+			},
+			async eqlistcity(lat, lng) {
 				const res = await this.$myRequest({
 					url: '/api/api_gateway?method=forecast.worm_lamp.revise_device',
 					data: {
@@ -62,8 +89,7 @@
 						lng: lng
 					}
 				})
-				console.log(res)
-				if (res==false) {
+				if (!res) {
 					uni.showToast({
 						title: '修改地址失败!',
 						icon: "none"
@@ -75,7 +101,7 @@
 					});
 				}
 			},
-			async eqlistname(lat, lng) { //修改设备名称
+			async eqlistname(lat, lng) {
 				const res = await this.$myRequest({
 					url: '/api/api_gateway?method=forecast.worm_lamp.revise_device',
 					data: {
@@ -85,8 +111,7 @@
 						lng: lng,
 					}
 				})
-				console.log(res)
-				if (res==false) {
+				if (!res) {
 					uni.showToast({
 						title: '修改名称失败!',
 						icon: "none"
@@ -102,7 +127,7 @@
 					this.clickLeft()
 				}
 			},
-			async eqlistuser(id, imei,device_model) { //获取设备信息
+			async eqlistuser(id, imei,device_model) {
 				const res = await this.$myRequest({
 					url: '/api/api_gateway?method=forecast.worm_lamp.lamp_list',
 					data: {
@@ -114,7 +139,7 @@
 				this.moddata = res.data[0]
 				this.selectaddress(this.moddata.lng, this.moddata.lat)
 			},
-			async xyeqlistuser(imei) { //获取设备信息
+			async xyeqlistuser(imei) {
 				const res = await this.$myRequest({
 					url: '/api/api_gateway?method=sex_lure_nl.sex_lure.nl_device_list',
 					data: {
@@ -125,24 +150,53 @@
 				this.selectaddress(this.moddata.lng, this.moddata.lat)
 			},
 			btn() {
-				// this.eqlistcity(this.moddata.lat, this.moddata.lng)
 				this.eqlistname(this.moddata.lat, this.moddata.lng)
 			},
 			clickLeft() {
 				uni.navigateBack({
 					delta:1,
 					success:()=>{
-						//告知上一页刷新数据
 						uni.$emit('refreshData')
 					}
 				})
 			},
-			amendcity() { //修改设备地址
-				this.selectcityTF = true
-				uni.navigateTo({
-					url: "/pages/fourBase/city"
+			getCity({city}){
+				if(city.city == undefined){
+					var add = city
+				}else if(city.city != undefined){
+					var add = city.city
+				}
+				let pages = getCurrentPages()
+				let prevpage = pages[pages.length - 2]
+				prevpage.$vm.city = add
+				uni.navigateBack({
+					delta: 1
 				})
 			},
+			selectedCity(city){
+				this.getCity && this.getCity({city});
+			},
+			location(){
+				let That = this;
+				uni.chooseLocation({
+				  success(res){
+						uni.setStorage({
+							key:"location",
+							data:[res.longitude,res.latitude]
+						})
+						That.city = res && res.address;
+						That.locationName = res && res.name;
+						That.selectedCity({city:That.city,name:That.locationName});
+				  },
+					fail(){
+						That.locationCity = "定位失败,请点击重试";
+						That.locationName = "";
+					}
+				});
+			},
+			amendcity() {
+				this.location()
+			},
 			selectaddress(lng, lat) { //获取分布位置
 				uni.request({
 					type: "GET",
@@ -150,7 +204,6 @@
 						"&key=27273b81090f78759e4057f94474516f&radius=1000&extensions=all",
 					dataType: "json",
 					complete: ress => {
-						// console.log(ress)
 						if (ress.data.regeocode.formatted_address.length == 0) {
 							this.city = "--"
 						} else {
@@ -161,7 +214,7 @@
 			},
 		},
 		onLoad(option) {
-			if(option.id==10){
+			if(option.id == 10){
 				const data = JSON.parse(option.data)
 				this.xyeqlistuser(data.device_id || data.id)
 			}else{
@@ -171,23 +224,22 @@
 			uni.getStorage({
 				key:"jurisdiction",
 				success:(res)=>{
-					console.log(res,'resresres')
 					if(!res?.data){
 						return;
 					}
 					let items = JSON.parse(res.data).filter((item)=>{
 						return item.purview_name == "设备管理"
 					})
-					let items2 = items[0].children.filter((item)=>{
+					let items2 = items[0]?.children?.filter((item)=>{
 						return item.purview_name == "设备列表"
 					})
-					this.quanxian.namealter = items2[0].children.some((item)=>{
+					this.quanxian.namealter = items2[0]?.children?.some((item)=>{
 						return item.purview_name == "修改名称"
 					})
-					this.quanxian.cityalter = items2[0].children.some((item)=>{
+					this.quanxian.cityalter = items2[0]?.children?.some((item)=>{
 						return item.purview_name == "添加位置"
 					})
-					this.quanxian.infoalter = items2[0].children.some((item)=>{
+					this.quanxian.infoalter = items2[0]?.children?.some((item)=>{
 						return item.purview_name == "修改名称" || item.purview_name == "添加位置"
 					})
 				},
@@ -197,66 +249,84 @@
 			uni.getStorage({
 				key: "location",
 				success: (res) => {
-					// console.log(res);
 					this.moddata.lat = res.data[1]
 					this.moddata.lng = res.data[0]
 					this.selectaddress(this.moddata.lng, this.moddata.lat)
 				}
 			})
-			
 		}
 	}
 </script>
 
 <style lang="scss">
 	page{
-		background-color: #FAFAFA;
+		background: linear-gradient(180deg, #ffffff00 0%, #F5F6FA 23.64%, #F5F6FA 100%), linear-gradient(102deg, #BFEADD 6.77%, #B8F1E7 40.15%, #B9EEF5 84.02%);
 	}
-	.mod {
+	.modification{
+		display: flex;
 		width: 100%;
-		position: absolute;
-		top: 44px;
-		.mod_name,
-		.mod_id,
-		.mod_user,
-		.mod_time {
-			width: 90%;
-			margin: 30rpx auto;
-			display: flex;
-			justify-content: space-between;
-			background-color: #FFFFFF;
-			padding: 20rpx 10rpx;
-			color: #57C77A;
-			line-height: 50rpx;
-			.namebg{
-				background-color: #FAFAFA;
-			}
-			input {
-				text-align: right;
-				font-size: 28rpx;
-				padding: 10rpx;
+		height: calc(100vh - 112rpx);
+		padding-top: 112rpx;
+		flex-direction: column;
+		align-items: center;
+		overflow-y: scroll;
+		&__header{
+			width: 100%;
+			font-size: 28rpx;
+			color: #042118;
+			font-family: 'Source Han Sans CN VF';
+			font-weight: 700;
+			position: relative;
+			text-align: center;
+			.arrow-left {
+				position: absolute;
+				left: 32rpx;
+				margin-right: 12rpx;
 			}
 		}
-		.mod_city{
-			width: 90%;
-			margin: 30rpx auto;
-			background-color: #FFFFFF;
-			padding: 20rpx 10rpx;
-			color: #57C77A;
-			line-height: 50rpx;
+		&__content{
+			width: calc(100% - 64rpx);
+			margin-top: 32rpx;
+			background: #ffffff;
+			border-radius: 16rpx;
+			padding: 32rpx;
+			box-sizing: border-box;
+		}
+		&__content__item{
 			display: flex;
+			width: 100%;
+			margin-bottom: 32rpx;
 			justify-content: space-between;
-			.namebg{
-				background-color: #FAFAFA;
-			}
-			input {
-				width: 90%;
+			align-items: center;
+		}
+		&__content__item__title{
+			width: 180rpx;
+			font-size: 28rpx;
+			color: #333333;
+			font-family: 'Source Han Sans CN VF';
+		}
+		&__content__item__input{
+			font-size: 26rpx;
+			color: #042118;
+			font-family: 'Source Han Sans CN VF';
+			font-weight: 400;
+			display:flex;
+			align-items: center;
+			.location-city{
 				font-size: 28rpx;
-				padding: 10rpx;
+				color:#333333;
+			}
+			.u-icon--right{
+				color:#999999;
+				margin-left: 12rpx;
+			}
+			.input{
+				font-size: 26rpx;
+				text-align: right;
+				width: 100%;
+				color: #333333;
 			}
 		}
-	}
-
 	.sub {
 		width: 90%;
 		margin: 30rpx auto;
@@ -264,7 +334,8 @@
 		height: 70rpx;
 		line-height: 70rpx;
 		background-color: #57C77A;
-		border-radius: 35rpx;
+		border-radius: 16rpx;
 		color: #FFFFFF;
 	}
+	}
 </style>

+ 270 - 0
pages/equipList2/seabox/modificationOld.vue

@@ -0,0 +1,270 @@
+<template>
+	<view>
+		<view class="status_bar"></view>
+		<view class="" style="position: relative;top: 40px;">
+			<view style="position: fixed;z-index: 100;">
+				<uni-nav-bar @clickLeft="clickLeft" left-icon="back" title="修改名称"></uni-nav-bar>
+			</view>
+			<view class="mod">
+				<view class="mod_name">
+					<p><span style="color: #ff0000;">*</span>设备名称</p>
+					<input type="text" v-model="moddata.device_name" :class="quanxian.namealter?'namebg':''" />
+				</view>
+				<view class="mod_id">
+					<p>设备ID</p>
+					<input type="text" :value="moddata.imei || moddata.device_id || moddata.id" disabled />
+				</view>
+				<view class="mod_user">
+					<p>适配用户</p>
+					<input type="text" :value="moddata.real_name==''?'无':moddata.real_name" disabled />
+				</view>
+				<view class="mod_city" @click="amendcity">
+					<view style="width: 90%;">
+						<p><span style="color: #ff0000;">*</span>设备位置</p>
+						<input type="text" :value="city" disabled />
+					</view>
+					<u-icon name="arrow-right"></u-icon>
+				</view>
+				<view class="mod_time">
+					<p>设备添加时间</p>
+					<input type="text" :value="moddata.addtime|timeFormat()" disabled />
+				</view>
+				<p style="width: 90%;margin: 0 auto;text-align: right;color: #06B535;"><span style="color: #ff0000;">*</span>为可修改</p>
+				<view class="sub" @click="btn">
+					提 交
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				moddata: [],
+				city: "",
+				selectcityTF: false,
+				quanxian:{
+					namealter:false,
+					cityalter:false,
+					infoalter:false
+				}
+			}
+		},
+		methods: {
+			async eqlistcity(lat, lng) { //修改设备定位
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=forecast.worm_lamp.revise_device',
+					data: {
+						device_id: this.moddata.imei || this.moddata.device_id || this.moddata.id,
+						lat: lat,
+						lng: lng
+					}
+				})
+				console.log(res)
+				if (res==false) {
+					uni.showToast({
+						title: '修改地址失败!',
+						icon: "none"
+					});
+				}else{
+					uni.showToast({
+						title: '修改地址成功!',
+						icon: "none"
+					});
+				}
+			},
+			async eqlistname(lat, lng) { //修改设备名称
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=forecast.worm_lamp.revise_device',
+					data: {
+						device_id: this.moddata.imei || this.moddata.device_id || this.moddata.id,
+						device_name: this.moddata.device_name,
+						lat: lat,
+						lng: lng,
+					}
+				})
+				console.log(res)
+				if (res==false) {
+					uni.showToast({
+						title: '修改名称失败!',
+						icon: "none"
+					});
+				}else{
+					uni.showToast({
+						title: '修改名称成功!',
+						icon: "none"
+					});
+					uni.removeStorage({
+						key: "location"
+					})
+					this.clickLeft()
+				}
+			},
+			async eqlistuser(id, imei,device_model) { //获取设备信息
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=forecast.worm_lamp.lamp_list',
+					data: {
+						device_type_id: id,
+						device_id: imei,
+						device_model: device_model,
+					}
+				})
+				this.moddata = res.data[0]
+				this.selectaddress(this.moddata.lng, this.moddata.lat)
+			},
+			async xyeqlistuser(imei) { //获取设备信息
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=sex_lure_nl.sex_lure.nl_device_list',
+					data: {
+						device_id: imei,
+					}
+				})
+				this.moddata = res.data[0]
+				this.selectaddress(this.moddata.lng, this.moddata.lat)
+			},
+			btn() {
+				// this.eqlistcity(this.moddata.lat, this.moddata.lng)
+				this.eqlistname(this.moddata.lat, this.moddata.lng)
+			},
+			clickLeft() {
+				uni.navigateBack({
+					delta:1,
+					success:()=>{
+						//告知上一页刷新数据
+						uni.$emit('refreshData')
+					}
+				})
+			},
+			amendcity() { //修改设备地址
+				// this.selectcityTF = true
+				uni.navigateTo({
+					url: "/pages/fourBase/city"
+				})
+			},
+			selectaddress(lng, lat) { //获取分布位置
+				uni.request({
+					type: "GET",
+					url: "https://restapi.amap.com/v3/geocode/regeo?output=JSON&location=" + lng + "," + lat +
+						"&key=27273b81090f78759e4057f94474516f&radius=1000&extensions=all",
+					dataType: "json",
+					complete: ress => {
+						// console.log(ress)
+						if (ress.data.regeocode.formatted_address.length == 0) {
+							this.city = "--"
+						} else {
+							this.city = ress.data.regeocode.formatted_address
+						}
+					}
+				});
+			},
+		},
+		onLoad(option) {
+			if(option.id==10){
+				const data = JSON.parse(option.data)
+				this.xyeqlistuser(data.device_id || data.id)
+			}else{
+				const data = JSON.parse(option.data)
+				this.eqlistuser(data.type_id, data.imei || data.device_id || data.id,data.device_model)
+			}
+			uni.getStorage({
+				key:"jurisdiction",
+				success:(res)=>{
+					console.log(res,'resresres')
+					if(!res?.data){
+						return;
+					}
+					let items = JSON.parse(res.data).filter((item)=>{
+						return item.purview_name == "设备管理"
+					})
+					let items2 = items[0].children.filter((item)=>{
+						return item.purview_name == "设备列表"
+					})
+					this.quanxian.namealter = items2[0].children.some((item)=>{
+						return item.purview_name == "修改名称"
+					})
+					this.quanxian.cityalter = items2[0].children.some((item)=>{
+						return item.purview_name == "添加位置"
+					})
+					this.quanxian.infoalter = items2[0].children.some((item)=>{
+						return item.purview_name == "修改名称" || item.purview_name == "添加位置"
+					})
+				},
+			})
+		},
+		onShow(){
+			uni.getStorage({
+				key: "location",
+				success: (res) => {
+					// console.log(res);
+					this.moddata.lat = res.data[1]
+					this.moddata.lng = res.data[0]
+					this.selectaddress(this.moddata.lng, this.moddata.lat)
+				}
+			})
+			
+		}
+	}
+</script>
+
+<style lang="scss">
+	page{
+		background-color: #FAFAFA;
+	}
+	.mod {
+		width: 100%;
+		position: absolute;
+		top: 44px;
+		.mod_name,
+		.mod_id,
+		.mod_user,
+		.mod_time {
+			width: 90%;
+			margin: 30rpx auto;
+			display: flex;
+			justify-content: space-between;
+			background-color: #FFFFFF;
+			padding: 20rpx 10rpx;
+			color: #57C77A;
+			line-height: 50rpx;
+			.namebg{
+				background-color: #FAFAFA;
+			}
+			input {
+				text-align: right;
+				font-size: 28rpx;
+				padding: 10rpx;
+			}
+		}
+		.mod_city{
+			width: 90%;
+			margin: 30rpx auto;
+			background-color: #FFFFFF;
+			padding: 20rpx 10rpx;
+			color: #57C77A;
+			line-height: 50rpx;
+			display: flex;
+			justify-content: space-between;
+			.namebg{
+				background-color: #FAFAFA;
+			}
+			input {
+				width: 90%;
+				font-size: 28rpx;
+				padding: 10rpx;
+			}
+		}
+	}
+
+	.sub {
+		width: 90%;
+		margin: 30rpx auto;
+		text-align: center;
+		height: 70rpx;
+		line-height: 70rpx;
+		background-color: #57C77A;
+		border-radius: 35rpx;
+		color: #FFFFFF;
+	}
+</style>

+ 1 - 1
pages/fourBase/city.vue

@@ -32,7 +32,7 @@
 				let prevpage = pages[pages.length - 2]
 				prevpage.$vm.city = add
 				uni.navigateBack({
-					delta:2
+					delta:1
 				})
 			}
 		}

+ 5 - 3
pages/index/index.vue

@@ -114,7 +114,7 @@
 					</view> -->
 				</view>
 			</view>
-			<view class="banner-ad">
+			<view class="banner-ad" @click="tabs">
 				<view class="ad-text">
 					<view class="title">
 						<!-- 松墨天牛拍照性诱智能监测 -->
@@ -122,7 +122,7 @@
 					<view class="sub-title">
 						<!-- AI慧眼识天牛    智守青山护松林 -->
 					</view>
-					<view class="btn" @click="tabs">
+					<view class="btn">
 						查看详情
 					</view>
 				</view>
@@ -212,6 +212,9 @@
 			},
 		},
 		methods: {
+			handlePopupClose(){
+				console.log('弹窗已关闭')
+			},
 			tabs(){
 				uni.navigateTo({
 					url: '/pages/banner/index'
@@ -465,7 +468,6 @@
 		}
 		.weatext {
 			gap: 8rpx;
-			flex: 1;
 			display: flex;
 			flex-direction: column;
 			padding-left: 44rpx;

+ 84 - 39
pages/my/index/index.vue

@@ -1,43 +1,43 @@
 <template>
-  <view>
-    <view class="subject">
-      <view style="width: 100%; background-color: #ffffff; position: relative">
-        <view class="personal" v-if="isLogin">
-          <view class="personal_left">
-            <image :src="userinfos.image" mode="" @error="error"></image>
-          </view>
-          <view class="personal_center">
-            <p>{{ usernames }}</p>
-            <p>{{ userinfos.email || userinfos.mobile }}</p>
-          </view>
-          <view class="personal_right" @click="userinfo">
-            <uni-icons
-              type="compose"
-              style="margin-right: 10rpx"
-              color="#FFFFFF"
-            ></uni-icons>
-            编辑
-          </view>
+  <view class="subject">
+    <view style="width: 100%; position: relative" class="subject-top">
+      <view class="personal" v-if="isLogin">
+        <view class="personal_left">
+          <image :src="userinfos.image" mode="" @error="error"></image>
         </view>
+        <view class="personal_center">
+          <p>
+            {{ usernames }}
+            <view @click="userinfo" class="userinfo">
+              <u-icon
+                name="edit-pen"
+                class="edit-pen"
+              ></u-icon>
+            </view>
+          </p>
+          <p>{{ userinfos.email || userinfos.mobile || '' }}</p>
+        </view>
+        <!-- <view class="personal_right" @click="userinfo">
+          <uni-icons
+            type="compose"
+            style="margin-right: 10rpx"
+            color="#FFFFFF"
+          ></uni-icons>
+          编辑
+        </view> -->
       </view>
-      <view style="background-color: #ffffff; margin: 20rpx auto 0">
+    </view>
+    <view class="menu">
+      <view>
         <view class="AboutUs" @click="about">
-          <u-icon
-            name="pingtai"
-            custom-prefix="custom-icon"
-            class="icon_left"
-          ></u-icon>
+          <image :src="personIcon" mode="" class="icon_left"></image>
           关于我们
           <uni-icons type="arrowright" class="icon_right"></uni-icons>
         </view>
       </view>
       <view style="background-color: #ffffff" v-if="isLogin">
         <view class="quit" @click="outto">
-          <u-icon
-            name="tuichudenglu"
-            custom-prefix="custom-icon"
-            class="icon_left"
-          ></u-icon>
+          <image :src="logoutIcon" mode="" class="icon_left"></image>
           退出登录
           <uni-icons type="arrowright" class="icon_right"></uni-icons>
         </view>
@@ -57,9 +57,14 @@
   </view>
 </template>
 <script>
+import personIcon from '../../assets/personIcon.png';
+import logoutIcon from '../../assets/logout.png';
+
 export default {
   data() {
     return {
+      personIcon,
+      logoutIcon,
       usernames: '',
       userinfos: {},
       isLogin: false,
@@ -172,7 +177,12 @@ export default {
 .subject {
   width: 100%;
   height: 100vh;
-  background-color: #f9f9f9;
+  background: #F5F6FA;
+  .subject-top{
+    height: 450rpx;
+    background-image: url('../../assets/personBg.png');
+    background-size: cover;
+  }
 }
 
 .personal {
@@ -180,13 +190,20 @@ export default {
   margin: 0 auto;
   display: flex;
   padding: 20rpx 0 40rpx;
+  padding-top: 136rpx;
   box-sizing: border-box;
+  position: relative;
   .personal_left {
-    width: 18%;
+    width: 120rpx;
+    height: 120rpx;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    border-radius: 50%;
     margin-right: 30rpx;
-
+    border: 4rpx solid #ffffff;
     image {
-      width: 124rpx;
+      width: 120rpx;
       height: 120rpx;
       border-radius: 60rpx;
     }
@@ -194,13 +211,32 @@ export default {
 
   .personal_center {
     padding-top: 20rpx;
+    color:#ffffff;
 
     p:nth-child(1) {
+      width: 100%;
       font-size: 34rpx;
       font-weight: 700;
       margin-bottom: 10rpx;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+    }
+    .userinfo{
+      width: 40rpx;
+      height: 40rpx;
+      border-radius: 16rpx;
+      color:#ffffff;
+      font-size: 24rpx;
+      background: #00000014;
+      margin-left: 16rpx;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      .edit-pen{
+        font-size: 20rpx;
+      }
     }
-
     p:nth-child(2) {
       font-size: 24rpx;
     }
@@ -215,18 +251,26 @@ export default {
     line-height: 60rpx;
     color: #ffffff;
     position: absolute;
-    top: 50rpx;
     right: 30rpx;
   }
 }
-
+.menu{
+  margin: 0 32rpx;
+  background: #ffffff;
+  border-radius: 16rpx;
+  overflow: hidden;
+  position: relative;
+  top: -140rpx;
+}
 .AboutUs,
 .quit,
 .opinion {
+  display:flex;
+  align-items: center;
   width: 90%;
   height: 100rpx;
   line-height: 100rpx;
-  margin: 20rpx auto 0;
+  margin: 0rpx auto;
   position: relative;
   padding-left: 20rpx;
   font-size: 28rpx;
@@ -234,7 +278,8 @@ export default {
   .icon_left {
     margin-right: 20rpx;
     color: #55c87b !important;
-    font-size: 32rpx;
+    width: 40rpx;
+    height: 40rpx;
   }
 
   .icon_right {

+ 2 - 2
util/api.js

@@ -1,7 +1,7 @@
 // let BASE_URL = 'http://114.55.0.7:8002';
 // const BASE_URL='http://8.136.98.49:8002'
-let BASE_URL = 'http://218.28.198.186:10505'
-// let BASE_URL = 'https://wx.hnyfwlw.com'
+// let BASE_URL = 'http://218.28.198.186:10505'
+let BASE_URL = 'https://wx.hnyfwlw.com'
 // let BASE_URL = 'http://192.168.1.107:8000';
 // let BASE_URL = 'http://218.28.198.186:10508';
 // let BASE_URL = 'https://uat.hnyfwlw.com'