refactor: APP 扫码登录和文档优化

This commit is contained in:
Ray.Hao committed 2026-07-23 17:46:16 +08:00
1 parent 86aede7c7f
commit ce01e3cff8
23 files changed
+382 -12

No files matched your search

+1 -1
View File
@@ -2,7 +2,7 @@
<view class="page page--padding">
<wd-card>
<view class="about__header">
<image class="about__logo" src="/static/logo.png" mode="aspectFit" />
<image class="about__logo" src="/logo.png" mode="aspectFit" />
<view class="about__info">
<text class="about__app-title">youlai-app</text>
<text class="about__app-version">版本 {{ version }}</text>
+30 -1
View File
@@ -81,7 +81,7 @@
/>
<view class="community-card__mask" />
<view class="community-card__logo">
<image src="/static/logo.png" mode="aspectFit" class="w-full h-full" />
<image src="/logo.png" mode="aspectFit" class="w-full h-full" />
</view>
<view class="community-card__body">
<view class="community-card__title-row">
@@ -132,6 +132,16 @@
</view>
<wd-icon name="right" size="16" color="var(--color-text-placeholder)" />
</view>
<view v-if="isLogin" class="menu-row" @click="handleScan">
<view class="menu-row__icon menu-row__icon--info">
<wd-icon name="search" size="18" color="var(--color-primary)" />
</view>
<view class="menu-row__main">
<text class="menu-row__title">扫一扫</text>
<text class="menu-row__desc">扫描二维码登录 PC</text>
</view>
<wd-icon name="right" size="16" color="var(--color-text-placeholder)" />
</view>
<view class="menu-row" @click="handleClearCache">
<view class="menu-row__icon menu-row__icon--danger">
<wd-icon name="delete" size="18" color="var(--color-danger)" />
@@ -378,6 +388,25 @@ const handleClearCache = async () => {
}
};
// 扫一扫:扫描 PC 端二维码后跳转确认页
const handleScan = async () => {
if (!isLogin.value) {
navigateToLogin();
return;
}
try {
const res = await uni.scanCode({ scanType: ["qrCode"] });
const ticket = (res.result || "").trim();
if (!ticket) {
uni.showToast({ title: "无效的二维码", icon: "none" });
return;
}
router.push({ path: "/pages/qr-code-confirm/index", query: { ticket: encodeURIComponent(ticket) } });
} catch {
// 用户取消扫码,静默处理
}
};
// 有来技术公众号
const openOfficialAccount = () => {
uni.navigateTo({