This commit is contained in:
2025-08-05 15:25:23 +08:00
parent 0515e9d48c
commit 043f477609
1263 changed files with 202002 additions and 159652 deletions
+105 -105
View File
@@ -1,106 +1,106 @@
<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>
<view class="choiceness_title_msg">为您精选</view>
<up-image src="/static/common/jingxuan_right.png" width="24" height="8" bgColor="#f1f6ff00"></up-image>
</view>
<view class="choiceness_product">
<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.adPrice}}</text>
</view>
<view class="price_sell">已售{{item.sales}}件</view>
</view>
</view>
</view>
</view>
</template>
<script>
import { searchList } from '@/api/product.js';
export default {
name:"choiceness",
data() {
return {
productList:[]
};
},
mounted() {
this.getSearchList();
},
methods: {
//
jumpInfo(item){
uni.navigateTo({
url: '/pages/productInfo/productInfo?id='+item.id,
})
},
async getSearchList(){
const params={
isRecomm:true,
page:1,
pageSize:66,
}
const resp = await searchList(params);
if(resp && resp.bizcode === 100){
this.productList = resp.data
}
}
}
}
</script>
<style lang="scss" scoped>
.choiceness_warp{
margin-top: 50rpx;
}
.choiceness_title{
display: flex;
justify-content: center;
.choiceness_title_msg{
margin: 0 18rpx;
}
}
.choiceness_product{
margin-top: 40rpx;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.choiceness_product_item{
background: #FFFFFF;
box-shadow: 0rpx 0rpx 10rpx 0rpx #EEEEEE;
border-radius: 24rpx;
width: 43%;
margin-bottom: 20rpx;
padding: 20rpx;
}
.product_item_name{
font-weight: bold;
font-size: 26rpx;
color: #333333;
margin-top: 20rpx;
}
.product_item_price{
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 10rpx;
.price_{
font-weight: bold;
font-size: 26rpx;
color: $app-bt-bj;
}
.price_sell{
font-weight: 400;
font-size: 18rpx;
color: #999999;
}
}
}
<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>
<view class="choiceness_title_msg">为您精选</view>
<up-image src="/static/common/jingxuan_right.png" width="24" height="8" bgColor="#f1f6ff00"></up-image>
</view>
<view class="choiceness_product">
<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.adPrice}}</text>
</view>
<view class="price_sell">已售{{item.sales}}件</view>
</view>
</view>
</view>
</view>
</template>
<script>
import { searchList } from '@/api/product.js';
export default {
name:"choiceness",
data() {
return {
productList:[]
};
},
mounted() {
this.getSearchList();
},
methods: {
//
jumpInfo(item){
uni.navigateTo({
url: '/pages/productInfo/productInfo?id='+item.id,
})
},
async getSearchList(){
const params={
isRecomm:true,
page:1,
pageSize:66,
}
const resp = await searchList(params);
if(resp && resp.bizcode === 100){
this.productList = resp.data
}
}
}
}
</script>
<style lang="scss" scoped>
.choiceness_warp{
margin-top: 50rpx;
}
.choiceness_title{
display: flex;
justify-content: center;
.choiceness_title_msg{
margin: 0 18rpx;
}
}
.choiceness_product{
margin-top: 40rpx;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.choiceness_product_item{
background: #FFFFFF;
box-shadow: 0rpx 0rpx 10rpx 0rpx #EEEEEE;
border-radius: 24rpx;
width: 43%;
margin-bottom: 20rpx;
padding: 20rpx;
}
.product_item_name{
font-weight: bold;
font-size: 26rpx;
color: #333333;
margin-top: 20rpx;
}
.product_item_price{
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 10rpx;
.price_{
font-weight: bold;
font-size: 26rpx;
color: $app-bt-bj;
}
.price_sell{
font-weight: 400;
font-size: 18rpx;
color: #999999;
}
}
}
</style>