Prechádzať zdrojové kódy

fix: 修复修改密码页面按钮展示样式问题

周玉环 1 týždeň pred
rodič
commit
dcda7ef7eb

+ 2 - 1
xinkeaboard-web/composables/request.js

@@ -2,6 +2,7 @@ import axios from 'axios'
 import qs from "qs";
 import {ElMessage} from 'element-plus'
 import { useFiltersStore } from '@/store/filter.js'
+import { webSiteRelation } from "../utils/common";
 
 const timeout = 10000
 
@@ -74,7 +75,7 @@ const initRequestHeader = async (method, url, data = {}, type = 'urlencoded') =>
     let result = {};
     const config = useRuntimeConfig()
     let headers = {
-        'X-App-Type': config.public.appType
+        'Web-Site': webSiteRelation[config.public.appType]
     };
     const filtersStore = useFiltersStore()
     //用户登录状态下,每次更新refresh_token58分钟之后需要更新access_token

+ 2 - 1
xinkeaboard-web/composables/useFetchRaw.ts

@@ -1,4 +1,5 @@
 import { useFetch as _useFetch } from '#app'
+import { webSiteRelation } from "../utils/common";
 
 export async function useFetchRaw<T = any>(url: string, options?: any) {
   const config = useRuntimeConfig()
@@ -6,7 +7,7 @@ export async function useFetchRaw<T = any>(url: string, options?: any) {
     ...(options ?? {}),
     headers: {
       ...(options?.headers || {}),
-      'X-App-Type': config.public.appType
+      'Web-Site': webSiteRelation[config.public.appType]
     },
   }
   const { data, error, pending, refresh, execute } = await _useFetch<T>(url, newOptions)

+ 1 - 0
xinkeaboard-web/pages/member/pwd/login.vue

@@ -307,6 +307,7 @@ watch([old_password, password, confirm_password], () => {
           color: white;
           font-size: 14px;
           border-radius: 0 3px 3px 0;
+          padding: 5px 10px;
         }
       }
 

+ 5 - 0
xinkeaboard-web/utils/common.ts

@@ -42,3 +42,8 @@ export function startCountdown(
     }
   }, 1000);
 }
+
+export const webSiteRelation: Record<string, string> = {
+    'user': '1', // 海外用户
+    'distributor': '2' // 国内分销商
+}