Commit 0a654524 by mamingqun

去掉没用的接口

parent b47b7968
...@@ -15,7 +15,8 @@ export default new Vuex.Store({ ...@@ -15,7 +15,8 @@ export default new Vuex.Store({
activeInfo:'', activeInfo:'',
ruweiBoxScroll: 0, ruweiBoxScroll: 0,
publicActiveInfo: null, publicActiveInfo: null,
publicShareInfo: null publicShareInfo: null,
ruweigonggao: null
}, },
mutations: { mutations: {
changeLastBoxScrollY(state, num) { changeLastBoxScrollY(state, num) {
...@@ -53,6 +54,24 @@ export default new Vuex.Store({ ...@@ -53,6 +54,24 @@ export default new Vuex.Store({
}).catch((err) => { }).catch((err) => {
console.log(err); console.log(err);
}); });
},
getRuweiInfo(state,num){
axios
.get('/contest/selected/list', {
params: {
page: 1,
type: 0,
}
}).then((res) => {
// console.log('res');
// console.log(res.data.data.memo);
state.ruweigonggao = res.data.data.memo;
})
},
changeRuweiInfo(state,num){
console.log('num');
console.log(num);
state.ruweigonggao = num;
} }
} }
}) })
\ No newline at end of file
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
<ruwei></ruwei> <ruwei></ruwei>
</div> </div>
</div> </div>
<div class="joinus" v-show="tabActive !== 3"> <div class="joinus" v-show="tabActive === 1 || tabActive === 2">
<div @click="goImgup">我要参与</div> <div @click="goImgup">我要参与</div>
</div> </div>
<div class="wangqiList"></div> <div class="wangqiList"></div>
...@@ -236,7 +236,7 @@ export default { ...@@ -236,7 +236,7 @@ export default {
_this.judgeShare(); _this.judgeShare();
_this.getIsAward(); _this.getIsAward();
_this.getActiveInfo(); // _this.getActiveInfo();
_this.getLastList(); _this.getLastList();
// _this.getRenqiList(); // _this.getRenqiList();
//在getActiveInfo里请求了 //在getActiveInfo里请求了
...@@ -245,9 +245,11 @@ export default { ...@@ -245,9 +245,11 @@ export default {
_this.getUserInfo(); _this.getUserInfo();
_this.getRuweiList(); _this.getRuweiList();
_this.getWeixinPowerShare(); _this.getWeixinPowerShare();
// 请求入围信息,提前加载入围的信息防止入围公告闪烁
store.commit('getRuweiInfo');
}).catch((err) => { }).catch((err) => {
console.log(err); console.log(err);
}); });
......
<template> <template>
<div class="ruweiWrap">
<div class="ruweiBox"> <div class="ruweiBox">
<div class="prizeList"> <div class="prizeList">
<div class="content"> <div class="content">
<div class="newBox"> <div class="newBox">
<div class="topBox123"> <div v-html="ruweiText">
<!-- <div class="topBox123">
<div class="title"> <div class="title">
<!-- <div class="mainTitle">云上丹寨摄影月赛<br> <span>1月份入围作品</span></div> --> <div class="mainTitle">1月份入围作品公告</div>
<div class="mainTitle">入围作品公告</div>
</div> </div>
</div> </div>
<ul class="listArr"> <ul class="listArr">
<li class="middleBox"> <li class="middleBox">
<p>征集时间 : <p>
<span class="jiacu">2019.1.28-2019.2.25</span> 一月份参赛作品征集:
<span class="jiacu">1月1日-1月20日</span>
</p> </p>
<p>入围作品公布时间: <p>
<span class="jiacu">2019.2.25</span> 一月份入围作品公布:
<span class="jiacu">1月25日</span>
</p> </p>
<p>最终结果公布时间: <p>
<span class="jiacu">2019.2.28</span>&nbsp;(敬请关注) 一月份获奖作品公布:
<span class="jiacu">1月31日</span>
</p> </p>
<!-- <p class="fontSize24">(敬请关注)</p> -->
<p <p
class="lineHeight150" class="lineHeight150"
>我们将在参赛作品中,由专业评委选出20幅照片作为入围作品(排名不分先后),月底由评委再选出金银铜奖各一幅,各获得奖品现金2000元、价值1000元万达影城电影卡、价值600元万达影城电影卡。当月点赞最多的10幅作品颁发人气奖,奖励万达影院电影票2张</p> >云上丹寨摄影月赛,每月从参赛作品中由专业评委选出20幅照片作为入围作品(排名不分先后),公示一周后,每月月底由评委再选出金银铜奖各一幅,各获奖金1万、5千、3千。当月点赞最多的作品颁发最具人气奖,奖金1千</p>
</li> </li>
</ul> </ul>-->
</div>
<div class="bottomBox"></div> <div class="bottomBox"></div>
</div> </div>
</div> </div>
...@@ -41,20 +45,28 @@ ...@@ -41,20 +45,28 @@
<!-- <img v-lazy="item.image" alt> --> <!-- <img v-lazy="item.image" alt> -->
<div class="pictureInfo"> <div class="pictureInfo">
<!-- <div class="text">{{item.desc}}</div> --> <!-- <div class="text">{{item.desc}}</div> -->
<div class="text">作者:{{item.nickname}}</div> <div class="text">作者:{{item.real_name}}</div>
<div class="dianzan">{{item.point_num}}</div> <div class="dianzan">{{item.point_num}}</div>
</div> </div>
</router-link> </router-link>
</li> </li>
</ul> </ul>
</div> </div>
<div class="wangqi" @click="ruweipassOpen">
<span class="qita">往期入围作品
<div id="trangle"></div>
</span>
</div>
<mt-actionsheet :actions="ruweipassTitle" v-model="ruweipass"></mt-actionsheet>
</div>
</template> </template>
<script> <script>
import axios from 'axios'; import axios from 'axios';
import CardPrize from '../../components/CardPrize'; import CardPrize from '../../components/CardPrize';
import $ from 'jquery'; import $ from 'jquery';
import { clearTimeout } from 'timers'; import { clearTimeout, clearInterval } from 'timers';
import store from '../../modules/store/index.js';
export default { export default {
data() { data() {
...@@ -62,40 +74,77 @@ export default { ...@@ -62,40 +74,77 @@ export default {
ruwei: '', ruwei: '',
ruweiPage: 1, ruweiPage: 1,
ruweiPhotoTypeActive: 0, ruweiPhotoTypeActive: 0,
ruweiList: [] ruweiList: [],
// 往期入围作品开关
ruweipass: false,
// 往期列表
ruweipassList: null,
//公告
ruweiText: null
}
},
computed: {
ruweipassTitle() {
if (this.ruweipassList) {
var arr = [];
this.ruweipassList.forEach(ele => {
var obj = {
name: ele.title,
method: this.wuweiClose(ele.activity_id),
id: ele.activity_id
};
arr.push(obj);
});
return arr;
}
} }
}, },
created() { created() {
// this.getRuweiList(); // this.getRuweiList();
this.ruweiText = store.state.ruweigonggao
}, },
mounted() { mounted() {
this.getData(); this.getData();
}, },
methods: { methods: {
async getData() { async getData(activeId) {
var data = '1' var data = '1'
while (data.length) { while (data.length) {
data = await this.getRuweiList(); data = await this.getRuweiList(activeId);
this.ruweiList.push(data); this.ruweiList.push(data);
} }
}, },
getRuweiList(type) { getRuweiList(activeId, type) {
var activeId = activeId || null;
return new Promise((reslove, reject) => { return new Promise((reslove, reject) => {
var photoType = type || 0; var photoType = type || 0;
// var photoType = 1;
axios axios
.get('/contest/selected/list', { .get('/contest/selected/list', {
params: { params: {
page: this.ruweiPage, page: this.ruweiPage,
type: photoType type: photoType,
activity_id: activeId
} }
}) })
.then(res => { .then(res => {
var arr = res.data.data.data; var arr = res.data.data.data;
var newArr = this.addSrc(arr); var newArr = this.addSrc(arr);
if (!this.ruweipassList) {
this.ruweipassList = res.data.data.activity;
}
this.ruweiText = res.data.data.memo;
// console.log(res.data.data.memo);
// store.commit('changeRuweiInfo', res.data.data.memo)
reslove(newArr); reslove(newArr);
var totalPage = Math.ceil( var totalPage = Math.ceil(
...@@ -144,6 +193,24 @@ export default { ...@@ -144,6 +193,24 @@ export default {
}); });
return arr; return arr;
}, },
ruweipassOpen() {
this.ruweipass = true;
},
wuweiClose(activeId) {
var _this = this;
let num = activeId
return function (num) {
_this.ruweiPage = 1;
_this.ruwei = '';
setTimeout(() => {
$('#ruweiBox').animate({ scrollTop: 2 }, 'slow');
}, 500);
_this.getData(num.id);
}
}
}, },
components: { components: {
CardPrize CardPrize
...@@ -151,7 +218,35 @@ export default { ...@@ -151,7 +218,35 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss">
.wangqi {
width: 100%;
height: 90px;
line-height: 90px;
text-align: center;
color: white;
background: #2358a7;
font-size: 33px;
margin-top: 60px;
position: relative;
bottom: -3px;
.qita {
position: relative;
#trangle {
height: 0;
width: 0;
border-right: 12px solid transparent;
border-bottom: 12px solid white;
border-left: 12px solid transparent;
position: absolute;
top: 46%;
right: -30px;
}
}
}
.prizeList { .prizeList {
width: 710px; width: 710px;
// height: 1450px; // height: 1450px;
......
...@@ -44,7 +44,7 @@ export default { ...@@ -44,7 +44,7 @@ export default {
created() { created() {
// this.hiddenBar(); // this.hiddenBar();
this.judgeShare() this.judgeShare()
this.getActiveInfo() // this.getActiveInfo()
// store.commit('getPublicActiveInfo'); // store.commit('getPublicActiveInfo');
// store.commit('getPublicShareInfo'); // store.commit('getPublicShareInfo');
......
...@@ -60,6 +60,8 @@ import api from '@/modules/js/api.js'; ...@@ -60,6 +60,8 @@ import api from '@/modules/js/api.js';
import tools from '@/modules/js/tools'; import tools from '@/modules/js/tools';
import $ from 'jquery';
export default { export default {
data() { data() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment