暂存code

This commit is contained in:
hejiangming
2025-05-07 09:54:33 +08:00
parent 78270eeda0
commit 007b002b81
403 changed files with 14507 additions and 6320 deletions
+22 -33
View File
@@ -1,21 +1,20 @@
<template>
<view class="choiceness_warp">
<view class="choiceness_title">
<up-image src="/static/common/jingxuan_left.png" width="50" height="12" bgColor="#f1f6ff00"></up-image>
<up-image src="/static/common/jingxuan_left.png" width="24" height="6" bgColor="#f1f6ff00"></up-image>
<view class="choiceness_title_msg">为您精选</view>
<up-image src="/static/common/jingxuan_right.png" width="50" height="12" bgColor="#f1f6ff00"></up-image>
<up-image src="/static/common/jingxuan_right.png" width="24" height="6" 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.name}}</view>
<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>
<text>{{item.priceDouble}}</text>
</view>
<view class="price_sell">已售{{item.sell}}件</view>
<!-- <view class="price_sell">已售{{item.sell}}件</view> -->
</view>
</view>
</view>
@@ -23,47 +22,37 @@
</template>
<script>
import { searchList } from '@/api/product.js';
export default {
name:"choiceness",
data() {
return {
productList:[
{
id:1,
url:"/static/common/product_def2.png",
name:"美的双开门冰箱大容量多层速冷冰箱",
price:"7088.",
priceDouble:"00",
sell:"1.4万",
type:0,
},{
id:2,
url:"/static/common/product_def2.png",
name:"西门子双开门家庭冰箱大开口设计",
price:"7088.",
priceDouble:"00",
sell:"1.4万",
type:1,//1 哈希优选
},{
id:2,
url:"/static/common/product_def2.png",
name:"西门子双开门家庭冰箱大开口设计",
price:"7088.",
priceDouble:"00",
sell:"1.4万",
type:1,//1 哈希优选
}
]
productList:[]
};
},
mounted() {
this.getSearchList();
},
methods: {
//
jumpInfo(item){
console.log("item",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);
console.log("resp",resp);
if(resp && resp.bizcode === 100){
this.productList = resp.data
}
}
}
}
</script>