取消首页搜索

This commit is contained in:
YeMingfei666 2024-12-16 13:21:30 +08:00
parent 2d61ed447f
commit 56c84e1b18
1 changed files with 182 additions and 170 deletions

View File

@ -1,39 +1,42 @@
<template> <template>
<view style="padding-bottom: 20rpx;"> <view style="padding-bottom: 20rpx;">
<!-- 自定义导航栏带搜索 --> <template v-if="showSearch">
<!-- #ifdef H5 --> <!-- 自定义导航栏带搜索 -->
<u-navbar :background="background" height="60" :is-back="false" :title="title" :border-bottom="false"> <!-- #ifdef H5 -->
<!-- #endif --> <u-navbar :background="background" height="60" :is-back="false" :title="title" :border-bottom="false">
<!-- #ifndef H5 -->
<u-navbar height="60" :background="background" :is-back="false" :title="title" :border-bottom="false">
<!-- #endif --> <!-- #endif -->
<!-- #ifdef MP-TOUTIAO --> <!-- #ifndef H5 -->
<view :style="{marginTop:barHeight/2+'px'}" class="nvavBar flex" style="padding-left: 80rpx;"> <u-navbar height="60" :background="background" :is-back="false" :title="title" :border-bottom="false">
<!-- #endif --> <!-- #endif -->
<!-- #ifndef MP-TOUTIAO --> <!-- #ifdef MP-TOUTIAO -->
<view class="nvavBar flex justify-center"> <view :style="{marginTop:barHeight/2+'px'}" class="nvavBar flex" style="padding-left: 80rpx;">
<!-- #endif --> <!-- #endif -->
<view class="nvavBar-box" :style="{height:barHeight>0?barHeight+'px':'70rpx'}"> <!-- #ifndef MP-TOUTIAO -->
<!-- #ifdef H5 || APP --> <view class="nvavBar flex justify-center">
<view @click.stop="goSearch" class="nvavBar-boxs flex align-center" style="width: 100%;"> <!-- #endif -->
<u-search placeholder-color="#cccccc" disabled search-icon-color="#ff7581" <view class="nvavBar-box" :style="{height:barHeight>0?barHeight+'px':'70rpx'}">
:show-action="false" placeholder="今日正在热播" v-model="keyword"></u-search> <!-- #ifdef H5 || APP -->
</view> <view @click.stop="goSearch" class="nvavBar-boxs flex align-center"
<!-- #endif --> style="width: 100%;">
<!-- #ifndef H5 || APP --> <u-search placeholder-color="#cccccc" disabled search-icon-color="#ff7581"
<view @click.stop="goSearch" class="nvavBar-boxs flex align-center" :show-action="false" placeholder="今日正在热播" v-model="keyword"></u-search>
:style="{width: 'calc(100% - '+barWidth+'px);'}"> </view>
<u-search placeholder-color="#cccccc" disabled search-icon-color="#ff7581" <!-- #endif -->
:show-action="false" placeholder="今日正在热播" v-model="keyword"></u-search> <!-- #ifndef H5 || APP -->
</view> <view @click.stop="goSearch" class="nvavBar-boxs flex align-center"
<!-- #endif --> :style="{width: 'calc(100% - '+barWidth+'px);'}">
<u-search placeholder-color="#cccccc" disabled search-icon-color="#ff7581"
:show-action="false" placeholder="今日正在热播" v-model="keyword"></u-search>
</view>
<!-- #endif -->
</view>
</view> </view>
</view> </u-navbar>
</u-navbar> </template>
<view class="bgColorTop"> <view class="bgColorTop " :class="{'top-zhanwei':!showSearch}">
<!-- <view v-if="homeTypeSel != '否'" class="topTabs flex align-center justify-center"> <!-- <view v-if="homeTypeSel != '否'" class="topTabs flex align-center justify-center">
<view class="topTabs-box"> <view class="topTabs-box">
<scroll-view class="topTabs-box-H" scroll-x="true"> <scroll-view class="topTabs-box-H" scroll-x="true">
<view class="topTabs-box-H-item" @tap="typeSel(index)" <view class="topTabs-box-H-item" @tap="typeSel(index)"
@ -43,157 +46,157 @@
</scroll-view> </scroll-view>
</view> </view>
</view> --> </view> -->
<!-- 轮播图 --> <!-- 轮播图 -->
<view v-if="TabCur == 0" class="swipers flex align-center justify-center"> <view v-if="TabCur == 0" class="swipers flex align-center justify-center">
<view class="swipers-box"> <view class="swipers-box">
<swiper class="swipers-box" :indicator-dots="false" :autoplay="true" interval="5000" <swiper class="swipers-box" :indicator-dots="false" :autoplay="true" interval="5000" duration="500"
duration="500" :circular="true"> :circular="true">
<swiper-item class="swipers-box" v-for="(item,index) in swiperList" :key='index' <swiper-item class="swipers-box" v-for="(item,index) in swiperList" :key='index'
@tap="goPage(item)"> @tap="goPage(item)">
<image :src="item.imageUrl" mode="aspectFill" style="width: 100%;height:100%;"></image> <image :src="item.imageUrl" mode="aspectFill" style="width: 100%;height:100%;"></image>
</swiper-item>
</swiper>
</view>
</view>
</view>
<block v-if="TabCur == 0">
<!-- 公告 -->
<view class="gg flex align-center justify-center" v-if="noticeList.length>0">
<view class="gg-box flex align-center justify-between">
<image src="../../static/images/index/ggIcon.png" mode=""></image>
<swiper :autoplay="true" :vertical="true" :interval="4000" :circular="true" :indicator-dots="false"
class="gg-box-swiper">
<block v-for="(item, index) in noticeList">
<swiper-item @tap='goMsg(item.url)'>
<view class="gg-box-swiper-t">{{item.title}}</view>
</swiper-item>
</block>
</swiper>
</view>
</view>
<!-- 金刚区 -->
<view class="centers">
<view class="centers-cistrict flex align-center justify-center" v-if="gridList.length > 0">
<view class="centers-cistrict-box">
<swiper :indicator-dots="false" class="centers-cistrict-boxs" :autoplay="false" :interval="3000"
:duration="300">
<swiper-item v-for="(item,index) in gridList" :key="index">
<view class="swiper-item flex align-center justify-between">
<view class="swiper-item-s" @click="goGridList(ite)" v-for="(ite,ind) in item.child"
:key="ind">
<view class="swiper-item-s-img">
<image :src="ite.imageUrl" mode="aspectFill"></image>
</view>
<view class="swiper-item-s-txt">
{{ite.name}}
</view>
</view>
<block v-if="item.child.length == 2">
<view class="swiper-item-s" style="height: 0;"></view>
<view class="swiper-item-s" style="height: 0;"></view>
<view class="swiper-item-s" style="height: 0;"></view>
</block>
<block v-if="item.child.length == 3">
<view class="swiper-item-s" style="height: 0;"></view>
<view class="swiper-item-s" style="height: 0;"></view>
</block>
<block v-if="item.child.length == 4">
<view class="swiper-item-s" style="height: 0;"></view>
</block>
</view>
</swiper-item> </swiper-item>
</swiper> </swiper>
</view> </view>
</view> </view>
</view> </view>
<block v-if="TabCur == 0"> <view v-if="rmVideList.length>0">
<!-- 公告 --> <recommendVideo @more="moreVideo" @video="seVideo" v-if="rmVideList.length>0" :list="rmVideList"
<view class="gg flex align-center justify-center" v-if="noticeList.length>0"> title="本周热门" typeId="2" />
<view class="gg-box flex align-center justify-between">
<image src="../../static/images/index/ggIcon.png" mode=""></image>
<swiper :autoplay="true" :vertical="true" :interval="4000" :circular="true"
:indicator-dots="false" class="gg-box-swiper">
<block v-for="(item, index) in noticeList">
<swiper-item @tap='goMsg(item.url)'>
<view class="gg-box-swiper-t">{{item.title}}</view>
</swiper-item>
</block>
</swiper>
</view>
</view>
<!-- 金刚区 -->
<view class="centers">
<view class="centers-cistrict flex align-center justify-center" v-if="gridList.length > 0">
<view class="centers-cistrict-box">
<swiper :indicator-dots="false" class="centers-cistrict-boxs" :autoplay="false"
:interval="3000" :duration="300">
<swiper-item v-for="(item,index) in gridList" :key="index">
<view class="swiper-item flex align-center justify-between">
<view class="swiper-item-s" @click="goGridList(ite)"
v-for="(ite,ind) in item.child" :key="ind">
<view class="swiper-item-s-img">
<image :src="ite.imageUrl" mode="aspectFill"></image>
</view>
<view class="swiper-item-s-txt">
{{ite.name}}
</view>
</view>
<block v-if="item.child.length == 2">
<view class="swiper-item-s" style="height: 0;"></view>
<view class="swiper-item-s" style="height: 0;"></view>
<view class="swiper-item-s" style="height: 0;"></view>
</block>
<block v-if="item.child.length == 3">
<view class="swiper-item-s" style="height: 0;"></view>
<view class="swiper-item-s" style="height: 0;"></view>
</block>
<block v-if="item.child.length == 4">
<view class="swiper-item-s" style="height: 0;"></view>
</block>
</view>
</swiper-item>
</swiper>
</view>
</view>
</view>
<view v-if="rmVideList.length>0">
<recommendVideo @more="moreVideo" @video="seVideo" v-if="rmVideList.length>0" :list="rmVideList"
title="本周热门" typeId="2" />
</view>
<view v-if="rmVideList.length>0">
<recommendVideo @more="moreVideo" @video="seVideo" v-if="phbVideoList.length>0" :list="phbVideoList"
title="本周排行榜" typeId="1" />
</view>
<view v-if="rmVideList.length>0">
<recommendVideo @more="moreVideo" @video="seVideo" v-if="newVideList.length>0" :list="newVideList"
title="最新热播" typeId="" />
</view>
<!-- 视频列表 -->
<view class="videTitle flex align-center justify-center">
<view class="videTitle-box">
更多短剧
</view>
</view>
</block>
<view v-if="courseList.length>0" class="" style="width: 100%;margin-top: 20rpx;">
<videoList @success="posterSuccess" :list="courseList" />
</view> </view>
<view v-if="rmVideList.length>0">
<recommendVideo @more="moreVideo" @video="seVideo" v-if="phbVideoList.length>0" :list="phbVideoList"
title="本周排行榜" typeId="1" />
</view>
<view v-if="rmVideList.length>0">
<recommendVideo @more="moreVideo" @video="seVideo" v-if="newVideList.length>0" :list="newVideList"
title="最新热播" typeId="" />
</view>
<!-- 视频列表 -->
<view class="videTitle flex align-center justify-center">
<view class="videTitle-box">
更多短剧
</view>
</view>
</block>
<view v-if="courseList.length>0" class="" style="width: 100%;margin-top: 20rpx;">
<videoList @success="posterSuccess" :list="courseList" />
</view>
<u-loadmore v-if="courseList.length > 0" :status="status" /> <u-loadmore v-if="courseList.length > 0" :status="status" />
<empty title="暂无视频" v-if="courseList.length == 0" /> <empty title="暂无视频" v-if="courseList.length == 0" />
<uni-popup ref="popusAuthorization" type="center" :maskClick="false"> <uni-popup ref="popusAuthorization" type="center" :maskClick="false">
<view class="contentview"> <view class="contentview">
<view class="title">隐私保护指引</view> <view class="title">隐私保护指引</view>
<view class="des" @click="openPrivacyContract"> <view class="des" @click="openPrivacyContract">
在使用当前小程序服务之前请仔细阅读<text 在使用当前小程序服务之前请仔细阅读<text
style="color: #5074FF;">{{privacyContractName}}</text>如你同意{{privacyContractName}}请点击同意开始使用 style="color: #5074FF;">{{privacyContractName}}</text>如你同意{{privacyContractName}}请点击同意开始使用
</view>
<view class="btns">
<button class="item reject" @click="exitMiniProgram">拒绝</button>
<button id="agree-btn" class="item agree" open-type="agreePrivacyAuthorization"
@agreeprivacyauthorization="handleAgreePrivacyAuthorization">同意</button>
</view>
</view> </view>
</uni-popup> <view class="btns">
<!-- 会员助力 --> <button class="item reject" @click="exitMiniProgram">拒绝</button>
<u-popup v-model="showjl" :closeable="true" close-icon-color="#ffffff" mode="center"> <button id="agree-btn" class="item agree" open-type="agreePrivacyAuthorization"
<view class="zl" @click="goZl()"> @agreeprivacyauthorization="handleAgreePrivacyAuthorization">同意</button>
<image class="zl-bg"
src="https://dj-api.hnsiyao.cn/file/uploadPath/2023/12/14/adf37beca97826d44970d20118f88e29.png"
mode=""></image>
<view class="zl-title">
会员免费领
</view>
<view class="zl-titlef">
免费领会员
</view>
<view class="zl-titlef2">
助力中...
</view>
<view class="zl-titlebtn">
立即领取
</view>
</view> </view>
</u-popup> </view>
<!-- 新人红包 --> </uni-popup>
<u-popup v-model="xxPopu" :closeable="false" close-icon-color="#ffffff" mode="center"> <!-- 会员助力 -->
<view class="zl" style="height: 580rpx;" @click="saveNewUser()"> <u-popup v-model="showjl" :closeable="true" close-icon-color="#ffffff" mode="center">
<image class="zl-bgs" <view class="zl" @click="goZl()">
src="https://dj-api.hnsiyao.cn/file/uploadPath/2024/02/22/cee2fcdc4c4ebe31ab4ce2c3c3a3d183.png" <image class="zl-bg"
mode=""></image> src="https://dj-api.hnsiyao.cn/file/uploadPath/2023/12/14/adf37beca97826d44970d20118f88e29.png"
<view class="zl-titles"> mode=""></image>
{{xxJDNum}} <text>金币</text> <view class="zl-title">
</view> 会员免费领
</view> </view>
</u-popup> <view class="zl-titlef">
<!-- 活动悬浮入口 --> 免费领会员
<activityComp v-if="showzl && showzls" @clickCloseHd="clickCloseHd" @setImgs="goZl()" /> </view>
<!-- 追剧悬浮 --> <view class="zl-titlef2">
<!-- <drag-button v-if="shodrag && shodrags" @clickClose="clickClose" :videoInfo="videoInfo" :isDock="true" 助力中...
</view>
<view class="zl-titlebtn">
立即领取
</view>
</view>
</u-popup>
<!-- 新人红包 -->
<u-popup v-model="xxPopu" :closeable="false" close-icon-color="#ffffff" mode="center">
<view class="zl" style="height: 580rpx;" @click="saveNewUser()">
<image class="zl-bgs"
src="https://dj-api.hnsiyao.cn/file/uploadPath/2024/02/22/cee2fcdc4c4ebe31ab4ce2c3c3a3d183.png"
mode=""></image>
<view class="zl-titles">
{{xxJDNum}} <text>金币</text>
</view>
</view>
</u-popup>
<!-- 活动悬浮入口 -->
<activityComp v-if="showzl && showzls" @clickCloseHd="clickCloseHd" @setImgs="goZl()" />
<!-- 追剧悬浮 -->
<!-- <drag-button v-if="shodrag && shodrags" @clickClose="clickClose" :videoInfo="videoInfo" :isDock="true"
:existTabBar="true" @btnClick="btnClick" /> --> :existTabBar="true" @btnClick="btnClick" /> -->
<u-image @click="goMsg('/me/choujiang/choujiang')" :src="`../../static/images/draw/draw.gif`" <u-image @click="goMsg('/me/choujiang/choujiang')" :src="`../../static/images/draw/draw.gif`"
style="width: 150rpx;height: 150rpx;position: fixed;right: 30rpx;bottom: 180rpx;"></u-image> style="width: 150rpx;height: 150rpx;position: fixed;right: 30rpx;bottom: 180rpx;"></u-image>
<!-- #ifdef H5 --> <!-- #ifdef H5 -->
<div v-if="isWeixin" <div v-if="isWeixin"
style="width: 100%;height: 100%;position: fixed;top: 0;z-index: 999;background: url('../../static/images/open_guide.png') no-repeat center bottom / cover;"> style="width: 100%;height: 100%;position: fixed;top: 0;z-index: 999;background: url('../../static/images/open_guide.png') no-repeat center bottom / cover;">
</div> </div>
<!-- #endif --> <!-- #endif -->
<!-- #ifdef H5 --> <!-- #ifdef H5 -->
<div v-if="isIos" @click="isIos=false" <div v-if="isIos" @click="isIos=false"
style="width: 100%;height: 100%;position: fixed;top: 0;z-index: 999;background: url('../../static/images/index_guide.png') no-repeat center bottom / 100%;background-color: rgba(0, 0, 0, 0.8);"> style="width: 100%;height: 100%;position: fixed;top: 0;z-index: 999;background: url('../../static/images/index_guide.png') no-repeat center bottom / 100%;background-color: rgba(0, 0, 0, 0.8);">
</div> </div>
<!-- #endif --> <!-- #endif -->
</view> </view>
</template> </template>
@ -213,6 +216,7 @@
}, },
data() { data() {
return { return {
showSearch: false,
showzls: true, showzls: true,
shodrags: true, shodrags: true,
shodrag: false, // shodrag: false, //
@ -335,8 +339,8 @@
} }
}) })
} }
let u = navigator?navigator.userAgent:''; let u = navigator ? navigator.userAgent : '';
if (u.toLowerCase().indexOf('micromessenger') !== -1) { if (u.toLowerCase().indexOf('micromessenger') !== -1) {
this.isWeixin = true this.isWeixin = true
} }
@ -1195,6 +1199,14 @@
text-align: justify; text-align: justify;
line-height: 1.6; line-height: 1.6;
} }
.top-zhanwei{
/* #ifdef H5 */
padding-top: 32rpx;
/* #endif */
/* #ifndef H5 */
padding-top: 44px;
/* #endif */
}
.contentview .des .link { .contentview .des .link {
color: #5074FF; color: #5074FF;