mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2026-08-07 03:15:01 +08:00
feat(会员管理): 添加第三方账户绑定和会员等级功能
- 在登录API中新增获取第三方账户绑定列表、绑定和解绑功能 - 在会员API中新增获取当前会员等级、等级规则和等级列表的接口 - 在会员中心页面中添加第三方账户绑定的UI和逻辑 - 新增会员等级页面,展示当前等级、经验值和经验值记录
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user