Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-starter
提交
233c20ab
U
uni-starter
项目概览
DCloud
/
uni-starter
通知
4684
Star
229
Fork
210
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
3
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-starter
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
3
Issue
3
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
233c20ab
编写于
4月 07, 2021
作者:
L
linju
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
213
上级
a5944d62
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
396 addition
and
213 deletion
+396
-213
App.vue
App.vue
+10
-0
manifest.json
manifest.json
+3
-1
pages.json
pages.json
+17
-8
pages/settings/settings11.nvue
pages/settings/settings11.nvue
+110
-0
pages/ucenter/ucenter.vue
pages/ucenter/ucenter.vue
+241
-196
uni_modules/uni-login-page/pages/index/index.vue
uni_modules/uni-login-page/pages/index/index.vue
+9
-5
uni_modules/uni-quick-login/components/uni-quick-login/uni-quick-login.vue
...uick-login/components/uni-quick-login/uni-quick-login.vue
+6
-3
未找到文件。
App.vue
浏览文件 @
233c20ab
...
@@ -30,4 +30,14 @@
...
@@ -30,4 +30,14 @@
box-sizing
:
border-box
;
box-sizing
:
border-box
;
/* #endif */
/* #endif */
}
}
/* #ifndef APP-NVUE */
view
,
scroll-view
,
text
,
image
,
switch
,
navigator
,
icons
{
display
:
flex
;
box-sizing
:
border-box
;
}
scroll-view
{
-webkit-overflow-scrolling
:
touch
;
}
/* #endif */
</
style
>
</
style
>
manifest.json
浏览文件 @
233c20ab
...
@@ -17,7 +17,8 @@
...
@@ -17,7 +17,8 @@
},
},
"modules"
:
{
"modules"
:
{
"OAuth"
:
{},
"OAuth"
:
{},
"Share"
:
{}
"Share"
:
{},
"Fingerprint"
:
{}
},
},
"distribute"
:
{
"distribute"
:
{
"android"
:
{
"android"
:
{
...
@@ -34,6 +35,7 @@
...
@@ -34,6 +35,7 @@
"<uses-permission android:name=
\"
android.permission.MOUNT_UNMOUNT_FILESYSTEMS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.MOUNT_UNMOUNT_FILESYSTEMS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.READ_LOGS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.READ_LOGS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.READ_PHONE_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.READ_PHONE_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.USE_FINGERPRINT
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.VIBRATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.VIBRATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.WAKE_LOCK
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.WAKE_LOCK
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.WRITE_SETTINGS
\"
/>"
"<uses-permission android:name=
\"
android.permission.WRITE_SETTINGS
\"
/>"
...
...
pages.json
浏览文件 @
233c20ab
...
@@ -22,15 +22,24 @@
...
@@ -22,15 +22,24 @@
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
""
,
"navigationBarTitleText"
:
""
,
"navigationBarBackgroundColor"
:
"#FFFFFF"
,
"navigationBarBackgroundColor"
:
"#FFFFFF"
,
"navigationStyle"
:
"custom"
,
"backgroundColor"
:
"transparent"
,
"app-plus"
:
{
"app-plus"
:
{
"titleNView"
:
{
"animationType"
:
"fade-in"
,
"buttons"
:
[{
"background"
:
"transparent"
,
"text"
:
"帮助"
,
"popGesture"
:
"none"
,
"type"
:
"none"
,
"titleNView"
:
false
"fontSize"
:
"16px"
,
//
"navigationBarTitleText"
:
""
,
"width"
:
"60px"
//
"navigationBarBackgroundColor"
:
"#FFFFFF"
,
}]
//
"app-plus"
:
{
}
//
"titleNView"
:
{
//
"buttons"
:
[{
//
"text"
:
"帮助"
,
//
"type"
:
"none"
,
//
"fontSize"
:
"16px"
,
//
"width"
:
"60px"
//
}]
//
}
}
}
}
}
},
{
},
{
...
...
pages/settings/settings11.nvue
0 → 100644
浏览文件 @
233c20ab
<template>
<view class="content">
<uni-list class="content">
<uni-list-item v-for="(item , index) in agreeList" :key="index" :title="item.title" :to="item.to"
:clickable="true" @click="itemClick(item)" :showSwitch="item.showSwitch"
:switchChecked="item.isChecked"
:link="item.link"></uni-list-item>
</uni-list>
<button class="bottom-back" @click="clickLogout"><text class="bottom-back-text">退出登录</text></button>
</view>
</template>
<script>
import {
isOn,
setting
} from '@/common/dc-push/push.js';
import {
mapMutations
} from 'vuex';
export default {
data() {
return {
agreeList: [{
title: '个人资料',
to: '',
link:true
},
{
title: '修改密码',
to: '',
link:true
}, {
title: '注销用户',
event: '',
link:true
}, {
title: '推送功能',
name: 'push',
event: 'openSetting',
isChecked: false,
showSwitch: true,
},
{
title: "录入指纹",
name: 'fingerprint',
link:true
}, {
title: '清理缓存',
event: '',
link:true
}
]
}
},
onShow() {
let pushIsOn = isOn();
this.agreeList.forEach(item => {
item.name == 'push' ? (item.isChecked = pushIsOn) : '';
})
},
methods: {
...mapMutations({
logout: 'user/logout'
}),
clickLogout() {
this.logout();
uni.navigateBack();
},
itemClick(item) {
if (!item.to && item.event) {
this[item.event]();
}
},
/**
* 打开设置页面
*/
openSetting() {
setting();
}
}
}
</script>
<style>
.content {
width: 750rpx;
display: flex;
flex-direction: column;
/* align-items: center; */
flex: 1;
}
.bottom-back {
width: 750rpx;
height: 120rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
border: none;
border-width: 0;
border-radius: 0;
}
.bottom-back-text {
font-size: 40rpx;
color: #DD524D;
}
</style>
pages/ucenter/ucenter.
n
vue
→
pages/ucenter/ucenter.vue
浏览文件 @
233c20ab
<template>
<
template
>
<view class="center">
<view
class=
"center"
>
<view class="logo" @click="goLogin" :hover-class="!login ? 'logo-hover' : ''">
<view
class=
"logo"
@
click=
"goLogin"
:hover-class=
"!login ? 'logo-hover' : ''"
>
<image class="logo-img" :src="login ? (userInfo.avatar || avatarUrl) :avatarUrl"></image>
<image
class=
"logo-img"
:src=
"login ? (userInfo.avatar || avatarUrl) :avatarUrl"
></image>
<view class="logo-title">
<view
class=
"logo-title"
>
<text class="uer-name">Hi,{{login ? userInfo.username : '您未登录'}}</text>
<text
class=
"uer-name"
>
Hi,
{{
login
?
userInfo
.
username
:
'
您未登录
'
}}
</text>
<text class="go-login-navigat-arrow navigat-arrow" v-if="!login"></text>
<text
class=
"go-login-navigat-arrow navigat-arrow"
v-if=
"!login"
>

</text>
</view>
</view>
</view>
</view>
<uni-list class="center-list">
<uni-grid
class=
"grid"
:column=
"5"
:showBorder=
"false"
:square=
"true"
>
<template v-for="(sublist , index) in ucenterList">
<uni-grid-item
class=
"item"
v-for=
"(
{text,icon},index) in gridList" @click.native="tapGrid(index)">
<uni-list-item :title="item.title" :rightText="item.rightText" :to="item.to"
<uni-icons
class=
"icon"
color=
"#5d5e64"
:type=
"icon"
size=
"28"
></uni-icons>
v-for="(item, subIndex) in sublist" :key="(index + '_' + subIndex)" @click="ucenterListClick(item)" :clickable="true"></uni-list-item>
<text
class=
"text"
>
{{
text
}}
</text>
<!-- #ifdef APP-NVUE -->
</uni-grid-item>
<cell class="center-list-cell"></cell>
</uni-grid>
<!-- #endif -->
<uni-list
class=
"center-list"
v-for=
"(sublist , index) in ucenterList"
>
<!-- #ifndef APP-PLUS -->
<uni-list-item
v-for=
"item in sublist"
<view class="center-list-cell"></view>
:title=
"item.title"
<!-- #endif -->
link
:rightText=
"item.rightText"
</template>
:clickable=
"true"
</uni-list>
:to=
"item.to"
</view>
@
click=
"ucenterListClick(item)"
</template>
></uni-list-item>
</uni-list>
<script>
</view>
import {
</
template
>
mapGetters,
mapMutations
<
script
>
} from 'vuex';
import
{
import checkUpdate from '@/uni_modules/uni-upgrade-center-app/utils/check-update';
mapGetters
,
export default {
mapMutations
data() {
}
from
'
vuex
'
;
return {
import
checkUpdate
from
'
@/uni_modules/uni-upgrade-center-app/utils/check-update
'
;
avatarUrl: '/static/logo.png',
export
default
{
ucenterList: [
data
()
{
[{
return
{
title: '阅读过的文章'
avatarUrl
:
'
/static/logo.png
'
,
}, {
gridList
:
[{
title: '我的积分'
"
text
"
:
"
文字1
"
,
}],
"
icon
"
:
"
chat
"
[{
},
title: '政策与协议',
{
to:'/pages/agree-list/agree-list'
"
text
"
:
"
文字2
"
,
}, {
"
icon
"
:
"
cloud-upload
"
title: '关于',
},
to: '/pages/about/about'
{
},
"
text
"
:
"
文字3
"
,
//#ifdef APP-PLUS
"
icon
"
:
"
contact
"
{
},
title: '检查更新',
{
rightText: `V${getApp().appVersion.finall.version}_${getApp().appVersion.finall.versionCode}`,
"
text
"
:
"
文字4
"
,
event:'checkVersion'
"
icon
"
:
"
download
"
}
},
//#endif
{
],
"
text
"
:
"
文字5
"
,
[
"
icon
"
:
"
paperplane
"
{
}
title: '反馈',
],
to:'/pages/uni-feedback/uni-feedback'
ucenterList
:
[
},{
[{
title: '设置',
title
:
'
阅读过的文章
'
,
to: '/pages/settings/settings'
to
:
'
/pages/agree-list/agree-list
'
}
},
{
]
title
:
'
我的积分
'
,
]
to
:
'
/pages/agree-list/agree-list
'
}
}],
},
[{
computed: {
title
:
'
政策与协议
'
,
...mapGetters({
to
:
'
/pages/agree-list/agree-list
'
userInfo: 'user/info',
},
{
login: 'user/hasLogin'
title
:
'
关于
'
,
})
to
:
'
/pages/about/about
'
},
},
onReady() {
//#ifdef APP-PLUS
// {
},
// title: '检查更新',
onShow(){
// rightText: `V${getApp().appVersion.finall.version}_${getApp().appVersion.finall.versionCode}`,
console.log(this.userInfo);
// event:'checkVersion'
},
// }
methods: {
//#endif
...mapMutations({
],
logout:'user/logout'
[{
}),
title
:
'
反馈
'
,
/**
to
:
'
/pages/uni-feedback/uni-feedback
'
* 个人中心项目列表点击事件
},
{
*/
title
:
'
设置
'
,
ucenterListClick(item){
to
:
'
/pages/settings/settings
'
if(!item.to && item.event){
}]
this[item.event]();
]
}
}
},
computed
:
{
...
mapGetters
({
userInfo
:
'
user/info
'
,
login
:
'
user/hasLogin
'
})
},
onReady
()
{
},
onShow
()
{
console
.
log
(
this
.
userInfo
);
},
methods
:
{
...
mapMutations
({
logout
:
'
user/logout
'
}),
/**
* 个人中心项目列表点击事件
*/
ucenterListClick
(
item
)
{
if
(
!
item
.
to
&&
item
.
event
)
{
this
[
item
.
event
]();
}
},
checkVersion
()
{
checkUpdate
();
},
goLogin
()
{
if
(
!
this
.
login
)
{
console
.
log
(
'
点击前往登录
'
);
uni
.
navigateTo
({
url
:
'
/uni_modules/uni-login-page/pages/index/index
'
});
}
else
{
console
.
log
(
'
点击编辑信息
'
);
uni
.
navigateTo
({
url
:
'
./edit/edit
'
})
}
},
},
checkVersion(){
tapGrid
(
index
){
checkUpdate();
uni
.
showToast
({
},
title
:
'
你点击了,第
'
+
index
+
'
个
'
,
goLogin() {
icon
:
'
none
'
if (!this.login) {
});
console.log('点击前往登录');
}
uni.navigateTo({
}
url: '/uni_modules/uni-login-page/pages/index/index'
}
});
</
script
>
}
else {
<
style
>
console.log('点击编辑信息');
/* #ifndef APP-PLUS-NVUE */
uni.navigateTo({
@font-face
{
url:'./edit/edit'
font-family
:
texticons
;
})
font-weight
:
normal
;
}
font-style
:
normal
;
}
src
:
url('~@/static/text-icon.ttf')
format
(
'truetype'
);
}
}
}
</script>
page
{
background-color
:
#f8f8f8
;
<style>
}
/* #ifndef APP-PLUS-NVUE */
@font-face {
/* #endif*/
font-family: texticons;
font-weight: normal;
/* 解决头条小程序字体图标不显示问题,因为头条运行时自动插入了span标签,且有全局字体 */
font-style: normal;
/* #ifdef MP-TOUTIAO */
src: url('~@/static/text-icon.ttf') format('truetype');
text
:not
(
view
)
{
}
font-family
:
texticons
;
}
page {
background-color: #f8f8f8;
/* #endif */
}
.center
{
/* #endif*/
flex
:
1
;
flex-direction
:
column
;
/* 解决头条小程序字体图标不显示问题,因为头条运行时自动插入了span标签,且有全局字体 */
background-color
:
#f8f8f8
;
/* #ifdef MP-TOUTIAO */
}
text :not(view) {
font-family: texticons;
.logo
{
}
width
:
750
upx
;
height
:
240
upx
;
/* #endif */
padding
:
20
upx
;
background-color
:
#2F85FC
;
.center {
flex-direction
:
row
;
flex: 1;
align-items
:
center
;
flex-direction: column;
}
background-color: #f8f8f8;
}
.logo-hover
{
opacity
:
0.8
;
.logo {
}
width: 750upx;
height: 240upx;
.logo-img
{
padding: 20upx;
width
:
150
upx
;
background-color: #2F85FC;
height
:
150
upx
;
flex-direction: row;
border-radius
:
150
upx
;
align-items: center;
}
}
.logo-title
{
.logo-hover {
height
:
150
upx
;
opacity: 0.8;
flex
:
1
;
}
align-items
:
center
;
justify-content
:
space-between
;
.logo-img {
flex-direction
:
row
;
width: 150upx;
margin-left
:
20
upx
;
height: 150upx;
}
border-radius: 150upx;
}
.uer-name
{
height
:
60
upx
;
.logo-title {
line-height
:
60
upx
;
height: 150upx;
font-size
:
38
upx
;
flex: 1;
color
:
#FFFFFF
;
align-items: center;
}
justify-content: space-between;
flex-direction: row;
.go-login-navigat-arrow
{
margin-left: 20upx;
font-size
:
38
upx
;
}
color
:
#FFFFFF
;
}
.uer-name {
height: 60upx;
.navigat-arrow
{
line-height: 60upx;
height
:
90
upx
;
font-size: 38upx;
width
:
40
upx
;
color: #FFFFFF;
line-height
:
90
upx
;
}
font-size
:
34
upx
;
color
:
#555
;
.go-login-navigat-arrow {
text-align
:
right
;
font-size: 38upx;
font-family
:
texticons
;
color: #FFFFFF;
}
}
.navigat-arrow {
height: 90upx;
width: 40upx;
line-height: 90upx;
font-size: 34upx;
color: #555;
text-align: right;
font-family: texticons;
}
.center-list
{
.center-list
{
background-color: #f9f9f9;
margin-bottom
:
30
rpx
;
}
background-color
:
#f9f9f9
;
}
.center-list-cell {
.center-list-cell
{
width
:
750
rpx
;
width
:
750
rpx
;
height: 40rpx;
background-color
:
#007AFF
;
}
height
:
40
rpx
;
}
.grid
{
background-color
:
#FFFFFF
;
margin
:
25
rpx
0
;
}
.uni-grid
.text
{
font-size
:
26
rpx
;
color
:
#817f82
;
}
.uni-grid
.item
/
deep
/
.uni-grid-item__box
{
justify-content
:
center
;
align-items
:
center
;
}
</
style
>
</
style
>
uni_modules/uni-login-page/pages/index/index.
n
vue
→
uni_modules/uni-login-page/pages/index/index.vue
浏览文件 @
233c20ab
<
template
>
<
template
>
<view class="flex flex-column flex-1 w-750 bg-white">
<view
class=
"flex flex-column flex-1 w-750 bg-white"
:class=
"
{'hidden':!isShow}"
>
<view class="flex-1 flex flex-column justify-start align-center">
<view
v-if=
"isShow"
class=
"flex-1 flex flex-column justify-start align-center"
>
<view
class=
"w-630 flex flex-column"
>
<view
class=
"w-630 flex flex-column"
>
<!-- 顶部文字 -->
<!-- 顶部文字 -->
<text
class=
"font-32 font-blod pt-5"
>
登陆后即可展示自己
</text>
<text
class=
"font-32 font-blod pt-5"
>
登陆后即可展示自己
</text>
...
@@ -33,14 +33,15 @@
...
@@ -33,14 +33,15 @@
</view>
</view>
<!-- 登录按钮弹窗 -->
<!-- 登录按钮弹窗 -->
<login-action-sheet
ref=
"loginActionSheet"
></login-action-sheet>
<login-action-sheet
ref=
"loginActionSheet"
></login-action-sheet>
<uni-quick-login></uni-quick-login>
<uni-quick-login
@
univerifyEnd=
"isShow = 1"
></uni-quick-login>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
data
()
{
data
()
{
return {
return
{
isShow
:
false
,
link
:
[{
link
:
[{
text
:
'
用户协议
'
,
text
:
'
用户协议
'
,
to
:
'
/baidu.com
'
to
:
'
/baidu.com
'
...
@@ -84,7 +85,10 @@
...
@@ -84,7 +85,10 @@
}
}
</
script
>
</
script
>
<style>
<
style
>
.hidden
,
page
{
background-color
:
transparent
;
}
@import
url("../../common/myStyle.css")
;
@import
url("../../common/myStyle.css")
;
.lgnin-iknow
{
.lgnin-iknow
{
...
...
uni_modules/uni-quick-login/components/uni-quick-login/uni-quick-login.vue
浏览文件 @
233c20ab
<
template
>
<
template
>
<view
class=
"quick-login-box"
>
<view
class=
"quick-login-box"
v-if=
"isShow"
>
<view
class=
"item"
v-for=
"(
{text,logo,name},index) in providerList" :key="index" @click="login(name)">
<view
class=
"item"
v-for=
"(
{text,logo,name},index) in providerList" :key="index" @click="login(name)">
<image
class=
"logo"
:src=
"logo"
mode=
"widthFix"
></image>
<image
class=
"logo"
:src=
"logo"
mode=
"widthFix"
></image>
<text
class=
"login-title"
>
{{
text
}}
</text>
<text
class=
"login-title"
>
{{
text
}}
</text>
...
@@ -10,7 +10,8 @@
...
@@ -10,7 +10,8 @@
<
script
>
<
script
>
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
isShow
:
false
,
config
:
{
config
:
{
"
weixin
"
:
{
"
weixin
"
:
{
"
text
"
:
"
微信登陆
"
,
"
text
"
:
"
微信登陆
"
,
...
@@ -39,7 +40,7 @@
...
@@ -39,7 +40,7 @@
},
},
providerList
:
[],
providerList
:
[],
univerifyStyle
:
{
univerifyStyle
:
{
"
fullScreen
"
:
fals
e
,
// 是否全屏显示,true表示全屏模式,false表示非全屏模式,默认值为false。
"
fullScreen
"
:
tru
e
,
// 是否全屏显示,true表示全屏模式,false表示非全屏模式,默认值为false。
"
backgroundColor
"
:
"
#ffffff
"
,
// 授权页面背景颜色,默认值:#ffffff
"
backgroundColor
"
:
"
#ffffff
"
,
// 授权页面背景颜色,默认值:#ffffff
}
}
}
}
...
@@ -77,6 +78,8 @@
...
@@ -77,6 +78,8 @@
console
.
log
(
err
);
console
.
log
(
err
);
if
(
err
.
errCode
===
30002
){
if
(
err
.
errCode
===
30002
){
console
.
log
(
'
你手动关闭了,一键登陆
'
);
console
.
log
(
'
你手动关闭了,一键登陆
'
);
this
.
isShow
=
1
this
.
$emit
(
'
univerifyEnd
'
)
}
}
}
}
})
})
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录