Files
sundynix-pets/pets-fe/pages/profile/profile.wxml
T
Blizzard 77beb9ca96 fix(pro): 会员改为「即将开放」,堵住点一下白拿会员的漏洞
原先 /api/pro/activate 直接写库开通一年会员,没有任何支付校验,
任何人调一次接口就是会员。支付暂不接入,这里必须在服务端拒绝,
只改 UI 挡不住直接调接口。

- ActivatePro 一律返回 ErrPayNotReady;真正写库的逻辑保留为
  activateProAfterPaid,等接微信支付时在校验支付单据后调用
- handler 对该错误返回参数错而非 500,前端直接展示提示文案
- 小程序 Pro 弹层按钮置灰为「即将开放」,我的页入口改为
  「Pro 会员(即将开放)」

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-25 18:15:38 +08:00

38 lines
2.3 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<nav-bar title="我的" show-back="{{true}}"></nav-bar>
<scroll-view class="page-scroll" scroll-y="{{true}}" enhanced="{{true}}" show-scrollbar="{{false}}">
<view class="page-body">
<view class="profile-header">
<view class="avatar ph-avatar" bindtap="onPickAvatar">
<image wx:if="{{user.avatar_url}}" class="ph-avatar-img" src="{{user.avatar_url}}" mode="aspectFill"></image>
<block wx:else>{{pet.emoji}}</block>
<view class="ph-avatar-cam">📷</view>
</view>
<view class="ph-name">{{pet.name}}</view>
<view class="muted ph-meta">{{pet.age}}{{pet.weight}}{{pet.stage}}</view>
<view wx:if="{{pet.breed || pet.color}}" class="muted ph-meta">{{pet.breed}}{{pet.breed && pet.color ? ' · ' : ''}}{{pet.color}}</view>
</view>
<button class="btn btn-ghost btn-block" style="margin-bottom:28rpx" bindtap="onAddPet"> 添加毛孩子</button>
<view class="profile-list">
<view class="profile-row" bindtap="onEditPet">宠物档案(编辑)<text class="pr-val">已完善 {{profilePct}}% </text></view>
<view class="profile-row" data-type="reminders" bindtap="openSheet">提醒设置 <text class="pr-val">{{summary.reminders}} 条 </text></view>
<view class="profile-row" bindtap="goRecord">健康记录 <text class="pr-val">{{summary.records}} 条 </text></view>
<view class="profile-row" data-type="managePets" bindtap="openSheet">多宠物管理 <text class="pr-val">{{summary.pets}} 只 </text></view>
</view>
<view class="profile-list">
<view class="profile-row" data-type="pro" bindtap="openSheet">会员权益 <text class="pr-val">{{summary.pro_status === 'active' ? '已开通' : '未开通'}} </text></view>
<view class="profile-row" data-type="exportData" bindtap="openSheet">数据导出 <text class="pr-val">文本 </text></view>
<view class="profile-row" data-type="feedback" bindtap="openSheet">意见反馈 <text class="pr-val">去填写 </text></view>
<view class="profile-row" data-type="about" bindtap="openSheet">关于我们 <text class="pr-val">v0.2 </text></view>
</view>
<button class="btn btn-ghost btn-block" data-type="pro" bindtap="openSheet">Pro 会员(即将开放)</button>
</view>
</scroll-view>
<fab bind:tap="onFab"></fab>
<bottom-sheet show="{{sheetShow}}" type="{{sheetType}}" bind:close="closeSheet"></bottom-sheet>