Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
E
ec-report-refactor
Project
Project
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
lihuizhen
ec-report-refactor
Commits
41767bce
Commit
41767bce
authored
May 23, 2022
by
peco
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 注册增加员工号。header增加loginName 和 StaffNo 字段
parent
cd255f33
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
2 deletions
+16
-2
http.interceptor.js
common/http.interceptor.js
+2
-0
login.vue
pages/login/login.vue
+14
-2
No files found.
common/http.interceptor.js
View file @
41767bce
...
@@ -27,6 +27,8 @@ const install = (Vue, vm) => {
...
@@ -27,6 +27,8 @@ const install = (Vue, vm) => {
config
.
header
.
Authorization
=
vm
.
vuex_token
config
.
header
.
Authorization
=
vm
.
vuex_token
config
.
header
.
requestId
=
vm
.
$u
.
guid
()
config
.
header
.
requestId
=
vm
.
$u
.
guid
()
config
.
header
.
source
=
"wechat"
config
.
header
.
source
=
"wechat"
config
.
header
.
loginName
=
uni
.
getStorageSync
(
'username'
)
config
.
header
.
staffNo
=
uni
.
getStorageSync
(
'staffNo'
)
return
config
return
config
},
(
config
)
=>
{
},
(
config
)
=>
{
return
Promise
.
reject
(
config
)
return
Promise
.
reject
(
config
)
...
...
pages/login/login.vue
View file @
41767bce
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
ref=
"uForm"
ref=
"uForm"
:model=
"params"
:model=
"params"
:error-type=
"['toast']"
:error-type=
"['toast']"
:label-width=
"
12
0"
:label-width=
"
20
0"
>
>
<u-form-item
label=
"用户名"
prop=
"userName"
>
<u-form-item
label=
"用户名"
prop=
"userName"
>
<u-input
<u-input
...
@@ -22,6 +22,13 @@
...
@@ -22,6 +22,13 @@
:password-icon=
"true"
:password-icon=
"true"
/>
/>
</u-form-item>
</u-form-item>
<u-form-item
label=
"员工号(选填)"
prop=
"staffNo"
>
<u-input
v-model=
"params.staffNo"
placeholder=
"填写员工号可以更精确的获取权限"
type=
"number"
/>
</u-form-item>
</u-form>
</u-form>
<u-button
<u-button
class=
"my-u-block u-m-t-80"
class=
"my-u-block u-m-t-80"
...
@@ -52,7 +59,8 @@ export default {
...
@@ -52,7 +59,8 @@ export default {
params
:
{
params
:
{
appId
:
wx
.
getAccountInfoSync
().
miniProgram
.
appId
,
appId
:
wx
.
getAccountInfoSync
().
miniProgram
.
appId
,
userName
:
''
,
userName
:
''
,
password
:
''
password
:
''
,
staffNo
:
''
},
},
rules
:
{
rules
:
{
userName
:
[
userName
:
[
...
@@ -60,6 +68,9 @@ export default {
...
@@ -60,6 +68,9 @@ export default {
],
],
password
:
[
password
:
[
{
required
:
true
,
message
:
'请输入密码'
,
trigger
:
'blur'
}
{
required
:
true
,
message
:
'请输入密码'
,
trigger
:
'blur'
}
],
staffNumber
:[
{
required
:
true
,
message
:
'员工号(选填)'
,
trigger
:
'blur'
}
]
]
}
}
}
}
...
@@ -126,6 +137,7 @@ export default {
...
@@ -126,6 +137,7 @@ export default {
uni
.
setStorageSync
(
'authorized'
,
info
.
authorized
);
uni
.
setStorageSync
(
'authorized'
,
info
.
authorized
);
uni
.
setStorageSync
(
'admin'
,
info
.
admin
);
uni
.
setStorageSync
(
'admin'
,
info
.
admin
);
uni
.
setStorageSync
(
'show'
,
info
.
show
);
uni
.
setStorageSync
(
'show'
,
info
.
show
);
uni
.
setStorageSync
(
'staffNo'
,
info
.
staffNo
);
}
}
},
},
...
...
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