123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457 |
- <template>
- <view class="content">
- <view class="in-bg">
- <image src="../../static/donate/in-tit.png" mode="" class="in-tit in-tit0"></image>
- <image src="../../static/donate/in-tit1.png" mode="" class="in-tit in-tit1"></image>
- <view class="line-donate">
- <view class="btn" @click="goto()">
-
- </view>
- </view>
- <image src="../../static/donate/in-tip.png" mode="" class="in-tit tip"></image>
- <view class="in-love" style="padding-bottom: 20rpx;" @click="navto('/pages/index/love2')">
- <view class="empty"
- style="width: 100%;height: 100%;text-align: center;line-height: 220rpx;font-size: 32rpx;color: #ed4530;"
- v-if="loveList.length == 0">
- 暂无捐款数据
- </view>
- <view class="" style="height: 260rpx;overflow: hidden;">
- <view class="tab-item flex" v-for="(item,index) in loveList" v-if="loveList.length > 0">
- <view class="tab-item-name clamp" style="width: 200rpx;">{{item.name || '佚名'}}</view>
- <view class="tab-item-time clamp" style="width: 180rpx;text-align: center;">
- {{item.paytime | getTime}}</view>
- <view class="tab-item-num clamp" style="width: 180rpx;text-align: right;">¥{{item.amount }}</view>
- </view>
- </view>
- </view>
- <image src="../../static/donate/in-tit2.png" mode="" class="in-tit in-tit1"></image>
- <view class="in-line2 flex">
- <image src="../../static/donate/in-line5.png" mode="" class="line-qr"></image>
- </view>
- <image src="../../static/donate/in-tit3.png" mode="" class="in-tit in-tit1"></image>
- <view class="in-contribute">
- <image src="../../static/donate/in-money.png" mode="" class="in-tit in-money"></image>
- <view class="in-info flex" v-for="item in info">
- <view class="name flex">
- <view class="" v-for="itemt in item.tit">
- {{itemt}}
- </view>
- </view>
- <view class="" style="padding-right: 10rpx;">
- :
- </view>
- <view class="val ">
- {{item.val}}
- </view>
- </view>
-
- <image src="../../static/donate/in-art.png" mode="" class="in-tit in-money"></image>
- <view class="in-info flex" v-for="item in infos">
- <view class="name flex">
- <view class="" v-for="itemt in item.tit">
- {{itemt}}
- </view>
- </view>
- <view class="" style="padding-right: 10rpx;">
- :
- </view>
- <view class="val " v-html="item.val">
- <!-- {{}} -->
- </view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import {
- loadIndexs,
- bannerlist,
- getListAED,
- getDistance,
- getListMechanism,
- getdis,
- tocall
- } from '@/api/index.js';
- import {
- saveUrl,
- interceptor
- } from '@/utils/loginUtils.js';
- import {
- mapState,
- mapMutations
- } from 'vuex';
- import {
- userinfo
- } from '@/api/user.js';
- import uniPopup from '@/components/uni-popup/uni-popup.vue';
- import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
- import empty from '@/components/empty';
- import {
- getLoca
- } from '@/utils/wxAuthorized.js';
- import {
- getcomAddress,
- loveList
- } from '@/api/index.js';
- import topTitle from '../../components/top-title/top-title.vue';
- import store from '@/store/index.js';
- export default {
- components: {
- uniPopup,
- uniLoadMore,
- topTitle,
- empty
- },
- filters: {
- getTime(val) {
- let date = new Date(val * 1000);
- let Y = date.getFullYear();
- let M = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1;
- let D = date.getDate() < 10 ? '0' + date.getDate() : date.getDate();
- return Y + '/' + M + '/' + D;
- },
- },
- data() {
- return {
- info: [
- {
- tit: '开户名',
- val: '黄石市红十字会'
- },
- {
- tit: '银行账户',
- val: '567765132978'
- },
- {
- tit: '开户行',
- val: '中国银行黄石分行营业部'
- },
- ],
- infos: [
- {
- tit: '负责人',
- val: '陈博文'
- },
- {
- tit: '咨询电话',
- val: '0714-6221833'
- },
- {
- tit: '地址',
- val: '湖北省黄石市桂林南路10号'
- },
- ],
- carouselList: [], //轮播
- loveList: [],
- loadingType: 'more',
- page: 1,
- limit: 30,
- timer: '',
- };
- },
- onShow() {
- saveUrl();
- console.log(11, this);
- if (!this.hasLogin) {
- // 登录拦截
- interceptor();
- }
- },
- onLoad() {
- uni.hideTabBar()
- saveUrl();
- this.getLoveList()
- },
- computed: {
- ...mapState('user', ['userInfo', 'baseURL', 'hasLogin'])
- },
- // 下拉加载
- methods: {
- goto() {
- this.navto('/pages/applic/contribution')
- },
- gundong() {
- let obj = this;
- console.log('zhe')
- if (obj.timer) {
- clearTimeout(obj.timer)
- }
- try{
- obj.timer = setTimeout(() => {
- obj.loveList.push(obj.loveList.shift());
- console.log(obj.loveList)
- obj.gundong();
- }, 2000);
- }catch(e){
- console.log(e)
- }
-
- },
- navto(url) {
- uni.navigateTo({
- url,
- fail() {
- uni.switchTab({
- url
- })
- }
- })
- },
- // 获取爱心榜数据
- getLoveList() {
- let obj = this
- if (obj.loadingType == 'noMore' || obj.loadingType == 'loading') {
- return
- }
- obj.loadingType = 'loading'
- loveList({
- page: obj.page,
- limit: obj.limit
- }).then(({
- data
- }) => {
- obj.loveList = obj.loveList.concat(data.data)
- obj.gundong()
- })
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- .content {
- position: relative;
- }
- .bg-img {
- position: absolute;
- top: 0;
- left: 0;
- width: 750rpx;
- height: 2323rpx;
- image {
- width: 100%;
- height: 100%;
- }
- }
- .over-content {
- position: relative;
- top: 669rpx;
- }
- .item-wrapper {
- width: 636rpx;
- margin: 0 auto 76rpx;
- border: 1px solid #C9101B;
- // background: #fff;
- border-radius: 10px;
- position: relative;
- .item-tit {
- width: 199rpx;
- height: 55rpx;
- background: linear-gradient(0, #C9101B, #F24D33);
- border-radius: 10rpx;
- text-align: center;
- line-height: 55rpx;
- font-size: 34rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #FFFFFF;
- position: absolute;
- top: -28rpx;
- left: 64rpx;
- }
- .item-info {
- font-size: 32rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #ed4530;
- line-height: 49rpx;
- // background: linear-gradient(0deg, #C9101B 0%, #F24D33 99.267578125%);
- // -webkit-background-clip: text;
- // -webkit-text-fill-color: transparent;
- width: 100%;
- }
- .item-btn {
- justify-content: center;
- align-items: center;
- height: 72rpx;
- position: absolute;
- bottom: 50rpx;
- width: 568rpx;
- .xcb {
- width: 80rpx;
- height: 50rpx;
- }
- .item-btn-btn {
- width: 303rpx;
- height: 72rpx;
- margin: 0 10rpx;
- background: linear-gradient(0deg, #C9101B, #F24D33);
- border-radius: 36rpx;
- line-height: 72rpx;
- text-align: center;
- font-size: 34rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #FFFFFF;
- }
- }
- .tab-wrap {
- padding: 53rpx 40rpx 28rpx 33rpx;
- height: 410rpx;
- .tab-item {
- line-height: 45rpx;
- height: 45rpx;
- align-items: center;
- justify-content: space-between;
- font-size: 30rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #ed4530;
- }
- }
- }
-
- .in-bg {
- background-image: url('../../static/donate/in-bg.png');
- width: 750rpx;
- height: 2750rpx;
- background-size: 100% 100%;
- padding-top: 135rpx;
- .in-tit {
- display: block;
- }
- .in-tit0 {
- width: 556rpx;
- height: 100rpx;
- margin:0 auto 70rpx;
- }
- .in-tit1 {
- width: 489rpx;
- height: 115rpx;
- margin: auto;
- }
- .tip {
- width: 302rpx;
- height: 37rpx;
- margin:30rpx auto 38rpx;
- }
- .in-love {
- width: 656rpx;
- height: 403rpx;
- overflow: hidden;
- background-image: url('../../static/donate/in-love.png');
- background-size: 100% 100%;
- margin: 0 auto 56rpx;
- padding: 110rpx 27rpx 20rpx;
- }
- .line-donate {
- width: 717rpx;
- height: 361rpx;
- background-image: url('../../static/donate/in-ent.png');
- background-size: 100% 100%;
- margin:-30rpx auto 0;
- padding-top: 171rpx;
- .btn {
- height: 150rpx;
- width: 150rpx;
- margin: auto;
- border-radius: 50%;
- }
- }
- .in-line {
- width: 656rpx;
- height: 390rpx;
- background-image: url('../../static/donate/in-line.png');
- background-size: 100% 100%;
- margin:21rpx auto 51rpx;
- justify-content: space-between;
- padding: 27rpx 22rpx;
- .line-qr {
- width: 272rpx;
- height: 272rpx;
- background-color: #fff;
- }
- }
- .in-line2 {
- width: 656rpx;
- height: 390rpx;
- background-image: url('../../static/donate/in-line3.png');
- background-size: 100% 100%;
- margin:21rpx auto 51rpx;
- justify-content: center;
- padding: 27rpx 22rpx;
- .line-qr {
- display: block;
- width: 272rpx;
- height: 272rpx;
- // background-image: url('../../static/donate/line-ewm.jpg');
- // // background-color: #fff;
- // background-size: 100% 100%;
- }
- }
- .in-contribute {
- width: 656rpx;
- // height: 527rpx;
- background-color: rgba(255, 255, 255, 0.63);
- margin:15rpx auto;
- border: 1px solid #f07568;
- padding: 40rpx 0 40rpx 40rpx;
- .in-money {
- width: 231rpx;
- height: 32rpx;
- margin:20rpx auto;
- }
- }
- .in-info {
- font-size: 30rpx;
- font-weight: 500;
- color: #333333;
- padding: 10rpx 6rpx;
- font-weight: bold;
- line-height: 1.5;
- .name {
- width:130rpx;
- justify-content: space-between;
- // &::after {
- // content: ':';
- // }
- }
- .val {
- // padding-left: 10rpx;
- // &::before {
- // content: ':';
- // padding-right: 10rpx;
- // }
- }
- .copy {
-
- }
- }
- }
- .tab-item {
- line-height: 45rpx;
- height: 45rpx;
- align-items: center;
- justify-content: space-between;
- font-size: 30rpx;
- font-weight: bold;
- color: #ed4530;
- }
- </style>
|