Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CFFP-HB
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chao Sun
CFFP-HB
Commits
3b08473e
Commit
3b08473e
authored
Jan 10, 2023
by
sunchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
relaunch改成redirectTo
parent
1b76257f
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
56 additions
and
32 deletions
+56
-32
components/login/login.vue
+9
-3
components/search/search.vue
+2
-6
pages/courseDetail/courseDetail.vue
+0
-5
pages/courselist/courselist.vue
+9
-6
pages/index/index.vue
+3
-5
pages/personalCenter/accountoperation/aboutcffp.vue
+3
-0
pages/personalCenter/accountoperation/resetpassword.vue
+4
-1
pages/personalCenter/personalCenter.vue
+6
-1
pages/personalCenter/system/cancellation.vue
+5
-2
pages/personalCenter/system/menulist.vue
+3
-0
pages/personalCenter/system/settings.vue
+10
-1
static/sqcg.png
+0
-0
util/router.js
+2
-2
No files found.
components/login/login.vue
View file @
3b08473e
...
...
@@ -16,7 +16,7 @@
<input
class=
"uni-input"
name=
"invitationCode"
placeholder=
"输入邀请码(非必填)"
v-model=
"invitation_code"
/>
</view>
-->
<view
class=
"inputItem"
v-if=
"loginType!=='agentlogin'"
>
<input
class=
"uni-input"
name=
"mobileNo"
placeholder=
"输入手机号"
v-model=
"form.mobile"
maxlength=
"11"
/>
<input
type=
"number"
class=
"uni-input"
name=
"mobileNo"
placeholder=
"输入手机号"
v-model=
"form.mobile"
maxlength=
"11"
/>
</view>
<view
class=
"inputItem"
v-if=
"loginType==='agentlogin'"
>
<input
class=
"uni-input"
name=
"mobileNo"
placeholder=
"输入账号"
v-model=
"form.account"
maxlength=
"11"
/>
...
...
@@ -155,16 +155,22 @@
}
api
.
loginVerification
(
params
).
then
((
res
)
=>
{
if
(
res
[
'success'
]){
console
.
log
(
1
)
this
.
userId
=
String
(
res
[
'data'
][
'userId'
]);
uni
.
setStorageSync
(
'isLogin'
,
'1'
)
uni
.
setStorageSync
(
'isLogin'
,
'1'
)
;
uni
.
setStorageSync
(
'cffp_userId'
,
this
.
userId
);
uni
.
setStorageSync
(
'loginType'
,
this
.
loginType
)
// uni.navigateTo({
// url:'/pages/index/index'
// })
console
.
log
(
2
)
// uni.switchTab({
// url: '/pages/courselist/courselist'
// })
uni
.
switchTab
({
url
:
'/pages/index/index'
url
:
'/pages/index/index'
})
console
.
log
(
3
)
}
else
{
uni
.
showToast
({
title
:
res
[
'message'
],
...
...
components/search/search.vue
View file @
3b08473e
...
...
@@ -48,16 +48,12 @@
}
else
{
//有参数就掉查询否则直接跳转到课程列表页
if
(
this
.
queryName
){
// this.$emit("send",this.queryName)
uni
.
navigateTo
({
url
:
`/pages/courselist/courselist?queryName=
${
this
.
queryName
}
`
})
}
else
{
uni
.
setStorageSync
(
'queryName'
,
this
.
queryName
)
}
uni
.
switchTab
({
url
:
'/pages/courselist/courselist'
})
}
}
}
},
...
...
pages/courseDetail/courseDetail.vue
View file @
3b08473e
...
...
@@ -270,14 +270,9 @@
}
},
goBack
()
{
let
back
=
getCurrentPages
();
if
(
back
&&
back
.
length
>
1
)
{
uni
.
navigateBack
({
delta
:
1
});
}
else
{
history
.
back
();
}
},
// 监听空白关闭
maskClick
(
val
)
{
...
...
pages/courselist/courselist.vue
View file @
3b08473e
<
template
>
<view
:class=
"
{pad:onlyShowList!=0}
">
<view
class=
"pad
"
>
<!--搜索组件-->
<search
:isSearch=
"1"
v-if=
"onlyShowList!=0"
@
send=
"getCourseList"
></search>
<search
:isSearch=
"1"
@
send=
"getCourseList"
></search>
<!--轮播组件-->
<carousel
:carouselList=
"fileUploadItemCFFPList"
v-if=
"onlyShowList!=0"
></carousel>
<carousel
:carouselList=
"fileUploadItemCFFPList"
></carousel>
<h4
v-if=
"cffpCourseInfos.length
<
=
0
"
class=
"noListTip"
>
暂无课程列表
</h4>
<view
class=
"ulBox"
v-if=
"cffpCourseInfos.length>0"
>
<view
class=
"liBox"
v-for=
"item in cffpCourseInfos"
:key=
"item.fileId"
@
click=
"goDetail(item)"
>
...
...
@@ -21,7 +21,7 @@
import
carousel
from
'@/components/carousel/carousel.vue'
;
import
search
from
'@/components/search/search.vue'
;
export
default
{
props
:[
'tagIds'
,
'onlyShowList'
],
props
:[
'tagIds'
],
data
(){
return
{
cffpCourseInfos
:[],
...
...
@@ -37,9 +37,9 @@
carousel
,
search
},
onLoad
(
options
){
onLoad
(){
this
.
fileUploadItemCFFPList
=
uni
.
getStorageSync
(
'fileUploadItemCFFPList'
);
this
.
queryName
=
options
.
queryName
;
this
.
queryName
=
uni
.
getStorageSync
(
'queryName'
)
;
},
methods
:{
goDetail
(
item
){
...
...
@@ -78,6 +78,9 @@
},
mounted
()
{
this
.
courseList
();
},
onHide
()
{
uni
.
removeStorageSync
(
'queryName'
)
}
}
</
script
>
...
...
pages/index/index.vue
View file @
3b08473e
...
...
@@ -163,7 +163,7 @@
search
,
courseItem
},
onLoad
(
options
)
{
onLoad
()
{
if
(
uni
.
getStorageSync
(
'isLogin'
))
{
this
.
queryAreaCenterInfo
();
this
.
announcementQuery
();
...
...
@@ -173,6 +173,7 @@
})
}
this
.
courseList
()
},
onShow
()
{
let
loginType
=
uni
.
getStorageSync
(
'loginType'
)
...
...
@@ -217,7 +218,7 @@
duration
:
2000
,
icon
:
'none'
});
uni
.
re
Launch
({
uni
.
re
directTo
({
url
:
'/components/login/login'
})
return
false
...
...
@@ -304,14 +305,11 @@
})
},
onChange
:
function
(
e
)
{
console
.
log
(
e
)
this
.
old
.
x
=
e
.
detail
.
x
this
.
old
.
y
=
e
.
detail
.
y
}
},
mounted
()
{
}
}
</
script
>
...
...
pages/personalCenter/accountoperation/aboutcffp.vue
View file @
3b08473e
...
...
@@ -40,6 +40,9 @@
created
()
{
},
destroyed
()
{
uni
.
hideToast
();
},
methods
:{
getFile
(
type
){
uni
.
navigateTo
({
...
...
pages/personalCenter/accountoperation/resetpassword.vue
View file @
3b08473e
...
...
@@ -36,6 +36,9 @@
codetimecode
:
false
}
},
destroyed
()
{
uni
.
hideToast
();
},
methods
:
{
sendMessage
()
{
const
params
=
{
...
...
@@ -76,7 +79,7 @@
icon
:
'none'
})
uni
.
removeStorageSync
(
'isLogin'
)
uni
.
re
Launch
({
uni
.
re
directTo
({
url
:
'/components/login/login'
})
//重置密码后需要密码登录
...
...
pages/personalCenter/personalCenter.vue
View file @
3b08473e
...
...
@@ -170,10 +170,15 @@
duration
:
2000
,
icon
:
'none'
});
uni
.
re
Launch
({
uni
.
re
directTo
({
url
:
'/components/login/login'
})
try
{
uni
.
clearStorageSync
();
}
catch
(
e
)
{
// console.log(e)
// error
}
return
false
},
// 菜单跳转页面
...
...
pages/personalCenter/system/cancellation.vue
View file @
3b08473e
...
...
@@ -38,9 +38,12 @@
let
dataForm
=
uni
.
getStorageSync
(
'userinfodataForm'
)
this
.
mobile
=
dataForm
.
mobile
},
destroyed
()
{
uni
.
hideToast
();
},
methods
:
{
cancel
(){
uni
.
navigateBack
(
1
)
uni
.
navigateBack
(
{
delta
:
1
}
)
},
sunmit
(){
api
.
cancellation
({
userId
:
this
.
userId
}).
then
(
res
=>
{
...
...
@@ -49,7 +52,7 @@
title
:
'操作成功'
,
icon
:
'none'
});
uni
.
re
Launch
({
uni
.
re
directTo
({
url
:
'/components/login/login'
})
}
...
...
pages/personalCenter/system/menulist.vue
View file @
3b08473e
...
...
@@ -31,6 +31,9 @@
mounted
()
{
console
.
log
(
this
.
minorMenuLists
,
7412
)
},
destroyed
()
{
uni
.
hideToast
();
},
methods
:
{
goDetail
(
item
)
{
console
.
log
(
item
,
844
)
...
...
pages/personalCenter/system/settings.vue
View file @
3b08473e
...
...
@@ -48,6 +48,9 @@ import MenuList from "@/components/menuList/menuList.vue"
]
}
},
destroyed
()
{
uni
.
hideToast
();
},
methods
:{
outLing
(){
uni
.
showModal
({
...
...
@@ -56,10 +59,16 @@ import MenuList from "@/components/menuList/menuList.vue"
showCancel
:
true
,
success
:
function
(
res
)
{
if
(
res
.
confirm
)
{
uni
.
reLaunch
({
console
.
log
(
getCurrentPages
().
length
)
uni
.
redirectTo
({
url
:
'/components/login/login'
})
try
{
uni
.
clearStorageSync
();
}
catch
(
e
)
{
console
.
log
(
e
)
// error
}
uni
.
showToast
({
title
:
'操作成功'
,
icon
:
'none'
...
...
static/sqcg.png
0 → 100644
View file @
3b08473e
11.9 KB
util/router.js
View file @
3b08473e
...
...
@@ -12,7 +12,7 @@ export default function initApp(){
// 页面跳转前进行拦截, invoke根据返回值进行判断是否继续执行跳转
invoke
(
e
)
{
if
(
!
hasPermission
(
e
.
url
)){
uni
.
re
Launch
({
uni
.
re
directTo
({
url
:
'/components/login/login'
})
return
false
...
...
@@ -27,7 +27,7 @@ export default function initApp(){
// tabbar页面跳转前进行拦截
invoke
(
e
)
{
if
(
!
hasPermission
(
e
.
url
)){
uni
.
re
Launch
({
uni
.
re
directTo
({
url
:
'/components/login/login'
})
return
false
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment