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

sort barheight

上级 51bc8032
...@@ -79,9 +79,9 @@ export default { ...@@ -79,9 +79,9 @@ export default {
cParmData() { cParmData() {
let cCourseList = [] let cCourseList = []
if (this.list && this.list.length) { if (this.list && this.list.length) {
cCourseList = this.list cCourseList = this.list.slice()
} else { } else {
cCourseList = this.parmData cCourseList = this.parmData.slice()
} }
return cCourseList.map(function(item){ return cCourseList.map(function(item){
let cItem = Object.assign({}, item) let cItem = Object.assign({}, item)
...@@ -95,12 +95,11 @@ export default { ...@@ -95,12 +95,11 @@ export default {
cSearchText: 'cSearchText' cSearchText: 'cSearchText'
}) })
}, },
components: { components: {
GroupTitle GroupTitle
}, },
mounted() { mounted() {
// this.getData()
}, },
methods: { methods: {
//跳转 //跳转
...@@ -210,29 +209,14 @@ export default { ...@@ -210,29 +209,14 @@ export default {
} }
} }
}, },
getData() {
//alert("最新课程");
let _this = this,
parm = {
pageNo: _this.pageNo,
pageSize: _this.pageSize,
token: _this.userToken,
setEntry: 'headers'
}
_this.GET('/contents/HomeNewCourse/NewCourseInformation', parm).then(function (res) {
if (res.code === '000000') {
_this.parmData = res.data.contentAppModels || [];
}
})
},
orderAction(orderIndex) { orderAction(orderIndex) {
this.pageBurialPoin({ this.pageBurialPoin({
...m_search_result_course_order, ...m_search_result_course_order,
labelValue: orderIndex, labelValue: orderIndex,
createdTime: new Date().getTime(), createdTime: new Date().getTime(),
}) })
this.searchForOrder('1', this.cSearchText, orderIndex, this.groupNum, this.parmData).then( param => { let ll = this.searchForOrder('1', this.cSearchText, orderIndex, this.groupNum, this.parmData).then( param => {
this.list = param this.list = param
}) })
} }
......
const getters = { const getters = {
userInfo: state => state.sousuo.userInfo, userInfo: state => state.sousuo.userInfo,
navBarHeight: state => state.sousuo.navBarHeight, statusBarHeight: state => state.sousuo.statusBarHeight,
cSearchText: state => state.sousuo.cSearchText cSearchText: state => state.sousuo.cSearchText
} }
export default getters export default getters
const sousuo = { const sousuo = {
state: { state: {
userInfo: {}, userInfo: {},
navBarHeight: {}, statusBarHeight: {},
cSearchText: '' cSearchText: ''
}, },
mutations: { mutations: {
SET_USER_INFO: (state, userInfo) => { SET_USER_INFO: (state, userInfo) => {
console.log(state, userInfo);
state.userInfo = userInfo state.userInfo = userInfo
}, },
SET_NAVBAR_HEIGHT: (state, navBarHeight) => { SET_STATUS_BAR_HEIGHT: (state, statusBarHeight) => {
console.log(state, navBarHeight); state.statusBarHeight = statusBarHeight
state.navBarHeight = navBarHeight
}, },
SET_C_SEARCH_TEXT: (state, cSearchText) => { SET_C_SEARCH_TEXT: (state, cSearchText) => {
console.log('SET_C_SEARCH_TEXT cSearchText', cSearchText)
state.cSearchText = cSearchText state.cSearchText = cSearchText
} }
}, },
...@@ -22,8 +19,8 @@ const sousuo = { ...@@ -22,8 +19,8 @@ const sousuo = {
setUserInfo({ commit }, userInfo) { setUserInfo({ commit }, userInfo) {
commit('SET_USER_INFO', userInfo) commit('SET_USER_INFO', userInfo)
}, },
setNavBarHeight({ commit }, navBarHeight) { setStatusBarHeight({ commit }, statusBarHeight) {
commit('SET_NAVBAR_HEIGHT', navBarHeight) commit('SET_STATUS_BAR_HEIGHT', statusBarHeight)
}, },
setCSearchText({ commit }, cSearchText) { setCSearchText({ commit }, cSearchText) {
console.log('setCSearchText cSearchText', cSearchText) console.log('setCSearchText cSearchText', cSearchText)
......
...@@ -115,17 +115,17 @@ module.exports = { ...@@ -115,17 +115,17 @@ module.exports = {
// _this.searchText = '' // _this.searchText = ''
if (res.code == '000000') { if (res.code == '000000') {
// 课程 // 课程
if(searchCategory.indexOf('1') > 0) { if(searchCategory.indexOf('1') >= 0) {
sourceData = (res.data && res.data.contentAppModels) || [] sourceData = (res.data && res.data.contentAppModels) || []
} }
if(searchCategory.indexOf('2') > 0) { if(searchCategory.indexOf('2') >= 0) {
// sourceData = [] // sourceData = []
sourceData = this.handelFive(res.data.fiveMinutesMedicalContentList || []) sourceData = this.handelFive(res.data.fiveMinutesMedicalContentList || [])
} }
if(searchCategory.indexOf('3') > 0) { if(searchCategory.indexOf('3') >= 0) {
sourceData = (res.data && res.data.pCourseDoctorModels) || [] sourceData = (res.data && res.data.pCourseDoctorModels) || []
} }
if(searchCategory.indexOf('4') > 0) { if(searchCategory.indexOf('4') >= 0) {
sourceData = res.data.educationContents sourceData = res.data.educationContents
} }
} }
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
<button v-show="false" type="submit" /> <button v-show="false" type="submit" />
</form> --> </form> -->
<div class="top-bar-height"></div>
<form @submit.prevent="search"> <form @submit.prevent="search">
<!-- <mt-search v-model="searchText" ></mt-search> --> <!-- <mt-search v-model="searchText" ></mt-search> -->
<div class="search-container"> <div class="search-container">
...@@ -378,7 +379,7 @@ export default { ...@@ -378,7 +379,7 @@ export default {
height: px2rem(57px); height: px2rem(57px);
display: flex; display: flex;
position: fixed; position: fixed;
top: px2rem(60px); top: px2rem(70px);
left: 0; left: 0;
z-index: 2; z-index: 2;
flex-direction: row; flex-direction: row;
...@@ -400,17 +401,17 @@ export default { ...@@ -400,17 +401,17 @@ export default {
} }
.list-container { .list-container {
margin: 0; margin: 0;
padding-top: px2rem(120px); padding-top: px2rem(130px);
} }
.fixed-split-line { .fixed-split-line {
position: fixed; position: fixed;
width: 100%; width: 100%;
top: 117px; top: px2rem(127px);
z-index: 1; z-index: 1;
border-bottom: 1px solid #e7e7e7; border-bottom: 1px solid #e7e7e7;
} }
.mt-80 { .mt-80 {
padding-top: px2rem(80px); padding-top: px2rem(90px);
} }
.mt-100 { .mt-100 {
margin-top: px2rem(112px); margin-top: px2rem(112px);
...@@ -424,7 +425,7 @@ export default { ...@@ -424,7 +425,7 @@ export default {
.search-container { .search-container {
display: flex; display: flex;
position: fixed; position: fixed;
top: 0; top: px2rem(10px);
left: 0; left: 0;
z-index: 3; z-index: 3;
width: 100%; width: 100%;
...@@ -486,6 +487,15 @@ export default { ...@@ -486,6 +487,15 @@ export default {
color: #999; color: #999;
} }
} }
.top-bar-height {
position: fixed;
height: px2rem(10px);
width: 100%;
top: 0;
left: 0;
z-index: 2;
background: #fff;
}
input::-webkit-search-decoration, input::-webkit-search-decoration,
input::-webkit-search-cancel-button { input::-webkit-search-cancel-button {
display: none; display: none;
......
<template> <template>
<div> <div >
<div class="top-bar-height"></div>
<!-- <SearchHeader @search="search" :searchText="searchText"/> --> <!-- <SearchHeader @search="search" :searchText="searchText"/> -->
<form @submit.prevent="search"> <form @submit.prevent="search">
<!-- <mt-search v-model="searchText" ></mt-search> --> <!-- <mt-search v-model="searchText" ></mt-search> -->
...@@ -30,6 +30,7 @@ import SplitLine from '../components/business/split-line'; ...@@ -30,6 +30,7 @@ import SplitLine from '../components/business/split-line';
import HistoryLabels from '../components/business/history-labels'; import HistoryLabels from '../components/business/history-labels';
import HotLabels from '../components/business/hot-labels'; import HotLabels from '../components/business/hot-labels';
import FirstTimeSS from '../components/common/first-time-ss'; import FirstTimeSS from '../components/common/first-time-ss';
import { mapGetters, mapActions } from 'vuex';
export default { export default {
data() { data() {
...@@ -51,8 +52,15 @@ export default { ...@@ -51,8 +52,15 @@ export default {
created(){ created(){
}, },
computed:{ computed: {
...mapGetters({
statusBarHeight: 'statusBarHeight'
})
},
watch: {
statusBarHeight(val) {
alert('val: ' + JSON.stringify(val))
}
}, },
created() { created() {
let _self = this; let _self = this;
...@@ -63,7 +71,8 @@ export default { ...@@ -63,7 +71,8 @@ export default {
_self.getData() _self.getData()
} }
window.__getStatusBarHeight = function (param) { window.__getStatusBarHeight = function (param) {
alert('__getStatusBarHeight: ' + JSON.stringify(param)) // alert('__getStatusBarHeight: ' + JSON.stringify(param))
_self.setStatusBarHeight(param)
// if (window.__isAndroid) { // if (window.__isAndroid) {
// _this.popHeight = parseInt(parm.statusBarHeight) / 2 // _this.popHeight = parseInt(parm.statusBarHeight) / 2
// } else { // } else {
...@@ -104,9 +113,9 @@ export default { ...@@ -104,9 +113,9 @@ export default {
// _self.getStatusBarHeight() // _self.getStatusBarHeight()
}, },
methods: { methods: {
// ...mapMutations([ ...mapActions({
// 'SET_USER_INFO', 'SET_NAVBAR_HEIGHT' setStatusBarHeight: 'setStatusBarHeight'
// ]), }),
// 跳转到结果页面,并 // 跳转到结果页面,并
search() { search() {
// if(!this.searchText) return; // if(!this.searchText) return;
...@@ -258,7 +267,7 @@ export default { ...@@ -258,7 +267,7 @@ export default {
@import '../style/mixin.scss'; @import '../style/mixin.scss';
@import '../style/global.scss'; @import '../style/global.scss';
.mt-80 { .mt-80 {
padding-top: px2rem(60px); padding-top: px2rem(70px);
} }
.mt-100 { .mt-100 {
padding-top: px2rem(63px) !important; padding-top: px2rem(63px) !important;
...@@ -272,7 +281,7 @@ export default { ...@@ -272,7 +281,7 @@ export default {
.search-container { .search-container {
display: flex; display: flex;
position: fixed; position: fixed;
top: 0; top: px2rem(10px);
left: 0; left: 0;
z-index: 3; z-index: 3;
width: 100%; width: 100%;
...@@ -334,6 +343,15 @@ export default { ...@@ -334,6 +343,15 @@ export default {
color: #999; color: #999;
} }
} }
.top-bar-height {
position: fixed;
height: px2rem(10px);
width: 100%;
top: 0;
left: 0;
z-index: 2;
background: #fff;
}
input::-webkit-search-decoration, input::-webkit-search-decoration,
input::-webkit-search-cancel-button { input::-webkit-search-cancel-button {
display: none; display: none;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册