|
@@ -1,99 +1,93 @@
|
|
|
<template>
|
|
<template>
|
|
|
<view :style="vuex_skin">
|
|
<view :style="vuex_skin">
|
|
|
- <view style="padding: 30rpx 30rpx 10rpx;">
|
|
|
|
|
- <u-swiper :list="swiperList" border-radius="12" height="300"></u-swiper>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="">
|
|
|
|
|
- <view class="cu-list grid col-4 no-border" style="border-radius:20rpx ;">
|
|
|
|
|
- <view class="cu-item" @click.stop="$jump(item.path)" v-for="(item,index) in gridList"
|
|
|
|
|
- :key="index">
|
|
|
|
|
- <view class="grid-icon">
|
|
|
|
|
- <image style="width: 88rpx;height: 88rpx;" :src="item.icon" />
|
|
|
|
|
|
|
+ <mescroll-body ref="mescrollRef" @init="mescrollInit" :down="downOption" :up="upOption" @down="downCallback"
|
|
|
|
|
+ @up="upCallback">
|
|
|
|
|
+ <view style="padding: 30rpx 30rpx 10rpx;">
|
|
|
|
|
+ <u-swiper :list="swiperList" border-radius="12" height="300"></u-swiper>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="">
|
|
|
|
|
+ <view class="cu-list grid col-4 no-border" style="border-radius:20rpx ;">
|
|
|
|
|
+ <view class="cu-item" @click.stop="$jump(item.path)" v-for="(item,index) in gridList" :key="index">
|
|
|
|
|
+ <view class="grid-icon">
|
|
|
|
|
+ <image style="width: 88rpx;height: 88rpx;" :src="item.icon" />
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <text style="color: #222222;font-size: 26rpx;">{{item.name}}</text>
|
|
|
|
|
+ <view class="cu-tag bg-red badge" v-if="item.count>0">{{item.count}}</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <text style="color: #222222;font-size: 26rpx;">{{item.name}}</text>
|
|
|
|
|
- <view class="cu-tag bg-red badge" v-if="item.count>0">{{item.count}}</view>
|
|
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- </view>
|
|
|
|
|
- <view class="" style="height: 20rpx;background-color: #f8f8f8"></view>
|
|
|
|
|
- <view style="padding: 30rpx 30rpx 0">
|
|
|
|
|
- <u-search placeholder="搜索关键词或编号" height="70" @search="searchWorks" v-model="keyword" :show-action="false"></u-search>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="padding-30">
|
|
|
|
|
- <view class="text-bold" style="font-size: 34rpx;">
|
|
|
|
|
- {{vuex_page_interface_show.indexTitle}}
|
|
|
|
|
|
|
+ <view class="" style="height: 20rpx;background-color: #f8f8f8"></view>
|
|
|
|
|
+ <view style="padding: 30rpx 30rpx 0">
|
|
|
|
|
+ <u-search placeholder="搜索关键词或编号" height="70" @search="searchWorks" v-model="keyword"
|
|
|
|
|
+ :show-action="false">
|
|
|
|
|
+ </u-search>
|
|
|
</view>
|
|
</view>
|
|
|
- <view @click="$jump('/pages/activity/activityDetail?id='+item.id)" class="card shadow" v-for="(item,index) in worksList" :key="item.id">
|
|
|
|
|
- <view v-if="index==0" class="center bg-img rank-tag" style="background-image: url(../../static/icon/ph1.png)">
|
|
|
|
|
- <text>1</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view v-if="index==1" class="center bg-img rank-tag" style="background-image: url(../../static/icon/ph2.png)">
|
|
|
|
|
- <text>2</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view v-if="index==2" class="center bg-img rank-tag" style="background-image: url(../../static/icon/ph3.png)">
|
|
|
|
|
- <text>3</text>
|
|
|
|
|
- </view>
|
|
|
|
|
-
|
|
|
|
|
- <view class="left">
|
|
|
|
|
- <image :src="item.imgUrl" mode=""></image>
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <view style="padding: 30rpx 30rpx 0;">
|
|
|
|
|
+ <view class="text-bold" style="font-size: 34rpx;">
|
|
|
|
|
+ {{vuex_page_interface_show.indexTitle}}
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="right">
|
|
|
|
|
- <view class="flex-direction flex">
|
|
|
|
|
- <text class="title">{{item.title}}</text>
|
|
|
|
|
- <rich-text class="desc text-cut-2" :nodes="decodeURIComponent(item.content)"></rich-text>
|
|
|
|
|
|
|
+ <view @click="$jump('/pages/activity/activityDetail?id='+item.id)" class="card shadow"
|
|
|
|
|
+ v-for="(item,index) in worksList" :key="item.id">
|
|
|
|
|
+ <view v-if="index==0" class="center bg-img rank-tag"
|
|
|
|
|
+ style="background-image: url(../../static/icon/ph1.png)">
|
|
|
|
|
+ <text>1</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view v-if="index==1" class="center bg-img rank-tag"
|
|
|
|
|
+ style="background-image: url(../../static/icon/ph2.png)">
|
|
|
|
|
+ <text>2</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view v-if="index==2" class="center bg-img rank-tag"
|
|
|
|
|
+ style="background-image: url(../../static/icon/ph3.png)">
|
|
|
|
|
+ <text>3</text>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="bottom">
|
|
|
|
|
- <view class="flex margin-top-10">
|
|
|
|
|
- <image class="center" style="width: 30rpx;height: 30rpx;" src="../../static/icon/remen.png">
|
|
|
|
|
- </image>
|
|
|
|
|
- <text style="color: #353535;margin-left: 6rpx;font-size:28rpx;">{{item.voteCount}}</text>
|
|
|
|
|
|
|
+ <view class="left">
|
|
|
|
|
+ <image :src="item.imgUrl" mode=""></image>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="right" style="width: 100%;">
|
|
|
|
|
+ <view class="flex-direction flex">
|
|
|
|
|
+ <text class="title">{{item.title}}</text>
|
|
|
|
|
+ <rich-text class="desc text-cut-2" :nodes="decodeURIComponent(item.content)"></rich-text>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="cu-btn round sm line-base">
|
|
|
|
|
- 去助力
|
|
|
|
|
|
|
+ <view class="bottom" style="width: 100%;">
|
|
|
|
|
+ <view class="flex margin-top-10">
|
|
|
|
|
+ <image class="center" style="width: 30rpx;height: 30rpx;"
|
|
|
|
|
+ src="../../static/icon/remen.png">
|
|
|
|
|
+ </image>
|
|
|
|
|
+ <text
|
|
|
|
|
+ style="color: #353535;margin-left: 6rpx;font-size:28rpx;">{{item.heatValue}}</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="cu-btn round sm line-base">
|
|
|
|
|
+ 去助力
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- </view>
|
|
|
|
|
|
|
+ </mescroll-body>
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
|
+ import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
|
|
|
export default {
|
|
export default {
|
|
|
- name: '',
|
|
|
|
|
- async mounted() {
|
|
|
|
|
- console.log(2);
|
|
|
|
|
- await this.initWorksList();
|
|
|
|
|
- },
|
|
|
|
|
- computed:{
|
|
|
|
|
- swiperList(){
|
|
|
|
|
- const { indexImageList }= this.$store.state['vuex_page_interface_show'];
|
|
|
|
|
- console.log(indexImageList);
|
|
|
|
|
- let swiperList = [];
|
|
|
|
|
- indexImageList.forEach(item => {swiperList.push(item.url);})
|
|
|
|
|
- return swiperList;
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- methods :{
|
|
|
|
|
- async initWorksList(){
|
|
|
|
|
- const { defaultActiveId:activeId }= this.$store.state['vuex_active_setting'];
|
|
|
|
|
- this.$api.activity.getWorksList({ activeId }).then(res => {
|
|
|
|
|
- this.worksList = res.data.data;
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
- searchWorks(value){
|
|
|
|
|
- this.$api.activity.searchWork(value).then(res => {
|
|
|
|
|
- this.worksList = res.data.data;
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ mixins: [MescrollMixin],
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
|
|
+ downOption: {
|
|
|
|
|
+ auto: false
|
|
|
|
|
+ },
|
|
|
|
|
+ upOption: {
|
|
|
|
|
+ empty: {
|
|
|
|
|
+ use: false
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ activeId: '',
|
|
|
worksList: [],
|
|
worksList: [],
|
|
|
gridList: [{
|
|
gridList: [{
|
|
|
icon: '/static/grid/jieshao.png',
|
|
icon: '/static/grid/jieshao.png',
|
|
|
name: "活动介绍",
|
|
name: "活动介绍",
|
|
|
- path:"/pages/introduce/introduce"
|
|
|
|
|
|
|
+ path: "/pages/introduce/introduce"
|
|
|
}, {
|
|
}, {
|
|
|
icon: '/static/grid/baoming.png',
|
|
icon: '/static/grid/baoming.png',
|
|
|
name: "我要代言",
|
|
name: "我要代言",
|
|
@@ -101,7 +95,7 @@
|
|
|
{
|
|
{
|
|
|
icon: '/static/grid/rank.png',
|
|
icon: '/static/grid/rank.png',
|
|
|
name: "排行榜",
|
|
name: "排行榜",
|
|
|
- path:"/pages/rank/rank"
|
|
|
|
|
|
|
+ path: "/pages/rank/rank"
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
icon: '/static/grid/more.png',
|
|
icon: '/static/grid/more.png',
|
|
@@ -109,8 +103,59 @@
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
|
};
|
|
};
|
|
|
|
|
+ },
|
|
|
|
|
+ mounted() {
|
|
|
|
|
+ const {
|
|
|
|
|
+ defaultActiveId
|
|
|
|
|
+ } = this.$store.state['vuex_active_setting']
|
|
|
|
|
+ this.activeId = defaultActiveId
|
|
|
|
|
+ },
|
|
|
|
|
+ computed: {
|
|
|
|
|
+ swiperList() {
|
|
|
|
|
+ const {
|
|
|
|
|
+ indexImageList
|
|
|
|
|
+ } = this.$store.state['vuex_page_interface_show'];
|
|
|
|
|
+ console.log(indexImageList);
|
|
|
|
|
+ let swiperList = [];
|
|
|
|
|
+ indexImageList.forEach(item => {
|
|
|
|
|
+ swiperList.push(item.url);
|
|
|
|
|
+ })
|
|
|
|
|
+ return swiperList;
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ methods: {
|
|
|
|
|
+ searchWorks(value) {
|
|
|
|
|
+ this.$api.activity.searchWork(value).then(res => {
|
|
|
|
|
+ this.worksList = res.data.data;
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ downCallback() {
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ this.mescroll.resetUpScroll();
|
|
|
|
|
+ }, 1000)
|
|
|
|
|
+ },
|
|
|
|
|
+ upCallback(mescroll) {
|
|
|
|
|
+ try {
|
|
|
|
|
+ let params = {
|
|
|
|
|
+ current: mescroll.num,
|
|
|
|
|
+ size: mescroll.size,
|
|
|
|
|
+ activeId: this.activeId
|
|
|
|
|
+ }
|
|
|
|
|
+ this.$api.activity.sortListQuery(params).then(res => {
|
|
|
|
|
+ console.log(res.data.data.records);
|
|
|
|
|
+ let data = res.data.data.records
|
|
|
|
|
+ let total = res.data.data.total
|
|
|
|
|
+ mescroll.endBySize(data.length, total);
|
|
|
|
|
+ if (mescroll.num == 1) this.worksList = []; //如果是第一页需手动制空列表
|
|
|
|
|
+ this.worksList = this.worksList.concat(data); //追加新数据
|
|
|
|
|
+ })
|
|
|
|
|
+ } catch (e) {
|
|
|
|
|
+ console.error(e);
|
|
|
|
|
+ this.mescroll.endErr()
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
- };
|
|
|
|
|
|
|
+ }
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
|
<style>
|
|
@@ -133,6 +178,7 @@
|
|
|
top: 0rpx;
|
|
top: 0rpx;
|
|
|
z-index: 999;
|
|
z-index: 999;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.card {
|
|
.card {
|
|
|
position: relative;
|
|
position: relative;
|
|
|
margin-top: 30rpx;
|
|
margin-top: 30rpx;
|
|
@@ -174,6 +220,7 @@
|
|
|
.bottom {
|
|
.bottom {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
|
|
|
+ width: 100%;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|