Commit f953ef28 authored by 肖健's avatar 肖健

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

parents d160a35c fdce6d23
...@@ -15,15 +15,25 @@ ...@@ -15,15 +15,25 @@
<view class="banner"> <view class="banner">
<view class="banner-img"> <view class="banner-img">
<image src="http://jdnc-oss.uzosp.com/2022/05/31/2260b529e99a472fbe3b6ba33f7987f5.png"></image> <image src="http://jdnc-oss.uzosp.com/2022/06/13/f70fc82ad7ef4c1bb653c77abe396e6d.png"></image>
<view class="left" @click="goJdShop(1)"></view> <view class="left" @click="goJdShop(1)">
<view class="right" @click="goJdShop(2)"></view> <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> </view>
<u-gap bgColor="transparent" height="20"></u-gap> <u-gap bgColor="transparent" height="20"></u-gap>
<view class="banner-btn"> <!-- <view class="banner-btn">
<image src="../static/index/ban-btn.png"></image> <image src="../static/index/ban-btn.png"></image>
<text>限时领取</text> <text>限时领取</text>
</view> </view> -->
</view> </view>
<u-gap bgColor="transparent" height="15"></u-gap> <u-gap bgColor="transparent" height="15"></u-gap>
...@@ -381,7 +391,7 @@ ...@@ -381,7 +391,7 @@
} }
} }
.banner-img{ .banner-img{
width: 690rpx ;height:262rpx; width: 690rpx ;height:344rpx;
box-sizing: border-box; box-sizing: border-box;
padding:0 110rpx; padding:0 110rpx;
display:flex; display:flex;
...@@ -392,15 +402,19 @@ ...@@ -392,15 +402,19 @@
.right{ .right{
width: 220rpx;height:220rpx; 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{ .bg-img{
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<view> <view>
<view class="shop"> <view class="shop">
<div class="my__search" @click='goSearch'> <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>
<div class="shop__swiper"> <div class="shop__swiper">
<view class="u-demo-block"> <view class="u-demo-block">
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<view class="appCotent"> <view class="appCotent">
<div class="myMoveCar"> <div class="myMoveCar">
<div class="my__search"> <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>
<div class="list"> <div class="list">
<div class="list__item" v-for="(vo,inx) in items" :key="inx" @click="goDetail(vo.id,vo.link)"> <div class="list__item" v-for="(vo,inx) in items" :key="inx" @click="goDetail(vo.id,vo.link)">
...@@ -38,6 +38,7 @@ export default { ...@@ -38,6 +38,7 @@ export default {
return { return {
keyword: '', keyword: '',
items: [], items: [],
timer:null
}; };
}, },
methods: { methods: {
...@@ -47,17 +48,21 @@ export default { ...@@ -47,17 +48,21 @@ export default {
}) })
}, },
searchCommodity(){ searchCommodity(){
if (this.timer) {
let searchCondition = { clearTimeout(this.timer);
searchVal: this.keyword }
} this.timer = setTimeout(() => {
console.log(searchCondition,222222222) let searchCondition = {
let opts = { url: '/app/index/mall/list', method: 'get' }; searchVal: this.keyword
this.http.httpRequest(opts, searchCondition).then(res => { }
if(res.data.code == 200){ console.log(searchCondition,222222222)
this.items = res.data.data.rows 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) { goDetail(id,link) {
let token = uni.getStorageSync('userToken'); 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