Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
thinkApp
Project
Project
Details
Activity
Releases
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
游洁
thinkApp
Commits
1fe28707
Commit
1fe28707
authored
Sep 26, 2022
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整权限判定
parent
aaad6eaa
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
81 additions
and
23 deletions
+81
-23
user-card.vue
src/components/user-card.vue
+10
-0
indexassembly.vue
src/pages/index/components/indexassembly.vue
+14
-6
accountLogin.vue
src/pages/login/accountLogin.vue
+32
-2
timeTable.vue
src/pages/timetable/timeTable.vue
+6
-4
request.js
src/utils/request.js
+19
-11
No files found.
src/components/user-card.vue
View file @
1fe28707
...
...
@@ -58,6 +58,16 @@
});
data
.
erpUsers
=
uni
.
getStorageSync
(
'ErpStus'
)
data
.
currentErpUser
=
uni
.
getStorageSync
(
'erpUserInfo'
)
let
userInfo
=
uni
.
getStorageSync
(
'userInfo'
)
if
(
!
data
.
currentErpUser
){
data
.
erpUsers
.
forEach
(
x
=>
{
if
(
x
.
ClassInAccount
==
userInfo
.
Account
){
data
.
currentErpUser
=
x
uni
.
setStorageSync
(
'erpUserInfo'
,
x
)
}
})
}
let
methods
=
{
closeChangeUserHandler
(){
console
.
log
(
'in....'
)
...
...
src/pages/index/components/indexassembly.vue
View file @
1fe28707
...
...
@@ -138,19 +138,27 @@
},
setAccountsLogin
(
Accounts
){
getLoginAccounts
({
Accounts
}).
then
(
r
=>
{
let
erpStus
=
uni
.
getStorageSync
(
'ErpStus'
)
if
(
r
.
Data
&&
r
.
Data
.
length
>
0
){
let
erpStus
=
uni
.
getStorageSync
(
'ErpStus'
)
erpStus
.
forEach
(
x
=>
{
if
(
x
.
ClassInAccount
==
r
.
Data
[
0
].
Account
){
uni
.
setStorageSync
(
'erpUserInfo'
,
x
)
}
})
if
(
erpStus
){
erpStus
.
forEach
(
x
=>
{
if
(
x
.
ClassInAccount
==
r
.
Data
[
0
].
Account
){
uni
.
setStorageSync
(
'erpUserInfo'
,
x
)
}
})
}
uni
.
setStorageSync
(
"userInfo"
,
r
.
Data
[
0
]);
uni
.
setStorageSync
(
"users"
,
r
.
Data
)
console
.
log
(
r
.
Data
&&
r
.
Data
.
length
>
0
)
uni
.
reLaunch
({
url
:
'/pages/index/index'
})
}
else
if
(
erpStus
){
uni
.
setStorageSync
(
'erpUserInfo'
,
x
[
0
])
uni
.
reLaunch
({
url
:
'/pages/index/index'
})
}
}).
catch
(
e
=>
{
console
.
log
(
e
)
...
...
src/pages/login/accountLogin.vue
View file @
1fe28707
...
...
@@ -177,13 +177,17 @@
}
},
1000
);
}
else
{
data
.
loading
=
false
Toast
.
fail
(
"账号类型选择错误,请根据真实身份选择"
)
}
}
else
{
data
.
loading
=
false
methods
.
getErpStudentBindInfo
({
Account
:
msg
.
Account
})
//console.log('1111')
}
}).
catch
(
e
=>
{
console
.
log
(
e
)
data
.
loading
=
false
})
},
...
...
@@ -196,15 +200,41 @@
WImage
:
userWxInfo
.
userInfo
.
avatarUrl
,
UnionId
:
data
.
userAuth
.
unionid
}).
then
(
r
=>
{
console
.
log
(
r
)
if
(
r
.
Data
&&
r
.
Data
.
length
>
0
){
uni
.
setStorageSync
(
"ErpStus"
,
r
.
Data
)
let
flag
=
false
r
.
Data
.
forEach
(
x
=>
{
if
(
x
.
ClassInAccount
==
u
.
Account
){
flag
=
true
uni
.
setStorageSync
(
'erpUserInfo'
,
x
)
}
})
if
(
!
flag
){
r
.
Data
.
forEach
(
x
=>
{
if
(
x
.
RealPhone
==
u
.
Account
){
flag
=
true
uni
.
setStorageSync
(
'erpUserInfo'
,
x
)
}
})
}
if
(
flag
||
uni
.
getStorageSync
(
"userInfo"
)){
uni
.
setStorageSync
(
"ErpStus"
,
r
.
Data
)
methods
.
jumpPage
()
}
else
{
uni
.
showToast
({
title
:
'账号错误,未匹配到学员信息'
,
duration
:
2000
,
icon
:
"none"
});
}
}
else
if
(
uni
.
getStorageSync
(
"userInfo"
)){
methods
.
jumpPage
()
}
else
{
uni
.
showToast
({
title
:
'账号错误,未匹配到学员信息'
,
duration
:
2000
,
icon
:
"none"
});
}
})
}
...
...
src/pages/timetable/timeTable.vue
View file @
1fe28707
...
...
@@ -66,17 +66,18 @@
</view>
</view>
<van-toast
id=
"van-toast"
/>
<view
class=
"btnfixed"
>
<
!--
<
view
class=
"btnfixed"
>
<image
@
click=
"goappointment"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/yuyuebtn.png"
mode=
"widthFix"
></image>
</view>
</view>
-->
<tabbar
active-name=
'classtime'
></tabbar>
</view>
</
template
>
<
script
>
import
Item
from
"./timeTable-item.vue"
;
import
tabbar
from
'../../components/tabbar.vue'
import
{
ref
,
reactive
,
...
...
@@ -102,7 +103,8 @@
name
:
""
,
props
:
{},
components
:
{
Item
Item
,
tabbar
},
setup
(
props
)
{
const
Toast
=
inject
(
'$toast'
)
...
...
src/utils/request.js
View file @
1fe28707
...
...
@@ -43,19 +43,27 @@ let request = (param) => {
resolve
(
res
.
data
)
}
}
else
{
uni
.
showToast
({
title
:
res
.
data
.
Message
,
duration
:
2000
,
icon
:
"none"
,
success
()
{
if
(
res
.
data
.
Code
===
0
){
resolve
(
res
.
data
)
}
else
{
reject
()
let
shields
=
[
'手机号码登录失败、跳转至账号登录'
]
if
(
shields
.
indexOf
(
res
.
data
.
Message
)
==-
1
){
uni
.
showToast
({
title
:
res
.
data
.
Message
,
duration
:
2000
,
icon
:
"none"
,
success
()
{
if
(
res
.
data
.
Code
===
0
){
resolve
(
res
.
data
)
}
else
{
reject
()
}
}
});
}
else
{
if
(
res
.
data
.
Code
===
0
){
resolve
(
res
.
data
)
}
else
{
reject
()
}
});
}
}
}
...
...
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