PDF需求全面修复 - v1.15

## 后端
1. 数据概览改为从API获取真实用户/订单数
2. 提现API增加容错和withdrawals表自动创建

## 小程序
1. 设置页:去掉支付宝,微信号直接输入
2. 我的页面:优先显示微信号
3. 找伙伴-资源对接:新增三项填写(能帮到什么/需要什么/擅长什么)

## 部署配置
- 更新为小型宝塔 42.194.232.22
This commit is contained in:
卡若
2026-01-29 15:50:45 +08:00
parent 174253584f
commit 132743ce34
10 changed files with 135 additions and 49 deletions

View File

@@ -156,22 +156,37 @@ Page({
})
},
// 绑定微信号
bindWechat() {
this.setData({
showBindModal: true,
bindType: 'wechat',
bindValue: ''
})
// 微信号输入
onWechatInput(e) {
this.setData({ wechatId: e.detail.value })
},
// 绑定支付宝
bindAlipay() {
this.setData({
showBindModal: true,
bindType: 'alipay',
bindValue: ''
})
// 保存微信号
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)
}
},
// 输入绑定值