mirror of
https://gitee.com/gz-yami/mall4j.git
synced 2025-12-26 07:56:43 +08:00
搜索历史修复、首页公告轮播优化
This commit is contained in:
parent
9b4bea4f50
commit
6a69b79ec1
@ -45,7 +45,7 @@
|
||||
<!-- 消息播放 -->
|
||||
<view class="message-play" @tap="onNewsPage">
|
||||
<image src="/static/images/icon/horn.png" class="hornpng"></image>
|
||||
<swiper vertical="true" autoplay="true" duration="1000" class="swiper-cont">
|
||||
<swiper :vertical="true" :autoplay="true" :circular="true" duration="1000" class="swiper-cont">
|
||||
<block v-for="(item, index) in news" :key="index">
|
||||
<swiper-item class="items">{{item.title}}</swiper-item>
|
||||
</block>
|
||||
|
||||
@ -165,8 +165,20 @@ export default {
|
||||
http.request(params);
|
||||
},
|
||||
//当前搜索页二次搜索商品
|
||||
toSearchConfirm: function () {
|
||||
this.toLoadData();
|
||||
toSearchConfirm: function (e) {
|
||||
// this.toLoadData();
|
||||
if (e.detail.value) {
|
||||
let recentSearch = uni.getStorageSync('recentSearch') || [];
|
||||
recentSearch = recentSearch.filter(item => item !== this.prodName);
|
||||
recentSearch.unshift(this.prodName);
|
||||
if (recentSearch.length > 10) {
|
||||
recentSearch.pop();
|
||||
}
|
||||
uni.setStorageSync('recentSearch', recentSearch);
|
||||
}
|
||||
uni.redirectTo({
|
||||
url: '/pages/search-prod-show/search-prod-show?prodName=' + e.detail.value
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user