activitySearch.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704
  1. <template>
  2. <view class="container activity-content">
  3. <view class="top-content">
  4. <!-- 搜索 -->
  5. <view class="searchTarget-header" v-if="!dynamicName">
  6. <input type="text" placeholder="请输入关键字" placeholder-class="sea_ipt_placeholder" class="sea_ipt"
  7. v-model="searchTxt" focus="true" confirm-type="search" @confirm="searchHandle" />
  8. <icon type="search" size="15" class="sea_ico" />
  9. <view class="ipt-right">
  10. <icon type="clear" size="16" color="#E0E0E0" v-show="searchTxt" @click="clearIpt" />
  11. <text class="line">|</text>
  12. <text @click="searchHandle" style="color: #3385FF;">搜索</text>
  13. </view>
  14. </view>
  15. <!-- 选中的气泡主题 -->
  16. <view class="dynamic-name" v-if="dynamicName">
  17. <text>{{dynamicName}}</text>
  18. <icon type="clear" size="16" color="#E0E0E0" @click="clearDynamicName"/>
  19. </view>
  20. <!-- 搜索历史 -->
  21. <view class="search-cont-top" v-if="!isShowSearch&&historySearchList.length">
  22. <view class="cont-tit">
  23. <text>搜索历史</text>
  24. <image src="@/static/img/empty_ico.png" class="empty_ico" @click="clearHistory"></image>
  25. </view>
  26. <view class="targetList">
  27. <view class="target-item" v-for="(item,index) in historySearchList" :key="index"
  28. @click="chooseTarget(item)">{{item}}</view>
  29. </view>
  30. </view>
  31. <!-- 气泡主题list -->
  32. <view class="dynamic-content" v-if="!isShowSearch">
  33. <view class="target-title">
  34. 更多主题搜索:
  35. </view>
  36. <view class="target-item">
  37. <view class="target-ul target-left">
  38. <view class="target-text" v-for="(item,index) in dynamicList" :key="index" v-if="index%2===0">
  39. <text @click="changeTarget(item.KeyWord)">
  40. {{item.KeyWord}}
  41. </text>
  42. </view>
  43. </view>
  44. <view class="target-ul target-right">
  45. <view class="target-text" v-for="(item,index) in dynamicList" :key="index" v-if="index%2 !== 0">
  46. <text @click="changeTarget(item.KeyWord)">
  47. {{item.KeyWord}}
  48. </text>
  49. </view>
  50. </view>
  51. </view>
  52. </view>
  53. <!-- 各种状态选择 -->
  54. <view class="select-conyent" v-if="isShowSearch">
  55. <van-dropdown-menu active-color="#333333">
  56. <van-dropdown-item id="statusstate" :title="activeStateName" @close="closeTheWindow('statusstate')">
  57. <view class="menu-items">
  58. <view class="menu-items-box" @click="overallBtn('statusstate',key)"
  59. v-for="key in listActivityStaus" :key="key.Id">
  60. <view class="items-box">
  61. <u-icon v-if="key.IsChoose" name="checkbox-mark" color="#2C83FF" size="24"></u-icon>
  62. </view>
  63. <text>{{key.StatusName}}</text>
  64. </view>
  65. </view>
  66. <view style="background-color: #f8f8fa;width: 100%;">
  67. <view style="margin: 0 auto;width: 682rpx;border-bottom: 2rpx solid #E5E5E5;">
  68. </view>
  69. </view>
  70. <view class="menu-items">
  71. <view class="menu-items-box" @click="timeListBtn('statusstate', key)"
  72. v-for="key in activityTimeList" :key="key.Id">
  73. <view class="items-box">
  74. <u-icon v-if="key.IsChoose" name="checkbox-mark" color="#2C83FF" size="24"></u-icon>
  75. </view>
  76. <text>{{ key.StatusName }}</text>
  77. </view>
  78. </view>
  79. <view class="replacement-box">
  80. <view class="replacement">
  81. <text @click="replacementBtn('statusstate')" class="replacement-box">重置</text>
  82. <text @click="replacementConfirm('statusstate')">确定</text>
  83. </view>
  84. </view>
  85. </van-dropdown-item>
  86. <van-dropdown-item id="industry" :title="chartPermissionName" @close="closeTheWindow('industry')">
  87. <view class="decide">
  88. <view class="items-box">
  89. <u-icon v-if="isShowJurisdiction" name="checkbox-mark" color="#2C83FF" size="24">
  90. </u-icon>
  91. </view>
  92. <text @click="isJurisdiction">始终只展示有权限的行业</text>
  93. </view>
  94. <view style="background-color: #f8f8fa;width: 100%;">
  95. <view style="margin: 0 auto;width: 682rpx;border-bottom: 2rpx solid #E5E5E5;">
  96. </view>
  97. </view>
  98. <view class="menu-items">
  99. <view class="menu-items-box" v-for="item in listChartPermission"
  100. :key="item.ChartPermissionId" @click="overallClick('industry',item)">
  101. <view class="items-box">
  102. <u-icon v-if="item.IsChoose" name="checkbox-mark"
  103. :color="isShowJurisdiction?'#ccc':'#2C83FF'" size="24"></u-icon>
  104. </view>
  105. <text>{{item.PermissionName}}</text>
  106. </view>
  107. </view>
  108. <view class="replacement">
  109. <text @click="replacementBtn('industry')" class="replacement-box">重置</text>
  110. <text @click="replacementConfirm('industry')">确定</text>
  111. </view>
  112. </van-dropdown-item>
  113. <van-dropdown-item id="genre" :title="activityTypeName" @close="closeTheWindow('genre')">
  114. <view class="menu-items">
  115. <view class="menu-items-box" @click="overallActivity('genre',item)"
  116. v-for="(item,index) in listActivityType" :key="item.ActivityTypeId">
  117. <view class="items-box">
  118. <u-icon v-if="item.IsChoose" name="checkbox-mark" color="#2C83FF" size="24">
  119. </u-icon>
  120. </view>
  121. <text>{{item.ActivityTypeName}}</text>
  122. </view>
  123. </view>
  124. <view class="replacement">
  125. <text @click="replacementBtn('genre')" class="replacement-box">重置</text>
  126. <text @click="replacementConfirm('genre')">确定</text>
  127. </view>
  128. </van-dropdown-item>
  129. </van-dropdown-menu>
  130. </view>
  131. </view>
  132. <!-- 内容列表部分 -->
  133. <view class="box-content" v-if="haveData" :class="{head:tabsActive==1}">
  134. <view class="content-list" v-for="(item,index) in collectList" :key="index">
  135. <view class="list-top">
  136. <view class="list-top-box">
  137. <text class="title">{{item.ActivityTypeName}}</text>
  138. <view class="city" v-if="item.City">
  139. <image src="../../static/img/location.png" mode=""></image>
  140. <text>{{item.City}}</text>
  141. </view>
  142. <view class="choose-limit" @click="strictSelection" v-if="item.IsShowSustainable">
  143. <image src="../../static/img/choose_icon.png" mode=""></image>
  144. <image class="limit-img" src="../../static/img/limit_icon.png" mode=""></image>
  145. </view>
  146. </view>
  147. <text style="color: #2ACDD9; font-size: 26rpx;" v-if="item.ActiveState==1">未开始</text>
  148. <text style="color: #FF4040; font-size: 26rpx;" v-if="item.ActiveState==2">进行中</text>
  149. <text style="color: #999999; font-size: 26rpx;" v-if="item.ActiveState==3">已结束</text>
  150. </view>
  151. <view class="" style="display: flex;">
  152. <view class="list-center" @click="goDetail(item)">
  153. <text class="title" v-if="item.IsBrackets==1">{{item.ActivityName}}</text>
  154. <text class="title-two" v-else>{{item.ActivityName}}</text>
  155. <view class="setting-center">
  156. <view class="">
  157. <view class="box-expert" style="padding-bottom: 30rpx ;"
  158. v-if="item.ActivityTypeName=='专家电话会'||item.ActivityTypeName=='专家线下沙龙'">
  159. <view style="width: 140rpx;">
  160. 专家背景:
  161. </view>
  162. <view style="width:400rpx;"><rich-text :nodes="item.Expert"></rich-text></view>
  163. </view>
  164. <text style="padding-bottom: 30rpx ;"
  165. v-if="item.ActivityTypeName=='公司调研电话会'||item.ActivityTypeName=='公司线下调研'">嘉宾:{{item.DistinguishedGuest}}</text>
  166. <text style="padding-bottom: 30rpx ;"
  167. v-if="item.ActivityTypeName=='分析师电话会'||item.ActivityTypeName=='分析师线下沙龙'">主讲人:{{item.Speaker}}</text>
  168. </view>
  169. </view>
  170. <text style="padding-bottom: 30rpx ;">活动时间:{{item.ActivityTimeText}}</text>
  171. </view>
  172. <view class="" style="display: flex;align-items: center;padding-right: 30rpx;">
  173. <u-icon style="padding-bottom: 30rpx ;" name="arrow-right" color="#BDBDBD" size="34"></u-icon>
  174. </view>
  175. </view>
  176. <view class="list-bottom"
  177. v-if="item.ActiveState==1 &&(item.IsLimitPeople==1 && item.ActivityTypeName=='公司调研电话会')">
  178. <view class="multi-text">
  179. <text v-if="item.IsSignup!==1"
  180. @click="wanttosignup(item.ActivityId)">我要报名({{item.SignupNum}}/{{item.LimitPeopleNum}})</text>
  181. <text v-else
  182. @click="signupCancel(item.ActivityId,2,item.ActivityTime)">{{item.SignupType ==1?'取消外呼':'取消报名'}}({{item.SignupNum}}/{{item.LimitPeopleNum}})</text>
  183. </view>
  184. </view>
  185. <view class="list-bottom" v-else-if="item.ActiveState==1">
  186. <view class="multi"
  187. v-if="item.ActivityTypeId==1||item.ActivityTypeId==2||(item.ActivityTypeId==3&&item.IsLimitPeople==0)">
  188. <text class="multi-outbound" v-if="item.IsSignup!==1"
  189. @click="signupAdd(item.ActivityId,1)">预约外呼</text>
  190. <text class="multi-outbound" v-else
  191. @click="signupCancel(item.ActivityId,1,item.ActivityTime)">取消外呼</text>
  192. <text class="multi-remind" v-if="item.IsCancelMeetingReminder==0"
  193. style="border-left: 1px solid #E5E5E5;"
  194. @click="meetingReminderAdd(item.ActivityId)">会议提醒</text>
  195. <text class="multi-remind" v-else style="border-left: 1px solid #E5E5E5;"
  196. @click="meetingReminderCancel(item.ActivityId)">取消会议提醒</text>
  197. </view>
  198. <view class="multi-text" v-else>
  199. <text v-if="item.IsSignup!==1"
  200. @click="signupAdd(item.ActivityId,3)">我要报名({{item.SignupNum}}/{{item.LimitPeopleNum}})</text>
  201. <text v-else
  202. @click="signupCancel(item.ActivityId,3,item.ActivityTime)">取消报名({{item.SignupNum}}/{{item.LimitPeopleNum}})</text>
  203. </view>
  204. </view>
  205. </view>
  206. <u-loadmore :status="status" icon-type="flower" :load-text="loadText" margin-top="20" v-if="totalPage>1" />
  207. </view>
  208. <!-- 缺审部分 -->
  209. <view class="nodata" v-else>
  210. <image src="@/static/img/act_search.png" mode="" class="nodata_ico"></image>
  211. <text>未找到搜索结果</text>
  212. </view>
  213. <!-- 各种自定义弹框 -->
  214. <modalDialog :isShow="isShow" :signupType="signupType" :goFollow="goFollow" :signupStatus="signupStatus"
  215. :hasPermission="hasPermission" :jurisdictionList="jurisdictionList" :editIsShow="editIsShow"
  216. :isCancelShow="isCancelShow" :idTypeCancel="idTypeCancel" @cancelShowBtn="cancelEnsure"
  217. :countryCode="countryCode" :mobileEdit="mobileEdit" :goOnNextStep="goOnNextStep"
  218. :isShowhasPermission="isShowhasPermission" :applyForIsShow="applyForIsShow"
  219. :mailboxBinding="mailboxBinding"/>
  220. <!-- 选择区号弹出层 -->
  221. <areaCode :isAreaCode="isAreaCode" :areaCode="areaCode" />
  222. <!-- 参会方式弹出层 -->
  223. <view class="select-box">
  224. <u-popup v-model="selectShow" mode="bottom">
  225. <view style="color: #333333;font-size: 28rpxrpx;">请选择参会方式</view>
  226. <view style="color: #2C83FF;" @click="signupAdd('id',1)">预约外呼</view>
  227. <view style="color: #2C83FF;" @click="signupAdd('id',2)">自主拨入</view>
  228. <view style="color: #A9AFB8;" @click="selectShow=false">取消</view>
  229. </u-popup>
  230. </view>
  231. </view>
  232. </template>
  233. <script>
  234. import { activity, User } from "@/config/api.js"
  235. import { Throttle } from '@/config/util.js'
  236. import modalDialog from '@/components/modalDialog.vue'
  237. import areaCode from "@/components/areaCode.vue";
  238. import myMixin from '../index.js'
  239. let app = getApp()
  240. export default {
  241. data() {
  242. return {
  243. searchTxt: '',
  244. isShowSearch: false,
  245. status: 'loadmore',
  246. totalPage: '',
  247. haveData: true,
  248. activeState: "1,2,3", //活动进行状态
  249. activeStateName: '全部状态',
  250. selectShow: false,
  251. dynamicList:[],
  252. dynamicName:''
  253. }
  254. },
  255. mixins: [myMixin],
  256. components: {
  257. modalDialog,
  258. areaCode
  259. },
  260. methods: {
  261. //获取快捷主题
  262. fastSearchKeWord() {
  263. activity.fastSearchKeWord({
  264. ActiveState: this.activeState,
  265. ActivityTypeIds: this.activityTypeIds,
  266. ChartPermissionIds: this.chartPermissionIds,
  267. WhichDay: this.activityTimeStatus,
  268. Label:'More'
  269. }).then(res => {
  270. if (res.Ret !== 200) return
  271. this.dynamicList = res.Data.List || []
  272. })
  273. },
  274. //主题的点击事件
  275. //点击了快捷主题
  276. changeTarget(val){
  277. if(val){
  278. this.dynamicName=val
  279. }
  280. if (this.isGain) {
  281. this.empty()
  282. this.getList()
  283. }
  284. this.getUserSearchContent()
  285. this.isShowSearch=true
  286. },
  287. //清除主题的点击事件
  288. //清除了快捷主题
  289. clearDynamicName(){
  290. this.dynamicName=''
  291. this.searchTxt = ''
  292. this.collectList = []
  293. this.haveData = true
  294. this.isShowSearch = false
  295. },
  296. // 遍历
  297. preserve() {
  298. const arr = []
  299. const str = []
  300. this.listActivityStaus.forEach(item => {
  301. if (item.IsChoose) {
  302. arr.push(item.Id)
  303. str.push(item.StatusName)
  304. }
  305. })
  306. if (str.length == this.listActivityStaus.length ||str.length <= 0) {
  307. this.activeStateName = '所有状态'
  308. } else {
  309. this.activeStateName = str.join(',')
  310. }
  311. this.activeState = arr.join(',')
  312. const arrTwo = []
  313. this.activityTimeList.forEach(key => {
  314. if (key.IsChoose) {
  315. arrTwo.push(key.Id)
  316. }
  317. })
  318. this.activityTimeStatus = arrTwo.join(',')
  319. const hyArr = []
  320. const hyStr = []
  321. this.listChartPermission.forEach(key => {
  322. if (key.IsChoose) {
  323. hyArr.push(key.ChartPermissionId)
  324. hyStr.push(key.PermissionName)
  325. }
  326. })
  327. if ((hyStr.length == 6 && this.listChartPermission.length == 6)|| hyStr.length <= 0) {
  328. this.chartPermissionName = '所有行业'
  329. }else {
  330. this.chartPermissionName = hyStr.join(',')
  331. }
  332. this.chartPermissionIds = hyArr.join(',')
  333. const lxArr = []
  334. const lxStr = []
  335. this.listActivityType.forEach(key => {
  336. if (key.IsChoose) {
  337. lxArr.push(key.ActivityTypeId)
  338. lxStr.push(key.ActivityTypeName)
  339. }
  340. })
  341. if (lxStr.length == this.listActivityType.length ||lxStr.length <= 0) {
  342. this.activityTypeName = '所有类型'
  343. }else {
  344. this.activityTypeName = lxStr.join(',')
  345. }
  346. this.activityTypeIds = lxArr.join(',')
  347. this.getList()
  348. },
  349. // 通过分享进来的下拉选择的状态、关联
  350. shareOption() {
  351. const arr = this.activeState.split(',').map(item => item - 0)
  352. this.listActivityStaus.forEach(item => {
  353. if (arr.indexOf(item.Id) !== -1) {
  354. item.IsChoose = true
  355. } else {
  356. item.IsChoose = false
  357. }
  358. })
  359. const arrTwo = this.activityTimeStatus.split(',').map(item => item - 0)
  360. this.activityTimeList.forEach(item => {
  361. if (arrTwo.indexOf(item.Id) !== -1) {
  362. item.IsChoose = true
  363. } else {
  364. item.IsChoose = false
  365. }
  366. })
  367. const hyarr = this.chartPermissionIds.split(',').map(item => item - 0)
  368. this.listChartPermission.forEach(key => {
  369. if (hyarr.indexOf(key.ChartPermissionId) !== -1) {
  370. key.IsChoose = true
  371. } else {
  372. key.IsChoose = false
  373. }
  374. })
  375. const lxarr = this.activityTypeIds.split(',').map(item => item - 0)
  376. this.listActivityType.forEach(key => {
  377. if (lxarr.indexOf(key.ActivityTypeId) !== -1) {
  378. key.IsChoose = true
  379. } else {
  380. key.IsChoose = false
  381. }
  382. })
  383. this.preserve()
  384. },
  385. //搜索记录进来
  386. searchHandle() {
  387. if (this.searchTxt) {
  388. //添加搜索记录
  389. if (!this.historySearchList.includes(this.searchTxt)) {
  390. this.historySearchList.unshift(this.searchTxt);
  391. this.$db.set('historySearchListActivity', JSON.stringify(this.historySearchList))
  392. }
  393. this.isShowSearch = true
  394. if (this.isGain) {
  395. this.empty()
  396. this.getList()
  397. }
  398. this.getUserSearchContent()
  399. } else {
  400. this.$util.toast('请输入关键字')
  401. }
  402. },
  403. // 选择历史搜索
  404. chooseTarget(item) {
  405. this.searchTxt = item;
  406. this.collectList = [];
  407. this.page_no = 1;
  408. this.searchHandle()
  409. },
  410. /* 历史搜索清空 */
  411. clearHistory() {
  412. this.historySearchList = [];
  413. this.$db.del('historySearchListActivity');
  414. },
  415. //获取列表
  416. getList() {
  417. activity.getActivityList({
  418. PageSize: this.pageSize,
  419. CurrentIndex: this.page_no,
  420. ActiveState: this.activeState, //活动进行状态
  421. ActivityTypeIds: this.activityTypeIds, //活动类型id 多个用 , 隔开
  422. ChartPermissionIds: this.chartPermissionIds, //行业id 多个用 , 隔开
  423. KeyWord: this.searchTxt,
  424. WhichDay:this.activityTimeStatus,
  425. Label:this.dynamicName
  426. }).then(res => {
  427. if (res.Ret !== 200) return
  428. this.status = this.page_no < res.Data.Paging.Pages ? 'loadmore' : 'nomore';
  429. this.totalPage = res.Data.Paging.Pages; //总页数
  430. if (this.page_no === 1) {
  431. this.collectList = res.Data.List || [];
  432. this.haveData = this.collectList.length ? true : false
  433. if (this.refresh) {
  434. uni.stopPullDownRefresh();
  435. this.refresh = false;
  436. }
  437. } else {
  438. this.collectList.push(...res.Data.List)
  439. }
  440. })
  441. },
  442. //获取活动详情接口
  443. getUserSearchContent(name) {
  444. activity.getUserSearchContent({
  445. IsShowJurisdiction: this.isId
  446. }).then(res => {
  447. if (this.isGain) {
  448. res.Data.ListActivityStaus.forEach(item => {
  449. item.IsChoose = true
  450. })
  451. }
  452. this.isShowJurisdiction = res.Data.IsShowJurisdiction
  453. this.listActivityStaus = res.Data.ListActivityStaus
  454. this.listActivityType = res.Data.ListActivityType
  455. this.listChartPermission = res.Data.ListChartPermission || []
  456. this.listChartPermissionInit = res.Data.ListChartPermission2
  457. if (this.isGain) {
  458. // this.preserve()
  459. } else {
  460. this.shareOption()
  461. }
  462. if (name == 'traverse') {
  463. const hyArr = []
  464. this.listChartPermission.forEach(key => {
  465. if (key.IsChoose) {
  466. hyArr.push(key.ChartPermissionId)
  467. }
  468. })
  469. this.chartPermissionIds = hyArr.join(',')
  470. }
  471. })
  472. },
  473. //恢复下拉选择的初始状态
  474. empty() {
  475. this.listActivityStaus.forEach(item => item.IsChoose = true)
  476. this.activeState = '1,2,3'
  477. this.activeStateName = '全部状态'
  478. this.chartPermissionIds = ''
  479. this.activityTimeList.forEach(key => {key.IsChoose=false})
  480. this.activityTimeStatus=''
  481. this.listChartPermission.forEach(item => item.IsChoose = false)
  482. this.chartPermissionName = '所有行业'
  483. this.listActivityType.forEach(item => item.IsChoose = false)
  484. this.activityTypeIds = ''
  485. this.activityTypeName = '所有类型'
  486. },
  487. /* 表单清空 */
  488. clearIpt() {
  489. this.searchTxt = ''
  490. this.collectList = []
  491. this.haveData = true
  492. this.isShowSearch = false
  493. },
  494. //取消弹框的确认事件
  495. cancelEnsure(obj, type, unm) {
  496. this.init()
  497. if (obj.cutId == 0 || obj.name == 'conference') return
  498. this.modification(obj.cutId, 'IsSignup', obj.state)
  499. this.collectList.forEach(item => {
  500. if (obj.cutId == item.ActivityId) {
  501. item.IsSignup = obj.state
  502. if (unm) {
  503. item.SignupNum = item.SignupNum - 1
  504. this.modification(obj.cutId, 'SignupNum', item.SignupNum > 0 ? item.SignupNum - 1 : 0)
  505. } else {
  506. this.modification(obj.cutId, 'SignupNum', item.SignupNum + 1)
  507. item.SignupNum = item.SignupNum + 1
  508. }
  509. }
  510. })
  511. },
  512. //添加会议提醒接口
  513. meetingReminderAdd(id) {
  514. if (app.globalData.isBind && !app.globalData.isAuth) {
  515. uni.navigateTo({
  516. url: '/pages/login/login'
  517. })
  518. return
  519. }
  520. activity.meetingReminderAdd({
  521. ActivityId: id
  522. }).then(res => {
  523. if (res.Ret == 200) {
  524. this.hasPermission = res.Data.HasPermission
  525. if (this.hasPermission == 1) {
  526. if (res.Data.GoFollow && res.Data.SignupStatus !== 'Success' || !res.Data
  527. .GoFollow) {
  528. this.isShow = true
  529. } else {
  530. this.goFollow = res.Data.GoFollow
  531. }
  532. this.signupType = 999
  533. this.signupStatus = res.Data.SignupStatus
  534. this.idTypeCancel = {
  535. cutId: res.Data.ActivityId,
  536. state: 1,
  537. name: 'conference'
  538. }
  539. this.collectList.forEach(item => {
  540. if (id == item.ActivityId) {
  541. item.IsCancelMeetingReminder = 1
  542. }
  543. this.modification(id, 'IsCancelMeetingReminder', 1)
  544. })
  545. } else if (this.hasPermission == 2) {
  546. this.jurisdictionList.SellerMobile = res.Data.SellerMobile
  547. this.jurisdictionList.PopupMsg = res.Data.PopupMsg
  548. this.isShowhasPermission = true
  549. } else if (this.hasPermission == 3 || this.hasPermission == 4) {
  550. this.jurisdictionList.PopupMsg = res.Data.PopupMsg
  551. this.applyForIsShow = true
  552. }
  553. }
  554. })
  555. },
  556. //取消会议提醒接口
  557. meetingReminderCancel(id) {
  558. activity.meetingReminderCancel({
  559. ActivityId: id
  560. }).then(res => {
  561. if (res.Ret == 200) {
  562. uni.showModal({
  563. confirmText: '知道了',
  564. confirmColor: '#3385FF',
  565. content: res.Msg,
  566. showCancel: false,
  567. success: (res) => {
  568. if (res.confirm) {
  569. this.collectList.forEach(item => {
  570. if (id == item.ActivityId) {
  571. item.IsCancelMeetingReminder = 0
  572. }
  573. this.modification(id, 'IsCancelMeetingReminder', 0)
  574. })
  575. }
  576. }
  577. })
  578. }
  579. })
  580. },
  581. //状态变化了同步活动页面的状态
  582. modification(id, type, num) {
  583. let pages = getCurrentPages()
  584. let prevPage = pages[pages.length - 2]
  585. if (prevPage.$page.fullPath == "/pages/activity/activity") {
  586. const index = prevPage.$vm.collectList.findIndex(item => item.ActivityId == id)
  587. if(index>=0) {
  588. prevPage.$vm.collectList[index][type] = num
  589. }
  590. }
  591. }
  592. },
  593. onShow() {
  594. this.countryCcode()//判断是否加区号
  595. this.$store.dispatch("statistics",{PageType:'ActivitSearch'})
  596. },
  597. //load
  598. onLoad(option) {
  599. this.$store.dispatch("checkHandle",{type:'load',val:option}).then(res=>{
  600. app.globalData.isAuth = res.IsAuth;
  601. app.globalData.isBind = res.IsBind;
  602. if (res.IsAuth) { //未授权
  603. uni.navigateTo({
  604. url: '/pages/authGuide/authGuide'
  605. })
  606. } else if (res.IsBind && !res.IsAuth) { //已授权未绑定
  607. uni.navigateTo({
  608. url: '/pages/login/login'
  609. })}
  610. if (this.$db.get('historySearchListActivity')) {
  611. let historyList = JSON.parse(this.$db.get('historySearchListActivity'));
  612. this.historySearchList = historyList;
  613. }
  614. if (option.text || option.dycName) {
  615. this.activeState = option.statesId //活动进行状态
  616. this.activityTypeIds = option.typeIds //活动类型id 多个用 , 隔开
  617. this.chartPermissionIds = option.chartIds //行业id 多个用 , 隔开
  618. this.activeStateName = option.stateName
  619. this.chartPermissionName = option.chartName
  620. this.activityTypeName = option.typeName
  621. this.searchTxt = option.text
  622. this.dynamicName = option.dycName ||''
  623. this.activityTimeStatus = option.timeStatus;
  624. this.isGain = false
  625. this.isShowSearch = true
  626. } else {
  627. this.isGain = true
  628. }
  629. if (option.text) {
  630. this.searchHandle()
  631. }else if(option.dycName) {
  632. this.changeTarget()
  633. }
  634. this.fastSearchKeWord()
  635. })
  636. },
  637. /* 触底 */
  638. onReachBottom: Throttle(function() {
  639. if (this.status === 'nomore') return;
  640. this.status = 'loading';
  641. this.page_no++;
  642. this.getList()
  643. }),
  644. /* 用户点击分享 */
  645. onShareAppMessage: function(res) {
  646. return {
  647. title: '活动搜索',
  648. path: '/activityPages/activitySearch/activitySearch?statesId=' + this.activeState + '&typeIds=' + this
  649. .activityTypeIds + '&chartIds=' + this.chartPermissionIds + '&stateName=' + this.activeStateName +
  650. '&chartName=' + this.chartPermissionName + '&typeName=' + this.activityTypeName + '&text=' + this
  651. .searchTxt +"&timeStatus=" + this.activityTimeStatus+"&dycName="+this.dynamicName,
  652. success: (res) => {},
  653. fail: (err) => {}
  654. }
  655. },
  656. /* 下拉刷新 */
  657. onPullDownRefresh: Throttle(function() {
  658. this.page_no = 1;
  659. this.refresh = true;
  660. if (this.tabsActive == 0) {
  661. this.getList()
  662. } else {
  663. this.getScheduleList()
  664. }
  665. }),
  666. }
  667. </script>
  668. <style scoped lang="scss">
  669. @import '../index.scss';
  670. .dynamic-content {
  671. padding: 0 0 0 0!important;
  672. .target-title {
  673. color: #333333 !important;
  674. font-size: 28rpx !important;
  675. }
  676. }
  677. .dynamic-name {
  678. display: flex;
  679. align-items: center;
  680. padding: 36rpx 10rpx 20rpx !important;
  681. color: #3385FF;
  682. font-size: 28rpx;
  683. text {
  684. max-width: 100%;
  685. padding-right: 40rpx;
  686. overflow:hidden;
  687. text-overflow:ellipsis;
  688. white-space:nowrap;
  689. }
  690. icon {
  691. width: 32rpx;
  692. height: 32rpx;
  693. }
  694. }
  695. </style>