activitySearch.vue 27 KB

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