Переглянути джерело

修复客服按钮拖拽到tab栏后无法移动的问题;修复站点详情页提示无效token的问题

zuypeng 1 рік тому
батько
коміт
5979a92bc5

+ 4 - 1
src/App.vue

@@ -1,5 +1,5 @@
 <script lang="ts">
-import {fetchToken} from "./utils/auth";
+import {clearToken, fetchToken} from "./utils/auth";
 import {body} from "@/utils/https";
 import {groupByKey} from "@/utils/common";
 
@@ -20,6 +20,9 @@ export default <any>{
         this.globalData.device = res;
       },
     });
+    setTimeout(()=>{
+      clearToken()
+    })
 
     body(`/dict/list`).then((res: any) => {
       if (res) {

+ 6 - 3
src/pages-wash/device/index.vue

@@ -139,8 +139,8 @@ onShow((options:any) => {
     setTimeout(()=>{
       uni.navigateTo({
         url: `/pages-user/login/index?shortId=${state.deviceId}&redirectUrl=/pages-wash/device/index`
-      },100)
-    })
+      })
+    },1000)
 
   })
 
@@ -167,7 +167,7 @@ const removeListener = () => {
 }
 
 
-const loadDeviceDetail = (id: any) => {
+const  loadDeviceDetail = (id: any) => {
   state.deviceId = id;
   let ft = fetchToken();
   console.log("device token ", ft)
@@ -201,6 +201,9 @@ const debounceStartStopDevice = debounce(() => {
 }, 600)
 
 const handleClickDevice = () => {
+  if(!state.isLogin){
+    return;
+  }
   uni.showModal({
     title: '提示',
     content: state.device?.state === 'idle' ? '确定启动设备开始洗车吗?' : '确定停止设备终止本次服务吗?',

+ 1 - 1
src/pages/index/index.vue

@@ -471,7 +471,7 @@ page {
 $all_width: 96rpx;
 $all_height: 96rpx;
 movable-area {
-  height: 100vh;
+  height: calc(100vh - 200rpx);
   width: 750rpx;
   top: 0;
   position: fixed;

+ 1 - 1
src/pages/user/index.vue

@@ -166,7 +166,7 @@ const logoutUser = () => {
   uni.showModal({
     title: "温馨提示",
     content: "确定退出登录吗?",
-    confirmColor: "#2d9e95",
+    confirmColor: "#C6171E",
     confirmText: "确定退出",
     cancelText: "手滑了",
     success: (res) => {

+ 2 - 2
src/utils/https.ts

@@ -10,8 +10,8 @@ const apis: any = {
         fileUrl: "https://zyp-1258963180.cos.ap-guangzhou.myqcloud.com/"
     },
     prd: {
-        serverUrl: "https://dev-wash.kuaiyuman.cn/api",
-        fileUrl: "https://dev-wash.kuaiyuman.cn",
+        serverUrl: "https://wash.kuaiyuman.cn/api",
+        fileUrl: "https://wash.kuaiyuman.cn",
     },
 };
 // @ts-ignore