123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- <template>
- <view class="container my-message">
- <view v-if="haveData">
- <view class="global_card_content collect-item" v-for="(item, index) in messageList" :key="index" @click="goDetail(item)">
- <view class="item-row">
- <text class="item-content-title">留言内容:</text>
- <text>{{ item.Content }}</text>
- </view>
- <view class="item-title">
- <view class="item-row">
- <text class="item-content-title">留言对象:</text>
- <text class="item-content-text">{{ item.Title }}</text>
- </view>
- </view>
- <text class="time">{{ dateFormatterHandler(item.CreateTime) }}</text>
- </view>
- </view>
- <view class="nodata" v-else>
- <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/act_search.png" mode="" class="nodata_ico"></image>
- <text>暂时没有留言的内容</text>
- </view>
- <Loading />
- </view>
- </template>
- <script>
- import { User } from "@/config/api.js";
- import { dateFormatter } from "@/config/util.js";
- export default {
- data() {
- return {
- messageList: [],
- haveData: true,
- };
- },
- methods: {
- // 获取数据
- async getList() {
- const res = await User.commentListMessage();
- if (res.Ret === 200) {
- this.messageList = res.Data.List || [];
- this.haveData = this.messageList.length ? true : false;
- }
- },
- // 去往详情
- goDetail(item) {
- this.$store.commit("setRouterActivity", "我的留言");
- this.$store.commit("setRouterReport", "我的留言");
- if (item.IsRoadShow) {
- //跳转路演精华
- uni.navigateTo({
- url: "/reportPages/roadEssence/roadEssence?id=" + item.ArticleId,
- });
- } else if (item.RedirectType == 1) {
- uni.navigateTo({
- url: "/pageMy/reportDetail/reportDetail?id=" + item.ArticleId,
- });
- } else if (item.RedirectType == 2) {
- uni.navigateTo({
- url: "/activityPages/activityDetail/activityDetail?id=" + item.ActivityId,
- });
- } else {
- uni.navigateTo({
- url: "/reportPages/IndustryReport/IndustryReport?id=" + item.IndustryId,
- });
- }
- },
- // 处理时间
- dateFormatterHandler(val) {
- return dateFormatter(val, true);
- },
- },
- onLoad() {
- this.getList();
- },
- };
- </script>
- <style lang="scss" scoped>
- .my-message {
- background: $uni-bg-color;
- padding: 20rpx 30rpx;
- .collect-item {
- border-top: 4rpx solid #376cbb;
- padding: 30rpx 30rpx;
- background: #fff;
- margin-bottom: 20rpx;
- }
- .item-row {
- font-size: 28rpx;
- color: #333;
- margin-bottom: 20rpx;
- border-radius: 4rpx;
- .item-content-title {
- font-size: 28rpx;
- color: #999;
- line-height: 36rpx;
- margin-bottom: 10rpx;
- }
- .item-content-text {
- font-weight: 500;
- color: $uni-color-new;
- }
- }
- .item-title {
- padding-top: 20rpx;
- }
- .time {
- text-align: right;
- font-size: 22rpx;
- color: #999;
- }
- }
- </style>
|