Commit f953ef28 authored by 肖健's avatar 肖健

Merge remote-tracking branch 'origin/dev_cd' into dev_jd

parents d160a35c fdce6d23
......@@ -15,15 +15,25 @@
<view class="banner">
<view class="banner-img">
<image src="http://jdnc-oss.uzosp.com/2022/05/31/2260b529e99a472fbe3b6ba33f7987f5.png"></image>
<view class="left" @click="goJdShop(1)"></view>
<view class="right" @click="goJdShop(2)"></view>
<image src="http://jdnc-oss.uzosp.com/2022/06/13/f70fc82ad7ef4c1bb653c77abe396e6d.png"></image>
<view class="left" @click="goJdShop(1)">
<view class="banner-btn">
<image src="../static/index/ban-btn.png"></image>
<text>立即购买</text>
</view>
</view>
<view class="right" @click="goJdShop(2)">
<view class="banner-btn">
<image src="../static/index/ban-btn.png"></image>
<text>立即购买</text>
</view>
</view>
</view>
<u-gap bgColor="transparent" height="20"></u-gap>
<view class="banner-btn">
<!-- <view class="banner-btn">
<image src="../static/index/ban-btn.png"></image>
<text>限时领取</text>
</view>
</view> -->
</view>
<u-gap bgColor="transparent" height="15"></u-gap>
......@@ -381,7 +391,7 @@
}
}
.banner-img{
width: 690rpx ;height:262rpx;
width: 690rpx ;height:344rpx;
box-sizing: border-box;
padding:0 110rpx;
display:flex;
......@@ -392,15 +402,19 @@
.right{
width: 220rpx;height:220rpx;
}
>view{
.banner-btn{
width:100%;height:62rpx;
font-weight: bold;
color: #1F335A;
top:240rpx;
font-size: 30rpx;
text-align: center;
line-height:62rpx;
}
}
}
.banner-btn{
width:511rpx;height:98rpx;
font-weight: bold;
color: #1F335A;
font-size: 34rpx;
text-align: center;
line-height:84rpx;
}
}
.bg-img{
......
......@@ -4,7 +4,7 @@
<view>
<view class="shop">
<div class="my__search" @click='goSearch'>
<u-search placeholder="搜搜你最想知道的" :showAction='false' bgColor='#ffffff' v-model="keyword"></u-search>
<u-search placeholder="搜搜你最想知道的" :showAction='false' bgColor='#ffffff'></u-search>
</div>
<div class="shop__swiper">
<view class="u-demo-block">
......
......@@ -6,7 +6,7 @@
<view class="appCotent">
<div class="myMoveCar">
<div class="my__search">
<u-search placeholder="请输入商品" :showAction='false' bgColor='#ffffff' v-model="keyword" @search="searchCommodity"></u-search>
<u-search placeholder="请输入商品" :showAction='false' bgColor='#ffffff' v-model="keyword" @change="searchCommodity"></u-search>
</div>
<div class="list">
<div class="list__item" v-for="(vo,inx) in items" :key="inx" @click="goDetail(vo.id,vo.link)">
......@@ -38,6 +38,7 @@ export default {
return {
keyword: '',
items: [],
timer:null
};
},
methods: {
......@@ -47,17 +48,21 @@ export default {
})
},
searchCommodity(){
let searchCondition = {
searchVal: this.keyword
}
console.log(searchCondition,222222222)
let opts = { url: '/app/index/mall/list', method: 'get' };
this.http.httpRequest(opts, searchCondition).then(res => {
if(res.data.code == 200){
this.items = res.data.data.rows
}
})
if (this.timer) {
clearTimeout(this.timer);
}
this.timer = setTimeout(() => {
let searchCondition = {
searchVal: this.keyword
}
console.log(searchCondition,222222222)
let opts = { url: '/app/index/mall/list', method: 'get' };
this.http.httpRequest(opts, searchCondition).then(res => {
if(res.data.code == 200){
this.items = res.data.data.rows
}
})
}, 300)
},
goDetail(id,link) {
let token = uni.getStorageSync('userToken');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment