|
@@ -1,9 +1,8 @@
|
|
|
<template>
|
|
|
<view class="container activity-content">
|
|
|
- <!-- tabs -->
|
|
|
<view class="top-content">
|
|
|
<!-- 搜索 -->
|
|
|
- <view class="searchTarget-header">
|
|
|
+ <view class="searchTarget-header" v-if="!dynamicName">
|
|
|
<input type="text" placeholder="请输入关键字" placeholder-class="sea_ipt_placeholder" class="sea_ipt"
|
|
|
v-model="searchTxt" focus="true" confirm-type="search" @confirm="searchHandle" />
|
|
|
<icon type="search" size="15" class="sea_ico" />
|
|
@@ -12,7 +11,13 @@
|
|
|
<text class="line">|</text>
|
|
|
<text @click="searchHandle" style="color: #3385FF;">搜索</text>
|
|
|
</view>
|
|
|
+ </view>
|
|
|
+ <!-- 选中的气泡主题 -->
|
|
|
+ <view class="dynamic-name" v-if="dynamicName">
|
|
|
+ <text>{{dynamicName}}</text>
|
|
|
+ <icon type="clear" size="16" color="#E0E0E0" @click="clearDynamicName"/>
|
|
|
</view>
|
|
|
+ <!-- 搜索历史 -->
|
|
|
<view class="search-cont-top" v-if="!isShowSearch&&historySearchList.length">
|
|
|
<view class="cont-tit">
|
|
|
<text>搜索历史</text>
|
|
@@ -22,8 +27,30 @@
|
|
|
<view class="target-item" v-for="(item,index) in historySearchList" :key="index"
|
|
|
@click="chooseTarget(item)">{{item}}</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <!-- 选择 -->
|
|
|
+ </view>
|
|
|
+ <!-- 气泡主题list -->
|
|
|
+ <view class="dynamic-content" v-if="!isShowSearch">
|
|
|
+ <view class="target-title">
|
|
|
+ 更多主题搜索:
|
|
|
+ </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 @click="changeTarget(item.KeyWord)">
|
|
|
+ {{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 @click="changeTarget(item.KeyWord)">
|
|
|
+ {{item.KeyWord}}
|
|
|
+ </text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <!-- 各种状态选择 -->
|
|
|
<view class="select-conyent" v-if="isShowSearch">
|
|
|
<van-dropdown-menu active-color="#333333">
|
|
|
<van-dropdown-item id="statusstate" :title="activeStateName" @close="closeTheWindow('statusstate')">
|
|
@@ -99,13 +126,10 @@
|
|
|
<text @click="replacementConfirm('genre')">确定</text>
|
|
|
</view>
|
|
|
</van-dropdown-item>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
</van-dropdown-menu>
|
|
|
</view>
|
|
|
-
|
|
|
</view>
|
|
|
+ <!-- 内容列表部分 -->
|
|
|
<view class="box-content" v-if="haveData" :class="{head:tabsActive==1}">
|
|
|
<view class="content-list" v-for="(item,index) in collectList" :key="index">
|
|
|
<view class="list-top" @click="goDetail(item)">
|
|
@@ -179,15 +203,21 @@
|
|
|
</view>
|
|
|
<u-loadmore :status="status" icon-type="flower" :load-text="loadText" margin-top="20" v-if="totalPage>1" />
|
|
|
</view>
|
|
|
+ <!-- 缺审部分 -->
|
|
|
<view class="nodata" v-else>
|
|
|
<image src="@/static/img/act_search.png" mode="" class="nodata_ico"></image>
|
|
|
<text>未找到搜索结果</text>
|
|
|
- </view>
|
|
|
- <modalDialog :isShow="isShow" :signupType="signupType" :goFollow="goFollow" :signupStatus="signupStatus"
|
|
|
- :isCancelShow="isCancelShow" :idTypeCancel="idTypeCancel" @cancelShowBtn="cancelEnsure"
|
|
|
- :isShowhasPermission="isShowhasPermission" :applyForIsShow="applyForIsShow" :hasPermission="hasPermission"
|
|
|
- :jurisdictionList="jurisdictionList" />
|
|
|
+ </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>
|
|
@@ -200,14 +230,10 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import {
|
|
|
- activity,
|
|
|
- User
|
|
|
- } from "@/config/api.js"
|
|
|
- import {
|
|
|
- Throttle
|
|
|
- } from '@/config/util.js'
|
|
|
- import modalDialog from '@/components/modalDialog.vue'
|
|
|
+ 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 '../index.js'
|
|
|
let app = getApp()
|
|
|
export default {
|
|
@@ -220,373 +246,413 @@
|
|
|
haveData: true,
|
|
|
activeState: "1,2,3", //活动进行状态
|
|
|
activeStateName: '全部状态',
|
|
|
- selectShow: false,
|
|
|
+ selectShow: false,
|
|
|
+ dynamicList:[],
|
|
|
+ dynamicName:''
|
|
|
}
|
|
|
},
|
|
|
mixins: [myMixin],
|
|
|
components: {
|
|
|
- modalDialog
|
|
|
- },
|
|
|
- onLoad(option) {
|
|
|
- this.$store.dispatch("checkHandle",'load').then(res=>{
|
|
|
- app.globalData.isAuth = res.IsAuth;
|
|
|
- app.globalData.isBind = res.IsBind;
|
|
|
- if (res.IsAuth) { //未授权
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/authGuide/authGuide'
|
|
|
- })
|
|
|
- } else if (res.IsBind && !res.IsAuth) { //已授权未绑定
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/login/login'
|
|
|
- })}
|
|
|
- if (this.$db.get('historySearchListActivity')) {
|
|
|
- let historyList = JSON.parse(this.$db.get('historySearchListActivity'));
|
|
|
- this.historySearchList = historyList;
|
|
|
- }
|
|
|
- if (option.text) {
|
|
|
- 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.searchTxt = option.text
|
|
|
- this.activityTimeStatus = option.timeStatus;
|
|
|
- this.isGain = false
|
|
|
- this.isShowSearch = true
|
|
|
- } else {
|
|
|
- this.isGain = true
|
|
|
- }
|
|
|
- if (option.text) {
|
|
|
- this.searchHandle()
|
|
|
- }
|
|
|
- this.countryCcode()
|
|
|
- })
|
|
|
-
|
|
|
+ modalDialog,
|
|
|
+ areaCode
|
|
|
},
|
|
|
- /* 触底 */
|
|
|
- onReachBottom: Throttle(function() {
|
|
|
- if (this.status === 'nomore') return;
|
|
|
- this.status = 'loading';
|
|
|
- this.page_no++;
|
|
|
- this.getList()
|
|
|
- }),
|
|
|
methods: {
|
|
|
+ //获取快捷主题
|
|
|
+ fastSearchKeWord() {
|
|
|
+ activity.fastSearchKeWord({
|
|
|
+ ActiveState: this.activeState,
|
|
|
+ ActivityTypeIds: this.activityTypeIds,
|
|
|
+ ChartPermissionIds: this.chartPermissionIds,
|
|
|
+ WhichDay: this.activityTimeStatus,
|
|
|
+ Label:'More'
|
|
|
+ }).then(res => {
|
|
|
+ if (res.Ret !== 200) return
|
|
|
+ this.dynamicList = res.Data.List || []
|
|
|
+
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //主题的点击事件
|
|
|
+ //点击了快捷主题
|
|
|
+ changeTarget(val){
|
|
|
+ if(val){
|
|
|
+ this.dynamicName=val
|
|
|
+ }
|
|
|
+ if (this.isGain) {
|
|
|
+ this.empty()
|
|
|
+ this.getList()
|
|
|
+ }
|
|
|
+ this.getUserSearchContent()
|
|
|
+ this.isShowSearch=true
|
|
|
+
|
|
|
+ },
|
|
|
+ //清除主题的点击事件
|
|
|
+ //清除了快捷主题
|
|
|
+ clearDynamicName(){
|
|
|
+ this.dynamicName=''
|
|
|
+ this.searchTxt = ''
|
|
|
+ this.collectList = []
|
|
|
+ this.haveData = true
|
|
|
+ this.isShowSearch = false
|
|
|
+ },
|
|
|
+ // 遍历
|
|
|
preserve() {
|
|
|
- const arr = []
|
|
|
- const str = []
|
|
|
- this.listActivityStaus.forEach(item => {
|
|
|
- if (item.IsChoose) {
|
|
|
- arr.push(item.Id)
|
|
|
- str.push(item.StatusName)
|
|
|
- }
|
|
|
- })
|
|
|
- if (str.length == this.listActivityStaus.length) {
|
|
|
- this.activeStateName = '所有状态'
|
|
|
- } else if (str.length <= 0) {
|
|
|
- this.activeStateName = '活动状态'
|
|
|
- } else {
|
|
|
- this.activeStateName = str.join(',')
|
|
|
- }
|
|
|
- this.activeState = arr.join(',')
|
|
|
- const arrTwo = []
|
|
|
- this.activityTimeList.forEach(key => {
|
|
|
- if (key.IsChoose) {
|
|
|
- arrTwo.push(key.Id)
|
|
|
- }
|
|
|
- })
|
|
|
- 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 == this.listChartPermission.length) {
|
|
|
- this.chartPermissionName = '所有行业'
|
|
|
- } else if (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) {
|
|
|
- this.activityTypeName = '所有活动'
|
|
|
- } else if (lxStr.length <= 0) {
|
|
|
- this.activityTypeName = '活动类型'
|
|
|
- } else {
|
|
|
- this.activityTypeName = lxStr.join(',')
|
|
|
- }
|
|
|
- this.activityTypeIds = lxArr.join(',')
|
|
|
- this.getList()
|
|
|
- },
|
|
|
- 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()
|
|
|
- },
|
|
|
- searchHandle() {
|
|
|
- if (this.searchTxt) {
|
|
|
- //添加搜索记录
|
|
|
- if (!this.historySearchList.includes(this.searchTxt)) {
|
|
|
- this.historySearchList.unshift(this.searchTxt);
|
|
|
- this.$db.set('historySearchListActivity', JSON.stringify(this.historySearchList))
|
|
|
+ const arr = []
|
|
|
+ const str = []
|
|
|
+ this.listActivityStaus.forEach(item => {
|
|
|
+ if (item.IsChoose) {
|
|
|
+ arr.push(item.Id)
|
|
|
+ str.push(item.StatusName)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if (str.length == this.listActivityStaus.length ||str.length <= 0) {
|
|
|
+ this.activeStateName = '所有状态'
|
|
|
+ } else {
|
|
|
+ this.activeStateName = str.join(',')
|
|
|
+ }
|
|
|
+ this.activeState = arr.join(',')
|
|
|
+ const arrTwo = []
|
|
|
+ this.activityTimeList.forEach(key => {
|
|
|
+ if (key.IsChoose) {
|
|
|
+ arrTwo.push(key.Id)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ 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) {
|
|
|
+ this.activityTypeName = '所有类型'
|
|
|
+ }else {
|
|
|
+ this.activityTypeName = lxStr.join(',')
|
|
|
}
|
|
|
- this.isShowSearch = true
|
|
|
- if (this.isGain) {
|
|
|
- this.empty()
|
|
|
- this.getList()
|
|
|
+ this.activityTypeIds = lxArr.join(',')
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ // 通过分享进来的下拉选择的状态、关联
|
|
|
+ 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()
|
|
|
+ },
|
|
|
+ //搜索记录进来
|
|
|
+ searchHandle() {
|
|
|
+ if (this.searchTxt) {
|
|
|
+ //添加搜索记录
|
|
|
+ if (!this.historySearchList.includes(this.searchTxt)) {
|
|
|
+ this.historySearchList.unshift(this.searchTxt);
|
|
|
+ this.$db.set('historySearchListActivity', JSON.stringify(this.historySearchList))
|
|
|
+ }
|
|
|
+ this.isShowSearch = true
|
|
|
+ if (this.isGain) {
|
|
|
+ this.empty()
|
|
|
+ this.getList()
|
|
|
+ }
|
|
|
+ this.getUserSearchContent()
|
|
|
+ } else {
|
|
|
+ this.$util.toast('请输入关键字')
|
|
|
}
|
|
|
- this.getUserSearchContent()
|
|
|
- } else {
|
|
|
- this.$util.toast('请输入关键字')
|
|
|
- }
|
|
|
},
|
|
|
// 选择历史搜索
|
|
|
chooseTarget(item) {
|
|
|
- this.searchTxt = item;
|
|
|
- this.collectList = [];
|
|
|
- this.page_no = 1;
|
|
|
- this.searchHandle()
|
|
|
+ this.searchTxt = item;
|
|
|
+ this.collectList = [];
|
|
|
+ this.page_no = 1;
|
|
|
+ this.searchHandle()
|
|
|
},
|
|
|
/* 历史搜索清空 */
|
|
|
clearHistory() {
|
|
|
- this.historySearchList = [];
|
|
|
- this.$db.del('historySearchListActivity');
|
|
|
+ this.historySearchList = [];
|
|
|
+ this.$db.del('historySearchListActivity');
|
|
|
},
|
|
|
//获取列表
|
|
|
getList() {
|
|
|
- activity.getActivityList({
|
|
|
- PageSize: this.pageSize,
|
|
|
- CurrentIndex: this.page_no,
|
|
|
- ActiveState: this.activeState, //活动进行状态
|
|
|
- ActivityTypeIds: this.activityTypeIds, //活动类型id 多个用 , 隔开
|
|
|
- ChartPermissionIds: this.chartPermissionIds, //行业id 多个用 , 隔开
|
|
|
- KeyWord: this.searchTxt,
|
|
|
- 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;
|
|
|
+ activity.getActivityList({
|
|
|
+ PageSize: this.pageSize,
|
|
|
+ CurrentIndex: this.page_no,
|
|
|
+ ActiveState: this.activeState, //活动进行状态
|
|
|
+ ActivityTypeIds: this.activityTypeIds, //活动类型id 多个用 , 隔开
|
|
|
+ ChartPermissionIds: this.chartPermissionIds, //行业id 多个用 , 隔开
|
|
|
+ KeyWord: this.searchTxt,
|
|
|
+ WhichDay:this.activityTimeStatus,
|
|
|
+ Label:this.dynamicName
|
|
|
+ }).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)
|
|
|
}
|
|
|
- } else {
|
|
|
- this.collectList.push(...res.Data.List)
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
+ })
|
|
|
+ },
|
|
|
//获取活动详情接口
|
|
|
getUserSearchContent(name) {
|
|
|
- activity.getUserSearchContent({
|
|
|
- IsShowJurisdiction: this.isId
|
|
|
- }).then(res => {
|
|
|
- if (this.isGain) {
|
|
|
- res.Data.ListActivityStaus.forEach(item => {
|
|
|
- item.IsChoose = true
|
|
|
- })
|
|
|
- }
|
|
|
- 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 (this.isGain) {
|
|
|
- // this.preserve()
|
|
|
- } else {
|
|
|
- this.shareOption()
|
|
|
- }
|
|
|
- if (name == 'traverse') {
|
|
|
- const hyArr = []
|
|
|
- this.listChartPermission.forEach(key => {
|
|
|
- if (key.IsChoose) {
|
|
|
- hyArr.push(key.ChartPermissionId)
|
|
|
- }
|
|
|
- })
|
|
|
+ activity.getUserSearchContent({
|
|
|
+ IsShowJurisdiction: this.isId
|
|
|
+ }).then(res => {
|
|
|
+ if (this.isGain) {
|
|
|
+ res.Data.ListActivityStaus.forEach(item => {
|
|
|
+ item.IsChoose = true
|
|
|
+ })
|
|
|
+ }
|
|
|
+ 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 (this.isGain) {
|
|
|
+ // this.preserve()
|
|
|
+ } else {
|
|
|
+ this.shareOption()
|
|
|
+ }
|
|
|
+ if (name == 'traverse') {
|
|
|
+ const hyArr = []
|
|
|
+ this.listChartPermission.forEach(key => {
|
|
|
+ if (key.IsChoose) {
|
|
|
+ hyArr.push(key.ChartPermissionId)
|
|
|
+ }
|
|
|
+ })
|
|
|
|
|
|
- this.chartPermissionIds = hyArr.join(',')
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
+ this.chartPermissionIds = hyArr.join(',')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //恢复下拉选择的初始状态
|
|
|
empty() {
|
|
|
- this.listActivityStaus.forEach(item => item.IsChoose = true)
|
|
|
- this.activeState = '1,2,3'
|
|
|
- this.activeStateName = '全部状态'
|
|
|
- this.chartPermissionIds = ''
|
|
|
- this.activityTimeList.forEach(key => {key.IsChoose=false})
|
|
|
- this.activityTimeStatus=''
|
|
|
- this.listChartPermission.forEach(item => item.IsChoose = false)
|
|
|
- this.chartPermissionName = '行业分类'
|
|
|
- this.listActivityType.forEach(item => item.IsChoose = false)
|
|
|
- this.activityTypeIds = ''
|
|
|
- this.activityTypeName = '活动类型'
|
|
|
+ this.listActivityStaus.forEach(item => item.IsChoose = true)
|
|
|
+ this.activeState = '1,2,3'
|
|
|
+ this.activeStateName = '全部状态'
|
|
|
+ this.chartPermissionIds = ''
|
|
|
+ this.activityTimeList.forEach(key => {key.IsChoose=false})
|
|
|
+ this.activityTimeStatus=''
|
|
|
+ this.listChartPermission.forEach(item => item.IsChoose = false)
|
|
|
+ this.chartPermissionName = '所有分类'
|
|
|
+ this.listActivityType.forEach(item => item.IsChoose = false)
|
|
|
+ this.activityTypeIds = ''
|
|
|
+ this.activityTypeName = '所有类型'
|
|
|
},
|
|
|
/* 表单清空 */
|
|
|
clearIpt() {
|
|
|
- this.searchTxt = ''
|
|
|
- this.collectList = []
|
|
|
- this.haveData = true
|
|
|
- this.isShowSearch = false
|
|
|
- },
|
|
|
+ this.searchTxt = ''
|
|
|
+ this.collectList = []
|
|
|
+ this.haveData = true
|
|
|
+ this.isShowSearch = false
|
|
|
+ },
|
|
|
//取消弹框的确认事件
|
|
|
cancelEnsure(obj, type, unm) {
|
|
|
- this.init()
|
|
|
- if (obj.cutId == 0 || obj.name == 'conference') return
|
|
|
- this.modification(obj.cutId, 'IsSignup', obj.state)
|
|
|
- this.collectList.forEach(item => {
|
|
|
- if (obj.cutId == item.ActivityId) {
|
|
|
- item.IsSignup = obj.state
|
|
|
- if (unm) {
|
|
|
- item.SignupNum = item.SignupNum - 1
|
|
|
- this.modification(obj.cutId, 'SignupNum', item.SignupNum > 0 ? item.SignupNum - 1 : 0)
|
|
|
- } else {
|
|
|
- this.modification(obj.cutId, 'SignupNum', item.SignupNum + 1)
|
|
|
- item.SignupNum = item.SignupNum + 1
|
|
|
+ this.init()
|
|
|
+ if (obj.cutId == 0 || obj.name == 'conference') return
|
|
|
+ this.modification(obj.cutId, 'IsSignup', obj.state)
|
|
|
+ this.collectList.forEach(item => {
|
|
|
+ if (obj.cutId == item.ActivityId) {
|
|
|
+ item.IsSignup = obj.state
|
|
|
+ if (unm) {
|
|
|
+ item.SignupNum = item.SignupNum - 1
|
|
|
+ this.modification(obj.cutId, 'SignupNum', item.SignupNum > 0 ? item.SignupNum - 1 : 0)
|
|
|
+ } else {
|
|
|
+ this.modification(obj.cutId, 'SignupNum', item.SignupNum + 1)
|
|
|
+ item.SignupNum = item.SignupNum + 1
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- })
|
|
|
+ })
|
|
|
},
|
|
|
//添加会议提醒接口
|
|
|
meetingReminderAdd(id) {
|
|
|
- if (app.globalData.isBind && !app.globalData.isAuth) {
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/login/login'
|
|
|
- })
|
|
|
- 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
|
|
|
+ if (app.globalData.isBind && !app.globalData.isAuth) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/login/login'
|
|
|
+ })
|
|
|
+ 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.modification(id, '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
|
|
|
- }
|
|
|
+ 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
|
|
|
+ }
|
|
|
+ this.modification(id, '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
|
|
|
- }
|
|
|
- this.modification(id, 'IsCancelMeetingReminder', 0)
|
|
|
- })
|
|
|
+ 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
|
|
|
+ }
|
|
|
+ this.modification(id, 'IsCancelMeetingReminder', 0)
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
+ //状态变化了同步活动页面的状态
|
|
|
modification(id, type, num) {
|
|
|
- let pages = getCurrentPages()
|
|
|
- let prevPage = pages[pages.length - 2]
|
|
|
- if (prevPage.$page.fullPath == "/pages/activity/activity") {
|
|
|
- const index = prevPage.$vm.collectList.findIndex(item => item.ActivityId == id)
|
|
|
- if(index>=0) {
|
|
|
- prevPage.$vm.collectList[index][type] = num
|
|
|
+ let pages = getCurrentPages()
|
|
|
+ let prevPage = pages[pages.length - 2]
|
|
|
+ if (prevPage.$page.fullPath == "/pages/activity/activity") {
|
|
|
+ const index = prevPage.$vm.collectList.findIndex(item => item.ActivityId == id)
|
|
|
+ if(index>=0) {
|
|
|
+ prevPage.$vm.collectList[index][type] = num
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
- }
|
|
|
}
|
|
|
-
|
|
|
- },
|
|
|
- onShow() {
|
|
|
+ },
|
|
|
+ onShow() {
|
|
|
+ this.countryCcode()//判断是否加区号
|
|
|
this.$store.dispatch("statistics",{PageType:'ActivitSearch'})
|
|
|
},
|
|
|
- /**
|
|
|
- * 用户点击分享
|
|
|
- */
|
|
|
+ //load
|
|
|
+ onLoad(option) {
|
|
|
+ this.$store.dispatch("checkHandle",{type:'load',val:option}).then(res=>{
|
|
|
+ app.globalData.isAuth = res.IsAuth;
|
|
|
+ app.globalData.isBind = res.IsBind;
|
|
|
+ if (res.IsAuth) { //未授权
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/authGuide/authGuide'
|
|
|
+ })
|
|
|
+ } else if (res.IsBind && !res.IsAuth) { //已授权未绑定
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/login/login'
|
|
|
+ })}
|
|
|
+ if (this.$db.get('historySearchListActivity')) {
|
|
|
+ let historyList = JSON.parse(this.$db.get('historySearchListActivity'));
|
|
|
+ this.historySearchList = historyList;
|
|
|
+ }
|
|
|
+ if (option.text || option.dycName) {
|
|
|
+ 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.searchTxt = option.text
|
|
|
+ this.dynamicName = option.dycName ||''
|
|
|
+ this.activityTimeStatus = option.timeStatus;
|
|
|
+ this.isGain = false
|
|
|
+ this.isShowSearch = true
|
|
|
+ } else {
|
|
|
+ this.isGain = true
|
|
|
+ }
|
|
|
+ if (option.text) {
|
|
|
+ this.searchHandle()
|
|
|
+ }else if(option.dycName) {
|
|
|
+ this.changeTarget()
|
|
|
+ }
|
|
|
+ this.fastSearchKeWord()
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
+ /* 触底 */
|
|
|
+ onReachBottom: Throttle(function() {
|
|
|
+ if (this.status === 'nomore') return;
|
|
|
+ this.status = 'loading';
|
|
|
+ this.page_no++;
|
|
|
+ this.getList()
|
|
|
+ }),
|
|
|
+ /* 用户点击分享 */
|
|
|
onShareAppMessage: function(res) {
|
|
|
return {
|
|
|
- title: '活动',
|
|
|
+ title: '活动搜索',
|
|
|
path: '/activityPages/activitySearch/activitySearch?statesId=' + this.activeState + '&typeIds=' + this
|
|
|
.activityTypeIds + '&chartIds=' + this.chartPermissionIds + '&stateName=' + this.activeStateName +
|
|
|
'&chartName=' + this.chartPermissionName + '&typeName=' + this.activityTypeName + '&text=' + this
|
|
|
- .searchTxt +"&timeStatus=" + this.activityTimeStatus,
|
|
|
+ .searchTxt +"&timeStatus=" + this.activityTimeStatus+"&dycName="+this.dynamicName,
|
|
|
success: (res) => {},
|
|
|
fail: (err) => {}
|
|
|
}
|
|
@@ -605,5 +671,30 @@
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
- @import '../index.scss';
|
|
|
+ @import '../index.scss';
|
|
|
+ .dynamic-content {
|
|
|
+ padding: 0 0 0 0!important;
|
|
|
+ .target-title {
|
|
|
+ color: #333333 !important;
|
|
|
+ font-size: 28rpx !important;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .dynamic-name {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ padding: 36rpx 10rpx 20rpx !important;
|
|
|
+ color: #3385FF;
|
|
|
+ font-size: 28rpx;
|
|
|
+ text {
|
|
|
+ max-width: 100%;
|
|
|
+ padding-right: 40rpx;
|
|
|
+ overflow:hidden;
|
|
|
+ text-overflow:ellipsis;
|
|
|
+ white-space:nowrap;
|
|
|
+ }
|
|
|
+ icon {
|
|
|
+ width: 32rpx;
|
|
|
+ height: 32rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
</style>
|