Files
qncV4uni-app/src/pages/mine.vue

937 lines
22 KiB
Vue
Raw Normal View History

2026-05-16 15:47:07 +08:00
<script setup lang="ts">
import { onShareAppMessage, onShareTimeline, onShow } from '@dcloudio/uni-app'
2026-05-21 17:05:09 +08:00
import { ref } from 'vue'
import { getUserDetail } from '@/api'
import { hasToken } from '@/utils/session'
import { useBindMobile } from '@/composables/useBindMobile'
2026-05-16 15:47:07 +08:00
definePage({
style: {
navigationBarTitleText: '我的',
navigationStyle: 'default',
navigationBarBackgroundColor: '#ffffff',
navigationBarTextStyle: 'black',
// 微信小程序:允许使用 open-type="share" 与右上角转发
enableShareAppMessage: true,
enableShareTimeline: true,
},
})
/** 商务合作弹窗中的二维码图:将图片放到 `src/static/` 后改为 `/static/xxx.png` 或填网络地址 */
const BUSINESS_COOP_QR_SRC = ''
const SHARE_TITLE = '全能查 — 买车先查车况,更安心'
const SHARE_PATH = '/pages/index'
const WX_NICK_KEY = 'wx_display_name'
const isLogin = ref(false)
const nickname = ref('')
const userDesc = ref('')
const hasBoundMobile = ref(false)
const wxNickStorage = ref('')
2026-05-21 17:05:09 +08:00
const {
bindVisible: bindModalOpen,
bindPhone,
bindCode,
bindSending,
bindSubmitting,
bindCountingDown,
bindCountdown,
isBindPhoneValid,
openBindModal,
closeBindModal,
onBindPhoneInput,
onBindCodeInput,
sendBindSms,
submitBindMobile,
} = useBindMobile(refreshUserCard)
2026-05-16 15:47:07 +08:00
const coopModalOpen = ref(false)
onShareAppMessage(() => ({
title: SHARE_TITLE,
path: SHARE_PATH,
}))
onShareTimeline(() => ({
title: SHARE_TITLE,
query: '',
}))
function maskMobile(plain: string) {
const s = (plain || '').trim()
if (s.length >= 11)
return `${s.slice(0, 3)}****${s.slice(-4)}`
return s || ''
}
function loadWxNickFromStorage() {
try {
const n = uni.getStorageSync(WX_NICK_KEY)
wxNickStorage.value = typeof n === 'string' && n ? n : ''
}
catch {
wxNickStorage.value = ''
}
}
2026-05-21 17:05:09 +08:00
function openBindModalFromProfile() {
openBindModal()
2026-05-16 15:47:07 +08:00
}
async function refreshUserCard() {
isLogin.value = hasToken()
if (!isLogin.value) {
nickname.value = ''
userDesc.value = ''
hasBoundMobile.value = false
return
}
loadWxNickFromStorage()
try {
const res = await getUserDetail() as {
code?: number
data?: { userInfo?: { mobile?: string, nickName?: string } }
}
if (res && res.code === 200 && res.data?.userInfo) {
const u = res.data.userInfo
const mobile = (u.mobile || '').trim()
const apiNick = (u.nickName || '').trim()
hasBoundMobile.value = /^1[3-9]\d{9}$/.test(mobile)
if (hasBoundMobile.value) {
nickname.value = maskMobile(mobile)
userDesc.value = '已绑定手机号,可同步历史报告与收藏'
}
else {
nickname.value = wxNickStorage.value || apiNick || '微信用户'
userDesc.value = '绑定手机号后,可同步历史报告与收藏'
}
}
else {
nickname.value = wxNickStorage.value || '已登录'
userDesc.value = '获取资料失败,请稍后下拉刷新'
}
}
catch {
nickname.value = wxNickStorage.value || '已登录'
userDesc.value = '网络异常,请稍后重试'
}
}
onShow(() => {
void refreshUserCard()
// #ifdef MP-WEIXIN
try {
uni.showShareMenu({
withShareTicket: true,
menus: ['shareAppMessage', 'shareTimeline'],
})
}
catch {
/* ignore */
}
// #endif
})
function handleUserTap() {
if (isLogin.value) {
return
}
uni.navigateTo({ url: '/pages/login' })
}
/** 微信小程序:用户主动触发才可调 getUserProfile */
async function syncWxNickname() {
// #ifdef MP-WEIXIN
try {
const res = await new Promise<{ userInfo?: { nickName?: string } }>((resolve, reject) => {
uni.getUserProfile({
desc: '用于在本页展示昵称',
lang: 'zh_CN',
success: resolve,
fail: reject,
})
})
const name = res.userInfo?.nickName?.trim()
if (name) {
uni.setStorageSync(WX_NICK_KEY, name)
wxNickStorage.value = name
if (!hasBoundMobile.value)
nickname.value = name
uni.showToast({ title: '昵称已更新', icon: 'none' })
}
}
catch {
uni.showToast({ title: '需要您确认授权', icon: 'none' })
}
// #endif
}
function goHistoryReport() {
2026-05-21 17:05:09 +08:00
uni.navigateTo({ url: '/pages/report' })
2026-05-16 15:47:07 +08:00
}
function goFreeValuation() {
uni.showToast({ title: '敬请期待', icon: 'none' })
}
/** 非微信小程序:无 open-type=share仅提示 */
function goShareFallback() {
uni.showToast({ title: '请在微信小程序内使用分享', icon: 'none' })
}
function openCoopModal() {
coopModalOpen.value = true
}
function closeCoopModal() {
coopModalOpen.value = false
}
function goLegalUserAgreement() {
uni.navigateTo({ url: '/pages/legal/user-agreement' })
}
function goLegalPrivacyPolicy() {
uni.navigateTo({ url: '/pages/legal/privacy-policy' })
}
function goLegalAuthorization() {
uni.navigateTo({ url: '/pages/legal/authorization' })
}
function goIllegalCode() {
2026-05-21 17:05:09 +08:00
uni.navigateTo({ url: '/pages/toolbox/query?key=jtwfcode' })
2026-05-16 15:47:07 +08:00
}
function goOilPrice() {
2026-05-21 17:05:09 +08:00
uni.navigateTo({ url: '/pages/toolbox/query?key=oilprice' })
2026-05-16 15:47:07 +08:00
}
function goHelp() {
uni.showToast({ title: '敬请期待', icon: 'none' })
}
function goAbout() {
uni.showToast({ title: '敬请期待', icon: 'none' })
}
function goSettings() {
uni.showToast({ title: '敬请期待', icon: 'none' })
}
/** 非微信小程序:无 open-type=contact */
function goServiceFallback() {
uni.showToast({ title: '请在微信小程序内使用在线客服', icon: 'none' })
}
</script>
<template>
<view class="page-root">
<scroll-view scroll-y class="scrollarea">
<view class="page">
2026-05-21 12:00:38 +08:00
<!-- 区块1: 个人信息栏 -->
<view class="profile-card">
<view class="profile-bg" />
<view class="profile-content" @tap="handleUserTap">
<view class="profile-avatar">
<view class="avatar-inner">
<view class="avatar-icon i-carbon-user" />
2026-05-16 15:47:07 +08:00
</view>
</view>
2026-05-21 12:00:38 +08:00
<view class="profile-info">
<text class="profile-name">{{ isLogin ? nickname : '点击登录' }}</text>
<text class="profile-desc">{{ isLogin ? userDesc : '登录后可同步历史报告与收藏' }}</text>
</view>
<view class="profile-arrow">
<view class="i-carbon-chevron-right" />
</view>
2026-05-16 15:47:07 +08:00
</view>
2026-05-21 12:00:38 +08:00
<!-- 已登录未绑定手机 -->
<view v-if="isLogin && !hasBoundMobile" class="profile-actions">
2026-05-21 17:05:09 +08:00
<view class="action-btn" @tap.stop="openBindModalFromProfile">
2026-05-21 12:00:38 +08:00
<view class="action-icon i-carbon-phone" />
<text class="action-text">绑定手机号</text>
</view>
<!-- #ifdef MP-WEIXIN -->
<view class="action-btn" @tap.stop="syncWxNickname">
<view class="action-icon i-carbon-edit" />
<text class="action-text">同步昵称</text>
</view>
<!-- #endif -->
2026-05-16 15:47:07 +08:00
</view>
</view>
2026-05-21 12:00:38 +08:00
<!-- 区块2: 快捷功能4宫格 -->
<view class="section">
<view class="section-title">快捷功能</view>
<view class="quick-grid">
<view class="quick-item" @tap="goHistoryReport">
<view class="quick-icon-wrap" style="background: rgba(23,104,255,0.08)">
<view class="quick-icon i-carbon-document" style="color: #1768ff" />
2026-05-16 15:47:07 +08:00
</view>
2026-05-21 12:00:38 +08:00
<text class="quick-name">历史报告</text>
2026-05-16 15:47:07 +08:00
</view>
2026-05-21 12:00:38 +08:00
<view class="quick-item" @tap="goFreeValuation">
<view class="quick-icon-wrap" style="background: rgba(250,140,22,0.08)">
<view class="quick-icon i-carbon-chart-line" style="color: #fa8c16" />
2026-05-16 15:47:07 +08:00
</view>
2026-05-21 12:00:38 +08:00
<text class="quick-name">免费估值</text>
2026-05-16 15:47:07 +08:00
</view>
<!-- #ifdef MP-WEIXIN -->
2026-05-21 12:00:38 +08:00
<button class="quick-item quick-item-btn" open-type="share" hover-class="quick-item-hover">
<view class="quick-icon-wrap" style="background: rgba(19,194,94,0.08)">
<view class="quick-icon i-carbon-share" style="color: #13c25e" />
2026-05-16 15:47:07 +08:00
</view>
2026-05-21 12:00:38 +08:00
<text class="quick-name">分享好友</text>
2026-05-16 15:47:07 +08:00
</button>
<!-- #endif -->
<!-- #ifndef MP-WEIXIN -->
2026-05-21 12:00:38 +08:00
<view class="quick-item" @tap="goShareFallback">
<view class="quick-icon-wrap" style="background: rgba(19,194,94,0.08)">
<view class="quick-icon i-carbon-share" style="color: #13c25e" />
2026-05-16 15:47:07 +08:00
</view>
2026-05-21 12:00:38 +08:00
<text class="quick-name">分享好友</text>
2026-05-16 15:47:07 +08:00
</view>
<!-- #endif -->
2026-05-21 12:00:38 +08:00
<view class="quick-item" @tap="openCoopModal">
<view class="quick-icon-wrap" style="background: rgba(114,46,209,0.08)">
<view class="quick-icon i-carbon-enterprise" style="color: #722ed1" />
2026-05-16 15:47:07 +08:00
</view>
2026-05-21 12:00:38 +08:00
<text class="quick-name">商务合作</text>
2026-05-16 15:47:07 +08:00
</view>
</view>
</view>
2026-05-21 12:00:38 +08:00
<!-- 区块3: 常用工具 -->
<view class="section">
<view class="section-title">常用工具</view>
2026-05-21 17:05:09 +08:00
<view class="quick-grid">
<view class="quick-item" @tap="goOilPrice">
<view class="quick-icon-wrap" style="background: rgba(23,104,255,0.08)">
<view class="quick-icon i-carbon-gas-station" style="color: #1768ff" />
2026-05-21 12:00:38 +08:00
</view>
2026-05-21 17:05:09 +08:00
<text class="quick-name">实时油价查询</text>
2026-05-21 12:00:38 +08:00
</view>
2026-05-21 17:05:09 +08:00
<view class="quick-item" @tap="goIllegalCode">
<view class="quick-icon-wrap" style="background: rgba(250,140,22,0.08)">
<view class="quick-icon i-carbon-search" style="color: #fa8c16" />
2026-05-21 12:00:38 +08:00
</view>
2026-05-21 17:05:09 +08:00
<text class="quick-name">违章代码查询</text>
2026-05-21 12:00:38 +08:00
</view>
2026-05-16 15:47:07 +08:00
</view>
2026-05-21 12:00:38 +08:00
</view>
<!-- 区块4: 服务与支持 -->
<view class="section">
<view class="section-title">服务与支持</view>
2026-05-21 17:05:09 +08:00
<view class="quick-grid">
<!-- #ifdef MP-WEIXIN -->
<button class="quick-item quick-item-btn" open-type="contact" hover-class="quick-item-hover">
<view class="quick-icon-wrap" style="background: rgba(19,194,94,0.08)">
<view class="quick-icon i-carbon-chat" style="color: #13c25e" />
2026-05-21 12:00:38 +08:00
</view>
2026-05-21 17:05:09 +08:00
<text class="quick-name">在线客服</text>
2026-05-21 12:00:38 +08:00
</button>
2026-05-21 17:05:09 +08:00
<!-- #endif -->
<!-- #ifndef MP-WEIXIN -->
<view class="quick-item" @tap="goServiceFallback">
<view class="quick-icon-wrap" style="background: rgba(19,194,94,0.08)">
<view class="quick-icon i-carbon-chat" style="color: #13c25e" />
2026-05-21 12:00:38 +08:00
</view>
2026-05-21 17:05:09 +08:00
<text class="quick-name">在线客服</text>
2026-05-21 12:00:38 +08:00
</view>
2026-05-21 17:05:09 +08:00
<!-- #endif -->
<view class="quick-item" @tap="goHelp">
<view class="quick-icon-wrap" style="background: rgba(114,46,209,0.08)">
<view class="quick-icon i-carbon-help" style="color: #722ed1" />
2026-05-21 12:00:38 +08:00
</view>
2026-05-21 17:05:09 +08:00
<text class="quick-name">帮助中心</text>
2026-05-21 12:00:38 +08:00
</view>
2026-05-21 17:05:09 +08:00
<view class="quick-item" @tap="goAbout">
<view class="quick-icon-wrap" style="background: rgba(78,89,105,0.08)">
<view class="quick-icon i-carbon-information" style="color: #4e5969" />
2026-05-21 12:00:38 +08:00
</view>
2026-05-21 17:05:09 +08:00
<text class="quick-name">关于我们</text>
2026-05-16 15:47:07 +08:00
</view>
2026-05-21 17:05:09 +08:00
<view class="quick-item" @tap="goLegalUserAgreement">
<view class="quick-icon-wrap" style="background: rgba(78,89,105,0.06)">
<view class="quick-icon i-carbon-document-blank" style="color: #86909c" />
2026-05-21 12:00:38 +08:00
</view>
2026-05-21 17:05:09 +08:00
<text class="quick-name">用户协议</text>
2026-05-21 12:00:38 +08:00
</view>
2026-05-21 17:05:09 +08:00
<view class="quick-item" @tap="goLegalPrivacyPolicy">
<view class="quick-icon-wrap" style="background: rgba(78,89,105,0.06)">
<view class="quick-icon i-carbon-security" style="color: #86909c" />
2026-05-21 12:00:38 +08:00
</view>
2026-05-21 17:05:09 +08:00
<text class="quick-name">隐私政策</text>
</view>
<view class="quick-item" @tap="goLegalAuthorization">
<view class="quick-icon-wrap" style="background: rgba(78,89,105,0.06)">
<view class="quick-icon i-carbon-certificate" style="color: #86909c" />
</view>
<text class="quick-name">授权书</text>
2026-05-21 12:00:38 +08:00
</view>
</view>
2026-05-16 15:47:07 +08:00
</view>
2026-05-21 12:00:38 +08:00
<view style="height: 40rpx" />
2026-05-16 15:47:07 +08:00
</view>
</scroll-view>
<view v-if="coopModalOpen" class="coop-mask" @tap.self="closeCoopModal">
<view class="coop-dialog" @tap.stop>
<view class="coop-title">
商务合作
</view>
<view class="coop-hint">
扫码添加商务微信图片路径可在代码中配置
</view>
<image
v-if="BUSINESS_COOP_QR_SRC"
class="coop-qr"
:src="BUSINESS_COOP_QR_SRC"
mode="aspectFit"
show-menu-by-longpress
/>
<view v-else class="coop-qr-placeholder">
<text class="coop-qr-placeholder-text">二维码图片路径待定</text>
<text class="coop-qr-placeholder-text coop-qr-placeholder-sub">请将图片放入 static 目录并在 mine.vue 中为 BUSINESS_COOP_QR_SRC 赋值</text>
</view>
<view class="coop-close" @tap="closeCoopModal">
知道了
</view>
</view>
</view>
<view v-if="bindModalOpen" class="bind-mask" @tap.self="closeBindModal">
<view class="bind-sheet" @tap.stop>
<view class="bind-sheet-title">
绑定手机号
</view>
<view class="bind-field">
<text class="bind-label">手机号</text>
<input
class="bind-input"
type="digit"
:value="bindPhone"
:maxlength="11"
placeholder="请输入手机号"
placeholder-class="bind-ph"
confirm-type="done"
@input="onBindPhoneInput"
>
</view>
<view class="bind-field bind-field-row">
<view class="bind-field-grow">
<text class="bind-label">验证码</text>
<input
class="bind-input"
type="digit"
:value="bindCode"
:maxlength="6"
placeholder="6 位短信码"
placeholder-class="bind-ph"
confirm-type="done"
@input="onBindCodeInput"
>
</view>
<view
class="bind-sms"
:class="{ disabled: bindSending || bindCountingDown || !isBindPhoneValid() }"
@tap="sendBindSms"
>
{{ bindCountingDown ? `${bindCountdown}s` : '获取验证码' }}
</view>
</view>
<view
class="bind-submit"
:class="{ disabled: bindSubmitting || !isBindPhoneValid() || bindCode.length < 6 }"
@tap="submitBindMobile"
>
确认绑定
</view>
<view class="bind-cancel" @tap="closeBindModal">
取消
</view>
</view>
</view>
</view>
</template>
<style scoped lang="scss">
.page-root {
height: 100vh;
display: flex;
flex-direction: column;
2026-05-21 12:00:38 +08:00
background: linear-gradient(180deg, #f0f5ff 0%, #f5f7fa 30%, #f3f5fb 100%);
2026-05-16 15:47:07 +08:00
}
.scrollarea {
flex: 1;
min-height: 0;
height: 0;
}
.page {
2026-05-21 12:00:38 +08:00
padding: 0 24rpx 40rpx;
2026-05-16 15:47:07 +08:00
box-sizing: border-box;
}
2026-05-21 12:00:38 +08:00
/* ═══ 区块1: 个人信息栏 ═══ */
.profile-card {
position: relative;
border-radius: 0 0 32rpx 32rpx;
overflow: hidden;
2026-05-16 15:47:07 +08:00
margin-bottom: 24rpx;
}
2026-05-21 12:00:38 +08:00
.profile-bg {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
background: linear-gradient(135deg, #1768ff 0%, #4d94ff 60%, #7bb8ff 100%);
2026-05-16 15:47:07 +08:00
}
2026-05-21 12:00:38 +08:00
.profile-content {
position: relative;
display: flex;
align-items: center;
padding: 48rpx 32rpx 32rpx;
gap: 20rpx;
2026-05-16 15:47:07 +08:00
}
2026-05-21 12:00:38 +08:00
.profile-avatar {
flex-shrink: 0;
2026-05-16 15:47:07 +08:00
}
2026-05-21 12:00:38 +08:00
.avatar-inner {
width: 96rpx;
height: 96rpx;
border-radius: 50%;
background: rgba(255, 255, 255, 0.2);
2026-05-16 15:47:07 +08:00
display: flex;
align-items: center;
justify-content: center;
2026-05-21 12:00:38 +08:00
border: 3rpx solid rgba(255, 255, 255, 0.4);
2026-05-16 15:47:07 +08:00
}
2026-05-21 12:00:38 +08:00
.avatar-icon {
font-size: 44rpx;
color: #fff;
2026-05-16 15:47:07 +08:00
}
2026-05-21 12:00:38 +08:00
.profile-info {
flex: 1;
min-width: 0;
2026-05-16 15:47:07 +08:00
}
2026-05-21 12:00:38 +08:00
.profile-name {
display: block;
font-size: 32rpx;
font-weight: 600;
color: #fff;
margin-bottom: 6rpx;
2026-05-16 15:47:07 +08:00
}
2026-05-21 12:00:38 +08:00
.profile-desc {
display: block;
font-size: 22rpx;
color: rgba(255, 255, 255, 0.8);
2026-05-16 15:47:07 +08:00
}
2026-05-21 12:00:38 +08:00
.profile-arrow {
2026-05-16 15:47:07 +08:00
flex-shrink: 0;
2026-05-21 12:00:38 +08:00
color: rgba(255, 255, 255, 0.6);
font-size: 28rpx;
2026-05-16 15:47:07 +08:00
}
2026-05-21 12:00:38 +08:00
.profile-actions {
position: relative;
display: flex;
gap: 24rpx;
padding: 0 32rpx 28rpx;
2026-05-16 15:47:07 +08:00
}
2026-05-21 12:00:38 +08:00
.action-btn {
display: flex;
align-items: center;
gap: 8rpx;
padding: 10rpx 24rpx;
border-radius: 24rpx;
background: rgba(255, 255, 255, 0.18);
2026-05-16 15:47:07 +08:00
}
2026-05-21 12:00:38 +08:00
.action-icon {
font-size: 24rpx;
color: #fff;
2026-05-16 15:47:07 +08:00
}
2026-05-21 12:00:38 +08:00
.action-text {
2026-05-16 15:47:07 +08:00
font-size: 22rpx;
2026-05-21 12:00:38 +08:00
color: #fff;
2026-05-16 15:47:07 +08:00
}
2026-05-21 12:00:38 +08:00
/* ═══ 区块通用 ═══ */
.section {
background: #fff;
border-radius: 24rpx;
padding: 28rpx 24rpx 8rpx;
margin-bottom: 24rpx;
box-shadow: 0 4rpx 16rpx rgba(15, 35, 52, 0.03);
2026-05-16 15:47:07 +08:00
}
2026-05-21 12:00:38 +08:00
.section-title {
font-size: 26rpx;
font-weight: 600;
color: #1d2129;
margin-bottom: 20rpx;
padding-left: 4rpx;
2026-05-16 15:47:07 +08:00
}
2026-05-21 12:00:38 +08:00
/* ═══ 区块2: 快捷功能4宫格 ═══ */
.quick-grid {
display: flex;
flex-wrap: wrap;
padding-bottom: 16rpx;
2026-05-16 15:47:07 +08:00
}
2026-05-21 12:00:38 +08:00
.quick-item {
width: 25%;
2026-05-16 15:47:07 +08:00
display: flex;
2026-05-21 12:00:38 +08:00
flex-direction: column;
2026-05-16 15:47:07 +08:00
align-items: center;
2026-05-21 12:00:38 +08:00
padding: 12rpx 0;
2026-05-16 15:47:07 +08:00
}
2026-05-21 12:00:38 +08:00
.quick-item-btn {
margin: 0;
padding: 12rpx 0;
border: none;
background: transparent;
line-height: normal;
font-size: inherit;
color: inherit;
box-sizing: border-box;
2026-05-16 15:47:07 +08:00
}
2026-05-21 12:00:38 +08:00
.quick-item-btn::after {
display: none;
2026-05-16 15:47:07 +08:00
}
2026-05-21 12:00:38 +08:00
.quick-item-hover {
opacity: 0.7;
}
.quick-icon-wrap {
width: 80rpx;
height: 80rpx;
2026-05-21 17:05:09 +08:00
border-radius: 50%;
2026-05-16 15:47:07 +08:00
display: flex;
2026-05-21 12:00:38 +08:00
align-items: center;
2026-05-16 15:47:07 +08:00
justify-content: center;
2026-05-21 12:00:38 +08:00
margin-bottom: 10rpx;
2026-05-16 15:47:07 +08:00
}
2026-05-21 12:00:38 +08:00
.quick-icon {
font-size: 36rpx;
2026-05-16 15:47:07 +08:00
}
2026-05-21 12:00:38 +08:00
.quick-name {
font-size: 22rpx;
color: #4e5969;
2026-05-16 15:47:07 +08:00
text-align: center;
}
2026-05-21 12:00:38 +08:00
/* ═══ 区块3/4/5: 列表行 ═══ */
.tool-list {
padding-bottom: 8rpx;
2026-05-16 15:47:07 +08:00
}
2026-05-21 12:00:38 +08:00
.tool-row {
2026-05-16 15:47:07 +08:00
display: flex;
2026-05-21 12:00:38 +08:00
align-items: center;
padding: 20rpx 4rpx;
border-bottom: 1rpx solid #f5f5f5;
2026-05-16 15:47:07 +08:00
}
2026-05-21 12:00:38 +08:00
.tool-row:last-child {
border-bottom: none;
2026-05-16 15:47:07 +08:00
}
2026-05-21 12:00:38 +08:00
.tool-row:active {
background: #fafbfc;
border-radius: 12rpx;
2026-05-16 15:47:07 +08:00
}
2026-05-21 12:00:38 +08:00
.tool-row-btn {
margin: 0;
padding: 20rpx 4rpx;
border: none;
border-radius: 0;
background: transparent;
text-align: left;
line-height: inherit;
font-size: inherit;
color: inherit;
2026-05-16 15:47:07 +08:00
box-sizing: border-box;
2026-05-21 12:00:38 +08:00
width: 100%;
border-bottom: 1rpx solid #f5f5f5;
2026-05-16 15:47:07 +08:00
}
2026-05-21 12:00:38 +08:00
.tool-row-btn::after {
display: none;
2026-05-16 15:47:07 +08:00
}
2026-05-21 12:00:38 +08:00
.tool-row-hover {
background: rgba(23, 104, 255, 0.04);
2026-05-16 15:47:07 +08:00
}
2026-05-21 12:00:38 +08:00
.tool-row-icon-wrap {
width: 56rpx;
height: 56rpx;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
margin-right: 16rpx;
flex-shrink: 0;
2026-05-16 15:47:07 +08:00
}
2026-05-21 12:00:38 +08:00
.tool-row-icon {
2026-05-16 15:47:07 +08:00
font-size: 28rpx;
}
2026-05-21 12:00:38 +08:00
.tool-row-text {
flex: 1;
min-width: 0;
2026-05-16 15:47:07 +08:00
}
2026-05-21 12:00:38 +08:00
.tool-row-name {
flex: 1;
font-size: 26rpx;
color: #1d2129;
2026-05-16 15:47:07 +08:00
}
2026-05-21 12:00:38 +08:00
.tool-row-sub {
display: block;
font-size: 20rpx;
color: #ffb020;
margin-top: 2rpx;
2026-05-16 15:47:07 +08:00
}
2026-05-21 12:00:38 +08:00
.tool-row-arrow {
font-size: 28rpx;
color: #c9cdd4;
flex-shrink: 0;
margin-left: 8rpx;
2026-05-16 15:47:07 +08:00
}
2026-05-21 12:00:38 +08:00
.no-border {
border-bottom: none !important;
2026-05-16 15:47:07 +08:00
}
2026-05-21 12:00:38 +08:00
/* ═══ 弹窗样式 ═══ */
2026-05-16 15:47:07 +08:00
.coop-mask {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 1001;
display: flex;
align-items: center;
justify-content: center;
padding: 48rpx;
box-sizing: border-box;
}
.coop-dialog {
width: 100%;
max-width: 600rpx;
background: #fff;
border-radius: 24rpx;
padding: 36rpx 32rpx 28rpx;
box-sizing: border-box;
}
.coop-title {
font-size: 32rpx;
font-weight: 600;
color: #1d2129;
text-align: center;
margin-bottom: 12rpx;
}
.coop-hint {
font-size: 24rpx;
color: #86909c;
text-align: center;
margin-bottom: 28rpx;
line-height: 1.5;
}
.coop-qr {
display: block;
width: 360rpx;
height: 360rpx;
margin: 0 auto 28rpx;
border-radius: 12rpx;
background: #f7f8fa;
}
.coop-qr-placeholder {
width: 360rpx;
height: 360rpx;
margin: 0 auto 28rpx;
border-radius: 12rpx;
border: 2rpx dashed #dcdfe6;
background: #fafbfc;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 24rpx;
box-sizing: border-box;
gap: 12rpx;
}
.coop-qr-placeholder-text {
font-size: 22rpx;
color: #86909c;
line-height: 1.6;
text-align: center;
}
.coop-qr-placeholder-sub {
font-size: 20rpx;
color: #c9cdd4;
}
.coop-close {
height: 80rpx;
line-height: 80rpx;
text-align: center;
background: linear-gradient(90deg, #1768ff 0%, #4d94ff 100%);
color: #fff;
font-size: 28rpx;
font-weight: 600;
border-radius: 40rpx;
}
2026-05-21 12:00:38 +08:00
/* ═══ 绑定手机弹窗 ═══ */
.bind-mask {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.45);
z-index: 1000;
display: flex;
align-items: flex-end;
justify-content: center;
2026-05-16 15:47:07 +08:00
}
2026-05-21 12:00:38 +08:00
.bind-sheet {
width: 100%;
background: #fff;
border-radius: 24rpx 24rpx 0 0;
padding: 28rpx 28rpx calc(28rpx + env(safe-area-inset-bottom));
box-sizing: border-box;
2026-05-16 15:47:07 +08:00
}
2026-05-21 12:00:38 +08:00
.bind-sheet-title {
font-size: 32rpx;
font-weight: 600;
color: #1d2129;
margin-bottom: 24rpx;
text-align: center;
2026-05-16 15:47:07 +08:00
}
2026-05-21 12:00:38 +08:00
.bind-field {
margin-bottom: 20rpx;
padding-bottom: 12rpx;
2026-05-16 15:47:07 +08:00
border-bottom: 1rpx solid #f0f0f0;
}
2026-05-21 12:00:38 +08:00
.bind-field-row {
display: flex;
align-items: flex-end;
gap: 16rpx;
2026-05-16 15:47:07 +08:00
}
2026-05-21 12:00:38 +08:00
.bind-field-grow {
flex: 1;
min-width: 0;
2026-05-16 15:47:07 +08:00
}
2026-05-21 12:00:38 +08:00
.bind-label {
display: block;
font-size: 24rpx;
color: #86909c;
margin-bottom: 8rpx;
2026-05-16 15:47:07 +08:00
}
2026-05-21 12:00:38 +08:00
.bind-input {
width: 100%;
height: 72rpx;
font-size: 30rpx;
color: #1d2129;
box-sizing: border-box;
}
.bind-ph {
color: #c9cdd4;
}
.bind-sms {
2026-05-16 15:47:07 +08:00
flex-shrink: 0;
2026-05-21 12:00:38 +08:00
height: 64rpx;
line-height: 64rpx;
padding: 0 20rpx;
font-size: 24rpx;
2026-05-16 15:47:07 +08:00
color: #1768ff;
2026-05-21 12:00:38 +08:00
background: #f0f5ff;
border-radius: 12rpx;
text-align: center;
2026-05-16 15:47:07 +08:00
}
2026-05-21 12:00:38 +08:00
.bind-sms.disabled {
color: #c9cdd4;
background: #f7f8fa;
pointer-events: none;
2026-05-16 15:47:07 +08:00
}
2026-05-21 12:00:38 +08:00
.bind-submit {
margin-top: 12rpx;
height: 88rpx;
line-height: 88rpx;
text-align: center;
background: linear-gradient(90deg, #1768ff 0%, #4d94ff 100%);
color: #fff;
font-size: 30rpx;
font-weight: 600;
border-radius: 44rpx;
2026-05-16 15:47:07 +08:00
}
2026-05-21 12:00:38 +08:00
.bind-submit.disabled {
opacity: 0.45;
pointer-events: none;
2026-05-16 15:47:07 +08:00
}
2026-05-21 12:00:38 +08:00
.bind-cancel {
margin-top: 20rpx;
text-align: center;
font-size: 28rpx;
color: #86909c;
padding: 12rpx;
2026-05-16 15:47:07 +08:00
}
</style>