Browse Source

提交优化代码

wangming 1 week ago
parent
commit
f955fd02d3

+ 3 - 2
src/components/js_sdk/index.js

@@ -7,8 +7,8 @@ http.setConfig(config => {
         // if (!selectedService || selectedService == 'aloneServe') {
         // 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/";
-        config.baseUrl = "https://api.radar-power.asia:4443/portal-service-server/";
+        config.baseUrl = "https://radar-power.cn/portal-service-server/";
+        // config.baseUrl = "https://api.radar-power.asia:4443/portal-service-server/";
     }
     }
     if (__wxConfig.envVersion == 'trial') {
     if (__wxConfig.envVersion == 'trial') {
         // let selectedService = uni.getStorageSync("sercviceChoice")
         // let selectedService = uni.getStorageSync("sercviceChoice")
@@ -16,6 +16,7 @@ http.setConfig(config => {
         //     config.baseUrl = "https://radar-power.cn/portal-service-server/";
         //     config.baseUrl = "https://radar-power.cn/portal-service-server/";
         // }
         // }
         config.baseUrl = "https://radar-power.cn/portal-service-server/";
         config.baseUrl = "https://radar-power.cn/portal-service-server/";
+        // config.baseUrl = "https://api.radar-power.asia:4443/portal-service-server/";
     }
     }
     if (__wxConfig.envVersion == 'release') {
     if (__wxConfig.envVersion == 'release') {
         // let selectedService = uni.getStorageSync("sercviceChoice")
         // let selectedService = uni.getStorageSync("sercviceChoice")

+ 5 - 5
src/pagesA/deviceDetail/deviceDetail.vue

@@ -114,12 +114,12 @@
                     (breathRate !== 0 && breathRate !== '')
                     (breathRate !== 0 && breathRate !== '')
                 "
                 "
             >
             >
-                <!-- <view
+                <view
                     class="title-text"
                     class="title-text"
                     style="color: #111111; font-size: 30rpx"
                     style="color: #111111; font-size: 30rpx"
                     >当前呼吸率</view
                     >当前呼吸率</view
-                > -->
-                <!-- <view
+                >
+                <view
                     style="
                     style="
                         display: flex;
                         display: flex;
                         justify-content: center;
                         justify-content: center;
@@ -144,7 +144,7 @@
                         src="../../static/rightArrow.png"
                         src="../../static/rightArrow.png"
                         style="margin-left: auto; width: 30rpx; height: 30rpx"
                         style="margin-left: auto; width: 30rpx; height: 30rpx"
                     ></image>
                     ></image>
-                </view> -->
+                </view>
             </view>
             </view>
 
 
             <view class="title">
             <view class="title">
@@ -336,7 +336,7 @@
     </view>
     </view>
 </template>
 </template>
 <script>
 <script>
-// import * as echarts from "../../uni_modules/lime-echart/static/echarts.min";
+import * as echarts from "../../uni_modules/lime-echart/static/echarts.min";
 import MqttService from "../../utils/globalMqtt.js";
 import MqttService from "../../utils/globalMqtt.js";
 
 
 export default {
 export default {

+ 1 - 1
src/pagesA/moreSetting/moreSetting.vue

@@ -116,7 +116,7 @@ export default {
     watch: {
     watch: {
         fallSettingEnabled: {
         fallSettingEnabled: {
             handler(newVal, oldVal) {
             handler(newVal, oldVal) {
-                console.log("fallSettingEnabled", newVal, oldVal);
+                // console.log("fallSettingEnabled", newVal, oldVal);
                 if (newVal == 1) {
                 if (newVal == 1) {
                     // this.showFallSettingModle = true;
                     // this.showFallSettingModle = true;
                 } else {
                 } else {

+ 13 - 1
src/utils/globalMqtt.js

@@ -47,7 +47,19 @@ class MqttService {
         }
         }
         uni.showToast({ title: "平台连接中...", icon: "loading", duration: 1000 });
         uni.showToast({ title: "平台连接中...", icon: "loading", duration: 1000 });
         const brokerName = 'DATA';
         const brokerName = 'DATA';
-        const url = __wxConfig.envVersion == 'develop' ? 'wxs://data.radar-power.asia:8084/mqtt/' : 'wxs://data.radar-power.cn/mqtt/';
+        let url = ""
+        url = "wxs://data.radar-power.cn/mqtt/";
+        // if (__wxConfig.envVersion == 'develop') {
+        //     url = "wxs://data.radar-power.asia:8084/mqtt/";
+        // }
+        // if (__wxConfig.envVersion == 'trial') {
+        //     url = "wxs://data.radar-power.asia:8084/mqtt/";
+        // }
+
+        // if (__wxConfig.envVersion == 'release') {
+        //     url = "wxs://data.radar-power.cn/mqtt/";
+        // }
+
         const clientId = `xcx_mqtt_data1_${userId}_${Date.now()}`;
         const clientId = `xcx_mqtt_data1_${userId}_${Date.now()}`;
         return this.connectToBroker(brokerName, { url, clientId, username: 'lnradar', password: 'lnradar' })
         return this.connectToBroker(brokerName, { url, clientId, username: 'lnradar', password: 'lnradar' })
             .then(client => {
             .then(client => {