activitySearch.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646
  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 && !dynamicName">
  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" :class="dynamicName ? 'activity-page' : ''">
  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"> </image>
  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 class="img-type">
  141. <image :src="item.ImgUrlText" mode=""></image>
  142. </view>
  143. </view>
  144. <view class="item">
  145. <view class="item-text" @click="goDetail(item)">
  146. <text class="activity-title"> {{ item.ActivityName }} </text>
  147. <text class="text_twoLine" v-if="item.Expert">专家背景:{{ item.Expert }} </text>
  148. <text class="text_twoLine" v-if="item.DistinguishedGuest">嘉宾:{{ item.DistinguishedGuest }} </text>
  149. <text class="text_twoLine" v-if="item.Speaker">主讲人:{{ item.Speaker }}</text>
  150. </view>
  151. <block v-if="item.ActiveState == 1">
  152. <view class="bottom-box city" v-if="item.ActiveState == 1 && item.IsLimitPeople == 1 && item.ActivityTypeId == 3">
  153. <view class="city-img">
  154. <image v-if="item.City" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/location.png"></image>
  155. {{ item.City }}
  156. </view>
  157. <view style="display: flex">
  158. <text v-if="item.IsShowAppointment" @click="summaryIsHandel(item)">{{ item.IsAppointment == 1 ? "取消纪要" : "预约纪要" }}</text>
  159. <text class="button" v-if="item.IsSignup !== 1" @click="wanttosignup(item.ActivityId)">我要报名</text>
  160. <text class="button" v-else @click="signupIsAddOfCancel(item, 2)">{{ item.IsSignup == 1 ? "取消外呼" : "取消报名" }}</text>
  161. </view>
  162. </view>
  163. <view class="bottom-box" :class="(item.ActivityTypeId == 1 || item.ActivityTypeId == 2) ? 'four-btn' : ''" v-else-if="item.ActivityType == 1">
  164. <block v-if="item.IsCClassMeeting">
  165. <text class="button" @click="signupIsAddOfCancel(item, 3)">{{ item.IsSignup == 1 ? "取消报名" : "我要报名" }}</text>
  166. </block>
  167. <block v-else>
  168. <text class="button" @click="signupIsAddOfCancel(item, 1)">{{ item.IsSignup == 1 ? "取消外呼" : "预约外呼" }}</text>
  169. <text v-if="item.IsShowAppointment" @click="summaryIsHandel(item)">{{ item.IsAppointment == 1 ? "取消纪要" : "预约纪要" }}</text>
  170. <text @click="meetingReminderAdd(item.ActivityId)" v-if="item.IsCancelMeetingReminder == 0">会议提醒</text>
  171. <text @click="meetingReminderCancel(item.ActivityId)" v-else>取消提醒</text>
  172. <view class="" style="width: 130rpx" v-if="item.ActivityTypeId != 7 && item.ActivityTypeId != 3">
  173. <text @click="askingGo(item)">帮我带问</text>
  174. </view>
  175. </block>
  176. </view>
  177. <view class="bottom-box city" v-else>
  178. <view class="city-img">
  179. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/location.png"></image>
  180. {{ item.City }}
  181. </view>
  182. <view style="display: flex">
  183. <text v-if="item.IsShowAppointment" @click="summaryIsHandel(item)">{{ item.IsAppointment == 1 ? "取消纪要" : "预约纪要" }}</text>
  184. <text class="button" @click="signupIsAddOfCancel(item, 3)">{{ item.IsSignup == 1 ? "取消报名" : "我要报名" }}</text>
  185. </view>
  186. </view>
  187. </block>
  188. <block v-else>
  189. <view class="bottom-box city" v-if="item.City">
  190. <view class="city-img">
  191. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/location.png" />
  192. {{ item.City }}
  193. </view>
  194. </view>
  195. <view class="bottom-box real-time" v-if="item.ActiveState == 2 && item.ActivityTypeId == 1">
  196. <text class="button" @click="askingGo(item, '提问')">实时提问</text>
  197. </view>
  198. </block>
  199. </view>
  200. </view>
  201. </view>
  202. <u-loadmore :status="status" icon-type="flower" :load-text="loadText" margin-top="20" v-if="totalPage > 1" />
  203. </view>
  204. </view>
  205. <!-- 缺审部分 -->
  206. <view class="nodata" v-else>
  207. <image src="https://hzstatic.hzinsights.com/cygx/czbk/act_search.png" mode="" class="nodata_ico"></image>
  208. <text>未找到搜索结果</text>
  209. </view>
  210. <!-- 各种自定义弹框 -->
  211. <modalDialog
  212. :isShow="isShow"
  213. :signupType="signupType"
  214. :goFollow="goFollow"
  215. :signupStatus="signupStatus"
  216. :hasPermission="hasPermission"
  217. :jurisdictionList="jurisdictionList"
  218. :editIsShow="editIsShow"
  219. :isCancelShow="isCancelShow"
  220. :idTypeCancel="idTypeCancel"
  221. @cancelShowBtn="cancelEnsure"
  222. :countryCode="countryCode"
  223. :mobileEdit="mobileEdit"
  224. :goOnNextStep="goOnNextStep"
  225. :isShowhasPermission="isShowhasPermission"
  226. :applyForIsShow="applyForIsShow"
  227. :mailboxBinding="mailboxBinding"
  228. />
  229. <!-- 选择区号弹出层 -->
  230. <areaCode :isAreaCode="isAreaCode" :areaCode="areaCode" />
  231. <!-- 参会方式弹出层 -->
  232. <view class="select-box">
  233. <u-popup v-model="selectShow" mode="bottom">
  234. <view style="color: #333333; font-size: 28rpxrpx">请选择参会方式</view>
  235. <view style="color: #2c83ff" @click="signupAdd('id', 1)">预约外呼</view>
  236. <view style="color: #2c83ff" @click="signupAdd('id', 2)">自主拨入</view>
  237. <view style="color: #a9afb8" @click="selectShow = false">取消</view>
  238. </u-popup>
  239. </view>
  240. <freeCharge class="free-charge" :isShowFreeBtn="isShowFree" />
  241. </view>
  242. </template>
  243. <script>
  244. import { activity, User } from "@/config/api.js";
  245. import { Throttle } from "@/config/util.js";
  246. import modalDialog from "@/components/modalDialog.vue";
  247. import areaCode from "@/activityPages/components/areaCode.vue";
  248. import myMixin from "../components/index.js";
  249. import myActivityMixin from "../components/indexActivity.js";
  250. import freeCharge from "@/components/freeCharge";
  251. let app = getApp({ allowDefault: true });
  252. export default {
  253. data() {
  254. return {
  255. searchTxt: "",
  256. isShowSearch: false,
  257. status: "loadmore",
  258. totalPage: "",
  259. haveData: true,
  260. activeState: "1,2,3", //活动进行状态
  261. activeStateName: "全部状态",
  262. selectShow: false,
  263. dynamicList: [],
  264. dynamicName: "",
  265. };
  266. },
  267. mixins: [myMixin, myActivityMixin],
  268. components: {
  269. modalDialog,
  270. areaCode,
  271. freeCharge,
  272. },
  273. methods: {
  274. //获取快捷主题
  275. fastSearchKeWord() {
  276. activity
  277. .fastSearchKeWord({
  278. ActiveState: this.activeState,
  279. ActivityTypeIds: this.activityTypeIds,
  280. ChartPermissionIds: this.chartPermissionIds,
  281. WhichDay: this.activityTimeStatus,
  282. Label: "More",
  283. })
  284. .then((res) => {
  285. if (res.Ret !== 200) return;
  286. this.dynamicList = res.Data.List || [];
  287. });
  288. },
  289. //主题的点击事件
  290. //点击了快捷主题
  291. changeTarget(val) {
  292. if (val) {
  293. this.dynamicName = val;
  294. }
  295. if (this.isGain) {
  296. this.empty();
  297. this.getList();
  298. }
  299. this.getUserSearchContent();
  300. this.isShowSearch = true;
  301. },
  302. //清除主题的点击事件
  303. //清除了快捷主题
  304. clearDynamicName() {
  305. this.dynamicName = "";
  306. this.searchTxt = "";
  307. this.collectList = [];
  308. this.haveData = true;
  309. this.isShowSearch = false;
  310. },
  311. // 遍历
  312. preserve() {
  313. const arr = [];
  314. const str = [];
  315. this.listActivityStaus.forEach((item) => {
  316. if (item.IsChoose) {
  317. arr.push(item.Id);
  318. str.push(item.StatusName);
  319. }
  320. });
  321. if (str.length == this.listActivityStaus.length || str.length <= 0) {
  322. this.activeStateName = "所有状态";
  323. } else {
  324. this.activeStateName = str.join(",");
  325. }
  326. this.activeState = arr.join(",");
  327. const arrTwo = [];
  328. this.activityTimeList.forEach((key) => {
  329. if (key.IsChoose) {
  330. arrTwo.push(key.Id);
  331. }
  332. });
  333. this.activityTimeStatus = arrTwo.join(",");
  334. const hyArr = [];
  335. const hyStr = [];
  336. this.listChartPermission.forEach((key) => {
  337. if (key.IsChoose) {
  338. hyArr.push(key.ChartPermissionId);
  339. hyStr.push(key.PermissionName);
  340. }
  341. });
  342. if ((hyStr.length == 6 && this.listChartPermission.length == 6) || hyStr.length <= 0) {
  343. this.chartPermissionName = "所有行业";
  344. } else {
  345. this.chartPermissionName = hyStr.join(",");
  346. }
  347. this.chartPermissionIds = hyArr.join(",");
  348. const lxArr = [];
  349. const lxStr = [];
  350. this.listActivityType.forEach((key) => {
  351. if (key.IsChoose) {
  352. lxArr.push(key.ActivityTypeId);
  353. lxStr.push(key.ActivityTypeName);
  354. }
  355. });
  356. if (lxStr.length == this.listActivityType.length || lxStr.length <= 0) {
  357. this.activityTypeName = "所有类型";
  358. } else {
  359. this.activityTypeName = lxStr.join(",");
  360. }
  361. this.activityTypeIds = lxArr.join(",");
  362. this.getList();
  363. },
  364. // 通过分享进来的下拉选择的状态、关联
  365. shareOption() {
  366. const arr = this.activeState.split(",").map((item) => item - 0);
  367. this.listActivityStaus.forEach((item) => {
  368. if (arr.indexOf(item.Id) !== -1) {
  369. item.IsChoose = true;
  370. } else {
  371. item.IsChoose = false;
  372. }
  373. });
  374. const arrTwo = this.activityTimeStatus.split(",").map((item) => item - 0);
  375. this.activityTimeList.forEach((item) => {
  376. if (arrTwo.indexOf(item.Id) !== -1) {
  377. item.IsChoose = true;
  378. } else {
  379. item.IsChoose = false;
  380. }
  381. });
  382. const hyarr = this.chartPermissionIds.split(",").map((item) => item - 0);
  383. this.listChartPermission.forEach((key) => {
  384. if (hyarr.indexOf(key.ChartPermissionId) !== -1) {
  385. key.IsChoose = true;
  386. } else {
  387. key.IsChoose = false;
  388. }
  389. });
  390. const lxarr = this.activityTypeIds.split(",").map((item) => item - 0);
  391. this.listActivityType.forEach((key) => {
  392. if (lxarr.indexOf(key.ActivityTypeId) !== -1) {
  393. key.IsChoose = true;
  394. } else {
  395. key.IsChoose = false;
  396. }
  397. });
  398. this.preserve();
  399. },
  400. //搜索记录进来
  401. searchHandle() {
  402. if (this.searchTxt) {
  403. this.page_no = 1;
  404. //添加搜索记录
  405. if (!this.historySearchList.includes(this.searchTxt)) {
  406. this.historySearchList.unshift(this.searchTxt);
  407. this.$db.set("historySearchListActivity", JSON.stringify(this.historySearchList));
  408. }
  409. this.isShowSearch = true;
  410. if (this.isGain) {
  411. this.empty();
  412. this.getList();
  413. }
  414. this.getUserSearchContent();
  415. } else {
  416. this.$util.toast("请输入关键字");
  417. }
  418. },
  419. // 选择历史搜索
  420. chooseTarget(item) {
  421. this.searchTxt = item;
  422. this.collectList = [];
  423. this.page_no = 1;
  424. this.searchHandle();
  425. },
  426. /* 历史搜索清空 */
  427. clearHistory() {
  428. this.historySearchList = [];
  429. this.$db.del("historySearchListActivity");
  430. },
  431. //获取列表
  432. async getList() {
  433. const res = this.dynamicName
  434. ? await activity.getActivityListNew({
  435. PageSize: this.pageSize,
  436. CurrentIndex: this.page_no,
  437. ActiveState: "2,3", //活动进行状态
  438. Label: this.dynamicName,
  439. })
  440. : await activity.getActivityList({
  441. PageSize: this.pageSize,
  442. CurrentIndex: this.page_no,
  443. ActiveState: this.activeState, //活动进行状态
  444. ActivityTypeIds: this.activityTypeIds, //活动类型id 多个用 , 隔开
  445. ChartPermissionIds: this.chartPermissionIds, //行业id 多个用 , 隔开
  446. KeyWord: this.searchTxt,
  447. WhichDay: this.activityTimeStatus,
  448. });
  449. if (res.Ret !== 200) return;
  450. this.status = this.page_no < res.Data.Paging.Pages ? "loadmore" : "nomore";
  451. this.totalPage = res.Data.Paging.Pages; //总页数
  452. if (this.page_no === 1) {
  453. this.collectList = res.Data.List || [];
  454. this.haveData = this.collectList.length ? true : false;
  455. if (this.refresh) {
  456. uni.stopPullDownRefresh();
  457. this.refresh = false;
  458. }
  459. } else {
  460. this.collectList.push(...res.Data.List);
  461. }
  462. },
  463. //获取活动详情接口
  464. getUserSearchContent(name) {
  465. activity
  466. .getUserSearchContent({
  467. IsShowJurisdiction: this.isId,
  468. })
  469. .then((res) => {
  470. if (this.isGain) {
  471. res.Data.ListActivityStaus.forEach((item) => {
  472. item.IsChoose = true;
  473. });
  474. }
  475. this.isShowJurisdiction = res.Data.IsShowJurisdiction;
  476. this.listActivityStaus = res.Data.ListActivityStaus;
  477. this.listActivityType = res.Data.ListActivityType;
  478. this.listChartPermission = res.Data.ListChartPermission || [];
  479. this.listChartPermissionInit = res.Data.ListChartPermission2;
  480. if (this.isGain) {
  481. // this.preserve()
  482. } else {
  483. this.shareOption();
  484. }
  485. if (name == "traverse") {
  486. const hyArr = [];
  487. this.listChartPermission.forEach((key) => {
  488. if (key.IsChoose) {
  489. hyArr.push(key.ChartPermissionId);
  490. }
  491. });
  492. this.chartPermissionIds = hyArr.join(",");
  493. }
  494. });
  495. },
  496. //恢复下拉选择的初始状态
  497. empty() {
  498. this.listActivityStaus.forEach((item) => (item.IsChoose = true));
  499. this.activeState = "1,2,3";
  500. this.activeStateName = "全部状态";
  501. this.chartPermissionIds = "";
  502. this.activityTimeList.forEach((key) => {
  503. key.IsChoose = false;
  504. });
  505. this.activityTimeStatus = "";
  506. this.listChartPermission.forEach((item) => (item.IsChoose = false));
  507. this.chartPermissionName = "所有行业";
  508. this.listActivityType.forEach((item) => (item.IsChoose = false));
  509. this.activityTypeIds = "";
  510. this.activityTypeName = "所有类型";
  511. },
  512. /* 表单清空 */
  513. clearIpt() {
  514. this.searchTxt = "";
  515. this.collectList = [];
  516. this.haveData = true;
  517. this.isShowSearch = false;
  518. },
  519. //获取是否需要填写区号接口
  520. countryCcode() {
  521. User.countryCcode().then((res) => {
  522. if (res.Ret == 200) {
  523. this.isNeedAddCountryCode = res.Data.IsNeedAddCountryCode;
  524. }
  525. });
  526. },
  527. },
  528. onShow() {
  529. this.countryCcode(); //判断是否加区号
  530. this.$store.dispatch("statistics", { PageType: "ActivitSearch" });
  531. },
  532. //load
  533. onLoad(option) {
  534. if (this.$db.get("historySearchListActivity")) {
  535. let historyList = JSON.parse(this.$db.get("historySearchListActivity"));
  536. this.historySearchList = historyList;
  537. }
  538. if (option.text || option.dycName) {
  539. this.activeState = option.statesId; //活动进行状态
  540. this.activityTypeIds = option.typeIds; //活动类型id 多个用 , 隔开
  541. this.chartPermissionIds = option.chartIds; //行业id 多个用 , 隔开
  542. this.activeStateName = option.stateName;
  543. this.chartPermissionName = option.chartName;
  544. this.activityTypeName = option.typeName;
  545. this.searchTxt = option.text;
  546. this.dynamicName = option.dycName || "";
  547. this.activityTimeStatus = option.timeStatus;
  548. this.isGain = false;
  549. this.isShowSearch = true;
  550. } else {
  551. this.isGain = true;
  552. }
  553. if (option.text) {
  554. this.searchHandle();
  555. } else if (option.dycName) {
  556. this.changeTarget();
  557. }
  558. this.fastSearchKeWord();
  559. },
  560. /* 触底 */
  561. onReachBottom: Throttle(function () {
  562. if (this.status === "nomore") return;
  563. this.status = "loading";
  564. this.page_no++;
  565. this.getList();
  566. }),
  567. /* 用户点击分享 */
  568. onShareAppMessage: function (res) {
  569. return {
  570. title: this.isHorzMobile ? "好友向您推荐此内容,上传名片享查研观向免费月卡!" : "活动搜索",
  571. path:
  572. "/activityPages/activitySearch/activitySearch?statesId=" +
  573. this.activeState +
  574. "&typeIds=" +
  575. this.activityTypeIds +
  576. "&chartIds=" +
  577. this.chartPermissionIds +
  578. "&stateName=" +
  579. this.activeStateName +
  580. "&chartName=" +
  581. this.chartPermissionName +
  582. "&typeName=" +
  583. this.activityTypeName +
  584. "&text=" +
  585. this.searchTxt +
  586. "&timeStatus=" +
  587. this.activityTimeStatus +
  588. "&dycName=" +
  589. this.dynamicName,
  590. success: (res) => {},
  591. fail: (err) => {},
  592. };
  593. },
  594. /* 下拉刷新 */
  595. onPullDownRefresh: Throttle(function () {
  596. this.page_no = 1;
  597. this.refresh = true;
  598. if (this.tabsActive == 0) {
  599. this.getList();
  600. } else {
  601. this.getScheduleList();
  602. }
  603. }),
  604. };
  605. </script>
  606. <style scoped lang="scss">
  607. @import "../components/index.scss";
  608. .dynamic-content {
  609. padding: 0 0 0 0 !important;
  610. .target-title {
  611. color: #333333 !important;
  612. font-size: 28rpx !important;
  613. }
  614. }
  615. .dynamic-name {
  616. display: flex;
  617. align-items: center;
  618. padding: 36rpx 10rpx 20rpx !important;
  619. color: #3385ff;
  620. font-size: 28rpx;
  621. text {
  622. max-width: 100%;
  623. padding-right: 40rpx;
  624. overflow: hidden;
  625. text-overflow: ellipsis;
  626. white-space: nowrap;
  627. }
  628. icon {
  629. width: 32rpx;
  630. height: 32rpx;
  631. }
  632. }
  633. .activity-pages {
  634. padding-top: 200rpx;
  635. padding-bottom: 30rpx;
  636. }
  637. .activity-page {
  638. padding-top: 100rpx !important;
  639. }
  640. @import "../components/indexActivity.scss";
  641. </style>