|
@@ -1,23 +1,19 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div class="home_page">
|
|
<div class="home_page">
|
|
|
- <div class="title">
|
|
|
|
|
- <span>咨询列表</span>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div>
|
|
|
|
|
- <div
|
|
|
|
|
- v-for="(item, index) of 6"
|
|
|
|
|
- :key="index"
|
|
|
|
|
- class="li"
|
|
|
|
|
- >
|
|
|
|
|
- <div class="li_top">
|
|
|
|
|
- <div class="li_left">
|
|
|
|
|
- <span>标题</span>
|
|
|
|
|
- <span class="hint">作者</span>
|
|
|
|
|
|
|
+ <div class="list">
|
|
|
|
|
+ <div class="li" v-for="(i,key) of list" :key="key">
|
|
|
|
|
+ <div class="li-left">
|
|
|
|
|
+ <span class="title">{{i.title}}</span>
|
|
|
|
|
+ <div class="bottom">
|
|
|
|
|
+ <span>{{i.author || '数字茶商'}}</span>
|
|
|
|
|
+ <span>{{ $day(i.publish_time * 1000).format('MM-DD') }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
- <!-- <img src="@/assets/img/rightArrows.png" class="li_img" /> -->
|
|
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="text">
|
|
|
|
|
- <span>我是测试啊</span>
|
|
|
|
|
|
|
+ <div class="li-right">
|
|
|
|
|
+ <image
|
|
|
|
|
+ class="gg_img"
|
|
|
|
|
+ :src="i.thumb"
|
|
|
|
|
+ ></image>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -29,115 +25,92 @@ import { post } from "@/request/api.js";
|
|
|
export default {
|
|
export default {
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- noticeList: [],
|
|
|
|
|
- page: 1,
|
|
|
|
|
- pageSize: 10, //页数
|
|
|
|
|
- totalPage: 0, //总页数
|
|
|
|
|
- loading: false,
|
|
|
|
|
- finished: false,
|
|
|
|
|
|
|
+ list:[]
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- //跳转
|
|
|
|
|
- init() {
|
|
|
|
|
- if (this.account) {
|
|
|
|
|
- this.getNoticeList();
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- getNoticeList() {
|
|
|
|
|
|
|
+ init(){
|
|
|
let data = {
|
|
let data = {
|
|
|
- page: this.page,
|
|
|
|
|
- page_size: this.pageSize,
|
|
|
|
|
- };
|
|
|
|
|
- basicApi.noticeList(data).then((res) => {
|
|
|
|
|
- if (res.code == 200) {
|
|
|
|
|
- this.noticeList = this.noticeList.concat(res.data.list);
|
|
|
|
|
- this.totalPage = Math.ceil(res.data.total_count / this.pageSize);
|
|
|
|
|
- this.page++;
|
|
|
|
|
- this.loading = false;
|
|
|
|
|
- if (this.page > this.totalPage) return (this.finished = true);
|
|
|
|
|
- } else {
|
|
|
|
|
- this.$toast(res.msg);
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
- switchovers(route, item) {
|
|
|
|
|
- if (route == "") return this.$toast(this.$t("lang.swap109"));
|
|
|
|
|
- this.$router.push({ name: route, query: { item: JSON.stringify(item) } });
|
|
|
|
|
- // this.$Router.pushPage({
|
|
|
|
|
- // name: route
|
|
|
|
|
- // })
|
|
|
|
|
- },
|
|
|
|
|
- },
|
|
|
|
|
- computed: {
|
|
|
|
|
- ...mapState(["account"]),
|
|
|
|
|
- },
|
|
|
|
|
- created() {
|
|
|
|
|
- this.init();
|
|
|
|
|
|
|
+ is_index:0
|
|
|
|
|
+ }
|
|
|
|
|
+ post('/notice',data).then(res => {
|
|
|
|
|
+ if(res.code === 0){
|
|
|
|
|
+ this.list = res.data.data
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
- watch: {
|
|
|
|
|
- account() {
|
|
|
|
|
- this.init();
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ onLoad(option) {
|
|
|
|
|
+ this.init()
|
|
|
},
|
|
},
|
|
|
|
|
+ computed: {},
|
|
|
|
|
+ created() {},
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
.home_page {
|
|
.home_page {
|
|
|
padding: 20px;
|
|
padding: 20px;
|
|
|
-}
|
|
|
|
|
-.title {
|
|
|
|
|
- color: #fff;
|
|
|
|
|
- margin: 20px 0;
|
|
|
|
|
-}
|
|
|
|
|
-.li {
|
|
|
|
|
- background: #232b3e;
|
|
|
|
|
- border-radius: 8px;
|
|
|
|
|
- padding: 10px;
|
|
|
|
|
- margin-bottom: 20px;
|
|
|
|
|
- .li_top {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- justify-content: space-between;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- border-bottom: 1px solid #2a272a;
|
|
|
|
|
- padding-bottom: 10px;
|
|
|
|
|
- .li_left {
|
|
|
|
|
|
|
+ .list {
|
|
|
|
|
+ // margin-top: 20px;
|
|
|
|
|
+ .li {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
- flex-direction: column;
|
|
|
|
|
- font-size: 14px;
|
|
|
|
|
- color: #fff;
|
|
|
|
|
- .hint {
|
|
|
|
|
- color: #999;
|
|
|
|
|
- font-size: 12px;
|
|
|
|
|
- margin-top: 6px;
|
|
|
|
|
|
|
+ flex-direction: row;
|
|
|
|
|
+ background: #fafafa;
|
|
|
|
|
+ box-shadow: 0px 2px 50px 0px rgba(0, 0, 0, 0.08);
|
|
|
|
|
+ border-radius: 8px 8px 8px 8px;
|
|
|
|
|
+ opacity: 1;
|
|
|
|
|
+ border: 1px solid #dddddd;
|
|
|
|
|
+ margin-top: 20px;
|
|
|
|
|
+ // border-image: linear-gradient(
|
|
|
|
|
+ // 135deg,
|
|
|
|
|
+ // rgba(41.00000135600567, 121.00000038743019, 255, 1),
|
|
|
|
|
+ // rgba(255, 170.39100408554077, 178.8549891114235, 1)
|
|
|
|
|
+ // )
|
|
|
|
|
+ // 1 1;
|
|
|
|
|
+ padding: 10rpx;
|
|
|
|
|
+ .li-left {
|
|
|
|
|
+ flex: 3;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ // background: red;
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+ align-items: flex-start;
|
|
|
|
|
+ padding: 0 10px;
|
|
|
|
|
+ .title {
|
|
|
|
|
+ font-size: 28rpx;
|
|
|
|
|
+ color: #1b1a1a;
|
|
|
|
|
+ font-family: "SourceHanSansCN-Bold";
|
|
|
|
|
+ font-weight: bold;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .bottom {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ // background-color: red;
|
|
|
|
|
+ margin-top: 50rpx;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: row;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+ span {
|
|
|
|
|
+ font-size: 20rpx;
|
|
|
|
|
+ font-weight: normal;
|
|
|
|
|
+ color: #999999;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .li-right {
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ padding: 5px;
|
|
|
|
|
+ .gg_img {
|
|
|
|
|
+ width: 237rpx;
|
|
|
|
|
+ height: 166rpx;
|
|
|
|
|
+ border-radius: 8px 8px 8px 8px;
|
|
|
|
|
+ // background: red;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- .li_img {
|
|
|
|
|
- width: 10px;
|
|
|
|
|
- height: 10px;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- .text {
|
|
|
|
|
- color: #999;
|
|
|
|
|
-
|
|
|
|
|
- font-size: 12px;
|
|
|
|
|
- margin-top: 10px;
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-.bare {
|
|
|
|
|
- position: fixed;
|
|
|
|
|
- top: 50%;
|
|
|
|
|
- left: 50%;
|
|
|
|
|
- transform: translateX(-50%) translateY(-50%);
|
|
|
|
|
- display: flex;
|
|
|
|
|
- flex-direction: column;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- font-size: 14px;
|
|
|
|
|
- padding: 40px 0;
|
|
|
|
|
- .bare_img {
|
|
|
|
|
- width: 120px;
|
|
|
|
|
- height: 100px;
|
|
|
|
|
- margin-bottom: 8px;
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|