删除不再使用的文件和配置,优化项目结构以提升可维护性;新增环境变量配置示例,更新 Docker 和部署相关文件以支持灵活的端口设置;重构数据库连接逻辑,增强错误处理和配置管理,确保更好的兼容性和稳定性。

This commit is contained in:
2026-02-02 18:16:15 +08:00
parent 6dcc6a4709
commit 8eec1ab78c
126 changed files with 12536 additions and 20384 deletions

View File

@@ -1,415 +1,120 @@
/**
* Soul创业派对 - 设置页
* 账号绑定功能
*/
const app = getApp()
Page({
data: {
statusBarHeight: 44,
isLoggedIn: false,
userInfo: null,
version: '1.0.0',
// 绑定信息
phoneNumber: '',
wechatId: '',
alipayAccount: '',
addressSummary: '管理收货地址',
// 自动提现(默认开启)
autoWithdrawEnabled: true,
// 绑定弹窗
navBarHeight: 88,
user: null,
showBindModal: false,
bindType: '', // phone | wechat | alipay
bindValue: ''
bindType: 'phone',
bindValue: '',
isBinding: false,
bindError: ''
},
onLoad() {
this.setData({
statusBarHeight: app.globalData.statusBarHeight,
isLoggedIn: app.globalData.isLoggedIn,
userInfo: app.globalData.userInfo
})
this.loadBindingInfo()
const statusBarHeight = app.globalData.statusBarHeight || 44
const navBarHeight = app.globalData.navBarHeight || (statusBarHeight + 44)
this.setData({ statusBarHeight, navBarHeight })
this.syncUser()
},
onShow() {
this.loadBindingInfo()
this.syncUser()
},
// 加载绑定信息
loadBindingInfo() {
const { userInfo, isLoggedIn } = app.globalData
if (isLoggedIn && userInfo) {
// 从本地存储或用户信息中获取绑定数据
const phoneNumber = wx.getStorageSync('user_phone') || userInfo.phone || ''
const wechatId = wx.getStorageSync('user_wechat') || userInfo.wechat || ''
const alipayAccount = wx.getStorageSync('user_alipay') || userInfo.alipay || ''
// 默认开启自动提现
const autoWithdrawEnabled = wx.getStorageSync('auto_withdraw_enabled') !== false
this.setData({
isLoggedIn: true,
userInfo,
phoneNumber,
wechatId,
alipayAccount,
autoWithdrawEnabled
})
this.loadAddressSummary()
}
},
// 加载地址摘要(共 N 个地址)
async loadAddressSummary() {
try {
const userId = app.globalData.userInfo?.id
if (!userId) return
const res = await app.request('/api/user/addresses', { data: { userId } })
if (res.success && res.list && res.list.length > 0) {
this.setData({ addressSummary: `${res.list.length}个收货地址` })
} else {
this.setData({ addressSummary: '管理收货地址' })
}
} catch (e) {
this.setData({ addressSummary: '管理收货地址' })
}
syncUser() {
const user = app.globalData.userInfo || null
this.setData({ user })
},
// 跳转收货地址列表(增删改查),未登录时提示先登录
goToAddressList() {
if (!app.globalData.isLoggedIn || !app.globalData.userInfo) {
wx.showToast({ title: '请先登录', icon: 'none' })
return
}
goBack() {
wx.navigateBack({ fail: () => wx.switchTab({ url: '/pages/my/my' }) })
},
goAddresses() {
wx.navigateTo({ url: '/pages/address-list/address-list' })
},
// 切换自动提现
async toggleAutoWithdraw(e) {
const enabled = e.detail.value
// 检查是否绑定了支付方式
if (enabled && !this.data.wechatId && !this.data.alipayAccount) {
wx.showToast({ title: '请先绑定微信号或支付宝', icon: 'none' })
this.setData({ autoWithdrawEnabled: false })
return
}
// 开启时需要确认
if (enabled) {
wx.showModal({
title: '开启自动提现',
content: `收益将自动打款到您的${this.data.alipayAccount ? '支付宝' : '微信'}账户,确认开启吗?`,
success: async (res) => {
if (res.confirm) {
this.setData({ autoWithdrawEnabled: true })
wx.setStorageSync('auto_withdraw_enabled', true)
// 同步到服务器
try {
await app.request('/api/user/update', {
method: 'POST',
data: {
userId: app.globalData.userInfo?.id,
autoWithdraw: true,
withdrawAccount: this.data.alipayAccount || this.data.wechatId
}
})
} catch (e) {
console.log('同步自动提现设置失败', e)
}
wx.showToast({ title: '已开启自动提现', icon: 'success' })
} else {
this.setData({ autoWithdrawEnabled: false })
}
}
})
} else {
this.setData({ autoWithdrawEnabled: false })
wx.setStorageSync('auto_withdraw_enabled', false)
wx.showToast({ title: '已关闭自动提现', icon: 'success' })
}
},
// 绑定手机号
bindPhone() {
openBindModal(e) {
const type = e.currentTarget.dataset.type
const user = this.data.user
let bindValue = ''
if (type === 'phone' && user && user.phone) bindValue = user.phone
if (type === 'wechat' && user && user.wechat) bindValue = user.wechat
if (type === 'alipay' && user && user.alipay) bindValue = user.alipay
this.setData({
showBindModal: true,
bindType: 'phone',
bindValue: ''
bindType: type,
bindValue,
bindError: ''
})
},
// 微信号输入
onWechatInput(e) {
this.setData({ wechatId: e.detail.value })
},
// 保存微信号
async saveWechat() {
const { wechatId } = this.data
if (!wechatId || wechatId.length < 6) return
wx.setStorageSync('user_wechat', wechatId)
// 更新用户信息
if (app.globalData.userInfo) {
app.globalData.userInfo.wechat = wechatId
wx.setStorageSync('userInfo', app.globalData.userInfo)
}
// 同步到服务器
try {
await app.request('/api/user/update', {
method: 'POST',
data: {
userId: app.globalData.userInfo?.id,
wechat: wechatId
}
})
wx.showToast({ title: '微信号已保存', icon: 'success' })
} catch (e) {
console.log('保存微信号失败', e)
}
},
// 输入绑定值
onBindInput(e) {
let value = e.detail.value
if (this.data.bindType === 'phone') {
value = value.replace(/\D/g, '').slice(0, 11)
}
this.setData({ bindValue: value })
},
// 确认绑定
confirmBind() {
const { bindType, bindValue } = this.data
if (!bindValue) {
wx.showToast({ title: '请输入内容', icon: 'none' })
return
}
// 验证
if (bindType === 'phone' && !/^1[3-9]\d{9}$/.test(bindValue)) {
wx.showToast({ title: '请输入正确的手机号', icon: 'none' })
return
}
if (bindType === 'wechat' && bindValue.length < 6) {
wx.showToast({ title: '微信号至少6位', icon: 'none' })
return
}
if (bindType === 'alipay' && !bindValue.includes('@') && !/^1[3-9]\d{9}$/.test(bindValue)) {
wx.showToast({ title: '请输入正确的支付宝账号', icon: 'none' })
return
}
// 保存绑定信息到本地
if (bindType === 'phone') {
wx.setStorageSync('user_phone', bindValue)
this.setData({ phoneNumber: bindValue })
} else if (bindType === 'wechat') {
wx.setStorageSync('user_wechat', bindValue)
this.setData({ wechatId: bindValue })
} else if (bindType === 'alipay') {
wx.setStorageSync('user_alipay', bindValue)
this.setData({ alipayAccount: bindValue })
}
// 同步到服务器
this.syncProfileToServer()
this.setData({ showBindModal: false })
wx.showToast({ title: '绑定成功', icon: 'success' })
},
// 同步资料到服务器
async syncProfileToServer() {
try {
const userId = app.globalData.userInfo?.id
if (!userId) return
const res = await app.request('/api/user/profile', {
method: 'POST',
data: {
userId,
phone: this.data.phoneNumber || undefined,
wechatId: this.data.wechatId || undefined
}
})
if (res.success) {
console.log('[Settings] 资料同步成功')
// 更新本地用户信息
if (app.globalData.userInfo) {
app.globalData.userInfo.phone = this.data.phoneNumber
app.globalData.userInfo.wechatId = this.data.wechatId
wx.setStorageSync('userInfo', app.globalData.userInfo)
}
}
} catch (e) {
console.log('[Settings] 资料同步失败:', e)
}
},
// 获取微信头像(新版授权)
async getWechatAvatar() {
try {
const res = await wx.getUserProfile({
desc: '用于完善会员资料'
})
if (res.userInfo) {
const { nickName, avatarUrl } = res.userInfo
// 更新本地
this.setData({
userInfo: {
...this.data.userInfo,
nickname: nickName,
avatar: avatarUrl
}
})
// 同步到服务器
const userId = app.globalData.userInfo?.id
if (userId) {
await app.request('/api/user/profile', {
method: 'POST',
data: { userId, nickname: nickName, avatar: avatarUrl }
})
}
// 更新全局
if (app.globalData.userInfo) {
app.globalData.userInfo.nickname = nickName
app.globalData.userInfo.avatar = avatarUrl
wx.setStorageSync('userInfo', app.globalData.userInfo)
}
wx.showToast({ title: '头像更新成功', icon: 'success' })
}
} catch (e) {
console.log('[Settings] 获取头像失败:', e)
wx.showToast({ title: '获取头像失败', icon: 'none' })
}
},
// 一键获取微信手机号button组件回调
async onGetPhoneNumber(e) {
console.log('[Settings] 获取手机号回调:', e.detail)
if (e.detail.errMsg !== 'getPhoneNumber:ok') {
wx.showToast({ title: '授权失败', icon: 'none' })
return
}
try {
// 需要将code发送到服务器解密获取手机号
const code = e.detail.code
if (!code) {
// 如果没有code弹出手动输入
this.bindPhone()
return
}
wx.showLoading({ title: '获取中...', mask: true })
// 调用服务器解密手机号传入userId以便同步到数据库
const userId = app.globalData.userInfo?.id
const res = await app.request('/api/miniprogram/phone', {
method: 'POST',
data: { code, userId }
})
wx.hideLoading()
if (res.success && res.phoneNumber) {
wx.setStorageSync('user_phone', res.phoneNumber)
this.setData({ phoneNumber: res.phoneNumber })
// 更新用户信息
if (app.globalData.userInfo) {
app.globalData.userInfo.phone = res.phoneNumber
wx.setStorageSync('userInfo', app.globalData.userInfo)
}
// 同步到服务器
this.syncProfileToServer()
wx.showToast({ title: '手机号绑定成功', icon: 'success' })
} else {
// 获取失败,弹出手动输入
this.bindPhone()
}
} catch (e) {
wx.hideLoading()
console.log('[Settings] 获取手机号失败:', e)
// 获取失败,弹出手动输入
this.bindPhone()
}
},
// 关闭绑定弹窗
closeBindModal() {
this.setData({ showBindModal: false })
if (!this.data.isBinding) this.setData({ showBindModal: false, bindValue: '', bindError: '' })
},
// 清除缓存
clearCache() {
wx.showModal({
title: '清除缓存',
content: '确定要清除本地缓存吗?',
success: (res) => {
if (res.confirm) {
// 保留登录信息,只清除其他缓存
const token = wx.getStorageSync('token')
const userInfo = wx.getStorageSync('userInfo')
wx.clearStorageSync()
if (token) wx.setStorageSync('token', token)
if (userInfo) wx.setStorageSync('userInfo', userInfo)
wx.showToast({ title: '缓存已清除', icon: 'success' })
}
onBindInput(e) {
this.setData({ bindValue: (e.detail && e.detail.value) || '', bindError: '' })
},
submitBind() {
const { bindType, bindValue, user } = this.data
if (!bindValue || !bindValue.trim()) {
this.setData({ bindError: '请输入内容' })
return
}
if (bindType === 'phone' && !/^1[3-9]\d{9}$/.test(bindValue)) {
this.setData({ bindError: '请输入正确的手机号' })
return
}
if (bindType === 'wechat' && bindValue.length < 6) {
this.setData({ bindError: '微信号至少6位' })
return
}
if (bindType === 'alipay' && !bindValue.includes('@') && !/^1[3-9]\d{9}$/.test(bindValue)) {
this.setData({ bindError: '请输入正确的支付宝账号' })
return
}
this.setData({ isBinding: true, bindError: '' })
app.request('/api/user/update', {
method: 'POST',
data: {
userId: user && user.id,
[bindType]: bindValue
}
}).then(() => {
const newUser = { ...user, [bindType]: bindValue }
app.globalData.userInfo = newUser
wx.setStorageSync('userInfo', newUser)
this.setData({
user: newUser,
showBindModal: false,
bindValue: '',
isBinding: false
})
wx.showToast({ title: '绑定成功', icon: 'success' })
}).catch(() => {
this.setData({ bindError: '绑定失败,请重试', isBinding: false })
})
},
// 退出登录
handleLogout() {
logout() {
wx.showModal({
title: '退出登录',
content: '确定退出登录吗?',
title: '提示',
content: '确定退出登录吗?',
success: (res) => {
if (res.confirm) {
app.logout()
this.setData({
isLoggedIn: false,
userInfo: null,
phoneNumber: '',
wechatId: '',
alipayAccount: ''
})
wx.showToast({ title: '已退出登录', icon: 'success' })
setTimeout(() => wx.navigateBack(), 1500)
app.globalData.userInfo = null
app.globalData.isLoggedIn = false
app.globalData.purchasedSections = []
app.globalData.hasFullBook = false
wx.removeStorageSync('userInfo')
wx.removeStorageSync('token')
wx.switchTab({ url: '/pages/index/index' })
}
}
})
},
// 联系客服 - 跳转到Soul派对房
contactService() {
wx.showToast({ title: '请在Soul派对房联系客服', icon: 'none' })
},
// 阻止冒泡
stopPropagation() {},
goBack() { wx.navigateBack() }
}
})

View File

@@ -1,4 +1,4 @@
{
"usingComponents": {},
"navigationStyle": "custom"
"navigationBarTitleText": "设置",
"usingComponents": {}
}

View File

@@ -1,147 +1,91 @@
<!--设置页 - 账号绑定功能-->
<view class="page">
<view class="nav-bar" style="padding-top: {{statusBarHeight}}px;">
<view class="nav-back" bindtap="goBack">
<text class="back-icon"></text>
</view>
<text class="nav-title">设置</text>
<view class="nav-placeholder"></view>
<view class="nav-placeholder" style="height: {{navBarHeight || (statusBarHeight + 44)}}px;"></view>
<view class="header safe-header-right">
<view class="nav-back" bindtap="goBack">← 返回</view>
<text class="header-title">设置</text>
</view>
<view style="height: {{statusBarHeight + 44}}px;"></view>
<view class="content">
<!-- 账号绑定 -->
<view class="bind-card" wx:if="{{isLoggedIn}}">
<view class="card-header">
<text class="card-icon">🛡️</text>
<view class="card-title-wrap">
<view class="main">
<view class="card">
<view class="card-head">
<text class="card-icon">🛡</text>
<view>
<text class="card-title">账号绑定</text>
<text class="card-desc">绑定后可用于提现和找伙伴功能</text>
</view>
</view>
<view class="bind-list">
<!-- 手机号 - 使用微信一键获取 -->
<view class="bind-item">
<view class="bind-left">
<view class="bind-icon phone-icon">📱</view>
<view class="bind-info">
<text class="bind-label">手机号</text>
<text class="bind-value">{{phoneNumber || '未绑定'}}</text>
</view>
</view>
<view class="bind-right">
<text class="bind-check" wx:if="{{phoneNumber}}">✓</text>
<button wx:else class="get-phone-btn" open-type="getPhoneNumber" bindgetphonenumber="onGetPhoneNumber">
一键获取
</button>
</view>
</view>
<!-- 微信号 - 简化输入 -->
<view class="bind-item">
<view class="bind-left">
<view class="bind-icon wechat-icon">💬</view>
<view class="bind-info">
<text class="bind-label">微信号</text>
<input
class="bind-input"
placeholder="输入微信号"
value="{{wechatId}}"
bindinput="onWechatInput"
bindblur="saveWechat"
/>
</view>
</view>
<view class="bind-right">
<text class="bind-check" wx:if="{{wechatId}}">✓</text>
</view>
</view>
</view>
</view>
<!-- 收货地址管理(始终显示,未登录点击提示先登录) -->
<view class="bind-card address-card">
<view class="bind-item" bindtap="goToAddressList">
<view class="bind-item" data-type="phone" bindtap="openBindModal">
<view class="bind-left">
<view class="bind-icon address-icon">📍</view>
<view class="bind-info">
<view class="bind-icon {{user.phone ? 'bound' : ''}}">📱</view>
<view>
<text class="bind-label">手机号</text>
<text class="bind-value">{{user.phone || '未绑定'}}</text>
</view>
</view>
<text class="bind-action" wx:if="{{user.phone}}">✓</text>
<text class="bind-action brand" wx:else>去绑定</text>
</view>
<view class="bind-item" data-type="wechat" bindtap="openBindModal">
<view class="bind-left">
<view class="bind-icon wechat {{user.wechat ? 'bound' : ''}}">💬</view>
<view>
<text class="bind-label">微信号</text>
<text class="bind-value">{{user.wechat || '未绑定'}}</text>
</view>
</view>
<text class="bind-action" wx:if="{{user.wechat}}">✓</text>
<text class="bind-action green" wx:else>去绑定</text>
</view>
<view class="bind-item" data-type="alipay" bindtap="openBindModal">
<view class="bind-left">
<view class="bind-icon alipay {{user.alipay ? 'bound' : ''}}">💳</view>
<view>
<text class="bind-label">支付宝</text>
<text class="bind-value">{{user.alipay || '未绑定'}}</text>
</view>
</view>
<text class="bind-action" wx:if="{{user.alipay}}">✓</text>
<text class="bind-action blue" wx:else>去绑定</text>
</view>
<view class="bind-item" bindtap="goAddresses">
<view class="bind-left">
<view class="bind-icon addr">📍</view>
<view>
<text class="bind-label">收货地址</text>
<text class="bind-value address-text">{{isLoggedIn ? (addressSummary || '管理收货地址') : '点击登录后管理'}}</text>
<text class="bind-value">管理收货地址,用于发货与邮寄</text>
</view>
</view>
<view class="bind-right">
<text class="bind-arrow"></text>
</view>
<text class="bind-action brand">管理</text>
</view>
</view>
<!-- 自动提现设置 -->
<view class="bind-card auto-withdraw-card" wx:if="{{isLoggedIn && wechatId}}">
<view class="card-header">
<text class="card-icon">💰</text>
<view class="card-title-wrap">
<text class="card-title">自动提现</text>
<text class="card-desc">收益自动打款到微信零钱</text>
</view>
</view>
<view class="auto-withdraw-content">
<view class="withdraw-switch-row">
<text class="switch-label">开启自动提现</text>
<switch checked="{{autoWithdrawEnabled}}" bindchange="toggleAutoWithdraw" color="#00CED1"/>
</view>
<view class="withdraw-info" wx:if="{{autoWithdrawEnabled}}">
<view class="info-item">
<text class="info-label">提现方式</text>
<text class="info-value">微信零钱</text>
</view>
<view class="info-item">
<text class="info-label">提现账户</text>
<text class="info-value">{{wechatId}}</text>
</view>
<text class="withdraw-tip">收益将在每笔订单完成后自动打款</text>
</view>
</view>
</view>
<!-- 提现提示 -->
<view class="tip-banner" wx:if="{{isLoggedIn && !wechatId}}">
<text class="tip-text">提示:绑定微信号才能使用提现功能</text>
</view>
<view class="logout-btn" wx:if="{{isLoggedIn}}" bindtap="handleLogout">退出登录</view>
<view class="hint" wx:if="{{!user.wechat && !user.alipay}}">
<text>提示:绑定至少一个支付方式(微信或支付宝)才能使用提现功能</text>
</view>
<view class="btn-logout" bindtap="logout">退出登录</view>
</view>
<!-- 绑定弹窗 -->
<view class="modal-overlay" wx:if="{{showBindModal}}" bindtap="closeBindModal">
<view class="modal-content" catchtap="stopPropagation">
<view class="modal-header">
<text class="modal-title">绑定{{bindType === 'phone' ? '手机号' : bindType === 'wechat' ? '微信号' : '支付宝'}}</text>
<view class="modal-close" bindtap="closeBindModal">✕</view>
<view class="mask" wx:if="{{showBindModal}}" catchtap="closeBindModal">
<view class="modal" catchtap="">
<view class="modal-head">
<text class="modal-title">绑定{{bindType === 'phone' ? '手机号' : (bindType === 'wechat' ? '微信号' : '支付宝')}}</text>
<view class="modal-close" bindtap="closeBindModal">×</view>
</view>
<view class="modal-body">
<view class="input-wrapper">
<input
type="{{bindType === 'phone' ? 'number' : 'text'}}"
class="form-input"
placeholder="{{bindType === 'phone' ? '请输入11位手机号' : bindType === 'wechat' ? '请输入微信号' : '请输入支付宝账号'}}"
placeholder-class="input-placeholder"
value="{{bindValue}}"
bindinput="onBindInput"
maxlength="{{bindType === 'phone' ? 11 : 50}}"
/>
</view>
<text class="bind-tip">
{{bindType === 'phone' ? '绑定手机号后可用于找伙伴匹配' : bindType === 'wechat' ? '绑定微信号后可用于找伙伴匹配和好友添加' : '绑定支付宝后可用于提现收益'}}
</text>
<view class="btn-primary {{!bindValue ? 'btn-disabled' : ''}}" bindtap="confirmBind">
确认绑定
<input
class="bind-input"
placeholder="{{bindType === 'phone' ? '请输入11位手机号' : (bindType === 'wechat' ? '请输入微信号' : '请输入支付宝账号')}}"
value="{{bindValue}}"
bindinput="onBindInput"
/>
<text class="bind-err" wx:if="{{bindError}}">{{bindError}}</text>
<view class="btn-primary {{!bindValue || isBinding ? 'disabled' : ''}}" bindtap="submitBind">
{{isBinding ? '绑定中...' : '确认绑定'}}
</view>
</view>
</view>

View File

@@ -1,116 +1,44 @@
/* 设置页样式 */
.page { min-height: 100vh; background: #000; padding-bottom: 64rpx; }
page { background: #000; color: #fff; }
.page { min-height: 100vh; padding-bottom: 80rpx; box-sizing: border-box; }
.nav-placeholder { width: 100%; }
.header { display: flex; align-items: center; padding: 24rpx 32rpx; border-bottom: 2rpx solid rgba(255,255,255,0.05); }
.nav-back { font-size: 32rpx; color: #00CED1; margin-right: 24rpx; }
.header-title { flex: 1; text-align: center; font-size: 34rpx; color: #00CED1; }
/* 导航栏 */
.nav-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 100; background: rgba(0,0,0,0.9); backdrop-filter: blur(40rpx); display: flex; align-items: center; justify-content: space-between; padding: 0 32rpx; height: 88rpx; }
.nav-back { width: 64rpx; height: 64rpx; background: #1c1c1e; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.back-icon { font-size: 40rpx; color: rgba(255,255,255,0.6); font-weight: 300; }
.nav-title { font-size: 34rpx; font-weight: 600; color: #fff; }
.nav-placeholder { width: 64rpx; }
.main { padding: 32rpx; }
.card { border-radius: 32rpx; background: #1c1c1e; border: 2rpx solid rgba(255,255,255,0.05); overflow: hidden; margin-bottom: 24rpx; }
.card-head { display: flex; align-items: flex-start; gap: 24rpx; padding: 32rpx; border-bottom: 2rpx solid rgba(255,255,255,0.05); }
.card-icon { font-size: 36rpx; }
.card-title { font-size: 30rpx; color: #fff; font-weight: 500; display: block; }
.card-desc { font-size: 24rpx; color: rgba(255,255,255,0.4); display: block; margin-top: 8rpx; }
.content { padding: 24rpx; }
.bind-item { display: flex; align-items: center; justify-content: space-between; padding: 32rpx; border-bottom: 2rpx solid rgba(255,255,255,0.05); }
.bind-item:last-child { border-bottom: none; }
.bind-left { display: flex; align-items: center; gap: 24rpx; flex: 1; min-width: 0; }
.bind-icon { width: 64rpx; height: 64rpx; border-radius: 50%; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; font-size: 32rpx; flex-shrink: 0; }
.bind-icon.bound { background: rgba(0,206,209,0.2); }
.bind-icon.wechat.bound { background: rgba(7,193,96,0.2); }
.bind-icon.alipay.bound { background: rgba(22,119,255,0.2); }
.bind-icon.addr { background: rgba(249,115,22,0.2); }
.bind-label { font-size: 28rpx; color: #fff; display: block; }
.bind-value { font-size: 24rpx; color: rgba(255,255,255,0.4); display: block; margin-top: 4rpx; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bind-action { font-size: 24rpx; color: rgba(255,255,255,0.5); }
.bind-action.brand { color: #00CED1; }
.bind-action.green { color: #07C160; }
.bind-action.blue { color: #1677FF; }
/* 账号绑定卡片 */
.bind-card { background: #1c1c1e; border-radius: 32rpx; padding: 32rpx; margin-bottom: 24rpx; border: 2rpx solid rgba(0,206,209,0.2); }
.card-header { display: flex; align-items: flex-start; gap: 16rpx; margin-bottom: 24rpx; padding-bottom: 24rpx; border-bottom: 2rpx solid rgba(255,255,255,0.05); }
.card-icon { font-size: 40rpx; }
.card-title-wrap { flex: 1; }
.card-title { font-size: 30rpx; font-weight: 600; color: #fff; display: block; }
.card-desc { font-size: 24rpx; color: rgba(255,255,255,0.5); margin-top: 4rpx; display: block; }
.hint { padding: 24rpx 32rpx; border-radius: 24rpx; background: rgba(249,115,22,0.1); border: 2rpx solid rgba(249,115,22,0.2); margin-bottom: 24rpx; }
.hint text { font-size: 24rpx; color: rgba(249,115,22,0.9); }
.bind-list { display: flex; flex-direction: column; gap: 24rpx; }
.bind-item { display: flex; align-items: center; justify-content: space-between; padding: 16rpx 0; }
.bind-left { display: flex; align-items: center; gap: 20rpx; }
.bind-icon { width: 72rpx; height: 72rpx; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 32rpx; }
.bind-icon.phone-icon { background: rgba(0,206,209,0.2); }
.bind-icon.wechat-icon { background: rgba(158,158,158,0.2); }
.bind-icon.alipay-icon { background: rgba(158,158,158,0.2); }
.bind-info { display: flex; flex-direction: column; gap: 4rpx; flex: 1; }
.bind-label { font-size: 28rpx; color: #fff; font-weight: 500; }
.bind-value { font-size: 24rpx; color: rgba(255,255,255,0.5); }
.address-text { max-width: 360rpx; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bind-icon.address-icon { background: rgba(255,165,0,0.2); }
.required { color: #FF6B6B; font-size: 24rpx; }
.bind-input { font-size: 24rpx; color: #00CED1; background: transparent; padding: 8rpx 0; }
.bind-right { display: flex; align-items: center; }
.bind-check { color: #00CED1; font-size: 32rpx; }
.bind-btn { color: #00CED1; font-size: 26rpx; }
.bind-arrow { color: rgba(255,255,255,0.4); font-size: 36rpx; }
.btn-logout { width: 100%; padding: 28rpx; border-radius: 24rpx; background: #1c1c1e; border: 2rpx solid rgba(248,113,113,0.4); color: #f87171; font-size: 30rpx; font-weight: 500; text-align: center; }
/* 一键获取手机号按钮 */
.get-phone-btn {
padding: 12rpx 24rpx;
background: rgba(0,206,209,0.2);
border: 2rpx solid rgba(0,206,209,0.3);
border-radius: 16rpx;
font-size: 24rpx;
color: #00CED1;
line-height: normal;
}
.get-phone-btn::after { border: none; }
/* 收货地址独立卡片(始终显示) */
.address-card { margin-top: 24rpx; }
/* 自动提现卡片 */
.auto-withdraw-card { margin-top: 24rpx; }
.auto-withdraw-content { padding-top: 16rpx; }
.withdraw-switch-row {
display: flex;
align-items: center;
justify-content: space-between;
padding: 16rpx 0;
}
.switch-label { font-size: 28rpx; color: #fff; }
.withdraw-info {
background: rgba(0,206,209,0.1);
border-radius: 16rpx;
padding: 20rpx;
margin-top: 16rpx;
}
.info-item {
display: flex;
justify-content: space-between;
padding: 8rpx 0;
}
.info-label { font-size: 26rpx; color: rgba(255,255,255,0.6); }
.info-value { font-size: 26rpx; color: #00CED1; }
.withdraw-tip {
display: block;
font-size: 22rpx;
color: rgba(255,255,255,0.4);
margin-top: 12rpx;
text-align: center;
}
/* 提现提示 */
.tip-banner { background: rgba(255,165,0,0.1); border: 2rpx solid rgba(255,165,0,0.3); border-radius: 20rpx; padding: 20rpx 24rpx; margin-bottom: 24rpx; }
.tip-text { font-size: 24rpx; color: #FFA500; line-height: 1.5; }
/* 设置组 */
.settings-group { background: #1c1c1e; border-radius: 32rpx; overflow: hidden; margin-bottom: 24rpx; }
.settings-item { display: flex; align-items: center; justify-content: space-between; padding: 28rpx 32rpx; border-bottom: 2rpx solid rgba(255,255,255,0.05); }
.settings-item:last-child { border-bottom: none; }
.item-left { display: flex; align-items: center; gap: 16rpx; }
.item-icon { font-size: 36rpx; }
.item-title { font-size: 28rpx; color: #fff; }
.item-arrow { font-size: 28rpx; color: rgba(255,255,255,0.3); }
.item-value { font-size: 26rpx; color: rgba(255,255,255,0.5); }
/* 退出登录按钮 */
.logout-btn { margin-top: 48rpx; padding: 28rpx; background: rgba(244,67,54,0.1); border: 2rpx solid rgba(244,67,54,0.3); border-radius: 24rpx; text-align: center; font-size: 28rpx; color: #F44336; }
/* 弹窗 - 简洁大气风格 */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(20rpx); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 48rpx; }
.modal-content { width: 100%; max-width: 640rpx; background: linear-gradient(180deg, #1c1c1e 0%, #0d0d0d 100%); border-radius: 40rpx; overflow: hidden; border: 2rpx solid rgba(255,255,255,0.08); }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 40rpx 40rpx 24rpx; }
.modal-title { font-size: 36rpx; font-weight: 700; color: #fff; }
.modal-close { width: 64rpx; height: 64rpx; background: rgba(255,255,255,0.08); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 32rpx; color: rgba(255,255,255,0.5); }
.modal-body { padding: 16rpx 40rpx 48rpx; }
.input-wrapper { margin-bottom: 32rpx; }
.form-input { width: 100%; padding: 32rpx 24rpx; background: rgba(255,255,255,0.05); border: 2rpx solid rgba(255,255,255,0.1); border-radius: 24rpx; font-size: 32rpx; color: #fff; box-sizing: border-box; transition: all 0.2s; }
.form-input:focus { border-color: rgba(0,206,209,0.5); background: rgba(0,206,209,0.05); }
.input-placeholder { color: rgba(255,255,255,0.25); }
.bind-tip { font-size: 24rpx; color: rgba(255,255,255,0.4); margin-bottom: 40rpx; display: block; line-height: 1.6; text-align: center; }
.btn-primary { padding: 32rpx; background: linear-gradient(135deg, #00CED1 0%, #20B2AA 100%); color: #000; font-size: 32rpx; font-weight: 600; text-align: center; border-radius: 28rpx; }
.btn-primary.btn-disabled { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.3); }
.mask { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.6); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 48rpx; box-sizing: border-box; }
.modal { width: 100%; max-width: 600rpx; background: #1c1c1e; border-radius: 32rpx; overflow: hidden; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 32rpx; border-bottom: 2rpx solid rgba(255,255,255,0.1); }
.modal-title { font-size: 36rpx; font-weight: 600; color: #fff; }
.modal-close { width: 64rpx; height: 64rpx; border-radius: 50%; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; font-size: 40rpx; color: rgba(255,255,255,0.6); }
.modal-body { padding: 32rpx; }
.bind-input { width: 100%; padding: 24rpx 32rpx; border-radius: 24rpx; background: rgba(0,0,0,0.3); border: 2rpx solid rgba(255,255,255,0.1); color: #fff; font-size: 28rpx; box-sizing: border-box; margin-bottom: 24rpx; }
.bind-err { font-size: 24rpx; color: #f87171; display: block; margin-bottom: 16rpx; }
.btn-primary { width: 100%; padding: 24rpx; border-radius: 24rpx; background: #00CED1; color: #000; font-size: 30rpx; font-weight: 500; text-align: center; }
.btn-primary.disabled { opacity: 0.5; }