|
@@ -6,7 +6,8 @@
|
|
|
<NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="main">
|
|
|
- <el-input v-model="phone"></el-input>
|
|
|
+ <el-input v-model="info.phone"></el-input>
|
|
|
+ <el-input v-model="info.passwd" password></el-input>
|
|
|
<el-button @click="bindBtn()" type="primary">确认绑定</el-button>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
@@ -45,8 +46,16 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
- bindBtn() {
|
|
|
- console.log(this.phone);
|
|
|
+ ...authUser(['create']),
|
|
|
+ async bindBtn() {
|
|
|
+ let obj = { ...JSON.parse(JSON.stringify(this.info)), role: '4', openid: this.openid };
|
|
|
+ let res = await this.create(obj);
|
|
|
+ if (res.errcode == '0') {
|
|
|
+ this.$message.success('注册成功');
|
|
|
+ WeixinJSBridge.call('closeWindow');
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.errmsg);
|
|
|
+ }
|
|
|
},
|
|
|
},
|
|
|
mounted() {
|