Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
提交
打开侧边栏
com.pica.cloud.education.frontend
pica.cloud.web-education-admin
提交
c5652d10
提交
c5652d10
编写于
12月 16, 2018
作者:
guangjun.yang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
vuex
上级
3954c1f3
变更
13
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
127 行增加
和
182 行删除
+127
-182
yqy-adjust.vue
src/components/business-new的副本/yqy-adjust.vue
+1
-1
course-adjust.vue
src/components/business/course-adjust.vue
+4
-4
getters.js
src/store/getters.js
+2
-3
index.js
src/store/index.js
+2
-8
adjustList.js
src/store/modules/adjustList.js
+0
-18
common.js
src/store/modules/common.js
+0
-86
diagnosis.js
src/store/modules/diagnosis.js
+0
-15
gpRanking.js
src/store/modules/gpRanking.js
+0
-13
sousuo.js
src/store/modules/sousuo.js
+26
-0
yqyApp.js
src/store/modules/yqyApp.js
+0
-20
yqyServerRegister.js
src/utils/yqyServerRegister.js
+0
-7
result.vue
src/views/result.vue
+44
-3
search-index.vue
src/views/search-index.vue
+48
-4
未找到文件。
src/components/business-new的副本/yqy-adjust.vue
浏览文件 @
c5652d10
...
...
@@ -94,7 +94,7 @@ export default {
this
.
list
=
this
.
parmData
;
this
.
$store
.
dispatch
(
"setSource"
,
[]);
//
this.$store.dispatch("setSource", []);
//this.pageNo = this.adjustPageNo;
// if(window.__isAndroid){
...
...
src/components/business/course-adjust.vue
浏览文件 @
c5652d10
...
...
@@ -14,7 +14,7 @@
<div
class=
"couse-cont"
>
<!--
<div
class=
"couse-list"
v-infinite-scroll=
"loadMore"
infinite-scroll-disabled=
"loading"
infinite-scroll-distance=
"10"
:style=
"'height:'+clientHeight"
>
-->
<div
class=
"couse-list"
infinite-scroll-disabled=
"loading"
infinite-scroll-distance=
"10"
:style=
"'height:'+clientHeight"
>
<div
v-show=
"index
<
4
"
:class=
"index%2==1 ? 'course-item end-left' : 'course-item'"
:key=
"index"
v-for=
"(item,index) in
list
"
>
<div
v-show=
"index
<
4
"
:class=
"index%2==1 ? 'course-item end-left' : 'course-item'"
:key=
"index"
v-for=
"(item,index) in
parmData
"
>
<div
class=
"course-pic"
@
click=
"goToPage(item)"
>
<img
v-lazy=
"item.courseInfoUrl"
class=
"pic-tec"
/>
<span
class=
"course-tag"
>
{{
item
.
disName
}}
</span>
...
...
@@ -24,7 +24,7 @@
</p>
<div
class=
"course-opt"
>
<span
class=
"opt-info"
>
{{
!
item
.
showTime
?
''
:
item
.
showTime
+
' |'
}}
{{
item
.
joinNum
}}
人已学
</span>
<span
:class=
"item.whetherFavors==2?'opt collect':'opt collected'"
@
click=
"collectFun(item.whetherFavors,item.id,item.name)"
>
<span
:class=
"item.whetherFavors==2?'opt collect':'opt collected'"
@
click=
"collectFun(item.whetherFavors,item.id,item.name)"
>
{{
item
.
whetherFavors
==
2
?
'收藏'
:
'已收藏'
}}
</span>
...
...
@@ -98,9 +98,9 @@ export default {
},
mounted
()
{
this
.
list
=
this
.
parmData
;
//
this.list = this.parmData;
this
.
$store
.
dispatch
(
"setSource"
,
[]);
//
this.$store.dispatch("setSource", []);
//this.pageNo = this.adjustPageNo;
// if(window.__isAndroid){
...
...
src/store/getters.js
浏览文件 @
c5652d10
const
getters
=
{
// sidebar: state => state.app.sidebar,
// token: state => state.user.token,
// avatar: state => state.user.avatar,
userInfo
:
state
=>
state
.
sousuo
.
userInfo
,
navBarHeight
:
state
=>
state
.
sousuo
.
navBarHeight
}
export
default
getters
src/store/index.js
浏览文件 @
c5652d10
import
Vue
from
'vue'
import
Vuex
from
'vuex'
import
common
from
'./modules/common'
import
diagnosis
from
'./modules/diagnosis'
import
gpRanking
from
'./modules/gpRanking'
import
adjustDataList
from
'./modules/adjustList'
import
sousuo
from
'./modules/sousuo'
import
getters
from
'./getters'
Vue
.
use
(
Vuex
)
const
store
=
new
Vuex
.
Store
({
modules
:
{
common
,
diagnosis
,
gpRanking
,
adjustDataList
sousuo
},
getters
})
...
...
src/store/modules/adjustList.js
已删除
100644 → 0
浏览文件 @
3954c1f3
const
adjustList
=
{
state
:
{
adjustLists
:[]
},
mutations
:
{
SET_DATA
:
(
state
,
adjustLists
)
=>
{
console
.
log
(
state
);
state
.
adjustLists
=
adjustLists
},
},
actions
:
{
setSource
({
commit
},
adjustLists
)
{
commit
(
'SET_DATA'
,
adjustLists
)
},
}
}
export
default
adjustList
src/store/modules/common.js
已删除
100644 → 0
浏览文件 @
3954c1f3
import
router
from
'@/router/router'
import
{
uniqueArray
}
from
'@/utils'
const
common
=
{
state
:
{
homeTabs
:
[],
homeTabsActiveName
:
''
,
comModObject
:
null
},
mutations
:
{
SET_HOME_TABS
:
(
state
,
homeTabs
)
=>
{
state
.
homeTabs
=
homeTabs
},
SET_HOME_TABS_ACTIVE_NAME
:
(
state
,
homeTabsActiveName
)
=>
{
state
.
homeTabsActiveName
=
homeTabsActiveName
},
SET_COMMON_OBJECT
:
(
state
,
comModObject
)
=>
{
state
.
comModObject
=
comModObject
}
},
actions
:
{
setHomeTabs
({
commit
},
homeTabs
)
{
commit
(
'SET_HOME_TABS'
,
homeTabs
)
},
setHomeTabsActiveName
({
commit
},
homeTabsActiveName
)
{
commit
(
'SET_HOME_TABS_ACTIVE_NAME'
,
homeTabsActiveName
)
},
// 添加tab
addTabs
({
commit
,
state
},
tab
)
{
let
homeTabs
=
state
.
homeTabs
.
slice
()
if
(
homeTabs
.
length
===
0
)
{
tab
.
closable
=
false
}
else
{
homeTabs
[
0
].
closable
=
false
}
homeTabs
.
push
(
tab
)
homeTabs
=
uniqueArray
(
homeTabs
,
'name'
)
commit
(
'SET_HOME_TABS'
,
homeTabs
)
commit
(
'SET_HOME_TABS_ACTIVE_NAME'
,
tab
.
name
)
},
// 删除tab(单个)
removeOneTab
({
commit
,
state
},
tabName
)
{
logger
.
warn
(
tabName
)
const
homeTabs
=
state
.
homeTabs
.
slice
()
let
name
for
(
let
i
=
0
;
i
<
homeTabs
.
length
;
i
++
)
{
let
item
=
homeTabs
[
i
]
if
(
item
.
name
===
tabName
)
{
homeTabs
.
splice
(
i
,
1
)
item
=
homeTabs
[
i
]
if
(
state
.
tabsActiveName
===
tabName
)
{
if
(
item
)
{
name
=
item
.
name
}
else
{
name
=
homeTabs
[
i
-
1
].
name
}
commit
(
'SET_HOME_TABS_ACTIVE_NAME'
,
name
)
router
.
push
({
path
:
name
})
}
break
}
}
commit
(
'SET_HOME_TABS'
,
homeTabs
)
},
// 删除tabs(多个)
removeAllTabs
({
commit
,
state
})
{
const
homeTabs
=
state
.
homeTabs
.
slice
()
if
(
homeTabs
.
length
===
0
)
{
return
}
const
firstTab
=
[
homeTabs
.
shift
()]
commit
(
'SET_HOME_TABS_ACTIVE_NAME'
,
firstTab
[
0
].
name
)
router
.
push
({
path
:
firstTab
[
0
].
name
})
commit
(
'SET_HOME_TABS'
,
firstTab
)
},
setCommonObjct
({
commit
,
state
})
{
commit
(
'SET_COMMON_OBJECT'
,
state
.
comModObject
)
}
}
}
export
default
common
src/store/modules/diagnosis.js
已删除
100644 → 0
浏览文件 @
3954c1f3
const
diagnosis
=
{
state
:
{
},
mutations
:
{
},
actions
:
{
}
}
export
default
diagnosis
src/store/modules/gpRanking.js
已删除
100644 → 0
浏览文件 @
3954c1f3
const
gpRankings
=
{
state
:
{
},
mutations
:
{
},
actions
:
{
}
}
export
default
gpRankings
src/store/modules/sousuo.js
0 → 100644
浏览文件 @
c5652d10
const
sousuo
=
{
state
:
{
userInfo
:
{},
navBarHeight
:
{}
},
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
}
},
actions
:
{
setUserInfo
({
commit
},
userInfo
)
{
commit
(
'SET_USER_INFO'
,
userInfo
)
},
setNavBarHeight
({
commit
},
navBarHeight
)
{
commit
(
'SET_NAVBAR_HEIGHT'
,
navBarHeight
)
},
}
}
export
default
sousuo
src/store/modules/yqyApp.js
已删除
100644 → 0
浏览文件 @
3954c1f3
const
yqyHome
=
{
state
:
{
userMse
:
{},
},
mutations
:
{
SET_USERMSE
:
(
state
,
userMse
)
=>
{
state
.
userMse
=
userMse
},
},
actions
:
{
setUserMse
({
commit
},
userMse
)
{
commit
(
'SET_USERMSE'
,
userMse
)
},
}
}
export
default
yqyHome
src/utils/yqyServerRegister.js
浏览文件 @
c5652d10
...
...
@@ -4,9 +4,6 @@
e
.
rocNative
=
{
// 参数说明 e:回传回来的移动端服务名称; t:前端自己传递的回调JS方法
__nativeCall
:
function
(
e
,
t
,
n
)
{
if
(
t
==
'__nativeCallMsg'
){
__nativeCallMsg
(
n
)
}
if
(
t
==
'__refresh'
){
__refresh
(
n
)
}
...
...
@@ -16,7 +13,6 @@
if
(
t
==
'__getStatusBarHeight'
){
__getStatusBarHeight
(
n
);
}
if
(
t
==
'pauseAudioView'
){
__pauseAudioView
(
n
);
}
...
...
@@ -26,9 +22,6 @@
if
(
t
==
'closeAudioView'
){
__closeAudioView
(
n
);
}
if
(
t
==
'getToken'
){
__getToken
(
n
);
}
if
(
t
==
'__isFirstTime'
){
window
.
__isFirstTime
(
n
)
}
...
...
src/views/result.vue
浏览文件 @
c5652d10
...
...
@@ -9,7 +9,7 @@
<section></section>
<NoResultPage/>
<SplitLine
borderWidth=
"3px"
/>
<CourseAdjust/>
<CourseAdjust
v-show=
"adjustList.length > 0"
:paraData=
"adjustList"
/>
</article>
<!-- 有结果页面 -->
...
...
@@ -86,6 +86,7 @@ import ConfirmTip from '@/components/common/confirm-tip'
export
default
{
data
()
{
return
{
// token: '',
navIndex
:
'0'
,
showLoading
:
false
,
hasResult
:
true
,
...
...
@@ -109,7 +110,8 @@ export default {
showTab3
:
true
,
showTab4
:
true
,
showTitle
:
false
,
showOrder
:
true
showOrder
:
true
,
adjustList
:
[]
}
},
components
:
{
...
...
@@ -135,6 +137,20 @@ export default {
created
(){
this
.
searchText
=
this
.
$route
.
query
.
searchText
||
''
console
.
log
(
this
.
searchText
)
let
_this
=
this
;
window
.
__getUserInfo
=
function
(
params
){
_this
.
token
=
params
.
userToken
// _this.SET_USER_INFO(params)
_this
.
search
()
_this
.
getAdjustData
()
}
if
(
window
.
__isWeb
)
{
_this
.
getAdjustData
()
// _this.search()
}
window
.
__refresh
=
function
(){
_this
.
getUserInfo
()
}
},
mounted
(){
// this.search(this.searchText)
...
...
@@ -146,7 +162,7 @@ export default {
this
.
navIndex
=
index
},
// 搜索结果
search
(
searchText
)
{
search
()
{
this
.
showLoading
=
true
let
_this
=
this
,
para
=
{
...
...
@@ -241,6 +257,31 @@ export default {
d
[
i
].
play
=
'0'
;
}
return
d
;
},
//为您推荐
getAdjustData
(){
this
.
adjustList
=
[]
let
_this
=
this
,
parm
=
{
pageNo
:
1
,
pageSize
:
10
,
token
:
_this
.
token
,
setEntry
:
'headers'
,
}
_this
.
GET
(
'contents/courses/recommendCourseList'
,
parm
).
then
(
function
(
res
){
if
(
res
.
code
===
'000000'
){
_this
.
adjustList
=
res
.
data
||
[];
// _this.adjustPageNo = 1;
// _this.SET_DATA(_this.adjustList)
// if(_this.adjustList.length>0){
// _this.userToken = userToken
// }
}
})
},
getUserInfo
:
function
()
{
rocNative
.
getUserInfo
({
'__funcName'
:
'__getUserInfo'
})
}
},
}
...
...
src/views/search-index.vue
浏览文件 @
c5652d10
...
...
@@ -14,16 +14,18 @@
</
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'
;
import
HotLabels
from
'../components/business/hot-labels'
;
// import { Search } from 'mint-ui';
export
default
{
data
()
{
return
{
searchText
:
''
searchText
:
''
,
token
:
''
}
},
components
:
{
...
...
@@ -35,11 +37,47 @@ export default {
created
(){
},
computed
:{
...
mapState
([
'sousuo'
])
},
mounted
(){
this
.
getData
()
let
_self
=
this
;
window
.
__getUserInfo
=
function
(
params
){
_self
.
token
=
params
.
userToken
// _self.SET_USER_INFO(params)
_self
.
getData
()
}
window
.
__refresh
=
function
(){
_self
.
getUserInfo
()
}
window
.
__getStatusBarHeight
=
function
(
params
){
_self
.
SET_NAVBAR_HEIGHT
(
params
)
}
// window.__getStatusBarHeight = function(parm){
// //lert(parm.statusBarHeight)
// if(window.__isAndroid){
// _this.popHeight = parseInt(parm.statusBarHeight)/2.5
// }else{
// _this.popHeight = parm.statusBarHeight
// }
// _this.ptop = _this.popHeight+'px';
// _this.menuptop = _this.popHeight+'px'
// // alert(parm.statusBarHeight);
// }
if
(
window
.
__isWeb
)
{
_self
.
getData
()
}
_self
.
getUserInfo
()
_self
.
getStatusBarHeight
()
},
methods
:
{
...
mapMutations
([
'SET_USER_INFO'
,
'SET_NAVBAR_HEIGHT'
]),
// 跳转到结果页面,并
search
()
{
if
(
!
this
.
searchText
)
return
;
...
...
@@ -67,6 +105,12 @@ export default {
}
}
})
},
getUserInfo
:
function
()
{
rocNative
.
getUserInfo
({
'__funcName'
:
'__getUserInfo'
})
},
getStatusBarHeight
:
function
()
{
rocNative
.
getStatusBarHeight
({
'__funcName'
:
'__getStatusBarHeight'
})
}
},
}
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录