From 27346d152836f4dc7652eb4dabc533a447da77bb Mon Sep 17 00:00:00 2001 From: congzc Date: Wed, 20 Sep 2023 16:15:33 +0800 Subject: [PATCH] 1 --- src/pages/closeStyle/goCreatePhoto.vue | 1 + src/pages/closeStyle/multiplayer.vue | 1 + src/pages/login/index.vue | 35 +++++++++++++++++--------- src/pages/uploadPhoto/uploadPhoto.vue | 1 + 4 files changed, 26 insertions(+), 12 deletions(-) diff --git a/src/pages/closeStyle/goCreatePhoto.vue b/src/pages/closeStyle/goCreatePhoto.vue index 816f89a..f5437b5 100644 --- a/src/pages/closeStyle/goCreatePhoto.vue +++ b/src/pages/closeStyle/goCreatePhoto.vue @@ -93,6 +93,7 @@ async function createing(id) { const res = await findImageApi(); let myImg = res.data.image; const data = { + plat: uni.getStorageSync("plat"), digitalAvatarId: id, userImages: JSON.stringify([myImg]), title: styleData.value.title, diff --git a/src/pages/closeStyle/multiplayer.vue b/src/pages/closeStyle/multiplayer.vue index 864fcc6..2a07034 100644 --- a/src/pages/closeStyle/multiplayer.vue +++ b/src/pages/closeStyle/multiplayer.vue @@ -318,6 +318,7 @@ async function createing(id) { myImgList.push(item.url); }); const data = { + plat: uni.getStorageSync("plat"), title: styleData.value.title, digitalAvatarId: id, userImages: diff --git a/src/pages/login/index.vue b/src/pages/login/index.vue index 6ac44e0..08e9dbc 100644 --- a/src/pages/login/index.vue +++ b/src/pages/login/index.vue @@ -55,7 +55,7 @@ class="bottomBtn" type="default" id="getPhoneNumber" - @click="phoneLogin" + @click="showForm = true" > 开始制作我的数字分身 @@ -80,8 +80,11 @@ - - + + { //#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; } } diff --git a/src/pages/uploadPhoto/uploadPhoto.vue b/src/pages/uploadPhoto/uploadPhoto.vue index 57949a7..e6aff14 100644 --- a/src/pages/uploadPhoto/uploadPhoto.vue +++ b/src/pages/uploadPhoto/uploadPhoto.vue @@ -339,6 +339,7 @@ onLoad((options) => { uni.login({ provider: "weixin", // 使用微信登录授权 success: async (res) => { + console.log(res, "uni.login"); if (res.code) { try { uni.showLoading({