|
|
|
@ -189,7 +189,7 @@ |
|
|
|
<script setup> |
|
|
|
import { ref } from "vue"; |
|
|
|
// 导入完整的国家列表 |
|
|
|
import countryList from "../login/list"; |
|
|
|
import countryList from "../Registration/list"; |
|
|
|
import footerBar from "../../../components/footerBar"; |
|
|
|
import uniPopup from "../../../uni_modules/uni-popup/components/uni-popup/uni-popup.vue"; |
|
|
|
import { verificationPhone, verificationEmail } from "../login/verification"; |
|
|
|
@ -198,12 +198,13 @@ import { |
|
|
|
SendEmailCodeApi, |
|
|
|
SendPhoneCodeApi, |
|
|
|
} from "../../../api/start/login"; |
|
|
|
import { useDeviceStore} from "../../../stores/modules/deviceInfo" |
|
|
|
import { useUserStore} from "../../../stores/modules/userInfo" |
|
|
|
import { useDeviceStore } from "../../../stores/modules/deviceInfo"; |
|
|
|
import { useUserStore } from "../../../stores/modules/userInfo"; |
|
|
|
|
|
|
|
const type = ref(""); |
|
|
|
const email = ref(""); |
|
|
|
const password = ref(""); |
|
|
|
const deepChartID = ref(""); |
|
|
|
const phone = ref(""); |
|
|
|
const country = ref("+86"); |
|
|
|
const agreed = ref(false); |
|
|
|
@ -241,6 +242,7 @@ function showCountryPicker() { |
|
|
|
), |
|
|
|
success: function (res) { |
|
|
|
selectedCountry.value = countries.value[res.tapIndex]; |
|
|
|
country.value = selectedCountry.value.code; |
|
|
|
}, |
|
|
|
}); |
|
|
|
} |
|
|
|
@ -281,14 +283,15 @@ async function register() { |
|
|
|
const registerType = changeLoginType(); |
|
|
|
isLoading.value = true; |
|
|
|
|
|
|
|
const deviceStore = useDeviceStore() |
|
|
|
const deviceStore = useDeviceStore(); |
|
|
|
|
|
|
|
const res = await registerApi({ |
|
|
|
registerType: registerType, |
|
|
|
phoneCountry: country.value, //手机号所属地区 |
|
|
|
account: account, |
|
|
|
verifyCode: verifyCode.value, |
|
|
|
agree: agreed.value, |
|
|
|
deviceId:deviceStore.deviceInfo.deviceId |
|
|
|
deviceId: deviceStore.deviceInfo.deviceId, |
|
|
|
}); |
|
|
|
|
|
|
|
isLoading.value = false; |
|
|
|
@ -326,7 +329,7 @@ function changeAccount() { |
|
|
|
} |
|
|
|
|
|
|
|
if (switchType.value === "Phone") { |
|
|
|
account.value = `${country.value}-${phone.value}`; |
|
|
|
account.value = phone.value; |
|
|
|
} |
|
|
|
if (switchType.value === "Email") { |
|
|
|
account.value = email.value; |
|
|
|
@ -511,9 +514,9 @@ async function sendCode() { |
|
|
|
if (switchType.value === "Phone") { |
|
|
|
// 发送验证码 |
|
|
|
|
|
|
|
const phoneAll = `${country.value}-${phone.value}`; |
|
|
|
const res = await SendPhoneCodeApi({ |
|
|
|
phone: phoneAll, |
|
|
|
phoneCountry: country.value, //手机号地区 |
|
|
|
phone: phone.value, |
|
|
|
}); |
|
|
|
console.log("手机验证码:", res.message); |
|
|
|
|
|
|
|
|