From a0ba05a58ee100d7f9af2ba2425b4c3a8a06bdcf Mon Sep 17 00:00:00 2001
From: Anne_LXM <54163582+anne-lxm@users.noreply.github.com>
Date: Thu, 25 Jan 2024 16:49:52 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E5=85=BC=E5=AE=B9uni-app-x=20web?=
=?UTF-8?q?=E7=AB=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
App.uvue | 6 +-
.../components/uni-captcha/uni-captcha.uvue | 6 +-
.../uni-popup-captcha/uni-popup-captcha.uvue | 8 +-
.../uni-id-pages-x-agreements.uvue | 18 ++--
.../uni-id-pages-x-avatar.uvue | 25 +++---
.../uni-id-pages-x-fab-login.uvue | 6 +-
.../uni-id-pages-x-input.uvue | 30 +++----
.../uni-id-pages-x-loginByPwd.uvue | 15 ++--
.../uni-id-pages-x-loginBySmsCode.uvue | 26 +++---
.../uni-id-pages-x-popup-dialog.uvue | 4 +-
.../fab-sms-code-input.uvue | 8 +-
.../uni-id-pages-x-smsCode.uvue | 34 ++++----
uni_modules/uni-id-pages-x/config.uts | 2 +-
uni_modules/uni-id-pages-x/init.uts | 79 ++++++++---------
uni_modules/uni-id-pages-x/lib/Univerify.uts | 84 +++++++++----------
.../uni-id-pages-x/pages/login/login.uvue | 2 +-
.../pages/register/register.uvue | 16 ++--
.../pages/retrieve/retrieve.uvue | 18 ++--
.../pages/userinfo/bindMobile/bindMobile.uvue | 18 ++--
.../userinfo/setNickname/setNickname.uvue | 6 +-
.../pages/userinfo/userinfo.uvue | 2 -
uni_modules/uni-id-pages-x/store.uts | 8 +-
22 files changed, 209 insertions(+), 212 deletions(-)
diff --git a/App.uvue b/App.uvue
index e769e94..4639636 100644
--- a/App.uvue
+++ b/App.uvue
@@ -34,7 +34,9 @@
}
-
\ No newline at end of file
+
diff --git a/uni_modules/uni-captcha/components/uni-captcha/uni-captcha.uvue b/uni_modules/uni-captcha/components/uni-captcha/uni-captcha.uvue
index 7e51c7b..e1851f8 100644
--- a/uni_modules/uni-captcha/components/uni-captcha/uni-captcha.uvue
+++ b/uni_modules/uni-captcha/components/uni-captcha/uni-captcha.uvue
@@ -11,7 +11,7 @@
\ No newline at end of file
+
diff --git a/uni_modules/uni-id-pages-x/components/uni-id-pages-x-fab-login/uni-id-pages-x-fab-login.uvue b/uni_modules/uni-id-pages-x/components/uni-id-pages-x-fab-login/uni-id-pages-x-fab-login.uvue
index e75309b..ca1597b 100644
--- a/uni_modules/uni-id-pages-x/components/uni-id-pages-x-fab-login/uni-id-pages-x-fab-login.uvue
+++ b/uni_modules/uni-id-pages-x/components/uni-id-pages-x-fab-login/uni-id-pages-x-fab-login.uvue
@@ -71,7 +71,7 @@
},
watch: {
agree(agree) {
- this.univerifyStyle.privacyTerms.defaultCheckBoxState = agree
+ this.univerifyStyle.privacyTerms!.defaultCheckBoxState = agree
}
},
methods: {
@@ -127,8 +127,8 @@
.fab-login-box {
width: 750rpx;
position: fixed;
- bottom: 30;
- left: 0;
+ bottom: 30px;
+ left: 0px;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-around;
diff --git a/uni_modules/uni-id-pages-x/components/uni-id-pages-x-input/uni-id-pages-x-input.uvue b/uni_modules/uni-id-pages-x/components/uni-id-pages-x-input/uni-id-pages-x-input.uvue
index 375f0f3..8e1cc69 100644
--- a/uni_modules/uni-id-pages-x/components/uni-id-pages-x-input/uni-id-pages-x-input.uvue
+++ b/uni_modules/uni-id-pages-x/components/uni-id-pages-x-input/uni-id-pages-x-input.uvue
@@ -7,8 +7,8 @@
:password="password && !visiblePwd" :focus="focus" @blur="onBlur" @focus="onFocus" @confirm="confirm"
:confirm-type="confirmType" />
-
@@ -20,7 +20,7 @@
-
\ No newline at end of file
+
diff --git a/uni_modules/uni-id-pages-x/pages/retrieve/retrieve.uvue b/uni_modules/uni-id-pages-x/pages/retrieve/retrieve.uvue
index e637a8a..5bf9a5d 100644
--- a/uni_modules/uni-id-pages-x/pages/retrieve/retrieve.uvue
+++ b/uni_modules/uni-id-pages-x/pages/retrieve/retrieve.uvue
@@ -23,14 +23,14 @@
data() {
return {
smsCode: "",
- $smsCodeRef: null as null | UniIdPagesXSmsCodeComponentPublicInstance,
+ smsCodeRef: null as null | UniIdPagesXSmsCodeComponentPublicInstance,
password: "",
password2: "",
captcha: ""
}
},
mounted() {
- this.$smsCodeRef = (this.$refs["smsCode"] as UniIdPagesXSmsCodeComponentPublicInstance)
+ this.smsCodeRef = (this.$refs["smsCode"] as UniIdPagesXSmsCodeComponentPublicInstance)
},
onLoad(param : Map) {
const mobile = param.get("mobile")
@@ -40,7 +40,7 @@
if (mobile != null) {
this.$nextTick(() => {
- this.$smsCodeRef!.mobile = mobile
+ this.smsCodeRef!.mobile = mobile
})
}
},
@@ -85,7 +85,7 @@
}
});
}
- this.$smsCodeRef!.sendSmsCode();
+ this.smsCodeRef!.sendSmsCode();
},
resetPwdBySms(param : UTSJSONObject) {
uni.showLoading({ "title": "请求中" })
@@ -95,17 +95,17 @@
.finally(() : void => {
uni.hideLoading()
})
- .then((_ : UTSJSONObject) : void => {
+ .then((_ : UTSJSONObject) : void => {
// console.log('then');
// console.log(e);
- this.$smsCodeRef!.hideCodeInput();
+ this.smsCodeRef!.hideCodeInput();
uni.showToast({
title: '重置成功',
icon: 'none'
});
uni.navigateBack()
})
- .catch((err : any | null) : void => {
+ .catch((err : any | null) : void => {
const error = err as UniCloudError
console.error(error)
console.error(error.code)
@@ -119,7 +119,7 @@
icon: 'none',
mask: false
});
- this.$smsCodeRef!.clearCodeInput()
+ this.smsCodeRef!.clearCodeInput()
this.captcha = ""
}
})
@@ -139,4 +139,4 @@
.form {
margin:50rpx 50rpx 0 50rpx;
}
-
\ No newline at end of file
+
diff --git a/uni_modules/uni-id-pages-x/pages/userinfo/bindMobile/bindMobile.uvue b/uni_modules/uni-id-pages-x/pages/userinfo/bindMobile/bindMobile.uvue
index 9e3d3c0..0ebd69e 100644
--- a/uni_modules/uni-id-pages-x/pages/userinfo/bindMobile/bindMobile.uvue
+++ b/uni_modules/uni-id-pages-x/pages/userinfo/bindMobile/bindMobile.uvue
@@ -18,7 +18,7 @@
export default {
data() {
return {
- $smsCodeEl: null as null | UniIdPagesXSmsCodeComponentPublicInstance,
+ smsCodeEl: null as null | UniIdPagesXSmsCodeComponentPublicInstance,
needCaptcha: false,
captcha: ""
}
@@ -28,11 +28,11 @@
watch: {
},
mounted() {
- this.$smsCodeEl = (this.$refs["smsCode"] as UniIdPagesXSmsCodeComponentPublicInstance)
+ this.smsCodeEl = (this.$refs["smsCode"] as UniIdPagesXSmsCodeComponentPublicInstance)
},
methods: {
sendSmsCode() {
- this.$smsCodeEl!.sendSmsCode();
+ this.smsCodeEl!.sendSmsCode();
},
smsCodeInput(param : UTSJSONObject) {
// console.log('smsCodeInput param', param);
@@ -69,9 +69,9 @@
.finally(() : void => {
uni.hideLoading()
})
- .then((e : UTSJSONObject) : void => {
+ .then((e : UTSJSONObject) : void => {
// console.log('then');
- // console.log(e);
+ console.log(e);
uni.showToast({
title: '绑定成功',
icon: 'none',
@@ -84,7 +84,7 @@
"mobile": param.getString("mobile")
} as UTSJSONObject)
})
- .catch((err : any | null) : void => {
+ .catch((err : any | null) : void => {
const error = err as UniCloudError
console.error(error)
console.error(error.code)
@@ -93,9 +93,9 @@
//登录失败,自动重新获取验证码
return setCaptchaRetry()
} else if (error.code == "uni-id-mobile-verify-code-error") {
- this.$smsCodeEl!.clearCodeInput();
+ this.smsCodeEl!.clearCodeInput();
} else {
- this.$smsCodeEl!.reset();
+ this.smsCodeEl!.reset();
this.captcha = ""
}
uni.showToast({
@@ -108,7 +108,7 @@
},
popupCaptchaCancel() {
// console.log('popupCaptchaCancel');
- this.$smsCodeEl!.reset();
+ this.smsCodeEl!.reset();
this.captcha = ""
}
}
diff --git a/uni_modules/uni-id-pages-x/pages/userinfo/setNickname/setNickname.uvue b/uni_modules/uni-id-pages-x/pages/userinfo/setNickname/setNickname.uvue
index 558f06e..8cc15e5 100644
--- a/uni_modules/uni-id-pages-x/pages/userinfo/setNickname/setNickname.uvue
+++ b/uni_modules/uni-id-pages-x/pages/userinfo/setNickname/setNickname.uvue
@@ -57,11 +57,11 @@
.update({
"nickname": this.nickname
})
- .then(() => {
+ .then(() => {
mutations.updateUserInfo({ "nickname": this.nickname } as UTSJSONObject)
uni.navigateBack()
})
- .catch((err : any | null) => {
+ .catch((err : any | null) => {
const error = err as UniCloudError
console.error('error', error);
})
@@ -106,4 +106,4 @@
background-color: #EFEFEF;
color: #AAA;
}
-
\ No newline at end of file
+
diff --git a/uni_modules/uni-id-pages-x/pages/userinfo/userinfo.uvue b/uni_modules/uni-id-pages-x/pages/userinfo/userinfo.uvue
index 48c00c8..0bbc03e 100644
--- a/uni_modules/uni-id-pages-x/pages/userinfo/userinfo.uvue
+++ b/uni_modules/uni-id-pages-x/pages/userinfo/userinfo.uvue
@@ -83,8 +83,6 @@
return authStatus as number
}
},
- onShow() {
- },
props: {
showLoginManage: {
type: Boolean,
diff --git a/uni_modules/uni-id-pages-x/store.uts b/uni_modules/uni-id-pages-x/store.uts
index 3d1c490..17b43bf 100644
--- a/uni_modules/uni-id-pages-x/store.uts
+++ b/uni_modules/uni-id-pages-x/store.uts
@@ -35,7 +35,7 @@ type Mutations = {
}
export const mutations = {
updateUserInfo(param: null | UTSJSONObject) {
- // console.log('updateUserInfo', param); // param为 null 时从云端获取数据更新,为UTSJSONObject时直接根据传入的值来更新
+ console.log('updateUserInfo', param); // param为 null 时从云端获取数据更新,为UTSJSONObject时直接根据传入的值来更新
function afterUpdateUserInfo() {
// console.log('afterUpdateUserInfo', state.userInfo);
uni.setStorageSync('uni-id-pages-x-userInfo', state.userInfo)
@@ -50,7 +50,7 @@ export const mutations = {
.doc(user_id)
.field('_id,username,nickname,avatar_file,mobile')
.get()
- .then(res => {
+ .then(res => {
const uniIdCo = uniCloud.importObject('uni-id-co', {
customUI: true
})
@@ -65,14 +65,14 @@ export const mutations = {
afterUpdateUserInfo()
})
})
- .catch((err: any | null) => {
+ .catch((err: any | null) => {
const error = err as UniCloudError
console.error(error.errMsg, '错误')
})
}
} else {
param.toMap().forEach((value, key) => {
- // console.log("updateUserInfo.", key, value)
+ console.log("updateUserInfo.", key, value)
state.userInfo.set(key, value)
})
afterUpdateUserInfo()
--
GitLab