123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299 |
- <template>
- <block>
- <view class="container special-research" v-if="isUserBindingPhoneNumber">
- <view class="top-notice">
- <view class="notice">
- <van-notice-bar color="#E37318" background="#FFF1E9" :text="wholeShowListData.ActivitySpecialExplain" />
- </view>
- <view class="notice-right">
- <view :class="['inform-btn', specialIsFollow && 'inform-follow']" @click="specialFollow">{{ specialIsFollow ? "取消通知" : "新调研通知" }}</view>
- </view>
- </view>
- <!-- 活动列表 -->
- <view>
- <view class="collect-ul">
- <view class="collect-ltem global_card_content" v-for="(item, index) in collectList" :key="index">
- <view class="reminder-item">
- <image v-if="item.TripStatus == 1" class="item" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/Ybm.png"></image>
- <image v-if="item.TripStatus == 2" class="item" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/trip_icon.png"></image>
- <image v-if="item.Explain" @click="reminderTextHandler(item)" class="reminder" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/error-circle-filled.png"></image>
- </view>
- <view class="title-date" @click="goDetail(item)">
- <text :class="item.SpecialType == 1 ? '' : 'xianxia'">{{ item.SpecialType == 1 ? "线上" : "线下" }}</text>
- <view class="city-img" v-if="item.City">
- <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/position.png"></image>
- {{ item.City }}
- </view>
- </view>
- <view class="item-li">
- <view class="item-img" @click="goDetail(item)">
- <image :src="item.ImgUrl"> </image>
- <image v-if="item.ActiveState == 1" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/not_started_activity.png" class="img-status"></image>
- <image v-else-if="item.ActiveState == 2" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/in_progress_activity.png" class="img-status"></image>
- <image v-else-if="item.ActiveState == 0 && item.TripStatus == 2" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/end_activity.png" class="img-status"></image>
- </view>
- <view class="item">
- <view class="item-text" @click="goDetail(item)">
- <text class="activity-title"> {{ item.ResearchTheme }} </text>
- <view style="display: flex" class="global_activity_content text_twoLine" v-if="item.TripStatus == 2">
- <text style="flex-shrink: 0"> 活动时间:</text>
- <text> {{ item.ActivityTimeTextByDay }}</text>
- </view>
- <text class="global_activity_content text_twoLine" v-else>预期时间:{{ item.ActivityTimeText }} </text>
- </view>
- <view class="bottom-box">
- <view class="" style="width: 130rpx"> </view>
- <text @click="lookImg(item)">行程安排</text>
- <block v-if="item.TripStatus == 2">
- <text v-if="item.ActiveState == 1" class="button" @click="applyOfcancel(item)">{{ item.IsTrip == 0 ? "我要报名" : "取消报名" }}</text>
- </block>
- <block v-else>
- <text class="button" v-if="item.IsSignup !== 1" @click="interest(item)">感兴趣</text>
- <text class="button" @click="beNotInterested(item)" v-else>已预报名</text>
- </block>
- </view>
- </view>
- </view>
- </view>
- <u-loadmore :status="status" icon-type="flower" :load-text="loadText" margin-top="20" v-if="totalPage > 1" />
- </view>
- <view class="select-box"> </view>
- <!-- 所有自定义弹框 -->
- </view>
- <freeCharge class="free-charge" :isShowFreeBtn="isShowFree" />
- <u-modal
- v-model="specialGoFollowShow"
- :content-style="{ fontSize: '32rpx' }"
- :show-cancel-button="show_cancel_button"
- confirm-text="知道了"
- :show-confirm-button="show_confirm_button"
- :show-title="false"
- :cancel-style="{ borderRight: '1rpx solid #EBEBEB' }"
- :confirm-style="{ fontWeight: '700' }"
- :mask-close-able="specialIsHintShow"
- @confirm="ininModalHandler"
- @cancel="ininModalHandler"
- >
- <view class="slot-content">
- <block v-if="specialPopupMsg">
- <text>{{ specialAccounts }}</text>
- <text class="light-hint">{{ specialPopupMsg }}</text>
- </block>
- <rich-text v-else :nodes="specialAccounts"></rich-text>
- </view>
- </u-modal>
- </view>
- <not-have-login v-else />
- <Loading />
- </block>
- </template>
- <script>
- import { activity, User } from "@/config/api.js";
- import { Throttle } from "@/config/util.js";
- import freeCharge from "@/components/freeCharge";
- import specialMixins from "../components/specialMixins";
- import NotHaveLogin from "@/components/notHaveLogin.vue";
- export default {
- data() {
- return {
- page_no: 1,
- pageSize: 10,
- collectList: [],
- status: "loadmore",
- refresh: false, //正在下拉
- loadText: {
- loadmore: "上拉加载更多",
- loading: "加载中",
- nomore: "已经到底了",
- },
- };
- },
- mixins: [specialMixins],
- components: {
- freeCharge,
- NotHaveLogin,
- },
- methods: {
- // 获取事件
- async getActivityList() {
- const res = await activity.getSpecialList({
- PageSize: this.pageSize,
- CurrentIndex: this.page_no,
- });
- if (res.Ret === 200) {
- this.specialIsFollow = res.Data.IsFollow;
- this.status = this.page_no < res.Data.Paging.Pages ? "loadmore" : "nomore";
- if (this.page_no === 1) {
- this.collectList = res.Data.List || [];
- if (this.refresh) {
- uni.stopPullDownRefresh();
- this.refresh = false;
- }
- } else {
- this.collectList = this.collectList.concat(res.Data.List);
- }
- }
- },
- // 查看行程的事件
- lookImg(item) {
- this.getRecordTracking(this.$store.state.pageRouterActivity, { ActivityId: item.ActivityId, Source: "查看行程" });
- uni.previewImage({
- urls: [item.TripImgLink], //查看图片的数组
- });
- },
- // 去往详情页面
- goDetail(item) {
- uni.navigateTo({ url: "/activityPages/specialDetail/specialDetail?id=" + item.ActivityId });
- },
- // 点击感兴趣
- async interest(item) {
- const res = await activity.postSpecialSignupAdd({
- ActivityId: item.ActivityId,
- PageRouter: this.$store.state.pageRouterActivity,
- });
- if (res.Ret === 200) {
- this.modalShow(res);
- if (res.Data.SignupStatus == 1) {
- item.IsSignup = 1;
- }
- }
- },
- // 已预报名、就是不感兴趣
- beNotInterested(item) {
- uni.showModal({
- content: "您要取消此次专研调研的预报名吗?",
- confirmColor: "#376cbb",
- cancelColor: "#606266",
- success: async (res) => {
- if (res.confirm) {
- const res = await activity.postSpecialSignupAdd({
- ActivityId: item.ActivityId,
- PageRouter: this.$store.state.pageRouterActivity,
- });
- if (res.Ret === 200) {
- item.IsSignup = 0;
- }
- }
- },
- });
- },
- // 新调研通知
- async specialFollow() {
- this.show_confirm_button = true;
- if (this.specialIsFollow) {
- uni.showModal({
- content: "您要取消【专项调研】新活动通知吗?",
- confirmColor: "#376cbb",
- cancelColor: "#606266",
- success: async (res) => {
- if (res.confirm) {
- const res = await activity.postSpecialFollow();
- if (res.Ret === 200) {
- this.specialIsFollow = !this.specialIsFollow;
- }
- }
- },
- });
- } else {
- const res = await activity.postSpecialFollow();
- if (res.Ret === 200) {
- this.show_cancel_button = true;
- this.specialIsFollow = !this.specialIsFollow;
- this.specialGoFollowShow = true;
- }
- }
- },
- },
- onLoad(option) {
- this.isUserBindingPhoneNumber && this.getActivityList();
- },
- onShow() {
- this.$store.commit("setRouterReport", "专项调研列表");
- this.$store.commit("setRouterActivity", "专项调研列表");
- },
- /* 触底 */
- onReachBottom: Throttle(function () {
- if (this.status === "nomore") return;
- this.status = "loading";
- this.page_no++;
- this.getActivityList();
- }),
- /* 下拉刷新 */
- onPullDownRefresh: Throttle(function () {
- this.page_no = 1;
- this.refresh = true;
- this.getActivityList();
- }),
- /** 用户点击分享 */
- onShareAppMessage: function (res) {
- return {
- title: this.isHorzMobile ? "好友向您推荐此内容,上传名片享查研观向免费试用月卡!" : "专项产业调研",
- path: "/activityPages/specialResearchPage/specialResearchPage",
- };
- },
- };
- </script>
- <style lang="scss" scoped>
- .special-research {
- background-color: $uni-bg-color;
- padding-top: 70rpx;
- position: relative;
- .top-notice {
- position: fixed;
- top: 0;
- left: 0;
- z-index: 9;
- display: flex;
- background-color: #fff;
- width: 100%;
- height: 62rpx;
- .notice {
- width: 80%;
- }
- .notice-right {
- display: flex;
- align-items: center;
- border-radius: 0 8rpx 8rpx 0;
- background-color: #fff1e9;
- height: 60rpx;
- }
- .inform-btn {
- width: 140rpx;
- height: 36rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- border-radius: 6rpx;
- font-size: 24rpx;
- background-color: #e37318;
- color: #fff;
- }
- .inform-follow {
- background-color: #ffd9c2;
- color: #e37318;
- }
- }
- /deep/ .van-notice-bar {
- height: 62rpx;
- }
- .city-img {
- display: flex;
- align-items: center;
- color: $uni-color-new;
- image {
- width: 32rpx;
- height: 32rpx;
- margin-right: 12rpx;
- }
- }
- }
- @import "@/components/activity/indexActivity.scss";
- </style>
|