Commit 41767bce authored by peco's avatar peco

feat: 注册增加员工号。header增加loginName 和 StaffNo 字段

parent cd255f33
......@@ -27,6 +27,8 @@ const install = (Vue, vm) => {
config.header.Authorization = vm.vuex_token
config.header.requestId = vm.$u.guid()
config.header.source = "wechat"
config.header.loginName = uni.getStorageSync('username')
config.header.staffNo = uni.getStorageSync('staffNo')
return config
}, (config) => {
return Promise.reject(config)
......
......@@ -5,7 +5,7 @@
ref="uForm"
:model="params"
:error-type="['toast']"
:label-width="120"
:label-width="200"
>
<u-form-item label="用户名" prop="userName">
<u-input
......@@ -22,6 +22,13 @@
:password-icon="true"
/>
</u-form-item>
<u-form-item label="员工号(选填)" prop="staffNo">
<u-input
v-model="params.staffNo"
placeholder="填写员工号可以更精确的获取权限"
type="number"
/>
</u-form-item>
</u-form>
<u-button
class="my-u-block u-m-t-80"
......@@ -52,7 +59,8 @@ export default {
params: {
appId: wx.getAccountInfoSync().miniProgram.appId,
userName: '',
password: ''
password: '',
staffNo:''
},
rules: {
userName: [
......@@ -60,6 +68,9 @@ export default {
],
password: [
{ required: true, message: '请输入密码', trigger: 'blur' }
],
staffNumber:[
{ required: true, message: '员工号(选填)', trigger: 'blur' }
]
}
}
......@@ -126,6 +137,7 @@ export default {
uni.setStorageSync('authorized', info.authorized);
uni.setStorageSync('admin', info.admin);
uni.setStorageSync('show', info.show);
uni.setStorageSync('staffNo', info.staffNo);
}
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment