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

@@ -343,7 +343,7 @@ export default {
* 跳转到店铺
*/
navigateToStore(val) {
this.$navigateTo({
uni.navigateTo({
url: "/pages/product/shopPage?id=" + val.storeId,
});
},
@@ -352,7 +352,7 @@ export default {
* 跳转到优惠券
*/
navigateToConpon(val) {
this.$navigateTo({
uni.navigateTo({
url: "/pages/cart/coupon/couponCenter?storeId=" + val.storeId,
});
},
@@ -361,7 +361,7 @@ export default {
* 跳转到商品
*/
navigateToGoods(val) {
this.$navigateTo({
uni.navigateTo({
url:
"/pages/product/goods?id=" +
val.goodsSku.id +
@@ -437,7 +437,7 @@ export default {
* 跳转
*/
navigateTo(url) {
this.$navigateTo({
uni.navigateTo({
url,
});
},

View File

@@ -57,7 +57,7 @@ export default {
* 查询
*/
search() {
this.$navigateTo({
uni.navigateTo({
url: "/pages/navigation/search/searchPage",
});
},
@@ -90,7 +90,7 @@ export default {
},
navigateToList(sid, tid) {
this.$navigateTo({
uni.navigateTo({
url: `/pages/navigation/search/searchPage?category=${tid}`,
});
},

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",
});
},

View File

@@ -150,18 +150,18 @@ export default {
// WX_CODE 为小程序码
if (res.scanType == "WX_CODE") {
console.log(res);
this.$navigateTo({
uni.navigateTo({
url: `/${res.path}`,
});
} else {
config.scanAuthNavigation.forEach((src) => {
if (res.result.indexOf(src) != -1) {
this.$navigateTo({
uni.navigateTo({
url: `/${res.result.substring(src.length)}`,
});
} else {
setTimeout(() => {
this.$navigateTo({
uni.navigateTo({
url: "/pages/tabbar/home/web-view?src=" + path,
});
}, 100);

View File

@@ -45,14 +45,14 @@ export default {
// },
methods: {
gotoLink() {
this.$navigateTo({
uni.navigateTo({
//点击跳转到浏览器
url:
"/pages/tabbar/home/web-view?src=https://pc-b2b2c.pickmall.cn/article/detail?id=1371992704333905920",
});
},
gotoB() {
this.$navigateTo({
uni.navigateTo({
url:
"/pages/tabbar/home/web-view?src=https://pc-b2b2c.pickmall.cn/article/detail?id=1371779927900160000",
});

View File

@@ -122,7 +122,7 @@ export default {
* navigator标签现在默认没有转场动画所以用view
*/
navigateTo(url) {
this.$navigateTo({
uni.navigateTo({
url,
});
},

View File

@@ -73,7 +73,7 @@
})
},
goDetail(item) {
this.$navigateTo({
uni.navigateTo({
url: '/pages/product/goods?id=' + item.content.id + "&goodsId=" +item.content.goodsId
})
},

View File

@@ -69,7 +69,7 @@ import { distribution } from "@/api/goods";
export default {
methods: {
navigateTo(url) {
this.$navigateTo({
uni.navigateTo({
url,
});
},
@@ -78,11 +78,11 @@ export default {
if (res.data.result) {
let type = res.data.result.distributionStatus;
if (type == "PASS") {
this.$navigateTo({
uni.navigateTo({
url: "/pages/mine/distribution/home",
});
} else if (type == "REFUSE") {
this.$navigateTo({
uni.navigateTo({
url: "/pages/mine/distribution/auth",
});
} else if (type == "RETREAT") {
@@ -106,7 +106,7 @@ export default {
});
} else {
// 没有资格申请 先去实名认证
this.$navigateTo({
uni.navigateTo({
url: "/pages/mine/distribution/auth",
});
}