ThirdModal.vue 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <template>
  2. <!-- 第三方登录绑定账号密码输入弹框 -->
  3. <a-modal title="请输入密码" v-model:open="thirdPasswordShow" @ok="thirdLoginCheckPassword" @cancel="thirdLoginNoPassword">
  4. <a-input-password placeholder="请输入密码" v-model:value="thirdLoginPassword" style="margin: 15px; width: 80%" />
  5. </a-modal>
  6. <!-- 第三方登录提示是否绑定账号弹框 -->
  7. <a-modal :footer="null" :closable="false" v-model:open="thirdConfirmShow" :class="'ant-modal-confirm'">
  8. <div class="ant-modal-confirm-body-wrapper">
  9. <div class="ant-modal-confirm-body">
  10. <QuestionCircleFilled style="color: #faad14" />
  11. <span class="ant-modal-confirm-title">提示</span>
  12. <div class="ant-modal-confirm-content"> 已有同名账号存在,请确认是否绑定该账号? </div>
  13. </div>
  14. <div class="ant-modal-confirm-btns">
  15. <a-button @click="thirdLoginUserCreate" :loading="thirdCreateUserLoding">创建新账号</a-button>
  16. <a-button @click="thirdLoginUserBind" type="primary">确认绑定</a-button>
  17. </div>
  18. </div>
  19. </a-modal>
  20. <!-- 第三方登录绑定手机号 -->
  21. <a-modal title="绑定手机号" v-model:open="bindingPhoneModal" :maskClosable="false">
  22. <Form class="p-4 enter-x" style="margin: 15px 10px">
  23. <FormItem class="enter-x">
  24. <a-input size="large" placeholder="请输入手机号" v-model:value="thirdPhone" class="fix-auto-fill">
  25. <template #prefix>
  26. <Icon icon="ant-design:mobile-outlined" :style="{ color: 'rgba(0,0,0,.25)' }"></Icon>
  27. </template>
  28. </a-input>
  29. </FormItem>
  30. <FormItem name="sms" class="enter-x">
  31. <CountdownInput size="large" class="fix-auto-fill" v-model:value="thirdCaptcha" placeholder="请输入验证码" :sendCodeApi="sendCodeApi">
  32. <template #prefix>
  33. <Icon icon="ant-design:mail-outlined" :style="{ color: 'rgba(0,0,0,.25)' }"></Icon>
  34. </template>
  35. </CountdownInput>
  36. </FormItem>
  37. </Form>
  38. <template #footer>
  39. <a-button type="primary" @click="thirdHandleOk">确定</a-button>
  40. </template>
  41. </a-modal>
  42. </template>
  43. <script lang="ts">
  44. import { defineComponent } from 'vue';
  45. import { Form, Input } from 'ant-design-vue';
  46. import { CountdownInput } from '/@/components/CountDown';
  47. import { useThirdLogin } from '/@/hooks/system/useThirdLogin';
  48. import { QuestionCircleFilled } from '@ant-design/icons-vue';
  49. const FormItem = Form.Item;
  50. const InputPassword = Input.Password;
  51. export default defineComponent({
  52. name: 'ThirdModal',
  53. components: { FormItem, Form, InputPassword, CountdownInput, QuestionCircleFilled },
  54. setup() {
  55. return {
  56. ...useThirdLogin(),
  57. };
  58. },
  59. });
  60. </script>