Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello uni-id-pages-x
提交
598b3c87
H
hello uni-id-pages-x
项目概览
DCloud
/
hello uni-id-pages-x
通知
38
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,发现更多精彩内容 >>
提交
598b3c87
编写于
1月 25, 2024
作者:
A
Anne_LXM
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 兼容uni-app-x web端
上级
c76aede3
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
39 addition
and
24 deletion
+39
-24
uni_modules/uni-id-pages-x/common/common.uts
uni_modules/uni-id-pages-x/common/common.uts
+2
-2
uni_modules/uni-id-pages-x/components/uni-id-pages-x-avatar/uni-id-pages-x-avatar.uvue
...mponents/uni-id-pages-x-avatar/uni-id-pages-x-avatar.uvue
+14
-8
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
+3
-0
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
+13
-6
uni_modules/uni-id-pages-x/pages/common/webview/webview.uvue
uni_modules/uni-id-pages-x/pages/common/webview/webview.uvue
+4
-4
uni_modules/uni-id-pages-x/pages/retrieve/retrieve.uvue
uni_modules/uni-id-pages-x/pages/retrieve/retrieve.uvue
+2
-3
uni_modules/uni-id-pages-x/store.uts
uni_modules/uni-id-pages-x/store.uts
+1
-1
未找到文件。
uni_modules/uni-id-pages-x/common/common.uts
浏览文件 @
598b3c87
...
...
@@ -3,7 +3,7 @@ import config from '@/uni_modules/uni-id-pages-x/config.uts';
export const loginSuccess = (_ : UTSJSONObject) => {
// console.log('loginSuccess', e);
// console.log("新用户uid", e["uid"]);
// state.currentUserInfo = uniCloud.getCurrentUserInfo()
// state.currentUserInfo = uniCloud.getCurrentUserInfo()
mutations.updateUserInfo(null)
// state.userInfo["_id"] = e["uid"]
state.isLogin = true
...
...
@@ -13,7 +13,7 @@ export const loginSuccess = (_ : UTSJSONObject) => {
function loginAfterToPage() {
const pages = getCurrentPages()
const currentPage = pages[pages.length - 1]
const uniIdRedirectUrl = currentPage.options
.get("uniIdRedirectUrl")
;
const uniIdRedirectUrl = currentPage.options
["uniIdRedirectUrl"]
;
if (uniIdRedirectUrl != null) {
// console.log('uniIdRedirectUrl', uniIdRedirectUrl);
uni.redirectTo({
...
...
uni_modules/uni-id-pages-x/components/uni-id-pages-x-avatar/uni-id-pages-x-avatar.uvue
浏览文件 @
598b3c87
...
...
@@ -143,7 +143,7 @@
// console.log('res', res);
let tempFiles = res.tempFiles as UTSJSONObject[];
let tempFile = tempFiles[0];
let tempFileName = tempFile.getString('name')
let tempFileName = tempFile.getString('name')
let tempFilePath = tempFile.getString('path')
if (tempFileName == null) {
tempFileName = ""
...
...
@@ -151,26 +151,26 @@
if (tempFilePath == null) {
tempFilePath = ""
}
//
console.log(9527,tempFileName.length);
// console.error
('tempFileName',tempFileName);
// console.error
('tempFilePath',tempFilePath);
console.log(9527,tempFileName.length);
console.log
('tempFileName',tempFileName);
console.log
('tempFilePath',tempFilePath);
let avatar_file = {
// #ifdef
H5
// #ifdef
WEB
extname: tempFileName.split(".")[tempFileName.split(".").length - 1],
// #endif
// #ifndef
H5
// #ifndef
WEB
extname: tempFilePath.split(".")[tempFilePath.split(".").length - 1],
// #endif
name: tempFileName,
url: tempFilePath
} as UTSJSONObject
console.
error
('avatar_file', avatar_file);
console.
log
('avatar_file', avatar_file);
let filePath = res.tempFilePaths[0]
//非app端剪裁头像,app端用内置的原生裁剪
// #ifndef UNI-APP-X
filePath = await new Promise((callback) => {
// #ifdef
H5
// #ifdef
WEB
if (!this.isPC) {
callback(filePath)
}
...
...
@@ -192,7 +192,13 @@
})
// #endif
console.log("state",state)
console.log("state.userInfo",state.userInfo)
console.log("this.userInfo",this.userInfo)
let _id = this.userInfo["_id"] as string
console.log("id",_id)
// if(_id != null){
// _id = "" as string
// }
...
...
uni_modules/uni-id-pages-x/components/uni-id-pages-x-loginBySmsCode/uni-id-pages-x-loginBySmsCode.uvue
浏览文件 @
598b3c87
...
...
@@ -28,6 +28,9 @@
},
mounted() {
this.smsCodeRef = (this.$refs["smsCode"] as UniIdPagesXSmsCodeComponentPublicInstance)
uni.$on('uni-id-pages-x-loginBySmsCode-showPopupCaptcha',(callback : () => void)=>{
this.showPopupCaptcha(callback)
})
},
methods: {
sendSmsCode() {
...
...
uni_modules/uni-id-pages-x/components/uni-id-pages-x-smsCode/uni-id-pages-x-smsCode.uvue
浏览文件 @
598b3c87
...
...
@@ -133,15 +133,22 @@
// console.log('reset');
},
sendSmsCode() {
//
console.log("state.pendingAgreements", state.pendingAgreements);
console.log("state.pendingAgreements", state.pendingAgreements);
if (state.pendingAgreements) {
// uni.hideKeyboard();
this.sendSmsCaptchaCP!.setFocus(false);
(this.$parent as ComponentPublicInstance).$callMethod("showPopupCaptcha", () => {
if (!state.pendingAgreements) {
this.sendSmsCode()
}
});
// web端尚未完全支持
// (this.$parent as ComponentPublicInstance).$callMethod("showPopupCaptcha", () => {
// if (!state.pendingAgreements) {
// this.sendSmsCode()
// }
// });
// 临时方案
uni.$emit('uni-id-pages-x-loginBySmsCode-showPopupCaptcha',()=>{
if (!state.pendingAgreements) {
this.sendSmsCode()
}
})
uni.showToast({
title: '未同意隐私政策协议',
icon: 'none'
...
...
uni_modules/uni-id-pages-x/pages/common/webview/webview.uvue
浏览文件 @
598b3c87
...
...
@@ -5,9 +5,9 @@
<script>
export default {
onLoad(param
: Map<string, string>
) {
const url = param
.get("url")
as string;
let title = param
.get("title")
as string;
onLoad(param) {
const url = param
["url"]
as string;
let title = param
["title"]
as string;
// console.log('url', url);
if (url.substring(0, 4) != 'http') {
uni.showModal({
...
...
@@ -40,4 +40,4 @@
flex: 1;
height: 100%;
}
</style>
\ No newline at end of file
</style>
uni_modules/uni-id-pages-x/pages/retrieve/retrieve.uvue
浏览文件 @
598b3c87
...
...
@@ -32,12 +32,11 @@
mounted() {
this.smsCodeRef = (this.$refs["smsCode"] as UniIdPagesXSmsCodeComponentPublicInstance)
},
onLoad(param
: Map<string, string>
) {
const mobile = param
.get("mobile")
onLoad(param) {
const mobile = param
["mobile"]
// const email = param.get("email")
// console.log('mobile--', mobile);
// console.log('email--', email);
if (mobile != null) {
this.$nextTick(() => {
this.smsCodeRef!.mobile = mobile
...
...
uni_modules/uni-id-pages-x/store.uts
浏览文件 @
598b3c87
...
...
@@ -34,7 +34,7 @@ type Mutations = {
updateUserInfo(param: null | UTSJSONObject): void
}
export const mutations = {
updateUserInfo(param: null | UTSJSONObject) {
updateUserInfo
: function
(param: null | UTSJSONObject) {
console.log('updateUserInfo', param); // param为 null 时从云端获取数据更新,为UTSJSONObject时直接根据传入的值来更新
function afterUpdateUserInfo() {
// console.log('afterUpdateUserInfo', state.userInfo);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录