|
@@ -6,10 +6,25 @@
|
|
|
:userBg="'rgba(0, 0, 0, 0.24)'"
|
|
|
:LoginNavIndex="4"
|
|
|
/>
|
|
|
- <ul class="option">
|
|
|
+ <!-- <ul class="option">
|
|
|
<li class="option-item" :class="[typeValue===indexo?'active':'']" v-for="(itemo,indexo) in optionList" :key="indexo" @click="handleClick(indexo)">
|
|
|
<span>{{itemo.label}}</span>
|
|
|
</li>
|
|
|
+ </ul> -->
|
|
|
+ <div class="content-top">
|
|
|
+ <img src="../../assets/reporter-logo.png" />
|
|
|
+ <el-input
|
|
|
+ placeholder="搜索"
|
|
|
+ v-model="searchInput" maxlength="100">
|
|
|
+ <i slot="suffix" class="el-input__icon el-icon-search" @click="getData(1)" style="cursor: pointer;"></i>
|
|
|
+ </el-input>
|
|
|
+ <!-- <span></span> -->
|
|
|
+ <el-button type="primary" @click="changePublist" size="small">发布</el-button>
|
|
|
+ </div>
|
|
|
+ <ul>
|
|
|
+ <li class="label-item" :class="[labelActiveIndex===indexL?'active':'']" v-for="(itemL,indexL) in labelList" :key="indexL" @click="changeLabelIndex(indexL)">
|
|
|
+ # {{itemL}}
|
|
|
+ </li>
|
|
|
</ul>
|
|
|
<div class="waterfall">
|
|
|
<vue-waterfall-easy
|
|
@@ -17,9 +32,45 @@
|
|
|
:imgsArr="imgsArr"
|
|
|
@scrollReachBottom="getData"
|
|
|
>
|
|
|
- <div class="info" slot-scope="props">第{{ props.index + 1 }}张图片</div>
|
|
|
+ <div class="info" slot-scope="props">
|
|
|
+ <el-image class="image"
|
|
|
+ :src="props.value.cover_img_url"
|
|
|
+ :fit="'cover'"
|
|
|
+ :style="'width:246px;height:180px;border-radius: 8px;'">
|
|
|
+ <div slot="placeholder" class="image-slot" :style="'line-height:130px'">
|
|
|
+ 加载中<span class="dot">...</span>
|
|
|
+ </div>
|
|
|
+ </el-image>
|
|
|
+ <h3>{{props.value.art_title}}</h3>
|
|
|
+ <!-- <p>{{props.value.art_content}}</p> -->
|
|
|
+ <p>鼓浪屿实行最大承载量控制,每天最高5万人次,其中,游客3.5万人次,市民1.5万人次。鼓浪屿派出所出动无人机开展高空巡查,对重点区域动态监测客流,靠前化解风险隐患,守护群众安全。</p>
|
|
|
+ <div class="creator-info">
|
|
|
+ <el-image
|
|
|
+ :src="props.value.creator_img_url?props.value.creator_img_url:require('../../assets/avatar.png')"
|
|
|
+ fit="cover" style="width:24px;height:24px;margin-right: 12px;">
|
|
|
+ </el-image>
|
|
|
+ <span class="name">{{props.value.creator_name}}</span>
|
|
|
+ <div class="ding-box">
|
|
|
+ <svg-icon icon-class="like-line" className="chat"></svg-icon>
|
|
|
+ <span>{{props.value.ding_count}}</span>
|
|
|
+ <svg-icon icon-class="chat-line" className="chat"></svg-icon>
|
|
|
+ <span>{{props.value.comment_count}}</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div slot="waterfall-over"></div>
|
|
|
</vue-waterfall-easy>
|
|
|
</div>
|
|
|
+ <el-dialog
|
|
|
+ :visible.sync="publishFlag"
|
|
|
+ :show-close="false"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ width="800px"
|
|
|
+ :modal="false"
|
|
|
+ class="login-dialog publish-report-box"
|
|
|
+ v-if="publishFlag">
|
|
|
+ <publish-report @closeDialog="closeDialog"></publish-report>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -29,9 +80,10 @@
|
|
|
import Header from "../../components/Header.vue";
|
|
|
import vueWaterfallEasy from "vue-waterfall-easy";
|
|
|
import { getLogin } from "@/api/ajax";
|
|
|
+import PublishReport from "./components/PublishReport.vue"
|
|
|
export default {
|
|
|
//import引入的组件需要注入到对象中才能使用
|
|
|
- components: { Header, vueWaterfallEasy },
|
|
|
+ components: { Header, vueWaterfallEasy, PublishReport },
|
|
|
props: {},
|
|
|
data() {
|
|
|
//这里存放数据
|
|
@@ -64,7 +116,11 @@ export default {
|
|
|
imgsArr: [],
|
|
|
page: 0,
|
|
|
pageSize: 50,
|
|
|
- pageNumber: 1
|
|
|
+ pageNumber: 1,
|
|
|
+ publishFlag: false, // 发布弹窗
|
|
|
+ searchInput: '',
|
|
|
+ labelList:['中英双语','少儿必读','3-6 岁'],
|
|
|
+ labelActiveIndex: null
|
|
|
}
|
|
|
},
|
|
|
//计算属性 类似于data概念
|
|
@@ -79,7 +135,7 @@ export default {
|
|
|
this.typeValue = value
|
|
|
|
|
|
},
|
|
|
- getData() {
|
|
|
+ getData(page) {
|
|
|
// var list = [
|
|
|
// {
|
|
|
// src:
|
|
@@ -160,22 +216,46 @@ export default {
|
|
|
// } else {
|
|
|
// this.imgsArr = this.imgsArr.concat(list);
|
|
|
// }
|
|
|
+ if(page){
|
|
|
+ this.pageNumber = page
|
|
|
+ this.imgsArr = []
|
|
|
+ }
|
|
|
let MethodName = "/PaperServer/Client/Xjz/XjzArticleList";
|
|
|
let data = {
|
|
|
page_capacity:this.pageSize,
|
|
|
- cur_page:this.pageNumber
|
|
|
+ cur_page:this.pageNumber,
|
|
|
+ art_tag: this.labelActiveIndex!==null?this.labelList[this.labelActiveIndex]:''
|
|
|
}
|
|
|
getLogin(MethodName, data)
|
|
|
.then((res) => {
|
|
|
if(res.status===1){
|
|
|
+ this.labelList = res.tags
|
|
|
+ this.imgsArr = this.imgsArr.concat(res.data.list);
|
|
|
if (this.pageNumber === res.data.total_page ) {
|
|
|
this.$refs.waterfall.waterfallOver();
|
|
|
} else {
|
|
|
- this.imgsArr = this.imgsArr.concat(res.data.list);
|
|
|
+ this.pageNumber ++
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 点击发布按钮
|
|
|
+ changePublist(){
|
|
|
+ this.publishFlag = true
|
|
|
+ },
|
|
|
+ // 点击label
|
|
|
+ changeLabelIndex(index){
|
|
|
+ if(this.labelActiveIndex === index){
|
|
|
+ this.labelActiveIndex = null
|
|
|
+ }else{
|
|
|
+ this.labelActiveIndex = index
|
|
|
+ }
|
|
|
+ this.getData(1)
|
|
|
+ },
|
|
|
+ closeDialog(){
|
|
|
+ this.publishFlag = false
|
|
|
+ this.getData(1)
|
|
|
+ }
|
|
|
},
|
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
|
created() {
|
|
@@ -183,6 +263,15 @@ export default {
|
|
|
//生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
mounted() {
|
|
|
this.getData();
|
|
|
+ let _this = this
|
|
|
+ let input = document.querySelector('input');
|
|
|
+ input.addEventListener('keyup', function(event) {
|
|
|
+ // 判断是否按下回车键
|
|
|
+ if (event.keyCode === 13) {
|
|
|
+ // 回车键被按下,执行你想要的操作
|
|
|
+ _this.getData(1)
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
//生命周期-创建之前
|
|
|
beforeCreated() { },
|
|
@@ -203,161 +292,289 @@ export default {
|
|
|
<style lang="scss" scoped>
|
|
|
/* @import url(); 引入css类 */
|
|
|
.reporter {
|
|
|
- background: #F7F8FA;
|
|
|
- height: calc(100vh - 64px);
|
|
|
- .option{
|
|
|
- list-style: none;
|
|
|
- display: flex;
|
|
|
- justify-content: center;
|
|
|
- margin: 0;
|
|
|
- padding: 0;
|
|
|
- background: #17171A;
|
|
|
- li{
|
|
|
+ background: #F7F8FA;
|
|
|
+ height: calc(100vh - 64px);
|
|
|
+ .option{
|
|
|
+ list-style: none;
|
|
|
display: flex;
|
|
|
- align-items: center;
|
|
|
- border-radius: 30px;
|
|
|
- height: 36px;
|
|
|
- padding: 7px 20px;
|
|
|
- margin: 8px 4px;
|
|
|
- cursor: pointer;
|
|
|
- &:hover{
|
|
|
- background: rgba(255, 255, 255, 0.08);
|
|
|
- }
|
|
|
- &.active{
|
|
|
- background: rgba(255, 255, 255, 0.08);
|
|
|
- .icon-img,span,b{
|
|
|
- color: rgba(255, 255, 255, 0.9);
|
|
|
+ justify-content: center;
|
|
|
+ margin: 0;
|
|
|
+ padding: 0;
|
|
|
+ background: #17171A;
|
|
|
+ li{
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ border-radius: 30px;
|
|
|
+ height: 36px;
|
|
|
+ padding: 7px 20px;
|
|
|
+ margin: 8px 4px;
|
|
|
+ cursor: pointer;
|
|
|
+ &:hover{
|
|
|
+ background: rgba(255, 255, 255, 0.08);
|
|
|
+ }
|
|
|
+ &.active{
|
|
|
+ background: rgba(255, 255, 255, 0.08);
|
|
|
+ .icon-img,span,b{
|
|
|
+ color: rgba(255, 255, 255, 0.9);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .icon-img{
|
|
|
+ width: 14px;
|
|
|
+ height: 14px;
|
|
|
+ margin: 1px 8px 0 0;
|
|
|
+ color: rgba(255, 255, 255, 0.5);
|
|
|
+ }
|
|
|
+ span{
|
|
|
+ color: rgba(255, 255, 255, 0.5);
|
|
|
+ font-size: 14px;
|
|
|
+ line-height: 22px;
|
|
|
+ }
|
|
|
+ b{
|
|
|
+ font-weight: 400;
|
|
|
+ font-size: 14px;
|
|
|
+ line-height: 22px;
|
|
|
+ color: rgba(255, 255, 255, 0.5);
|
|
|
+ margin-left: 5px;
|
|
|
}
|
|
|
- }
|
|
|
- .icon-img{
|
|
|
- width: 14px;
|
|
|
- height: 14px;
|
|
|
- margin: 1px 8px 0 0;
|
|
|
- color: rgba(255, 255, 255, 0.5);
|
|
|
- }
|
|
|
- span{
|
|
|
- color: rgba(255, 255, 255, 0.5);
|
|
|
- font-size: 14px;
|
|
|
- line-height: 22px;
|
|
|
- }
|
|
|
- b{
|
|
|
- font-weight: 400;
|
|
|
- font-size: 14px;
|
|
|
- line-height: 22px;
|
|
|
- color: rgba(255, 255, 255, 0.5);
|
|
|
- margin-left: 5px;
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- .main {
|
|
|
- width: 1200px;
|
|
|
- margin: 0 auto;
|
|
|
- padding: 24px 0 0 0;
|
|
|
- .searchChangebox{
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- .searchChange-box{
|
|
|
+ .main {
|
|
|
+ width: 1200px;
|
|
|
+ margin: 0 auto;
|
|
|
+ padding: 24px 0 0 0;
|
|
|
+ .searchChangebox{
|
|
|
display: flex;
|
|
|
- }
|
|
|
- .searchChange {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
justify-content: space-between;
|
|
|
- padding: 4px 12px;
|
|
|
- height: 32px;
|
|
|
- margin-right: 16px;
|
|
|
- border: 1px solid #E5E6EB;
|
|
|
- border-radius: 20px;
|
|
|
- &.active{
|
|
|
- background: #175DFF;
|
|
|
+ .searchChange-box{
|
|
|
+ display: flex;
|
|
|
+ }
|
|
|
+ .searchChange {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ padding: 4px 12px;
|
|
|
+ height: 32px;
|
|
|
+ margin-right: 16px;
|
|
|
+ border: 1px solid #E5E6EB;
|
|
|
+ border-radius: 20px;
|
|
|
+ &.active{
|
|
|
+ background: #175DFF;
|
|
|
+ > span{
|
|
|
+ color: #FFFFFF;
|
|
|
+ }
|
|
|
+ .sort {
|
|
|
+ > div {
|
|
|
+ svg{
|
|
|
+ color: #5E89EF;
|
|
|
+ &.active{
|
|
|
+ color: #FFFFFF;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
> span{
|
|
|
- color: #FFFFFF;
|
|
|
+ font-weight: 400;
|
|
|
+ font-size: 16px;
|
|
|
+ line-height: 22px;
|
|
|
+ color: #000;
|
|
|
+ margin-right: 4px;
|
|
|
}
|
|
|
.sort {
|
|
|
+ cursor: pointer;
|
|
|
+ height: 20px;
|
|
|
> div {
|
|
|
- svg{
|
|
|
- color: #5E89EF;
|
|
|
- &.active{
|
|
|
- color: #FFFFFF;
|
|
|
+ font-size: 0;
|
|
|
+ svg {
|
|
|
+ width: 11px;
|
|
|
+ height: 11px;
|
|
|
+ color: #C2C2C2;
|
|
|
+ padding: 3px 2px 2px 2px;
|
|
|
+ &.icon-down{
|
|
|
+ height: 9px;
|
|
|
+ padding: 0 2px 2px 2px;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- > span{
|
|
|
+ .input-search{
|
|
|
+ width: 220px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .show-title{
|
|
|
+ color: #1F2C5C;
|
|
|
+ margin: 24px 0 0 0;
|
|
|
+ font-weight: 500;
|
|
|
+ font-size: 24px;
|
|
|
+ line-height: 32px;
|
|
|
+ b{
|
|
|
+ margin-left: 16px;
|
|
|
+ color: #ED5F00;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .list {
|
|
|
+ margin-top: 28px;
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ height: calc(100vh - 256px);
|
|
|
+ overflow-y: scroll;
|
|
|
+ &::-webkit-scrollbar {
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+ > div {
|
|
|
+ width: 200px;
|
|
|
+ border-radius: 8px;
|
|
|
+ overflow: hidden;
|
|
|
+ background: #ffffff;
|
|
|
+ margin-bottom: 24px;
|
|
|
+ }
|
|
|
+ .tips{
|
|
|
+ width: 100%;
|
|
|
+ text-align: center;
|
|
|
+ font-size: 12px;
|
|
|
+ color: #929CA8;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .waterfall {
|
|
|
+ position: absolute;
|
|
|
+ top: 216px;
|
|
|
+ bottom: 0;
|
|
|
+ left: 0;
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+ .info {
|
|
|
+ text-align: center;
|
|
|
+ font-size: 0;
|
|
|
+ h3{
|
|
|
+ margin: 8px 0;
|
|
|
+ overflow: hidden;
|
|
|
+ color: #000;
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: 500;
|
|
|
+ line-height: 22px;
|
|
|
+ word-break: break-word;
|
|
|
+ display: -webkit-box;
|
|
|
+ -webkit-box-orient: vertical;
|
|
|
+ -webkit-line-clamp: 2;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ overflow: hidden;
|
|
|
+ text-align: left;
|
|
|
+ padding: 0 8px;
|
|
|
+ }
|
|
|
+ >p{
|
|
|
+ color: rgba(0, 0, 0, 0.65);
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: 400;
|
|
|
+ line-height: 22px;
|
|
|
+ word-break: break-word;
|
|
|
+ display: -webkit-box;
|
|
|
+ -webkit-box-orient: vertical;
|
|
|
+ -webkit-line-clamp: 2;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ overflow: hidden;
|
|
|
+ text-align: left;
|
|
|
+ padding: 0 8px;
|
|
|
+ margin: 0 0 8px 0;
|
|
|
+ }
|
|
|
+ .creator-info{
|
|
|
+ text-align: left;
|
|
|
+ padding: 0 8px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ >span{
|
|
|
+ color: #2F3742;
|
|
|
+ font-size: 14px;
|
|
|
font-weight: 400;
|
|
|
- font-size: 16px;
|
|
|
line-height: 22px;
|
|
|
- color: #000;
|
|
|
- margin-right: 4px;
|
|
|
+ flex: 1;
|
|
|
+ overflow: hidden;
|
|
|
}
|
|
|
- .sort {
|
|
|
- cursor: pointer;
|
|
|
- height: 20px;
|
|
|
- > div {
|
|
|
- font-size: 0;
|
|
|
- svg {
|
|
|
- width: 11px;
|
|
|
- height: 11px;
|
|
|
- color: #C2C2C2;
|
|
|
- padding: 3px 2px 2px 2px;
|
|
|
- &.icon-down{
|
|
|
- height: 9px;
|
|
|
- padding: 0 2px 2px 2px;
|
|
|
- }
|
|
|
+ .ding-box{
|
|
|
+ color: rgba(0, 0, 0, 0.30);
|
|
|
+ font-size: 12px;
|
|
|
+ font-weight: 400;
|
|
|
+ line-height: 20px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ .svg-icon{
|
|
|
+ width: 16px;
|
|
|
+ height: 16px;
|
|
|
+ &.chat{
|
|
|
+ color: rgba(0, 0, 0, 0.65);
|
|
|
}
|
|
|
}
|
|
|
+ span{
|
|
|
+ margin: 0 8px 0 3px;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- .input-search{
|
|
|
- width: 220px;
|
|
|
- }
|
|
|
- }
|
|
|
- .show-title{
|
|
|
- color: #1F2C5C;
|
|
|
- margin: 24px 0 0 0;
|
|
|
- font-weight: 500;
|
|
|
- font-size: 24px;
|
|
|
- line-height: 32px;
|
|
|
- b{
|
|
|
- margin-left: 16px;
|
|
|
- color: #ED5F00;
|
|
|
- }
|
|
|
}
|
|
|
- .list {
|
|
|
- margin-top: 28px;
|
|
|
+ .content-top{
|
|
|
display: flex;
|
|
|
- flex-wrap: wrap;
|
|
|
- height: calc(100vh - 256px);
|
|
|
- overflow-y: scroll;
|
|
|
- &::-webkit-scrollbar {
|
|
|
- display: none;
|
|
|
+ justify-content: space-between;
|
|
|
+ padding: 32px 0;
|
|
|
+ max-width: 1440px;
|
|
|
+ margin: 0 auto;
|
|
|
+ >img{
|
|
|
+ height: 32px;
|
|
|
}
|
|
|
- > div {
|
|
|
- width: 200px;
|
|
|
- border-radius: 8px;
|
|
|
- overflow: hidden;
|
|
|
- background: #ffffff;
|
|
|
- margin-bottom: 24px;
|
|
|
+ .el-input{
|
|
|
+ width: 480px;
|
|
|
+ border-radius: 40px;
|
|
|
+ background: #FFF;
|
|
|
}
|
|
|
- .tips{
|
|
|
- width: 100%;
|
|
|
+ .el-button{
|
|
|
+ width: 108px;
|
|
|
text-align: center;
|
|
|
+ border-radius: 40px;
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ul{
|
|
|
+ padding: 0;
|
|
|
+ max-width: 1440px;
|
|
|
+ margin: 0 auto;
|
|
|
+ display: flex;
|
|
|
+ li.label-item{
|
|
|
+ padding: 4px 12px;
|
|
|
+ border-radius: 20px;
|
|
|
+ margin-right: 8px;
|
|
|
+ cursor: pointer;
|
|
|
+ color: #787878;
|
|
|
font-size: 12px;
|
|
|
- color: #929CA8;
|
|
|
+ font-weight: 400;
|
|
|
+ line-height: 20px;
|
|
|
+ &.active{
|
|
|
+ background: #ECECEC;
|
|
|
+ color: #000000;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- .waterfall {
|
|
|
- position: absolute;
|
|
|
- top: 116px;
|
|
|
- bottom: 0;
|
|
|
- left: 0;
|
|
|
- width: 100%;
|
|
|
+}
|
|
|
+</style>
|
|
|
+<style lang="scss">
|
|
|
+.reporter {
|
|
|
+ .el-input__inner{
|
|
|
+ border-radius: 40px;
|
|
|
+ border: none;
|
|
|
}
|
|
|
-
|
|
|
- .info {
|
|
|
- text-align: center;
|
|
|
+}
|
|
|
+.publish-report-box{
|
|
|
+ .el-dialog__body{
|
|
|
+ padding: 24px;
|
|
|
+ }
|
|
|
+}
|
|
|
+.vue-waterfall-easy{
|
|
|
+ width: 1440px !important;
|
|
|
+ margin-left: -720px !important;
|
|
|
+ .img-inner-box{
|
|
|
+ box-shadow: none !important;
|
|
|
+ }
|
|
|
+ .img-box{
|
|
|
+ padding: 12px !important;
|
|
|
+ width: 270px !important;
|
|
|
}
|
|
|
}
|
|
|
</style>
|