bding 2 years ago
parent
commit
93ba23bce9

+ 1 - 1
activityPages/themeActivity/themeActivity.vue

@@ -93,7 +93,7 @@
               </view>
               <block v-if="item.SourceType == 1">
                 <block v-if="item.ActiveState == 1">
-                  <view :class="['bottom-box', item.ActivityTypeId == 1 && item.IsLimitPeople == 0 && 'expert-item', item.City && 'city']">
+                  <view :class="['bottom-box', item.ActivityTypeId == 1 && 'expert-item', item.City && 'city']">
                     <view class="city-img" v-if="item.City">
                       <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/location.png"></image>
                       {{ item.City }}

+ 680 - 0
components/ItemComponent/activityItem.vue

@@ -0,0 +1,680 @@
+<template>
+  <view class="container-activity-item" @click="goDetail(list)">
+    <view class="content-sign">
+      <view :class="[list.ActivityType === 0 ? 'is-down' : 'is-up', 'is-up-down']">{{ list.ActivityType === 0 ? "线下" : "线上" }}</view>
+      <view :class="[list.ActiveState === 1 ? 'is-down' : list.ActiveState === 2 ? 'is-up' : 'is-end', 'is-up-down', 'state']">
+        {{ list.ActiveState === 1 ? "未开始" : list.ActiveState === 2 ? "进行中" : "已结束" }}
+      </view>
+    </view>
+    <view class="content-type"> {{ list.ActivityTypeName || list.ResearchTheme }}</view>
+    <view class="content-title text-Line" v-if="list.ActivityName">
+      {{ list.ActivityName }}
+    </view>
+    <view style="display: flex" class="content-text text_twoLine" v-if="list.ActivityTimeText && list.SourceType !== 1">
+      <text style="flex-shrink: 0"> 活动时间:</text>
+      <text> {{ list.ActivityTimeText }}</text>
+    </view>
+    <view class="content-text text-Line" v-else>
+      {{ list.Host ? "主持人:" : list.Expert ? "专家背景:" : "" }}
+      {{ list.Host ? list.Host : list.Expert ? list.Expert : "" }}
+    </view>
+    <view class="content-time" v-if="list.SourceType == 1">
+      {{ list.ActivityTimeText }}
+    </view>
+    <view v-if="list.City" class="content-city">
+      <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/location.png"></image>
+      {{ list.City }}
+    </view>
+    <view :class="['content-btn', list.ActivityTypeId === 1 && 'content-btn-end']">
+      <block v-if="list.SourceType === 1">
+        <text class="item-btn" v-if="list.IsShowOutboundCall && list.ActivityTypeId == 1"  @click.stop="signupIsAddOfCancel(list, 1)">{{ list.IsSignup == 1 ? "取消外呼" : "预约外呼" }}</text>
+        <text class="item-btn" v-if="list.IsShowAppointment"  @click.stop="summaryIsHandel(list)">{{ list.IsAppointment == 1 ? "取消纪要" : "预约纪要" }}</text>
+        <text class="item-btn" v-if="list.IsShowMeetingReminder"  @click.stop="meetingReminderAdd(list.ActivityId, list.IsCancelMeetingReminder)">
+          {{ list.IsCancelMeetingReminder == 0 ? "消息提醒" : "取消提醒" }}
+        </text>
+        <view class="item-btn" v-if="list.IsShowHelpSsk" style="width: 130rpx">
+          <text  @click.stop="askingGo(list)">帮我带问</text>
+        </view>
+        <text class="item-btn" v-if="list.IsShowOutboundCall && list.ActivityTypeId != 1"  @click.stop="signupIsAddOfCancel(list, 1)">{{ list.IsSignup == 1 ? "取消外呼" : "预约外呼" }}</text>
+        <text class="item-btn" v-if="list.IsShowDetails"  @click.stop="goDetail(list)">查看详情</text>
+        <block v-if="list.IsShowSignup">
+          <block v-if="list.IsCClassMeeting">
+            <text  @click.stop="signupIsAddOfCancel(list, 3, 'CClass')">{{ list.IsSignup == 1 ? "取消报名" : "我要报名" }}</text>
+          </block>
+          <block v-else>
+            <text class="item-btn" v-if="list.IsSignup !== 1"  @click.stop="wanttosignup(list)">我要报名</text>
+            <text class="item-btn" v-else  @click.stop="signupIsAddOfCancel(list, 2)">{{ list.SignupType == 1 ? "取消外呼" : "取消报名" }}</text>
+          </block>
+        </block>
+      </block>
+      <view class="bottom-box real-time" v-else>
+        <view class="bottom-box">
+          <view class="" style="width: 130rpx"> </view>
+          <text class="item-btn"  @click="lookImg(list)">行程安排</text>
+          <block v-if="list.TripStatus == 2">
+            <text v-if="list.ActiveState == 1" class="item-btn"  @click="applyOfcancel(list)">{{ list.IsTrip == 0 ? "我要报名" : "取消报名" }}</text>
+          </block>
+          <block v-else>
+            <text class="item-btn" v-if="list.IsSignup !== 1"  @click="interest(list)">感兴趣</text>
+            <text class="item-btn"  @click="beNotInterested(list)" v-else>已预报名</text>
+          </block>
+        </view>
+      </view>
+    </view>
+    <image v-if="list.TripStatus == 2" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/confirm_XC_new.png" class="content-img"></image>
+    <image v-if="list.TripStatus == 1" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/Y_apply_new.png" class="content-img"></image>
+    <!-- 所有自定义弹框 -->
+    <modalDialog
+      :isShow="isShow"
+      :signupType="signupType"
+      :goFollow="goFollow"
+      :hasPermission="hasPermission"
+      :jurisdictionList="jurisdictionList"
+      :editIsShow="editIsShow"
+      :isCancelShow="isCancelShow"
+      :idTypeCancel="idTypeCancel"
+      :countryCode="countryCode"
+      :mobileEdit="mobileEdit"
+      :goOnNextStep="goOnNextStep"
+      :isShowhasPermission="isShowhasPermission"
+      :applyForIsShow="applyForIsShow"
+      :mailboxBinding="mailboxBinding"
+    />
+    <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 class="select-box">
+      <u-popup v-model="selectShow" mode="bottom">
+        <view style="color: #333333; font-size: 28rpxrpx">请选择参会方式</view>
+        <view style="color: #2c83ff"  @click.stop="signupIsAddOfCancel('', 1)">预约外呼</view>
+        <view style="color: #2c83ff"  @click.stop="signupIsAddOfCancel('', 2)">自主拨入</view>
+        <view style="color: #a9afb8"  @click.stop="selectShow = false">取消</view>
+      </u-popup>
+    </view>
+  </view>
+</template>
+
+<script>
+import myActivityMixin from "@/components/activity/indexActivity.js";
+import modalDialog from "../modalDialog.vue";
+import { activity, User } from "@/config/api.js";
+
+export default {
+  name: "",
+  components: { modalDialog },
+  props: {
+    list: {
+      type: Object,
+      default: {},
+      required: true,
+    },
+  },
+  data() {
+    return {
+      /**/
+      tabsActive: 0,
+      /**/
+      /*  共用的弹框  */
+      isShow: false, //弹框
+      signupType: "", //关注类型
+      goFollow: false, //是否关注公众号
+      hasPermission: "", //是否有权限
+      jurisdictionList: {},
+      editIsShow: false, //外呼莫泰框
+      isCancelShow: false,
+      idTypeCancel: {
+        id: "",
+        type: 1,
+        cutId: "",
+        state: "",
+        isNum: false,
+      },
+      countryCode: "", //外呼区号
+      mobileEdit: "", //外呼手机号
+      goOnNextStep: "", //设置外呼号后弹出哪个
+      isShowhasPermission: false, //拨打销售电话
+      applyForIsShow: false, //潜在用户
+      mailboxBinding: false, //是否绑定邮箱
+      selectShow: false, //
+      specialIsHintShow: false, // 按钮的显示
+      specialGoFollowShow: false, // 弹框的隐藏显示
+      specialAccounts: `您已开启【专项调研】新活动通知<br/><br/>请关注【查研观向小助手】公众号,及时获取微信消息提醒`,
+      specialIsFollow: false, // 是否关注
+      specialPopupMsg: "", // 消息的文案
+      show_cancel_button: false, // 取消按钮的隐藏显示
+      show_confirm_button: false, // 确定按钮的隐藏显示
+    };
+  },
+  computed: {},
+  watch: {},
+  created() {},
+  mounted() {},
+  methods: {
+    // 我要报名
+    wanttosignup(item) {
+      this.activityIdAdd = item.ActivityId;
+      if (item.YidongActivityId) {
+        this.goDetail(item);
+        return;
+      } else if (item.IsLimitPeople == 1 && item.ActivityTypeName == "公司调研电话会") {
+        this.selectShow = true;
+      } else {
+        this.activityIdAdd = "";
+        this.signupIsAddOfCancel(item, 3);
+      }
+    },
+
+    //报名/取消报名
+    signupIsAddOfCancel(item, type, valName = "") {
+      let id = this.activityIdAdd || item.ActivityId;
+      let itemData = item;
+      if (item && item.IsSignup == 1) {
+        const str = item.ActivityTime.replace(/-/g, "/");
+        const date = new Date(str);
+        const times = date.getTime();
+        const num = new Date().getTime();
+        if (times - num <= 3600000) {
+          uni.showModal({
+            confirmText: "知道了",
+            showCancel: false,
+            confirmColor: "#3385FF",
+            content: type == 1 ? "活动开始前1小时内无法取消预约外呼,请联系对口销售处理" : "活动开始前1小时内无法取消报名,请联系对口销售处理",
+          });
+          return;
+        }
+        uni.showModal({
+          content: type == 1 ? "您要取消此次活动预约外呼吗?" : "您要取消此次活动的报名吗?",
+          confirmColor: "#3385FF",
+          cancelColor: "#606266",
+          success: async (res) => {
+            if (res.confirm) {
+              const res = await activity.signupCancel({ ActivityId: item.ActivityId, SignupType: type });
+              if (res.Ret === 200) {
+                this.parentDataEmit(item, "IsSignup", 0);
+                this.init();
+                type == 1
+                  ? uni.showToast({
+                      title: "预约外呼已取消",
+                      duration: 2000,
+                    })
+                  : uni.showToast({
+                      title: "已取消报名",
+                      duration: 2000,
+                    });
+                if (valName === "我的") {
+                  this.getActivityList();
+                }
+              }
+            }
+          },
+        });
+      } else {
+        let timer = null;
+        if (this.flag) return;
+        clearTimeout(timer);
+        this.flag = true;
+        this.selectShow = false;
+        activity
+          .signupAdd({
+            ActivityId: id,
+            SignupType: type,
+          })
+          .then((res) => {
+            if (res.Ret == 200) {
+              this.hasPermission = res.Data.HasPermission;
+              this.jurisdictionList = res.Data;
+              if (this.hasPermission == 1) {
+                item.SignupType = type;
+                this.signupType = valName == "CClass" ? "CClass" : res.Data.SignupType;
+                this.countryCode = res.Data.CountryCode;
+                this.mobileEdit = res.Data.Mobile;
+                this.goOnNextStep = res.Data.GoFollow;
+                this.idTypeCancel = {
+                  cutId: res.Data.ActivityId,
+                  state: 1,
+                };
+                if (res.Data.GoBindEmail) {
+                  this.mailboxBinding = true;
+                  return;
+                }
+                if (res.Data.SignupStatus !== "Success") {
+                  this.isShow = true;
+                } else {
+                  if (res.Data.GoOutboundMobile) {
+                    this.editIsShow = true;
+                  } else if (res.Data.GoFollow) {
+                    this.goFollow = res.Data.GoFollow;
+                  } else if (res.Data.SignupStatus == "Success") {
+                    this.isShow = true;
+                  }
+                  this.parentDataEmit(item, "IsSignup", 1);
+                }
+              } else if (this.hasPermission == 2) {
+                this.isShowhasPermission = true;
+              } else if (this.hasPermission == 3 || this.hasPermission == 4 || this.hasPermission == 5) {
+                this.applyForIsShow = true;
+              }
+            }
+          });
+        timer = setTimeout(() => {
+          this.flag = false;
+        }, 500);
+      }
+    },
+    // 弹框的初始化
+    init() {
+      this.signupType = "";
+      this.goFollow = false;
+      this.isShow = false;
+      this.isCancelShow = false;
+    },
+    //添加消息提醒接口
+    meetingReminderAdd(id, type) {
+      if (type != 0) {
+        this.meetingReminderCancel(id);
+        return;
+      }
+      activity
+        .meetingReminderAdd({
+          ActivityId: id,
+        })
+        .then((res) => {
+          if (res.Ret == 200) {
+            this.hasPermission = res.Data.HasPermission;
+            this.jurisdictionList = res.Data;
+            if (this.hasPermission == 1) {
+              if ((res.Data.GoFollow && res.Data.SignupStatus !== "Success") || !res.Data.GoFollow) {
+                this.isShow = true;
+              } else {
+                this.goFollow = res.Data.GoFollow;
+              }
+              this.signupType = 999;
+              this.idTypeCancel = {
+                cutId: res.Data.ActivityId,
+                state: 1,
+                name: "conference",
+              };
+              this.parentDataEmit(item, "IsCancelMeetingReminder", 1);
+            } else if (this.hasPermission == 2) {
+              this.isShowhasPermission = true;
+            } else if (this.hasPermission == 3 || this.hasPermission == 4 || this.hasPermission == 5) {
+              this.applyForIsShow = true;
+            }
+          }
+        });
+    },
+    //取消消息提醒接口
+    meetingReminderCancel(id) {
+      activity
+        .meetingReminderCancel({
+          ActivityId: id,
+        })
+        .then((res) => {
+          if (res.Ret == 200) {
+            uni.showModal({
+              confirmText: "知道了",
+              confirmColor: "#3385FF",
+              content: res.Msg,
+              showCancel: false,
+              success: (res) => {
+                if (this.isrefresh) return this.getActivityList();
+                if (res.confirm) {
+                  this.parentDataEmit(item, "IsCancelMeetingReminder", 0);
+                }
+              },
+            });
+          }
+        });
+    },
+
+    //帮我带问
+    async askingGo(item, type = "") {
+      const res = await activity.checkAskActivity({ ActivityId: item.ActivityId });
+      if (res.Ret == 200) {
+        this.hasPermission = res.Data.HasPermission;
+        this.jurisdictionList = res.Data;
+        if (this.hasPermission == 1) {
+          uni.navigateTo({
+            url: "/activityPages/generationAsk/generationAsk?id=" + item.ActivityId + "&type=" + type,
+          });
+        } else if (this.hasPermission == 2) {
+          this.isShowhasPermission = true;
+        } else if (this.hasPermission == 3 || this.hasPermission == 4 || this.hasPermission == 5) {
+          this.applyForIsShow = true;
+        }
+      }
+    },
+    // 弹框的初始化
+    init() {
+      this.signupType = "";
+      this.goFollow = false;
+      this.isShow = false;
+      this.isCancelShow = false;
+    },
+    //预约纪要、取消预约纪要
+    async summaryIsHandel(item, type = "") {
+      if (item.IsAppointment == 0) {
+        const res = await activity.postAppointmentAdd({ ActivityId: item.ActivityId });
+        if (res.Ret == 200) {
+          this.hasPermission = res.Data.HasPermission;
+          this.jurisdictionList = res.Data;
+          if (this.hasPermission == 1) {
+            this.signupType = "summaryIsHandel";
+            this.goOnNextStep = res.Data.GoFollow;
+            if (res.Data.SignupStatus !== "Success") {
+              this.isShow = true;
+            } else {
+              if (res.Data.GoFollow) {
+                this.goFollow = res.Data.GoFollow;
+              } else if (res.Data.SignupStatus == "Success") {
+                this.isShow = true;
+              }
+              this.parentDataEmit(item, "IsAppointment", 1);
+            }
+          } else if (this.hasPermission == 2) {
+            this.isShowhasPermission = true;
+          } else if (this.hasPermission == 3 || this.hasPermission == 4 || this.hasPermission == 5) {
+            this.applyForIsShow = true;
+          }
+        }
+      } else {
+        uni.showModal({
+          content: "确定要取消预约本场调研的纪要吗?",
+          confirmColor: "#3385FF",
+          cancelColor: "#606266",
+          success: async (res) => {
+            if (res.confirm) {
+              const res = await activity.postAppointmentCancel({ ActivityId: item.ActivityId });
+              if (res.Ret === 200) {
+                this.parentDataEmit(item, "IsAppointment", 0);
+                this.init();
+                if (type === "我的") {
+                  this.getActivityList();
+                }
+              }
+            }
+          },
+        });
+      }
+    },
+    //去往详情页面
+    goDetail(item) {
+      if (item.SourceType && item.SourceType == 2) {
+        this.$store.dispatch("checkHandle", "/activityPages/specialDetail/specialDetail?id=" + item.ActivityId);
+      } else {
+        this.$store.dispatch("checkHandle", "/activityPages/activityDetail/activityDetail?id=" + item.ActivityId);
+      }
+    },
+    // 查看行程的事件
+    lookImg(item) {
+      uni.previewImage({
+        urls: [item.TripImgLink], //查看图片的数组
+      });
+    },
+    // 点击感兴趣
+    async interest(item) {
+      const res = await activity.postSpecialSignupAdd({
+        ActivityId: item.ActivityId,
+      });
+      if (res.Ret === 200) {
+        this.modalShow(res);
+        if (res.Data.SignupStatus == 1) {
+          this.parentDataEmit(item, "IsSignup", 1);
+        }
+      }
+    },
+    // 报名或者取消报名
+    async applyOfcancel(item, type = "") {
+      this.show_confirm_button = true;
+      if ((type != "back" && item.IsTrip == 1) || (type == "back" && item.IsSignup == 1)) {
+        // 取消报名
+        const str = item.ActivityTime.replace(/-/g, "/");
+        const date = new Date(str);
+        const times = date.getTime();
+        const num = new Date().getTime();
+        let twoDays = times - num <= 3600000 * 48;
+        uni.showModal({
+          content: twoDays ? "活动开始前48小时内,取消报名仍会维持扣点,确定要取消报名吗?" : "您要取消此次专项调研的预报名吗?",
+          confirmColor: "#3385FF",
+          cancelColor: "#606266",
+          success: async (res) => {
+            if (res.confirm) {
+              const res = await activity.activityApecialCancel({
+                ActivityId: item.ActivityId,
+              });
+              if (res.Ret === 200) {
+                uni.showToast({
+                  title: "已取消",
+                  duration: 2000,
+                });
+                item.TripNum > 0 && (item.TripNum -= 1);
+                type == "back" ? this.parentDataEmit(item, "IsSignup", 0) : this.parentDataEmit(item, "IsTrip", 0);
+              }
+            }
+          },
+        });
+      } else {
+        // 报名
+        const res = await activity.activityApecialAdd({ ActivityId: item.ActivityId });
+        if (res.Ret == 200) {
+          this.modalShow(res);
+          if (res.Data.SignupStatus == 1) {
+            type == "back" ? this.parentDataEmit(item, "IsSignup", 1) : this.parentDataEmit(item, "IsTrip", 1);
+          }
+        }
+      }
+    },
+
+    // 弹框的数据重置
+    ininModalHandler() {
+      this.show_cancel_button = false;
+      this.show_confirm_button = false;
+      this.specialIsHintShow = false;
+      this.specialGoFollowShow = false;
+      this.isCancelBtn = false;
+    },
+
+    // 显示弹框
+    modalShow(res) {
+      this.show_confirm_button = true;
+      this.specialGoFollowShow = true;
+      this.specialAccounts = res.Data.PopupMsg;
+      this.specialPopupMsg = res.Data.PopupMsg2;
+    },
+    // 已预报名、就是不感兴趣
+    beNotInterested(item) {
+      uni.showModal({
+        content: "您要取消此次专研调研的预报名吗?",
+        confirmColor: "#3385FF",
+        cancelColor: "#606266",
+        success: async (res) => {
+          if (res.confirm) {
+            const res = await activity.postSpecialSignupAdd({
+              ActivityId: item.ActivityId,
+            });
+            if (res.Ret === 200) {
+              this.parentDataEmit(item, "IsSignup", 0);
+            }
+          }
+        },
+      });
+    },
+
+    // 新调研通知
+    async specialFollow() {
+      this.show_confirm_button = true;
+      if (this.specialIsFollow) {
+        uni.showModal({
+          content: "您要取消【专项调研】新活动通知吗?",
+          confirmColor: "#3385FF",
+          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;
+        }
+      }
+    },
+    parentDataEmit(item, value, num) {
+      let index = this.$parent.newDataList.findIndex((key) => key.Activity.ActivityId === item.ActivityId);
+      this.$parent.newDataList[index].Activity[value] = num;
+    },
+  },
+};
+</script>
+<style scoped lang="scss">
+.container-activity-item {
+  position: relative;
+  width: 100%;
+  background: #ffffff;
+  box-shadow: 0rpx 3rpx 8rpx 0rpx rgba(0, 0, 0, 0.16);
+  border-radius: 8rpx;
+  padding: 20rpx;
+  margin-bottom: 20rpx;
+  font-size: 24rpx;
+  overflow: hidden;
+  .content-sign {
+    display: flex;
+    .is-up-down {
+      width: 110rpx;
+      height: 40rpx;
+      text-align: center;
+      line-height: 40rpx;
+      border-radius: 4rpx;
+      color: #fff;
+    }
+    .is-up {
+      background: linear-gradient(90deg, #0151ff 0%, #01b9ff 100%);
+    }
+    .is-down {
+      background: linear-gradient(90deg, #ff8a05 0%, #ffb74d 100%);
+    }
+    .is-end {
+      background: #dddddd;
+    }
+    .state {
+      border-radius: 4rpx 0 4rpx 0;
+      margin-left: 10rpx;
+    }
+  }
+  .content-type {
+    font-size: 32rpx;
+    font-weight: 500;
+    color: #333333;
+    line-height: 38rpx;
+    margin: 10rpx 0;
+  }
+  .content-title {
+    font-size: 28rpx;
+    font-weight: 400;
+    color: #333333;
+    line-height: 44rpx;
+  }
+  .content-text {
+    font-size: 28rpx;
+    font-weight: 400;
+    color: #999999;
+    line-height: 44rpx;
+    padding: 10rpx 0 20rpx;
+  }
+
+  .content-time {
+    color: #333333;
+    margin-bottom: 15rpx;
+  }
+  .content-city {
+    display: flex;
+    justify-content: flex-end;
+    align-items: center;
+    color: #3385ff;
+    image {
+      width: 27rpx;
+      height: 32rpx;
+      margin-right: 8rpx;
+    }
+  }
+  .content-img {
+    position: absolute;
+    top: 49rpx;
+    right: 0;
+    width: 205rpx;
+    height: 119rpx;
+  }
+  .content-btn {
+    display: flex;
+    overflow: hidden;
+    overflow-x: auto;
+    margin-top: 20rpx;
+    justify-content: flex-end;
+    .item-btn {
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      width: 113rpx;
+      height: 42rpx;
+      border-radius: 4rpx;
+      border: 1rpx solid #3385ff;
+      margin-left: 20rpx;
+      flex-shrink: 0;
+    }
+  }
+  .content-btn-end {
+    justify-content: flex-start;
+  }
+  .bottom-box {
+    display: flex;
+  }
+  .text-Line {
+    text-overflow: -o-ellipsis-lastline;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    display: -webkit-box;
+    -webkit-box-orient: vertical;
+    word-wrap: break-word;
+    word-break: break-all;
+    -webkit-line-clamp: 3;
+    line-clamp: 3;
+  }
+
+  .select-box {
+    width: 100%;
+
+    view {
+      height: 95prx;
+      line-height: 95rpx;
+      text-align: center;
+      font-size: 32rpx;
+      border-bottom: 1rpx solid #ebebeb;
+    }
+  }
+}
+</style>

+ 2 - 1
components/ItemComponent/chartItem.vue

@@ -64,6 +64,7 @@ export default {
   box-shadow: 0rpx 3rpx 8rpx 0rpx rgba(0, 0, 0, 0.16);
   border-radius: 8rpx;
   margin-bottom: 20rpx;
+  overflow: hidden;
   .chart-title {
     height: 90rpx;
     font-size: 32rpx;
@@ -73,7 +74,7 @@ export default {
     border-bottom: 1rpx solid #dcdfe6;
   }
   .item-content-img {
-    width: 330rpx;
+    width: 100%;
     height: 286rpx;
     image {
       width: 100%;

+ 3 - 0
components/ItemComponent/reportItem.vue

@@ -53,6 +53,7 @@ export default {
   border-radius: 8rpx;
   padding: 20rpx;
   margin-bottom: 20rpx;
+  overflow: hidden;
   .item-title {
     position: relative;
     font-size: 32rpx;
@@ -102,6 +103,8 @@ export default {
     text-overflow: ellipsis;
     display: -webkit-box;
     -webkit-box-orient: vertical;
+    word-wrap: break-word;
+    word-break: break-all;
   }
 
   .item-time {

+ 35 - 20
components/ItemComponent/roadshowItem.vue

@@ -1,6 +1,8 @@
 <template>
   <view class="container-roadshow-item">
-    <view class="title text_twoLine">{{ list.Title }}</view>
+    <view class="title ">
+      <text class="text_twoLine">{{ list.Title }}</text>
+    </view>
     <view class="cover-item" :style="{ 'background-image': 'url(' + list.BackgroundImg + ')' }">
       <block v-if="list.Type == 2 || list.Type == 3">
         <image class="img-bg" @click="handelPlay(list)" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/play_icon_index.png"></image>
@@ -35,18 +37,20 @@
         </button>
       </view>
     </view>
-     <view v-if="showAudioBox">
+    <view v-if="showAudioBox">
       <audioModule :showAudioPop.sync="showAudioPop" />
     </view>
     <videoModule :showVideoPop="showVideoPop" :curVideoId="curVideoId" :videoPopList="videoPopList" />
+    <modalDialog :isShowhasPermission="isShowhasPermission" :applyForIsShow="applyForIsShow" :jurisdictionList="jurisdictionList" :hasPermission="hasPermission" />
   </view>
 </template>
 
 <script>
-import { Home } from "@/config/api.js";
+import { Search, activity, Report, Home } from "@/config/api";
 import { color_word_bg, MultimediaIcon } from "@/utils/styleClassify";
 import audioModule from "@/components/audioModule/index";
 import videoModule from "@/components/videoModule/index";
+import modalDialog from "@/components/modalDialog.vue";
 export default {
   name: "",
   props: {
@@ -57,13 +61,35 @@ export default {
     },
   },
   data() {
-    return {};
+    return {
+      curVideoId: 0, //音频Id
+      showVideoPop: false,
+      showAudioPop: false, //播放音频
+      videoPopList: {},
+      isShowhasPermission: false, //  联系销售的提交申请
+      applyForIsShow: false, // 提交申请
+      jurisdictionList: {},
+      hasPermission: "", //权限
+    };
   },
   components: {
-        audioModule,
+    audioModule,
     videoModule,
+    modalDialog,
+  },
+  computed: {
+    curVoiceId() {
+      //当前正在播放的音频id
+      return this.$store.state.audioBg.indexId;
+    },
+    curAudioPaused() {
+      //当前音频是否暂停状态
+      return this.$store.state.audioBg.paused;
+    },
+    showAudioBox() {
+      return this.$store.state.audioBg.parseIntShow;
+    },
   },
-  computed: {},
   watch: {},
   created() {},
   mounted() {},
@@ -105,7 +131,6 @@ export default {
     handelVideoPlay(item) {
       if (this.$store.state.videoPlay.playVideoId != item.Id) {
         this.$store.commit("videoPlay/palyTimeUpdate", 0);
-        console.log(this.$store.state.videoPlay.palyCurrentTime);
         this.$store.commit("videoPlay/playVideo", item.Id);
       }
       this.globalBgAudioManager.stop();
@@ -114,7 +139,6 @@ export default {
     },
     //音频的播放事件
     async audioPlayBack(item) {
-      console.log(item);
       this.curVideoId = 0;
       this.$store.commit("audioBg/parseIntAudio", true);
       // 判断是否为同一个音频
@@ -157,18 +181,6 @@ export default {
     // 微路演收藏
     async isCollectionHandeler(item) {
       this.$emit("isCollectionHandeler", item);
-      // const res = await Home.microRoadshowCollect({
-      //   Id: item.Id,
-      //   SourceType: item.Type,
-      // });
-      // if (res.Ret === 200) {
-      //   let index = this.$parent.roadshowPageList.findIndex((key) => key.Id == item.Id);
-      //   res.Data.Status == 1 ? (this.$parent.roadshowPageList[index].IsCollect = true) : (this.$parent.roadshowPageList[index].IsCollect = false);
-      //   uni.showToast({
-      //     title: res.Msg,
-      //     duration: 2000,
-      //   });
-      // }
     },
   },
 };
@@ -181,6 +193,7 @@ export default {
   padding: 20rpx 14rpx;
   border-radius: 8rpx;
   margin-bottom: 20rpx;
+  overflow: hidden;
   .cover-item {
     width: calc(100% + 28rpx);
     height: 250rpx;
@@ -251,6 +264,8 @@ export default {
     padding-bottom: 10rpx;
     border-bottom: 1rpx solid #dcdfe6;
     margin-bottom: 20rpx;
+    word-wrap: break-word;
+    word-break: break-all;
   }
   .title-share {
     margin-top: 20rpx;

+ 3 - 0
config/modules/Home.js

@@ -2,6 +2,9 @@ import { getHttp, postHttp } from "../request.js";
 
 /* 首页 */
 export const Home = {
+  getNewList: (params) => {
+    return getHttp("/home/new", params);
+  },
   /* 
       列表
       PageSize * CurrentIndex * ChartPermissionId *品类id,最新传0

+ 11 - 89
pageMy/myCollection/myCollection.vue

@@ -9,7 +9,7 @@
     <view class="collect-ul" v-if="haveData">
       <view class="audio-video-content" v-if="tabsActive == 2">
         <view class="audio-item" v-for="item in collectList" :key="item.Id">
-        <RoadshowItem :list="item" @handelPlay="handelPlay" />
+          <RoadshowItem :list="item" @isCollectionHandeler="isCollectionHandeler" />
         </view>
       </view>
       <block v-else>
@@ -47,17 +47,11 @@
       <text>暂时没有收藏的内容</text>
     </view>
     <freeCharge class="free-charge" :isShowFreeBtn="isShowFree" />
-    <view v-if="showAudioBox">
-      <audioModule :showAudioPop.sync="showAudioPop" />
-    </view>
-    <videoModule :showVideoPop="showVideoPop" :curVideoId="curVideoId" :videoPopList="videoPopList" />
   </view>
 </template>
 
 <script>
 import { Mine, Report, Home, User } from "@/config/api.js";
-import videoModule from "@/components/videoModule/index";
-import audioModule from "@/components/audioModule/index";
 import RoadshowItem from "@/components/ItemComponent/roadshowItem.vue";
 import freeCharge from "@/components/freeCharge";
 export default {
@@ -81,10 +75,6 @@ export default {
         { name: "微路演", id: 2 },
       ],
       tabsActive: 1,
-      showAudioPop: false, //播放音频
-      curVideoId: 0, //音频Id
-      showVideoPop: false,
-      videoPopList: {},
     };
   },
   onLoad() {
@@ -93,9 +83,7 @@ export default {
   },
   components: {
     freeCharge,
-    audioModule,
-    videoModule,
-    RoadshowItem
+    RoadshowItem,
   },
   methods: {
     /* 获取列表 */
@@ -185,79 +173,6 @@ export default {
       this.getCollectList();
     },
 
-    //播放的权限判断
-    handelPlay(item) {
-      let content_item = null;
-      if (item.AudioActivityId) {
-        content_item = {
-          ActivityId: item.AudioActivityId,
-          PlaySeconds: item.AudioPlaySeconds,
-          ResourceUrl: item.AudioResourceUrl,
-          Title: item.AudioTitle,
-          Type: item.AudioType,
-        };
-      }
-      if (!this.$store.state.isAuth && !this.$store.state.isBind) {
-        if (item.AuthInfo.HasPermission == 1) {
-          item.Type == 1 || item.AudioType == 1 ? this.audioPlayBack(content_item ? content_item : item) : this.handelVideoPlay(item);
-        } else {
-          this.hasPermission = item.AuthInfo.HasPermission;
-          this.jurisdictionList.ActivityId = item.Id;
-          this.jurisdictionList.isAudioVideo = item.Type;
-          if (this.hasPermission == 2) {
-            this.jurisdictionList.SellerMobile = item.AuthInfo.SellerMobile;
-            this.jurisdictionList.SellerName = item.AuthInfo.SellerName;
-            this.jurisdictionList.PopupMsg = item.AuthInfo.PopupMsg;
-            this.isShowhasPermission = true;
-          } else if (this.hasPermission == 3 || this.hasPermission == 4 || this.hasPermission == 5) {
-            this.jurisdictionList.PopupMsg = item.AuthInfo.PopupMsg;
-            this.applyForIsShow = true;
-          }
-        }
-      } else {
-        this.$store.dispatch("checkHandle");
-      }
-    },
-
-    //视频的播放事件
-    handelVideoPlay(item) {
-      if (this.$store.state.videoPlay.playVideoId != item.Id) {
-        this.$store.commit("videoPlay/palyTimeUpdate", 0);
-        console.log(this.$store.state.videoPlay.palyCurrentTime);
-        this.$store.commit("videoPlay/playVideo", item.Id);
-      }
-      this.globalBgAudioManager.stop();
-      this.videoPopList = item;
-      this.showVideoPop = true;
-    },
-
-    //音频的播放事件
-    async audioPlayBack(item) {
-      this.curVideoId = 0;
-      this.$store.commit("audioBg/parseIntAudio", true);
-      // 判断是否为同一个音频
-      if (this.$store.state.audioBg.indexId == item.ActivityId) {
-        if (this.globalBgAudioManager.paused) {
-          this.globalBgAudioManager.play();
-        } else {
-          this.globalBgAudioManager.pause();
-        }
-      } else {
-        let VoiceList = {
-          Url: item.ResourceUrl,
-          Name: item.Title,
-          PlaySeconds: item.PlaySeconds,
-        };
-        this.$store.commit("audioBg/addAudio", { list: VoiceList, indexId: item.ActivityId, activityTitle: item.Title });
-      }
-      this.showAudioPop = true;
-    },
-    // 微路演留言
-    myLeavingMessageHandler(item) {
-      uni.navigateTo({
-        url: "/activityPages/generationAsk/generationAsk?id=" + (item.Type == 3 ? item.Id : item.ActivityId) + "&type=文章&roadshow=" + item.Type + "&roadshowTitle=" + item.Title,
-      });
-    },
 
     // 微路演收藏
     async isCollectionHandeler(item) {
@@ -331,7 +246,7 @@ export default {
 .myCollection-container {
   background-color: #f7f7f7;
   .collect-ul {
-    padding: 4rpx 30rpx 20rpx;
+    padding: 4rpx 10rpx 20rpx;
     .content-item {
       background-color: #fff;
       margin-top: 20rpx;
@@ -417,6 +332,13 @@ export default {
       font-weight: 500;
     }
   }
-  @import "@/components/audioVideo.scss";
+  .audio-video-content {
+    display: flex;
+    flex-wrap: wrap;
+    justify-content: space-between;
+    .audio-item {
+      width: 49%;
+    }
+  }
 }
 </style>

+ 1 - 1
pageMy/mySchedulepage/mySchedulepage.vue

@@ -46,7 +46,7 @@
             </view>
             <block v-if="item.SourceType == 1">
               <block v-if="item.ActiveState == 1">
-                <view :class="['bottom-box', item.ActivityTypeId == 1 && item.IsLimitPeople == 0 && 'expert-item', item.City && 'city']">
+                <view :class="['bottom-box', item.ActivityTypeId == 1  && 'expert-item', item.City && 'city']">
                   <view class="city-img" v-if="item.City">
                     <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/location.png"></image>
                     {{ item.City }}

+ 1 - 1
pages-search/components/activityBack.vue

@@ -46,7 +46,7 @@
               </view>
               <block v-if="item.SourceType == 1">
                 <block v-if="item.ActiveState == 1">
-                  <view :class="['bottom-box', item.ActivityTypeId == 1 && item.IsLimitPeople == 0 && 'expert-item', item.City && 'city']">
+                  <view :class="['bottom-box', item.ActivityTypeId == 1 && 'expert-item', item.City && 'city']">
                     <view class="city-img" v-if="item.City">
                       <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/location.png"></image>
                       {{ item.City }}

+ 5 - 135
pages-search/components/roadshow.vue

@@ -1,64 +1,15 @@
 <template>
   <view :class="['roadshow-search', tabsRoadshowSearch == 5 && 'roadshow-search-top']">
-    <!-- <view class="audio-video-content">
-      <view class="audio-item" v-for="item in roadshowPageList" :key="item.Id">
-        <view class="cover-item" :style="{ 'background-image': 'url(' + item.BackgroundImg + ')' }">
-          type:3 -- 产业视频
-          <block v-if="item.Type == 2 || item.Type == 3">
-            <image class="img-bg" @click="handelPlay(item)" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/play_icon_index.png"></image>
-          </block>
-          <block v-else>
-            <image
-              class="img-bg"
-              @click.stop="handelPlay(item)"
-              :src="
-                curVoiceId === item.ActivityId && !curAudioPaused
-                  ? 'https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/back_stop_index.png'
-                  : 'https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/back_group_index.png'
-              "
-            ></image>
-          </block>
-          <text class="time">{{ item.PublishTime }}</text>
-          <view :class="['identification', item.Type != 1 && 'identification-video']"> </view>
-          <image
-            class="identification-img"
-            :src="item.Type == 1 ? 'https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/multimedia/video-iocn.png' : 'https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/multimedia/audio-icon.png'"
-          ></image>
-        </view>
-        <view class="title-share">
-          <view class="title text_twoLine">{{ item.Title }}</view>
-          <view class="share share-collected">
-            <image @click="myLeavingMessageHandler(item)" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/multimedia/leaving_message.png"></image>
-            <image
-              @click="isCollectionHandeler(item)"
-              :src="
-                item.IsCollect ? 'https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/multimedia/collected_icon.png' : 'https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/multimedia/not_collected.png'
-              "
-            ></image>
-            <button class="share-icon" open-type="share" :data-item="item">
-              <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/multimedia/share-btn-icon.png"></image>
-            </button>
-          </view>
-        </view>
-      </view>
-    </view> -->
     <view class="audio-video-content">
       <view style="width: 49%" v-for="item in roadshowPageList" :key="item.Id">
-        <RoadshowItem :list="item" @handelPlay="handelPlay" />
+        <RoadshowItem :list="item" @isCollectionHandeler="isCollectionHandeler" />
       </view>
     </view>
-    <view v-if="showAudioBox">
-      <audioModule :showAudioPop.sync="showAudioPop" />
-    </view>
-    <videoModule :showVideoPop="showVideoPop" :videoPopList="videoPopList" />
   </view>
 </template>
 
 <script>
-import { Search, activity, Report, Home } from "@/config/api";
-import { color_word_bg, MultimediaIcon } from "@/utils/styleClassify";
-import audioModule from "@/components/audioModule/index";
-import videoModule from "@/components/videoModule/index";
+import { Home } from "@/config/api";
 import RoadshowItem from "@/components/ItemComponent/roadshowItem.vue";
 
 export default {
@@ -74,92 +25,11 @@ export default {
     },
   },
   data() {
-    return {
-      showAudioPop: false,
-      showVideoPop: false,
-      videoPopList: {},
-    };
+    return {};
   },
-  computed: {
-    curVoiceId() {
-      //当前正在播放的音频id
-      return this.$store.state.audioBg.indexId;
-    },
-    curAudioPaused() {
-      //当前音频是否暂停状态
-      return this.$store.state.audioBg.paused;
-    },
-    showAudioBox() {
-      return this.$store.state.audioBg.parseIntShow;
-    },
-  },
-  components: { audioModule, videoModule, RoadshowItem },
+  computed: {},
+  components: { RoadshowItem },
   methods: {
-    //播放的权限判断
-    handelPlay(item) {
-      let content_item = null;
-      if (item.AudioActivityId) {
-        content_item = {
-          ActivityId: item.AudioActivityId,
-          PlaySeconds: item.AudioPlaySeconds,
-          ResourceUrl: item.AudioResourceUrl,
-          Title: item.AudioTitle,
-          Type: item.AudioType,
-        };
-      }
-      if (!this.$store.state.isAuth && !this.$store.state.isBind) {
-        if (item.AuthInfo.HasPermission == 1) {
-          item.Type == 1 || item.AudioType == 1 ? this.audioPlayBack(content_item ? content_item : item) : this.handelVideoPlay(item);
-        } else {
-          this.hasPermission = item.AuthInfo.HasPermission;
-          this.jurisdictionList.ActivityId = item.Id;
-          this.jurisdictionList.isAudioVideo = item.Type;
-          if (this.hasPermission == 2) {
-            this.jurisdictionList.SellerMobile = item.AuthInfo.SellerMobile;
-            this.jurisdictionList.SellerName = item.AuthInfo.SellerName;
-            this.jurisdictionList.PopupMsg = item.AuthInfo.PopupMsg;
-            this.isShowhasPermission = true;
-          } else if (this.hasPermission == 3 || this.hasPermission == 4 || this.hasPermission == 5) {
-            this.jurisdictionList.PopupMsg = item.AuthInfo.PopupMsg;
-            this.applyForIsShow = true;
-          }
-        }
-      } else {
-        this.$store.dispatch("checkHandle");
-      }
-    },
-    //视频的播放事件
-    handelVideoPlay(item) {
-      if (this.$store.state.videoPlay.playVideoId != item.Id) {
-        this.$store.commit("videoPlay/palyTimeUpdate", 0);
-        console.log(this.$store.state.videoPlay.palyCurrentTime);
-        this.$store.commit("videoPlay/playVideo", item.Id);
-      }
-      this.globalBgAudioManager.stop();
-      this.videoPopList = item;
-      this.showVideoPop = true;
-    },
-    //音频的播放事件
-    async audioPlayBack(item) {
-      this.curVideoId = 0;
-      this.$store.commit("audioBg/parseIntAudio", true);
-      // 判断是否为同一个音频
-      if (this.$store.state.audioBg.indexId == item.ActivityId) {
-        if (this.globalBgAudioManager.paused) {
-          this.globalBgAudioManager.play();
-        } else {
-          this.globalBgAudioManager.pause();
-        }
-      } else {
-        let VoiceList = {
-          Url: item.ResourceUrl,
-          Name: item.Title,
-          PlaySeconds: item.PlaySeconds,
-        };
-        this.$store.commit("audioBg/addAudio", { list: VoiceList, indexId: item.ActivityId, activityTitle: item.Title });
-      }
-      this.showAudioPop = true;
-    },
     // 微路演收藏
     async isCollectionHandeler(item) {
       const res = await Home.microRoadshowCollect({

+ 117 - 7
pages/index/index.vue

@@ -11,13 +11,70 @@
         </view>
       </view>
     </view>
+    <view class="content-ul">
+      <view class="item-ul">
+        <block v-for="(item, index) in newDataList" :key="index">
+          <view v-if="index % 2 == 0">
+            <block v-if="item.Source === 'article'"> <ReportItem :list="item.Article" /></block>
+            <block v-if="item.Source === 'newchart'">
+              <ChartItem :list="item.Newchart" :isMyChartCollection="isMyChartCollection" @myChartIsTop="myChartIsTop" @myChartCollect="myChartCollect" />
+            </block>
+            <block v-if="item.Source === 'roadshow' || item.Source === 'activityvideo' || item.Source === 'activityvoice'">
+              <RoadshowItem :list="item.Roadshow" @isCollectionHandeler="isCollectionHandeler" />
+            </block>
+            <block v-if="item.Source === 'activity' || item.Source === 'activityspecial'">
+              <ActivityItem :list="item.Activity" />
+            </block>
+          </view>
+        </block>
+      </view>
+      <view class="item-ul">
+        <block v-for="(item, index) in newDataList" :key="index">
+          <view v-if="index % 2 !== 0">
+            <block v-if="item.Source === 'article'"> <ReportItem :list="item.Article" /></block>
+            <block v-if="item.Source === 'newchart'">
+              <ChartItem :list="item.Newchart" :isMyChartCollection="isMyChartCollection" @myChartIsTop="myChartIsTop" @myChartCollect="myChartCollect" />
+            </block>
+            <block v-if="item.Source === 'roadshow' || item.Source === 'activityvideo' || item.Source === 'activityvoice'">
+              <RoadshowItem :list="item.Roadshow" @isCollectionHandeler="isCollectionHandeler" />
+            </block>
+            <block v-if="item.Source === 'activity' || item.Source === 'activityspecial'">
+              <ActivityItem :list="item.Activity" />
+            </block>
+          </view>
+        </block>
+      </view>
+    </view>
+    <u-loadmore :status="status" icon-type="flower" :load-text="loadText" margin-top="20" v-if="page_no > 1" />
   </view>
 </template>
 
 <script>
+import { Home } from "@/config/api";
+import ChartItem from "@/components/ItemComponent/chartItem.vue";
+import ReportItem from "@/components/ItemComponent/reportItem.vue";
+import RoadshowItem from "@/components/ItemComponent/roadshowItem.vue";
+import ActivityItem from "@/components/ItemComponent/activityItem.vue";
 export default {
   data() {
-    return {};
+    return {
+      newDataList: [],
+      page_no: 1,
+      pageSize: 10,
+      status: "loadmore",
+      refresh: false, //正在下拉
+      loadText: {
+        loadmore: "上拉加载更多",
+        loading: "加载中",
+        nomore: "已经到底了",
+      },
+    };
+  },
+  components: {
+    ChartItem,
+    ReportItem,
+    RoadshowItem,
+    ActivityItem,
   },
   methods: {
     //获取胶囊位置
@@ -29,21 +86,63 @@ export default {
         paddingBottom: "4px",
       };
     },
-    goMyInfo(){
+    // 获取最先数据
+    async getNewList() {
+      const res = await Home.getNewList({
+        PageSize: this.pageSize,
+        CurrentIndex: this.page_no,
+      });
+      if (res.Ret === 200) {
+        this.status = !res.Data.Paging.IsEnd ? "loadmore" : "nomore";
+        let listArr = [];
+        res.Data.List &&
+          res.Data.List.forEach((item) => {
+            listArr.push({
+              Source: item.Source,
+              Article: item.Article,
+              Newchart: item.Newchart,
+              Activity: item.Activity || item.Activityspecial,
+              Roadshow: item.Roadshow || item.Activityvideo || item.Activityvoice,
+            });
+          });
+          console.log(listArr);
+        this.newDataList = this.page_no === 1 ? listArr : [...this.newDataList, ...listArr];
+        if (this.refresh) {
+          uni.stopPullDownRefresh();
+          this.refresh = false;
+        }
+      }
+    },
+    // 跳转到我的页面
+    goMyInfo() {
       uni.navigateTo({
-        url:'/pageMy/myPage/myPage'
-      })
-    }
+        url: "/pageMy/myPage/myPage",
+      });
+    },
   },
   onLoad() {
     this.initNavBar();
+    this.getNewList();
+  },
+  // 加载数据
+  onReachBottom() {
+    if (this.status === "nomore") return;
+    this.status = "loading";
+    this.page_no++;
+    this.getNewList();
+  },
+  // 下拉刷新
+  onPullDownRefresh() {
+    this.page_no = 1;
+    this.refresh = true;
+    this.getNewList();
   },
 };
 </script>
 
 <style lang="scss" scoped>
 .New-container {
-  background-color: #F5F6FA;
+  background-color: #f5f6fa;
   .top-content-box {
     position: sticky;
     top: 0;
@@ -79,7 +178,7 @@ export default {
       width: 64rpx;
       height: 64rpx;
       margin-right: 20rpx;
-      border-radius:50%;
+      border-radius: 50%;
       overflow: hidden;
       image {
         width: 100%;
@@ -87,5 +186,16 @@ export default {
       }
     }
   }
+  .content-ul {
+    padding: 30rpx 10rpx;
+    display: flex;
+    justify-content: space-between;
+    .item-ul {
+      width: 49%;
+      &:first-child {
+        margin-right: 10rpx;
+      }
+    }
+  }
 }
 </style>

+ 19 - 92
pages/material/material.vue

@@ -45,12 +45,12 @@
     <block v-if="haveData">
       <view class="content-ul">
         <block v-if="topTabsActive == 4">
-          <view v-for="item in roadshowPageList" :key="item.Id">
-            <RoadshowItem :list="item" @handelPlay="handelPlay" />
+          <view style="width: 49%" v-for="item in roadshowPageList" :key="item.Id">
+            <RoadshowItem :list="item" @isCollectionHandeler="isCollectionHandeler" />
           </view>
         </block>
         <block v-else>
-          <view class="report-ul" style="width:49%">
+          <view class="report-ul" style="width: 49%">
             <block v-for="(item, index) in dataList" :key="index">
               <view v-if="index % 2 == 0">
                 <ChartItem v-if="topTabsActive == 3" :list="item" :isMyChartCollection="isMyChartCollection" @myChartIsTop="myChartIsTop" @myChartCollect="myChartCollect" />
@@ -58,7 +58,7 @@
               </view>
             </block>
           </view>
-          <view class="report-ul" style="width:49%">
+          <view class="report-ul" style="width: 49%">
             <block v-for="(item, index) in dataList" :key="index">
               <view v-if="index % 2 !== 0">
                 <ChartItem v-if="topTabsActive == 3" :list="item" :isMyChartCollection="isMyChartCollection" @myChartIsTop="myChartIsTop" @myChartCollect="myChartCollect" />
@@ -81,12 +81,7 @@
       </block>
     </view>
     <freeCharge class="free-charge" :isShowFreeBtn="isShowFree" />
-    <view v-if="showAudioBox">
-      <audioModule :showAudioPop.sync="showAudioPop" />
-    </view>
-    <videoModule :showVideoPop="showVideoPop" :curVideoId="curVideoId" :videoPopList="videoPopList" />
     <suspenButton :show.sync="wholeShowListData.IsShow" v-if="wholeShowListData.IsShow" />
-    <modalDialog :isShowhasPermission="isShowhasPermission" :applyForIsShow="applyForIsShow" :jurisdictionList="jurisdictionList" :hasPermission="hasPermission" />
   </view>
 </template>
 
@@ -95,9 +90,6 @@ import { Home, Reports, Chart, activity } from "@/config/api.js";
 import { Throttle, deepCopy } from "@/config/util.js";
 import freeCharge from "@/components/freeCharge";
 import suspenButton from "@/components/suspen_button.vue";
-import audioModule from "@/components/audioModule/index";
-import modalDialog from "@/components/modalDialog.vue";
-import videoModule from "@/components/videoModule/index";
 
 import ChartItem from "@/components/ItemComponent/chartItem.vue";
 import ReportItem from "@/components/ItemComponent/reportItem.vue";
@@ -128,18 +120,10 @@ export default {
       showTransition: false, //点击绝密后的隐现
       isBindingMobile: true, //图表我的收藏是否绑定手机号
       videoContext: null,
-      showAudioPop: false, //播放音频
-      isShowhasPermission: false, //  联系销售的提交申请
-      applyForIsShow: false, // 提交申请
-      jurisdictionList: {},
-      hasPermission: "", //权限
       audioShareId: "", //通过分享单个音频点进页面时使用
       videoShareId: "", //通过分享单个视频点进页面时使用
       activityShareId: "",
       roadshowPageList: [], //音频  视频 list
-      curVideoId: 0, //音频Id
-      showVideoPop: false,
-      videoPopList: {},
       mediumSelect: [
         { name: "全部", value: 0 },
         { name: "视频", value: 1 },
@@ -151,10 +135,6 @@ export default {
   components: {
     freeCharge,
     suspenButton,
-    modalDialog,
-    audioModule,
-    videoModule,
-
     ChartItem,
     ReportItem,
     RoadshowItem,
@@ -461,73 +441,6 @@ export default {
         url: "/pageMy/login/login",
       });
     },
-
-    //播放的权限判断
-    handelPlay(item) {
-      let content_item = null;
-      if (item.AudioActivityId) {
-        content_item = {
-          ActivityId: item.AudioActivityId,
-          PlaySeconds: item.AudioPlaySeconds,
-          ResourceUrl: item.AudioResourceUrl,
-          Title: item.AudioTitle,
-          Type: item.AudioType,
-        };
-      }
-      if (!this.$store.state.isAuth && !this.$store.state.isBind) {
-        if (item.AuthInfo.HasPermission == 1) {
-          item.Type == 1 || item.AudioType == 1 ? this.audioPlayBack(content_item ? content_item : item) : this.handelVideoPlay(item);
-        } else {
-          this.hasPermission = item.AuthInfo.HasPermission;
-          this.jurisdictionList.ActivityId = item.Id;
-          this.jurisdictionList.isAudioVideo = item.Type;
-          if (this.hasPermission == 2) {
-            this.jurisdictionList.SellerMobile = item.AuthInfo.SellerMobile;
-            this.jurisdictionList.SellerName = item.AuthInfo.SellerName;
-            this.jurisdictionList.PopupMsg = item.AuthInfo.PopupMsg;
-            this.isShowhasPermission = true;
-          } else if (this.hasPermission == 3 || this.hasPermission == 4 || this.hasPermission == 5) {
-            this.jurisdictionList.PopupMsg = item.AuthInfo.PopupMsg;
-            this.applyForIsShow = true;
-          }
-        }
-      } else {
-        this.$store.dispatch("checkHandle");
-      }
-    },
-    //视频的播放事件
-    handelVideoPlay(item) {
-      if (this.$store.state.videoPlay.playVideoId != item.Id) {
-        this.$store.commit("videoPlay/palyTimeUpdate", 0);
-        console.log(this.$store.state.videoPlay.palyCurrentTime);
-        this.$store.commit("videoPlay/playVideo", item.Id);
-      }
-      this.globalBgAudioManager.stop();
-      this.videoPopList = item;
-      this.showVideoPop = true;
-    },
-    //音频的播放事件
-    async audioPlayBack(item) {
-      console.log(item);
-      this.curVideoId = 0;
-      this.$store.commit("audioBg/parseIntAudio", true);
-      // 判断是否为同一个音频
-      if (this.$store.state.audioBg.indexId == item.ActivityId) {
-        if (this.globalBgAudioManager.paused) {
-          this.globalBgAudioManager.play();
-        } else {
-          this.globalBgAudioManager.pause();
-        }
-      } else {
-        let VoiceList = {
-          Url: item.ResourceUrl,
-          Name: item.Title,
-          PlaySeconds: item.PlaySeconds,
-        };
-        this.$store.commit("audioBg/addAudio", { list: VoiceList, indexId: item.ActivityId, activityTitle: item.Title });
-      }
-      this.showAudioPop = true;
-    },
     //获取顶部导航
     async getHeaderTab() {
       const res = await Home.headerTab();
@@ -535,10 +448,24 @@ export default {
         this.topTabBars = res.Data || [];
       }
     },
+    // 微路演收藏
+    async isCollectionHandeler(item) {
+      const res = await Home.microRoadshowCollect({
+        Id: item.Id,
+        SourceType: item.Type,
+      });
+      if (res.Ret === 200) {
+        let index = this.roadshowPageList.findIndex((key) => key.Id == item.Id);
+        res.Data.Status == 1 ? (this.roadshowPageList[index].IsCollect = true) : (this.roadshowPageList[index].IsCollect = false);
+        uni.showToast({
+          title: res.Msg,
+          duration: 2000,
+        });
+      }
+    },
   },
   onHide() {
     this.$store.commit("audioBg/parseIntAudio", false);
-    this.curVideoId = 0;
   },
   mounted() {
     uni.$on("updateAudioVideo", (data) => {