|
@@ -150,6 +150,8 @@ import { ref, reactive, computed } from 'vue'
|
|
|
import { ElMessage } from 'element-plus'
|
|
import { ElMessage } from 'element-plus'
|
|
|
import { getAccountCompany, selectCompany, sendCode } from '@/apis/user';
|
|
import { getAccountCompany, selectCompany, sendCode } from '@/apis/user';
|
|
|
import useUserInfo from "@/stores/modules/user";
|
|
import useUserInfo from "@/stores/modules/user";
|
|
|
|
|
+import JSEncrypt from 'jsencrypt/bin/jsencrypt.min'
|
|
|
|
|
+import { publicKey } from '@/utils/publickey'
|
|
|
const showDialog = computed(() => props.dialogVisible)
|
|
const showDialog = computed(() => props.dialogVisible)
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
@@ -254,8 +256,17 @@ const sendVerificationCode = () => {
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ const encryptor = new JSEncrypt()
|
|
|
|
|
+ encryptor.setPublicKey(publicKey)
|
|
|
|
|
+ let _params = encryptor.encrypt(
|
|
|
|
|
+ JSON.stringify({
|
|
|
|
|
+ phone: loginForm.username,
|
|
|
|
|
+ time:new Date().getTime(),
|
|
|
|
|
+ device: 'h5'
|
|
|
|
|
+ })
|
|
|
|
|
+ )
|
|
|
sendCode({
|
|
sendCode({
|
|
|
- phone: loginForm.username
|
|
|
|
|
|
|
+ _params_: _params
|
|
|
}).then(() => {
|
|
}).then(() => {
|
|
|
isCodeSending.value = true
|
|
isCodeSending.value = true
|
|
|
countdown.value = 60
|
|
countdown.value = 60
|