页面调整
23
components/empty-view.vue
Executable file
@ -0,0 +1,23 @@
|
|||||||
|
<template>
|
||||||
|
<view style="display: flex;justify-content: center;min-height: 100%;width: 750rpx;flex-direction: column;align-items: center;">
|
||||||
|
<image src="/static/images/ic_empty_data.png" mode="aspectFill" style="width: 200rpx;height: 200rpx;margin-top: 200rpx;"></image>
|
||||||
|
<view style="font-size: 35rpx;color: #BBBBBB;">暂无数据</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'empty-view',
|
||||||
|
props: {},
|
||||||
|
computed: {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
</style>
|
3
main.js
@ -3,8 +3,9 @@ import App from './App'
|
|||||||
import store from './store'
|
import store from './store'
|
||||||
import api from './config/api'
|
import api from './config/api'
|
||||||
import base from './common/app'
|
import base from './common/app'
|
||||||
|
import emptyView from './components/empty-view.vue';
|
||||||
|
|
||||||
|
Vue.component('emptyView', emptyView);
|
||||||
Vue.config.productionTip = false
|
Vue.config.productionTip = false
|
||||||
|
|
||||||
Vue.prototype.$store = store
|
Vue.prototype.$store = store
|
||||||
|
@ -1,41 +1,75 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="page">
|
<view class="page">
|
||||||
|
<scroller @init="initScroller" @down="refreshData" @up="getList" :up="optUp" @scroll="navFloatShow(scroller)"
|
||||||
<view class="status-bar"></view>
|
:fixed="false">
|
||||||
<view class="content">
|
<view class="status-bar"></view>
|
||||||
<!-- 搜索框 -->
|
<view class="content">
|
||||||
<view class="search">
|
<!-- 搜索框 -->
|
||||||
|
<!-- <view class="search">
|
||||||
<view class="search-content">
|
<view class="search-content">
|
||||||
<image src="../../static/images/ic_search.png" class="icon" mode="aspectFill"></image>
|
<image src="../../static/images/ic_search.png" class="icon" mode="aspectFill"></image>
|
||||||
<input @input="onSearchInput" placeholder="请输入关键字搜索" />
|
<input @input="onSearchInput" placeholder="请输入关键字搜索" />
|
||||||
</view>
|
</view>
|
||||||
<view class="btn" @click="doSearch">搜索</view>
|
<view class="btn" @click="doSearch">搜索</view>
|
||||||
</view>
|
</view> -->
|
||||||
<!-- 轮播图 -->
|
<!-- 轮播图 -->
|
||||||
<swiper v-if="slider.length > 0" class="swiper" :indicator-dots="true" :autoplay="true" :circular="true">
|
<swiper v-if="slider.length > 0" class="swiper" :indicator-dots="false" :autoplay="true"
|
||||||
<swiper-item v-for="(item, index) in slider" :key="index">
|
:circular="true">
|
||||||
<navigator class="item" hover-class="none" :url="'/pages/duty/list'">
|
<swiper-item v-for="(item, index) in slider" :key="index">
|
||||||
<image :lazy-load="true" :src="item.imageUrl" mode="aspectFill"></image>
|
<navigator class="item" hover-class="none" :url="'/pages/duty/list'">
|
||||||
|
<image :lazy-load="true" :src="item.imageUrl" mode="scaleToFill"></image>
|
||||||
|
|
||||||
</navigator>
|
</navigator>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
<view class="func-box">
|
<view class="func-box">
|
||||||
<view class="item" @click="openActivity()">
|
<view class="item" @click="openActivity()">
|
||||||
<image src="../../static/images/ic_labour_pious_icon.png" mode="aspectFill"></image>
|
<image src="../../static/images/ic_labour_pious_icon.png" mode="scaleToFill"></image>
|
||||||
<text>劳动尽责</text>
|
<text>劳动尽责</text>
|
||||||
|
</view>
|
||||||
|
<view class="item" @click="openCertificate">
|
||||||
|
<image src="../../static/images/ic_certify_search_icon.png" mode="scaleToFill"></image>
|
||||||
|
<text>证书查询</text>
|
||||||
|
</view>
|
||||||
|
<view class="item" @click="openExplain">
|
||||||
|
<image src="../../static/images/ic_duty_answer_icon.png" mode="scaleToFill"></image>
|
||||||
|
<text>尽责说明</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item" @click="openCertificate">
|
<image class="divider-img" src="../../static/images/ic_duty_divider.png" mode="scaleToFill"></image>
|
||||||
<image src="../../static/images/ic_certify_search_icon.png" mode="aspectFill"></image>
|
<!-- 劳动尽责内容 -->
|
||||||
<text>证书查询</text>
|
<view class="duty-box">
|
||||||
</view>
|
<view class="duty-content" v-if="list.length>0">
|
||||||
<view class="item" @click="openExplain">
|
<view class="content-left">
|
||||||
<image src="../../static/images/ic_duty_answer_icon.png" mode="aspectFill"></image>
|
<view class="title">
|
||||||
<text>尽责说明</text>
|
{{list[0].title}}
|
||||||
|
</view>
|
||||||
|
<view class="btn">去了解></view>
|
||||||
|
<view class="time">活动时间</view>
|
||||||
|
<view class="time">{{list[0].startTime}}至{{list[0].endTime}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="content-right" v-if="list.length>=2">
|
||||||
|
<view class="right-item-top">
|
||||||
|
<view class="title">
|
||||||
|
{{list[1].title}}
|
||||||
|
</view>
|
||||||
|
<view class="btn">去了解></view>
|
||||||
|
</view>
|
||||||
|
<view class="right-item-bottom" v-if="list.length>=3">
|
||||||
|
<view class="title">
|
||||||
|
{{list[2].title}}
|
||||||
|
</view>
|
||||||
|
<view class="btn">去了解></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-else>
|
||||||
|
<emptyView></emptyView>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<image class="divider" src="../../static/images/ic_duty_divider.png" mode="aspectFill"></image>
|
</scroller>
|
||||||
</view>
|
<pageLoading v-if="showPageLoading"></pageLoading>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -49,10 +83,28 @@
|
|||||||
return {
|
return {
|
||||||
showPageLoading: true,
|
showPageLoading: true,
|
||||||
slider: [{
|
slider: [{
|
||||||
imageUrl: "https://img1.baidu.com/it/u=1470385559,3839180880&fm=253&fmt=auto&app=138&f=JPEG?w=667&h=500"
|
imageUrl: "/static/images/ic_duty_title_bg.png"
|
||||||
}], //轮播图
|
}], //轮播图
|
||||||
|
list: [],
|
||||||
|
scroller: {},
|
||||||
|
optUp: {
|
||||||
|
isLock: true,
|
||||||
|
auto: true,
|
||||||
|
onScroll: true,
|
||||||
|
page: {
|
||||||
|
num: 0, //当前页 默认0,回调之前会加1; 即callback(page)会从1开始
|
||||||
|
size: 3 //每页数据条数,默认10
|
||||||
|
},
|
||||||
|
empty: {
|
||||||
|
tip: '暂无数据~'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
onLoad(res) {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doSearch() {
|
doSearch() {
|
||||||
|
|
||||||
@ -74,6 +126,63 @@
|
|||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/user/mine_certif_search"
|
url: "/pages/user/mine_certif_search"
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
/*初始化滚动*/
|
||||||
|
initScroller(scroller) {
|
||||||
|
this.scroller = scroller;
|
||||||
|
this.loadData();
|
||||||
|
},
|
||||||
|
/*刷新数据*/
|
||||||
|
refreshData() {
|
||||||
|
uni.showLoading({
|
||||||
|
title: '刷新中'
|
||||||
|
});
|
||||||
|
this.scroller.resetUpScroll();
|
||||||
|
},
|
||||||
|
onSearchInput: function(event) {
|
||||||
|
this.searchContent = event.target.value
|
||||||
|
console.log(event.target.value)
|
||||||
|
if (event.target.value == "") {
|
||||||
|
this.refreshData()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/*加载数据*/
|
||||||
|
loadData() {
|
||||||
|
this.list = [];
|
||||||
|
this.scroller.resetUpScroll();
|
||||||
|
},
|
||||||
|
/*滚动时导航栏浮动*/
|
||||||
|
navFloatShow(scroller) {
|
||||||
|
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
this.$app.request({
|
||||||
|
url: this.$api.duty.getActivityList,
|
||||||
|
method: 'GET',
|
||||||
|
data: {
|
||||||
|
'rows': '3',
|
||||||
|
'page': '1',
|
||||||
|
},
|
||||||
|
dataType: 'json',
|
||||||
|
success: res => {
|
||||||
|
if (res.rows != undefined) {
|
||||||
|
this.list = res.rows
|
||||||
|
this.showPageLoading = false;
|
||||||
|
this.scroller.endBySize(res.rows.length, 3);
|
||||||
|
} else {
|
||||||
|
this.scroller.endSuccess();
|
||||||
|
this.$alert(res.msg);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fail: res => {
|
||||||
|
this.scroller.endErr();
|
||||||
|
},
|
||||||
|
complete: res => {
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
|
this.showPageLoading = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -89,7 +198,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
overflow: auto;
|
overflow: hidden;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
}
|
}
|
||||||
@ -101,15 +210,16 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
|
margin-top: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*幻灯片广告 */
|
/*幻灯片广告 */
|
||||||
.swiper {
|
.swiper {
|
||||||
height: 350rpx;
|
height: 420rpx;
|
||||||
margin: 14rpx 24rpx 0;
|
margin: 14rpx 24rpx 0;
|
||||||
|
|
||||||
image {
|
image {
|
||||||
height: 350rpx;
|
height: 420rpx;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-radius: 15rpx;
|
border-radius: 15rpx;
|
||||||
//box-shadow: 0 0 12px #dddee1;
|
//box-shadow: 0 0 12px #dddee1;
|
||||||
@ -179,9 +289,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.divider {
|
.divider-img {
|
||||||
width: 96%;
|
width: 96%;
|
||||||
height: 100rpx;
|
height: 180rpx;
|
||||||
align-self: center;
|
align-self: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -216,4 +326,134 @@
|
|||||||
color: #b3b3b3;
|
color: #b3b3b3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.duty-box {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
margin-top: 50rpx;
|
||||||
|
|
||||||
|
.duty-content {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.content-left {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
background-image: url('/static/images/ic_duty_index_item_1.png');
|
||||||
|
width: 48%;
|
||||||
|
height: 80%;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
margin: 10rpx;
|
||||||
|
padding: 15rpx;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
display: -webkit-box;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
word-break: break-all;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
overflow: hidden;
|
||||||
|
font-size: 32rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
background: #169302;
|
||||||
|
border-radius: 15rpx;
|
||||||
|
padding: 10rpx 15rpx;
|
||||||
|
width: 140rpx;
|
||||||
|
color: white;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 25rpx;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
align-self: flex-end;
|
||||||
|
}
|
||||||
|
|
||||||
|
.time {
|
||||||
|
margin-top: 20rpx;
|
||||||
|
font-size: 25rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-right {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
width: 48%;
|
||||||
|
height: 80%;
|
||||||
|
margin: 10rpx;
|
||||||
|
|
||||||
|
.right-item-top {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
background-image: url('/static/images/ic_duty_index_item_2.png');
|
||||||
|
width: 100%;
|
||||||
|
height: 50%;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
display: -webkit-box;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
word-break: break-all;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
overflow: hidden;
|
||||||
|
font-size: 32rpx;
|
||||||
|
padding: 15rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
background: #169302;
|
||||||
|
border-radius: 15rpx;
|
||||||
|
padding: 10rpx 15rpx;
|
||||||
|
width: 140rpx;
|
||||||
|
color: white;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 25rpx;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
margin-left: 10rpx;
|
||||||
|
align-self: flex-start;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.right-item-bottom {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
margin-top: 10rpx;
|
||||||
|
background-image: url('/static/images/ic_duty_index_item_3.png');
|
||||||
|
width: 100%;
|
||||||
|
height: 50%;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
display: -webkit-box;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
word-break: break-all;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
overflow: hidden;
|
||||||
|
font-size: 32rpx;
|
||||||
|
padding: 15rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
background: #169302;
|
||||||
|
border-radius: 15rpx;
|
||||||
|
padding: 10rpx 15rpx;
|
||||||
|
width: 140rpx;
|
||||||
|
color: white;
|
||||||
|
text-align: center;
|
||||||
|
margin-left: 10rpx;
|
||||||
|
font-size: 25rpx;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
align-self: flex-start;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -14,10 +14,10 @@
|
|||||||
</view>
|
</view>
|
||||||
<!-- 资料 -->
|
<!-- 资料 -->
|
||||||
<view class="amount">
|
<view class="amount">
|
||||||
<view class="item" @click="openPage('/pages/user/mine_certif_search')">
|
<!-- <view class="item" @click="openPage('/pages/user/mine_certif_search')">
|
||||||
<view class="num">3333</view>
|
<view class="num">3333</view>
|
||||||
<view>累计捐赠</view>
|
<view>累计捐赠</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<view class="num">3333</view>
|
<view class="num">3333</view>
|
||||||
<view>我的证书</view>
|
<view>我的证书</view>
|
||||||
@ -51,14 +51,6 @@
|
|||||||
</view>
|
</view>
|
||||||
<image src="../../static/images/ic_arrow_right.png" mode="aspectFill"></image>
|
<image src="../../static/images/ic_arrow_right.png" mode="aspectFill"></image>
|
||||||
</view>
|
</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 class="item" @click="changePwd">
|
<view class="item" @click="changePwd">
|
||||||
<view class="item-content">
|
<view class="item-content">
|
||||||
<image src="../../static/images/ic_print_icon.png" mode="aspectFill"></image>
|
<image src="../../static/images/ic_print_icon.png" mode="aspectFill"></image>
|
||||||
@ -82,7 +74,8 @@
|
|||||||
imgUrl: this.$api.common.imgUrl,
|
imgUrl: this.$api.common.imgUrl,
|
||||||
userInfo: {},
|
userInfo: {},
|
||||||
isRefresh: false,
|
isRefresh: false,
|
||||||
loginOut: false
|
loginOut: false,
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(res) {
|
onLoad(res) {
|
||||||
|
BIN
static/images/ic_duty_index_item_1.png
Executable file
After Width: | Height: | Size: 128 KiB |
BIN
static/images/ic_duty_index_item_2.png
Executable file
After Width: | Height: | Size: 116 KiB |
BIN
static/images/ic_duty_index_item_3.png
Executable file
After Width: | Height: | Size: 84 KiB |
BIN
static/images/ic_duty_title_bg.png
Executable file
After Width: | Height: | Size: 421 KiB |
BIN
static/images/ic_empty_data.png
Executable file
After Width: | Height: | Size: 1.6 KiB |
676
unpackage/dist/dev/app-plus/app-service.js
vendored
771
unpackage/dist/dev/app-plus/app-view.js
vendored
BIN
unpackage/dist/dev/app-plus/static/images/ic_duty_index_item_1.png
vendored
Normal file
After Width: | Height: | Size: 128 KiB |
BIN
unpackage/dist/dev/app-plus/static/images/ic_duty_index_item_2.png
vendored
Normal file
After Width: | Height: | Size: 116 KiB |
BIN
unpackage/dist/dev/app-plus/static/images/ic_duty_index_item_3.png
vendored
Normal file
After Width: | Height: | Size: 84 KiB |
BIN
unpackage/dist/dev/app-plus/static/images/ic_duty_title_bg.png
vendored
Normal file
After Width: | Height: | Size: 421 KiB |
BIN
unpackage/dist/dev/app-plus/static/images/ic_empty_data.png
vendored
Normal file
After Width: | Height: | Size: 1.6 KiB |