123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- <template>
- <view class="container ask-container">
- <view v-if="haveData">
- <view class="global_card_content collect-item" v-for="(item, index) in askList" :key="index" @click="goDetail(item)">
- <view class="item-row">
- <text class="item-content-title">问题内容:</text>
- <text class="global_title">{{ item.Content }}</text>
- </view>
- <view class="item-title">
- <view class="item-row">
- <text class="item-content-title">相关{{ item.AskType == "Activity" ? "活动" : "报告" }}:</text>
- <text class="item-content-text">{{ item.Title }}</text>
- </view>
- </view>
- <text class="time">{{ 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>
- <freeCharge class="free-charge" :isShowFreeBtn="isShowFree" />
- <Loading />
- </view>
- </template>
- <script>
- import { User } from "@/config/api.js";
- import freeCharge from "@/components/freeCharge";
- export default {
- components: {
- freeCharge,
- },
- data() {
- return {
- askList: [],
- haveData: true,
- };
- },
- methods: {
- async getAsk() {
- const res = await User.getAskList();
- if (res.Ret === 200) {
- this.haveData = res.Data.List ? true : false;
- this.askList = res.Data.List || [];
- }
- },
- goDetail(item) {
- item.AskType == "Activity"
- ? uni.navigateTo({
- url: "/activityPages/activityDetail/activityDetail?id=" + item.ReportOrActivityId,
- })
- : uni.navigateTo({
- url: "/pageMy/reportDetail/reportDetail?id=" + item.ReportOrActivityId,
- });
- },
- },
- onLoad() {
- this.$store.commit("setRouterActivity", "活动提问");
- this.$store.commit("setRouterReport", "活动提问");
- this.getAsk();
- },
- };
- </script>
- <style lang="scss" scoped>
- .ask-container {
- 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>
|