|
|
|
@ -9,9 +9,9 @@ |
|
|
|
|
<el-input v-model="form.password" placeholder="请输入密码" show-password type="password" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
<el-button type="primary" :disabled="formLoading" class="w-full" @click="onSubmit" |
|
|
|
|
>授权登陆</el-button |
|
|
|
|
> |
|
|
|
|
<el-button type="primary" :disabled="formLoading" class="w-full" @click="onSubmit"> |
|
|
|
|
授权登陆 |
|
|
|
|
</el-button> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
@ -44,6 +44,7 @@ const params = ref({ |
|
|
|
|
// state:'code', // a-zA-Z0-9的参数值,最多128字节 |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
const formLoading = ref(false) |
|
|
|
|
async function onSubmit() { |
|
|
|
|
// 这些需要判断没有 code 情况拉起授权登陆,有就结束放在重复拉起授权登陆 |
|
|
|
|
if (!form.value.code) { |
|
|
|
@ -59,9 +60,9 @@ async function onSubmit() { |
|
|
|
|
try { |
|
|
|
|
await bindWx(form.value) |
|
|
|
|
message.success('绑定成功') |
|
|
|
|
window.close() |
|
|
|
|
} catch (error) { |
|
|
|
|
console.log(error) |
|
|
|
|
message.success('绑定失败') |
|
|
|
|
} finally { |
|
|
|
|
formLoading.value = false |
|
|
|
|
} |
|
|
|
|