- 从 uniapp 迁移 HJF 页面、API、组件及用户/订单相关改动 - queue、assets 使用独立分包以降低主包体积 - 修复首页单根节点与支付结果页 v-if 链 - 关闭 HjfDemoPanel 全局注册;uniNoticeBar 注释 $getAppWebview 避免 __webviewId__ 报错 - 配置域名与 manifest 应用名称;cache/store 防御性处理 Made-with: Cursor
144 lines
3.9 KiB
Vue
144 lines
3.9 KiB
Vue
<template>
|
|
<view class="wf-item-page wf-page0">
|
|
<view class='pictrue' style="position: relative;">
|
|
<easy-loadimage
|
|
mode="widthFix"
|
|
:image-src="item.image"
|
|
:borderSrc="item.activity_frame.image"
|
|
width="100%"
|
|
borderRadius="16rpx 16rpx 0 0"></easy-loadimage>
|
|
<view class="queue-badge" v-if="item.is_queue_goods == 1">参与公排</view>
|
|
</view>
|
|
<view class="info_box">
|
|
<view class="w-full line2 fs-28 text--w111-333 lh-40rpx">
|
|
<text v-if="item.brand_name" class="brand-tag">{{ item.brand_name }}</text>{{item.store_name}}
|
|
</view>
|
|
<view class="flex items-end flex-wrap mt-12 w-full" v-if="item.store_label.length && !isMerchant">
|
|
<BaseTag
|
|
:text="label.label_name"
|
|
:color="label.color"
|
|
:background="label.bg_color"
|
|
:borderColor="label.border_color"
|
|
:circle="label.border_color ? true : false"
|
|
:imgSrc="label.icon"
|
|
v-for="(label, idx) in item.store_label" :key="idx"></BaseTag>
|
|
</view>
|
|
<view class="flex-between-center mt-7" v-if="recommend">
|
|
<view class="flex-y-center flex-wrap">
|
|
<baseMoney :money="isVip ? item.vip_price : item.price" symbolSize="24" integerSize="40" decimalSize="24" weight></baseMoney>
|
|
<view class="svip-label ml-8"
|
|
v-if="Number(item.vip_price) > 0 && item.is_vip && !isVip">
|
|
<text class="text">SVIP</text>
|
|
<text class="px-8 SemiBold">¥{{item.vip_price}}</text>
|
|
</view>
|
|
</view>
|
|
<view class="w-44 h-44 rd-24 bg-gradient flex-center" v-show="showCart">
|
|
<text class="iconfont icon-ic_ShoppingCart1 text--w111-fff fs-26"></text>
|
|
</view>
|
|
</view>
|
|
<view class="mt-8" v-else>
|
|
<view class="flex-y-center flex-wrap mt-8">
|
|
<baseMoney :money="item.price" symbolSize="24" integerSize="40" decimalSize="24" :color="isMerchant ? '#FF7E00' : 'var(--view-theme)'" weight></baseMoney>
|
|
<view class="svip-label" v-if="Number(item.vip_price) > 0 && item.is_vip && !isMerchant">
|
|
<text class="text">SVIP</text>
|
|
<text class="px-8 SemiBold">¥{{item.vip_price}}</text>
|
|
</view>
|
|
</view>
|
|
<view class="flex-between-center mt-12">
|
|
<text class="fs-22 text--w111-999">已售{{item.sales}}{{item.unit_name}}</text>
|
|
<view class="w-44 h-44 rd-24 flex-center" :class="isMerchant ? 'bg-mer' : 'bg-gradient'" @tap.stop="addCartChange" v-show="showCart">
|
|
<text class="iconfont icon-ic_ShoppingCart1 fs-26" :class="isMerchant ? 'text-mer' : 'text--w111-fff'"></text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
<script>
|
|
import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue'
|
|
import {mapGetters} from "vuex";
|
|
import {HTTP_REQUEST_URL} from '@/config/app';
|
|
export default {
|
|
components: {
|
|
easyLoadimage
|
|
},
|
|
props: {
|
|
item: {
|
|
type: Object,
|
|
require: true
|
|
},
|
|
type: {
|
|
type: Number,
|
|
default: 0
|
|
},
|
|
recommend:{
|
|
type: Boolean,
|
|
default: false
|
|
},
|
|
showCart:{
|
|
type: Boolean,
|
|
default: true
|
|
},
|
|
isMerchant:{
|
|
type: Boolean,
|
|
default: false
|
|
}
|
|
},
|
|
data() {
|
|
return {
|
|
domain: HTTP_REQUEST_URL,
|
|
}
|
|
},
|
|
inject: {
|
|
isVip:{
|
|
from: 'isVip',
|
|
default: false // 这里设置默认值为 false
|
|
},
|
|
addCartClick: {
|
|
from: 'addCartClick',
|
|
default: () => {}
|
|
},
|
|
},
|
|
methods: {
|
|
addCartChange(){
|
|
this.addCartClick(this.item);
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
.wf-item-page {
|
|
background: #fff;
|
|
overflow: hidden;
|
|
border-radius: 20rpx;
|
|
}
|
|
.pictrue{
|
|
max-height: 560rpx;
|
|
overflow-y: hidden;
|
|
}
|
|
.info_box{
|
|
padding: 16rpx 20rpx;
|
|
border-radius: 0 0 20rpx 20rpx;
|
|
background-color: #fff;
|
|
}
|
|
.bg-mer{
|
|
background-color: $light-primary-merchant;
|
|
}
|
|
.text-mer{
|
|
color: $primary-merchant;
|
|
}
|
|
.queue-badge {
|
|
position: absolute;
|
|
top: 12rpx;
|
|
right: 12rpx;
|
|
padding: 4rpx 14rpx;
|
|
border-radius: 20rpx;
|
|
font-size: 20rpx;
|
|
font-weight: 600;
|
|
color: #fff;
|
|
background: linear-gradient(135deg, #52c41a, #389e0d);
|
|
z-index: 10;
|
|
letter-spacing: 2rpx;
|
|
}
|
|
</style>
|