|
@@ -3,7 +3,7 @@
|
|
<!-- 公共组件-每个页面必须引入 -->
|
|
<!-- 公共组件-每个页面必须引入 -->
|
|
<public-module></public-module>
|
|
<public-module></public-module>
|
|
<u-form :model="form" ref="uForm" class="addStaffManage" >
|
|
<u-form :model="form" ref="uForm" class="addStaffManage" >
|
|
- <u-form-item label="姓名" prop="name"><u-input v-model="form.name" /></u-form-item>
|
|
|
|
|
|
+ <u-form-item label="姓名" prop="param1"><u-input v-model="form.param1" /></u-form-item>
|
|
<!-- <u-form-item label="性别">
|
|
<!-- <u-form-item label="性别">
|
|
<u-input type="select" :select-open="showSex" v-model="form.sex"
|
|
<u-input type="select" :select-open="showSex" v-model="form.sex"
|
|
placeholder="请选择性别" @click="showSex = true"
|
|
placeholder="请选择性别" @click="showSex = true"
|
|
@@ -12,7 +12,7 @@
|
|
@confirm="sexSelect"></u-select>
|
|
@confirm="sexSelect"></u-select>
|
|
|
|
|
|
</u-form-item> -->
|
|
</u-form-item> -->
|
|
- <u-form-item label="身份证号" prop="identity"><u-input v-model="form.identity" /></u-form-item>
|
|
|
|
|
|
+ <u-form-item label="身份证号" prop="param2"><u-input v-model="form.param2" /></u-form-item>
|
|
<u-button hover-class="none" :custom-style="submitBtnStyle" type="success" @click="submit">提交</u-button>
|
|
<u-button hover-class="none" :custom-style="submitBtnStyle" type="success" @click="submit">提交</u-button>
|
|
</u-form>
|
|
</u-form>
|
|
|
|
|
|
@@ -21,6 +21,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
+ import store from '@/store';
|
|
import {
|
|
import {
|
|
mapState
|
|
mapState
|
|
} from "vuex"
|
|
} from "vuex"
|
|
@@ -117,8 +118,8 @@
|
|
backgroundColor: "#ea552d",
|
|
backgroundColor: "#ea552d",
|
|
},
|
|
},
|
|
form: {
|
|
form: {
|
|
- name: '',
|
|
|
|
- identity: '',
|
|
|
|
|
|
+ param1: '',
|
|
|
|
+ param2: '',
|
|
},
|
|
},
|
|
actions: [{
|
|
actions: [{
|
|
value: '1',
|
|
value: '1',
|
|
@@ -134,14 +135,14 @@
|
|
}
|
|
}
|
|
],
|
|
],
|
|
rules: {
|
|
rules: {
|
|
- name: [
|
|
|
|
|
|
+ param1: [
|
|
{
|
|
{
|
|
required: true,
|
|
required: true,
|
|
message: '请输入姓名',
|
|
message: '请输入姓名',
|
|
trigger: ['blur', 'change']
|
|
trigger: ['blur', 'change']
|
|
}
|
|
}
|
|
],
|
|
],
|
|
- identity: [
|
|
|
|
|
|
+ param2: [
|
|
// {
|
|
// {
|
|
// required: true,
|
|
// required: true,
|
|
// message: '请输入身份证号',
|
|
// message: '请输入身份证号',
|
|
@@ -161,24 +162,46 @@
|
|
sexSelect(e) {
|
|
sexSelect(e) {
|
|
this.form.sex = e[0].label
|
|
this.form.sex = e[0].label
|
|
},
|
|
},
|
|
- async submit(){
|
|
|
|
|
|
+ submit(){
|
|
this.$refs.uForm.validate(valid => {
|
|
this.$refs.uForm.validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
- console.log('验证通过');
|
|
|
|
- console.log(this.userInfo.sysUser,11111111)
|
|
|
|
|
|
+ this.$http.post('/user/realNameAuth' ,this.form).then(res=>{
|
|
|
|
+ if(res.code==200){
|
|
|
|
+ // 更新个人信息
|
|
|
|
+ this.$http.get('/user/loginUser').then(res=>{
|
|
|
|
+ store.commit('setUserModules', {
|
|
|
|
+ title: 'userInfo',
|
|
|
|
+ data: {
|
|
|
|
+ sysUser:{...res.data}
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ uni.showToast({
|
|
|
|
+ icon: "none",
|
|
|
|
+ title: '提交成功',
|
|
|
|
+ duration: 1500
|
|
|
|
+ })
|
|
|
|
+ uni.reLaunch({
|
|
|
|
+ url: "/pages/index/index"
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ else{
|
|
|
|
+ uni.showToast({
|
|
|
|
+ icon: "none",
|
|
|
|
+ title: res.msg,
|
|
|
|
+ duration: 1500
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ // console.log('验证通过');
|
|
|
|
+ // console.log(this.userInfo.sysUser,11111111)
|
|
} else {
|
|
} else {
|
|
console.log('验证失败');
|
|
console.log('验证失败');
|
|
}
|
|
}
|
|
});
|
|
});
|
|
- // let res = await this.$http.post('/user/updateUserInfo/' + this.userInfo.sysUser.id,
|
|
|
|
- // {
|
|
|
|
- // sysUser:{name:this.form.name,identity:this.form.identity,status:'1',
|
|
|
|
- // mobile:this.userInfo.sysUser.mobile,deptId:this.userInfo.sysUser.deptId,
|
|
|
|
- // deptName:this.userInfo.sysUser.deptName,
|
|
|
|
- // },
|
|
|
|
- // sysUserInfo:{},
|
|
|
|
- // });
|
|
|
|
- // console.log(res,11111111)
|
|
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onReady() {
|
|
onReady() {
|