activitySearch.vue 25 KB

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