Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
提交
议题看板
打开侧边栏
jingqi.liu
pica.cloud.web-education-admin
提交
58572dd0
提交
58572dd0
编写于
12月 25, 2018
作者:
杨广俊
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
sort barheight
上级
51bc8032
变更
6
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
57 行增加
和
48 行删除
+57
-48
course-list.vue
src/components/business/course-list.vue
+4
-20
getters.js
src/store/getters.js
+1
-1
sousuo.js
src/store/modules/sousuo.js
+5
-8
mixins.js
src/utils/mixins.js
+4
-4
result.vue
src/views/result.vue
+15
-5
search-index.vue
src/views/search-index.vue
+28
-10
未找到文件。
src/components/business/course-list.vue
浏览文件 @
58572dd0
...
...
@@ -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
})
}
...
...
src/store/getters.js
浏览文件 @
58572dd0
const
getters
=
{
userInfo
:
state
=>
state
.
sousuo
.
userInfo
,
navBarHeight
:
state
=>
state
.
sousuo
.
nav
BarHeight
,
statusBarHeight
:
state
=>
state
.
sousuo
.
status
BarHeight
,
cSearchText
:
state
=>
state
.
sousuo
.
cSearchText
}
export
default
getters
src/store/modules/sousuo.js
浏览文件 @
58572dd0
const
sousuo
=
{
state
:
{
userInfo
:
{},
nav
BarHeight
:
{},
status
BarHeight
:
{},
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
)
},
set
NavBarHeight
({
commit
},
nav
BarHeight
)
{
commit
(
'SET_
NAVBAR_HEIGHT'
,
nav
BarHeight
)
set
StatusBarHeight
({
commit
},
status
BarHeight
)
{
commit
(
'SET_
STATUS_BAR_HEIGHT'
,
status
BarHeight
)
},
setCSearchText
({
commit
},
cSearchText
)
{
console
.
log
(
'setCSearchText cSearchText'
,
cSearchText
)
...
...
src/utils/mixins.js
浏览文件 @
58572dd0
...
...
@@ -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
}
}
...
...
src/views/result.vue
浏览文件 @
58572dd0
...
...
@@ -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
(
6
0px
);
top
:
px2rem
(
7
0px
);
left
:
0
;
z-index
:
2
;
flex-direction
:
row
;
...
...
@@ -400,17 +401,17 @@ export default {
}
.list-container
{
margin
:
0
;
padding-top
:
px2rem
(
1
2
0px
);
padding-top
:
px2rem
(
1
3
0px
);
}
.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
(
8
0px
);
padding-top
:
px2rem
(
9
0px
);
}
.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
;
...
...
src/views/search-index.vue
浏览文件 @
58572dd0
<
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
(
6
0px
);
padding-top
:
px2rem
(
7
0px
);
}
.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
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录