123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158 |
- <template>
- <div id="photo">
- <el-row>
- <el-col :span="24" class="top">
- <el-col :span="10">
- <el-image style="width:100%;height:40px;" :src="left"></el-image>
- </el-col>
- <el-col :span="4" class="topTitle">
- {{ title }}
- </el-col>
- <el-col :span="10">
- <el-image style="width:100%;height:40px;" :src="right"></el-image>
- </el-col>
- </el-col>
- <el-col :span="24" class="info">
- <el-col :span="24" class="list" v-loading="loading">
- <el-col :span="6" class="tujiList" v-for="(item, index) in infoList" :key="index" @click.native="turnTo(item)">
- <el-col :span="24" class="image">
- <el-image style="width:270px;height:180px;" :src="item.pic"></el-image>
- </el-col>
- <el-col :span="24" class="title">
- <p class="textOver">{{ item.title }}</p>
- </el-col>
- </el-col>
- </el-col>
- <el-col :span="24" class="link">
- <el-link :underline="false" href="http://www.dangjian.com/djw2016sy/djw2016wkztl/wkztl2016djzzwk/" class="image" target="_blank">
- <el-image style="width:285px;height:140px;" :src="link1"></el-image>
- </el-link>
- <el-link :underline="false" href="http://xuexi.12371.cn/xxhywx/" class="image" target="_blank">
- <el-image style="width:285px;height:140px;" :src="link2"></el-image>
- </el-link>
- <el-link :underline="false" href="http://www.dangjian.com/specials/" class="image" target="_blank">
- <el-image style="width:285px;height:140px;" :src="link3"></el-image>
- </el-link>
- <el-link :underline="false" href="http://dwlm.12371.cn/" class="image" target="_blank">
- <el-image style="width:285px;height:140px;" :src="link4"></el-image>
- </el-link>
- </el-col>
- </el-col>
- </el-row>
- </div>
- </template>
- <script>
- import _ from 'lodash';
- export default {
- name: 'photo',
- props: {
- tujiList: null,
- },
- components: {},
- data: () => ({
- title: '活动图集',
- left: require('@/assets/messageLeft.jpg'),
- right: require('@/assets/messageRight.jpg'),
- link1: require('@/assets/tuji5.jpg'),
- link2: require('@/assets/tuji6.jpg'),
- link3: require('@/assets/tuji7.jpg'),
- link4: require('@/assets/tuji8.jpg'),
- infoList: [],
- loading: true,
- }),
- watch: {
- tujiList: {
- handler(val) {
- if (val) this.assignData(val);
- },
- },
- },
- created() {},
- computed: {},
- methods: {
- assignData(data) {
- let infoList = _.get(data, 'children');
- this.$set(this, `infoList`, infoList);
- this.loading = false;
- },
- turnTo(item) {
- if (item.url !== undefined) {
- window.open(item.url);
- } else {
- let route = this.$route.path;
- this.$router.push({ path: `/memberDetail?id=${item.id}` });
- }
- },
- },
- };
- </script>
- <style lang="less" scoped>
- p {
- padding: 0;
- margin: 0;
- }
- .textOver {
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .top {
- height: 40px;
- line-height: 40px;
- margin: 0 0 40px 0;
- }
- .top .topTitle {
- font-size: 38px;
- color: #bd010b;
- text-align: center;
- font-weight: bold;
- font-family: '微软雅黑';
- }
- .link {
- height: 140px;
- overflow: hidden;
- }
- .link .image {
- width: 285px;
- height: 140px;
- margin: 0 15px;
- }
- .link .image:last-child {
- margin: 0 0 0 15px;
- }
- .list {
- margin: 0 0 40px 0;
- }
- .tujiList {
- width: 270px;
- height: 210px;
- overflow: hidden;
- margin: 0px 25px 0 25px;
- }
- .tujiList:last-child {
- margin: 0px 0 0 25px;
- }
- .tujiList .image {
- width: 270px;
- height: 180px;
- overflow: hidden;
- }
- .tujiList .title {
- height: 30px;
- line-height: 30px;
- padding: 0 10px;
- text-align: center;
- }
- .tujiList .title p {
- font-size: 16px;
- color: #333;
- }
- .tujiList:hover {
- cursor: pointer;
- }
- .tujiList:hover .title p {
- color: #bd010b;
- }
- </style>
|