This commit is contained in:
weipengfei 2024-04-03 16:54:35 +08:00
parent ebf7d7c40c
commit d34e688fde
2 changed files with 89 additions and 87 deletions

View File

@ -55,7 +55,7 @@ module.exports = {
HTTP_REQUEST_URL: process.env.NODE_ENV == 'development' ? httpApi : window.location.protocol + "//" + window
.location.host,
// 聊天长连接地址
VUE_APP_WS_URL: wsApi ? `${wsApi}?type=user` : VUE_APP_WS_URL,
VUE_APP_WS_URL: process.env.NODE_ENV == 'development' ? `${wsApi}?type=user` : VUE_APP_WS_URL,
// #endif
HTTP_REQUEST_URL_SIX: httpSix,
openPlantGrass: openPlantGrass,

View File

@ -24,92 +24,94 @@
</view>
</view>
<view v-if="historyList.length == 0" style="text-align: center; color: #999;">暂无搜索历史~</view>
<view class='title'>热门搜索</view>
<view class='list acea-row' :style="{'height': hotSearchBox?'auto':'150rpx'}">
<block v-for="(item,index) in hotSearchList" :key="index">
<view class='item line1' @tap='setHotSearchValue(item,1)'>{{item.keyword}}</view>
</block>
</view>
<view>
<view class="more-btn" v-if="hotSearchList.length>8 && !hotSearchBox" @click="hotSearchBox = true">
展开全部<text class="iconfont icon-xiangxia"></text>
</view>
<view class="more-btn" v-if="hotSearchList.length>8 && hotSearchBox" @click="hotSearchBox = false">
收起<text class="iconfont icon-xiangshang"></text>
</view>
</view>
<!--今日热搜模块-->
<view class="search-hot">
<scroll-view v-if="isShow" scroll-x="true" style="white-space: nowrap; display: flex;" scroll-with-animation show-scrollbar="true">
<view v-if="daySearchList.length>0" class="scroll-count">
<view class="scroll-item" :style="{'background-image':`url(${domain}/static/images/search-title-bg.png)`}">
<view class="search-title">
<image :src="`${domain}/static/images/search-title-icon.png`" class="title-icon"></image>
<text>今日热搜</text>
</view>
<view class="search-list">
<navigator v-for="(item,index) in daySearchList" :url="`/pages/goods_details/index?id=${item.product_id}`" hover-class="none" class="search-item">
<block v-if="index<3">
<view class="picture">
<image :src="item.image" class="image"></image>
<text class="list-num num-pic" :style="{'background-image':`url(${domain}/static/images/search-list${index+1}.png)`}">{{index+1}}</text>
</view>
<view class="list-info">
<view class="title line1">{{item.store_name}}</view>
<view class="info line1">{{item.store_info}}</view>
</view>
</block>
<block v-else>
<view class="list-more">
<view class="list-num" :style="{'background-image':`url(${domain}/static/images/search-list.png)`}">{{index+1}}</view>
<view class="title line1 titleml">{{item.store_name}}</view>
</view>
</block>
</navigator>
</view>
</view>
</view>
<!--热销排行-->
<view v-for="(item,index) in hotRankList" class="scroll-count">
<view class="scroll-item" :style="{'background-image':`url(${domain}/static/images/search-title-bg.png)`}">
<view class="search-title">
<image :src="`${domain}/static/images/search-title-icon.png`" class="title-icon"></image>
<text>{{item.cate_name}}</text>
</view>
<view class="search-list">
<navigator v-for="(itm,idx) in item.list" :url="`/pages/goods_details/index?id=${itm.product_id}`" hover-class="none" class="search-item">
<block v-if="idx<3">
<view class="picture">
<image :src="itm.image" class="image"></image>
<text class="list-num num-pic" :style="{'background-image':`url(${domain}/static/images/search-list${idx+1}.png)`}">{{idx+1}}</text>
</view>
<view class="list-info">
<view class="title line1">{{itm.store_name}}</view>
<view class="info line1">{{itm.store_info}}</view>
</view>
</block>
<block v-else>
<view class="list-more">
<view class="list-num" :style="{'background-image':`url(${domain}/static/images/search-list.png)`}">{{idx+1}}</view>
<view class="title line1 titleml">{{itm.store_name}}</view>
</view>
</block>
</navigator>
</view>
</view>
</view>
</scroll-view>
<view class="search-hot-switch">
<view v-if="isShow" class="switch" @click="isShow=!isShow">
<text class="iconfont icon-xianshizhuangtai"></text>
<text>隐藏热搜榜</text>
</view>
<view v-else class="switch" @click="isShow=!isShow">
<text class="iconfont icon-yincangzhuangtai"></text>
<text>开启热搜榜</text>
</view>
</view>
</view>
<block v-if="isShop==false">
<view class='title'>热门搜索</view>
<view class='list acea-row' :style="{'height': hotSearchBox?'auto':'150rpx'}">
<block v-for="(item,index) in hotSearchList" :key="index">
<view class='item line1' @tap='setHotSearchValue(item,1)'>{{item.keyword}}</view>
</block>
</view>
<view>
<view class="more-btn" v-if="hotSearchList.length>8 && !hotSearchBox" @click="hotSearchBox = true">
展开全部<text class="iconfont icon-xiangxia"></text>
</view>
<view class="more-btn" v-if="hotSearchList.length>8 && hotSearchBox" @click="hotSearchBox = false">
收起<text class="iconfont icon-xiangshang"></text>
</view>
</view>
<!--今日热搜模块-->
<view class="search-hot">
<scroll-view v-if="isShow" scroll-x="true" style="white-space: nowrap; display: flex;" scroll-with-animation show-scrollbar="true">
<view v-if="daySearchList.length>0" class="scroll-count">
<view class="scroll-item" :style="{'background-image':`url(${domain}/static/images/search-title-bg.png)`}">
<view class="search-title">
<image :src="`${domain}/static/images/search-title-icon.png`" class="title-icon"></image>
<text>今日热搜</text>
</view>
<view class="search-list">
<navigator v-for="(item,index) in daySearchList" :url="`/pages/goods_details/index?id=${item.product_id}`" hover-class="none" class="search-item">
<block v-if="index<3">
<view class="picture">
<image :src="item.image" class="image"></image>
<text class="list-num num-pic" :style="{'background-image':`url(${domain}/static/images/search-list${index+1}.png)`}">{{index+1}}</text>
</view>
<view class="list-info">
<view class="title line1">{{item.store_name}}</view>
<view class="info line1">{{item.store_info}}</view>
</view>
</block>
<block v-else>
<view class="list-more">
<view class="list-num" :style="{'background-image':`url(${domain}/static/images/search-list.png)`}">{{index+1}}</view>
<view class="title line1 titleml">{{item.store_name}}</view>
</view>
</block>
</navigator>
</view>
</view>
</view>
<!--热销排行-->
<view v-for="(item,index) in hotRankList" class="scroll-count">
<view class="scroll-item" :style="{'background-image':`url(${domain}/static/images/search-title-bg.png)`}">
<view class="search-title">
<image :src="`${domain}/static/images/search-title-icon.png`" class="title-icon"></image>
<text>{{item.cate_name}}</text>
</view>
<view class="search-list">
<navigator v-for="(itm,idx) in item.list" :url="`/pages/goods_details/index?id=${itm.product_id}`" hover-class="none" class="search-item">
<block v-if="idx<3">
<view class="picture">
<image :src="itm.image" class="image"></image>
<text class="list-num num-pic" :style="{'background-image':`url(${domain}/static/images/search-list${idx+1}.png)`}">{{idx+1}}</text>
</view>
<view class="list-info">
<view class="title line1">{{itm.store_name}}</view>
<view class="info line1">{{itm.store_info}}</view>
</view>
</block>
<block v-else>
<view class="list-more">
<view class="list-num" :style="{'background-image':`url(${domain}/static/images/search-list.png)`}">{{idx+1}}</view>
<view class="title line1 titleml">{{itm.store_name}}</view>
</view>
</block>
</navigator>
</view>
</view>
</view>
</scroll-view>
<view class="search-hot-switch">
<view v-if="isShow" class="switch" @click="isShow=!isShow">
<text class="iconfont icon-xianshizhuangtai"></text>
<text>隐藏热搜榜</text>
</view>
<view v-else class="switch" @click="isShow=!isShow">
<text class="iconfont icon-yincangzhuangtai"></text>
<text>开启热搜榜</text>
</view>
</view>
</view>
</block>
</view>
<!-- #ifndef H5 -->
<passwordPopup></passwordPopup>