提交 69af73d2 编写于 作者: 杨广俊's avatar 杨广俊

test

上级 efc932f5
...@@ -162,7 +162,11 @@ export default { ...@@ -162,7 +162,11 @@ export default {
"seqNo": 1 "seqNo": 1
}] }]
} }
this.pageBurialPoin(obj) this.pageBurialPoin({
...m_search_result_five_minutes_detail,
labelValue: item.title,
createdTime: new Date().getTime(),
})
let paramList = this.setEventByModuleCode(itemData); let paramList = this.setEventByModuleCode(itemData);
// alert(itemData.appModuleInfo.code) // alert(itemData.appModuleInfo.code)
......
...@@ -146,61 +146,6 @@ export default { ...@@ -146,61 +146,6 @@ export default {
}) })
}, },
goToDetail(item) {
let _this = this;
this.$router.push({
path: '/teachersDetail',
query: {
id: item.doctorId,
token: _this.token
}
})
this.pageBurialPoin({
...m_search_result_health_cartoon_detail,
labelValue: orderIndex,
createdTime: new Date().getTime(),
})
},
//排序
sortFun() {
this.dir = this.dir == 1 ? 2 : 1;
this.getData()
},
randomBg(d) {
for (let i = 0; i < d.length; i++) {
if (i % 4 == 0) {
d[i].bgColor = '#EBF6F1'
} else if (i % 4 == 1) {
d[i].bgColor = '#EDF3FA'
} else if (i % 4 == 2) {
d[i].bgColor = '#F0F0FA'
} else if (i % 4 == 3) {
d[i].bgColor = '#F6EFE6'
}
}
/// console.log(d);
},
getData() {
let _this = this,
para = {
token: _this.token,
setEntry: 'headers'
}
let url = '/contents/courseDoctor/getAllTeacher/orderby/' + _this.col + '/dir/' + _this.dir
this.GET(url, para).then(res => {
if (res.code == '000000') {
_this.list = res.data.teacherList || [];
_this.followCount = res.data.followCount || 0;
_this.studyCount = res.data.studyCount || 0;
if (_this.list.length > 0) {
_this.randomBg(_this.list);
}
}
})
},
orderAction(orderIndex) { orderAction(orderIndex) {
this.pageBurialPoin({ this.pageBurialPoin({
...m_search_result_health_cartoon_order, ...m_search_result_health_cartoon_order,
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<section class="history-labels-title"> <section class="history-labels-title">
<span>{{title}}</span> <span>{{title}}</span>
<span v-show="showDelete" class="history-labels-title-all"> <span v-show="showDelete" class="history-labels-title-all">
<span @click="showConfirm=true">全部删除</span><span>|</span><span @click="toggleDelete">取消</span> <span @click="confirmDelete">全部删除</span><span>|</span><span @click="toggleDelete">取消</span>
</span> </span>
<img @click="toggleDelete" v-show="!showDelete" src="../../images/sousuo/recicle.png" alt="删除"> <img @click="toggleDelete" v-show="!showDelete" src="../../images/sousuo/recicle.png" alt="删除">
</section> </section>
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
v-if="index < 10" v-if="index < 10"
@click="searchAction(item.keyword)" @click="searchAction(item.keyword)"
v-for="(item, index) in allLabels" :key="index" > v-for="(item, index) in allLabels" :key="index" >
<span> <span class="history-labels-item-name">
<span class="history-labels-item-name">{{item.keyword}}</span> <span >{{item.keyword}}</span>
<img @click="deleteLabels(false, index)" v-show="showDelete" <img @click="deleteLabels(false, index)" v-show="showDelete"
src="../../images/sousuo/delete.png" alt="" src="../../images/sousuo/delete.png" alt=""
> >
...@@ -118,7 +118,15 @@ export default { ...@@ -118,7 +118,15 @@ export default {
}, },
getUserInfo: function () { getUserInfo: function () {
rocNative.getUserInfo({'__funcName': '__getUserInfo'}) rocNative.getUserInfo({'__funcName': '__getUserInfo'})
}, },
confirmDelete() {
this.showConfirm = true
this.pageBurialPoin({
...m_search_result_lecturer_order,
labelValue: orderIndex,
createdTime: new Date().getTime(),
})
}
} }
} }
</script> </script>
......
...@@ -118,16 +118,6 @@ export default { ...@@ -118,16 +118,6 @@ export default {
labelValue: item.name, labelValue: item.name,
createdTime: new Date().getTime(), createdTime: new Date().getTime(),
}) })
// this.appBuryingPointEntrust({
// ...teacher,
// labelId: item.doctorId,
// labelValue: item.doctorName
// })
},
// 埋点
appBuryingPointEntrust(val) {
rocNative.appBuryingPointEntrust(val)
}, },
//排序 //排序
...@@ -169,11 +159,6 @@ export default { ...@@ -169,11 +159,6 @@ export default {
} }
}) })
// this.appBuryingPointEntrust({
// ...teacher,
// labelId: _this.dir,
// labelValue: _this.dir === 1 ? '升序' : '降序'
// })
}, },
orderAction(orderIndex) { orderAction(orderIndex) {
this.pageBurialPoin({ this.pageBurialPoin({
......
<template> <template>
<section class="search-container"> <section >
<input type="search" @click="gotoPage"/> <!-- <input type="search" @click="gotoPage"/> -->
<!-- <form @submit.prevent="search"> --> <!-- <form @submit.prevent="search"> -->
<!-- <mt-search @onkeydown="gotoPage"></mt-search> --> <!-- <mt-search @onkeydown="gotoPage"></mt-search> -->
<!-- <button v-show="false" type="submit" /> --> <!-- <button v-show="false" type="submit" /> -->
<!-- </form> --> <!-- </form> -->
<img src="https://test1-file.yunqueyi.com/image/HJ_B001_YD_002_A.jpg">
<img v-lazy="imgUrl">
</section> </section>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
imgUrl: 'https://test1-file.yunqueyi.com/image/HJ_B001_TS_012_A.jpg'
} }
}, },
created() { created() {
......
<template>
<section>
<form @submit.prevent="search">
<mt-search v-model="searchText" ></mt-search>
<button v-show="false" type="submit" />
</form>
<!-- 没有结果页面 -->
<article v-show="!(showTab1 || showTab2 || showTab3 || showTab4)" class="mt-80">
<section></section>
<NoResultPage/>
<SplitLine borderWidth="3px"/>
<CourseAdjust :parmData="adjustList"/>
</article>
<!-- 有结果页面 -->
<article v-show="showTab1 || showTab2 || showTab3 || showTab4" style="position:relative;">
<div class="navbar-container" >
<div class="navbar-container-item" v-show="showTab0" :class="{'bt-2': navIndex === '0'}" @click="navIndex = '0'">综合</div>
<div class="navbar-container-item" v-show="showTab1" :class="{'bt-2': navIndex === '1'}" @click="navIndex = '1'">课程</div>
<div class="navbar-container-item" v-show="showTab2" :class="{'bt-2': navIndex === '2'}" @click="navIndex = '2'">五分钟医学院</div>
<div class="navbar-container-item" v-show="showTab3" :class="{'bt-2': navIndex === '3'}" @click="navIndex = '3'">讲师</div>
<div class="navbar-container-item" v-show="showTab4" :class="{'bt-2': navIndex === '4'}" @click="navIndex = '4'">健康漫画</div>
</div>
<div class="fixed-split-line"></div>
<div class="list-container" v-show="navIndex === '0' && showTab0">
<!-- 课程 -->
<div v-show="showTab1">
<CourseList :parmData="contentAppModels" :groupNum="contentAppModelCount"/>
<ShowAllItem @showAllItem="showAllItem" itemIndex="1" />
<SplitLine borderWidth="3px"/>
</div>
<!-- 五分钟医学 -->
<div v-show="showTab2">
<FiveMinutes :parmData="fiveMinutesMedicalContentList" :groupNum="fiveMinutesMedicalContentListCount"/>
<ShowAllItem @showAllItem="showAllItem" itemIndex="2" />
<SplitLine borderWidth="3px"/>
</div>
<!-- 讲师 -->
<div v-show="showTab3">
<TeacherList :parmData="pCourseDoctorModels" :groupNum="pCourseDoctorModelCount"/>
<ShowAllItem @showAllItem="showAllItem" itemIndex="3" />
<SplitLine borderWidth="3px"/>
</div>
<!-- 健康漫画 -->
<div v-show="showTab4">
<HealthComics :parmData="educationContents" :groupNum="educationContentCount"/>
<ShowAllItem @showAllItem="showAllItem" itemIndex="4" />
</div>
<NoMoreItem/>
</div>
<div class="list-container" v-show="navIndex === '1' && showTab1">
<CourseList :showTitle="showTitle" :showOrder="showOrder" :parmData="contentAppModelsAll" :groupNum="contentAppModelCount"/>
<NoMoreItem/>
</div>
<div class="list-container" v-show="navIndex === '2' && showTab2">
<FiveMinutes :showTitle="showTitle" :showOrder="showOrder" :parmData="fiveMinutesMedicalContentListAll" :groupNum="fiveMinutesMedicalContentListCount"/>
<NoMoreItem/>
</div>
<div class="list-container" v-show="navIndex === '3' && showTab3">
<TeacherList :showTitle="showTitle" :showOrder="showOrder" :parmData="pCourseDoctorModelsAll" :groupNum="pCourseDoctorModelCount"/>
<NoMoreItem/>
</div>
<div class="list-container" v-show="navIndex === '4' && showTab4">
<HealthComics :showTitle="showTitle" :showOrder="showOrder" :parmData="educationContentsAll" :groupNum="educationContentCount"/>
<NoMoreItem/>
</div>
</article>
<Loading v-show="showLoading"/>
</section>
</template>
<script>
import SplitLine from '../components/business/split-line';
import NoMoreItem from '../components/business/no-more-item';
import ShowAllItem from '../components/business/show-all-item';
import GroupTitle from '../components/business/group-title';
import CourseList from '../components/business/course-list';
import FiveMinutes from '../components/business/five-minutes';
import TeacherList from '@/components/business/teacher-list';
import HealthComics from '@/components/business/health-comics';
import CourseAdjust from '../components/business/course-adjust';
import NoResultPage from '@/components/business/no-result-page'
import Loading from '@/components/common/loading-new'
import ConfirmTip from '@/components/common/confirm-tip'
export default {
data() {
return {
// token: '',
navIndex: '0',
showLoading: false,
hasResult: true,
searchText: '',
// selected: '0',
contentAppModelCount: '0',
contentAppModels: [],
contentAppModelsAll: [],
educationContentCount: '0',
educationContents: [],
educationContentsAll: [],
fiveMinutesMedicalContentListCount: '0',
fiveMinutesMedicalContentList: [],
fiveMinutesMedicalContentListAll: [],
pCourseDoctorModelCount: '0',
pCourseDoctorModels: [],
pCourseDoctorModelsAll: [],
showTab0: true,
showTab1: true,
showTab2: true,
showTab3: true,
showTab4: true,
showTitle: false,
showOrder: true,
adjustList: []
}
},
components: {
SplitLine,
NoMoreItem,
ShowAllItem,
GroupTitle,
CourseList,
CourseAdjust,
FiveMinutes,
TeacherList,
HealthComics,
NoResultPage,
Loading,
ConfirmTip
},
watch: {
// selected(val) {
// this.showIndex(val)
// // this.searchAll(this.searchText, '1', 'contentAppModels', 'contentAppModelsAll')
// }
},
created(){
this.searchText = this.$route.query.searchText || ''
console.log(this.searchText)
let _this = this;
window.__getUserInfo = function(params){
_this.token = params.userToken
// _this.SET_USER_INFO(params)
_this.search()
_this.getAdjustData()
}
if(window.__isWeb) {
_this.getAdjustData()
_this.search()
}
window.__refresh = function(){
_this.getUserInfo()
}
},
mounted(){
// this.search()
// this.searchAll(this.searchText, '1', 'contentAppModels', 'contentAppModelsAll')
},
methods: {
showAllItem(index) {
console.log(typeof index)
this.navIndex = index
},
// 搜索结果
search() {
this.showLoading = true
let _this = this,
para = {
searchCategory: '1,2,3,4',
searchValue: _this.searchText,
keywordColor: 'rgba(244,122,72,1)',
sortItem: 1,
pageNo: 1,
pageSize: 100,
token: _this.token,
setEntry: 'headers',
}
let url = 'contents/searchKeyword/searchContent'
this.showTab0 = true
this.showTab1 = true
this.showTab2 = true
this.showTab3 = true
this.showTab4 = true
this.GET(url, para).then(res => {
this.showLoading = false
_this.searchText = ''
_this.navIndex = '0'
if (res.code == '000000') {
console.log(res)
// 课程
_this.contentAppModels = this.spliceCertenNumData(res.data.contentAppModels, 4)
_this.contentAppModelsAll = res.data.contentAppModels
_this.contentAppModelCount = res.data.contentAppModelCount + ''
if(res.data.contentAppModelCount === 0){
this.showTab1 = false
}
// 五分钟医学
_this.fiveMinutesMedicalContentList = this.spliceCertenNumData(res.data.fiveMinutesMedicalContentList, 4)
_this.fiveMinutesMedicalContentListAll = this.handelFive(res.data.fiveMinutesMedicalContentList || [])
_this.fiveMinutesMedicalContentListCount = res.data.fiveMinutesMedicalContentListCount + ''
if(res.data.fiveMinutesMedicalContentListCount === 0){
this.showTab2 = false
}
// 讲师
_this.pCourseDoctorModels = this.spliceCertenNumData(res.data.pCourseDoctorModels, 4)
_this.pCourseDoctorModelsAll = res.data.pCourseDoctorModels
_this.pCourseDoctorModelCount = res.data.pCourseDoctorModelCount + ''
if(res.data.pCourseDoctorModelCount === 0){
this.showTab3 = false
}
// 健康漫画
_this.educationContents = this.spliceCertenNumData(res.data.educationContents, 4)
_this.educationContentsAll = res.data.educationContents
_this.educationContentCount = res.data.educationContentCount + ''
if(res.data.educationContentCount === 0){
this.showTab4 = false
}
}
})
},
searchAll(searchText, searchCategory, receive, receiveList) {
let _this = this,
para = {
searchCategory: searchCategory,
searchValue: searchText,
sortItem: 1,
pageNo: 1,
pageSize: 100,
token: _this.token,
setEntry: 'headers',
}
let url = 'contents/searchKeyword/searchContent'
this.GET(url, para).then(res => {
if (res.code == '000000') {
// 课程
_this[receiveList] = res.data[receive]
}
})
},
showIndex(index) {
console.log(index)
},
spliceCertenNumData(oriData, num) {
let result = []
if (oriData.length === 0 || oriData.length < num) {
return oriData
} else {
for ( let i = 0; i < num; i ++){
result.push(oriData[i])
}
return result
}
console.log(result)
},
handelFive(d) {
for (let i = 0; i < d.length; i++) {
d[i].play = '0';
}
return d;
},
//为您推荐
getAdjustData(){
this.adjustList = []
let _this = this,
parm = {
pageNo: 1,
pageSize: 10,
token: _this.token,
setEntry: 'headers',
}
_this.GET('contents/courses/recommendCourseList',parm).then(function(res){
if(res.code === '000000'){
_this.adjustList = res.data || [];
// _this.adjustPageNo = 1;
// _this.SET_DATA(_this.adjustList)
// if(_this.adjustList.length>0){
// _this.userToken = userToken
// }
}
})
},
getUserInfo: function () {
rocNative.getUserInfo({'__funcName': '__getUserInfo'})
}
},
}
</script>
<style >
.mint-search {
position: fixed;
top: 0px;
z-index: 3 !important;
height: 66px;
width: 100%;
border-bottom: 1px solid #E7E7E7 !important;
}
.mint-searchbar {
position: relative;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
background: #fff;
box-sizing: border-box;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
padding: 30px 10px 8px;
z-index: 3;
}
.mint-searchbar-cancel {
margin-left: 10px;
font-size: 14px ;
color: #999;
text-decoration: none;
}
.mint-searchbar-inner {
background: #F5F6F6;
/* border-radius: 15px; */
}
.mint-searchbar-core {
background: #F5F6F6;
}
</style>
<style lang="scss" scoped>
@import '../style/mixin.scss';
.navbar-container {
width: 100%;
height: px2rem(57px);
display: flex;
position: fixed;
top: px2rem(60px);
left: 0;
z-index: 2;
flex-direction: row;
// border-bottom: 1px solid #E7E7E7;
background: #fff;
// margin-top: 10px;
margin-bottom: 6px;
&-item {
display: inline-flex;
margin: px2rem(25px) px2rem(15px) px2rem(-1px);
padding-bottom: px2rem(11px);
font-size: px2rem(14px);
color: #666;
}
.bt-2 {
color: #449284;
border-bottom: px2rem(2px) solid #449284;
}
}
.list-container {
margin: 0;
padding-top: px2rem(120px);
}
.fixed-split-line {
position: fixed;
width: 100%;
top: 117px;
z-index: 1;
border-bottom: 1px solid #e7e7e7;
}
.mt-80 {
padding-top: px2rem(80px);
}
.mt-100 {
margin-top: px2rem(112px);
}
</style>
...@@ -70,6 +70,9 @@ ...@@ -70,6 +70,9 @@
</template> </template>
<script> <script>
import {
m_search_result_tab_switch
} from '@/utils/buryingPoint'
import SplitLine from '../components/business/split-line'; import SplitLine from '../components/business/split-line';
import NoMoreItem from '../components/business/no-more-item'; import NoMoreItem from '../components/business/no-more-item';
import ShowAllItem from '../components/business/show-all-item'; import ShowAllItem from '../components/business/show-all-item';
...@@ -161,6 +164,12 @@ export default { ...@@ -161,6 +164,12 @@ export default {
showAllItem(index) { showAllItem(index) {
console.log(typeof index) console.log(typeof index)
this.navIndex = index this.navIndex = index
this.pageBurialPoin({
...m_search_result_tab_switch,
labelValue: index,
createdTime: new Date().getTime(),
})
}, },
// 搜索结果 // 搜索结果
search() { search() {
......
<template>
<div>
<!-- <SearchHeader @search="search" :searchText="searchText"/> -->
<form @submit.prevent="search">
<mt-search v-model="searchText" ></mt-search>
<button v-show="false" type="submit" />
</form>
<!-- <SplitLine /> -->
<div class="mt-100"></div>
<HistoryLabels/>
<HotLabels/>
</div>
</template>
<script>
import {mapState, mapMutations} from 'vuex'
import SearchHeader from '../components/business/search-header';
import SplitLine from '../components/business/split-line';
import HistoryLabels from '../components/business/history-labels';
import HotLabels from '../components/business/hot-labels';
export default {
data() {
return {
searchText: '',
token: ''
}
},
components: {
SearchHeader,
SplitLine,
HistoryLabels,
HotLabels
},
created(){
},
computed:{
...mapState([
'sousuo'
])
},
mounted(){
// let _self = this;
// window.__getUserInfo = function(params){
// _self.token = params.userToken
// // _self.SET_USER_INFO(params)
// _self.getData()
// }
// window.__refresh = function(){
// _self.getUserInfo()
// }
// window.__getStatusBarHeight = function(params){
// _self.SET_NAVBAR_HEIGHT(params)
// }
// window.__getStatusBarHeight = function(parm){
// //lert(parm.statusBarHeight)
// if(window.__isAndroid){
// _this.popHeight = parseInt(parm.statusBarHeight)/2.5
// }else{
// _this.popHeight = parm.statusBarHeight
// }
// _this.ptop = _this.popHeight+'px';
// _this.menuptop = _this.popHeight+'px'
// // alert(parm.statusBarHeight);
// }
// if(window.__isWeb) {
// _self.getData()
// }
// _self.getUserInfo()
// _self.getStatusBarHeight()
},
methods: {
...mapMutations([
'SET_USER_INFO', 'SET_NAVBAR_HEIGHT'
]),
// 跳转到结果页面,并
search() {
if(!this.searchText) return;
this.$router.push({
path: '/result',
query: {
searchText: this.searchText
}
})
},
// 获取历史搜索
getData() {
let _this = this,
para = {
type: 1,
token: _this.token,
setEntry: 'headers'
}
let url = '/contents/searchKeyword/listKeywords'
this.GET(url, para).then(res => {
if (res.code == '000000') {
if (res.data && res.data.length) {
let index = Math.floor(Math.random() * res.data.length)
this.searchText = res.data[index].keyword
}
}
})
},
getUserInfo: function () {
rocNative.getUserInfo({'__funcName': '__getUserInfo'})
},
getStatusBarHeight: function () {
rocNative.getStatusBarHeight({'__funcName': '__getStatusBarHeight'})
}
},
}
</script>
<style >
.mint-search {
position: fixed;
top: 0px;
z-index: 2;
height: 66px;
width: 100%;
border-bottom: 1px solid #E7E7E7 !important;
}
.mint-searchbar {
position: relative;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
background: #fff;
box-sizing: border-box;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
padding: 30px 10px 8px;
z-index: 1;
}
.mint-searchbar-cancel {
margin-left: 10px;
font-size: 14px ;
color: #999;
text-decoration: none;
}
.mint-searchbar-inner {
background: #F5F6F6;
}
.mint-searchbar-core {
background: #F5F6F6;
}
</style>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
@import '../style/mixin.scss';
@import '../style/global.scss';
.mt-100 {
padding-top: px2rem(63px) !important;
}
</style>
...@@ -16,6 +16,13 @@ ...@@ -16,6 +16,13 @@
<script> <script>
import {mapState, mapMutations} from 'vuex' import {mapState, mapMutations} from 'vuex'
import { sortParmData } from '@/utils/index'
import {
m_search_result_five_minutes_detail,
m_search_result_five_minutes_order,
m_search_result_five_minutes_top,
} from '@/utils/buryingPoint'
import SearchHeader from '../components/business/search-header'; import SearchHeader from '../components/business/search-header';
import SplitLine from '../components/business/split-line'; import SplitLine from '../components/business/split-line';
import HistoryLabels from '../components/business/history-labels'; import HistoryLabels from '../components/business/history-labels';
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册