提交 233c20ab 编写于 作者: L linju

213

上级 a5944d62
......@@ -30,4 +30,14 @@
box-sizing: border-box;
/* #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>
......@@ -17,7 +17,8 @@
},
"modules" : {
"OAuth" : {},
"Share" : {}
"Share" : {},
"Fingerprint" : {}
},
"distribute" : {
"android" : {
......@@ -34,6 +35,7 @@
"<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.USE_FINGERPRINT\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
......
......@@ -22,15 +22,24 @@
"style": {
"navigationBarTitleText": "",
"navigationBarBackgroundColor": "#FFFFFF",
"navigationStyle": "custom",
"backgroundColor": "transparent",
"app-plus": {
"titleNView": {
"buttons": [{
"text": "帮助",
"type": "none",
"fontSize": "16px",
"width": "60px"
}]
}
"animationType": "fade-in",
"background": "transparent",
"popGesture": "none",
"titleNView":false
// "navigationBarTitleText": "",
// "navigationBarBackgroundColor": "#FFFFFF",
// "app-plus": {
// "titleNView": {
// "buttons": [{
// "text": "帮助",
// "type": "none",
// "fontSize": "16px",
// "width": "60px"
// }]
// }
}
}
}, {
......
<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>
......@@ -7,17 +7,20 @@
<text class="go-login-navigat-arrow navigat-arrow" v-if="!login">&#xe65e;</text>
</view>
</view>
<uni-list class="center-list">
<template v-for="(sublist , index) in ucenterList">
<uni-list-item :title="item.title" :rightText="item.rightText" :to="item.to"
v-for="(item, subIndex) in sublist" :key="(index + '_' + subIndex)" @click="ucenterListClick(item)" :clickable="true"></uni-list-item>
<!-- #ifdef APP-NVUE -->
<cell class="center-list-cell"></cell>
<!-- #endif -->
<!-- #ifndef APP-PLUS -->
<view class="center-list-cell"></view>
<!-- #endif -->
</template>
<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>
<text class="text">{{text}}</text>
</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)"
></uni-list-item>
</uni-list>
</view>
</template>
......@@ -32,36 +35,57 @@
data() {
return {
avatarUrl: '/static/logo.png',
gridList: [{
"text": "文字1",
"icon": "chat"
},
{
"text": "文字2",
"icon": "cloud-upload"
},
{
"text": "文字3",
"icon": "contact"
},
{
"text": "文字4",
"icon": "download"
},
{
"text": "文字5",
"icon": "paperplane"
}
],
ucenterList: [
[{
title: '阅读过的文章'
title: '阅读过的文章',
to: '/pages/agree-list/agree-list'
}, {
title: '我的积分'
title: '我的积分',
to: '/pages/agree-list/agree-list'
}],
[{
title: '政策与协议',
to:'/pages/agree-list/agree-list'
to: '/pages/agree-list/agree-list'
}, {
title: '关于',
to: '/pages/about/about'
},
//#ifdef APP-PLUS
{
title: '检查更新',
rightText: `V${getApp().appVersion.finall.version}_${getApp().appVersion.finall.versionCode}`,
event:'checkVersion'
}
// {
// title: '检查更新',
// rightText: `V${getApp().appVersion.finall.version}_${getApp().appVersion.finall.versionCode}`,
// event:'checkVersion'
// }
//#endif
],
[
{
[{
title: '反馈',
to:'/pages/uni-feedback/uni-feedback'
},{
to: '/pages/uni-feedback/uni-feedback'
}, {
title: '设置',
to: '/pages/settings/settings'
}
]
}]
]
}
},
......@@ -74,22 +98,22 @@
onReady() {
},
onShow(){
onShow() {
console.log(this.userInfo);
},
methods: {
...mapMutations({
logout:'user/logout'
logout: 'user/logout'
}),
/**
* 个人中心项目列表点击事件
*/
ucenterListClick(item){
if(!item.to && item.event){
ucenterListClick(item) {
if (!item.to && item.event) {
this[item.event]();
}
},
checkVersion(){
checkVersion() {
checkUpdate();
},
goLogin() {
......@@ -98,13 +122,18 @@
uni.navigateTo({
url: '/uni_modules/uni-login-page/pages/index/index'
});
}
else {
} else {
console.log('点击编辑信息');
uni.navigateTo({
url:'./edit/edit'
url: './edit/edit'
})
}
},
tapGrid(index){
uni.showToast({
title: '你点击了,第'+index+'',
icon: 'none'
});
}
}
}
......@@ -190,11 +219,27 @@
}
.center-list {
margin-bottom: 30rpx;
background-color: #f9f9f9;
}
.center-list-cell {
width: 750rpx;
background-color: #007AFF;
height: 40rpx;
}
.grid{
background-color: #FFFFFF;
margin:25rpx 0;
}
.uni-grid .text {
font-size: 26rpx;
color: #817f82;
}
.uni-grid .item /deep/ .uni-grid-item__box {
justify-content: center;
align-items: center;
}
</style>
<template>
<view class="flex flex-column flex-1 w-750 bg-white">
<view class="flex-1 flex flex-column justify-start align-center">
<view class="flex flex-column flex-1 w-750 bg-white" :class="{'hidden':!isShow}">
<view v-if="isShow" class="flex-1 flex flex-column justify-start align-center">
<view class="w-630 flex flex-column">
<!-- 顶部文字 -->
<text class="font-32 font-blod pt-5">登陆后即可展示自己</text>
......@@ -33,7 +33,7 @@
</view>
<!-- 登录按钮弹窗 -->
<login-action-sheet ref="loginActionSheet"></login-action-sheet>
<uni-quick-login></uni-quick-login>
<uni-quick-login @univerifyEnd="isShow = 1"></uni-quick-login>
</view>
</template>
......@@ -41,6 +41,7 @@
export default {
data() {
return {
isShow:false,
link: [{
text: '用户协议',
to: '/baidu.com'
......@@ -85,6 +86,9 @@
</script>
<style>
.hidden,page{
background-color: transparent;
}
@import url("../../common/myStyle.css");
.lgnin-iknow {
......
<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)">
<image class="logo" :src="logo" mode="widthFix"></image>
<text class="login-title">{{text}}</text>
......@@ -11,6 +11,7 @@
export default {
data() {
return {
isShow:false,
config: {
"weixin": {
"text": "微信登陆",
......@@ -39,7 +40,7 @@
},
providerList: [],
univerifyStyle: {
"fullScreen": false, // 是否全屏显示,true表示全屏模式,false表示非全屏模式,默认值为false。
"fullScreen": true, // 是否全屏显示,true表示全屏模式,false表示非全屏模式,默认值为false。
"backgroundColor": "#ffffff", // 授权页面背景颜色,默认值:#ffffff
}
}
......@@ -77,6 +78,8 @@
console.log(err);
if(err.errCode===30002){
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.
先完成此消息的编辑!
想要评论请 注册