feat: 我的权益增加上架入口
This commit is contained in:
@@ -112,6 +112,7 @@ const buildInstance = (uid, st) => {
|
||||
const expired = isPast(tpl.valid_until);
|
||||
return {
|
||||
id: uid,
|
||||
merchant_id: tpl.merchant_id || "",
|
||||
merchant_name: tpl.merchant_name || "",
|
||||
benefit_id: st.benefit_id,
|
||||
description: tpl.description || "",
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* 四行固定顺序:类型 / 价格 / 规格·适用 / 有效期·名额
|
||||
* 价格两形态互斥:金额型 = 优惠价大字 + 划线原价 + 右端折扣标;
|
||||
* 折扣型(price.rate)= 「门市价」小字 + 折扣大字,不再出划线原价与折扣标。
|
||||
* 「进入商家」入口只在权益中心出现(详情页本就在该商家内)。
|
||||
* 「进入商家」入口在权益中心与我的权益都出现(详情页本就在该商家内,不加)。
|
||||
*/
|
||||
import { computed } from "vue";
|
||||
import { BENEFIT_STATUS, BENEFIT_TYPE_ICON, BENEFIT_TYPE_LABEL } from "@/constant";
|
||||
@@ -111,7 +111,7 @@ const goStateCls = computed(() =>
|
||||
);
|
||||
const goIconTone = computed(() => (isOff.value ? "ink3" : "accentDeep"));
|
||||
|
||||
/** 权益中心专属:跳该权益所属商家详情 */
|
||||
/** 跳该权益所属商家详情 */
|
||||
const onGoMerchant = () => {
|
||||
if (b.value.merchant_id) goDetail(b.value.merchant_id);
|
||||
};
|
||||
@@ -127,13 +127,13 @@ const onTap = () => {
|
||||
hover-class="opacity-90" @click="onTap">
|
||||
<!-- 左:信息区(四行固定顺序) -->
|
||||
<view class="flex-1 min-w-0 rounded-l-card px-[14px] pt-[13px] pb-3 flex flex-col" :class="sideStateCls">
|
||||
<!-- ① 类型(权益中心在行右端带「进入商家」入口) -->
|
||||
<!-- ① 类型(权益中心 / 我的权益在行右端带「进入商家」入口) -->
|
||||
<view class="flex items-center gap-[6px] text-[13px] font-semibold whitespace-nowrap" :class="kindStateCls">
|
||||
<view class="w-[21px] h-[21px] rounded-full shrink-0 flex items-center justify-center" :class="kindIconCls">
|
||||
<AppIcon :name="typeIcon" tone="white" :size="12.5" />
|
||||
</view>
|
||||
<text>{{ typeLabel }}</text>
|
||||
<view v-if="mode === 'center'"
|
||||
<view v-if="mode !== 'detail'"
|
||||
class="ml-auto shrink-0 h-5 px-2 rounded-full flex items-center gap-[2px] text-hint font-semibold border-[0.5px]"
|
||||
:class="goStateCls" @click.stop="onGoMerchant">
|
||||
<text>进入商家</text>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
"items": [
|
||||
{
|
||||
"id": "user-benefit-103",
|
||||
"merchant_id": "food-002",
|
||||
"merchant_name": "龙里辣子鸡",
|
||||
"benefit_id": "benefit-103",
|
||||
"description": "该权益不绑定具体商品,可多次使用。本次操作仅记录一次使用,不会使权益失效。",
|
||||
@@ -27,6 +28,7 @@
|
||||
},
|
||||
{
|
||||
"id": "user-benefit-102",
|
||||
"merchant_id": "accommodation-001",
|
||||
"merchant_name": "云河酒店",
|
||||
"benefit_id": "benefit-102",
|
||||
"description": "该权益不绑定具体商品,可多次使用。本次操作仅记录一次使用,不会使权益失效。",
|
||||
@@ -52,6 +54,7 @@
|
||||
},
|
||||
{
|
||||
"id": "user-benefit-101",
|
||||
"merchant_id": "attraction-001",
|
||||
"merchant_name": "龙里水乡旅游生态城",
|
||||
"benefit_id": "benefit-101",
|
||||
"description": "该权益不绑定具体商品,可多次使用。本次操作仅记录一次使用,不会使权益失效。",
|
||||
@@ -77,6 +80,7 @@
|
||||
},
|
||||
{
|
||||
"id": "user-benefit-104",
|
||||
"merchant_id": "accommodation-005",
|
||||
"merchant_name": "龙里伯爵钻石酒店",
|
||||
"benefit_id": "benefit-104",
|
||||
"description": "该权益不绑定具体商品,可多次使用。本次操作仅记录一次使用,不会使权益失效。",
|
||||
|
||||
Reference in New Issue
Block a user