Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
NFT
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hanfeng zhang
NFT
Commits
0c830a03
Commit
0c830a03
authored
Jul 19, 2021
by
hanfeng zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
321
parent
5b9697b5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
140 additions
and
13 deletions
+140
-13
Cell.vue
src/components/common/Cell.vue
+1
-1
agreement.ts
src/const/agreement.ts
+109
-0
index.ts
src/router/index.ts
+5
-2
Service.ts
src/service/Service.ts
+2
-3
userInfoUtils.ts
src/util/userInfoUtils.ts
+4
-3
UserAgreement.vue
src/view/Auth/Login/UserAgreement.vue
+19
-4
No files found.
src/components/common/Cell.vue
View file @
0c830a03
...
...
@@ -138,7 +138,7 @@
<
script
lang=
"ts"
>
import
Vue
from
"vue"
;
import
Clipboard
from
"clipboard"
;
//
import Clipboard from "clipboard";
import
{
ActionSheet
}
from
"vant"
;
export
default
Vue
.
extend
({
...
...
src/const/agreement.ts
0 → 100644
View file @
0c830a03
This diff is collapsed.
Click to expand it.
src/router/index.ts
View file @
0c830a03
...
...
@@ -115,6 +115,7 @@ const routes: Array<RouteConfig> = [
name
:
'Login'
,
component
:
()
=>
import
(
"@/view/Auth/Login/index.vue"
)
},
// {
// path: '/auth/PwdSetting',
// name: 'PwdSetting',
...
...
@@ -147,8 +148,10 @@ const router = new VueRouter({
})
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
if
(
to
.
name
===
'Login'
&&
token
.
getToken
()
!==
null
)
{
next
({
name
:
'Home'
})
console
.
log
(
'to:'
,
to
,
'from:'
,
from
);
if
(
to
.
name
===
'Login'
&&
token
.
getToken
()
!=
null
)
{
// next({ name: 'Home' })
}
else
{
next
()
}
...
...
src/service/Service.ts
View file @
0c830a03
...
...
@@ -27,16 +27,15 @@ export class Service {
const
post
=
this
.
service
.
post
const
resolveData
=
async
(
ret
:
any
)
=>
{
if
(
ret
.
code
===
200
){
console
.
log
(
ret
);
if
(
ret
.
data
){
return
ret
.
data
;
}
return
ret
}
else
{
if
(
ret
.
code
===
401
){
Toast
.
fail
(
'请重新登录'
)
await
logoutUser
().
then
(()
=>
{
router
.
push
(
''
)
router
.
push
(
{
name
:
'Login'
}
)
})
}
Toast
.
fail
(
typeof
ret
.
data
===
"string"
?
ret
.
data
:
ret
.
message
)
...
...
src/util/userInfoUtils.ts
View file @
0c830a03
import
router
from
'@/router'
const
KEY_TOKEN
=
'KEY_TOKEN'
const
KEY_USER
=
'KEY_USER'
...
...
@@ -31,11 +31,12 @@ function setUserMsg(user: object) {
function
getUserMsg
():
object
|
null
{
let
userStr
;
try
{
userStr
=
localStorage
.
getItem
(
KEY_USER
)
userStr
=
localStorage
.
getItem
(
KEY_USER
)
}
catch
(
err
){
console
.
log
(
err
,
'123khi12oi3h12io3oi123io2j13oij12io3'
);
}
return
userStr
?
JSON
.
parse
(
userStr
)
:
router
.
push
({
name
:
'Login'
})
return
userStr
?
JSON
.
parse
(
userStr
)
:
''
}
function
clearUserMsg
(){
...
...
src/view/Auth/Login/UserAgreement.vue
View file @
0c830a03
<
template
>
<div
class=
"userAgreement h-full overflow-auto px-5"
>
<img
@
click=
"handleClickClose"
:src=
"closeIcon"
alt=
"close"
/>
<div
class=
"text-font-white text-sm"
v-for=
"n in 20"
:key=
"n"
>
这里是协议内容,待产品提供后,开发直接替换上去,这里是协议内容。
<div
class=
"flex flex-col w-11/12 mx-auto py-5 text-font-white"
>
<div
class=
"flex justify-between items-center"
>
<div
class=
"w-3/12"
>
<app-icon
name=
"icon-fanhui"
@
click
.
native=
"handleClickClose"
></app-icon>
</div>
<div
class=
'text-center w-6/12'
>
乐映用户协议
</div>
<div
class=
"w-3/12"
></div>
</div>
<div
class=
'flex py-6 justify-center'
>
<img
src=
"@/assets/img/cmp_logo.png"
class=
"h-12"
alt=
""
/>
</div>
<div>
</div>
</div>
</
template
>
...
...
@@ -17,8 +28,12 @@ export default Vue.extend({
data
()
{
return
{
closeIcon
,
};
},
components
:
{
'app-icon'
:()
=>
import
(
'@/components/common/Icon.vue'
),
},
methods
:
{
handleClick
()
{
console
.
log
(
123
);
...
...
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