个人中心页面

This commit is contained in:
itgaojian163 2023-02-01 19:25:51 +08:00
parent 4e7a7c5388
commit 4df6fa9784
37 changed files with 4353 additions and 382 deletions

View File

@ -19,16 +19,18 @@
"navigationBarBackgroundColor": "#FFFFFF",
"navigationBarTextStyle": "black",
"navigationBarTitleText": "尽职尽责",
"enablePullDownRefresh": true
"enablePullDownRefresh": false
}
},
{
"path": "pages/user/index",
"style": {
"titleNView": false,
"navigationStyle": "custom",
"navigationBarBackgroundColor": "#FFFFFF",
"navigationBarTextStyle": "black",
"navigationBarTitleText": "个人中心",
"enablePullDownRefresh": true
"enablePullDownRefresh": false
}
}, {
"path": "pages/user/login",
@ -56,6 +58,42 @@
"navigationBarTitleText": "详情",
"enablePullDownRefresh": false
}
}, {
"path": "pages/user/minejoin",
"style": {
"navigationBarTitleText": "我的劳动参与",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#FFFFFF",
"navigationBarTextStyle": "black"
}
}, {
"path": "pages/user/mine_honour_certif",
"style": {
"navigationBarTitleText": "国土绿化荣誉证书",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#FFFFFF",
"navigationBarTextStyle": "black"
}
}, {
"path": "pages/user/mine_duty_certif",
"style": {
"navigationBarTitleText": "义务植树尽责证书",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#FFFFFF",
"navigationBarTextStyle": "black"
}
}, {
"path": "pages/user/mine_certif_search",
"style": {
"titleNView": false,
"navigationStyle": "custom",
"navigationBarBackgroundColor": "#FFFFFF",
"navigationBarTextStyle": "black",
"navigationBarTitleText": "证书查询",
"enablePullDownRefresh": false
}
}
],
"globalStyle": {

View File

@ -5,285 +5,228 @@
</template>
<script>
// import iconfont from '@/components/iconfont/iconfont.vue';
// import pageLoading from '@/components/loading/pageLoading.vue';
// export default {
// components: {
// iconfont,
// pageLoading
// },
// data() {
// return {
// user: {},
// loginText: '',
// showPageLoading: true
// };
// },
// onShow() {
// this.$initPageTitle(); //
// // #ifdef MP
// this.loginText = '';
// // #endif
// this.getUserInfo(); //
import pageLoading from '@/components/loading/pageLoading.vue';
export default {
components: {
pageLoading
},
data() {
return {
user: {},
loginText: '登录',
showPageLoading: true
};
},
methods: {
// //
// let source = uni.getStorageSync('source');
// if (source == 'login' || source == 'storyEdit') {
// uni.removeStorageSync('source');
// }
// },
// onLoad(e) {},
// onPullDownRefresh() {
// uni.showLoading({
// title: ''
// });
// this.getUserInfo(); //
// },
// methods: {
// /**/
// getUserInfo() {
// this.$app.request({
// url: this.$api.user.index,
// data: {},
// method: 'POST',
// dataType: 'json',
// success: res => {
// console.log(res);
// if (res.code == 0) {
// this.showPageLoading = false;
// this.user = res.data;
// } else {
// this.$alert(res.msg);
// }
// },
// complete: res => {
// uni.stopPullDownRefresh();
// uni.hideLoading();
// }
// });
// },
}
// /**/
// login() {
// this.$app.login();
// },
// /*退*/
// logout() {
// uni.showModal({
// title: '',
// content: '退',
// confirmText: '',
// cancelText: '',
// success: result => {
// if (result.confirm) {
// this.$app.request({
// url: this.$api.user.logout,
// method: 'POST',
// success: res => {
// if (res.code == 0) {
// uni.removeStorageSync('isLogin');
// uni.removeStorageSync('accessToken');
// uni.removeStorageSync('currentUser');
// uni.removeStorageSync('platform');
// // #ifdef H5
// this.$alert('退', 'success', '/pages/index/index');
// // #endif
// // #ifndef H5
// this.$alert('退', 'success', '/pages/index/index', 'switchTab');
// // #endif
// } else {
// this.$alert(res.msg, 'warning');
// }
// },
// complete: function() {
// uni.hideLoading();
// }
// });
// }
// }
// });
// }
// }
// };
};
</script>
<style scoped lang="scss">
.top {
/*页面标题*/
.page-title {
display: flex;
justify-content: center;
align-items: center;
height: 90rpx;
text-align: center;
z-index: 9999;
font-size: 38rpx;
font-weight: bold;
color: #ffffff;
}
}
.user {
.base-info {
//background-image: linear-gradient(top, #e4edec 20%, #e4edec 80%);
background: #8cc7b5;
height: 280rpx;
}
.user-info {
padding: 64rpx 32rpx;
display: flex;
align-item: center;
justify-content: space-between;
.avatar {
flex-grow: 0;
flex-shrink: 0;
line-height: 0;
border-radius: 50%;
image {
width: 144rpx;
height: 144rpx;
border-radius: 50%;
border: 1rpx solid #fff;
}
}
.default-avatar {
margin-top: -12rpx;
}
.info {
flex-grow: 1;
flex-shrink: 1;
padding-left: 28rpx;
.top {
/*页面标题*/
.page-title {
display: flex;
flex-direction: column;
justify-content: center;
.nickname {
font-size: 44rpx;
color: #ffffff;
margin-top: -14rpx;
}
.mobile {
font-size: 34rpx;
color: #fff;
display: flex;
align-items: center;
line-height: normal;
/deep/ .icon {
margin-left: 30rpx;
font-size: 28rpx;
display: block;
}
}
.user-type {
display: flex;
margin-top: 6rpx;
text {
font-size: 24rpx;
color: #fff;
background-color: #cd8202;
padding: 0 24rpx;
border-radius: 55px;
}
}
.btn-login {
font-size: 42rpx;
background: transparent;
color: #fff;
text-align: left;
width: 200rpx;
}
align-items: center;
height: 90rpx;
text-align: center;
z-index: 9999;
font-size: 38rpx;
font-weight: bold;
color: #ffffff;
}
.setting {
flex-grow: 0;
flex-shrink: 0;
.btn-setting {
margin-top: 10rpx;
/deep/ .icon {
}
.user {
.base-info {
//background-image: linear-gradient(top, #e4edec 20%, #e4edec 80%);
background: #8cc7b5;
height: 280rpx;
}
.user-info {
padding: 64rpx 32rpx;
display: flex;
align-item: center;
justify-content: space-between;
.avatar {
flex-grow: 0;
flex-shrink: 0;
line-height: 0;
border-radius: 50%;
image {
width: 144rpx;
height: 144rpx;
border-radius: 50%;
border: 1rpx solid #fff;
}
}
.default-avatar {
margin-top: -12rpx;
}
.info {
flex-grow: 1;
flex-shrink: 1;
padding-left: 28rpx;
display: flex;
flex-direction: column;
justify-content: center;
.nickname {
font-size: 44rpx;
color: #ffffff;
margin-top: -14rpx;
}
.mobile {
font-size: 34rpx;
color: #fff;
font-size: 48rpx;
display: flex;
align-items: center;
line-height: normal;
/deep/ .icon {
margin-left: 30rpx;
font-size: 28rpx;
display: block;
}
}
.user-type {
display: flex;
margin-top: 6rpx;
text {
font-size: 24rpx;
color: #fff;
background-color: #cd8202;
padding: 0 24rpx;
border-radius: 55px;
}
}
.btn-login {
font-size: 42rpx;
background: transparent;
color: #fff;
text-align: left;
width: 200rpx;
}
}
.setting {
flex-grow: 0;
flex-shrink: 0;
.btn-setting {
margin-top: 10rpx;
/deep/ .icon {
color: #fff;
font-size: 48rpx;
}
}
}
}
}
}
.nav {
margin-top: -15rpx;
margin-bottom: calc(var(--window-bottom) + 20rpx);
.list {
margin-top: 15rpx;
margin-bottom: 20rpx;
.item {
padding-left: 24rpx;
background: #ffffff;
.info {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
border-bottom: 1rpx solid #e9ebee;
padding: 4rpx 24rpx 4rpx 0;
height: 100rpx;
.name {
.nav {
margin-top: -15rpx;
margin-bottom: calc(var(--window-bottom) + 20rpx);
.list {
margin-top: 15rpx;
margin-bottom: 20rpx;
.item {
padding-left: 24rpx;
background: #ffffff;
.info {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
font-size: 34rpx;
line-height: normal;
image {
width: 45rpx;
height: 45rpx;
margin-right: 16rpx;
}
/deep/ .icon {
color: #8cc7b5;
font-size: 44rpx;
margin-right: 16rpx;
justify-content: space-between;
border-bottom: 1rpx solid #e9ebee;
padding: 4rpx 24rpx 4rpx 0;
height: 100rpx;
.name {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
font-size: 34rpx;
line-height: normal;
}
/deep/ .icon-car {
font-size: 35rpx;
margin-right: 14rpx;
image {
width: 45rpx;
height: 45rpx;
margin-right: 16rpx;
}
/deep/ .icon {
color: #8cc7b5;
font-size: 44rpx;
margin-right: 16rpx;
line-height: normal;
}
/deep/ .icon-car {
font-size: 35rpx;
margin-right: 14rpx;
}
/deep/ .icon-profile-o {
font-size: 48rpx;
margin-right: 12rpx;
}
/deep/ .icon-user-info {
font-size: 50rpx;
margin-left: -5rpx;
margin-right: 10rpx;
}
/deep/ .icon-favorite {
font-size: 42rpx;
}
/deep/ .icon-about {
font-size: 44rpx;
margin-left: -4rpx;
margin-right: 12rpx;
}
/deep/ .icon-question {
margin-right: 16rpx;
}
}
/deep/ .icon-profile-o {
font-size: 48rpx;
margin-right: 12rpx;
}
/deep/ .icon-user-info {
font-size: 50rpx;
margin-left: -5rpx;
margin-right: 10rpx;
}
/deep/ .icon-favorite {
font-size: 42rpx;
}
/deep/ .icon-about {
font-size: 44rpx;
margin-left: -4rpx;
margin-right: 12rpx;
}
/deep/ .icon-question {
margin-right: 16rpx;
/deep/ .icon {
color: #c1c4c9;
font-size: 24rpx;
}
}
/deep/ .icon {
color: #c1c4c9;
font-size: 24rpx;
}
}
&:last-child {
.info {
border-bottom: 0;
&:last-child {
.info {
border-bottom: 0;
}
}
}
}
}
}
.status-bar {
background: #8cc7b5;
}
</style>
.status-bar {
background: #8cc7b5;
}
</style>

View File

@ -286,7 +286,6 @@
this.showPageLoading = false;
this.scroller.endSuccess();
this.slider = res.rows
this.list = []
}
},
complete: res => {

View File

@ -1,12 +1,211 @@
<template>
<view>
<view>个人中心</view>
<view class="page">
<view class="status-bar"></view>
<!-- 头像与名称 -->
<view class="avatar">
<image :src="userIcon" mode="aspectFill" class="icon"></image>
<view class="text">
<view class="name">{{userName}}</view>
<view class="btn">
<image src="../../static/images/ic_edit_icon.png"></image>
<text style="margin-left: 10rpx;">完善个人资料</text>
</view>
</view>
</view>
<!-- 资料 -->
<view class="amount">
<view class="item" @click="openPage('/pages/user/mine_certif_search')">
<view class="num">3333</view>
<view>累计捐赠</view>
</view>
<view class="item">
<view class="num">3333</view>
<view>我的证书</view>
</view>
<view class="item">
<view class="num">3333</view>
<view>尽责参与</view>
</view>
</view>
<!-- 功能 -->
<view class="func-box">
<view class="item" @click="openPage('/pages/user/mine_duty_certif')">
<view class="item-content">
<image src="../../static/images/ic_table_icon.png" mode="aspectFill"></image>
<text>义务植树尽责证书</text>
</view>
<image src="../../static/images/ic_arrow_right.png" mode="aspectFill"></image>
</view>
<view class="item" @click="openPage('/pages/user/mine_honour_certif')">
<view class="item-content">
<image src="../../static/images/ic_from_icon.png" mode="aspectFill"></image>
<text>国土绿化荣誉证书</text>
</view>
<image src="../../static/images/ic_arrow_right.png" mode="aspectFill"></image>
</view>
<view class="line"></view>
<view class="item" @click="openPage('/pages/user/minejoin')">
<view class="item-content">
<image src="../../static/images/ic_order_icon.png" mode="aspectFill"></image>
<text>我的劳动参与</text>
</view>
<image src="../../static/images/ic_arrow_right.png" mode="aspectFill"></image>
</view>
<view class="item">
<view class="item-content">
<image src="../../static/images/ic_print_icon.png" mode="aspectFill"></image>
<text>我的捐赠尽责</text>
</view>
<image src="../../static/images/ic_arrow_right.png" mode="aspectFill"></image>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
userIcon: "../../static/images/ic_user_default.png",
userName: "昵称"
}
},
methods: {
openPage(url) {
uni.navigateTo({
url: url
})
}
}
}
</script>
<style>
<style lang="scss">
page {
height: 100%;
}
.page {
display: flex;
flex: 1;
flex-direction: column;
overflow: hidden;
height: 100%;
background: #F2F2F2;
}
.avatar {
width: 95%;
display: flex;
flex-direction: row;
align-self: center;
align-items: center;
margin-top: 50rpx;
.icon {
width: 130rpx;
height: 130rpx;
border-radius: 50%;
}
.text {
display: flex;
flex-direction: column;
margin-left: 20rpx;
.name {
font-size: 40rpx;
font-weight: 200;
color: black;
margin-left: 10rpx;
}
.btn {
display: flex;
flex-direction: row;
padding: 8rpx 35rpx;
background: #fff;
box-shadow: 0 4rpx 8rpx 0 rgba(0, 0, 0, 0.05), 0 6rpx 20rpx 0 rgba(0, 0, 0, 0.03);
border-radius: 30rpx;
align-items: center;
image {
width: 30rpx;
height: 30rpx;
}
}
}
}
.amount {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
padding: 30rpx;
margin-top: 20rpx;
.item {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
flex: 1;
.num {
font-weight: bold;
font-size: 40rpx;
color: black;
}
}
}
.func-box {
display: flex;
flex-direction: column;
padding-top: 30rpx;
border-top-left-radius: 40rpx;
border-top-right-radius: 40rpx;
background-color: #fff;
height: 100%;
.item {
display: flex;
flex-direction: row;
justify-content: space-between;
padding: 20rpx 40rpx;
.item-content {
display: flex;
flex-direction: row;
align-items: center;
text {
font-size: 30rpx;
margin-left: 20rpx;
}
image {
width: 40rpx;
height: 40rpx;
}
}
image {
width: 30rpx;
height: 30rpx;
}
}
}
.line {
display: bock;
width: 100%;
height: 1rpx;
margin-top: 40rpx;
background: #e8e8e8;
}
</style>

View File

@ -0,0 +1,112 @@
<template>
<view class="page">
<view class="content">
<view class="title-box"></view>
<view class="box" :style="{backgroundImage: 'url(' + bg + ')','background-repeat':'no-repeat',
backgroundSize:'100% 100%'}">
<view class="tab-bar">
<view :class="currentIndex==1? 'tab-active' : 'tab-default'" @click="tabChange(1)">个人证书</view>
<view :class="currentIndex==2? 'tab-active' : 'tab-default'" @click="tabChange(2)">单位证书</view>
</view>
<view>测试</view>
<view>测试</view>
<view>测试</view>
<view>测试</view>
<view>测试</view>
<view>测试</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
currentIndex: 1,
bg1: "../../static/images/ic_certify_tab_1.png",
bg: "../../static/images/ic_certify_tab_1.png",
bg2: "../../static/images/ic_certify_tab_2.png",
}
},
methods: {
tabChange(i) {
this.currentIndex = i;
if (i == 1) {
this.bg = this.bg1
} else {
this.bg = this.bg2
}
}
}
}
</script>
<style lang="scss">
page {
height: 100%;
}
.page {
display: flex;
flex: 1;
flex-direction: column;
overflow: hidden;
height: 100%;
}
.content {
width: 100%;
position: relative;
}
.box {
display: flex;
flex-direction: column;
justify-content: flex-start;
min-height: 700rpx;
height: auto;
width: 90%;
position: absolute;
top: 470rpx;
left: 50%;
transform: translate(-50%, 0);
-webkit-transform: translate(-50%, 0);
box-shadow: 0rpx 7rpx 33rpx 16rpx rgba(188, 226, 204, 0.15);
border-radius: 30rpx;
}
.tab-bar {
width: 100%;
display: flex;
flex-direction: row;
justify-content: space-around;
padding-top: 15rpx;
.tab-active {
text-align: center;
font-size: 40rpx;
font-weight: bold;
color: #00821E;
}
.tab-default {
text-align: center;
font-size: 40rpx;
font-weight: 200;
color: #00821E;
}
}
.title-box {
width: 100%;
height: 800rpx;
background-image: url('../../static/images/ic_certify_title_bg.png');
background-size: 100% 100%;
background-repeat: no-repeat;
}
</style>

View File

@ -0,0 +1,241 @@
<template>
<view class="page">
<view class="title-box">
<text class="title">Hi,</text>
<text class="name">{{userName}}</text>
</view>
<view class="content">
<!-- Banner -->
<scroller @init="initScroller" @down="refreshData" @up="getData" :up="optUp"
@scroll="navFloatShow(scroller)" :fixed="false">
<view class="num-box">
<image src="../../static/images/ic_notify_icon.png" mode="aspectFill"></image>
<text>您一共有{{totalNum}}张国土绿化荣誉证书</text>
</view>
<!-- 列表 -->
<view class="content-box">
<view class="item" v-for="(item,index) in list" :key="index">
<image src="../../static/images/ic_circle_half.png" mode="aspectFill"></image>
<view class="item-content">
<view class="title">{{item.title}}</view>
<view class="time">{{item.startTime}}</view>
<view class="btn">查看</view>
</view>
</view>
</view>
</scroller>
</view>
<pageLoading v-if="showPageLoading"></pageLoading>
</view>
</template>
<script>
import scroller from '@/components/scroller/scroller.vue';
import pageLoading from '@/components/loading/pageLoading.vue';
export default {
components: {
pageLoading,
scroller
},
data() {
return {
userName: "昵称",
scroller: {},
optUp: {
auto: true,
onScroll: true,
page: {
num: 0, // 0,1; callback(page)1
size: 10 //,10
},
empty: {
tip: '暂无数据~'
}
},
totalNum: 0,
showPageLoading: true,
list: [{
title: "测试测试测试测试测试测试测试测试测试测试测试测试",
startTime: "2022年9月10日",
endTime: "2022年9月30日"
}, {
title: "测试测试测试测试测试测试测试测试测试测试测试测试",
startTime: "2022年9月10日",
endTime: "2022年9月30日"
}, {
title: "测试测试测试测试测试测试测试测试测试测试测试测试",
startTime: "2022年9月10日",
endTime: "2022年9月30日"
}]
}
},
methods: {
/*初始化滚动*/
initScroller(scroller) {
this.scroller = scroller;
this.loadData();
},
/*刷新数据*/
refreshData() {
uni.showLoading({
title: '刷新中'
});
this.scroller.resetUpScroll();
},
/*加载数据*/
loadData() {
this.list = [];
this.scroller.resetUpScroll();
},
/*滚动时导航栏浮动*/
navFloatShow(scroller) {
},
//
getData() {
this.showPageLoading = false;
this.list = [{
title: "测试测试测试测试测试测试测试测试测试测试测试测试",
startTime: "2022年9月10日",
endTime: "2022年9月30日"
}, {
title: "测试测试测试测试测试测试测试测试测试测试测试测试",
startTime: "2022年9月10日",
endTime: "2022年9月30日"
}, {
title: "测试测",
startTime: "2022年9月10日",
endTime: "2022年9月30日"
}];
this.scroller.endBySize(0, 0);
this.scroller.endSuccess();
uni.hideLoading()
}
}
}
</script>
<style lang="scss">
page {
height: 100%;
}
.page {
display: flex;
flex: 1;
flex-direction: column;
overflow: hidden;
height: 100%;
}
.content {
flex: 1;
width: 100%;
height: 100rpx;
}
.title-box {
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
padding: 20rpx;
.title {
font-size: 40rpx;
font-weight: 300;
color: black;
}
.name {
font-size: 30rpx;
font-weight: 200;
color: #139847;
}
}
.num-box {
display: flex;
flex-direction: row;
align-items: center;
background: #15A652;
justify-content: flex-start;
box-shadow: 0rpx 7rpx 33rpx 16rpx rgba(188, 226, 204, 0.15);
border-radius: 40rpx;
padding: 65rpx;
margin: 0rpx 20rpx;
image {
width: 40rpx;
height: 40rpx;
}
text {
color: #fff;
font-size: 30rpx;
text-align: center;
width: 85%;
}
}
.content-box {
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
padding: 20rpx;
.item {
display: flex;
flex-direction: row;
background: #fff;
border-radius: 10rpx;
margin: 20rpx 0rpx;
width: 100%;
box-shadow: 0rpx 7rpx 33rpx 16rpx rgba(188, 226, 204, 0.15);
image {
width: 39rpx;
height: 70rpx;
margin-top: 10rpx;
}
.item-content {
display: flex;
flex-direction: column;
width: 100%;
padding: 20rpx 15rpx;
.title {
font-size: 30rpx;
display: -webkit-box;
text-overflow: ellipsis;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
overflow: hidden;
color: #000;
}
.time {
font-size: 20rpx;
color: #646464;
margin-top: 10rpx;
}
.btn {
font-size: 20rpx;
color: #747474;
margin-top: 10rpx;
margin-right: 15rpx;
align-self: flex-end;
}
}
}
}
</style>

View File

@ -0,0 +1,241 @@
<template>
<view class="page">
<view class="title-box">
<text class="title">Hi,</text>
<text class="name">{{userName}}</text>
</view>
<view class="content">
<!-- Banner -->
<scroller @init="initScroller" @down="refreshData" @up="getData" :up="optUp"
@scroll="navFloatShow(scroller)" :fixed="false">
<view class="num-box">
<image src="../../static/images/ic_notify_icon.png" mode="aspectFill"></image>
<text>您一共有{{totalNum}}张国土绿化荣誉证书</text>
</view>
<!-- 列表 -->
<view class="content-box">
<view class="item" v-for="(item,index) in list" :key="index">
<image src="../../static/images/ic_circle_half.png" mode="aspectFill"></image>
<view class="item-content">
<view class="title">{{item.title}}</view>
<view class="time">{{item.startTime}}</view>
<view class="btn">查看</view>
</view>
</view>
</view>
</scroller>
</view>
<pageLoading v-if="showPageLoading"></pageLoading>
</view>
</template>
<script>
import scroller from '@/components/scroller/scroller.vue';
import pageLoading from '@/components/loading/pageLoading.vue';
export default {
components: {
pageLoading,
scroller
},
data() {
return {
userName: "昵称",
scroller: {},
optUp: {
auto: true,
onScroll: true,
page: {
num: 0, // 0,1; callback(page)1
size: 10 //,10
},
empty: {
tip: '暂无数据~'
}
},
totalNum: 0,
showPageLoading: true,
list: [{
title: "测试测试测试测试测试测试测试测试测试测试测试测试",
startTime: "2022年9月10日",
endTime: "2022年9月30日"
}, {
title: "测试测试测试测试测试测试测试测试测试测试测试测试",
startTime: "2022年9月10日",
endTime: "2022年9月30日"
}, {
title: "测试测试测试测试测试测试测试测试测试测试测试测试",
startTime: "2022年9月10日",
endTime: "2022年9月30日"
}]
}
},
methods: {
/*初始化滚动*/
initScroller(scroller) {
this.scroller = scroller;
this.loadData();
},
/*刷新数据*/
refreshData() {
uni.showLoading({
title: '刷新中'
});
this.scroller.resetUpScroll();
},
/*加载数据*/
loadData() {
this.list = [];
this.scroller.resetUpScroll();
},
/*滚动时导航栏浮动*/
navFloatShow(scroller) {
},
//
getData() {
this.showPageLoading = false;
this.list = [{
title: "测试测试测试测试测试测试测试测试测试测试测试测试",
startTime: "2022年9月10日",
endTime: "2022年9月30日"
}, {
title: "测试测试测试测试测试测试测试测试测试测试测试测试",
startTime: "2022年9月10日",
endTime: "2022年9月30日"
}, {
title: "测试测",
startTime: "2022年9月10日",
endTime: "2022年9月30日"
}];
this.scroller.endBySize(0, 0);
this.scroller.endSuccess();
uni.hideLoading()
}
}
}
</script>
<style lang="scss">
page {
height: 100%;
}
.page {
display: flex;
flex: 1;
flex-direction: column;
overflow: hidden;
height: 100%;
}
.content {
flex: 1;
width: 100%;
height: 100rpx;
}
.title-box {
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
padding: 20rpx;
.title {
font-size: 40rpx;
font-weight: 300;
color: black;
}
.name {
font-size: 30rpx;
font-weight: 200;
color: #139847;
}
}
.num-box {
display: flex;
flex-direction: row;
align-items: center;
background: #15A652;
justify-content: flex-start;
box-shadow: 0rpx 7rpx 33rpx 16rpx rgba(188, 226, 204, 0.15);
border-radius: 40rpx;
padding: 65rpx;
margin: 0rpx 20rpx;
image {
width: 40rpx;
height: 40rpx;
}
text {
color: #fff;
font-size: 30rpx;
text-align: center;
width: 85%;
}
}
.content-box {
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
padding: 20rpx;
.item {
display: flex;
flex-direction: row;
background: #fff;
border-radius: 10rpx;
margin: 20rpx 0rpx;
width: 100%;
box-shadow: 0rpx 7rpx 33rpx 16rpx rgba(188, 226, 204, 0.15);
image {
width: 39rpx;
height: 70rpx;
margin-top: 10rpx;
}
.item-content {
display: flex;
flex-direction: column;
width: 100%;
padding: 20rpx 15rpx;
.title {
font-size: 30rpx;
display: -webkit-box;
text-overflow: ellipsis;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
overflow: hidden;
color: #000;
}
.time {
font-size: 20rpx;
color: #646464;
margin-top: 10rpx;
}
.btn {
font-size: 20rpx;
color: #747474;
margin-top: 10rpx;
margin-right: 15rpx;
align-self: flex-end;
}
}
}
}
</style>

251
pages/user/minejoin.vue Normal file
View File

@ -0,0 +1,251 @@
<template>
<view class="page">
<view class="title-box">
<text class="title">Hi,</text>
<text class="name">{{userName}}</text>
</view>
<view class="content">
<!-- Banner -->
<scroller @init="initScroller" @down="refreshData" @up="getData" :up="optUp"
@scroll="navFloatShow(scroller)" :fixed="false">
<view class="num-box">
<image src="../../static/images/ic_notify_icon.png" mode="aspectFill"></image>
<text>您一共参与了{{totalNum}}次劳动</text>
</view>
<!-- 列表 -->
<view class="content-box">
<view class="item" v-for="(item,index) in list" :key="index">
<image src="../../static/images/ic_circle_half.png" mode="aspectFill"></image>
<view class="item-content">
<view class="title-box">
<view class="title">{{item.title}}</view>
<view class="status">已参与</view>
</view>
<view class="time">活动时间:{{item.startTime+'至'+item.endTime}}</view>
</view>
</view>
</view>
</scroller>
</view>
<pageLoading v-if="showPageLoading"></pageLoading>
</view>
</template>
<script>
import scroller from '@/components/scroller/scroller.vue';
import pageLoading from '@/components/loading/pageLoading.vue';
export default {
components: {
pageLoading,
scroller
},
data() {
return {
userName: "昵称",
scroller: {},
optUp: {
auto: true,
onScroll: true,
page: {
num: 0, // 0,1; callback(page)1
size: 10 //,10
},
empty: {
tip: '暂无数据~'
}
},
totalNum: 0,
showPageLoading: true,
list: [{
title: "测试测试测试测试测试测试测试测试测试测试测试测试",
startTime: "2022年9月10日",
endTime: "2022年9月30日"
}, {
title: "测试测试测试测试测试测试测试测试测试测试测试测试",
startTime: "2022年9月10日",
endTime: "2022年9月30日"
}, {
title: "测试测试测试测试测试测试测试测试测试测试测试测试",
startTime: "2022年9月10日",
endTime: "2022年9月30日"
}]
}
},
methods: {
/*初始化滚动*/
initScroller(scroller) {
this.scroller = scroller;
this.loadData();
},
/*刷新数据*/
refreshData() {
uni.showLoading({
title: '刷新中'
});
this.scroller.resetUpScroll();
},
/*加载数据*/
loadData() {
this.list = [];
this.scroller.resetUpScroll();
},
/*滚动时导航栏浮动*/
navFloatShow(scroller) {
},
//
getData() {
this.showPageLoading = false;
this.list = [{
title: "测试测试测试测试测试测试测试测试测试测试测试测试",
startTime: "2022年9月10日",
endTime: "2022年9月30日"
}, {
title: "测试测试测试测试测试测试测试测试测试测试测试测试",
startTime: "2022年9月10日",
endTime: "2022年9月30日"
}, {
title: "测试测",
startTime: "2022年9月10日",
endTime: "2022年9月30日"
}];
this.scroller.endBySize(0, 0);
this.scroller.endSuccess();
uni.hideLoading()
}
}
}
</script>
<style lang="scss">
page {
height: 100%;
}
.page {
display: flex;
flex: 1;
flex-direction: column;
overflow: hidden;
height: 100%;
}
.content {
flex: 1;
width: 100%;
height: 100rpx;
}
.title-box {
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
padding: 20rpx;
.title {
font-size: 40rpx;
font-weight: 300;
color: black;
}
.name {
font-size: 30rpx;
font-weight: 200;
color: #139847;
}
}
.num-box {
display: flex;
flex-direction: row;
align-items: center;
background: #15A652;
justify-content: flex-start;
box-shadow: 0rpx 7rpx 33rpx 16rpx rgba(188, 226, 204, 0.15);
border-radius: 50rpx;
padding: 65rpx;
margin: 0rpx 20rpx;
image {
width: 40rpx;
height: 40rpx;
}
text {
color: #fff;
font-size: 30rpx;
text-align: center;
width: 85%;
}
}
.content-box {
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
padding: 20rpx;
.item {
display: flex;
flex-direction: row;
background: #fff;
border-radius: 10rpx;
margin: 20rpx 0rpx;
width: 100%;
box-shadow: 0rpx 7rpx 33rpx 16rpx rgba(188,226,204,0.15);
image {
width: 39rpx;
height: 70rpx;
margin-top: 10rpx;
}
.item-content {
display: flex;
flex-direction: column;
width: 100%;
padding: 20rpx 15rpx;
.title-box {
display: flex;
flex-direction: row;
justify-content: space-between;
padding: 0rpx;
.title {
font-size: 30rpx;
display: -webkit-box;
text-overflow: ellipsis;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
overflow: hidden;
color: #000;
}
.status {
border-style: solid;
border-width: 2rpx;
border-color: #15A652;
color: #15A652;
width: 120rpx;
text-align: center;
font-size: 20rpx;
border-radius: 10rpx;
}
}
.time {
font-size: 20rpx;
color: #646464;
margin-top: 20rpx;
}
}
}
}
</style>

BIN
static/images/ic_arrow_right.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

BIN
static/images/ic_circle_half.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
static/images/ic_edit_icon.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

BIN
static/images/ic_from_icon.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

BIN
static/images/ic_notify_icon.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

BIN
static/images/ic_order_icon.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

BIN
static/images/ic_print_icon.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
static/images/ic_radius_bg.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
static/images/ic_table_icon.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

BIN
static/images/ic_user_default.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

View File

@ -1,8 +1,8 @@
var isReady=false;var onReadyCallbacks=[];
var isServiceReady=false;var onServiceReadyCallbacks=[];
var __uniConfig = {"pages":["pages/news/index","pages/duty/index","pages/user/index","pages/user/login","pages/user/register","pages/news/newsdetail"],"window":{"navigationBarTextStyle":"white","navigationBarTitleText":"全民植树","navigationBarBackgroundColor":"#8cc7b5","backgroundColor":"#F8F8F8"},"tabBar":{"color":"#000000","selectedColor":"#000000","backgroundColor":"#FFFFFF","list":[{"pagePath":"pages/news/index","iconPath":"static/images/nav/icon_home.png","selectedIconPath":"static/images/nav/icon_home_hover.png","text":"新闻资讯"},{"pagePath":"pages/duty/index","iconPath":"static/images/nav/icon_favorite.png","selectedIconPath":"static/images/nav/icon_favorite_hover.png","text":"尽职尽责"},{"pagePath":"pages/user/index","iconPath":"static/images/nav/icon_user.png","selectedIconPath":"static/images/nav/icon_user_hover.png","text":"个人中心"}]},"darkmode":false,"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"tree_planting","compilerVersion":"3.6.18","entryPagePath":"pages/news/index","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}};
var __uniRoutes = [{"path":"/pages/news/index","meta":{"isQuit":true,"isTabBar":true},"window":{"titleNView":false,"navigationStyle":"custom","enablePullDownRefresh":false,"disableScroll":true,"navigationBarTitleText":"全民植树","navigationBarTextStyle":"black","bounce":"none"}},{"path":"/pages/duty/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarBackgroundColor":"#FFFFFF","navigationBarTextStyle":"black","navigationBarTitleText":"尽职尽责","enablePullDownRefresh":true}},{"path":"/pages/user/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarBackgroundColor":"#FFFFFF","navigationBarTextStyle":"black","navigationBarTitleText":"个人中心","enablePullDownRefresh":true}},{"path":"/pages/user/login","meta":{},"window":{"navigationBarBackgroundColor":"#FFFFFF","navigationBarTextStyle":"black","navigationBarTitleText":"登录","enablePullDownRefresh":false}},{"path":"/pages/user/register","meta":{},"window":{"navigationBarBackgroundColor":"#FFFFFF","navigationBarTextStyle":"black","navigationBarTitleText":"注册","enablePullDownRefresh":false}},{"path":"/pages/news/newsdetail","meta":{},"window":{"navigationBarBackgroundColor":"#FFFFFF","navigationBarTextStyle":"black","navigationBarTitleText":"详情","enablePullDownRefresh":false}}];
var __uniConfig = {"pages":["pages/news/index","pages/duty/index","pages/user/index","pages/user/login","pages/user/register","pages/news/newsdetail","pages/user/minejoin","pages/user/mine_honour_certif","pages/user/mine_duty_certif","pages/user/mine_certif_search"],"window":{"navigationBarTextStyle":"white","navigationBarTitleText":"全民植树","navigationBarBackgroundColor":"#8cc7b5","backgroundColor":"#F8F8F8"},"tabBar":{"color":"#000000","selectedColor":"#000000","backgroundColor":"#FFFFFF","list":[{"pagePath":"pages/news/index","iconPath":"static/images/nav/icon_home.png","selectedIconPath":"static/images/nav/icon_home_hover.png","text":"新闻资讯"},{"pagePath":"pages/duty/index","iconPath":"static/images/nav/icon_favorite.png","selectedIconPath":"static/images/nav/icon_favorite_hover.png","text":"尽职尽责"},{"pagePath":"pages/user/index","iconPath":"static/images/nav/icon_user.png","selectedIconPath":"static/images/nav/icon_user_hover.png","text":"个人中心"}]},"darkmode":false,"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"tree_planting","compilerVersion":"3.6.18","entryPagePath":"pages/news/index","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}};
var __uniRoutes = [{"path":"/pages/news/index","meta":{"isQuit":true,"isTabBar":true},"window":{"titleNView":false,"navigationStyle":"custom","enablePullDownRefresh":false,"disableScroll":true,"navigationBarTitleText":"全民植树","navigationBarTextStyle":"black","bounce":"none"}},{"path":"/pages/duty/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarBackgroundColor":"#FFFFFF","navigationBarTextStyle":"black","navigationBarTitleText":"尽职尽责","enablePullDownRefresh":false}},{"path":"/pages/user/index","meta":{"isQuit":true,"isTabBar":true},"window":{"titleNView":false,"navigationStyle":"custom","navigationBarBackgroundColor":"#FFFFFF","navigationBarTextStyle":"black","navigationBarTitleText":"个人中心","enablePullDownRefresh":false}},{"path":"/pages/user/login","meta":{},"window":{"navigationBarBackgroundColor":"#FFFFFF","navigationBarTextStyle":"black","navigationBarTitleText":"登录","enablePullDownRefresh":false}},{"path":"/pages/user/register","meta":{},"window":{"navigationBarBackgroundColor":"#FFFFFF","navigationBarTextStyle":"black","navigationBarTitleText":"注册","enablePullDownRefresh":false}},{"path":"/pages/news/newsdetail","meta":{},"window":{"navigationBarBackgroundColor":"#FFFFFF","navigationBarTextStyle":"black","navigationBarTitleText":"详情","enablePullDownRefresh":false}},{"path":"/pages/user/minejoin","meta":{},"window":{"navigationBarTitleText":"我的劳动参与","enablePullDownRefresh":false,"navigationBarBackgroundColor":"#FFFFFF","navigationBarTextStyle":"black"}},{"path":"/pages/user/mine_honour_certif","meta":{},"window":{"navigationBarTitleText":"国土绿化荣誉证书","enablePullDownRefresh":false,"navigationBarBackgroundColor":"#FFFFFF","navigationBarTextStyle":"black"}},{"path":"/pages/user/mine_duty_certif","meta":{},"window":{"navigationBarTitleText":"义务植树尽责证书","enablePullDownRefresh":false,"navigationBarBackgroundColor":"#FFFFFF","navigationBarTextStyle":"black"}},{"path":"/pages/user/mine_certif_search","meta":{},"window":{"titleNView":false,"navigationStyle":"custom","navigationBarBackgroundColor":"#FFFFFF","navigationBarTextStyle":"black","navigationBarTitleText":"证书查询","enablePullDownRefresh":false}}];
__uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
__uniConfig.onServiceReady=function(callback){if(__uniConfig.serviceReady){callback()}else{onServiceReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"serviceReady",{get:function(){return isServiceReady},set:function(val){isServiceReady=val;if(!isServiceReady){return}const callbacks=onServiceReadyCallbacks.slice(0);onServiceReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
service.register("uni-app-config",{create(a,b,c){if(!__uniConfig.viewport){var d=b.weex.config.env.scale,e=b.weex.config.env.deviceWidth,f=Math.ceil(e/d);Object.assign(__uniConfig,{viewport:f,defaultFontSize:Math.round(f/20)})}return{instance:{__uniConfig:__uniConfig,__uniRoutes:__uniRoutes,global:void 0,window:void 0,document:void 0,frames:void 0,self:void 0,location:void 0,navigator:void 0,localStorage:void 0,history:void 0,Caches:void 0,screen:void 0,alert:void 0,confirm:void 0,prompt:void 0,fetch:void 0,XMLHttpRequest:void 0,WebSocket:void 0,webkit:void 0,print:void 0}}}});

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB