Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
提交
打开侧边栏
com.pica.cloud.education.frontend
pica.cloud.web-education-admin
提交
a9bb840d
提交
a9bb840d
编写于
12月 13, 2018
作者:
杨广俊
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
isFirstTime
上级
745beaa9
变更
12
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
1441 行增加
和
1210 行删除
+1441
-1210
yqy-home-header.vue
src/components/business-new/yqy-home-header.vue
+12
-9
history-labels.vue
src/components/business/history-labels.vue
+85
-15
hot-labels.vue
src/components/business/hot-labels.vue
+124
-118
search-header.vue
src/components/business/search-header.vue
+35
-11
common.scss
src/style/common.scss
+6
-6
index.js
src/utils/index.js
+13
-10
mixins.js
src/utils/mixins.js
+2
-9
yqyServerRegister.js
src/utils/yqyServerRegister.js
+4
-1
index.1.vue
src/views/index.1.vue
+1061
-0
index.vue
src/views/index.vue
+27
-1015
result.vue
src/views/result.vue
+42
-5
search-index.vue
src/views/search-index.vue
+30
-11
未找到文件。
src/components/business-new/yqy-home-header.vue
浏览文件 @
a9bb840d
...
...
@@ -103,16 +103,19 @@ export default {
},
goToPage
(){
// alert("000");
this
.
$emit
(
'setAppMsg'
,
false
)
this
.
$emit
(
'jumpToSS'
,
false
)
this
.
pageBurialPoin
({
menuLevel
:
1
,
menuCode
:
'm_home'
,
functionCode
:
'f_notification'
,
actionCode
:
'c_notification'
,
this
.
$router
.
push
({
path
:
'/search'
})
rocNative
.
readMessage
();
// alert("000");
// this.$emit('setAppMsg',false)
// this.$emit('jumpToSS',false)
// this.pageBurialPoin({
// menuLevel:1,
// menuCode:'m_home',
// functionCode:'f_notification',
// actionCode:'c_notification',
// })
// rocNative.readMessage();
}
},
...
...
src/components/business/history-labels.vue
浏览文件 @
a9bb840d
...
...
@@ -2,13 +2,21 @@
<article
v-if=
"allLabels && allLabels.length > 0"
class=
"history-labels"
>
<section
class=
"history-labels-title"
>
<span>
{{
title
}}
</span>
<img
v-show=
"showDelete"
src=
"../../images/sousuo/recicle.png"
alt=
"删除"
>
<span
v-show=
"showDelete"
class=
"history-labels-title-all"
>
<span
@
click=
"deleteLabels(true)"
>
全部删除
</span><span>
|
</span><span
@
click=
"toggleDelete"
>
取消
</span>
</span>
<img
@
click=
"toggleDelete"
v-show=
"!showDelete"
src=
"../../images/sousuo/recicle.png"
alt=
"删除"
>
</section>
<section
class=
"history-labels-item"
@
click=
"searchAction"
@
click=
"searchAction
(item)
"
v-for=
"(item, index) in allLabels"
:key=
"index"
>
<span
class=
"history-labels-item-name"
>
{{
item
.
doctorName
}}
</span>
<span
class=
"history-labels-item-name"
>
<span>
{{
item
}}
</span>
<img
@
click=
"deleteLabels(false, index)"
v-show=
"showDelete"
src=
"../../images/sousuo/delete.png"
alt=
""
>
</span>
</section>
</article>
</
template
>
...
...
@@ -17,37 +25,81 @@
export
default
{
name
:
'HistoryLabels'
,
props
:
{
allLabels
:
{
type
:
Array
},
//
allLabels: {
//
type: Array
//
},
title
:
{
type
:
String
,
default
:
'历史搜索'
},
showDelete
:
{
type
:
Boolean
,
default
:
true
}
},
data
()
{
return
{
allLabels
:
[],
showDelete
:
false
}
},
mounted
(){
this
.
getData
()
},
methods
:
{
searchAction
()
{
searchAction
(
searchText
)
{
if
(
this
.
showDelete
)
return
console
.
log
(
22222
)
this
.
$router
.
push
({
path
:
'/result'
path
:
'/result'
,
query
:
{
searchText
:
searchText
}
})
},
// 获取历史搜索
getData
()
{
let
_this
=
this
,
para
=
{
token
:
_this
.
token
,
setEntry
:
'headers'
}
let
url
=
'contents/searchHistory/listHistory'
this
.
GET
(
url
,
para
).
then
(
res
=>
{
if
(
res
.
code
==
'000000'
)
{
this
.
allLabels
=
res
.
data
.
list
console
.
log
(
res
)
}
})
},
// 删除关键词
deleteLabels
(
isAll
,
index
=
0
,
length
=
1
)
{
let
_this
=
this
,
para
=
{
token
:
_this
.
token
,
setEntry
:
'headers'
,
keywords
:
[]
};
let
url
=
'contents/searchHistory/deleteHistory'
if
(
isAll
)
{
para
.
keywords
=
this
.
allLabels
}
else
{
para
.
keywords
.
push
(
this
.
allLabels
[
index
])
}
this
.
POST
(
url
,
para
).
then
(
res
=>
{
if
(
res
.
code
==
'000000'
)
{
// this.allLabels = res.data.list
this
.
allLabels
.
splice
(
index
,
length
)
}
})
},
toggleDelete
()
{
this
.
showDelete
=
!
this
.
showDelete
}
}
}
</
script
>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<
style
lang=
"scss"
scoped
>
@import
'../../style/mixin.scss'
;
.history-labels
{
...
...
@@ -62,13 +114,20 @@ export default {
justify-content
:
space-between
;
span
{
font-size
:
px2rem
(
12px
);
color
:
6
;
color
:
#66
6
;
}
img
{
width
:
px2rem
(
20px
);
height
:
px2rem
(
20px
);
padding
:
px2rem
(
4px
);
}
&
-all
{
span
{
padding
:
px2rem
(
4px
)
px2rem
(
5px
);
font-size
:
px2rem
(
12px
);
color
:
#999
;
}
}
}
&
-item
{
display
:
inline-flex
;
...
...
@@ -77,11 +136,22 @@ export default {
text-align
:
center
;
align-items
:
center
;
&
-name
{
position
:
relative
;
top
:
0
;
left
:
0
;
padding
:
px2rem
(
6px
)
px2rem
(
15px
)
px2rem
(
8px
);
border-radius
:
px2rem
(
15px
);
background-color
:
#F8F8F8
;
color
:
#999
;
font-size
:
px2rem
(
13px
);
img
{
position
:
absolute
;
top
:
px2rem
(
-10px
);
right
:
px2rem
(
-10px
);
width
:
px2rem
(
20px
);
height
:
px2rem
(
20px
);
padding
:
px2rem
(
4px
);
}
}
}
}
...
...
src/components/business/hot-labels.vue
浏览文件 @
a9bb840d
此差异已折叠。
点击以展开。
src/components/business/search-header.vue
浏览文件 @
a9bb840d
<
template
>
<article
class=
"search-wrapper"
>
<section
class=
"search-wrapper-input"
>
<
form
action=
""
@
submit
.
stop=
"search"
>
<
!--
<form
action=
""
@
submit
.
stop
.
prevent=
"search"
>
--
>
<img
src=
'../../images/search-grey.png'
>
<input
type=
"search"
v-model=
"searchText"
/>
</form>
<input
type=
"search"
v-model=
"currentText"
@
keydown
.
enter=
"search"
/>
<!--
<button
type=
"submit"
v-show=
"false"
/>
-->
<!--
</form>
-->
</section>
<section
class=
"search-wrapper-cancle"
>
<span
@
click=
"cancel"
>
取消
</span>
...
...
@@ -15,18 +16,39 @@
export
default
{
data
()
{
return
{
searchText
:
'搜索疾病、课程、讲师
'
currentText
:
'
'
}
},
props
:
{
searchText
:
{
type
:
String
,
default
:
''
}
},
// computed: {
// currentText() {
// return this.searchText
// }
// },
watch
:
{
searchText
(
val
)
{
this
.
currentText
=
val
console
.
log
(
val
)
}
},
mounted
()
{
// this.getData()
},
methods
:
{
// 取消
cancel
()
{
console
.
log
(
'in cancel'
)
this
.
search
Text
=
''
this
.
current
Text
=
''
},
// 搜索
search
()
{
this
.
$emit
(
'search'
,
this
.
searchText
)
console
.
log
(
this
.
currentText
)
this
.
$emit
(
'search'
,
this
.
currentText
)
}
}
}
...
...
@@ -40,13 +62,14 @@ export default {
position
:
fixed
;
top
:
0
;
left
:
0
;
z-index
:
1
;
z-index
:
2
;
width
:
100%
;
background
:
#fff
;
flex-direction
:
row
;
padding
:
px2rem
(
20px
)
px2rem
(
10px
)
px2rem
(
10px
)
px2rem
(
15px
);
text-align
:
center
;
align-items
:
center
;
background
:
#fff
;
border-bottom
:
1px
solid
#F8F8F8
;
&
-input
{
width
:
px2rem
(
290px
);
height
:
px2rem
(
30px
);
...
...
@@ -55,21 +78,22 @@ export default {
background
:
rgba
(
245
,
246
,
246
,
1
);
img
{
position
:
relative
;
top
:
px2rem
(
-1
8
px
);
top
:
px2rem
(
-1
3
px
);
left
:
px2rem
(
0px
);
width
:
px2rem
(
14px
);
height
:
px2rem
(
14px
);
}
input
{
position
:
relative
;
top
:
px2rem
(
-
20
px
);
top
:
px2rem
(
-
15
px
);
left
:
px2rem
(
-8px
);
width
:
px2rem
(
240px
);
text-decoration-color
:
#bbb
;
color
:
#
bbb
;
color
:
#
666
;
font-size
:
px2rem
(
13px
);
font-weight
:
400
;
background
:
rgba
(
245
,
246
,
246
,
1
);
user-select
:
all
;
&
[
type
=
"search"
]
::-webkit-search-cancel-button
{
display
:
none
;
}
...
...
src/style/common.scss
浏览文件 @
a9bb840d
*
{
-webkit-user-select
:
none
;
-moz-user-select
:
none
;
-o-user-select
:
none
;
user-select
:
none
;
}
//
* {
//
-webkit-user-select: none;
//
-moz-user-select: none;
//
-o-user-select: none;
//
user-select: none;
//
}
body
,
div
,
span
,
header
,
footer
,
nav
,
section
,
aside
,
article
,
ul
,
dl
,
dt
,
dd
,
li
,
a
,
p
,
h1
,
h2
,
h3
,
h4
,
h5
,
h6
,
i
,
b
,
textarea
,
button
,
input
,
select
,
figure
,
figcaption
,
{
padding
:
0
;
...
...
src/utils/index.js
浏览文件 @
a9bb840d
...
...
@@ -226,11 +226,14 @@ export function jumpEvaluatPage(){
return
evaluatPageUrl
}
// // dev地址
// const baseUrl = 'https://dev-sc.yunqueyi.com/'
// const apiUrl = 'https://dev-api.yunqueyi.com/'
// const evaluatPageUrl = 'https://dev-phome.yunqueyi.com/gpr/#/home'
// export const jumpWebPageUrl = 'https://dev-phome.yunqueyi.com/appl/#/'
// dev地址
// const baseUrl = 'http://192.168.140.14:10201/'
const
baseUrl
=
'http://10.177.10.149:10201/'
// const baseUrl = 'http://192.168.140.14:10201/'
// const baseUrl = 'https://dev-sc.yunqueyi.com/'
const
apiUrl
=
'https://dev-api.yunqueyi.com/'
const
evaluatPageUrl
=
'https://dev-phome.yunqueyi.com/gpr/#/home'
export
const
jumpWebPageUrl
=
'https://dev-phome.yunqueyi.com/appl/#/'
// // test1地址
// const baseUrl = 'https://test1-sc.yunqueyi.com/'
...
...
@@ -243,11 +246,11 @@ export function jumpEvaluatPage(){
// const evaluatPageUrl = 'https://uat-phome.yunqueyi.com/gpr/#/home'
// export const jumpWebPageUrl = 'https://uat-phome.yunqueyi.com/appl/#/'
// pro地址
const
baseUrl
=
'https://sc.yunqueyi.com/'
const
apiUrl
=
'https://api.yunqueyi.com/'
const
evaluatPageUrl
=
'https://phome.yunqueyi.com/gpr/#/home'
export
const
jumpWebPageUrl
=
'https://phome.yunqueyi.com/appl/#/'
//
//
pro地址
//
const baseUrl = 'https://sc.yunqueyi.com/'
//
const apiUrl = 'https://api.yunqueyi.com/'
//
const evaluatPageUrl = 'https://phome.yunqueyi.com/gpr/#/home'
//
export const jumpWebPageUrl = 'https://phome.yunqueyi.com/appl/#/'
// 获取BaseUrl
...
...
src/utils/mixins.js
浏览文件 @
a9bb840d
...
...
@@ -117,13 +117,9 @@ module.exports = {
return
paramList
;
},
// 通用GET请求
GET
(
api
,
para
,
callback
,
str
)
{
if
(
para
.
token
){
para
.
token
=
para
.
token
||
this
.
token
||
'EA67293E35C249C1832583F7AD2669EC'
}
para
.
token
=
para
.
token
||
this
.
token
||
'FA95BE7379684E419050F72BCEB0DE12'
let
url
=
api
+
this
.
getUrlPara
(
para
)
return
fetch
({
url
:
getBaseUrl
(
url
),
...
...
@@ -134,10 +130,7 @@ module.exports = {
// 通用POST请求
POST
(
api
,
para
,
callback
)
{
if
(
para
.
token
){
para
.
token
=
para
.
token
||
this
.
token
||
'EA67293E35C249C1832583F7AD2669EC'
}
//para.token = para.token || this.token || 'EA67293E35C249C1832583F7AD2669EC' //'AF3DFCF2DD4B4115AC47ACA25D5420E9''F90DF48D3EFA49DFAE1267A67DBEFB18'//token
para
.
token
=
para
.
token
||
this
.
token
||
'FA95BE7379684E419050F72BCEB0DE12'
return
fetch
({
url
:
getBaseUrl
(
api
),
method
:
'post'
,
...
...
src/utils/yqyServerRegister.js
浏览文件 @
a9bb840d
...
...
@@ -29,6 +29,9 @@
if
(
t
==
'getToken'
){
__getToken
(
n
);
}
if
(
t
==
'__isFirstTime'
){
window
.
__isFirstTime
(
n
)
}
},
__callNative
:
function
(
t
,
a
,
o
)
{
"function"
==
typeof
o
&&
(
n
++
,
i
[
n
]
=
o
);
...
...
@@ -75,7 +78,7 @@
})
}
})
}(
"dispatchEventByModuleCode"
,
"gotoAuthentication"
,
"shareWechat"
,
"backPreviousPage"
,
"bindingWechat"
,
"gotoLogin"
,
"getDeviceInfo"
,
"goBack"
,
"appBuryingPointEntrust"
,
"getAuthPermission"
,
"getAppVersionCode"
,
"getToken"
,
"gotoNewActivity"
,
"gotoNewActivityWithParams"
,
"gotoNewWebActivity"
,
"gotoYidianActivity"
,
"readMessage"
,
"openFiveMintusAudio"
,
"getStatusBarSize"
,
"showNativeDialog"
,
"showNativeToast"
,
"gotoViewTop"
,
"appInit"
,
"checkPermissions"
,
"getStatusBarHeight"
,
"setTabMiniIcon"
,
"getUserInfo"
,
"pauseAudioView"
);
}(
"
isFirstTime"
,
"setFirstTime"
,
"
dispatchEventByModuleCode"
,
"gotoAuthentication"
,
"shareWechat"
,
"backPreviousPage"
,
"bindingWechat"
,
"gotoLogin"
,
"getDeviceInfo"
,
"goBack"
,
"appBuryingPointEntrust"
,
"getAuthPermission"
,
"getAppVersionCode"
,
"getToken"
,
"gotoNewActivity"
,
"gotoNewActivityWithParams"
,
"gotoNewWebActivity"
,
"gotoYidianActivity"
,
"readMessage"
,
"openFiveMintusAudio"
,
"getStatusBarSize"
,
"showNativeDialog"
,
"showNativeToast"
,
"gotoViewTop"
,
"appInit"
,
"checkPermissions"
,
"getStatusBarHeight"
,
"setTabMiniIcon"
,
"getUserInfo"
,
"pauseAudioView"
);
if
(
e
.
__rocAndroid
)
{
e
.
__isAndroid
=
true
e
.
__isIOS
=
false
...
...
src/views/index.1.vue
0 → 100644
浏览文件 @
a9bb840d
此差异已折叠。
点击以展开。
src/views/index.vue
浏览文件 @
a9bb840d
此差异已折叠。
点击以展开。
src/views/result.vue
浏览文件 @
a9bb840d
<
template
>
<section>
<SearchHeader
@
search=
"search"
/>
<SearchHeader
@
search=
"search"
:searchText=
"searchText"
/>
<!--
<SplitLine/>
-->
<!-- 没有结果页面 -->
<section
v-show=
"!hasResult"
class=
"mt-100"
>
...
...
@@ -105,12 +105,49 @@ export default {
this
.
searchText
=
this
.
$route
.
query
.
searchText
||
''
},
mounted
(){
this
.
search
()
this
.
search
(
this
.
searchText
)
},
methods
:
{
// 搜索
search
()
{
console
.
log
(
'in result search: '
+
this
.
searchText
)
// 搜索结果
search
(
searchText
)
{
let
_this
=
this
,
para
=
{
searchCategory
:
'1,2,3,4'
,
searchValue
:
searchText
,
sortItem
:
1
,
pageNo
:
1
,
pageSize
:
4
,
token
:
_this
.
token
,
setEntry
:
'headers'
,
}
let
url
=
'contents/searchKeyword/searchContent'
this
.
GET
(
url
,
para
).
then
(
res
=>
{
if
(
res
.
code
==
'000000'
)
{
// 课程
this
.
contentAppModels
=
this
.
data
.
contentAppModels
this
.
contentAppModelCount
=
this
.
data
.
contentAppModelCount
// 健康漫画
this
.
educationContents
=
this
.
data
.
educationContents
this
.
educationContentCount
=
this
.
data
.
educationContentCount
// 五分钟医学
this
.
fiveMinutesMedicalContentList
=
this
.
data
.
fiveMinutesMedicalContentList
this
.
fiveMinutesMedicalContentListCount
=
this
.
data
.
fiveMinutesMedicalContentListCount
// 讲师
this
.
pCourseDoctorModels
=
this
.
data
.
pCourseDoctorModels
this
.
pCourseDoctorModelCount
=
this
.
data
.
pCourseDoctorModelCount
// contentAppModelCount: 0
// contentAppModels: []
// educationContentCount: 0
// educationContents: []
// fiveMinutesMedicalContentList: []
// fiveMinutesMedicalContentListCount: 0
// pCourseDoctorModelCount: 0
// pCourseDoctorModels: []
}
})
},
showIndex
(
index
)
{
console
.
log
(
index
)
...
...
src/views/search-index.vue
浏览文件 @
a9bb840d
<
template
>
<div>
<SearchHeader
@
search=
"search"
/>
<SplitLine
/>
<HisttoryLabels
:allLabels=
"allLabels"
:hasResult=
"hasResult"
/>
<HotLabels
title=
"热门搜索"
:showDelete=
"false"
:allLabels=
"allLabels"
:hasResult=
"hasResult"
/>
<SearchHeader
@
search=
"search"
:searchText=
"searchText"
/>
<!--
<SplitLine
/>
-->
<div
class=
"mt-100"
></div>
<HistoryLabels/>
<HotLabels/>
</div>
</
template
>
<
script
>
import
SearchHeader
from
'../components/business/search-header'
;
import
SplitLine
from
'../components/business/split-line'
;
import
Hist
t
oryLabels
from
'../components/business/history-labels'
;
import
HistoryLabels
from
'../components/business/history-labels'
;
import
HotLabels
from
'../components/business/hot-labels'
;
export
default
{
data
()
{
return
{
showDelete
:
false
,
hasResult
:
true
,
allLabels
:
[{
"doctorId"
:
452
,
"doctorName"
:
"刘飞刘"
,
"doctorImg"
:
"https://file.yunqueyi.com/File/course_doctor/2018-11/19/452.png"
,
"doctorAvatarImg"
:
"https://file.yunqueyi.com/image/jpeg/2018/10/12/20181012134114808-5339c711.jpg"
,
"doctorHospital"
:
"沈阳市第四人民医院"
,
"joinNum"
:
818
,
"resourceNum"
:
1
,
"structureId"
:
132
},{
"doctorId"
:
424
,
"doctorName"
:
"阮园阮园阮园"
,
"doctorImg"
:
"https://file.yunqueyi.com/File/course_doctor/2018-11/19/424.png"
,
"doctorAvatarImg"
:
"https://file.yunqueyi.com/image/jpeg/2018/08/30/20180830111232896-de2f9015.jpg"
,
"doctorHospital"
:
"浙江医院"
,
"joinNum"
:
533
,
"resourceNum"
:
2
,
"structureId"
:
132
},{
"doctorId"
:
351
,
"doctorName"
:
"李翔李翔李翔"
,
"doctorImg"
:
"https://file.yunqueyi.com/File/course_doctor/2018-11/19/351.png"
,
"doctorAvatarImg"
:
"https://file.yunqueyi.com/File/course_doctor/2017-04/06/lixiang.jpg"
,
"doctorHospital"
:
"解放军306医院全军糖尿病中心"
,
"joinNum"
:
503
,
"resourceNum"
:
2
,
"structureId"
:
132
},{
"doctorId"
:
360
,
"doctorName"
:
"高蕾莉"
,
"doctorImg"
:
"https://file.yunqueyi.com/File/course_doctor/2018-11/20/360.png"
,
"doctorAvatarImg"
:
"https://file.yunqueyi.com/File/course_doctor/2018-11/20/web_360.png"
,
"doctorHospital"
:
"北京大学人民医院"
,
"joinNum"
:
376
,
"resourceNum"
:
1
,
"structureId"
:
132
}]
searchText
:
''
}
},
components
:
{
SearchHeader
,
SplitLine
,
Hist
t
oryLabels
,
HistoryLabels
,
HotLabels
},
created
(){
...
...
@@ -32,7 +31,7 @@ export default {
},
mounted
(){
this
.
getData
()
},
methods
:
{
// 跳转到结果页面,并
...
...
@@ -45,6 +44,24 @@ export default {
searchText
:
searchText
}
})
},
// 获取历史搜索
getData
()
{
let
_this
=
this
,
para
=
{
type
:
1
,
token
:
_this
.
token
,
setEntry
:
'headers'
}
let
url
=
'/contents/searchKeyword/listKeywords'
this
.
GET
(
url
,
para
).
then
(
res
=>
{
if
(
res
.
code
==
'000000'
)
{
if
(
res
.
data
&&
res
.
data
.
length
)
{
let
index
=
Math
.
floor
(
Math
.
random
()
*
res
.
data
.
length
)
this
.
searchText
=
res
.
data
[
index
].
keyword
}
}
})
}
},
}
...
...
@@ -54,5 +71,7 @@ export default {
<
style
lang=
"scss"
scoped
>
@import
'../style/mixin.scss'
;
@import
'../style/global.scss'
;
.mt-100
{
padding-top
:
px2rem
(
63px
)
!
important
;
}
</
style
>
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录