feat(会员管理): 添加第三方账户绑定和会员等级功能

- 在登录API中新增获取第三方账户绑定列表、绑定和解绑功能
- 在会员API中新增获取当前会员等级、等级规则和等级列表的接口
- 在会员中心页面中添加第三方账户绑定的UI和逻辑
- 新增会员等级页面,展示当前等级、经验值和经验值记录
This commit is contained in:
pikachu1995@126.com
2026-05-13 18:53:33 +08:00
parent fe4e0ce75c
commit aa4bc81da4
22 changed files with 3262 additions and 386 deletions

View File

@@ -85,3 +85,36 @@ export function memberPromotionsStatusRender(h, status) {
),
]);
}
/**
* 平台优惠券「活动时间 / 有效期」文案活动获取券effectiveDays 为领取后有效天数)
*/
export function formatPromotionCouponValidityHtml(row) {
if (!row) return "-";
if (row.getType === "ACTIVITY") {
const days = row.effectiveDays;
if (days !== undefined && days !== null && days !== "") {
const n = Number(days);
if (!Number.isNaN(n) && n > 0) {
return `领取后${n}天有效`;
}
}
}
if (row.startTime && row.endTime) {
return `${row.startTime}<br/>${row.endTime}`;
}
if (row.getType === "ACTIVITY" && row.rangeDayType === "DYNAMICTIME") {
return "长期有效";
}
return "-";
}
/** Table 列 render活动时间与 formatPromotionCouponValidityHtml 一致) */
export function promotionsCouponActivityTimeRender(h, params) {
const html = formatPromotionCouponValidityHtml(params.row);
if (html === "-") return h("div", "-");
if (html.indexOf("<br/>") !== -1) {
return h("div", { domProps: { innerHTML: html } });
}
return h("div", html);
}