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

sort barheight

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