Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
提交
打开侧边栏
com.pica.cloud.education.frontend
pica.cloud.web-education-admin
提交
a2c22377
提交
a2c22377
编写于
12月 25, 2018
作者:
杨广俊
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
getStatusBarHeight
上级
148811af
变更
8
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
125 行增加
和
85 行删除
+125
-85
course-list.vue
src/components/business/course-list.vue
+16
-9
five-minutes.vue
src/components/business/five-minutes.vue
+24
-10
health-comics.vue
src/components/business/health-comics.vue
+28
-21
history-labels.vue
src/components/business/history-labels.vue
+1
-1
teacher-list.vue
src/components/business/teacher-list.vue
+20
-13
mixins.js
src/utils/mixins.js
+15
-4
index.1.vue
src/views/index.1.vue
+0
-4
search-index.vue
src/views/search-index.vue
+21
-23
未找到文件。
src/components/business/course-list.vue
浏览文件 @
a2c22377
...
...
@@ -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
})
}
}
}
...
...
src/components/business/five-minutes.vue
浏览文件 @
a2c22377
...
...
@@ -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 ==
par
mData.length)?'teacher-item item-end' : 'teacher-item'"
:key=
"index"
v-for=
"(item,index) in
par
mData"
@
click=
"goToPage(item)"
>
<div
:class=
"index>1 && (index+1 ==
cPara
mData.length)?'teacher-item item-end' : 'teacher-item'"
:key=
"index"
v-for=
"(item,index) in
cPara
mData"
@
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
})
}
},
...
...
src/components/business/health-comics.vue
浏览文件 @
a2c22377
...
...
@@ -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
par
mData"
:key=
"index"
v-for=
"(item, index) in
cPara
mData"
: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
})
}
}
...
...
src/components/business/history-labels.vue
浏览文件 @
a2c22377
...
...
@@ -173,7 +173,7 @@ export default {
.history-labels
{
width
:
100%
;
padding
:
0
px2rem
(
15px
)
0
;
margin-bottom
:
px2rem
(
6
px
);
margin-bottom
:
px2rem
(
20
px
);
background-color
:
#fff
;
&
-title
{
display
:
inline-flex
;
...
...
src/components/business/teacher-list.vue
浏览文件 @
a2c22377
...
...
@@ -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
par
mData"
:key=
"index"
<div
:class=
"index
% 2 == 1 ? 'list-item mr0' :
'list-item'"
v-for=
"(item, index) in
cPara
mData"
: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
})
}
}
...
...
src/utils/mixins.js
浏览文件 @
a2c22377
...
...
@@ -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
){
...
...
src/views/index.1.vue
浏览文件 @
a2c22377
...
...
@@ -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'
...
...
src/views/search-index.vue
浏览文件 @
a2c22377
...
...
@@ -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
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录