feat(miniprogram): 算力管理页与扫码确认支付页
- 个人中心新增算力管理入口:余额/已用/本月消费、基础API地址与API Key自服务、套餐+自定义金额充值 - 新增 pages/pay 确认支付页:微信扫桌面端充值码进入,按登录用户 openid 发起 JSAPI 支付并轮询到账 - 两页沉浸式导航+统一两行标题区;套餐单行排列、提示单行截断 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -69,11 +69,14 @@ export default function Mine() {
|
||||
const [pDebug, setPDebug] = useState('');
|
||||
|
||||
const refresh = async () => {
|
||||
if (!isAuthed()) return;
|
||||
if (!isAuthed()) { setUser(null); setLoaded(true); return; }
|
||||
try {
|
||||
const me = await getMe();
|
||||
if (me.ok && me.user) setUser(getUser());
|
||||
} catch { /* ignore */ }
|
||||
} catch (e) {
|
||||
// 401 时 api.js 已清 pine_token:同步清掉本地假登录态,显示未登录卡片
|
||||
if (!isAuthed()) { setUser(null); logout(); }
|
||||
}
|
||||
try {
|
||||
const d = await getMyBookings();
|
||||
setBookings((d && d.list) || []);
|
||||
@@ -449,6 +452,16 @@ export default function Mine() {
|
||||
<Text className="muted mk-center-hint">任务广场请到 Web 端或桌面端查看</Text>
|
||||
</View>
|
||||
|
||||
{/* 算力管理:余额 / API Key / 算力充值(对齐桌面端算力中心) */}
|
||||
<View className="mine-section-head">
|
||||
<Text className="mine-no">COMPUTE</Text>
|
||||
<Text className="mine-subtitle">算力管理</Text>
|
||||
</View>
|
||||
<View className="card mk-act">
|
||||
<Button className="btn-main mk-btn-sm" onClick={() => Taro.navigateTo({ url: '/pages/compute/index' })}>算力中心</Button>
|
||||
<Text className="muted mk-center-hint">查看余额与 API Key,支持微信充值算力</Text>
|
||||
</View>
|
||||
|
||||
{/* 我的园区:未入驻 → 申请入驻 + OPC认证;已入驻 → 园区信息 + OPC认证 + 转园 */}
|
||||
<View className="mine-section-head">
|
||||
<Text className="mine-no">PARK</Text>
|
||||
|
||||
Reference in New Issue
Block a user