Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello uni-id-pages-x
提交
75cfd951
H
hello uni-id-pages-x
项目概览
DCloud
/
hello uni-id-pages-x
通知
37
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hello uni-id-pages-x
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
75cfd951
编写于
1月 30, 2024
作者:
A
Anne_LXM
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复 重置密码时提示未同意隐私政策的问题
上级
2c87cbbf
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
12 addition
and
32 deletion
+12
-32
uni_modules/uni-id-pages-x/components/uni-id-pages-x-loginBySmsCode/uni-id-pages-x-loginBySmsCode.uvue
...pages-x-loginBySmsCode/uni-id-pages-x-loginBySmsCode.uvue
+1
-1
uni_modules/uni-id-pages-x/components/uni-id-pages-x-smsCode/fab-sms-code-input.uvue
...components/uni-id-pages-x-smsCode/fab-sms-code-input.uvue
+2
-7
uni_modules/uni-id-pages-x/components/uni-id-pages-x-smsCode/uni-id-pages-x-smsCode.uvue
...onents/uni-id-pages-x-smsCode/uni-id-pages-x-smsCode.uvue
+6
-15
uni_modules/uni-id-pages-x/pages/retrieve/retrieve.uvue
uni_modules/uni-id-pages-x/pages/retrieve/retrieve.uvue
+1
-3
uni_modules/uni-id-pages-x/pages/userinfo/bindMobile/bindMobile.uvue
.../uni-id-pages-x/pages/userinfo/bindMobile/bindMobile.uvue
+2
-6
未找到文件。
uni_modules/uni-id-pages-x/components/uni-id-pages-x-loginBySmsCode/uni-id-pages-x-loginBySmsCode.uvue
浏览文件 @
75cfd951
...
...
@@ -34,7 +34,7 @@
},
methods: {
sendSmsCode() {
this.smsCodeRef!.$callMethod('sendSmsCode');
this.smsCodeRef!.$callMethod('sendSmsCode'
,true
);
},
smsCodeInput(param : UTSJSONObject) {
// console.log('smsCodeInput param', param);
...
...
uni_modules/uni-id-pages-x/components/uni-id-pages-x-smsCode/fab-sms-code-input.uvue
浏览文件 @
75cfd951
...
...
@@ -6,7 +6,7 @@
<text class="sms-code-tip">短信验证码已发送至{{mobile}}</text>
<view class="code-input-list">
<template v-for="(_,i) in smsCodeList" :key="i">
<!-- TODO APP :value="item" -->
<!-- TODO APP :value="item"
第一次不触发@input
-->
<input @input="setSmsCode(i,$event as InputEvent)" type="number" ref="code-input"
class="code-input" maxlength="7" @focus="onFocus(i)" />
</template>
...
...
@@ -71,7 +71,6 @@
hide() {
(this.$refs['popup'] as UniPopupComponentPublicInstance).close();
this.isOpen = false
// console.log('hide success');
},
clear() {
this.smsCodeList = ["\u200b", "\u200b", "\u200b", "\u200b", "\u200b", "\u200b"];
...
...
@@ -83,14 +82,12 @@
}
},
setSmsCode(i : number, e : InputEvent) {
// console.log('setSmsCode--',e);
const { value } = e.detail
console.log('~~',value,value.length);
//
console.log('~~',value,value.length);
// 已满6位数就直接调登录
let $value = value.replace(/\u200b/g, '')
if ($value.length == 6) {
// (this.$refs["code-input"] as Element[])[0].focus();
// console.log('~~~~~', $value, $value.split(''));
$value.split('').forEach((item : string, index : number) => {
this.smsCodeList[index] = "\u200b" + item
})
...
...
@@ -100,7 +97,6 @@
if (value.length > 2) {
this.$nextTick(() => {
let newValue = value.slice(value.length - 1)
// console.log('newValue', newValue);
this.smsCodeList[i] = newValue
})
}
...
...
@@ -124,7 +120,6 @@
}
},
onFocus(i : number) {
// console.log("onFocus",i);
if (this.smsCodeList[i].length == 0) {
this.smsCodeList[i] = '\u200b'
}
...
...
uni_modules/uni-id-pages-x/components/uni-id-pages-x-smsCode/uni-id-pages-x-smsCode.uvue
浏览文件 @
75cfd951
...
...
@@ -61,7 +61,7 @@
sendSmsCaptcha() {
this.emitInput()
if (this.autoSend && this.sendSmsCaptcha.length == 4 && this.mobile.length == 11) {
this.sendSmsCode()
this.sendSmsCode(
true
)
}
},
smsCode() {
...
...
@@ -71,7 +71,6 @@
mounted() {
this.fabSmsCodeInputEl = this.$refs["fab-sms-code-input"] as ComponentPublicInstance;
this.sendSmsCaptchaCP = this.$refs["sendSmsCaptcha"] as UniCaptchaComponentPublicInstance;
// 加载好,手机号码输入框就自动获取焦点
// TO 临时方案解决 this.$nextTick 无效,由setTimeout 300 代替
setTimeout(() => {
...
...
@@ -130,14 +129,13 @@
this.sendSmsCaptcha = ""
this.clearCodeInput()
this.hideCodeInput()
// console.log('reset');
},
sendSmsCode() {
console.log("state.pendingAgreements", state.pending
Agreements);
if (state.pendingAgreements) {
sendSmsCode(
needAgreements:boolean
) {
// console.log("state.pendingAgreements", state.pendingAgreements,need
Agreements);
if (
needAgreements &&
state.pendingAgreements) {
// uni.hideKeyboard();
this.sendSmsCaptchaCP!.setFocus(false);
// web端有问题
//
TODO
web端有问题
// (this.$parent as ComponentPublicInstance).$callMethod("showPopupCaptcha", () => {
// if (!state.pendingAgreements) {
// this.sendSmsCode()
...
...
@@ -146,7 +144,7 @@
// 临时方案
uni.$emit('uni-id-pages-x-loginBySmsCode-showPopupCaptcha',()=>{
if (!state.pendingAgreements) {
this.sendSmsCode()
this.sendSmsCode(
false
)
}
})
uni.showToast({
...
...
@@ -155,12 +153,10 @@
});
return
}
// console.log('sendSmsCode');
// 如果还在倒计时就显示出来输入框,阻止发送
if (this.reverseNumber != 0) {
return this.showCodeInput()
}
let reg_mobile = /^1\d{10}$/;
if (!reg_mobile.test(this.mobile)) {
(this.$refs['mobileInput'] as UniIdPagesXInputComponentPublicInstance).setFocus(true)
...
...
@@ -171,7 +167,6 @@
})
return
}
if (this.sendSmsCaptcha.length != 4) {
this.sendSmsCaptchaCP!.setFocus(true)
uni.showToast({
...
...
@@ -181,14 +176,12 @@
});
return
}
// const param : UTSJSONObject
// console.log('sendSmsCode',{
// "mobile": this.mobile,
// "scene": "login-by-sms",
// "captcha": this.sendSmsCaptcha
// });
uni.showLoading({ "title": "发送中" })
const uniIdCo = uniCloud.importObject("uni-id-co", { "customUI": true })
uniIdCo.sendSmsCode({
...
...
@@ -205,14 +198,12 @@
icon: 'none',
duration: 3000
});
// console.log('result', result);
this.showCodeInput()
})
.catch((err : any | null) : void => {
const error = err as UniCloudError
// console.error(error.message)
// console.error(error.code)
switch (error.code) {
case "uni-captcha-verify-fail":
uni.showToast({
...
...
uni_modules/uni-id-pages-x/pages/retrieve/retrieve.uvue
浏览文件 @
75cfd951
...
...
@@ -84,7 +84,7 @@
}
});
}
this.smsCodeRef!.sendSmsCode();
this.smsCodeRef!.sendSmsCode(
false
);
},
resetPwdBySms(param : UTSJSONObject) {
uni.showLoading({ "title": "请求中" })
...
...
@@ -95,8 +95,6 @@
uni.hideLoading()
})
.then((_ : UTSJSONObject) : void => {
// console.log('then');
// console.log(e);
this.smsCodeRef!.hideCodeInput();
uni.showToast({
title: '重置成功',
...
...
uni_modules/uni-id-pages-x/pages/userinfo/bindMobile/bindMobile.uvue
浏览文件 @
75cfd951
...
...
@@ -23,16 +23,12 @@
captcha: ""
}
},
computed: {
},
watch: {
},
mounted() {
this.smsCodeEl = (this.$refs["smsCode"] as UniIdPagesXSmsCodeComponentPublicInstance)
},
methods: {
sendSmsCode() {
this.smsCodeEl!.sendSmsCode();
this.smsCodeEl!.sendSmsCode(
false
);
},
smsCodeInput(param : UTSJSONObject) {
// console.log('smsCodeInput param', param);
...
...
@@ -70,7 +66,7 @@
uni.hideLoading()
})
.then((e : UTSJSONObject) : void => {
console.log(e,"-----------"
);
// console.log(e
);
uni.showToast({
title: '绑定成功',
icon: 'none',
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录