|
@@ -76,7 +76,12 @@
|
|
|
|
|
|
|
|
<!-- 手动输入 Cookie -->
|
|
<!-- 手动输入 Cookie -->
|
|
|
<view class="cookie-input">
|
|
<view class="cookie-input">
|
|
|
- <view class="input-label">Cookie</view>
|
|
|
|
|
|
|
+ <view class="input-label-row">
|
|
|
|
|
+ <view class="input-label">Cookie</view>
|
|
|
|
|
+ <button class="help-btn" @click="showCookieHelp">
|
|
|
|
|
+ ❓ 如何获取
|
|
|
|
|
+ </button>
|
|
|
|
|
+ </view>
|
|
|
<textarea
|
|
<textarea
|
|
|
class="input-area"
|
|
class="input-area"
|
|
|
v-model="manualCookie"
|
|
v-model="manualCookie"
|
|
@@ -508,6 +513,30 @@ function rebindAccount() {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+function showCookieHelp() {
|
|
|
|
|
+ const platformName = currentPlatform.value?.name || '该平台';
|
|
|
|
|
+
|
|
|
|
|
+ uni.showModal({
|
|
|
|
|
+ title: `${platformName} Cookie 获取方法`,
|
|
|
|
|
+ content: `方法一(推荐):
|
|
|
|
|
+1. 点击"打开${platformName}登录页面"
|
|
|
|
|
+2. 登录成功后,按 F12
|
|
|
|
|
+3. 切换到 Console 标签
|
|
|
|
|
+4. 输入: copy(document.cookie)
|
|
|
|
|
+5. 回到本页按 Ctrl+V 粘贴
|
|
|
|
|
+
|
|
|
|
|
+方法二:
|
|
|
|
|
+1. 登录${platformName}
|
|
|
|
|
+2. 按 F12 → Application → Cookies
|
|
|
|
|
+3. 右键复制所有 Cookie
|
|
|
|
|
+4. 粘贴到上方输入框
|
|
|
|
|
+
|
|
|
|
|
+提示:Cookie 有效期约7-30天`,
|
|
|
|
|
+ showCancel: false,
|
|
|
|
|
+ confirmText: '我知道了'
|
|
|
|
|
+ });
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
function openLoginWebView() {
|
|
function openLoginWebView() {
|
|
|
if (!selectedPlatform.value) {
|
|
if (!selectedPlatform.value) {
|
|
|
uni.showToast({ title: '请先选择平台', icon: 'none' });
|
|
uni.showToast({ title: '请先选择平台', icon: 'none' });
|
|
@@ -547,10 +576,13 @@ function openLoginWebView() {
|
|
|
// #ifdef H5
|
|
// #ifdef H5
|
|
|
// H5 环境下打开新窗口
|
|
// H5 环境下打开新窗口
|
|
|
window.open(url, '_blank', 'width=1200,height=800');
|
|
window.open(url, '_blank', 'width=1200,height=800');
|
|
|
- uni.showToast({
|
|
|
|
|
- title: '请在新窗口登录后复制 Cookie',
|
|
|
|
|
- icon: 'none',
|
|
|
|
|
- duration: 2000
|
|
|
|
|
|
|
+
|
|
|
|
|
+ // 显示获取Cookie的指引
|
|
|
|
|
+ uni.showModal({
|
|
|
|
|
+ title: '如何获取 Cookie',
|
|
|
|
|
+ content: '1. 在新窗口登录平台账号\n2. 按F12打开开发者工具\n3. 切换到Console标签\n4. 输入: copy(document.cookie)\n5. 回到本页粘贴Cookie',
|
|
|
|
|
+ showCancel: false,
|
|
|
|
|
+ confirmText: '我知道了'
|
|
|
});
|
|
});
|
|
|
// #endif
|
|
// #endif
|
|
|
|
|
|
|
@@ -978,7 +1010,22 @@ onLoad(async (query: any) => {
|
|
|
|
|
|
|
|
/* Cookie 输入 */
|
|
/* Cookie 输入 */
|
|
|
.cookie-input { margin-bottom: 12px; }
|
|
.cookie-input { margin-bottom: 12px; }
|
|
|
-.input-label { font-size: 13px; color: #666; margin-bottom: 4px; }
|
|
|
|
|
|
|
+.input-label-row {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ margin-bottom: 4px;
|
|
|
|
|
+}
|
|
|
|
|
+.input-label { font-size: 13px; color: #666; }
|
|
|
|
|
+.help-btn {
|
|
|
|
|
+ font-size: 12px;
|
|
|
|
|
+ color: #667eea;
|
|
|
|
|
+ background: none;
|
|
|
|
|
+ border: none;
|
|
|
|
|
+ padding: 0;
|
|
|
|
|
+ margin: 0;
|
|
|
|
|
+ line-height: 1;
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
/* 账号卡片 */
|
|
/* 账号卡片 */
|
|
|
.account-card {
|
|
.account-card {
|