qsh 2 months ago
parent 187c156e88
commit cad9fbb0e0
  1. 2
      src/api/login/index.ts
  2. 9
      src/views/Login/MPLogin.vue

@ -74,7 +74,7 @@ export const getAppInfo = (instanceId: number) => {
export const bindWx = (data: any) => { export const bindWx = (data: any) => {
return request.post({ return request.post({
url: '/admin-api/system/user/bing/wx', url: '/admin-api/system/user/bind/wx',
data data
}) })
} }

@ -9,9 +9,9 @@
<el-input v-model="form.password" placeholder="请输入密码" show-password type="password" /> <el-input v-model="form.password" placeholder="请输入密码" show-password type="password" />
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-button type="primary" :disabled="formLoading" class="w-full" @click="onSubmit" <el-button type="primary" :disabled="formLoading" class="w-full" @click="onSubmit">
>授权登陆</el-button 授权登陆
> </el-button>
</div> </div>
</template> </template>
@ -44,6 +44,7 @@ const params = ref({
// state:'code', // a-zA-Z0-9128 // state:'code', // a-zA-Z0-9128
}) })
const formLoading = ref(false)
async function onSubmit() { async function onSubmit() {
// code // code
if (!form.value.code) { if (!form.value.code) {
@ -59,9 +60,9 @@ async function onSubmit() {
try { try {
await bindWx(form.value) await bindWx(form.value)
message.success('绑定成功') message.success('绑定成功')
window.close()
} catch (error) { } catch (error) {
console.log(error) console.log(error)
message.success('绑定失败')
} finally { } finally {
formLoading.value = false formLoading.value = false
} }

Loading…
Cancel
Save