hookehuyr

docs: 更新文件描述并移除未使用的OAuth哈希恢复功能

更新src/api/fn.js的文件描述以更准确反映其功能
移除src/main.js中未使用的OAuth哈希恢复功能代码
1 /* 1 /*
2 * @Date: 2022-05-18 22:56:08 2 * @Date: 2022-05-18 22:56:08
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2025-12-27 23:06:36 4 + * @LastEditTime: 2025-12-28 01:59:24
5 * @FilePath: /mlaj/src/api/fn.js 5 * @FilePath: /mlaj/src/api/fn.js
6 - * @Description: 文件描述 6 + * @Description: 网络请求功能函数
7 */ 7 */
8 import axios from '@/utils/axios'; 8 import axios from '@/utils/axios';
9 import qs from 'qs' 9 import qs from 'qs'
......
1 /* 1 /*
2 * @Date: 2025-03-20 20:36:36 2 * @Date: 2025-03-20 20:36:36
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2025-12-27 22:06:35 4 + * @LastEditTime: 2025-12-28 11:48:35
5 * @FilePath: /mlaj/src/main.js 5 * @FilePath: /mlaj/src/main.js
6 * @Description: 文件描述 6 * @Description: 文件描述
7 */ 7 */
...@@ -44,19 +44,19 @@ app.config.globalProperties.$http = axios; // 关键语句 ...@@ -44,19 +44,19 @@ app.config.globalProperties.$http = axios; // 关键语句
44 * @description 前端复原 OAuth 回跳的 hash 路由位置:当 URL 中存在 ret_hash 参数且当前无 hash 时,将其拼回地址栏。 44 * @description 前端复原 OAuth 回跳的 hash 路由位置:当 URL 中存在 ret_hash 参数且当前无 hash 时,将其拼回地址栏。
45 * @returns {void} 45 * @returns {void}
46 */ 46 */
47 -function restoreHashAfterOAuth() { 47 +// function restoreHashAfterOAuth() {
48 - const url = new URL(window.location.href); 48 +// const url = new URL(window.location.href);
49 - const ret_hash = url.searchParams.get('ret_hash'); 49 +// const ret_hash = url.searchParams.get('ret_hash');
50 - if (ret_hash && !window.location.hash) { 50 +// if (ret_hash && !window.location.hash) {
51 - // 删除 ret_hash,保留其他查询参数 51 +// // 删除 ret_hash,保留其他查询参数
52 - url.searchParams.delete('ret_hash'); 52 +// url.searchParams.delete('ret_hash');
53 - const base = url.toString().split('#')[0]; 53 +// const base = url.toString().split('#')[0];
54 - const new_url = base + ret_hash; 54 +// const new_url = base + ret_hash;
55 - // 使用 replaceState 避免再次刷新与历史记录污染 55 +// // 使用 replaceState 避免再次刷新与历史记录污染
56 - window.history.replaceState(null, '', new_url); 56 +// window.history.replaceState(null, '', new_url);
57 - } 57 +// }
58 -} 58 +// }
59 -void restoreHashAfterOAuth 59 +// void restoreHashAfterOAuth
60 60
61 // 在安装路由前进行一次 hash 复原,确保初始路由正确 61 // 在安装路由前进行一次 hash 复原,确保初始路由正确
62 // restoreHashAfterOAuth() 62 // restoreHashAfterOAuth()
......