perf: 🎨 改善促销部分荣誉代码 封装为组件使用 更加便捷以及好看。 优化部分页面显示问题

删除部分原有的老样式  更新新版促销样式 页面更加好看 删除冗余代码 封装多种方法以及组件
This commit is contained in:
lemon橪
2022-09-15 15:40:50 +08:00
parent 8c8522c68e
commit 1e9df74034
70 changed files with 721 additions and 814 deletions

View File

@@ -24,7 +24,9 @@
{{ item.title }}
</div>
<div class="goods-bottom">
<div class="goods-price">{{ item.price | unitPrice }}</div>
<div class="goods-price"> ¥<span>{{ formatPrice(item.price )[0] }} </span>.{{
formatPrice(item.price )[1]
}}</div>
</div>
</div>
</div>
@@ -56,8 +58,15 @@ export default {
},
mounted() {},
methods: {
// 格式化金钱 1999 --> [1999,00]
formatPrice(val) {
if (typeof val == "undefined") {
return val;
}
return val.toFixed(2).split(".");
},
handleClick(item) {
this.$navigateTo({
uni.navigateTo({
url: `/pages/product/goods?id=${item.id}&goodsId=${item.goodsId}`,
});
},
@@ -163,13 +172,11 @@ $w_94: 94%;
> .goods-price {
line-height: 2;
color: $main-color;
>span{
font-size: 42rpx;
}
}
}
}
.goods-icon {
right: 10rpx;
top: 10rpx;
position: absolute;
}
</style>

View File

@@ -147,22 +147,22 @@ export default {
goToDetail(type) {
switch(type) {
case "SECKILL":
this.$navigateTo({
uni.navigateTo({
url: `/pages/promotion/seckill`,
});
break;
case "PINTUAN":
this.$navigateTo({
uni.navigateTo({
url: `/pages/promotion/joinGroup`,
});
break;
case "LIVE":
this.$navigateTo({
uni.navigateTo({
url: `/pages/promotion/lives`,
});
break;
case "KANJIA":
this.$navigateTo({
uni.navigateTo({
url: `/pages/promotion/bargain/list`,
});
break;

View File

@@ -12,7 +12,7 @@ export default {
props: ["res"],
methods: {
handleSearch() {
this.$navigateTo({
uni.navigateTo({
url: "/pages/navigation/search/searchPage",
});
},