Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
言程序plus
uni-starter
提交
a3d70aad
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看板
提交
a3d70aad
编写于
4月 15, 2021
作者:
L
linju
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
123
上级
2b257a59
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
524 addition
and
179 deletion
+524
-179
App.vue
App.vue
+23
-16
baseapp.config.json
baseapp.config.json
+11
-5
common/appInit.js
common/appInit.js
+38
-13
js_sdk/request.js
js_sdk/request.js
+14
-2
pages.json
pages.json
+34
-34
pages/test/test.vue
pages/test/test.vue
+21
-1
pages/ucenter/about/about.vue
pages/ucenter/about/about.vue
+11
-10
pages/ucenter/settings/settings.nvue
pages/ucenter/settings/settings.nvue
+257
-0
pages/ucenter/settings/settings.vue
pages/ucenter/settings/settings.vue
+3
-19
pages/ucenter/ucenter.vue
pages/ucenter/ucenter.vue
+63
-66
uniCloud-aliyun/database/db_init.json
uniCloud-aliyun/database/db_init.json
+20
-0
uni_modules/uni-login-page/common/loginPage.css
uni_modules/uni-login-page/common/loginPage.css
+3
-1
uni_modules/uni-login-page/common/loginPage.mixin.js
uni_modules/uni-login-page/common/loginPage.mixin.js
+6
-6
uni_modules/uni-quick-login/components/uni-quick-login/uni-quick-login.vue
...uick-login/components/uni-quick-login/uni-quick-login.vue
+20
-6
未找到文件。
App.vue
浏览文件 @
a3d70aad
...
...
@@ -8,24 +8,31 @@
onLaunch
:
function
()
{
console
.
log
(
'
App Launch
'
)
initApp
();
//预加载设置页面
uni
.
preloadPage
({
url
:
"
/pages/ucenter/settings/settings
"
,
complete
:
e
=>
{
console
.
log
(
e
);
}
});
// #ifdef APP-PLUS
//预加载一键登录
//
plus.oauth.getServices(oauthServices=>{
// oauthServices.forEach(({_id},item)=>{
// if(_id=='provider')
{
// uni.preLogin(
{
// provider:item,
// complete:e=>{
// console.log(e);
// }
// })
// }
// })
//
uni.preloadPage({url: "/uni_modules/uni-login-page/pages/index/index"});
//
},err=>{
//
console.error('获取服务供应商失败:' + JSON.stringify(err));
//
})
plus
.
oauth
.
getServices
(
oauthServices
=>
{
console
.
log
(
oauthServices
);
oauthServices
.
forEach
(({
_id
},
item
)
=>
{
if
(
_id
==
'
provider
'
)
{
uni
.
preLogin
({
provider
:
item
,
complete
:
e
=>
{
console
.
log
(
e
);
}
})
}
})
uni
.
preloadPage
({
url
:
"
/uni_modules/uni-login-page/pages/index/index
"
});
},
err
=>
{
console
.
error
(
'
获取服务供应商失败:
'
+
JSON
.
stringify
(
err
));
})
// #endif
},
onShow
:
function
()
{
...
...
baseapp.config.json
浏览文件 @
a3d70aad
...
...
@@ -5,13 +5,19 @@
"/uni_modules/uni-login-page/pages/index/pwd-retrieve"
]
},
"about
us
"
:{
"about"
:{
"appName"
:
"base-app"
,
"company"
:
"数字天堂(北京)网络技术有限公司"
,
"slogan"
:
"为开发而生"
,
"agreement"
:{
"privacy"
:
"https://uniapp.dcloud.io/"
,
"business"
:
"https://uniapp.dcloud.io/"
}
"agreements"
:[
{
"title"
:
"用户服务协议"
,
"url"
:
"https://uniapp.dcloud.io/"
},
{
"title"
:
"隐私政策"
,
"url"
:
"https://uniapp.dcloud.io/"
}
]
}
}
\ No newline at end of file
common/appInit.js
浏览文件 @
a3d70aad
...
...
@@ -10,21 +10,46 @@ export default function() {
//自定义路由拦截
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
// changeAction(["navigateTo", "redirectTo", "reLaunch", "switchTab"], {
// before_action: e => {
// let token = uni.getStorageSync('uni-id-token')
// let url = e.url.split('?')[0]
// if (needLogin.includes(url) && token == '') {
// console.log('该页面需要登陆,即将跳转到login页面');
// uni.showToast({title:'该页面需要登陆,即将跳转到login页面',icon:'none'})
// uni.navigateTo({
// url:"/uni_modules/uni-login-page/pages/index/index"
// })
// return false
// }
// return true
// }
// })
//uni.addInterceptor的写法
let
list
=
[
"
navigateTo
"
,
"
redirectTo
"
,
"
reLaunch
"
,
"
switchTab
"
];
list
.
forEach
(
item
=>
{
uni
.
addInterceptor
(
item
,{
invoke
(
e
){
// 调用前拦截
//console.log(e);
let
token
=
uni
.
getStorageSync
(
'
uni-id-token
'
)
let
url
=
e
.
url
.
split
(
'
?
'
)[
0
]
if
(
needLogin
.
includes
(
url
)
&&
token
==
''
)
{
console
.
log
(
'
该页面需要登陆,即将跳转到login页面
'
);
uni
.
showToast
({
title
:
'
该页面需要登陆,即将跳转到login页面
'
,
icon
:
'
none
'
})
uni
.
navigateTo
({
url
:
"
/uni_modules/uni-login-page/pages/index/index
"
})
return
false
}
return
true
}
return
true
}
})
})
//提示网络变化
eventListenerNetwork
()
...
...
@@ -128,7 +153,7 @@ function changeAction(actions, {before_action,after_action}) {
let
old_action
=
uni
[
action
]
uni
[
action
]
=
e
=>
{
if
(
before_action
(
e
))
{
console
.
log
(
after_action
);
//
console.log(after_action);
if
(
after_action
)
{
var
compose
=
function
(
f
,
g
)
{
return
function
(
x
)
{
...
...
js_sdk/request.js
浏览文件 @
a3d70aad
...
...
@@ -28,12 +28,24 @@ export default function request(name,params,callback=false,{showLoading=false,lo
resolve
(
e
)
return
callback
(
data
,
e
.
result
,
e
)
}
debug
?
uni
.
showModal
({
content
:
JSON
.
stringify
(
e
)})
:
''
;
if
(
debug
){
uni
.
showModal
({
content
:
JSON
.
stringify
(
e
),
showCancel
:
false
,
confirmText
:
'
知道了
'
})
}
},
fail
(
err
){
reject
(
err
)
console
.
log
(
err
);
debug
?
uni
.
showModal
({
content
:
JSON
.
stringify
(
err
)})
:
''
;
if
(
debug
){
uni
.
showModal
({
content
:
JSON
.
stringify
(
err
),
showCancel
:
false
,
confirmText
:
'
知道了
'
})
}
fail
(
err
)
}
})
...
...
pages.json
浏览文件 @
a3d70aad
...
...
@@ -19,19 +19,19 @@
}
},
{
"path"
:
"uni_modules/uni-login-page/pages/index/index"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
""
,
"app-plus"
:
{
"animationType"
:
"none"
,
"popGesture"
:
"none"
,
"titleNView"
:
{
"buttons"
:
[{
"text"
:
"帮助"
,
"type"
:
"none"
,
"fontSize"
:
"16px"
,
"width"
:
"60px"
}]
}
"popGesture"
:
"none"
//
"titleNView"
:
{
//
"buttons"
:
[{
//
"text"
:
"帮助"
,
//
"type"
:
"none"
,
//
"fontSize"
:
"16px"
,
//
"width"
:
"60px"
//
}]
//
}
}
}
},
{
...
...
@@ -139,14 +139,14 @@
"style"
:
{
"navigationBarTitleText"
:
""
,
"app-plus"
:
{
"titleNView"
:
{
"buttons"
:
[{
"text"
:
"帮助"
,
"type"
:
"none"
,
"fontSize"
:
"16px"
,
"width"
:
"60px"
}]
}
//
"titleNView"
:
{
//
"buttons"
:
[{
//
"text"
:
"帮助"
,
//
"type"
:
"none"
,
//
"fontSize"
:
"16px"
,
//
"width"
:
"60px"
//
}]
//
}
}
}
},
{
...
...
@@ -154,14 +154,14 @@
"style"
:
{
"navigationBarTitleText"
:
""
,
"app-plus"
:
{
"titleNView"
:
{
"buttons"
:
[{
"text"
:
"帮助"
,
"type"
:
"none"
,
"fontSize"
:
"16px"
,
"width"
:
"60px"
}]
}
//
"titleNView"
:
{
//
"buttons"
:
[{
//
"text"
:
"帮助"
,
//
"type"
:
"none"
,
//
"fontSize"
:
"16px"
,
//
"width"
:
"60px"
//
}]
//
}
}
}
},
{
...
...
@@ -169,14 +169,14 @@
"style"
:
{
"navigationBarTitleText"
:
""
,
"app-plus"
:
{
"titleNView"
:
{
"buttons"
:
[{
"text"
:
"帮助"
,
"type"
:
"none"
,
"fontSize"
:
"16px"
,
"width"
:
"60px"
}]
}
//
"titleNView"
:
{
//
"buttons"
:
[{
//
"text"
:
"帮助"
,
//
"type"
:
"none"
,
//
"fontSize"
:
"16px"
,
//
"width"
:
"60px"
//
}]
//
}
}
}
...
...
pages/test/test.vue
浏览文件 @
a3d70aad
...
...
@@ -21,7 +21,27 @@
}
},
onLoad
()
{
onLoad
()
{
uni
.
addInterceptor
(
'
showToast
'
,{
invoke
(
e
){
// 调用前拦截
console
.
log
(
e
)
e
.
title
=
"
645
"
},
success
(
e
){
// 成功回调拦截
console
.
log
(
e
)
},
fail
(
e
){
// 失败回调拦截
console
.
log
(
e
)
},
complete
(
e
){
console
.
log
(
e
)
},
returnValue
(
e
){
// 返回结果拦截
console
.
log
(
e
)
}
})
return
/*
当某个权限调用失败
1.先检测手机的该模块是否打开
...
...
pages/ucenter/about/about.vue
浏览文件 @
a3d70aad
<
template
>
<view
class=
"about
us
"
>
<view
class=
"about"
>
<view
class=
"logo"
>
<image
class=
"logoImg"
src=
"@/static/logo.png"
></image>
<text
class=
"tip appName"
>
{{
about
us
.
appName
}}
</text>
<text
class=
"tip appName"
>
{{
about
.
appName
}}
</text>
<text
class=
"tip"
style=
"font-size:24upx;"
>
Version
{{
version
}}
</text>
</view>
<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>
<template
v-for=
"(agreement,index) in about.agreements"
>
<text
class=
"agreement"
@
click=
"navigateTo(agreement)"
>
《
{{
agreement
.
title
}}
》
</text>
<text
class=
"hint"
v-if=
"about.agreements.length-1>index"
>
和
</text>
</
template
>
<text
class=
"hint"
>
Copyright © {{year}}
</text>
<text
class=
"hint"
>
{{
about
us
.
company
}}
</text>
<text
class=
"hint"
>
{{about.company}}
</text>
</view>
</view>
</template>
...
...
@@ -26,15 +27,15 @@ import baseappConfig from '@/baseapp.config.json';
return
{
version
:
"
V1.0.0
"
,
year
:
"
2020
"
,
about
us
:{}
about
:{}
};
},
created
()
{
this
.
about
us
=
baseappConfig
.
aboutus
this
.
about
=
baseappConfig
.
about
this
.
year
=
(
new
Date
).
getFullYear
()
},
methods
:{
navigateTo
(
url
,
title
){
navigateTo
(
{
url
,
title
}
){
uni
.
navigateTo
({
url
:
'
/pages/common/webview/webview?url=
'
+
url
+
'
&title=
'
+
title
,
success
:
res
=>
{},
...
...
@@ -46,7 +47,7 @@ import baseappConfig from '@/baseapp.config.json';
}
</
script
>
<
style
lang=
"scss"
scoped
>
.about
us
{
.about
{
width
:
750upx
;
flex-direction
:
column
;
}
...
...
pages/ucenter/settings/settings.nvue
0 → 100644
浏览文件 @
a3d70aad
<template>
<view class="content">
<!-- 功能列表 -->
<uni-list class="content">
<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.showSwitch"></uni-list-item>
</uni-list>
<!-- 退出按钮 -->
<view class="bottom-back" @click="clickLogout">
<text class="bottom-back-text" v-if="userInfo">退出登录</text>
<text class="bottom-back-text" v-else>登录</text>
</view>
</view>
</template>
<script>
import {isOn,setting} from './dc-push/push.js';
import {mapMutations,mapGetters} from 'vuex';
export default {
data() {
return {
agreeList: [{
title: '个人资料',
event:'toEdit'
},
{
title: '修改密码',
event:'changePwd'
},
// {
// title: '注销用户',
// event: ''
// },
//#ifdef APP-PLUS
{
title: '推送功能',
name: 'push',
event: 'openSetting',
isChecked: false,
showSwitch: true
},
// {
// title: '清理缓存',
// event: ''
// },
//#endif
]
}
},
computed:{
...mapGetters({
'userInfo':'user/info'
})
},
onLoad() {
this.initSoterAuthentication();
},
onShow() {
this.checkPush();
},
methods: {
...mapMutations({
logout: 'user/logout'
}),
toEdit(){
uni.navigateTo({
url: '/pages/ucenter/edit/edit'
});
},
changePwd(){
uni.navigateTo({
url:'/uni_modules/uni-login-page/pages/index/pwd-retrieve?phoneNumber='+ (this.userInfo?this.userInfo.phone:'') +'&phoneArea=+86'
});
},
checkPush(){
// 手机端获取推送是否开启
//#ifdef APP-PLUS
let pushIsOn = isOn();
this.agreeList.forEach(item => {
item.name == 'push' ? (item.isChecked = pushIsOn) : '';
})
//#endif
},
/**
* 添加生物认证选项
*/
initSoterAuthentication() {
// #ifdef APP-PLUS || MP-WEIXIN
let checkAuthModeList = [{
title: '指纹解锁',
name: 'fingerPrint',
event: 'startSoterAuthentication'
}, {
title: '人脸解锁',
name: 'facial',
event: 'startSoterAuthentication'
}];
uni.checkIsSupportSoterAuthentication({
success: (res) => {
res.supportMode.forEach(item => {
this.agreeList.push(checkAuthModeList.find(mode => mode.name == item));
})
},
fail: (err) => {
reject(err);
}
})
// #endif
},
/**
* 开始生物认证
*/
startSoterAuthentication(item) {
// 检查是否开启认证
this.checkIsSoterEnrolledInDevice(item)
.then(()=>{
// 开始认证
uni.startSoterAuthentication({
requestAuthModes: [item.name],
challenge: '123456', // 微信端挑战因子
authContent: `请用${item.title}`,
success:(res)=> {
if(res.errCode == 0){
/**
* 验证成功后开启自己的业务逻辑
*
* app端以此为依据 验证成功
*
* 微信小程序需要再次通过后台验证resultJSON与resultJSONSignature获取最终结果
*/
return uni.showToast({
title: `${item.title}成功`,
icon: 'none'
});
}
uni.showToast({
title: '认证失败请重试',
icon: 'none'
});
},
fail:(err)=> {
uni.showToast({
title: `认证失败:${err.errCode}`,
icon: 'none'
});
}
})
})
},
checkIsSoterEnrolledInDevice(mode){
return new Promise((resolve, reject)=>{
uni.checkIsSoterEnrolledInDevice({
checkAuthMode:mode.name,
success: (res) => {
if(res.isEnrolled){
return resolve(res);
}
uni.showToast({
title: `设备未开启${mode.title}`,
icon: 'none'
});
reject(res);
},
fail: (err) => {
uni.showToast({
title: `${mode.title}失败`,
icon: 'none'
});
reject(err);
}
})
})
},
clickLogout() {
if(this.userInfo){
uni.showModal({
title: '提示',
content: '是否退出登录',
cancelText: '取消',
confirmText: '确定',
success: res => {
if(res.confirm){
this.logout();
uni.navigateBack();
}
},
fail: () => {},
complete: () => {}
});
}else{
uni.navigateTo({
url: '/uni_modules/uni-login-page/pages/index/index'
});
}
},
itemClick(item) {
if (!item.to && item.event) {
this[item.event](item);
}
},
/**
* 打开设置页面
*/
openSetting() {
setting();
}
}
}
</script>
<style>
/* #ifndef APP-NVUE */
page {
flex: 1;
width: 100%;
height: 100%;
}
uni-button:after{
border: none;
border-radius: 0;
}
/* #endif */
.content {
/* #ifndef APP-NVUE */
display: flex;
width: 100%;
height: 100%;
/* #endif */
flex-direction: column;
flex: 1;
}
.bottom-back {
width: 750rpx;
height: 120rpx;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: column;
justify-content: center;
align-items: center;
/* #ifndef APP-NVUE */
border: none;
/* #endif */
border-width: 0;
border-radius: 0;
background-color: #007AFF;
}
.bottom-back-text {
font-size: 40rpx;
color: #FFFFFF;
}
</style>
pages/ucenter/settings/settings.vue
浏览文件 @
a3d70aad
...
...
@@ -15,14 +15,8 @@
</
template
>
<
script
>
import
{
isOn
,
setting
}
from
'
./dc-push/push.js
'
;
import
{
mapMutations
,
mapGetters
}
from
'
vuex
'
;
import
{
isOn
,
setting
}
from
'
./dc-push/push.js
'
;
import
{
mapMutations
,
mapGetters
}
from
'
vuex
'
;
export
default
{
data
()
{
return
{
...
...
@@ -77,18 +71,8 @@
},
changePwd
(){
uni
.
navigateTo
({
url
:
'
/uni_modules/uni-login-page/pages/index/pwd-retrieve?phoneNumber=
'
+
(
this
.
userInfo
.
phone
||
''
)
+
'
&phoneArea=+86
'
url
:
'
/uni_modules/uni-login-page/pages/index/pwd-retrieve?phoneNumber=
'
+
(
this
.
userInfo
?
this
.
userInfo
.
phone
:
''
)
+
'
&phoneArea=+86
'
});
// 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
(){
// 手机端获取推送是否开启
...
...
pages/ucenter/ucenter.vue
浏览文件 @
a3d70aad
<
template
>
<view
class=
"center"
>
<
navigator
url=
"/pages/ucenter/settings/settings"
class=
"userInfo
"
>
<
view
class=
"userInfo"
@
click=
"toSettings
"
>
<image
class=
"logo-img"
:src=
"login ? (userInfo.avatar || avatarUrl) :avatarUrl"
></image>
<view
class=
"logo-title"
>
<text
class=
"uer-name"
>
{{
login
?
userInfo
.
username
||
userInfo
.
mobile
:
'
未登录
'
}}
</text>
<text
class=
"go-login-navigat-arrow navigat-arrow"
v-if=
"!login"
>

</text>
</view>
</
navigator
>
</
view
>
<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>
...
...
@@ -14,17 +14,12 @@
</uni-grid-item>
</uni-grid>
<uni-list
class=
"center-list"
v-for=
"(sublist , index) in ucenterList"
>
<uni-list-item
v-for=
"item in sublist"
:title=
"item.title"
link
:rightText=
"item.rightText"
:clickable=
"true"
:to=
"item.to"
@
click=
"ucenterListClick(item)"
>
<view
v-if=
"item.showBadge"
class=
"item-footer"
slot=
"footer"
>
<text
class=
"item-footer-text"
>
{{
item
.
rightText
}}
</text>
<view
class=
"item-footer-badge"
></view>
</view>
<uni-list-item
v-for=
"item in sublist"
:title=
"item.title"
link
:rightText=
"item.rightText"
:clickable=
"true"
:to=
"item.to"
@
click=
"ucenterListClick(item)"
>
<view
v-if=
"item.showBadge"
class=
"item-footer"
slot=
"footer"
>
<text
class=
"item-footer-text"
>
{{
item
.
rightText
}}
</text>
<view
class=
"item-footer-badge"
></view>
</view>
</uni-list-item>
</uni-list>
</view>
...
...
@@ -69,29 +64,23 @@
title
:
'
我的积分
'
,
to
:
''
}],
[{
title
:
'
政策与协议
'
,
to
:
'
/pages/ucenter/agree-list/agree-list
'
},
{
title
:
'
关于
'
,
to
:
'
/pages/ucenter/about/about
'
},
[
//#ifdef APP-PLUS
{
title
:
'
检查更新
'
,
rightText
:
`V
${
getApp
().
appVersion
.
version
}
_
${
getApp
().
appVersion
.
versionCode
}
`
,
event
:
'
checkVersion
'
,
showBadge
:
true
}
event
:
'
checkVersion
'
,
showBadge
:
true
}
,
//#endif
],
[{
title
:
'
反馈
'
,
to
:
'
/uni_modules/opendb-feedback/pages/opendb-feedback/list
'
// /pages/ucenter/uni-feedback/uni-feedback uni_modules/opendb-feedback/pages/opendb-feedback/list
},
{
title
:
'
设置
'
,
to
:
'
/pages/ucenter/settings/settings
'
}
]
{
title
:
'
反馈
'
,
to
:
'
/uni_modules/opendb-feedback/pages/opendb-feedback/list
'
// /pages/ucenter/uni-feedback/uni-feedback uni_modules/opendb-feedback/pages/opendb-feedback/list
},{
title
:
'
关于
'
,
to
:
'
/pages/ucenter/about/about
'
}
]
]
}
},
...
...
@@ -107,7 +96,12 @@
methods
:
{
...
mapMutations
({
logout
:
'
user/logout
'
}),
}),
toSettings
(){
uni
.
navigateTo
({
url
:
"
/pages/ucenter/settings/settings
"
})
},
/**
* 个人中心项目列表点击事件
*/
...
...
@@ -132,9 +126,9 @@
})
}
},
tapGrid
(
index
){
tapGrid
(
index
)
{
uni
.
showToast
({
title
:
'
你点击了,第
'
+
index
+
'
个
'
,
title
:
'
你点击了,第
'
+
index
+
'
个
'
,
icon
:
'
none
'
});
}
...
...
@@ -174,7 +168,7 @@
.userInfo
{
width
:
750
rpx
;
padding
:
20
rpx
;
padding-top
:
50px
;
padding-top
:
50px
;
background-color
:
#2F85FC
;
flex-direction
:
column
;
align-items
:
center
;
...
...
@@ -232,11 +226,12 @@
background-color
:
#007AFF
;
height
:
40
rpx
;
}
.grid
{
.grid
{
background-color
:
#FFFFFF
;
margin
:
25
rpx
0
;
margin
:
25
rpx
0
;
}
.uni-grid
.text
{
font-size
:
26
rpx
;
color
:
#817f82
;
...
...
@@ -246,36 +241,38 @@
justify-content
:
center
;
align-items
:
center
;
}
/*修改边线粗细示例*/
/* #ifndef APP-NVUE */
/*修改边线粗细示例*/
/* #ifndef APP-NVUE */
.center-list
/
deep
/
.uni-list--border
:after
,
.center-list
/
deep
/
.uni-list--border-top
,
.center-list
/
deep
/
.uni-list--border-bottom
{
.center-list
/
deep
/
.uni-list--border-top
,
.center-list
/
deep
/
.uni-list--border-bottom
{
-webkit-transform
:
scaleY
(
0.2
);
transform
:
scaleY
(
0.2
);
}
/* #endif */
.item-footer
{
flex-direction
:
row
;
align-items
:
center
;
}
.item-footer-text
{
color
:
#999
;
font-size
:
24
rpx
;
padding-right
:
10
rpx
;
}
.item-footer-badge
{
width
:
20
rpx
;
height
:
20
rpx
;
/* #ifndef APP-NVUE */
border-radius
:
50%
;
/* #endif */
/* #ifdef APP-NVUE */
border-radius
:
10
rpx
;
/* #endif */
background-color
:
#DD524D
;
}
</
style
>
/* #endif */
.item-footer
{
flex-direction
:
row
;
align-items
:
center
;
}
.item-footer-text
{
color
:
#999
;
font-size
:
24
rpx
;
padding-right
:
10
rpx
;
}
.item-footer-badge
{
width
:
20
rpx
;
height
:
20
rpx
;
/* #ifndef APP-NVUE */
border-radius
:
50%
;
/* #endif */
/* #ifdef APP-NVUE */
border-radius
:
10
rpx
;
/* #endif */
background-color
:
#DD524D
;
}
</
style
>
uniCloud-aliyun/database/db_init.json
浏览文件 @
a3d70aad
...
...
@@ -157,5 +157,25 @@
}
}
}
},
"opendb-app-versions"
:{
"data"
:[
{
"is_silently"
:
false
,
"is_mandatory"
:
false
,
"appid"
:
"__UNI__03B096E"
,
"name"
:
"base-app"
,
"title"
:
"新增升级中心"
,
"contents"
:
"新增升级中心"
,
"platform"
:
[
"Android"
],
"version"
:
"1.0.1"
,
"url"
:
"https://vkceyugu.cdn.bspapp.com/VKCEYUGU-3469aac7-a663-4c5d-8ee8-94275f8c09ab/3128d010-01c5-4121-a1d6-f3f919944a23.apk"
,
"stable_publish"
:
false
,
"type"
:
"native_app"
,
"create_date"
:
1616771628150
}
]
}
}
uni_modules/uni-login-page/common/loginPage.css
浏览文件 @
a3d70aad
...
...
@@ -41,10 +41,12 @@ page {
padding-top
:
50
rpx
;
}
/* #ifndef APP-NVUE */
.hidden
,
page
{
background-color
:
transparent
;
}
}
/* #endif */
.login-iknow
{
padding-top
:
24
rpx
;
...
...
uni_modules/uni-login-page/common/loginPage.mixin.js
浏览文件 @
a3d70aad
...
...
@@ -4,12 +4,12 @@ import {
mapMutations
}
from
'
vuex
'
;
let
mixin
=
{
// 监听帮助按钮
onNavigationBarButtonTap
(
event
)
{
uni
.
navigateTo
({
url
:
helpPage
})
},
//
//
监听帮助按钮
//
onNavigationBarButtonTap(event) {
//
uni.navigateTo({
//
url:helpPage
//
})
//
},
data
(){
return
{
// 用户协议页面跳转
...
...
uni_modules/uni-quick-login/components/uni-quick-login/uni-quick-login.vue
浏览文件 @
a3d70aad
...
...
@@ -96,7 +96,7 @@
let
oauthService
=
this
.
oauthServices
.
find
((
service
)
=>
service
.
id
==
type
)
// #ifdef APP-PLUS
//uni.showLoading({mask: true});
console
.
log
(
type
,
231
);
console
.
log
(
type
);
//请勿直接使用前端获取的unionid或openid直接用于登陆,前端的数据都是不可靠的
if
(
type
==
'
weixin
'
){
oauthService
.
authorize
(({
code
})
=>
{
...
...
@@ -104,6 +104,7 @@
this
.
quickLogin
({
code
},
type
)
},
err
=>
{
uni
.
hideLoading
()
console
.
log
(
err
);
})
}
...
...
@@ -122,11 +123,24 @@
fail
:
(
err
)
=>
{
uni
.
hideLoading
()
console
.
log
(
err
);
if
(
err
.
errCode
===
30002
){
console
.
log
(
'
在一键登陆界面,点击其他登陆方式
'
);
}
if
(
err
.
errCode
===
30003
){
uni
.
navigateBack
()
switch
(
err
.
errCode
){
case
30002
:
console
.
log
(
'
在一键登陆界面,点击其他登陆方式
'
);
break
;
case
30003
:
console
.
log
(
'
关闭了登陆
'
);
uni
.
navigateBack
()
break
;
case
30006
:
uni
.
showModal
({
title
:
"
登陆服务初始化错误
"
,
content
:
err
.
metadata
.
error_data
,
showCancel
:
false
,
confirmText
:
'
知道了
'
,
});
break
;
default
:
break
;
}
}
})
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录