feat(specialArea): 添加角标
This commit is contained in:
parent
5c2ed3d87d
commit
9296368075
|
@ -13,7 +13,7 @@ module.exports = vm => {
|
|||
|
||||
//#ifdef DEV_SERVER
|
||||
console.log('DEV_SERVER')
|
||||
config.baseURL = 'http://localhost:8080'
|
||||
config.baseURL = 'https://t-app.beida666.com/prod-api'
|
||||
//#endif
|
||||
|
||||
//#ifdef QA_SERVER
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="isEmpty(goodsList.recommendSpecialAreaList) == false">
|
||||
<!-- <view v-if="isEmpty(goodsList.recommendSpecialAreaList) == false">
|
||||
<view
|
||||
class="more"
|
||||
@click="more"
|
||||
|
@ -88,7 +88,6 @@
|
|||
<view class="padding_s goods-info">
|
||||
<view class="goods-name">{{ item.waresName }}</view>
|
||||
<view class="goods-sales-wrapper">
|
||||
<!-- <view class="goods-sales">累计销量{{ formatSales(item.sales) }}</view> -->
|
||||
<view
|
||||
class="goods-price"
|
||||
v-if="item.specialArea == 31 && userInfo.isMakerSpace == 1"
|
||||
|
@ -117,7 +116,7 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<cl-tabbar :current="0"></cl-tabbar>
|
||||
<div>
|
||||
|
|
|
@ -13,10 +13,7 @@
|
|||
<view class="shareImg" v-if="specialArea == 7" @click="goShare">
|
||||
<u-icon name="share-square" size="24" color="#005BAC"> </u-icon>
|
||||
</view>
|
||||
<view class="shareImg1" v-if="specialArea == 1" @tap="changeCountry">
|
||||
<img :src="pkCountryImg" alt="" />
|
||||
<u-icon name="arrow-down" color="#999"></u-icon>
|
||||
</view>
|
||||
|
||||
<u-scroll-list
|
||||
:indicator="false"
|
||||
v-if="itemChildren.length > 1"
|
||||
|
@ -85,7 +82,22 @@
|
|||
class="fly"
|
||||
v-show="item.preSaleStatus == 3 || item.isSale == 1"
|
||||
></view>
|
||||
<img :src="item.cover1" class="cover" alt="" />
|
||||
<view class="image-container">
|
||||
<img :src="item.cover || item.cover1" class="cover" alt="" />
|
||||
<!-- 三角形角标 -->
|
||||
<view class="triangle-badge" v-if="item.warnMessage">
|
||||
<view
|
||||
class="triangle-badge-text"
|
||||
:class="{
|
||||
'text-2': item.warnMessage.length === 2,
|
||||
'text-3': item.warnMessage.length === 3,
|
||||
'text-4': item.warnMessage.length === 4,
|
||||
}"
|
||||
>
|
||||
{{ item.warnMessage }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="goodList_ir">
|
||||
<view>
|
||||
<span class="qzbq" v-if="item.prefixLabelTarget != undefined">{{
|
||||
|
@ -743,4 +755,51 @@ export default {
|
|||
border-radius: 20px;
|
||||
font-size: 14px;
|
||||
}
|
||||
.image-container {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.triangle-badge {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-top: 90rpx solid #005bac;
|
||||
border-right: 90rpx solid transparent;
|
||||
border-radius: 10rpx 0 0 0;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.triangle-badge-text {
|
||||
position: absolute;
|
||||
color: #ffffff;
|
||||
font-weight: 600;
|
||||
line-height: 1;
|
||||
transform: rotate(-45deg);
|
||||
transform-origin: center;
|
||||
white-space: nowrap;
|
||||
text-shadow: 0 1rpx 2rpx rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
/* 2个字样式 */
|
||||
.triangle-badge-text.text-2 {
|
||||
top: -68rpx;
|
||||
left: 10rpx;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
|
||||
/* 3个字样式 */
|
||||
.triangle-badge-text.text-3 {
|
||||
top: -68rpx;
|
||||
left: 4rpx;
|
||||
font-size: 20rpx;
|
||||
}
|
||||
|
||||
/* 4个字样式 */
|
||||
.triangle-badge-text.text-4 {
|
||||
top: -64rpx;
|
||||
left: 0rpx;
|
||||
font-size: 18rpx;
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue