更改随机名字
This commit is contained in:
@@ -1,21 +1,21 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<u-sticky :enable="enable">
|
||||
<view class="search-box">
|
||||
<view class="search-box-DEghTTorsp">
|
||||
<u-search bg-color="#f2f2f2" style="width: 100%;" placeholder="搜索更多资源" :focus="true" v-model="keyword" :show-action="true"
|
||||
:animation="true" action-text="取消" @custom="goBack()" @search="doSearch(false)"></u-search>
|
||||
:animation="true" action-text="取消" @custom="goBackDEghTTorsp()" @search="doSearchDEghTTorsp(false)"></u-search>
|
||||
</view>
|
||||
</u-sticky>
|
||||
<view class="search-keyword" v-if="isSearch">
|
||||
<view class="keyword-block" v-if="hotKeywordList.length !=0">
|
||||
<view class="search-keyword-DEghTTorsp" v-if="isSearch">
|
||||
<view class="keyword-block-DEghTTorsp" v-if="hotKeywordList.length !=0">
|
||||
<view class="keyword-list-header">
|
||||
<view>热搜</view>
|
||||
<view>
|
||||
<image @tap="hotToggle" :src="'/static/images/index/attention'+forbid+'.png'"></image>
|
||||
<image @tap="hotToggleDEghTTorsp" :src="'/static/images/index/attention'+forbid+'.png'"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="keyword" v-if="forbid==''">
|
||||
<view v-for="(keyword,index) in hotKeywordList" @tap="doSearchs(keyword)" :key="index"
|
||||
<view v-for="(keyword,index) in hotKeywordList" @tap="doSearchsDEghTTorsp(keyword)" :key="index"
|
||||
v-if="keyword">
|
||||
{{keyword}}
|
||||
</view>
|
||||
@@ -24,23 +24,23 @@
|
||||
<view>当前搜热已隐藏</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="keyword-block" v-if="oldKeywordList.length>0">
|
||||
<view class="keyword-block-DEghTTorsp" v-if="oldKeywordList.length>0">
|
||||
<view class="keyword-list-header">
|
||||
<view>历史记录</view>
|
||||
<view>
|
||||
<image @tap="oldDelete" src="/static/images/index/delete.png"></image>
|
||||
<image @tap="oldDeleteDEghTTorsp" src="/static/images/index/delete.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="keyword">
|
||||
<view v-for="(keyword,index) in oldKeywordList" @tap="doSearch(keyword)" :key="index"
|
||||
<view v-for="(keyword,index) in oldKeywordList" @tap="doSearchDEghTTorsp(keyword)" :key="index"
|
||||
v-if="keyword">
|
||||
{{keyword}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="search-list flex align-center justify-center" v-else>
|
||||
<view class="search-list-box flex align-center justify-between flex-wrap">
|
||||
<view class="search-list-DEghTTorsp flex align-center justify-center" v-else>
|
||||
<view class="search-list-box-DEghTTorsp flex align-center justify-between flex-wrap">
|
||||
<swiper class="swiper" :indicator-dots="true" :autoplay="true" interval="5000" duration="500"
|
||||
:circular="true" style="width: 100%;height: 350rpx;margin-bottom: 20rpx;">
|
||||
<swiper-item v-for="(item,index) in swiperList" :key='index' @tap="goPage(item.url)">
|
||||
@@ -48,7 +48,7 @@
|
||||
style="width: 100%;height: 100%;border-radius: 24rpx;"></image>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<videoList @success="posterSuccess" :list="keywordList" />
|
||||
<videoList @success="posterSuccessDEghTTorsp" :list="keywordList" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
@@ -96,12 +96,12 @@
|
||||
},
|
||||
onLoad() {
|
||||
// this.init();
|
||||
// this.getSearchList()
|
||||
this.getBannerList()
|
||||
// this.getSearchListDEghTTorsp()
|
||||
this.getBannerListDEghTTorsp()
|
||||
},
|
||||
methods: {
|
||||
//点击回调
|
||||
posterSuccess(item) {
|
||||
posterSuccessDEghTTorsp(item) {
|
||||
let userId = uni.getStorageSync('userId')
|
||||
if (userId) {
|
||||
uni.navigateTo({
|
||||
@@ -111,31 +111,15 @@
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: "/pages/login/login"
|
||||
url: "/pages/ghtwwlkXYG/wVghNzmqkQ"
|
||||
})
|
||||
}
|
||||
},
|
||||
doSearchs(keyWord) {
|
||||
doSearchsDEghTTorsp(keyWord) {
|
||||
this.keyword = keyWord
|
||||
this.doSearch(false)
|
||||
this.doSearchDEghTTorsp(false)
|
||||
},
|
||||
// 跳转资源详情
|
||||
goCourse(e) {
|
||||
let userId = uni.getStorageSync('userId')
|
||||
if (userId) {
|
||||
// uni.navigateTo({
|
||||
// url: '/pages/index/course/courseDet?id=' + e
|
||||
// });
|
||||
uni.navigateTo({
|
||||
url: '/me/detail/detail?id=' + e
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: "/pages/login/login"
|
||||
})
|
||||
}
|
||||
},
|
||||
getBannerList() {
|
||||
getBannerListDEghTTorsp() {
|
||||
this.$u.api.bannerList({
|
||||
classify: '1'
|
||||
}).then(res => {
|
||||
@@ -156,7 +140,7 @@
|
||||
})
|
||||
},
|
||||
// 获取搜索历史
|
||||
getSearchList() {
|
||||
getSearchListDEghTTorsp() {
|
||||
this.$u.api.SearchList().then(res => {
|
||||
if (res.code == 0) {
|
||||
this.hotKeywordList = res.data.allSerchName
|
||||
@@ -165,7 +149,7 @@
|
||||
})
|
||||
},
|
||||
//清除历史搜索
|
||||
oldDelete() {
|
||||
oldDeleteDEghTTorsp() {
|
||||
uni.showModal({
|
||||
content: '确定清除历史搜索记录?',
|
||||
success: (res) => {
|
||||
@@ -173,7 +157,7 @@
|
||||
console.log('用户点击确定');
|
||||
this.$u.api.SearchDet().then(res => {
|
||||
if (res.code == 0) {
|
||||
this.getSearchList()
|
||||
this.getSearchListDEghTTorsp()
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
@@ -189,7 +173,7 @@
|
||||
});
|
||||
},
|
||||
//执行搜索
|
||||
doSearch(keyword) {
|
||||
doSearchDEghTTorsp(keyword) {
|
||||
this.isSearch = false
|
||||
this.isShowKeywordList = true;
|
||||
this.noData = true
|
||||
@@ -241,11 +225,11 @@
|
||||
}
|
||||
},
|
||||
// 点击取消返回首页
|
||||
goBack() {
|
||||
goBackDEghTTorsp() {
|
||||
uni.navigateBack()
|
||||
},
|
||||
//热门搜索开关
|
||||
hotToggle() {
|
||||
hotToggleDEghTTorsp() {
|
||||
this.forbid = this.forbid ? '' : '_forbid';
|
||||
},
|
||||
|
||||
@@ -254,17 +238,17 @@
|
||||
onReachBottom: function() {
|
||||
if (this.page < this.count) {
|
||||
this.page += 1
|
||||
this.doSearch();
|
||||
this.doSearchDEghTTorsp();
|
||||
}
|
||||
},
|
||||
onPullDownRefresh: function() {
|
||||
this.page = 1;
|
||||
this.doSearch();
|
||||
this.doSearchDEghTTorsp();
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.search-box {
|
||||
.search-box-DEghTTorsp {
|
||||
width: 100%;
|
||||
/* background-color: rgb(242, 242, 242); */
|
||||
padding: 15upx 2.5%;
|
||||
@@ -275,11 +259,11 @@
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.search-box .mSearch-input-box {
|
||||
.search-box-DEghTTorsp .mSearch-input-box {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.search-box .input-box {
|
||||
.search-box-DEghTTorsp .input-box {
|
||||
width: 85%;
|
||||
flex-shrink: 1;
|
||||
display: flex;
|
||||
@@ -287,7 +271,7 @@
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.search-box .search-btn {
|
||||
.search-box-DEghTTorsp .search-btn {
|
||||
width: 15%;
|
||||
margin: 0 0 0 2%;
|
||||
display: flex;
|
||||
@@ -300,7 +284,7 @@
|
||||
border-radius: 60upx;
|
||||
}
|
||||
|
||||
.search-box .input-box>input {
|
||||
.search-box-DEghTTorsp .input-box>input {
|
||||
width: 100%;
|
||||
height: 60upx;
|
||||
font-size: 32upx;
|
||||
@@ -318,70 +302,27 @@
|
||||
color: #9e9e9e;
|
||||
}
|
||||
|
||||
.search-keyword {
|
||||
.search-keyword-DEghTTorsp {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.search-list {
|
||||
.search-list-DEghTTorsp {
|
||||
width: 100%;
|
||||
margin-top: 20rpx;
|
||||
|
||||
.search-list-box {
|
||||
.search-list-box-DEghTTorsp {
|
||||
width: 686rpx;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.keyword-list-box {
|
||||
height: calc(100vh - 110upx);
|
||||
padding-top: 10upx;
|
||||
/* border-radius: 20upx 20upx 0 0; */
|
||||
/* background-color: #fff; */
|
||||
}
|
||||
|
||||
.keyword-entry-tap {
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
.keyword-entry {
|
||||
width: 94%;
|
||||
height: 80upx;
|
||||
margin: 0 3%;
|
||||
font-size: 30upx;
|
||||
color: #333;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-bottom: solid 1upx #e7e7e7;
|
||||
}
|
||||
|
||||
.keyword-entry image {
|
||||
width: 60upx;
|
||||
height: 60upx;
|
||||
}
|
||||
|
||||
.keyword-entry .keyword-text,
|
||||
.keyword-entry .keyword-img {
|
||||
height: 80upx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.keyword-entry .keyword-text {
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
.keyword-entry .keyword-img {
|
||||
width: 10%;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
|
||||
.keyword-block {
|
||||
.keyword-block-DEghTTorsp {
|
||||
padding: 10upx 0;
|
||||
}
|
||||
|
||||
.keyword-block .keyword-list-header {
|
||||
.keyword-block-DEghTTorsp .keyword-list-header {
|
||||
width: 94%;
|
||||
padding: 10upx 3%;
|
||||
font-size: 27upx;
|
||||
@@ -390,12 +331,12 @@
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.keyword-block .keyword-list-header image {
|
||||
.keyword-block-DEghTTorsp .keyword-list-header image {
|
||||
width: 40upx;
|
||||
height: 40upx;
|
||||
}
|
||||
|
||||
.keyword-block .keyword {
|
||||
.keyword-block-DEghTTorsp .keyword {
|
||||
width: 94%;
|
||||
padding: 3px 3%;
|
||||
display: flex;
|
||||
@@ -403,14 +344,14 @@
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.keyword-block .hide-hot-tis {
|
||||
.keyword-block-DEghTTorsp .hide-hot-tis {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
font-size: 28upx;
|
||||
color: #6b6b6b;
|
||||
}
|
||||
|
||||
.keyword-block .keyword>view {
|
||||
.keyword-block-DEghTTorsp .keyword>view {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
@@ -424,33 +365,5 @@
|
||||
color: #6b6b6b;
|
||||
}
|
||||
|
||||
.centre {
|
||||
text-align: center;
|
||||
margin: 200rpx auto;
|
||||
font-size: 32rpx;
|
||||
|
||||
image {
|
||||
width: 360rpx;
|
||||
height: 360rpx;
|
||||
// margin-bottom: 20rpx;
|
||||
margin: 0 auto 20rpx;
|
||||
// border: 1px dotted #000000;
|
||||
}
|
||||
|
||||
.tips {
|
||||
font-size: 34rpx;
|
||||
color: #5074FF;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin: 80rpx auto;
|
||||
width: 600rpx;
|
||||
border-radius: 32rpx;
|
||||
line-height: 90rpx;
|
||||
color: #ffffff;
|
||||
font-size: 34rpx;
|
||||
background: #5074FF;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user