Ver código fonte

登出跳首页

chenlei 1 ano atrás
pai
commit
af181e0310

+ 4 - 4
.eslintrc-auto-import.json

@@ -12,6 +12,7 @@
     "Ref": true,
     "VNode": true,
     "WritableComputedRef": true,
+    "aop": true,
     "ay": true,
     "computed": true,
     "config": true,
@@ -21,6 +22,7 @@
     "defineComponent": true,
     "effectScope": true,
     "enums": true,
+    "func": true,
     "getCurrentInstance": true,
     "getCurrentScope": true,
     "h": true,
@@ -30,6 +32,7 @@
     "isReadonly": true,
     "isRef": true,
     "markRaw": true,
+    "mock": true,
     "nextTick": true,
     "onActivated": true,
     "onAddToFavorites": true,
@@ -91,9 +94,6 @@
     "watchEffect": true,
     "watchPostEffect": true,
     "watchSyncEffect": true,
-    "webapi": true,
-    "func": true,
-    "aop": true,
-    "mock": true
+    "webapi": true
   }
 }

+ 2 - 0
src/pages/index/index.vue

@@ -298,6 +298,8 @@ const methods = ay.initMethods(
       }
     },
     goTop() {
+      // 避免闪烁
+      data.station.stickyed = false
       store.curPage.pageConfig.zpager.scrollToTop()
       // uni.pageScrollTo({
       //   scrollTop: 0,

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

@@ -2,12 +2,7 @@
   <ay-container :pageTopStyle="{ background: '#fff' }" cusClass="flex flex-col">
     <!-- <ay-container :cusStyle="{ 'padding-top': config.common.SystemInfo.safeArea.top + 'px' }">
     <div class="absolute center font-bold $bs-fz page-title">登录</div> -->
-    <div
-      class="flex-col center justify-between login-con"
-      :style="{
-        height: config.common.SystemInfo.windowHeight - config.common.safeAreaTopHeight + 'px',
-      }"
-    >
+    <div class="flex-col center justify-between login-con">
       <div class="center info">
         <image class="logo" src="/static/logo.png" mode="scaleToFill" />
         <span class="desc">优质加气 大象帮你</span>

+ 0 - 2
src/types/auto-import.d.ts

@@ -83,9 +83,7 @@ declare global {
   const useAttrs: typeof import('vue')['useAttrs']
   const useCssModule: typeof import('vue')['useCssModule']
   const useCssVars: typeof import('vue')['useCssVars']
-  const useRequest: typeof import('../hooks/useRequest')['default']
   const useSlots: typeof import('vue')['useSlots']
-  const useUpload: typeof import('../hooks/useUpload')['default']
   const watch: typeof import('vue')['watch']
   const watchEffect: typeof import('vue')['watchEffect']
   const watchPostEffect: typeof import('vue')['watchPostEffect']

+ 9 - 9
src/utils/config/interFaces/index.ts

@@ -1,30 +1,30 @@
 import websocket from './websocket'
-import allinpay from './allinpay'
-import tms from './tms'
 import message from './message'
 import account from './account'
+import tms from './tms'
 import settle from './settle'
+import user from './user'
 import pay from './pay'
+import allinpay from './allinpay'
 import strategy from './strategy'
-import user from './user'
 
 export default {
   /** websocket打印中心 */
   websocket,
-  /** 通联支付 */
-  allinpay,
-  /** 运力中心 */
-  tms,
   /** 消息中心 */
   message,
   /** 账户中心 */
   account,
+  /** 运力中心 */
+  tms,
   /** 结算中心 */
   settle,
+  /** 用户中心 */
+  user,
   /** 支付中心 */
   pay,
+  /** 通联支付 */
+  allinpay,
   /** 运营策略中心 */
   strategy,
-  /** 用户中心 */
-  user,
 }

+ 1 - 1
src/utils/store/user.ts

@@ -57,7 +57,7 @@ const useUserStore = defineStore(
     }
     const clearUserInfo = (type = 0) => {
       userInfo.value = { ...initState }
-      ay.goLogin(type)
+      ay.goHome()
     }
 
     const Authorization = computed(() => {

+ 2 - 1
uno.config.ts

@@ -63,7 +63,7 @@ function classNamePreContainer(): SourceCodeTransformer {
       return id.includes('__uno.css') || id.includes('app.wxss')
     },
     async transform(code, id, { uno }) {
-      code.replace(/(\.(?:(?!container).+))\{/g, '.container $1{')
+      code.replace(/(\.(?:(?!container).+))\{/g, '.container$1,.container $1{')
     },
   }
 }
@@ -92,6 +92,7 @@ export default defineConfig({
    * @see https://github.com/unocss/unocss#shortcuts
    */
   shortcuts: [['center', 'flex justify-center items-center']],
+  // 仅h5有效, 编译、打包小程序不会触发
   transformers: [
     classNamePreContainer(),
     optimization(),

+ 1 - 1
vitePlugin.ts

@@ -279,7 +279,7 @@ function UnoCssMPPlugin(): Plugin {
             let unoCss = allCss[0]
             unoCss = unoCss
               .replaceAll('}', '}\n')
-              .replace(/(\.(?:(?!container).+))\{/g, '.container $1{')
+              .replace(/(\.(?:(?!container).+))\{/g, '.container$1,.container $1{')
             files.write(tempFilePath, unoCss + allCss[1])
 
             // bundle[filename] = {