Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
言程序plus
uni-starter
提交
3d4c85b7
U
uni-starter
项目概览
言程序plus
/
uni-starter
与 Fork 源项目一致
Fork自
DCloud / uni-starter
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-starter
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
3d4c85b7
编写于
1月 29, 2023
作者:
study夏羽
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
更新uni-id-pages
上级
2ca6b93e
变更
12
展开全部
隐藏空白更改
内联
并排
Showing
12 changed file
with
670 addition
and
673 deletion
+670
-673
.gitignore
.gitignore
+1
-0
uni_modules/uni-badge/components/uni-badge/uni-badge.vue
uni_modules/uni-badge/components/uni-badge/uni-badge.vue
+3
-3
uni_modules/uni-id-pages/changelog.md
uni_modules/uni-id-pages/changelog.md
+4
-0
uni_modules/uni-id-pages/common/store.js
uni_modules/uni-id-pages/common/store.js
+8
-1
uni_modules/uni-id-pages/package.json
uni_modules/uni-id-pages/package.json
+1
-1
uni_modules/uni-id-pages/pages/login/login-withpwd.vue
uni_modules/uni-id-pages/pages/login/login-withpwd.vue
+0
-1
uni_modules/uni-id-pages/pages/userinfo/bind-mobile/bind-mobile.vue
...s/uni-id-pages/pages/userinfo/bind-mobile/bind-mobile.vue
+133
-134
uni_modules/uni-id-pages/pages/userinfo/change_pwd/change_pwd.vue
...les/uni-id-pages/pages/userinfo/change_pwd/change_pwd.vue
+6
-8
uni_modules/uni-id-pages/pages/userinfo/userinfo.vue
uni_modules/uni-id-pages/pages/userinfo/userinfo.vue
+24
-26
uni_modules/uni-id-pages/uniCloud/database/uni-id-users.schema.json
...s/uni-id-pages/uniCloud/database/uni-id-users.schema.json
+455
-464
uni_modules/uni-list/components/uni-list-chat/uni-list-chat.vue
...dules/uni-list/components/uni-list-chat/uni-list-chat.vue
+34
-34
uni_modules/uni-list/components/uni-list-item/uni-list-item.vue
...dules/uni-list/components/uni-list-item/uni-list-item.vue
+1
-1
未找到文件。
.gitignore
浏览文件 @
3d4c85b7
...
@@ -9,3 +9,4 @@ package-lock.json
...
@@ -9,3 +9,4 @@ package-lock.json
/manifest.json
/manifest.json
/env.js
/env.js
/vue.config.js
/vue.config.js
/uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/captcha-config/
uni_modules/uni-badge/components/uni-badge/uni-badge.vue
浏览文件 @
3d4c85b7
...
@@ -191,13 +191,12 @@
...
@@ -191,13 +191,12 @@
/* #ifndef APP-NVUE */
/* #ifndef APP-NVUE */
display
:
flex
;
display
:
flex
;
overflow
:
hidden
;
overflow
:
hidden
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
min-width
:
20px
;
font-feature-settings
:
"tnum"
;
/* #endif */
/* #endif */
justify-content
:
center
;
justify-content
:
center
;
flex-direction
:
row
;
flex-direction
:
row
;
height
:
20px
;
height
:
20px
;
min-width
:
20px
;
padding
:
0
4px
;
padding
:
0
4px
;
line-height
:
18px
;
line-height
:
18px
;
color
:
#fff
;
color
:
#fff
;
...
@@ -207,6 +206,7 @@
...
@@ -207,6 +206,7 @@
border
:
1px
solid
#fff
;
border
:
1px
solid
#fff
;
text-align
:
center
;
text-align
:
center
;
font-family
:
'Helvetica Neue'
,
Helvetica
,
sans-serif
;
font-family
:
'Helvetica Neue'
,
Helvetica
,
sans-serif
;
font-feature-settings
:
"tnum"
;
font-size
:
$bage-size
;
font-size
:
$bage-size
;
/* #ifdef H5 */
/* #ifdef H5 */
z-index
:
999
;
z-index
:
999
;
...
...
uni_modules/uni-id-pages/changelog.md
浏览文件 @
3d4c85b7
## 1.0.40(2023-01-16)
-
更新依赖的 验证码插件
`uni-captcha`
版本的版本为 0.6.4 修复 部分情况下APP端无法获取验证码的问题
[
详情参考
](
https://ext.dcloud.net.cn/plugin?id=4048
)
-
修复 客户端token过期后,点击退出登录按钮报错的问题
-
uni-id-co 修复 updateUser 接口
`手机号`
和
`邮箱`
参数值为空字符串时,修改无效的问题
## 1.0.39(2022-12-28)
## 1.0.39(2022-12-28)
-
uni-id-co 修复 URL化时第三方登录无法获取 uniPlatform 参数
-
uni-id-co 修复 URL化时第三方登录无法获取 uniPlatform 参数
-
uni-id-co 修复 validator error
-
uni-id-co 修复 validator error
...
...
uni_modules/uni-id-pages/common/store.js
浏览文件 @
3d4c85b7
...
@@ -62,7 +62,14 @@ export const mutations = {
...
@@ -62,7 +62,14 @@ export const mutations = {
return
data
return
data
},
},
async
logout
()
{
async
logout
()
{
await
uniIdCo
.
logout
()
// 1. 已经过期就不需要调用服务端的注销接口 2.即使调用注销接口失败,不能阻塞客户端
if
(
uniCloud
.
getCurrentUserInfo
().
tokenExpired
>
Date
.
now
()){
try
{
await
uniIdCo
.
logout
()
}
catch
(
e
){
console
.
error
(
e
);
}
}
uni
.
removeStorageSync
(
'
uni_id_token
'
);
uni
.
removeStorageSync
(
'
uni_id_token
'
);
uni
.
setStorageSync
(
'
uni_id_token_expired
'
,
0
)
uni
.
setStorageSync
(
'
uni_id_token_expired
'
,
0
)
uni
.
redirectTo
({
uni
.
redirectTo
({
...
...
uni_modules/uni-id-pages/package.json
浏览文件 @
3d4c85b7
{
{
"id"
:
"uni-id-pages"
,
"id"
:
"uni-id-pages"
,
"displayName"
:
"uni-id-pages"
,
"displayName"
:
"uni-id-pages"
,
"version"
:
"1.0.
39
"
,
"version"
:
"1.0.
40
"
,
"description"
:
"云端一体简单、统一、可扩展的用户中心页面模版"
,
"description"
:
"云端一体简单、统一、可扩展的用户中心页面模版"
,
"keywords"
:
[
"keywords"
:
[
"用户管理"
,
"用户管理"
,
...
...
uni_modules/uni-id-pages/pages/login/login-withpwd.vue
浏览文件 @
3d4c85b7
...
@@ -96,7 +96,6 @@
...
@@ -96,7 +96,6 @@
duration
:
3000
duration
:
3000
});
});
}
}
console
.
log
(
"
this.needCaptcha:
"
,
this
.
needCaptcha
);
if
(
this
.
needCaptcha
&&
this
.
captcha
.
length
!=
4
)
{
if
(
this
.
needCaptcha
&&
this
.
captcha
.
length
!=
4
)
{
this
.
$refs
.
captcha
.
getImageCaptcha
()
this
.
$refs
.
captcha
.
getImageCaptcha
()
return
uni
.
showToast
({
return
uni
.
showToast
({
...
...
uni_modules/uni-id-pages/pages/userinfo/bind-mobile/bind-mobile.vue
浏览文件 @
3d4c85b7
<!-- 绑定手机号码页 -->
<!-- 绑定手机号码页 -->
<
template
>
<
template
>
<view
class=
"uni-content"
>
<view
class=
"uni-content"
>
<match-media
:min-width=
"690"
>
<match-media
:min-width=
"690"
>
<view
class=
"login-logo"
>
<view
class=
"login-logo"
>
<image
:src=
"logo"
></image>
<image
:src=
"logo"
></image>
</view>
</view>
<!-- 顶部文字 -->
<!-- 顶部文字 -->
<text
class=
"title title-box"
>
绑定手机号
</text>
<text
class=
"title title-box"
>
绑定手机号
</text>
</match-media>
</match-media>
<!-- 登录框 (选择手机号所属国家和地区需要另行实现) -->
<!-- 登录框 (选择手机号所属国家和地区需要另行实现) -->
<uni-easyinput
clearable
:focus=
"focusMobile"
@
blur=
"focusMobile = false"
type=
"number"
class=
"input-box"
:inputBorder=
"false"
v-model=
"formData.mobile"
<uni-easyinput
clearable
:focus=
"focusMobile"
@
blur=
"focusMobile = false"
type=
"number"
class=
"input-box"
:inputBorder=
"false"
v-model=
"formData.mobile"
maxlength=
"11"
placeholder=
"请输入手机号"
></uni-easyinput>
maxlength=
"11"
placeholder=
"请输入手机号"
></uni-easyinput>
<uni-id-pages-sms-form
ref=
"smsForm"
type=
"bind-mobile-by-sms"
v-model=
"formData.code"
:phone=
"formData.mobile"
>
<uni-id-pages-sms-form
ref=
"smsForm"
type=
"bind-mobile-by-sms"
v-model=
"formData.code"
:phone=
"formData.mobile"
>
</uni-id-pages-sms-form>
</uni-id-pages-sms-form>
<button
class=
"uni-btn send-btn-box"
type=
"primary"
@
click=
"submit"
>
提交
</button>
<button
class=
"uni-btn send-btn-box"
type=
"primary"
@
click=
"submit"
>
提交
</button>
<uni-popup-captcha
@
confirm=
"submit"
v-model=
"formData.captcha"
scene=
"bind-mobile-by-sms"
ref=
"popup"
>
<uni-popup-captcha
@
confirm=
"submit"
v-model=
"formData.captcha"
scene=
"bind-mobile-by-sms"
ref=
"popup"
>
</uni-popup-captcha>
</uni-popup-captcha>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
import
{
store
,
store
,
mutations
mutations
}
from
'
@/uni_modules/uni-id-pages/common/store.js
'
}
from
'
@/uni_modules/uni-id-pages/common/store.js
'
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
formData
:
{
formData
:
{
mobile
:
""
,
mobile
:
""
,
code
:
""
,
code
:
""
,
captcha
:
""
captcha
:
""
},
},
focusMobile
:
true
,
focusMobile
:
true
,
logo
:
"
/static/logo.png
"
logo
:
"
/static/logo.png
"
}
}
},
},
computed
:
{
computed
:
{
tipText
()
{
tipText
()
{
return
`验证码已通过短信发送至
${
this
.
formData
.
mobile
}
。密码为6 - 20位`
return
`验证码已通过短信发送至
${
this
.
formData
.
mobile
}
。密码为6 - 20位`
}
}
},
},
onLoad
(
event
)
{},
onLoad
(
event
)
{},
onReady
()
{},
onReady
()
{},
methods
:
{
methods
:
{
/**
/**
* 完成并提交
* 完成并提交
*/
*/
async
submit
()
{
async
submit
()
{
if
(
!
/^1
\d{10}
$/
.
test
(
this
.
formData
.
mobile
)){
if
(
!
/^1
\d{10}
$/
.
test
(
this
.
formData
.
mobile
)){
this
.
focusMobile
=
true
this
.
focusMobile
=
true
return
uni
.
showToast
({
return
uni
.
showToast
({
title
:
'
手机号码格式不正确
'
,
title
:
'
手机号码格式不正确
'
,
icon
:
'
none
'
,
icon
:
'
none
'
,
duration
:
3000
duration
:
3000
});
});
}
}
console
.
log
(
"
this.formData.code:
"
,
this
.
formData
.
code
);
if
(
!
/^
\d{6}
$/
.
test
(
this
.
formData
.
code
)){
if
(
!
/^
\d{6}
$/
.
test
(
this
.
formData
.
code
)){
this
.
$refs
.
smsForm
.
focusSmsCodeInput
=
true
this
.
$refs
.
smsForm
.
focusSmsCodeInput
=
true
return
uni
.
showToast
({
return
uni
.
showToast
({
title
:
'
验证码格式不正确
'
,
title
:
'
验证码格式不正确
'
,
icon
:
'
none
'
,
icon
:
'
none
'
,
duration
:
3000
duration
:
3000
});
});
}
}
// console.log(this.formData);
// console.log(this.formData);
const
uniIdCo
=
uniCloud
.
importObject
(
"
uni-id-co
"
)
const
uniIdCo
=
uniCloud
.
importObject
(
"
uni-id-co
"
)
return
await
uniIdCo
.
bindMobileBySms
(
this
.
formData
).
then
(
e
=>
{
return
await
uniIdCo
.
bindMobileBySms
(
this
.
formData
).
then
(
e
=>
{
// console.log(e);
// console.log(e);
uni
.
showToast
({
uni
.
showToast
({
title
:
e
.
errMsg
,
title
:
e
.
errMsg
,
icon
:
'
none
'
,
icon
:
'
none
'
,
duration
:
3000
duration
:
3000
});
});
// #ifdef APP-NVUE
// #ifdef APP-NVUE
const
eventChannel
=
this
.
$scope
.
eventChannel
;
// 兼容APP-NVUE
const
eventChannel
=
this
.
$scope
.
eventChannel
;
// 兼容APP-NVUE
// #endif
// #endif
// #ifndef APP-NVUE
// #ifndef APP-NVUE
const
eventChannel
=
this
.
getOpenerEventChannel
();
const
eventChannel
=
this
.
getOpenerEventChannel
();
// #endif
// #endif
mutations
.
setUserInfo
(
this
.
formData
)
mutations
.
setUserInfo
(
this
.
formData
)
uni
.
navigateBack
()
uni
.
navigateBack
()
return
e
return
e
}).
catch
(
e
=>
{
}).
catch
(
e
=>
{
console
.
log
(
e
);
console
.
log
(
e
,
"
bindMobileBySms++++++++++
"
);
if
(
e
.
errCode
==
'
uni-id-captcha-required
'
)
{
if
(
e
.
errCode
==
'
uni-id-captcha-required
'
)
{
this
.
$refs
.
popup
.
open
()
this
.
$refs
.
popup
.
open
()
}
}
return
e
return
e
}).
finally
(
e
=>
{
}).
finally
(
e
=>
{
this
.
formData
.
captcha
=
""
this
.
formData
.
captcha
=
""
return
e
return
e
})
})
}
}
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
@import
"@/uni_modules/uni-id-pages/common/login-page.scss"
;
@import
"@/uni_modules/uni-id-pages/common/login-page.scss"
;
.uni-content
{
.uni-content
{
padding
:
0
;
padding
:
0
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
padding
:
50rpx
;
padding
:
50rpx
;
padding-top
:
10px
;
padding-top
:
10px
;
}
}
@media
screen
and
(
min-width
:
690px
)
{
@media
screen
and
(
min-width
:
690px
)
{
.uni-content
{
.uni-content
{
padding
:
30px
40px
40px
;
padding
:
30px
40px
40px
;
}
}
}
}
/* #ifndef APP-NVUE || VUE3 */
/* #ifndef APP-NVUE || VUE3 */
.
uni-content
:
:
v-deep
.
uni-easyinput__content
{}
.
uni-content
:
:
v-deep
.
uni-easyinput__content
{}
/* #endif */
/* #endif */
.input-box
{
.input-box
{
width
:
100%
;
width
:
100%
;
margin-top
:
16px
;
margin-top
:
16px
;
background-color
:
#f9f9f9
;
background-color
:
#f9f9f9
;
border-radius
:
6rpx
;
border-radius
:
6rpx
;
flex-direction
:
row
;
flex-direction
:
row
;
flex-wrap
:
nowrap
;
flex-wrap
:
nowrap
;
margin-bottom
:
10px
;
margin-bottom
:
10px
;
}
}
.send-btn-box
{
.send-btn-box
{
margin-top
:
15px
;
margin-top
:
15px
;
}
}
</
style
>
</
style
>
uni_modules/uni-id-pages/pages/userinfo/change_pwd/change_pwd.vue
浏览文件 @
3d4c85b7
...
@@ -94,7 +94,7 @@
...
@@ -94,7 +94,7 @@
oldPassword
,
oldPassword
,
newPassword
newPassword
}).
then
(
e
=>
{
}).
then
(
e
=>
{
// console.log(
e);
console
.
log
(
"
e:-------------
"
,
e
);
uni
.
removeStorageSync
(
'
uni_id_token
'
);
uni
.
removeStorageSync
(
'
uni_id_token
'
);
uni
.
setStorageSync
(
'
uni_id_token_expired
'
,
0
)
uni
.
setStorageSync
(
'
uni_id_token_expired
'
,
0
)
uni
.
redirectTo
({
uni
.
redirectTo
({
...
@@ -102,16 +102,14 @@
...
@@ -102,16 +102,14 @@
})
})
return
e
return
e
}).
catch
(
e
=>
{
}).
catch
(
e
=>
{
console
.
log
(
"
e:------------
"
,
e
);
uni
.
showModal
({
// uni.showModal({
content
:
e
.
message
,
// content: e.message,
showCancel
:
false
// showCancel: false
});
// });
return
e
return
e
})
})
}).
catch
(
errors
=>
{
}).
catch
(
errors
=>
{
console
.
log
(
"
errors:
------------
"
,
errors
);
console
.
log
(
"
errors:
"
,
errors
);
let
key
=
errors
[
0
].
key
let
key
=
errors
[
0
].
key
key
=
key
.
replace
(
key
[
0
],
key
[
0
].
toUpperCase
())
key
=
key
.
replace
(
key
[
0
],
key
[
0
].
toUpperCase
())
// console.log(key, 'focus' + key);
// console.log(key, 'focus' + key);
...
...
uni_modules/uni-id-pages/pages/userinfo/userinfo.vue
浏览文件 @
3d4c85b7
...
@@ -33,16 +33,16 @@
...
@@ -33,16 +33,16 @@
const
db
=
uniCloud
.
database
();
const
db
=
uniCloud
.
database
();
const
usersTable
=
db
.
collection
(
'
uni-id-users
'
)
const
usersTable
=
db
.
collection
(
'
uni-id-users
'
)
const
uniIdCo
=
uniCloud
.
importObject
(
"
uni-id-co
"
)
const
uniIdCo
=
uniCloud
.
importObject
(
"
uni-id-co
"
)
import
{
import
{
store
,
store
,
mutations
mutations
}
from
'
@/uni_modules/uni-id-pages/common/store.js
'
}
from
'
@/uni_modules/uni-id-pages/common/store.js
'
export
default
{
export
default
{
computed
:
{
computed
:
{
userInfo
()
{
userInfo
()
{
return
store
.
userInfo
return
store
.
userInfo
}
}
},
},
data
()
{
data
()
{
return
{
return
{
univerifyStyle
:
{
univerifyStyle
:
{
...
@@ -57,8 +57,8 @@
...
@@ -57,8 +57,8 @@
// mobile:'',
// mobile:'',
// nickname:''
// nickname:''
// },
// },
hasPwd
:
false
,
hasPwd
:
false
,
showLoginManage
:
false
//通过页面传参隐藏登录&退出登录按钮
showLoginManage
:
false
//通过页面传参隐藏登录&退出登录按钮
}
}
},
},
async
onShow
()
{
async
onShow
()
{
...
@@ -66,9 +66,8 @@
...
@@ -66,9 +66,8 @@
this
.
univerifyStyle
.
otherLoginButton
.
title
=
"
其他号码绑定
"
this
.
univerifyStyle
.
otherLoginButton
.
title
=
"
其他号码绑定
"
},
},
async
onLoad
(
e
)
{
async
onLoad
(
e
)
{
console
.
log
(
"
store.userInfo:----
"
,
store
.
userInfo
);
if
(
e
.
showLoginManage
){
if
(
e
.
showLoginManage
)
{
this
.
showLoginManage
=
true
//通过页面传参隐藏登录&退出登录按钮
this
.
showLoginManage
=
true
//通过页面传参隐藏登录&退出登录按钮
}
}
//判断当前用户是否有密码,否则就不显示密码修改功能
//判断当前用户是否有密码,否则就不显示密码修改功能
let
res
=
await
uniIdCo
.
getAccountInfo
()
let
res
=
await
uniIdCo
.
getAccountInfo
()
...
@@ -83,13 +82,13 @@
...
@@ -83,13 +82,13 @@
}
}
})
})
},
},
logout
()
{
logout
()
{
mutations
.
logout
()
mutations
.
logout
()
},
},
bindMobileSuccess
()
{
bindMobileSuccess
()
{
mutations
.
updateUserInfo
()
mutations
.
updateUserInfo
()
},
},
changePassword
()
{
changePassword
(){
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'
/uni_modules/uni-id-pages/pages/userinfo/change_pwd/change_pwd
'
,
url
:
'
/uni_modules/uni-id-pages/pages/userinfo/change_pwd/change_pwd
'
,
complete
:
(
e
)
=>
{
complete
:
(
e
)
=>
{
...
@@ -157,9 +156,9 @@
...
@@ -157,9 +156,9 @@
this
.
$refs
.
dialog
.
open
()
this
.
$refs
.
dialog
.
open
()
}
}
},
},
deactivate
()
{
deactivate
(){
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
"
/uni_modules/uni-id-pages/pages/userinfo/deactivate/deactivate
"
url
:
"
/uni_modules/uni-id-pages/pages/userinfo/deactivate/deactivate
"
})
})
},
},
async
bindThirdAccount
(
provider
)
{
async
bindThirdAccount
(
provider
)
{
...
@@ -199,6 +198,7 @@
...
@@ -199,6 +198,7 @@
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
@import
"@/uni_modules/uni-id-pages/common/login-page.scss"
;
@import
"@/uni_modules/uni-id-pages/common/login-page.scss"
;
.uni-content
{
.uni-content
{
...
@@ -211,7 +211,6 @@
...
@@ -211,7 +211,6 @@
box-sizing
:
border-box
;
box-sizing
:
border-box
;
flex-direction
:
column
;
flex-direction
:
column
;
}
}
@media
screen
and
(
min-width
:
690px
)
{
@media
screen
and
(
min-width
:
690px
)
{
.uni-content
{
.uni-content
{
padding
:
0
;
padding
:
0
;
...
@@ -223,7 +222,6 @@
...
@@ -223,7 +222,6 @@
box-shadow
:
none
;
box-shadow
:
none
;
}
}
}
}
/* #endif */
/* #endif */
.avatar
{
.avatar
{
align-items
:
center
;
align-items
:
center
;
...
@@ -247,7 +245,7 @@
...
@@ -247,7 +245,7 @@
width
:
80%
;
width
:
80%
;
}
}
.mt10
{
.mt10
{
margin-top
:
10px
;
margin-top
:
10px
;
}
}
</
style
>
</
style
>
uni_modules/uni-id-pages/uniCloud/database/uni-id-users.schema.json
浏览文件 @
3d4c85b7
此差异已折叠。
点击以展开。
uni_modules/uni-list/components/uni-list-chat/uni-list-chat.vue
浏览文件 @
3d4c85b7
...
@@ -23,10 +23,10 @@
...
@@ -23,10 +23,10 @@
</view>
</view>
<view
class=
"uni-list-chat__content"
>
<view
class=
"uni-list-chat__content"
>
<view
class=
"uni-list-chat__content-main"
>
<view
class=
"uni-list-chat__content-main"
>
<text
class=
"uni-list-chat__content-title uni-ellipsis"
>
{{
title
}}
</text>
<text
class=
"uni-list-chat__content-title uni-ellipsis"
>
{{
title
}}
</text>
<view
style=
"flex-direction: row;"
>
<view
style=
"flex-direction: row;"
>
<text
class=
"draft"
v-if=
"isDraft"
>
[草稿]
</text>
<text
class=
"draft"
v-if=
"isDraft"
>
[草稿]
</text>
<text
class=
"uni-list-chat__content-note uni-ellipsis"
>
{{
isDraft
?
note
.
slice
(
14
):
note
}}
</text>
<text
class=
"uni-list-chat__content-note uni-ellipsis"
>
{{
isDraft
?
note
.
slice
(
14
):
note
}}
</text>
</view>
</view>
</view>
</view>
<view
class=
"uni-list-chat__content-extra"
>
<view
class=
"uni-list-chat__content-extra"
>
...
@@ -123,9 +123,9 @@
...
@@ -123,9 +123,9 @@
}
}
},
},
// inject: ['list'],
// inject: ['list'],
computed
:
{
computed
:
{
isDraft
(){
isDraft
(){
return
this
.
note
.
slice
(
0
,
14
)
==
'
[uni-im-draft]
'
return
this
.
note
.
slice
(
0
,
14
)
==
'
[uni-im-draft]
'
},
},
isSingle
()
{
isSingle
()
{
if
(
this
.
badgeText
===
'
dot
'
)
{
if
(
this
.
badgeText
===
'
dot
'
)
{
...
@@ -151,32 +151,32 @@
...
@@ -151,32 +151,32 @@
return
'
avatarItem--1
'
;
return
'
avatarItem--1
'
;
}
}
}
}
},
},
watch
:
{
watch
:
{
avatar
:{
avatar
:{
handler
(
avatar
)
{
handler
(
avatar
)
{
if
(
avatar
.
substr
(
0
,
8
)
==
'
cloud://
'
){
if
(
avatar
.
substr
(
0
,
8
)
==
'
cloud://
'
){
uniCloud
.
getTempFileURL
({
uniCloud
.
getTempFileURL
({
fileList
:
[
avatar
]
fileList
:
[
avatar
]
}).
then
(
res
=>
{
}).
then
(
res
=>
{
// console.log(res);
// console.log(res);
// 兼容uniCloud私有化部署
// 兼容uniCloud私有化部署
let
fileList
=
res
.
fileList
||
res
.
result
.
fileList
let
fileList
=
res
.
fileList
||
res
.
result
.
fileList
this
.
avatarUrl
=
fileList
[
0
].
tempFileURL
this
.
avatarUrl
=
fileList
[
0
].
tempFileURL
})
})
}
else
{
}
else
{
this
.
avatarUrl
=
avatar
this
.
avatarUrl
=
avatar
}
}
},
},
immediate
:
true
immediate
:
true
}
}
},
},
data
()
{
data
()
{
return
{
return
{
isFirstChild
:
false
,
isFirstChild
:
false
,
border
:
true
,
border
:
true
,
// avatarList: 3,
// avatarList: 3,
imageWidth
:
50
,
imageWidth
:
50
,
avatarUrl
:
''
avatarUrl
:
''
};
};
},
},
...
@@ -477,13 +477,13 @@
...
@@ -477,13 +477,13 @@
font-size
:
$note-size
;
font-size
:
$note-size
;
font-weight
:
$title-weight
;
font-weight
:
$title-weight
;
overflow
:
hidden
;
overflow
:
hidden
;
}
}
.draft
{
.draft
{
color
:
#eb3a41
;
color
:
#eb3a41
;
/* #ifndef APP-NVUE */
/* #ifndef APP-NVUE */
flex-shrink
:
0
;
flex-shrink
:
0
;
/* #endif */
/* #endif */
padding-right
:
3px
;
padding-right
:
3px
;
}
}
.uni-list-chat__content-extra
{
.uni-list-chat__content-extra
{
...
...
uni_modules/uni-list/components/uni-list-item/uni-list-item.vue
浏览文件 @
3d4c85b7
...
@@ -527,4 +527,4 @@
...
@@ -527,4 +527,4 @@
text-overflow
:
ellipsis
;
text-overflow
:
ellipsis
;
/* #endif */
/* #endif */
}
}
</
style
>
</
style
>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录