feat: 优化

This commit is contained in:
2026-07-23 13:59:35 +08:00
parent 268207b01b
commit 3f335074ea
13 changed files with 614 additions and 580 deletions
+16 -31
View File
@@ -1,43 +1,20 @@
<template>
<view class="choiceness_warp">
<view class="choiceness_title">
<up-image
src="/static/common/jingxuan_left.png"
width="24"
height="8"
bgColor="#f1f6ff00"
></up-image>
<up-image src="/static/common/jingxuan_left.png" width="24" height="8" bgColor="#f1f6ff00"></up-image>
<view class="choiceness_title_msg">为您精选</view>
<up-image
src="/static/common/jingxuan_right.png"
width="24"
height="8"
bgColor="#f1f6ff00"
></up-image>
<up-image src="/static/common/jingxuan_right.png" width="24" height="8" bgColor="#f1f6ff00"></up-image>
</view>
<view
class="choiceness_product"
:class="platformType ? '' : 'iosplatformType'"
>
<view
v-for="item in productList"
:key="item.id"
class="choiceness_product_item"
@click="jumpInfo(item)"
>
<up-image
:src="item.url"
width="100%"
height="140"
bgColor="#f1f6ff00"
></up-image>
<view class="choiceness_product" :class="platformType ? '' : 'iosplatformType'">
<view v-for="item in productList" :key="item.id" class="choiceness_product_item" @click="jumpInfo(item)">
<up-image :src="item.url" width="100%" height="140" bgColor="#f1f6ff00"></up-image>
<view class="product_item_name">{{ item.title }}</view>
<view class="product_item_price">
<view class="price_">
<text>¥</text>
<text style="color: 36rpx">{{ item.price }}</text>
</view>
<view class="price_sell">已售{{ item.sales }}件</view>
<view class="price_sell">全网销量{{ limit999(item.sales) }}件</view>
</view>
</view>
</view>
@@ -56,13 +33,20 @@ export default {
};
},
mounted() {
/*#ifdef APP-PLUS*/
/*#ifdef APP-PLUS*/
const appUpdate = uni.getStorageSync("platform");
this.platformType = appUpdate == "android" ? "ANDROID" : "IOS";
/*#endif*/
/*#endif*/
this.getSearchList();
},
methods: {
limit999(n) {
const num = Number(n);
if (isNaN(num) || num < 10000) {
return n != null && n !== '' ? String(n) : '0';
}
return `${Math.floor(num / 10000)}万+`;
},
//
jumpInfo(item) {
uni.navigateTo({
@@ -104,6 +88,7 @@ export default {
flex-wrap: wrap;
justify-content: space-between;
padding-bottom: calc(env(safe-area-inset-bottom) + 100rpx);
&.iosplatformType {
padding-bottom: 100rpx;
}