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
提交
148811af
提交
148811af
编写于
12月 25, 2018
作者:
杨广俊
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
重新排序
上级
0f5c2ee3
变更
5
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
69 行增加
和
38 行删除
+69
-38
five-minutes.vue
src/components/business/five-minutes.vue
+11
-35
getters.js
src/store/getters.js
+2
-1
sousuo.js
src/store/modules/sousuo.js
+10
-1
mixins.js
src/utils/mixins.js
+35
-0
result.vue
src/views/result.vue
+11
-1
未找到文件。
src/components/business/five-minutes.vue
浏览文件 @
148811af
...
@@ -33,6 +33,7 @@
...
@@ -33,6 +33,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
mapState
}
from
'vuex'
import
{
sortParmData
}
from
'@/utils/index'
import
{
sortParmData
}
from
'@/utils/index'
import
{
import
{
m_search_result_five_minutes_detail
,
m_search_result_five_minutes_detail
,
...
@@ -41,6 +42,7 @@ import {
...
@@ -41,6 +42,7 @@ import {
}
from
'@/utils/buryingPoint'
}
from
'@/utils/buryingPoint'
import
{
pageJumpUrl
}
from
'@/utils/index'
import
{
pageJumpUrl
}
from
'@/utils/index'
import
GroupTitle
from
'@/components/business/group-title'
;
import
GroupTitle
from
'@/components/business/group-title'
;
import
{
mapGetters
}
from
'vuex'
;
export
default
{
export
default
{
name
:
'YqyFiveMinutes'
,
name
:
'YqyFiveMinutes'
,
...
@@ -67,24 +69,23 @@ export default {
...
@@ -67,24 +69,23 @@ export default {
type
:
Boolean
,
type
:
Boolean
,
default
:
true
default
:
true
},
},
searchText
:
{
type
:
String
,
default
:
''
},
showOrder
:
{
showOrder
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
false
default
:
false
}
}
},
},
computed
:
{
computed
:
{
...
mapGetters
({
cSearchText
:
'cSearchText'
}),
// compParmData() {
// compParmData() {
// return this.handelFive(this.parmData)
// return this.handelFive(this.parmData)
// }
// }
},
},
// watch: {
// parmData: {
// handler(curVal, oldVal){
// return curVal
// },
// deep: true
// }
// },
created
()
{
created
()
{
let
_this
=
this
;
let
_this
=
this
;
//暂停
//暂停
...
@@ -103,17 +104,13 @@ export default {
...
@@ -103,17 +104,13 @@ export default {
},
},
mounted
()
{
mounted
()
{
// this.getFiveData()
},
},
methods
:
{
methods
:
{
goToPage
(
item
)
{
goToPage
(
item
)
{
let
obj
=
{
let
obj
=
{
}
}
///console.log(item);
// let url = pageJumpUrl();
// console.log(url.pageListUrl);
let
itemData
=
{
let
itemData
=
{
"imageUrl"
:
""
,
"imageUrl"
:
""
,
"appModuleInfo"
:
{
"appModuleInfo"
:
{
...
@@ -221,23 +218,6 @@ export default {
...
@@ -221,23 +218,6 @@ export default {
})
})
},
},
//五分钟医学院
getFiveData
()
{
let
_this
=
this
,
parm
=
{
pageNo
:
1
,
pageSize
:
4
,
data
:
{
setEntry
:
'headers'
}
}
this
.
API_GET
(
'contents/fiveMinutes/contents'
,
parm
).
then
(
res
=>
{
if
(
res
.
respCode
==
'200'
)
{
_this
.
list
=
_this
.
handelFive
(
res
.
fiveMinutesMedicalContentList
)
||
[]
}
})
},
//处理五分钟数据 初始化播放状态
//处理五分钟数据 初始化播放状态
handelFive
(
d
)
{
handelFive
(
d
)
{
for
(
let
i
=
0
;
i
<
d
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
d
.
length
;
i
++
)
{
...
@@ -251,11 +231,7 @@ export default {
...
@@ -251,11 +231,7 @@ export default {
labelValue
:
orderIndex
,
labelValue
:
orderIndex
,
createdTime
:
new
Date
().
getTime
(),
createdTime
:
new
Date
().
getTime
(),
})
})
if
(
orderIndex
==
1
)
{
this
.
searchForOrder
(
'2'
,
this
.
cSearchText
,
orderIndex
,
this
.
groupNum
,
this
.
parmData
)
this
.
parmData
=
sortParmData
(
this
.
parmData
,
'joinNum'
,
-
1
)
}
else
{
this
.
parmData
=
sortParmData
(
this
.
parmData
,
'publishTime'
,
-
1
)
}
}
}
},
},
...
...
src/store/getters.js
浏览文件 @
148811af
const
getters
=
{
const
getters
=
{
userInfo
:
state
=>
state
.
sousuo
.
userInfo
,
userInfo
:
state
=>
state
.
sousuo
.
userInfo
,
navBarHeight
:
state
=>
state
.
sousuo
.
navBarHeight
navBarHeight
:
state
=>
state
.
sousuo
.
navBarHeight
,
cSearchText
:
state
=>
state
.
sousuo
.
cSearchText
}
}
export
default
getters
export
default
getters
src/store/modules/sousuo.js
浏览文件 @
148811af
const
sousuo
=
{
const
sousuo
=
{
state
:
{
state
:
{
userInfo
:
{},
userInfo
:
{},
navBarHeight
:
{}
navBarHeight
:
{},
cSearchText
:
''
},
},
mutations
:
{
mutations
:
{
SET_USER_INFO
:
(
state
,
userInfo
)
=>
{
SET_USER_INFO
:
(
state
,
userInfo
)
=>
{
...
@@ -11,6 +12,10 @@ const sousuo = {
...
@@ -11,6 +12,10 @@ const sousuo = {
SET_NAVBAR_HEIGHT
:
(
state
,
navBarHeight
)
=>
{
SET_NAVBAR_HEIGHT
:
(
state
,
navBarHeight
)
=>
{
console
.
log
(
state
,
navBarHeight
);
console
.
log
(
state
,
navBarHeight
);
state
.
navBarHeight
=
navBarHeight
state
.
navBarHeight
=
navBarHeight
},
SET_C_SEARCH_TEXT
:
(
state
,
cSearchText
)
=>
{
console
.
log
(
'SET_C_SEARCH_TEXT cSearchText'
,
cSearchText
)
state
.
cSearchText
=
cSearchText
}
}
},
},
actions
:
{
actions
:
{
...
@@ -20,6 +25,10 @@ const sousuo = {
...
@@ -20,6 +25,10 @@ const sousuo = {
setNavBarHeight
({
commit
},
navBarHeight
)
{
setNavBarHeight
({
commit
},
navBarHeight
)
{
commit
(
'SET_NAVBAR_HEIGHT'
,
navBarHeight
)
commit
(
'SET_NAVBAR_HEIGHT'
,
navBarHeight
)
},
},
setCSearchText
({
commit
},
cSearchText
)
{
console
.
log
(
'setCSearchText cSearchText'
,
cSearchText
)
commit
(
'SET_C_SEARCH_TEXT'
,
cSearchText
)
},
}
}
}
}
...
...
src/utils/mixins.js
浏览文件 @
148811af
...
@@ -88,6 +88,41 @@ module.exports = {
...
@@ -88,6 +88,41 @@ module.exports = {
return
''
return
''
},
},
searchForOrder
(
searchCategory
=
'1'
,
searchValue
=
''
,
sortItem
=
1
,
pageSize
=
10
,
sourceData
=
[])
{
let
str2
=
(
searchValue
||
''
).
replace
(
/
[\-\_\,\!\|\~\`\(\)\#\$\%\^\&\*\{\}\:\;\"\L\<\>\?]
/g
,
''
);
// 去掉特殊字符
let
_this
=
this
,
para
=
{
searchCategory
:
searchCategory
,
searchValue
:
str2
,
keywordColor
:
'rgba(244,122,72,1)'
,
sortItem
:
sortItem
,
pageNo
:
1
,
pageSize
:
pageSize
,
token
:
_this
.
token
,
setEntry
:
'headers'
,
}
let
url
=
'contents/searchKeyword/searchContent'
this
.
GET
(
url
,
para
).
then
(
res
=>
{
// _this.searchText = ''
if
(
res
.
code
==
'000000'
)
{
// 课程
if
(
searchCategory
.
indexOf
(
'1'
)
>
0
)
{
sourceData
=
res
.
data
.
contentAppModels
}
if
(
searchCategory
.
indexOf
(
'2'
)
>
0
)
{
sourceData
=
this
.
handelFive
(
res
.
data
.
fiveMinutesMedicalContentList
||
[])
}
if
(
searchCategory
.
indexOf
(
'3'
)
>
0
)
{
sourceData
=
res
.
data
.
pCourseDoctorModels
}
if
(
searchCategory
.
indexOf
(
'4'
)
>
0
)
{
sourceData
=
res
.
data
.
educationContents
}
}
})
},
setEventByModuleCode
(
itemData
){
setEventByModuleCode
(
itemData
){
console
.
log
(
itemData
);
console
.
log
(
itemData
);
let
modeCode
=
itemData
.
appModuleInfo
.
code
||
''
;
let
modeCode
=
itemData
.
appModuleInfo
.
code
||
''
;
...
...
src/views/result.vue
浏览文件 @
148811af
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
</div>
</div>
<!-- 五分钟医学 -->
<!-- 五分钟医学 -->
<div
v-show=
"showTab2"
>
<div
v-show=
"showTab2"
>
<FiveMinutes
:parmData=
"fiveMinutesMedicalContentList"
:groupNum=
"fiveMinutesMedicalContentListCount"
/>
<FiveMinutes
:parmData=
"fiveMinutesMedicalContentList"
:groupNum=
"fiveMinutesMedicalContentListCount"
:searchText=
"searchTextSub"
/>
<ShowAllItem
@
showAllItem=
"showAllItem"
itemIndex=
"2"
/>
<ShowAllItem
@
showAllItem=
"showAllItem"
itemIndex=
"2"
/>
<SplitLine
borderWidth=
"3px"
/>
<SplitLine
borderWidth=
"3px"
/>
</div>
</div>
...
@@ -86,6 +86,7 @@
...
@@ -86,6 +86,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
mapActions
}
from
'vuex'
import
{
import
{
m_search_search
,
m_search_search
,
m_search_result_tab_switch
m_search_result_tab_switch
...
@@ -116,6 +117,7 @@ export default {
...
@@ -116,6 +117,7 @@ export default {
showLoading
:
false
,
showLoading
:
false
,
hasResult
:
true
,
hasResult
:
true
,
searchText
:
''
,
searchText
:
''
,
searchTextSub
:
''
,
// selected: '0',
// selected: '0',
contentAppModelCount
:
'0'
,
contentAppModelCount
:
'0'
,
contentAppModels
:
[],
contentAppModels
:
[],
...
@@ -155,6 +157,10 @@ export default {
...
@@ -155,6 +157,10 @@ export default {
BackTop
BackTop
},
},
watch
:
{
watch
:
{
searchText
(
val
){
console
.
log
(
val
)
this
.
searchTextSub
=
val
}
// selected(val) {
// selected(val) {
// this.showIndex(val)
// this.showIndex(val)
// // this.searchAll(this.searchText, '1', 'contentAppModels', 'contentAppModelsAll')
// // this.searchAll(this.searchText, '1', 'contentAppModels', 'contentAppModelsAll')
...
@@ -184,6 +190,9 @@ export default {
...
@@ -184,6 +190,9 @@ export default {
// this.searchAll(this.searchText, '1', 'contentAppModels', 'contentAppModelsAll')
// this.searchAll(this.searchText, '1', 'contentAppModels', 'contentAppModelsAll')
},
},
methods
:
{
methods
:
{
...
mapActions
({
setCSearchText
:
'setCSearchText'
}),
showAllItem
(
index
)
{
showAllItem
(
index
)
{
console
.
log
(
typeof
index
)
console
.
log
(
typeof
index
)
this
.
navIndex
=
index
this
.
navIndex
=
index
...
@@ -203,6 +212,7 @@ export default {
...
@@ -203,6 +212,7 @@ export default {
})
})
this
.
showLoading
=
true
this
.
showLoading
=
true
let
str2
=
(
this
.
searchText
||
''
).
replace
(
/
[\-\_\,\!\|\~\`\(\)\#\$\%\^\&\*\{\}\:\;\"\L
\<
\>\?]
/g
,
''
);
// 去掉特殊字符
let
str2
=
(
this
.
searchText
||
''
).
replace
(
/
[\-\_\,\!\|\~\`\(\)\#\$\%\^\&\*\{\}\:\;\"\L
\<
\>\?]
/g
,
''
);
// 去掉特殊字符
this
.
setCSearchText
(
str2
)
let
_this
=
this
,
let
_this
=
this
,
para
=
{
para
=
{
searchCategory
:
'1,2,3,4'
,
searchCategory
:
'1,2,3,4'
,
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录