|
|
@@ -2,7 +2,7 @@
|
|
|
<el-form ref="form" :model="user" :rules="rules" label-width="80px">
|
|
|
<el-form-item label="用户昵称" prop="nickName">
|
|
|
<el-input v-model="user.nickName" />
|
|
|
- </el-form-item>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="手机号码" prop="phonenumber">
|
|
|
<el-input v-model="user.phonenumber" maxlength="11" />
|
|
|
</el-form-item>
|
|
|
@@ -16,6 +16,7 @@
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
+ <el-button type="success" size="mini" @click="unBind">换绑微信</el-button>
|
|
|
<el-button type="primary" size="mini" @click="submit">保存</el-button>
|
|
|
<el-button type="danger" size="mini" @click="close">关闭</el-button>
|
|
|
</el-form-item>
|
|
|
@@ -23,7 +24,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { updateUserProfile } from "@/api/company/companyUser";
|
|
|
+import { updateUserProfile, unBind } from "@/api/company/companyUser";
|
|
|
|
|
|
export default {
|
|
|
props: {
|
|
|
@@ -58,6 +59,29 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
+ unBind() {
|
|
|
+ this.$refs["form"].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ this.$confirm(
|
|
|
+ '确定要取消绑定吗?取消绑定后登录需要重新扫码绑定。',
|
|
|
+ '提示',
|
|
|
+ {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }
|
|
|
+ ).then(() => {
|
|
|
+ unBind(this.user.userId).then(response => {
|
|
|
+ if (response.code === 200) {
|
|
|
+ this.msgSuccess("解绑成功");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }).catch(() => {
|
|
|
+ this.msgInfo("已取消操作");
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
submit() {
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
if (valid) {
|