Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4e612b1c12 | |||
| d326912bd3 | |||
| be976f939f | |||
| e1f71fb220 | |||
| 558e1380db | |||
| 1b9602f66b | |||
| a071f760d3 | |||
| 445d428d8b | |||
| bbbd386e1e | |||
| fd3cd58123 | |||
| 97d4be5772 | |||
| b2b92ec6b4 | |||
| b336b901d3 | |||
| 9439bcf9d7 | |||
| d862cad1a0 |
+9
-28
@@ -42,39 +42,20 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 3. 检查 URL 中是否有授权回调的 code
|
// 3. 检查 URL 中是否有授权回调的 code(支付宝用 auth_code,微信用 code)
|
||||||
const code = urlParams.get('code');
|
const code = urlParams.get('code') || urlParams.get('auth_code');
|
||||||
|
|
||||||
if (code) {
|
if (code) {
|
||||||
// 有 code → 进入授权 Loading 页处理
|
// 有 code → 进入授权 Loading 页处理
|
||||||
// 从 state 中解析 device_id 和 action(OAuth 标准保证 state 原样回传)
|
// state 为 "base" 或 "userinfo",直接透传
|
||||||
let action = '';
|
const state = urlParams.get('state') || '';
|
||||||
let callbackDeviceId = deviceId || '';
|
|
||||||
try {
|
|
||||||
const stateStr = urlParams.get('state');
|
|
||||||
if (stateStr) {
|
|
||||||
const stateObj = JSON.parse(decodeURIComponent(stateStr));
|
|
||||||
action = stateObj.action || action;
|
|
||||||
callbackDeviceId = stateObj.device_id || callbackDeviceId;
|
|
||||||
}
|
|
||||||
} catch (_) {
|
|
||||||
// state 解析失败,忽略
|
|
||||||
}
|
|
||||||
// 存入 localStorage,确保 loading 页面复用时也能获取(redirectTo 可能不触发 onLoad)
|
|
||||||
if (action) {
|
|
||||||
localStorage.setItem('__auth_action', action);
|
|
||||||
}
|
|
||||||
if (callbackDeviceId) {
|
|
||||||
localStorage.setItem('__auth_device_id', callbackDeviceId);
|
|
||||||
}
|
|
||||||
let loadingUrl = '/pages/auth/loading?code=' + encodeURIComponent(code);
|
let loadingUrl = '/pages/auth/loading?code=' + encodeURIComponent(code);
|
||||||
if (action) {
|
if (state) {
|
||||||
loadingUrl += '&action=' + action;
|
loadingUrl += '&state=' + state;
|
||||||
}
|
}
|
||||||
if (callbackDeviceId) {
|
// 必须用 reLaunch:支付宝回调时当前页可能就是 loading 页,
|
||||||
loadingUrl += '&device_id=' + callbackDeviceId;
|
// redirectTo 到同一页面不会重新触发 onLoad,导致请求卡住
|
||||||
}
|
uni.reLaunch({ url: loadingUrl });
|
||||||
uni.redirectTo({ url: loadingUrl });
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+73
-40
@@ -16,6 +16,7 @@ export default {
|
|||||||
statusText: '正在登录...',
|
statusText: '正在登录...',
|
||||||
deviceId: '',
|
deviceId: '',
|
||||||
action: '',
|
action: '',
|
||||||
|
navigating: false, // 防止重复跳转
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
@@ -23,6 +24,9 @@ export default {
|
|||||||
this.action = options.action || '';
|
this.action = options.action || '';
|
||||||
|
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
|
// 每次进入页面清除旧的回调标记,防止上次异常退出后标记残留导致 startAuth 被跳过
|
||||||
|
uni.removeStorageSync('__auth_callback_done');
|
||||||
|
|
||||||
// Mock 模式:跳过微信 OAuth,直接登录
|
// Mock 模式:跳过微信 OAuth,直接登录
|
||||||
if (config.mockWechatLogin && this.action !== 'userinfo') {
|
if (config.mockWechatLogin && this.action !== 'userinfo') {
|
||||||
this.mockLogin();
|
this.mockLogin();
|
||||||
@@ -30,16 +34,22 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 从 URL 参数获取 code(App.vue 跳转时带过来)
|
// 从 URL 参数获取 code(App.vue 跳转时带过来)
|
||||||
let code = options.code || '';
|
// 支付宝回调参数名是 auth_code,微信是 code
|
||||||
|
let code = options.code || options.auth_code || '';
|
||||||
if (!code) {
|
if (!code) {
|
||||||
const urlParams = new URLSearchParams(window.location.search);
|
const urlParams = new URLSearchParams(window.location.search);
|
||||||
code = urlParams.get('code') || '';
|
code = urlParams.get('code') || urlParams.get('auth_code') || '';
|
||||||
|
}
|
||||||
|
|
||||||
|
// 解析 state 参数(OAuth 原样回传,"base" 或 "userinfo")
|
||||||
|
if (!this.action) {
|
||||||
|
const state = options.state || '';
|
||||||
|
if (state === 'userinfo') {
|
||||||
|
this.action = 'userinfo';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 兜底:从 localStorage 恢复(页面复用时 onLoad 不触发,localStorage 由跳转函数清理)
|
// 兜底:从 localStorage 恢复(页面复用时 onLoad 不触发,localStorage 由跳转函数清理)
|
||||||
if (!this.action) {
|
|
||||||
this.action = localStorage.getItem('__auth_action') || '';
|
|
||||||
}
|
|
||||||
if (!this.deviceId) {
|
if (!this.deviceId) {
|
||||||
this.deviceId = localStorage.getItem('__auth_device_id') || '';
|
this.deviceId = localStorage.getItem('__auth_device_id') || '';
|
||||||
}
|
}
|
||||||
@@ -47,6 +57,7 @@ export default {
|
|||||||
|
|
||||||
if (this.action === 'userinfo') {
|
if (this.action === 'userinfo') {
|
||||||
// 获取用户信息流程
|
// 获取用户信息流程
|
||||||
|
this.statusText = '正在获取用户信息...';
|
||||||
if (code) {
|
if (code) {
|
||||||
this.handleUserInfoCallback(code);
|
this.handleUserInfoCallback(code);
|
||||||
} else {
|
} else {
|
||||||
@@ -72,7 +83,19 @@ export default {
|
|||||||
* 发起 OAuth 授权(静默授权,只获取 openid)
|
* 发起 OAuth 授权(静默授权,只获取 openid)
|
||||||
*/
|
*/
|
||||||
async startAuth() {
|
async startAuth() {
|
||||||
// 清除上次使用的 code 标记
|
// 防止重复调用(实例级 + storage 级双重保护)
|
||||||
|
if (this.navigating) {
|
||||||
|
console.log('[Auth] 已在跳转中,忽略重复 startAuth');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// handleCallback 正在处理中或已完成,禁止发起新授权
|
||||||
|
if (uni.getStorageSync('__auth_callback_done')) {
|
||||||
|
console.log('[Auth] 回调处理中/已完成,跳过 startAuth');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.navigating = true;
|
||||||
|
|
||||||
|
// 清除上次使用的 code 标记(仅在发起新授权时清除,不在 handleCallback 流程中)
|
||||||
uni.removeStorageSync('__used_auth_code');
|
uni.removeStorageSync('__used_auth_code');
|
||||||
|
|
||||||
const platform = detectPlatform();
|
const platform = detectPlatform();
|
||||||
@@ -99,28 +122,18 @@ export default {
|
|||||||
|
|
||||||
// 静默授权:微信用 snsapi_base,支付宝用 auth_base
|
// 静默授权:微信用 snsapi_base,支付宝用 auth_base
|
||||||
const scopes = platform === 'alipay' ? 'auth_base' : 'snsapi_base';
|
const scopes = platform === 'alipay' ? 'auth_base' : 'snsapi_base';
|
||||||
|
|
||||||
const res = await gatewayGet('/api/v1/user/auth/url', {
|
const res = await gatewayGet('/api/v1/user/auth/url', {
|
||||||
app_no: appNo,
|
app_no: appNo,
|
||||||
scopes: scopes,
|
scopes: scopes,
|
||||||
redirect_uri: redirectUri,
|
redirect_uri: redirectUri,
|
||||||
|
state: 'base',
|
||||||
});
|
});
|
||||||
|
|
||||||
const data = res.data || {};
|
const data = res.data || {};
|
||||||
if (data.code === 0 && data.data && data.data.auth_url) {
|
if (data.code === 0 && data.data && data.data.auth_url) {
|
||||||
// 通过 state 传递 device_id(OAuth 标准保证 state 原样回传)
|
// 后端已将 state 写入授权 URL,直接跳转
|
||||||
let authUrl = data.data.auth_url;
|
window.location.href = data.data.auth_url;
|
||||||
if (this.deviceId) {
|
|
||||||
const stateVal = encodeURIComponent(JSON.stringify({ device_id: this.deviceId }));
|
|
||||||
try {
|
|
||||||
const urlObj = new URL(authUrl);
|
|
||||||
urlObj.searchParams.set('state', stateVal);
|
|
||||||
authUrl = urlObj.toString();
|
|
||||||
} catch (_) {
|
|
||||||
authUrl += (authUrl.includes('?') ? '&' : '?') + 'state=' + stateVal;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 跳转微信授权页(静默,不弹窗)
|
|
||||||
window.location.href = authUrl;
|
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({ title: data.message || '获取授权失败', icon: 'none' });
|
uni.showToast({ title: data.message || '获取授权失败', icon: 'none' });
|
||||||
setTimeout(() => this.goToScan(), 1500);
|
setTimeout(() => this.goToScan(), 1500);
|
||||||
@@ -136,6 +149,15 @@ export default {
|
|||||||
* 处理授权回调(用 code 换 openid,再用 openid 登录)
|
* 处理授权回调(用 code 换 openid,再用 openid 登录)
|
||||||
*/
|
*/
|
||||||
async handleCallback(code) {
|
async handleCallback(code) {
|
||||||
|
// 防止重复调用(实例级 + storage 级双重保护)
|
||||||
|
if (this.navigating) {
|
||||||
|
console.log('[Auth] 已在跳转中,忽略重复 handleCallback');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.navigating = true;
|
||||||
|
// storage 级保护:跨页面实例生效,防止支付宝整页重载后重复执行
|
||||||
|
uni.setStorageSync('__auth_callback_done', '1');
|
||||||
|
|
||||||
const appNo = uni.getStorageSync('app_no') || getAppNo(detectPlatform());
|
const appNo = uni.getStorageSync('app_no') || getAppNo(detectPlatform());
|
||||||
|
|
||||||
if (!appNo) {
|
if (!appNo) {
|
||||||
@@ -148,6 +170,7 @@ export default {
|
|||||||
const usedCode = uni.getStorageSync('__used_auth_code');
|
const usedCode = uni.getStorageSync('__used_auth_code');
|
||||||
if (usedCode === code) {
|
if (usedCode === code) {
|
||||||
console.warn('[loading] code 已使用过,跳过');
|
console.warn('[loading] code 已使用过,跳过');
|
||||||
|
this.navigating = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
uni.setStorageSync('__used_auth_code', code);
|
uni.setStorageSync('__used_auth_code', code);
|
||||||
@@ -155,6 +178,7 @@ export default {
|
|||||||
// 立即清除 URL 中的 code 参数,避免刷新重复处理
|
// 立即清除 URL 中的 code 参数,避免刷新重复处理
|
||||||
const url = new URL(window.location.href);
|
const url = new URL(window.location.href);
|
||||||
url.searchParams.delete('code');
|
url.searchParams.delete('code');
|
||||||
|
url.searchParams.delete('auth_code');
|
||||||
url.searchParams.delete('state');
|
url.searchParams.delete('state');
|
||||||
window.history.replaceState({}, '', url.toString());
|
window.history.replaceState({}, '', url.toString());
|
||||||
|
|
||||||
@@ -231,6 +255,17 @@ export default {
|
|||||||
* 发起非静默授权获取用户信息(snsapi_userinfo,弹窗确认)
|
* 发起非静默授权获取用户信息(snsapi_userinfo,弹窗确认)
|
||||||
*/
|
*/
|
||||||
async startUserInfoAuth() {
|
async startUserInfoAuth() {
|
||||||
|
// 防止重复调用(实例级 + storage 级双重保护)
|
||||||
|
if (this.navigating) {
|
||||||
|
console.log('[Auth] 已在跳转中,忽略重复 startUserInfoAuth');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (uni.getStorageSync('__auth_callback_done')) {
|
||||||
|
console.log('[Auth] 回调处理中/已完成,跳过 startUserInfoAuth');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.navigating = true;
|
||||||
|
|
||||||
// 清除上次使用的 code 标记
|
// 清除上次使用的 code 标记
|
||||||
uni.removeStorageSync('__used_auth_code');
|
uni.removeStorageSync('__used_auth_code');
|
||||||
|
|
||||||
@@ -247,7 +282,6 @@ export default {
|
|||||||
this.statusText = '正在获取用户信息...';
|
this.statusText = '正在获取用户信息...';
|
||||||
|
|
||||||
// 存入 localStorage(页面复用时 onLoad 不会重新触发,需要从 localStorage 读取)
|
// 存入 localStorage(页面复用时 onLoad 不会重新触发,需要从 localStorage 读取)
|
||||||
localStorage.setItem('__auth_action', 'userinfo');
|
|
||||||
if (this.deviceId) {
|
if (this.deviceId) {
|
||||||
localStorage.setItem('__auth_device_id', this.deviceId);
|
localStorage.setItem('__auth_device_id', this.deviceId);
|
||||||
}
|
}
|
||||||
@@ -259,30 +293,18 @@ export default {
|
|||||||
|
|
||||||
// 用户信息授权:微信用 snsapi_userinfo,支付宝用 auth_user
|
// 用户信息授权:微信用 snsapi_userinfo,支付宝用 auth_user
|
||||||
const scopes = platform === 'alipay' ? 'auth_user' : 'snsapi_userinfo';
|
const scopes = platform === 'alipay' ? 'auth_user' : 'snsapi_userinfo';
|
||||||
|
|
||||||
const res = await gatewayGet('/api/v1/user/auth/url', {
|
const res = await gatewayGet('/api/v1/user/auth/url', {
|
||||||
app_no: appNo,
|
app_no: appNo,
|
||||||
scopes: scopes,
|
scopes: scopes,
|
||||||
redirect_uri: redirectUri,
|
redirect_uri: redirectUri,
|
||||||
|
state: 'userinfo',
|
||||||
});
|
});
|
||||||
|
|
||||||
const data = res.data || {};
|
const data = res.data || {};
|
||||||
if (data.code === 0 && data.data && data.data.auth_url) {
|
if (data.code === 0 && data.data && data.data.auth_url) {
|
||||||
// 通过 state 传递 action 和 device_id(OAuth 标准保证 state 原样回传)
|
// 后端已将 state 写入授权 URL,直接跳转
|
||||||
const stateObj = { action: 'userinfo' };
|
window.location.href = data.data.auth_url;
|
||||||
if (this.deviceId) {
|
|
||||||
stateObj.device_id = this.deviceId;
|
|
||||||
}
|
|
||||||
const stateVal = encodeURIComponent(JSON.stringify(stateObj));
|
|
||||||
let authUrl = data.data.auth_url;
|
|
||||||
try {
|
|
||||||
const urlObj = new URL(authUrl);
|
|
||||||
urlObj.searchParams.set('state', stateVal);
|
|
||||||
authUrl = urlObj.toString();
|
|
||||||
} catch (_) {
|
|
||||||
authUrl += (authUrl.includes('?') ? '&' : '?') + 'state=' + stateVal;
|
|
||||||
}
|
|
||||||
// 跳转微信授权页(弹窗确认)
|
|
||||||
window.location.href = authUrl;
|
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({ title: data.message || '获取授权失败', icon: 'none' });
|
uni.showToast({ title: data.message || '获取授权失败', icon: 'none' });
|
||||||
setTimeout(() => this.goToHomeWithAction(), 1500);
|
setTimeout(() => this.goToHomeWithAction(), 1500);
|
||||||
@@ -298,6 +320,14 @@ export default {
|
|||||||
* 处理用户信息授权回调(用 code 调 /api/v1/user/info 获取头像昵称)
|
* 处理用户信息授权回调(用 code 调 /api/v1/user/info 获取头像昵称)
|
||||||
*/
|
*/
|
||||||
async handleUserInfoCallback(code) {
|
async handleUserInfoCallback(code) {
|
||||||
|
// 防止重复调用(实例级 + storage 级双重保护)
|
||||||
|
if (this.navigating) {
|
||||||
|
console.log('[Auth] 已在跳转中,忽略重复 handleUserInfoCallback');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.navigating = true;
|
||||||
|
uni.setStorageSync('__auth_callback_done', '1');
|
||||||
|
|
||||||
const appNo = uni.getStorageSync('app_no') || getAppNo(detectPlatform());
|
const appNo = uni.getStorageSync('app_no') || getAppNo(detectPlatform());
|
||||||
|
|
||||||
if (!appNo) {
|
if (!appNo) {
|
||||||
@@ -309,15 +339,16 @@ export default {
|
|||||||
const usedCode = uni.getStorageSync('__used_auth_code');
|
const usedCode = uni.getStorageSync('__used_auth_code');
|
||||||
if (usedCode === code) {
|
if (usedCode === code) {
|
||||||
console.warn('[loading] code 已使用过,跳过');
|
console.warn('[loading] code 已使用过,跳过');
|
||||||
|
this.navigating = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
uni.setStorageSync('__used_auth_code', code);
|
uni.setStorageSync('__used_auth_code', code);
|
||||||
|
|
||||||
// 立即清除 URL 中的 code/action 参数,避免刷新重复处理
|
// 立即清除 URL 中的 code/state 参数,避免刷新重复处理
|
||||||
const url = new URL(window.location.href);
|
const url = new URL(window.location.href);
|
||||||
url.searchParams.delete('code');
|
url.searchParams.delete('code');
|
||||||
|
url.searchParams.delete('auth_code');
|
||||||
url.searchParams.delete('state');
|
url.searchParams.delete('state');
|
||||||
url.searchParams.delete('action');
|
|
||||||
window.history.replaceState({}, '', url.toString());
|
window.history.replaceState({}, '', url.toString());
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -367,7 +398,7 @@ export default {
|
|||||||
? `/pages/index/index?device_id=${deviceId}&action=mine`
|
? `/pages/index/index?device_id=${deviceId}&action=mine`
|
||||||
: '/pages/index/index?action=mine';
|
: '/pages/index/index?action=mine';
|
||||||
localStorage.removeItem('__auth_device_id');
|
localStorage.removeItem('__auth_device_id');
|
||||||
localStorage.removeItem('__auth_action');
|
uni.removeStorageSync('__auth_callback_done');
|
||||||
uni.redirectTo({ url });
|
uni.redirectTo({ url });
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -377,6 +408,7 @@ export default {
|
|||||||
? `/pages/index/index?device_id=${deviceId}`
|
? `/pages/index/index?device_id=${deviceId}`
|
||||||
: '/pages/index/index';
|
: '/pages/index/index';
|
||||||
localStorage.removeItem('__auth_device_id');
|
localStorage.removeItem('__auth_device_id');
|
||||||
|
uni.removeStorageSync('__auth_callback_done');
|
||||||
uni.redirectTo({ url });
|
uni.redirectTo({ url });
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -392,6 +424,7 @@ export default {
|
|||||||
const url = this.deviceId
|
const url = this.deviceId
|
||||||
? `/pages/register/register?device_id=${this.deviceId}`
|
? `/pages/register/register?device_id=${this.deviceId}`
|
||||||
: '/pages/register/register';
|
: '/pages/register/register';
|
||||||
|
uni.removeStorageSync('__auth_callback_done');
|
||||||
uni.redirectTo({ url });
|
uni.redirectTo({ url });
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -334,7 +334,6 @@ export default {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
// 存入 localStorage(loading 页面复用时 onLoad 不会重新触发,需要从 localStorage 读取)
|
// 存入 localStorage(loading 页面复用时 onLoad 不会重新触发,需要从 localStorage 读取)
|
||||||
localStorage.setItem('__auth_action', 'userinfo');
|
|
||||||
if (this.deviceId) {
|
if (this.deviceId) {
|
||||||
localStorage.setItem('__auth_device_id', this.deviceId);
|
localStorage.setItem('__auth_device_id', this.deviceId);
|
||||||
}
|
}
|
||||||
@@ -344,34 +343,22 @@ export default {
|
|||||||
window.location.origin.replace(/^http:/, 'https:') + window.location.pathname
|
window.location.origin.replace(/^http:/, 'https:') + window.location.pathname
|
||||||
);
|
);
|
||||||
|
|
||||||
// 获取非静默授权链接(会弹窗确认)
|
// 用户信息授权:微信用 snsapi_userinfo,支付宝用 auth_user
|
||||||
|
const platform = uni.getStorageSync('platform') || 'wechat';
|
||||||
|
const scopes = platform === 'alipay' ? 'auth_user' : 'snsapi_userinfo';
|
||||||
|
|
||||||
const res = await gatewayGet('/api/v1/user/auth/url', {
|
const res = await gatewayGet('/api/v1/user/auth/url', {
|
||||||
app_no: appNo,
|
app_no: appNo,
|
||||||
scopes: 'snsapi_userinfo',
|
scopes: scopes,
|
||||||
redirect_uri: redirectUri,
|
redirect_uri: redirectUri,
|
||||||
|
state: 'userinfo',
|
||||||
});
|
});
|
||||||
|
|
||||||
const data = res.data || {};
|
const data = res.data || {};
|
||||||
if (data.code === 0 && data.data && data.data.auth_url) {
|
if (data.code === 0 && data.data && data.data.auth_url) {
|
||||||
// 通过 state 传递 action 和 device_id(OAuth 标准保证 state 原样回传)
|
console.log('[index] 跳转授权页:', data.data.auth_url);
|
||||||
const stateObj = { action: 'userinfo' };
|
// 后端已将 state 写入授权 URL,直接跳转
|
||||||
if (this.deviceId) {
|
window.location.href = data.data.auth_url;
|
||||||
stateObj.device_id = this.deviceId;
|
|
||||||
}
|
|
||||||
const stateVal = encodeURIComponent(JSON.stringify(stateObj));
|
|
||||||
// 解析 auth_url,安全地设置 state 参数(避免重复)
|
|
||||||
let authUrl = data.data.auth_url;
|
|
||||||
try {
|
|
||||||
const urlObj = new URL(authUrl);
|
|
||||||
urlObj.searchParams.set('state', stateVal);
|
|
||||||
authUrl = urlObj.toString();
|
|
||||||
} catch (_) {
|
|
||||||
// URL 解析失败时直接拼接
|
|
||||||
authUrl += (authUrl.includes('?') ? '&' : '?') + 'state=' + stateVal;
|
|
||||||
}
|
|
||||||
console.log('[index] 跳转授权页:', authUrl);
|
|
||||||
// 跳转微信授权页(弹窗确认)
|
|
||||||
window.location.href = authUrl;
|
|
||||||
} else {
|
} else {
|
||||||
console.warn('[index] 获取授权链接失败:', data.message);
|
console.warn('[index] 获取授权链接失败:', data.message);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
<!-- 数量统计和筛选 -->
|
<!-- 数量统计和筛选 -->
|
||||||
<view class="filter-bar">
|
<view class="filter-bar">
|
||||||
<text class="total-count">总数量: {{ filteredOrders.length }}</text>
|
<text class="total-count">总数量: {{ total }}</text>
|
||||||
<view class="search-btn" @click="showFilterSidebar = true">
|
<view class="search-btn" @click="showFilterSidebar = true">
|
||||||
<text class="search-icon">🔍</text>
|
<text class="search-icon">🔍</text>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
Reference in New Issue
Block a user