|
|
@@ -55,7 +55,7 @@ |
|
|
|
class="bottomBtn" |
|
|
|
type="default" |
|
|
|
id="getPhoneNumber" |
|
|
|
@click="phoneLogin" |
|
|
|
@click="showForm = true" |
|
|
|
> |
|
|
|
开始制作我的数字分身 |
|
|
|
</button> |
|
|
@@ -80,8 +80,11 @@ |
|
|
|
</text> |
|
|
|
</u-checkbox-group> |
|
|
|
</view> |
|
|
|
<!-- 手机号验证码登录 --> |
|
|
|
<view class="phoneLoginForm" v-show="userInfoModulesPinia.platForm == 3"> |
|
|
|
<!-- 抖音手机号验证码登录 --> |
|
|
|
<view |
|
|
|
class="phoneLoginForm" |
|
|
|
v-show="userInfoModulesPinia.platForm == 3 && showForm" |
|
|
|
> |
|
|
|
<u--form |
|
|
|
labelPosition="left" |
|
|
|
:model="formData" |
|
|
@@ -291,6 +294,7 @@ const goPro = () => { |
|
|
|
//#endregion --------------------- |
|
|
|
|
|
|
|
//#region 抖音手机号登录 |
|
|
|
const showForm = ref(false); |
|
|
|
const formData = ref({ |
|
|
|
phoneNum: null, |
|
|
|
codeNum: null, |
|
|
@@ -327,14 +331,15 @@ function getCode() { |
|
|
|
timerFlag.value = true; |
|
|
|
formRef.value |
|
|
|
.validate() |
|
|
|
.then(async (res) => { |
|
|
|
.then(async (res0) => { |
|
|
|
try { |
|
|
|
uni.showLoading({ |
|
|
|
title: "请稍后", |
|
|
|
mask: true, |
|
|
|
}); |
|
|
|
console.log("duanxing1"); |
|
|
|
const res = await getCodeApi(formData.value.phoneNum); |
|
|
|
console.log(res.code, "duanxing"); |
|
|
|
console.log(res.code, "duanxing2"); |
|
|
|
uni.hideLoading(); |
|
|
|
if (res.code != 200) { |
|
|
|
uni.showToast({ |
|
|
@@ -359,7 +364,7 @@ function getCode() { |
|
|
|
uni.$u.toast("短信验证码获取失败"); |
|
|
|
clearInterval(countdownTimer.value); |
|
|
|
countdownTimer.value = null; |
|
|
|
backwardsNum.value = 5; |
|
|
|
backwardsNum.value = 60; |
|
|
|
timerFlag.value = false; |
|
|
|
} |
|
|
|
}) |
|
|
@@ -384,6 +389,7 @@ async function loginByCode() { |
|
|
|
console.log(res); |
|
|
|
uni.hideLoading(); |
|
|
|
userInfoModulesPinia.token = res.data.token; |
|
|
|
uni.setStorageSync("token", userInfoModulesPinia.token); |
|
|
|
console.log(res.code, "denglu"); |
|
|
|
if (res.code != 200) { |
|
|
|
uni.showToast({ |
|
|
@@ -391,9 +397,9 @@ async function loginByCode() { |
|
|
|
icon: "none", |
|
|
|
}); |
|
|
|
} else { |
|
|
|
// uni.switchTab({ |
|
|
|
// url: "/pages/uploadPhoto/uploadPhoto", |
|
|
|
// }); |
|
|
|
uni.switchTab({ |
|
|
|
url: "/pages/uploadPhoto/uploadPhoto", |
|
|
|
}); |
|
|
|
} |
|
|
|
} catch (error) { |
|
|
|
uni.hideLoading(); |
|
|
@@ -491,6 +497,7 @@ onLoad((options) => { |
|
|
|
uni.login({ |
|
|
|
provider: "weixin", // 使用微信登录授权 |
|
|
|
success: async (res) => { |
|
|
|
console.log(res, "uni.login"); |
|
|
|
if (res.code) { |
|
|
|
try { |
|
|
|
uni.showLoading({ |
|
|
@@ -577,6 +584,7 @@ onLoad((options) => { |
|
|
|
uni.login({ |
|
|
|
provider: "toutiao", // 使用微信登录授权 |
|
|
|
success: async (res) => { |
|
|
|
console.log(res, "uni.login"); |
|
|
|
if (res.code) { |
|
|
|
try { |
|
|
|
uni.showLoading({ |
|
|
@@ -705,12 +713,13 @@ onLoad((options) => { |
|
|
|
left: 30rpx; |
|
|
|
width: 690rpx; |
|
|
|
z-index: 9; |
|
|
|
background-color: #fff; |
|
|
|
padding: 30rpx; |
|
|
|
background-color: rgba(255, 255, 255, 0.6); |
|
|
|
padding: 50rpx 30rpx; |
|
|
|
border-radius: 30rpx; |
|
|
|
|
|
|
|
.u-code { |
|
|
|
width: 100%; |
|
|
|
height: 50rpx; |
|
|
|
height: 80rpx; |
|
|
|
background-color: green; |
|
|
|
color: #ff4f00; |
|
|
|
} |
|
|
@@ -719,12 +728,14 @@ onLoad((options) => { |
|
|
|
background-color: green; |
|
|
|
text-align: center; |
|
|
|
line-height: 50rpx; |
|
|
|
border-radius: 15rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.loginBtn { |
|
|
|
background-color: #ff4f00; |
|
|
|
text-align: center; |
|
|
|
line-height: 50rpx; |
|
|
|
border-radius: 15rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|