Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
言程序plus
uni-starter
提交
1fa90363
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看板
提交
1fa90363
编写于
4月 15, 2021
作者:
芊
芊里
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
https://gitee.com/dcloud/base-app
上级
2f337cf2
5e5ca708
变更
15
展开全部
显示空白变更内容
内联
并排
Showing
15 changed file
with
288 addition
and
309 deletion
+288
-309
baseapp.config.json
baseapp.config.json
+11
-1
common/appInit.js
common/appInit.js
+69
-37
js_sdk/request.js
js_sdk/request.js
+2
-2
manifest.json
manifest.json
+25
-10
pages.json
pages.json
+18
-9
pages/common/webview/webview.vue
pages/common/webview/webview.vue
+26
-0
pages/ucenter/about/about.vue
pages/ucenter/about/about.vue
+76
-205
pages/ucenter/edit/edit.vue
pages/ucenter/edit/edit.vue
+1
-3
pages/ucenter/settings/settings.vue
pages/ucenter/settings/settings.vue
+44
-33
pages/ucenter/ucenter.vue
pages/ucenter/ucenter.vue
+5
-5
uni_modules/uni-id/changelog.md
uni_modules/uni-id/changelog.md
+2
-0
uni_modules/uni-id/package.json
uni_modules/uni-id/package.json
+1
-1
uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id/index.js
...les/uni-id/uniCloud/cloudfunctions/common/uni-id/index.js
+1
-1
uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id/package.json
...uni-id/uniCloud/cloudfunctions/common/uni-id/package.json
+1
-1
uni_modules/uni-quick-login/uniCloud/cloudfunctions/user-center/index.js
...-quick-login/uniCloud/cloudfunctions/user-center/index.js
+6
-1
未找到文件。
baseapp.config.json
浏览文件 @
1fa90363
{
"router"
:{
"needLogin"
:[
"/pages/grid/grid"
"/pages/ucenter/edit/edit"
,
"/uni_modules/uni-login-page/pages/index/pwd-retrieve"
]
},
"aboutus"
:{
"appName"
:
"base-app"
,
"company"
:
"数字天堂(北京)网络技术有限公司"
,
"slogan"
:
"为开发而生"
,
"agreement"
:{
"privacy"
:
"https://uniapp.dcloud.io/"
,
"business"
:
"https://uniapp.dcloud.io/"
}
}
}
\ No newline at end of file
common/appInit.js
浏览文件 @
1fa90363
import
baseappConfig
from
'
@/baseapp.config.json
'
;
// #ifdef APP-PLUS
import
checkUpdate
from
'
@/uni_modules/uni-upgrade-center-app/utils/check-update
'
;
import
callCheckVersion
from
'
@/uni_modules/uni-upgrade-center-app/utils/call-check-version
'
;
...
...
@@ -8,11 +9,50 @@ export default function() {
initAppVersion
();
//自定义路由拦截
setRouter
()
const
{
"
router
"
:{
needLogin
}}
=
baseappConfig
//需要登陆的页面
changeAction
([
"
navigateTo
"
,
"
redirectTo
"
,
"
reLaunch
"
,
"
switchTab
"
],
{
before_action
:
e
=>
{
let
token
=
uni
.
getStorageSync
(
'
uni-id-token
'
)
if
(
needLogin
.
includes
(
e
.
url
)
&&
token
==
''
)
{
console
.
log
(
'
该页面需要登陆,即将跳转到login页面
'
);
uni
.
showToast
({
title
:
'
该页面需要登陆,即将跳转到login页面
'
,
icon
:
'
none
'
})
uni
.
redirectTo
({
url
:
"
/uni_modules/uni-login-page/pages/index/index
"
})
return
false
}
return
true
}
})
//提示网络变化
eventListenerNetwork
()
/*
当某个权限调用失败
1.先检测手机的该模块是否打开
2.检测当前应用是否被授权了该模块对应的权限
提示,并点击跳转到设置
*/
// #ifndef H5
// changeAction('chooseImage', {
// after_action: e => {
// console.log('changeAction', e);
// if(e.errCode === 11){
// uni.showModal({
// content: '无权限',
// confirmText:"前往设置",
// success(e) {
// if(e.confirm){
// permision.gotoAppPermissionSetting()
// }
// }
// });
// }
// }
// })
// #endif
}
/**
* // 初始化appVersion
...
...
@@ -47,41 +87,6 @@ function initAppVersion() {
// #endif
}
//用于拦截路由
import
baseappConfig
from
'
@/baseapp.config.json
'
;
console
.
log
(
'
baseappConfig
'
,
baseappConfig
);
const
{
"
router
"
:{
needLogin
}}
=
baseappConfig
//需要登陆的页面
function
setRouter
()
{
let
before_action
=
e
=>
{
let
res
=
true
let
token
=
uni
.
getStorageSync
(
'
uni-id-token
'
)
if
(
needLogin
.
includes
(
e
.
url
)
&&
token
==
''
)
{
res
=
false
console
.
log
(
'
该页面需要登陆,即将跳转到login页面
'
);
}
return
res
}
let
before_after
=
e
=>
{
console
.
log
(
'
跳转之后
'
);
}
let
actions
=
[
"
navigateTo
"
,
"
redirectTo
"
,
"
reLaunch
"
,
"
switchTab
"
]
actions
.
forEach
(
action
=>
{
let
old_action
=
uni
[
action
]
uni
[
action
]
=
e
=>
{
//console.log(e);
if
(
before_action
(
e
))
{
old_action
(
e
)
before_after
(
e
)
}
}
})
uni
.
reLaunch
({
url
:
'
/pages/grid/grid
'
})
}
// 设备网络状态变化事件
function
eventListenerNetwork
()
{
uni
.
onNetworkStatusChange
(
function
(
res
)
{
...
...
@@ -110,3 +115,30 @@ function eventListenerNetwork () {
}
});
}
function
changeAction
(
actions
,
{
before_action
,
after_action
})
{
if
(
typeof
actions
==
'
string
'
){
actions
=
[
actions
]
}
if
(
!
before_action
)
{
before_action
=
()
=>
true
}
actions
.
forEach
(
action
=>
{
let
old_action
=
uni
[
action
]
uni
[
action
]
=
e
=>
{
if
(
before_action
(
e
))
{
console
.
log
(
after_action
);
if
(
after_action
)
{
var
compose
=
function
(
f
,
g
)
{
return
function
(
x
)
{
return
f
(
x
,
g
(
x
));
};
};
e
.
complete
=
compose
(
e
.
complete
,
after_action
)
}
old_action
(
e
)
}
}
})
}
\ No newline at end of file
js_sdk/request.js
浏览文件 @
1fa90363
...
...
@@ -7,7 +7,7 @@
*/
const
debug
=
true
;
//开启后,会alert错误信息
export
default
function
request
(
name
,
params
,
callback
=
false
,{
showLoading
=
false
,
loadText
=
''
,
fail
=
()
=>
{}}
=
{}){
console
.
log
(
'
request
'
);
//
console.log('request');
showLoading
||
loadText
?
uni
.
showLoading
({
title
:
loadText
}):
''
;
let
routers
=
name
.
split
(
'
/
'
);
...
...
@@ -16,7 +16,7 @@ export default function request(name,params,callback=false,{showLoading=false,lo
name
=
routers
[
0
]
action
=
routers
[
1
]
}
//
console.log({name,data: {action,params}})
console
.
log
({
name
,
data
:
{
action
,
params
}})
return
new
Promise
((
resolve
,
reject
)
=>
{
uniCloud
.
callFunction
({
name
,
data
:
{
action
,
params
},
success
(
e
){
...
...
manifest.json
浏览文件 @
1fa90363
...
...
@@ -18,27 +18,32 @@
},
/*
模块配置
*/
"modules"
:
{
"OAuth"
:
{}
"OAuth"
:
{},
"Fingerprint"
:
{},
"Share"
:
{},
"Push"
:
{}
},
/*
应用发布信息
*/
"distribute"
:
{
/*
android打包配置
*/
"android"
:
{
"permissions"
:
[
"<uses-permission android:name=
\"
android.permission.CHANGE_NETWORK_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.MOUNT_UNMOUNT_FILESYSTEMS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.VIBRATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.READ_LOGS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.ACCESS_WIFI_STATE
\"
/>"
,
"<uses-feature android:name=
\"
android.hardware.camera
\"
/>"
,
"<uses-feature android:name=
\"
android.hardware.camera.autofocus
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.ACCESS_NETWORK_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.ACCESS_WIFI_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.CAMERA
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.CHANGE_NETWORK_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.CHANGE_WIFI_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.FLASHLIGHT
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.GET_ACCOUNTS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.MODIFY_AUDIO_SETTINGS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.MOUNT_UNMOUNT_FILESYSTEMS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.READ_LOGS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.READ_PHONE_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.CHANGE_WIFI_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.USE_FINGERPRINT
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.VIBRATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.WAKE_LOCK
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.FLASHLIGHT
\"
/>"
,
"<uses-feature android:name=
\"
android.hardware.camera
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.WRITE_SETTINGS
\"
/>"
]
},
...
...
@@ -54,7 +59,17 @@
"UniversalLinks"
:
""
}
},
"ad"
:
{}
"ad"
:
{},
"share"
:
{
"weixin"
:
{
"appid"
:
"wxffdd8fa6ec4ef2a0"
,
"UniversalLinks"
:
""
}
},
"geolocation"
:
{},
"push"
:
{
"unipush"
:
{}
}
}
}
},
...
...
pages.json
浏览文件 @
1fa90363
...
...
@@ -197,6 +197,15 @@
}
}
,{
"path"
:
"pages/common/webview/webview"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
}
],
"globalStyle"
:
{
"navigationBarTextStyle"
:
"black"
,
...
...
pages/common/webview/webview.vue
0 → 100644
浏览文件 @
1fa90363
<
template
>
<view>
<web-view
:src=
"url"
></web-view>
</view>
</
template
>
<
script
>
export
default
{
onLoad
({
url
,
title
})
{
console
.
log
(
url
,
title
);
this
.
url
=
url
;
if
(
title
){
uni
.
setNavigationBarTitle
({
title
});
}
},
data
()
{
return
{
url
:
null
};
}
}
</
script
>
<
style
lang=
"scss"
>
</
style
>
pages/ucenter/about/about.vue
浏览文件 @
1fa90363
<
template
>
<view
class=
"about"
>
<view
class=
"
content
"
>
<
view
class=
"qrcode"
>
<image
src=
"https://img.cdn.aliyun.dcloud.net.cn/guide/uniapp/app_download.png"
@
longtap=
"save"
></image
>
<text
class=
"tip"
>
扫码体验uni-app
</text>
<view
class=
"about
us
"
>
<view
class=
"
logo
"
>
<
image
class=
"logoImg"
src=
"@/static/logo.png"
></image
>
<text
class=
"tip appName"
>
{{
aboutus
.
appName
}}
</text
>
<text
class=
"tip"
style=
"font-size:24upx;"
>
Version
{{
version
}}
</text>
</view>
<view
class=
"desc"
>
<text
class=
"code"
>
uni-app
</text>
是一个使用
<text
class=
"code"
>
Vue.js
</text>
开发跨平台应用的前端框架。
<view
class=
"copyright"
>
<text
class=
"agreement"
@
click=
"navigateTo(aboutus.agreement.privacy,'用户服务协议')"
>
《用户服务协议》
</text>
<text
class=
"hint"
>
和
</text>
<text
class=
"agreement"
@
click=
"navigateTo(aboutus.agreement.business,'隐私政策')"
>
《隐私政策》
</text>
<text
class=
"hint"
>
Copyright ©
{{
year
}}
</text>
<text
class=
"hint"
>
{{
aboutus
.
company
}}
</text>
</view>
<view
class=
"source"
>
<view
class=
"title"
>
本示例源码获取方式:
</view>
<view
class=
"source-list"
>
<view
class=
"source-cell"
>
<text
space=
"nbsp"
>
1.
</text>
<text>
下载 HBuilderX,新建 uni-app 项目时选择
<text
class=
"code"
>
Hello uni-app
</text>
模板。
</text>
</view>
<view
class=
"source-cell"
>
<text
space=
"nbsp"
>
2.
</text>
<u-link
class=
"link"
:href=
"'https://github.com/dcloudio/hello-uniapp'"
:text=
"'https://github.com/dcloudio/hello-uniapp'"
></u-link>
</view>
</view>
</view>
<!-- #ifdef APP-PLUS -->
<button
type=
"primary"
@
click=
"share"
>
分享
</button>
<!-- #endif -->
</view>
<!-- #ifdef APP-PLUS -->
<view
class=
"version"
>
当前版本:
{{
version
}}
</view>
<!-- #endif -->
</view>
</
template
>
<
script
>
import
baseappConfig
from
'
@/baseapp.config.json
'
;
export
default
{
data
()
{
return
{
providerList
:
[],
version
:
''
}
},
onLoad
()
{
// #ifdef APP-PLUS
this
.
version
=
plus
.
runtime
.
version
;
uni
.
getProvider
({
service
:
'
share
'
,
success
:
(
result
)
=>
{
const
data
=
[];
for
(
let
i
=
0
;
i
<
result
.
provider
.
length
;
i
++
)
{
switch
(
result
.
provider
[
i
])
{
case
'
weixin
'
:
data
.
push
({
name
:
'
分享到微信好友
'
,
id
:
'
weixin
'
});
data
.
push
({
name
:
'
分享到微信朋友圈
'
,
id
:
'
weixin
'
,
type
:
'
WXSenceTimeline
'
});
break
;
case
'
qq
'
:
data
.
push
({
name
:
'
分享到QQ
'
,
id
:
'
qq
'
});
break
;
default
:
break
;
}
}
this
.
providerList
=
data
;
},
fail
:
(
error
)
=>
{
console
.
log
(
'
获取分享通道失败
'
+
JSON
.
stringify
(
error
));
}
});
this
.
version
=
plus
.
runtime
.
version
// #endif
},
methods
:
{
// #ifdef APP-PLUS
save
()
{
uni
.
showActionSheet
({
itemList
:
[
'
保存图片到相册
'
],
success
:
()
=>
{
plus
.
gallery
.
save
(
'
https://img.cdn.aliyun.dcloud.net.cn/guide/uniapp/app_download.png
'
,
function
()
{
uni
.
showToast
({
title
:
'
保存成功
'
,
icon
:
'
none
'
});
},
function
()
{
uni
.
showToast
({
title
:
'
保存失败,请重试!
'
,
icon
:
'
none
'
});
});
}
});
data
()
{
return
{
version
:
"
V1.0.0
"
,
year
:
"
2020
"
,
aboutus
:{}
};
},
share
(
e
)
{
if
(
this
.
providerList
.
length
===
0
)
{
uni
.
showModal
({
title
:
'
当前环境无分享渠道!
'
,
showCancel
:
false
});
return
;
}
let
itemList
=
this
.
providerList
.
map
(
function
(
value
)
{
return
value
.
name
;
})
uni
.
showActionSheet
({
itemList
:
itemList
,
success
:
(
res
)
=>
{
let
provider
=
this
.
providerList
[
res
.
tapIndex
].
id
;
uni
.
share
({
provider
:
provider
,
scene
:
this
.
providerList
[
res
.
tapIndex
].
type
&&
this
.
providerList
[
res
.
tapIndex
].
type
===
'
WXSenceTimeline
'
?
'
WXSenceTimeline
'
:
"
WXSceneSession
"
,
type
:
(
provider
===
"
qq
"
)
?
1
:
0
,
title
:
'
欢迎体验uni-app
'
,
summary
:
'
uni-app 是一个使用 Vue.js 开发跨平台应用的前端框架
'
,
imageUrl
:
'
https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/b09e38e0-5168-11eb-b680-7980c8a877b8.jpg
'
,
href
:
"
https://m3w.cn/uniapp
"
,
success
:
(
res
)
=>
{
console
.
log
(
"
success:
"
+
JSON
.
stringify
(
res
));
created
()
{
this
.
aboutus
=
baseappConfig
.
aboutus
this
.
year
=
(
new
Date
).
getFullYear
()
},
fail
:
(
e
)
=>
{
uni
.
showModal
({
content
:
e
.
errMsg
,
showCancel
:
false
})
}
methods
:{
navigateTo
(
url
,
title
){
uni
.
navigateTo
({
url
:
'
/pages/common/webview/webview?url=
'
+
url
+
'
&title=
'
+
title
,
success
:
res
=>
{},
fail
:
()
=>
{},
complete
:
()
=>
{}
});
}
})
}
// #endif
}
}
</
script
>
<
style
>
page
,
view
{
display
:
flex
;
}
page
{
min-height
:
100%
;
background-color
:
#FFFFFF
;
}
image
{
width
:
360
rpx
;
height
:
360
rpx
;
}
.about
{
<
style
lang=
"scss"
scoped
>
.aboutus
{
width
:
750upx
;
flex-direction
:
column
;
flex
:
1
;
}
.content
{
flex
:
1
;
padding
:
30
r
px
;
}
.logo
{
width
:
750upx
;
position
:
fixed
;
left
:
0
;
top
:
100
px
;
flex-direction
:
column
;
justify-content
:
center
;
}
.qrcode
{
display
:
flex
;
align-items
:
center
;
}
.logoImg
{
margin-bottom
:
10upx
;
width
:
160upx
;
height
:
160upx
;
border-radius
:
15px
;
}
.appName
{
margin-top
:
20px
;
margin-bottom
:
5px
;
font-size
:
42rpx
;
font-weight
:
500
;
}
.copyright
{
width
:
750upx
;
font-size
:
32rpx
;
flex-direction
:
column
;
}
.qrcode
.tip
{
margin-top
:
20
rpx
;
}
.desc
{
margin-top
:
30
rpx
;
display
:
block
;
}
.code
{
color
:
#e96900
;
background-color
:
#f8f8f8
;
/* #ifndef APP-NVUE */
display
:
inline-block
;
/* #endif */
}
button
{
width
:
100%
;
margin-top
:
40
rpx
;
}
.version
{
height
:
80
rpx
;
line-height
:
80
rpx
;
justify-content
:
center
;
color
:
#ccc
;
text-align
:
center
;
}
.source
{
margin-top
:
30
rpx
;
flex-direction
:
column
;
}
.source-list
{
flex-direction
:
column
;
}
.link
{
color
:
#007AFF
;
}
align-items
:
center
;
bottom
:
20px
;
left
:
0
;
position
:
fixed
;
}
.agreement
{
color
:
#2285ff
;
font-size
:
26rpx
;
}
.hint
{
color
:
#999999
;
font-size
:
26rpx
;
}
</
style
>
\ No newline at end of file
pages/ucenter/edit/edit.
n
vue
→
pages/ucenter/edit/edit.vue
浏览文件 @
1fa90363
...
...
@@ -104,8 +104,6 @@
width
:
150
rpx
;
height
:
150
rpx
;
border-radius
:
75
rpx
;
border-width: 1rpx;
border-color: #999999;
border
:
#F8F8F8
solid
1px
;
}
</
style
>
pages/ucenter/settings/settings.vue
浏览文件 @
1fa90363
...
...
@@ -2,12 +2,15 @@
<view
class=
"content"
>
<!-- 功能列表 -->
<uni-list
class=
"content"
>
<uni-list-item
v-for=
"(item,index) in agreeList"
:key=
"index"
:title=
"item.title"
:to=
"item.to"
<uni-list-item
v-for=
"(item,index) in agreeList"
:key=
"index"
:title=
"item.title"
:clickable=
"true"
@
click=
"itemClick(item)"
:showSwitch=
"item.showSwitch"
:switchChecked=
"item.isChecked"
:link=
"
item.to
"
></uni-list-item>
:link=
"
!item.showSwitch
"
></uni-list-item>
</uni-list>
<!-- 退出按钮 -->
<button
class=
"bottom-back"
@
click=
"clickLogout"
><text
class=
"bottom-back-text"
>
退出登录
</text></button>
<button
class=
"bottom-back"
@
click=
"clickLogout"
>
<text
class=
"bottom-back-text"
v-if=
"userInfo"
>
退出登录
</text>
<text
class=
"bottom-back-text"
v-else
>
登录
</text>
</button>
</view>
</
template
>
...
...
@@ -68,22 +71,24 @@
logout
:
'
user/logout
'
}),
toEdit
(){
uni
.
navigateTo
({
url
:
'
..
/edit/edit
'
url
:
'
/pages/ucenter
/edit/edit
'
});
},
changePwd
(){
if
(
this
.
userInfo
){
uni
.
navigateTo
({
url
:
'
/uni_modules/uni-login-page/pages/index/pwd-retrieve?phoneNumber=
'
+
(
this
.
userInfo
.
phone
||
''
)
+
'
&phoneArea=+86
'
});
}
else
{
uni
.
showToast
({
title
:
'
请先登录
'
,
icon
:
'
none
'
});
}
// if(this.userInfo){
// uni.navigateTo({
// url:'/uni_modules/uni-login-page/pages/index/pwd-retrieve?phoneNumber='+ (this.userInfo.phone||'') +'&phoneArea=+86'
// });
// } else {
// uni.showToast({
// title: '请先登录',
// icon: 'none'
// });
// }
},
checkPush
(){
// 手机端获取推送是否开启
...
...
@@ -186,7 +191,7 @@
})
},
clickLogout
()
{
if
(
this
.
userInfo
){
uni
.
showModal
({
title
:
'
提示
'
,
content
:
'
是否退出登录
'
,
...
...
@@ -201,6 +206,11 @@
fail
:
()
=>
{},
complete
:
()
=>
{}
});
}
else
{
uni
.
navigateTo
({
url
:
'
/uni_modules/uni-login-page/pages/index/index
'
});
}
},
itemClick
(
item
)
{
if
(
!
item
.
to
&&
item
.
event
)
{
...
...
@@ -253,10 +263,11 @@
/* #endif */
border-width
:
0
;
border-radius
:
0
;
background-color
:
#007AFF
;
}
.bottom-back-text
{
font-size
:
40
rpx
;
color
:
#
DD524D
;
color
:
#
FFFFFF
;
}
</
style
>
pages/ucenter/ucenter.vue
浏览文件 @
1fa90363
<
template
>
<view
class=
"center"
>
<
view
class=
"userInfo"
@
click=
"goLogin"
:hover-class=
"!login ? 'logo-hover' : ''
"
>
<
navigator
url=
"/pages/ucenter/settings/settings"
class=
"userInfo
"
>
<image
class=
"logo-img"
:src=
"login ? (userInfo.avatar || avatarUrl) :avatarUrl"
></image>
<view
class=
"logo-title"
>
<text
class=
"uer-name"
>
{{
login
?
userInfo
.
nick
name
||
userInfo
.
mobile
:
'
未登录
'
}}
</text>
<text
class=
"uer-name"
>
{{
login
?
userInfo
.
user
name
||
userInfo
.
mobile
:
'
未登录
'
}}
</text>
<text
class=
"go-login-navigat-arrow navigat-arrow"
v-if=
"!login"
>

</text>
</view>
</
view
>
</
navigator
>
<uni-grid
class=
"grid"
:column=
"5"
:showBorder=
"false"
:square=
"true"
>
<uni-grid-item
class=
"item"
v-for=
"(
{text,icon},index) in gridList" @click.native="tapGrid(index)">
<uni-icons
class=
"icon"
color=
"#5d5e64"
:type=
"icon"
size=
"28"
></uni-icons>
...
...
@@ -180,9 +180,9 @@
align-items
:
center
;
}
.logo-hover
{
/*
.logo-hover {
opacity: 0.8;
}
}
*/
.logo-img
{
width
:
150
rpx
;
...
...
uni_modules/uni-id/changelog.md
浏览文件 @
1fa90363
## 3.0.12(2021-04-13)
-
调整bindTokenToDevice默认值为false
## 3.0.11(2021-04-12)
-
修复3.0.7版本引出的多个用户访问时可能出现30201报错的Bug
## 3.0.10(2021-04-08)
...
...
uni_modules/uni-id/package.json
浏览文件 @
1fa90363
{
"id"
:
"uni-id"
,
"displayName"
:
"uni-id"
,
"version"
:
"3.0.1
1
"
,
"version"
:
"3.0.1
2
"
,
"description"
:
"简单、统一、可扩展的用户中心"
,
"keywords"
:
[
"uniid"
,
...
...
uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id/index.js
浏览文件 @
1fa90363
此差异已折叠。
点击以展开。
uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id/package.json
浏览文件 @
1fa90363
{
"name"
:
"uni-id"
,
"version"
:
"3.0.1
1
"
,
"version"
:
"3.0.1
2
"
,
"description"
:
"uni-id for uniCloud"
,
"main"
:
"index.js"
,
"homepage"
:
"https://uniapp.dcloud.io/uniCloud/uni-id"
,
...
...
uni_modules/uni-quick-login/uniCloud/cloudfunctions/user-center/index.js
浏览文件 @
1fa90363
...
...
@@ -11,7 +11,7 @@ exports.main = async (event, context) => {
context
})
//event为客户端上传的参数
console
.
log
(
'
event :
'
+
event
)
console
.
log
(
'
event :
'
+
JSON
.
stringify
(
event
)
)
let
params
=
event
.
params
||
{}
//防止黑客恶意破解登陆,连续登陆失败一定次数后,需要用户提供验证码
...
...
@@ -107,6 +107,11 @@ exports.main = async (event, context) => {
break
;
case
'
login_by_weixin
'
:
res
=
await
uniID
.
loginByWeixin
(
params
);
await
uniID
.
updateUser
({
uid
:
params
.
uid
,
username
:
"
微信用户
"
});
res
.
userInfo
.
username
=
"
微信用户
"
loginLog
(
res
)
break
;
case
'
login_by_univerify
'
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录