123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834 |
- <template>
- <view class="container activity-content">
- <!-- 活动、日程 -->
- <view class="top-content" id="idtop">
- <view class="tab">
- <view class="tab-item" v-for="(item, index) in tabs" :key="item.id">
- <view class="scroll-tab-item" :class="{ active: tabsActive == index }"
- @click="toggleTab(item, index)">
- {{ item.name }}
- <image src="@/static/img/border_act.png" class="border_act" v-if="tabsActive == index" mode="">
- </image>
- </view>
- </view>
- </view>
- </view>
- <!-- 活动主题预告 -->
- <view class="dynamic-content" v-if="tabsActive == 0">
- <view class="target-title">
- <view class="foreshow box">
- <image src="../../static/img/foreshow_icon.png"></image>
- <text style="margin-left: 10rpx;">活动预告</text>
- </view>
- <view class="even-more box" @click="goSearch">
- <image src="../../static/img/search_iocn.png"></image>
- <text style="margin-left: 10rpx;">更多主题...</text>
- </view>
- </view>
- <view class="target-item">
- <view class="target-ul target-left">
- <view class="target-text" v-for="(item,index) in dynamicList" :key="index" v-if="index%2===0">
- <text :class="spanIndex.includes(index)?'active':''" @click="changeTarget(index)">
- {{item.KeyWord}}
- </text>
- </view>
- </view>
- <view class="target-ul target-right">
- <view class="target-text" v-for="(item,index) in dynamicList" :key="index" v-if="index%2 !== 0">
- <text :class="spanIndex.includes(index)?'active':''" @click="changeTarget(index)">
- {{item.KeyWord}}
- </text>
- </view>
- </view>
- </view>
- </view>
- <!-- 状态的下拉选择 -->
- <view class="select-sticky" v-if="tabsActive == 0">
- <view class="select-conyent">
- <van-dropdown-menu active-color="#333333">
- <van-dropdown-item id="statusstate" @open="isscroll" :title="activeStateName" @close="closeTheWindow('statusstate')">
- <view class="menu-items">
- <view class="menu-items-box" @click="overallBtn('statusstate', key)"
- v-for="key in listActivityStaus" :key="key.Id">
- <view class="items-box">
- <u-icon v-if="key.IsChoose" name="checkbox-mark" color="#2C83FF" size="24"></u-icon>
- </view>
- <text>{{ key.StatusName }}</text>
- </view>
- </view>
- <view style="background-color: #f8f8fa;width: 100%;">
- <view style="margin: 0 auto;width: 682rpx;border-bottom: 2rpx solid #E5E5E5;">
- </view>
- </view>
- <view class="menu-items">
- <view class="menu-items-box" @click="timeListBtn('statusstate', key)"
- v-for="key in activityTimeList" :key="key.Id">
- <view class="items-box">
- <u-icon v-if="key.IsChoose" name="checkbox-mark" color="#2C83FF" size="24"></u-icon>
- </view>
- <text>{{ key.StatusName }}</text>
- </view>
- </view>
- <view class="replacement-box">
- <view class="replacement">
- <text @click="replacementBtn('statusstate')" class="replacement-box">重置</text>
- <text @click="replacementConfirm('statusstate')">确定</text>
- </view>
- </view>
- </van-dropdown-item>
- <van-dropdown-item id="industry" @open="isscroll" :title="chartPermissionName" @close="closeTheWindow('industry')">
- <view class="decide">
- <view class="items-box">
- <u-icon v-if="isShowJurisdiction" name="checkbox-mark" color="#2C83FF" size="24">
- </u-icon>
- </view>
- <text @click="isJurisdiction">始终只展示有权限的行业</text>
- </view>
- <view style="background-color: #f8f8fa;width: 100%;">
- <view style="margin: 0 auto;width: 682rpx;border-bottom: 2rpx solid #E5E5E5;">
- </view>
- </view>
- <view class="menu-items">
- <view class="menu-items-box" v-for="item in listChartPermission"
- :key="item.ChartPermissionId" @click="overallClick('industry', item)">
- <view class="items-box">
- <u-icon v-if="item.IsChoose" name="checkbox-mark"
- :color="isShowJurisdiction ? '#ccc' : '#2C83FF'" size="24"></u-icon>
- </view>
- <text>{{ item.PermissionName }}</text>
- </view>
- </view>
- <view class="replacement">
- <text @click="replacementBtn('industry')" class="replacement-box">重置</text>
- <text @click="replacementConfirm('industry')">确定</text>
- </view>
- </van-dropdown-item>
- <van-dropdown-item id="genre" @open="isscroll" :title="activityTypeName" @close="closeTheWindow('genre')">
- <view class="menu-items">
- <view class="menu-items-box" @click="overallActivity('genre', item)"
- v-for="(item, index) in listActivityType" :key="item.ActivityTypeId">
- <view class="items-box">
- <u-icon v-if="item.IsChoose" name="checkbox-mark" color="#2C83FF" size="24">
- </u-icon>
- </view>
- <text>{{ item.ActivityTypeName }}</text>
- </view>
- </view>
- <view class="replacement">
- <text @click="replacementBtn('genre')" class="replacement-box">重置</text>
- <text @click="replacementConfirm('genre')">确定</text>
- </view>
- </van-dropdown-item>
- </van-dropdown-menu>
- </view>
- </view>
- <!-- 活动的列表 -->
- <view class="box-content" id="contentList" :class="{ head: tabsActive == 1 }" v-if="haveData">
- <view class="content-list" v-for="(item, index) in collectList" :key="index">
- <view class="list-top" @click="goDetail(item)">
- <view class="list-top-box">
- <text class="title">{{ item.ActivityTypeName }}</text>
- <view class="city" v-if="item.City">
- <image src="../../static/img/location.png" mode=""></image>
- <text>{{ item.City }}</text>
- </view>
- </view>
- <text style="color: #2acdd9; font-size: 26rpx" v-if="item.ActiveState == 1">未开始</text>
- <text style="color: #ff4040; font-size: 26rpx" v-if="item.ActiveState == 2">进行中</text>
- <text style="color: #999999; font-size: 26rpx" v-if="item.ActiveState == 3">已结束</text>
- </view>
- <view class="" style="display: flex">
- <view class="list-center" @click="goDetail(item)">
- <text class="title" v-if="item.IsBrackets == 1">{{
- item.ActivityName
- }}</text>
- <text class="title-two" v-else>{{ item.ActivityName }}</text>
- <view class="setting-center">
- <view class="">
- <view class="box-expert" style="padding-bottom: 30rpx" v-if="
- item.ActivityTypeName == '专家电话会' ||
- item.ActivityTypeName == '专家线下沙龙'
- ">
- <view style="width: 140rpx"> 专家背景: </view>
- <view style="width: 400rpx">
- <rich-text :nodes="item.Expert"></rich-text>
- </view>
- </view>
- <text style="padding-bottom: 30rpx" v-if="
- item.ActivityTypeName == '公司调研电话会' ||
- item.ActivityTypeName == '公司线下调研'
- ">嘉宾:{{ item.DistinguishedGuest }}</text>
- <text style="padding-bottom: 30rpx" v-if="
- item.ActivityTypeName == '分析师电话会' ||
- item.ActivityTypeName == '分析师线下沙龙'
- ">主讲人:{{ item.Speaker }}</text>
- </view>
- </view>
- <text style="padding-bottom: 30rpx">活动时间:{{ item.ActivityTimeText }}</text>
- </view>
- <view class="" style="display: flex; align-items: center; padding-right: 30rpx">
- <u-icon style="padding-bottom: 30rpx" name="arrow-right" color="#BDBDBD" size="34"></u-icon>
- </view>
- </view>
- <view class="list-bottom" v-if="
- item.ActiveState == 1 &&
- item.IsLimitPeople == 1 &&
- item.ActivityTypeName == '公司调研电话会'
- ">
- <view class="multi-text">
- <text v-if="item.IsSignup !== 1"
- @click="wanttosignup(item.ActivityId)">我要报名({{ item.SignupNum }}/{{ item.LimitPeopleNum }})</text>
- <text v-else
- @click="signupCancel(item.ActivityId, 2, item.ActivityTime)">{{ item.SignupType == 1 ? "取消外呼" : "取消报名" }}({{
- item.SignupNum
- }}/{{ item.LimitPeopleNum }})</text>
- </view>
- </view>
- <view class="list-bottom" v-else-if="item.ActiveState == 1">
- <view class="multi" v-if="item.ActivityTypeId == 1 || item.ActivityTypeId == 2 || (item.ActivityTypeId == 3 && item.IsLimitPeople == 0)">
- <text class="multi-outbound" v-if="item.IsSignup !== 1"
- @click="signupAdd(item.ActivityId, 1)">预约外呼</text>
- <text class="multi-outbound" v-else
- @click="signupCancel(item.ActivityId, 1, item.ActivityTime)">取消外呼</text>
- <text class="multi-remind" v-if="item.IsCancelMeetingReminder == 0"
- style="border-left: 1px solid #e5e5e5"
- @click="meetingReminderAdd(item.ActivityId)">会议提醒</text>
- <text class="multi-remind" v-else style="border-left: 1px solid #e5e5e5"
- @click="meetingReminderCancel(item.ActivityId)">取消会议提醒</text>
- </view>
- <view class="multi-text" v-else>
- <text v-if="item.IsSignup !== 1"
- @click="signupAdd(item.ActivityId, 3)">我要报名({{ item.SignupNum }}/{{ item.LimitPeopleNum }})</text>
- <text v-else
- @click="signupCancel(item.ActivityId, 3, item.ActivityTime)">取消报名({{ item.SignupNum }}/{{ item.LimitPeopleNum }})</text>
- </view>
- </view>
- </view>
- <u-loadmore :status="status" icon-type="flower" :load-text="loadText" margin-top="20"
- v-if="totalPage > 1" />
- </view>
- <!-- 缺审显示 -->
- <view class="nodata" :class="tabsActive == 0?'':'nodataTwo'" v-else>
- <image src="@/static/img/act_search.png" mode="" class="nodata_ico"></image>
- <text>{{tabsActive==1?'暂无日程':"暂无活动"}}</text>
- </view>
- <!-- 所有自定义弹框 -->
- <modalDialog :isShow="isShow" :signupType="signupType" :goFollow="goFollow" :signupStatus="signupStatus"
- :hasPermission="hasPermission" :jurisdictionList="jurisdictionList" :editIsShow="editIsShow"
- :isCancelShow="isCancelShow" :idTypeCancel="idTypeCancel" @cancelShowBtn="cancelEnsure"
- :countryCode="countryCode" :mobileEdit="mobileEdit" :goOnNextStep="goOnNextStep"
- :isShowhasPermission="isShowhasPermission" :applyForIsShow="applyForIsShow"
- :mailboxBinding="mailboxBinding"/>
- <!-- 区号的选择 -->
- <areaCode :isAreaCode="isAreaCode" :areaCode="areaCode" />
- <!-- 限制报名的参会方式 -->
- <view class="select-box">
- <u-popup v-model="selectShow" mode="bottom">
- <view style="color: #333333; font-size: 28rpxrpx">请选择参会方式</view>
- <view style="color: #2c83ff" @click="signupAdd('id', 1)">预约外呼</view>
- <view style="color: #2c83ff" @click="signupAdd('id', 2)">自主拨入</view>
- <view style="color: #a9afb8" @click="selectShow = false">取消</view>
- </u-popup>
- </view>
- </view>
- </template>
- <script>
- import { activity, User } from "@/config/api.js";
- import { Throttle } from "@/config/util.js";
- import modalDialog from "@/components/modalDialog.vue";
- import areaCode from "@/components/areaCode.vue";
- import myMixin from "@/activityPages/index.js";
- let app = getApp();
- export default {
- data() {
- return {
- tabs: [{
- name: "全部活动",
- id: 1,
- }, {
- name: "我的日程",
- id: 2,
- }],
- tabsActive: 0,
- totalPage: "",
- haveData: true,
- spanIndex: [],
- activeStateName: "未开始",
- activeState: "1", //活动进行状态
- dynamicList: [],
- isScrollShow:false
- };
- },
- mixins: [myMixin],
- components: {
- modalDialog,
- areaCode,
- },
- methods: {
- //页面滑动了
- isscroll(){
- this.isScrollShow=true
- },
- // 通过分享进来的下拉选择的状态
- shareOption() {
- const arr = this.activeState.split(',').map(item => item - 0)
- this.listActivityStaus.forEach(item => {
- if (arr.indexOf(item.Id) !== -1) {
- item.IsChoose = true
- } else {
- item.IsChoose = false
- }
- })
- const arrTwo = this.activityTimeStatus.split(',').map(item => item - 0)
- this.activityTimeList.forEach(item => {
- if (arrTwo.indexOf(item.Id) !== -1) {
- item.IsChoose = true
- } else {
- item.IsChoose = false
- }
- })
- const hyarr = this.chartPermissionIds.split(',').map(item => item - 0)
- this.listChartPermission.forEach(key => {
- if (hyarr.indexOf(key.ChartPermissionId) !== -1) {
- key.IsChoose = true
- } else {
- key.IsChoose = false
- }
- })
- const lxarr = this.activityTypeIds.split(',').map(item => item - 0)
- this.listActivityType.forEach(key => {
- if (lxarr.indexOf(key.ActivityTypeId) !== -1) {
- key.IsChoose = true
- } else {
- key.IsChoose = false
- }
- })
- this.preserve()
- },
- //获取列表
- getList() {
- activity
- .getActivityList({
- PageSize: this.pageSize,
- CurrentIndex: this.page_no,
- ActiveState: this.activeState, //活动进行状态
- ActivityTypeIds: this.activityTypeIds, //活动类型id 多个用 , 隔开
- ChartPermissionIds: this.chartPermissionIds, //行业id 多个用 , 隔开
- IsShowJurisdiction: this.isId,
- Label: this.keyWord,
- WhichDay: this.activityTimeStatus
- })
- .then((res) => {
- if (res.Ret !== 200) return;
- this.status =
- this.page_no < res.Data.Paging.Pages ? "loadmore" : "nomore";
- this.totalPage = res.Data.Paging.Pages; //总页数
- if (this.page_no === 1) {
- this.collectList = res.Data.List || [];
- this.haveData = this.collectList.length ? true : false;
- if (this.refresh) {
- uni.stopPullDownRefresh();
- this.refresh = false;
- }
- } else {
- this.collectList.push(...res.Data.List);
- }
- });
- },
- //我的日程
- getScheduleList() {
- activity
- .getScheduleList({
- PageSize: this.pageSize,
- CurrentIndex: this.page_no,
- })
- .then((res) => {
- if (res.Ret !== 200) return;
- this.status =
- this.page_no < res.Data.Paging.Pages ? "loadmore" : "nomore";
- this.totalPage = res.Data.Paging.Pages || ''; //总页数
- if (this.page_no === 1) {
- this.collectList = res.Data.List || [];
- this.haveData = this.collectList.length ? true : false;
- if (this.refresh) {
- uni.stopPullDownRefresh();
- this.refresh = false;
- }
- } else {
- this.collectList.push(...res.Data.List);
- }
- });
- },
- //获取活动详情接口
- getUserSearchContent(name) {
- activity
- .getUserSearchContent({
- IsShowJurisdiction: this.isId,
- })
- .then((res) => {
- this.isShowJurisdiction = res.Data.IsShowJurisdiction;
- this.listActivityStaus = res.Data.ListActivityStaus;
- this.listActivityType = res.Data.ListActivityType;
- this.listChartPermission = res.Data.ListChartPermission || [];
- this.listChartPermissionInit = res.Data.ListChartPermission2
- if (name == "traverse") {
- const hyArr = [];
- this.listChartPermission.forEach((key) => {
- if (key.IsChoose) {
- hyArr.push(key.ChartPermissionId);
- }
- });
- this.chartPermissionIds = hyArr.join(",");
- }
- if (this.isGain) {
- // this.preserve()
- } else {
- this.shareOption()
- }
- });
- },
- //头部tabs切换
- toggleTab(item, index) {
- if (this.tabsActive !== index) {
- this.tabsActive = index;
- }
- this.$store.dispatch('checkHandle').then(res => {
- app.globalData.isAuth = res.IsAuth;
- app.globalData.isBind = res.IsBind;
- if ((!res.IsAuth) && (!res.IsBind)) { //已授权已绑定
- this.page_no = 1;
- this.collectList = [];
- this.status = "loadmore";
- if (this.tabsActive == 0) {
- this.getList();
- } else {
- this.getScheduleList();
- }
- } else if (res.IsAuth) { //未授权
- this.tabsActive = 0
- uni.navigateTo({
- url: '/pages/authGuide/authGuide'
- })
- } else if (res.IsBind && !res.IsAuth) { //已授权未绑定
- this.tabsActive = 0
- uni.navigateTo({
- url: '/pages/login/login'
- })
- }
- })
- },
- //取消弹框的确认事件
- cancelEnsure(obj, type, unm) {
- this.init()
- if (obj.name == "conference") return;
- if (this.tabsActive == 0) {
- if (obj.cutId == 0) return;
- if (type == 1) {
- this.collectList.forEach((item) => {
- if (obj.cutId == item.ActivityId) {
- item.IsSignup = obj.state;
- if (unm) {
- item.SignupNum = item.SignupNum - 1;
- } else {
- item.SignupNum = item.SignupNum + 1;
- }
- }
- });
- } else {
- this.collectList.forEach((item) => {
- if (obj.cutId == item.ActivityId) {
- item.IsSignup = obj.state;
- if (unm) {
- item.SignupNum = item.SignupNum - 1;
- } else {
- item.SignupNum = item.SignupNum + 1;
- }
- }
- });
- }
- } else {
- this.getScheduleList();
- }
- },
- //去往搜索事件
- goSearch() {
- this.public({type:'show'}, true, "/activityPages/activitySearch/activitySearch")
- },
- //添加会议提醒接口
- meetingReminderAdd(id) {
- this.$store.dispatch("checkHandle").then((res) => {
- app.globalData.isAuth = res.IsAuth;
- app.globalData.isBind = res.IsBind;
- })
- if (app.globalData.isBind && !app.globalData.isAuth) {
- uni.navigateTo({
- url: "/pages/login/login",
- });
- return;
- } else if (app.globalData.isAuth) {
- uni.navigateTo({
- url: '/pages/authGuide/authGuide'
- })
- return
- }
- activity
- .meetingReminderAdd({
- ActivityId: id,
- })
- .then((res) => {
- if (res.Ret == 200) {
- this.hasPermission = res.Data.HasPermission;
- 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.signupStatus = res.Data.SignupStatus;
- this.idTypeCancel = {
- cutId: res.Data.ActivityId,
- state: 1,
- name: "conference",
- };
- this.collectList.forEach((item) => {
- if (id == item.ActivityId) {
- item.IsCancelMeetingReminder = 1;
- }
- });
- } else if (this.hasPermission == 2) {
- this.jurisdictionList.SellerMobile = res.Data.SellerMobile;
- this.jurisdictionList.PopupMsg = res.Data.PopupMsg;
- this.isShowhasPermission = true;
- } else if (this.hasPermission == 3 || this.hasPermission == 4) {
- this.jurisdictionList.PopupMsg = res.Data.PopupMsg;
- 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 (res.confirm) {
- this.collectList.forEach((item) => {
- if (id == item.ActivityId) {
- item.IsCancelMeetingReminder = 0;
- }
- });
- }
- if (this.tabsActive !== 0) {
- this.status = "loading";
- this.page_no = 1;
- this.getScheduleList();
- }
- },
- });
- }
- });
- },
- //遍历
- preserve() {
- const arr = []
- const str = []
- this.listActivityStaus.forEach(item => {
- if (item.IsChoose) {
- arr.push(item.Id)
- str.push(item.StatusName)
- }
- })
- this.activeState = arr.join(',')
- const arrTwo = []
- const strTwo=[]
- this.activityTimeList.forEach(key => {
- if (key.IsChoose) {
- arrTwo.push(key.Id)
- strTwo.push(key.StatusName)
- }
- })
- if (strTwo.length > 0) {
- this.activeStateName = strTwo.join(',')
- }else{
- if (str.length == this.listActivityStaus.length) {
- this.activeStateName = '所有状态'
- } else {
- this.activeStateName = str.join(',')
- }
- }
- this.activityTimeStatus = arrTwo.join(',')
- const hyArr = []
- const hyStr = []
- this.listChartPermission.forEach(key => {
- if (key.IsChoose) {
- hyArr.push(key.ChartPermissionId)
- hyStr.push(key.PermissionName)
- }
- })
- if ((hyStr.length == 6 && this.listChartPermission.length == 6) || hyStr.length <= 0) {
- this.chartPermissionName = '所有分类'
- } else {
- this.chartPermissionName = hyStr.join(',')
- }
- this.chartPermissionIds = hyArr.join(',')
- const lxArr = []
- const lxStr = []
- this.listActivityType.forEach(key => {
- if (key.IsChoose) {
- lxArr.push(key.ActivityTypeId)
- lxStr.push(key.ActivityTypeName)
- }
- })
- if (lxStr.length == this.listActivityType.length && lxStr.length > 0 || lxStr.length <= 0) {
- this.activityTypeName = '所有类型'
- } else {
- this.activityTypeName = lxStr.join(',')
- }
- this.activityTypeIds = lxArr.join(',')
- this.getList()
- },
- //选择预告气泡的标签
- changeTarget(index, item) {
- let arrIndex = this.spanIndex.indexOf(index);
- if (arrIndex > -1) {
- this.spanIndex.splice(arrIndex, 1);
- } else {
- this.spanIndex.push(index);
- }
- const arr = []
- this.spanIndex.forEach(item=>{
- if(this.dynamicList.length>0){
- arr.push(this.dynamicList[item].KeyWord)
- }
-
- })
- this.keyWord = arr.join(',')
- this.page_no = 1
- this.getList()
- },
- //获取快捷主题
- fastSearchKeWord() {
- activity.fastSearchKeWord({
- ActiveState: this.activeState,
- ActivityTypeIds: this.activityTypeIds,
- ChartPermissionIds: this.chartPermissionIds,
- WhichDay: this.activityTimeStatus
- }).then(res => {
- if (res.Ret !== 200) return
- this.dynamicList = res.Data.List || []
- })
- },
- },
- //load
- onLoad(option) {
- this.$store.dispatch("checkHandle", {type:'load',val:option}).then(res => {
- app.globalData.isAuth = res.IsAuth;
- app.globalData.isBind = res.IsBind;
- if(option){
- if (Object.keys(option).length !== 0) {
- this.activeState = option.statesId; //活动进行状态
- this.activityTypeIds = option.typeIds; //活动类型id 多个用 , 隔开
- this.chartPermissionIds = option.chartIds; //行业id 多个用 , 隔开
- this.activeStateName = option.stateName;
- this.chartPermissionName = option.chartName;
- this.activityTypeName = option.typeName;
- this.activityTimeStatus = option.timeStatus;
- this.spanIndex = option.indexs ? option.indexs.split(',').map(item => item - 0) : []
- this.keyWord = option.keys
- this.isGain = false;
- }
- }else {
- this.isGain = true;
- }
- if (this.isGain) {
- this.getList();
- }
- this.getUserSearchContent();
- this.fastSearchKeWord()
- })
-
- },
- //切换tabs 刷新页面
- onTabItemTap() {
- if (this.page_no > 1 || this.tabsActive !== 0 || this.collectList !== []) {
- this.tabsActive = 0;
- this.activeStateName = "未开始";
- this.chartPermissionName = "所有分类";
- this.activityTypeName = "所有类型";
- this.activeState = "1"; //活动进行状态
- this.activityTypeIds = ""; //活动类型id 多个用 , 隔开
- this.chartPermissionIds = ""; //行业id 多个用 , 隔开
- this.page_no = 1;
- this.collectList = [];
- this.spanIndex=[]
- this.keyWord= ''
- this.activityTimeList.forEach(key => {key.IsChoose=false})
- this.activityTimeStatus=''
- this.getList();
- this.getUserSearchContent();
- }
-
- },
- //show
- onShow() {
- this.countryCcode(); //判断是否加区号
- this.$store.dispatch("statistics",{PageType:'Activit'})
- },
- //页面隐藏
- onHide() {
- if (this.tabsActive !== 0 ) return
- this.selectComponent("#statusstate").toggle(false);
- this.selectComponent("#industry").toggle(false);
- this.selectComponent("#genre").toggle(false);
- },
- /** 用户点击分享 */
- onShareAppMessage: function(res) {
- return {
- title: this.keyWord? this.keyWord:this.activeStateName+','+this.chartPermissionName+','+this.activityTypeName,
- path: "/pages/activity/activity?statesId=" +
- this.activeState +
- "&typeIds=" +
- this.activityTypeIds +
- "&chartIds=" +
- this.chartPermissionIds +
- "&stateName=" +
- this.activeStateName +
- "&chartName=" +
- this.chartPermissionName +
- "&typeName=" +
- this.activityTypeName +
- "&tabs=" +
- this.tabsActive +
- "&timeStatus=" +
- this.activityTimeStatus +
- "&indexs=" + this.spanIndex +
- "&keys=" + this.keyWord,
- success: (res) => {},
- fail: (err) => {},
- };
- },
- /* 触底 */
- onReachBottom: Throttle(function() {
- if (this.status === "nomore") return;
- this.status = "loading";
- this.page_no++;
- if (this.tabsActive == 0) {
- this.getList();
- } else {
- this.getScheduleList();
- }
- }),
- /* 下拉刷新 */
- onPullDownRefresh: Throttle(function() {
- this.page_no = 1;
- this.refresh = true;
- if (this.tabsActive == 0) {
- this.getList();
- } else {
- this.getScheduleList();
- }
- }),
- // 页面滚动事件
- onPageScroll() {
- if (this.tabsActive !== 0 || !this.isScrollShow) return
- this.selectComponent("#statusstate").toggle(false);
- this.selectComponent("#industry").toggle(false);
- this.selectComponent("#genre").toggle(false);
- this.isScrollShow=false
- },
- };
- </script>
- <style scoped lang="scss">
- @import "../../activityPages/index.scss";
- .box-content {
- padding: 0rpx 34rpx 20rpx !important;
- }
- .select-sticky {
- position: sticky !important;
- width: 100%;
- top: 78rpx;
- z-index: 9999;
- background-color: #fff;
- .select-conyent {
- padding: 0 30rpx;
- .decide {
- background-color: #F8F8FA;
- display: flex;
- align-items: center;
- margin: 0 auto;
- height: 110rpx;
- width: 100%;
- padding-left: 30rpx;
- }
- .items-box {
- width: 40rpx;
- }
- .menu-items {
- background-color: #F8F8FA;
- width: 100%;
- display: flex;
- flex-wrap: wrap;
- padding: 30rpx 30rpx 0;
- .menu-items-box {
- display: flex;
- width: 50%;
- font-size: 28rpx;
- font-weight: 400;
- margin-bottom: 40rpx;
- }
- }
- .replacement-box {
- background-color: #fff;
- border-radius: 0rpx 0rpx 16rpx 16rpx;
- }
- .replacement {
- margin: 0rpx 30rpx 20rpx;
- display: flex;
- background-color: #2C83FF;
- opacity: 1;
- height: 60rpx;
- line-height: 58rpx;
- font-size: 28rpx;
- font-weight: 400;
- color: #FFFFFF;
- border-radius: 30rpx;
- text {
- flex: 1;
- text-align: center;
- }
- .replacement-box {
- border: 1rpx solid #2C83FF;
- opacity: 1;
- color: #2C83FF;
- background: #FFFFFF;
- border-radius: 28rpx 0rpx 28rpx 28rpx;
- }
- }
- }
- }
- .activity-content .nodata {
- padding-top: 80rpx !important;
- }
- .activity-content .nodataTwo {
- padding-top: 280rpx !important;
- }
- </style>
|