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

getStatusBarHeight

上级 148811af
......@@ -30,6 +30,8 @@
</template>
<script>
import { mapGetters } from 'vuex'
import { sortParmData } from '@/utils/index'
import {
m_search_result_course_detail1,
......@@ -75,7 +77,13 @@ export default {
},
computed: {
cParmData() {
return this.parmData.map(function(item){
let cCourseList = []
if (this.list && this.list.length) {
cCourseList = this.list
} else {
cCourseList = this.parmData
}
return cCourseList.map(function(item){
let cItem = Object.assign({}, item)
if(cItem.highLightField) {
cItem.highLightName = cItem.highLightName + ' (' + mapDesc[cItem.highLightField] + ')'
......@@ -83,10 +91,11 @@ export default {
return cItem
})
},
// groupNum() {
// return this.parmData.length + ''
// }
...mapGetters({
cSearchText: 'cSearchText'
})
},
components: {
GroupTitle
},
......@@ -223,11 +232,9 @@ export default {
labelValue: orderIndex,
createdTime: new Date().getTime(),
})
if(orderIndex == 1) {
this.parmData = sortParmData(this.parmData, 'joinNum', -1)
} else {
this.parmData = sortParmData(this.parmData, 'modifyTime', -1)
}
this.searchForOrder('1', this.cSearchText, orderIndex, this.groupNum, this.parmData).then( param => {
this.list = param
})
}
}
}
......
......@@ -2,10 +2,11 @@
<section>
<GroupTitle groupTitle="5分钟医学院" :groupNum="groupNum" :showTitle="showTitle" :showOrder="showOrder" @order="orderAction"/>
<div class="hot-teacher">
<div :class="index>1 && (index+1 == parmData.length)?'teacher-item item-end' : 'teacher-item'" :key="index"
v-for="(item,index) in parmData" @click="goToPage(item)">
<div :class="index>1 && (index+1 == cParamData.length)?'teacher-item item-end' : 'teacher-item'" :key="index"
v-for="(item,index) in cParamData" @click="goToPage(item)">
<div class="teacher-itemimg">
<img :src="item.appImageUrl"/>
<img v-show="index < 6" :src="item.appImageUrl"/>
<img v-show="index >= 6" v-lazy="item.appImageUrl"/>
</div>
<div class="five-text">
<div class="teacher-itemname fs14" v-html="item.highLightTitle">{{item.title}}</div>
......@@ -33,7 +34,8 @@
</template>
<script>
import { mapState } from 'vuex'
import { mapGetters } from 'vuex'
import { sortParmData } from '@/utils/index'
import {
m_search_result_five_minutes_detail,
......@@ -42,13 +44,12 @@ import {
} from '@/utils/buryingPoint'
import { pageJumpUrl } from '@/utils/index'
import GroupTitle from '@/components/business/group-title';
import { mapGetters } from 'vuex';
export default {
name: 'YqyFiveMinutes',
data() {
return {
// list: [],
list: [],
isPlay: false,
id: ''
}
......@@ -82,9 +83,20 @@ export default {
...mapGetters({
cSearchText: 'cSearchText'
}),
// compParmData() {
// return this.handelFive(this.parmData)
// }
cParamData() {
if (this.list && this.list.length) {
return this.list
} else {
return this.parmData
}
}
},
watch: {
groupNum(val) {
if (val > 100) {
this.searchForOrder
}
}
},
created() {
let _this = this;
......@@ -231,7 +243,9 @@ export default {
labelValue: orderIndex,
createdTime: new Date().getTime(),
})
this.searchForOrder('2', this.cSearchText, orderIndex, this.groupNum, this.parmData)
this.searchForOrder('2', this.cSearchText, orderIndex, this.groupNum, this.parmData).then( param => {
this.list = param
})
}
},
......
......@@ -5,7 +5,7 @@
<div class="teach-opt">
<div class="teach-list">
<div :class="index%2==1 ? 'list-item mr0':'list-item'"
v-for="(item, index) in parmData" :key="index"
v-for="(item, index) in cParamData" :key="index"
@click="goToPage(item)">
<div class="tea-img" :style="'background:'+ item.bgColor">
<img :src="item.imageUrl">
......@@ -26,6 +26,8 @@
</template>
<script>
import { mapGetters } from 'vuex'
import { sortParmData } from '@/utils/index'
import {
m_search_result_health_cartoon_detail,
......@@ -34,6 +36,19 @@ import {
} from '@/utils/buryingPoint'
import GroupTitle from '@/components/business/group-title';
export default {
data() {
return {
topTitle: '讲师集',
isScroll: false,
token: '',
list: [],
isShowCount: true,
followCount: 0,
studyCount: 0,
col: 1, //0综合,1人气,2资源数,3姓名首字母
dir: 2, //1:正序 2:逆序
}
},
components: {
GroupTitle
},
......@@ -56,21 +71,15 @@ export default {
}
},
computed: {
// groupNum() {
// return this.parmData.length + ''
// }
},
data() {
return {
topTitle: '讲师集',
isScroll: false,
token: '',
list: [],
isShowCount: true,
followCount: 0,
studyCount: 0,
col: 1, //0综合,1人气,2资源数,3姓名首字母
dir: 2, //1:正序 2:逆序
...mapGetters({
cSearchText: 'cSearchText'
}),
cParamData() {
if (this.list && this.list.length) {
return this.list
} else {
return this.parmData
}
}
},
mounted() {
......@@ -151,11 +160,9 @@ export default {
labelValue: orderIndex,
createdTime: new Date().getTime(),
})
if(orderIndex == 1) {
this.parmData = sortParmData(this.parmData, 'joinNum', -1)
} else {
this.parmData = sortParmData(this.parmData, 'modifyTime', -1)
}
this.searchForOrder('4', this.cSearchText, orderIndex, this.groupNum, this.parmData).then( param => {
this.list = param
})
}
}
......
......@@ -173,7 +173,7 @@ export default {
.history-labels {
width: 100%;
padding: 0 px2rem(15px) 0;
margin-bottom: px2rem(6px);
margin-bottom: px2rem(20px);
background-color: #fff;
&-title {
display: inline-flex;
......
......@@ -4,8 +4,8 @@
<div class="font-style">
<div class="teach-opt">
<div class="teach-list">
<div :class="index%2==1?'list-item mr0':'list-item'"
v-for="(item, index) in parmData" :key="index"
<div :class="index % 2 == 1 ? 'list-item mr0' : 'list-item'"
v-for="(item, index) in cParamData" :key="index"
@click="goToDetail(item)">
<div class="tea-img" :style="'background:'+ item.bgColor">
<img :src="item.appImageUrl">
......@@ -26,6 +26,8 @@
</template>
<script>
import { mapGetters } from 'vuex'
import { sortParmData } from '@/utils/index'
import {
m_search_result_lecturer_detail,
......@@ -34,9 +36,6 @@ import {
} from '@/utils/buryingPoint'
import GroupTitle from '@/components/business/group-title';
export default {
components: {
GroupTitle
},
data() {
return {
topTitle: '讲师集',
......@@ -50,6 +49,9 @@ export default {
dir: 2, //1:正序 2:逆序
}
},
components: {
GroupTitle
},
props: {
parmData: {
type: Array,
......@@ -85,9 +87,16 @@ export default {
},
computed: {
// groupNum() {
// return this.parmData.length + ''
// }
...mapGetters({
cSearchText: 'cSearchText'
}),
cParamData() {
if (this.list && this.list.length) {
return this.list
} else {
return this.parmData
}
}
},
methods: {
handleScroll: function () {
......@@ -166,11 +175,9 @@ export default {
labelValue: orderIndex,
createdTime: new Date().getTime(),
})
if(orderIndex == 1) {
this.parmData = sortParmData(this.parmData, 'joinNum', -1)
} else {
this.parmData = sortParmData(this.parmData, 'modifyTime', -1)
}
this.searchForOrder('3', this.cSearchText, orderIndex, this.groupNum, this.parmData).then( param => {
this.list = param
})
}
}
......
......@@ -87,8 +87,16 @@ module.exports = {
}
return ''
},
//处理五分钟数据 初始化播放状态
handelFive(d) {
for (let i = 0; i < d.length; i++) {
d[i].play = '0';
}
return d;
},
searchForOrder(searchCategory = '1', searchValue = '', sortItem = 1, pageSize = 10, sourceData = []) {
// 根据条件排序
async searchForOrder(searchCategory = '1', searchValue = '', sortItem = 1, pageSize = 10, sourceData = []) {
let str2 = (searchValue || '').replace(/[\-\_\,\!\|\~\`\(\)\#\$\%\^\&\*\{\}\:\;\"\L\<\>\?]/g, '');// 去掉特殊字符
let _this = this,
para = {
......@@ -103,24 +111,27 @@ module.exports = {
}
let url = 'contents/searchKeyword/searchContent'
this.GET(url, para).then(res => {
let csourceData = await this.GET(url, para).then(res => {
// _this.searchText = ''
if (res.code == '000000') {
// 课程
if(searchCategory.indexOf('1') > 0) {
sourceData = res.data.contentAppModels
sourceData = (res.data && res.data.contentAppModels) || []
}
if(searchCategory.indexOf('2') > 0) {
// sourceData = []
sourceData = this.handelFive(res.data.fiveMinutesMedicalContentList || [])
}
if(searchCategory.indexOf('3') > 0) {
sourceData = res.data.pCourseDoctorModels
sourceData = (res.data && res.data.pCourseDoctorModels) || []
}
if(searchCategory.indexOf('4') > 0) {
sourceData = res.data.educationContents
}
}
return sourceData || []
})
return csourceData
},
setEventByModuleCode(itemData){
......
......@@ -77,7 +77,6 @@
import { Swipe, SwipeItem ,Header} from 'mint-ui';
// import { setEventByModuleCode } from '@/utils/index'
// import pullRefresh from '../components/common/pullrefresh'
import {mapState, mapMutations} from 'vuex'
import BackTop from '../components/common/backTop';
import YqyTeacherList from '../components/business-new/yqy-teacher-list';
import YqyTopEvaluat from '../components/business-new/yqy-home-learn-evaluation';
......@@ -310,9 +309,6 @@ export default {
},
methods:{
...mapMutations([
'SET_DATA'
]),
goToPage(){
this.$router.push({
path: '/search'
......
......@@ -15,7 +15,7 @@
</div>
<button v-show="false" type="submit" />
</form>
<div class="mt-80"></div>
<!-- <SplitLine /> -->
<!-- <div class="mt-100"></div> -->
<HistoryLabels/>
......@@ -25,8 +25,6 @@
</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';
......@@ -54,9 +52,7 @@ export default {
},
computed:{
...mapState([
'sousuo'
])
},
created() {
let _self = this;
......@@ -66,18 +62,17 @@ export default {
// _self.SET_USER_INFO(params)
_self.getData()
}
// window.__isFirstTime = function(param) {
// alert(JSON.stringify(param))
// if(param.isFirst === 'true') {
// _self.needShowFirstTime = true
// rocNative.setFirstTime({
// projectName: 'YQY_PROJECT_SOUSUO_1',
// isFirst: 'faalse'
// })
// } else {
// _self.needShowFirstTime = false
// }
// }
window.__getStatusBarHeight = function (param) {
alert('__getStatusBarHeight: ' + JSON.stringify(param))
// if (window.__isAndroid) {
// _this.popHeight = parseInt(parm.statusBarHeight) / 2
// } else {
// _this.popHeight = parm.statusBarHeight
// }
// _this.ptop = _this.popHeight + 'px';
// _this.menuptop = _this.popHeight + 36 + 'px'
}
this.getStatusBarHeight()
},
mounted(){
// window.__refresh = function(){
......@@ -109,9 +104,9 @@ export default {
// _self.getStatusBarHeight()
},
methods: {
...mapMutations([
'SET_USER_INFO', 'SET_NAVBAR_HEIGHT'
]),
// ...mapMutations([
// 'SET_USER_INFO', 'SET_NAVBAR_HEIGHT'
// ]),
// 跳转到结果页面,并
search() {
// if(!this.searchText) return;
......@@ -262,6 +257,9 @@ export default {
<style lang="scss" scoped>
@import '../style/mixin.scss';
@import '../style/global.scss';
.mt-80 {
padding-top: px2rem(60px);
}
.mt-100 {
padding-top: px2rem(63px) !important;
}
......@@ -273,14 +271,14 @@ export default {
}
.search-container {
display: flex;
position: relative;
position: fixed;
top: 0;
left: 0;
z-index: 3;
width: 100%;
flex-direction: row;
text-align: center;
padding: px2rem(10px) 0;
padding: px2rem(10px) 0 px2rem(4px);
background: #fff;
border-bottom: 1px solid #E7E7E7;
&-img {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册