Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sedu-mobile-v2
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liuzhanxin
sedu-mobile-v2
Commits
48e8c6c7
Commit
48e8c6c7
authored
Jul 02, 2020
by
liuzhanxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
32fdc1ed
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
78 additions
and
41 deletions
+78
-41
pages.json
cloudTrain/pages.json
+8
-7
index.vue
cloudTrain/pages/Security-Submit/index.vue
+16
-1
index.vue
cloudTrain/pages/login/index.vue
+54
-33
No files found.
cloudTrain/pages.json
View file @
48e8c6c7
{
"pages"
:
[
//pages数组中第一项表示应用启动页,参考:https
:
//uniapp.dcloud.io/collocation/pages
{
"path"
:
"pages/
main/main
"
,
"path"
:
"pages/
login/index
"
,
"style"
:
{
"navigationBarTitleText"
:
"
首页
"
"navigationBarTitleText"
:
"
登录
"
}
},
{
"path"
:
"pages/
user/user
"
,
"path"
:
"pages/
main/main
"
,
"style"
:
{
"navigationBarTitleText"
:
"
我的
"
"navigationBarTitleText"
:
"
首页
"
}
},
{
"path"
:
"pages/
login/index
"
,
"path"
:
"pages/
user/user
"
,
"style"
:
{
"navigationBarTitleText"
:
"
登录
"
"navigationBarTitleText"
:
"
我的
"
}
},
{
...
...
@@ -346,6 +346,7 @@
}]
},
"globalStyle"
:
{
"navigationBarBackgroundColor"
:
"#3F536E"
"navigationBarBackgroundColor"
:
"#3F536E"
,
"navigationStyle"
:
"custom"
}
}
cloudTrain/pages/Security-Submit/index.vue
View file @
48e8c6c7
...
...
@@ -118,7 +118,22 @@ import FormAlert from "@/components/form-alert/h-form-alert.vue"
dataId
:
''
}
},
onLoad
()
{
onLoad
()
{
// var bd = {
// "message":"查看 :
<
a
href
=
'https://app.cupl.edu.cn/uc/api/oauth/index?redirect=http://jwcsys.cupl.edu.cn/app/h5/index.html&appid=200200603160910748&state=zgtj'
>
3
wschool
<
/a>"
,
// "numbers":["kftd_liuzx","kftd_liuzx"]
// }
// uni.request({
// url: this.GLOBALUTIL.url+'/app-push/message',
// method: 'POST',
// header:this.GLOBALUTIL.commonHeader,
// data: JSON.stringify(bd),
// success: res => {
// console.log(res)
// },
// });
var
that
=
this
;
this
.
dataId
=
this
.
GLOBALUTIL
.
guid2
();
uni
.
$on
(
'addressSave'
,
function
(
data
){
...
...
cloudTrain/pages/login/index.vue
View file @
48e8c6c7
<
template
>
<view
class=
"content"
>
<view
v-if=
"showLogin"
class=
"content"
>
<view
class=
"input-group"
>
<view
class=
"input-row border"
>
<text
class=
"title"
>
账号:
</text>
...
...
@@ -21,9 +21,6 @@
<view
class=
"oauth-row"
v-if=
"hasProvider"
v-bind:style=
"
{top: positionTop + 'px'}">
<view
class=
"oauth-image"
v-for=
"provider in providerList"
:key=
"provider.value"
>
<image
:src=
"provider.image"
@
tap=
"oauth(provider.value)"
></image>
<!-- #ifdef MP-WEIXIN -->
<button
v-if=
"!isDevtools"
open-type=
"getUserInfo"
@
getuserinfo=
"getUserInfo"
></button>
<!-- #endif -->
</view>
</view>
</view>
...
...
@@ -52,12 +49,14 @@
password
:
"sysadmin"
,
positionTop
:
0
,
isDevtools
:
false
,
isDevelop
:
false
isDevelop
:
false
,
showLogin
:
false
}
},
// computed: mapState(['forcedLogin']),
methods
:
{
onLoad
()
{
uni
.
showLoading
();
const
sysInfo
=
uni
.
getSystemInfoSync
();
console
.
log
(
sysInfo
.
windowWidth
)
this
.
GLOBALUTIL
.
sysInfo
=
sysInfo
...
...
@@ -82,36 +81,58 @@
'Content-Type'
:
'application/x-www-form-urlencoded; charset=UTF-8'
,
},
success
:
(
res
)
=>
{
console
.
log
(
res
);
console
.
log
(
res
)
var
user
=
{};
user
.
id
=
res
.
data
.
userId
;
user
.
name
=
res
.
data
.
username
;
this
.
GLOBALUTIL
.
user
=
user
this
.
GLOBALUTIL
.
commonHeader
[
"x-auth-token"
]
=
res
.
data
.
token
;
this
.
GLOBALUTIL
.
commonHeader
[
"user"
]
=
JSON
.
stringify
(
user
);
switch
(
status
){
case
"zgtj"
:
uni
.
navigateTo
({
url
:
"../Security-Submit/index"
})
break
;
case
"zgcx"
:
uni
.
navigateTo
({
url
:
"../Rectification-Item/list"
})
break
;
case
"aqjc"
:
uni
.
navigateTo
({
url
:
"../Security-Check/security-task-list"
})
break
;
case
"yy"
:
uni
.
navigateTo
({
url
:
"../Appointment/list"
})
break
;
case
"wdyy"
:
uni
.
navigateTo
({
url
:
"../My-Appointment/list"
})
break
;
case
"spdb"
:
uni
.
navigateTo
({
url
:
"../Approval/list"
})
break
;
default
:
break
;
}
}
})
// uni.request({
// url: this.GLOBALUTIL.url+'/app-auth/accesstoken',
// method: 'GET',
// header: {
// 'Accept': 'application/json',
// 'Content-Type': 'application/json',
// },
// success: (res) => {
// console.log(res)
// var bod = {
// "code":code,
// "token":res.data
// }
// uni.request({
// url: this.GLOBALUTIL.url+'/app-auth/getUserInfo',
// method: 'POST',
// data: JSON.stringify(bod),
// header: {
// 'Accept': 'application/json',
// 'Content-Type': 'application/json',
// },
// success: (res1) => {
// console.log(res1)
// }
// })
// }
// })
console
.
log
(
code
)
console
.
log
(
status
)
}
...
...
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