소스 검색

优化部分代码

wangming 1 개월 전
부모
커밋
bc95db55be
4개의 변경된 파일14개의 추가작업 그리고 12개의 파일을 삭제
  1. 1 1
      src/components/js_sdk/index.js
  2. 9 7
      src/pages/home/home.vue
  3. 2 2
      src/pagesA/deviceSetting/deviceSetting.vue
  4. 2 2
      src/pagesA/my/my.vue

+ 1 - 1
src/components/js_sdk/index.js

@@ -5,7 +5,7 @@ http.setConfig(config => {
     if (__wxConfig.envVersion == 'develop') {
         let selectedService = uni.getStorageSync("sercviceChoice")
         if (!selectedService || selectedService == 'aloneServe') {
-            config.baseUrl = "https://api.radar-power.asia:4443/portal-service-server/";
+            // config.baseUrl = "https://api.radar-power.asia:4443/portal-service-server/";
         }
         config.baseUrl = "https://radar-power.cn/portal-service-server/";
     }

+ 9 - 7
src/pages/home/home.vue

@@ -25,24 +25,25 @@
                         >
                     </view>
                 </view>
+
                 <view
                     class="rightItem"
                     @click="gotoDevice('/pagesA/devices/devices')"
                 >
-                    <view class="rightTitle">我的家庭</view>
+                    <view class="rightTitle">全部设备</view>
                     <view class="rightContent"
-                        ><text>{{ groupNum }}</text
-                        ></view
+                        ><text>{{ devNum }}</text
+                        ></view
                     >
                 </view>
                 <view
                     class="rightItem"
                     @click="gotoDevice('/pagesA/devices/devices')"
                 >
-                    <view class="rightTitle">全部设备</view>
+                    <view class="rightTitle">我的家庭</view>
                     <view class="rightContent"
-                        ><text>{{ devNum }}</text
-                        ></view
+                        ><text>{{ groupNum }}</text
+                        ></view
                     >
                 </view>
                 <view class="rightItem" @click="goAbnormalInfo()">
@@ -258,6 +259,7 @@ export default {
         },
         // 获取天气接口
         getWeather() {
+            console.log("获取天气", 999999);
             uni.request({
                 url: "https://kp36x7gr79.re.qweatherapi.com/v7/weather/now", // 使用官方域名
                 data: {
@@ -305,6 +307,7 @@ export default {
     },
     onLoad() {},
     onShow() {
+        this.getWeather();
         if (uni.getStorageSync("userId")) {
             uni.showLoading({
                 title: "雷能为您守护中...",
@@ -312,7 +315,6 @@ export default {
             this.getperSonInfo();
             this.getShareNum();
             this.getWarmList();
-            this.getWeather();
             this.isInitAlarm = true;
             this.isIniTenMinutes = true;
         }

+ 2 - 2
src/pagesA/deviceSetting/deviceSetting.vue

@@ -9,10 +9,10 @@
                 <text>设备ID</text>
                 <text>{{ devInfo.devId }}</text>
             </view>
-            <view class="wifItem">
+            <!-- <view class="wifItem">
                 <text>设备分组</text>
                 <text>{{}}</text>
-            </view>
+            </view> -->
             <view class="wifItem">
                 <text>安装位置</text>
                 <text>{{ position }}</text>

+ 2 - 2
src/pagesA/my/my.vue

@@ -36,7 +36,7 @@
                     <image src="../../static/arrTwo.png" mode="" />
                 </view>
             </view>
-            <view class="menu-item" @click="deaAccount()">
+            <!-- <view class="menu-item" @click="deaAccount()">
                 <view class="meanLeft">
                     <image src="../../static/logoff.png" mode="" />
                     <text>注销账户</text>
@@ -44,7 +44,7 @@
                 <view class="meanRight">
                     <image src="../../static/arrTwo.png" mode="" />
                 </view>
-            </view>
+            </view> -->
         </view>
 
         <view class="logoutBtn" @click="goLogout">退出登录</view>