activityItem.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749
  1. <template>
  2. <view class="container-activity-item" @click="goDetail(list)">
  3. <view class="content-sign">
  4. <view :class="[list.ActivityType === 0 ? 'is-down' : 'is-up', 'is-up-down']">{{ list.ActivityType === 0 ? "线下" : "线上" }}</view>
  5. <view v-if="list.ActiveState == 1 || list.ActiveState == 2" :class="[list.ActiveState == 1 ? 'is-down-state' : 'is-up-state', 'is-up-down', 'state']">
  6. {{ list.ActiveState == 1 ? "未开始" : "进行中" }}
  7. </view>
  8. <block v-else>
  9. <view v-if="list.TripStatus != 1" :class="['is-end', 'is-up-down', 'state']"> 已结束 </view>
  10. </block>
  11. </view>
  12. <view class="content-type"> {{ list.ActivityTypeName || "专项产业调研" }}</view>
  13. <view :class="['content-title', 'text-Line', list.ResearchTheme && 'content-min-hight']" v-if="list.ActivityName || list.ResearchTheme">
  14. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/Research_Points.png"></image>
  15. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/activity_external.png"></image>
  16. {{ list.ActivityName || list.ResearchTheme }}
  17. </view>
  18. <view style="display: flex" class="content-text content-min-hight text_twoLine" v-if="list.ActivityTimeText && list.SourceType !== 1">
  19. <text> 活动时间:{{ list.ActivityTimeText }}</text>
  20. </view>
  21. <view class="content-text text-Line" v-else>
  22. {{ list.Host ? "主持人:" : list.Expert ? "专家背景:" : list.Speaker ? "主讲人:" : list.DistinguishedGuest ? "嘉宾:" : "" }}
  23. {{ list.Host ? list.Host : list.Expert ? list.Expert : list.Speaker ? list.Speaker : list.DistinguishedGuest ? list.DistinguishedGuest : "" }}
  24. </view>
  25. <view class="content-time" v-if="list.SourceType == 1">
  26. {{ list.ActivityTimeText }}
  27. </view>
  28. <view v-if="list.City" class="content-city">
  29. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/location.png"></image>
  30. {{ list.City }}
  31. </view>
  32. <view :class="['content-btn', isEndBtnSlide(list) > 2 && 'content-btn-end']">
  33. <block v-if="list.SourceType === 1">
  34. <block v-if="list.ActiveState == 1">
  35. <text class="item-btn btn-solid" v-if="list.IsShowOutboundCall && list.ActivityTypeId == 1" @click.stop="signupIsAddOfCancel(list, 1)">{{
  36. list.IsSignup == 1 ? "取消外呼" : "预约外呼"
  37. }}</text>
  38. <text class="item-btn" v-if="list.IsShowAppointment" @click.stop="summaryIsHandel(list)">{{ list.IsAppointment == 1 ? "取消纪要" : "预约纪要" }}</text>
  39. <text class="item-btn" v-if="list.IsShowMeetingReminder" @click.stop="meetingReminderAdd(list, list.IsCancelMeetingReminder)">
  40. {{ list.IsCancelMeetingReminder == 0 ? "消息提醒" : "取消提醒" }}
  41. </text>
  42. <view class="item-btn" v-if="list.IsShowHelpSsk" style="width: 130rpx">
  43. <text @click.stop="askingGo(list)">帮我带问</text>
  44. </view>
  45. <text class="item-btn btn-solid" v-if="list.IsShowOutboundCall && list.ActivityTypeId != 1" @click.stop="signupIsAddOfCancel(list, 1)">{{
  46. list.IsSignup == 1 ? "取消外呼" : "预约外呼"
  47. }}</text>
  48. <text class="item-btn" v-if="list.IsShowDetails" @click.stop="goDetail(list)">查看详情</text>
  49. <block v-if="list.IsShowSignup">
  50. <block v-if="list.IsCClassMeeting && !list.IsYidongConduct">
  51. <text class="item-btn btn-solid" @click.stop="signupIsAddOfCancel(list, 3, 'CClass')">{{ list.IsSignup == 1 ? "取消报名" : "我要报名" }}</text>
  52. </block>
  53. <block v-else>
  54. <text class="item-btn btn-solid" v-if="list.IsSignup !== 1" @click.stop="wanttosignup(list)">我要报名</text>
  55. <text class="item-btn btn-solid" v-else @click.stop="signupIsAddOfCancel(list, 2)">{{ list.SignupType == 1 ? "取消外呼" : "取消报名" }}</text>
  56. </block>
  57. </block>
  58. </block>
  59. <text v-if="list.IsShowHelpSsk && list.ActiveState == 2" class="item-btn" @click.stop="askingGo(list, '提问')">实时提问</text>
  60. </block>
  61. <view class="bottom-box real-time" v-else>
  62. <view class="bottom-box">
  63. <view class="" style="width: 130rpx"> </view>
  64. <text class="item-btn" @click.stop="lookImg(list)">行程安排</text>
  65. <block v-if="list.TripStatus == 2">
  66. <text v-if="list.ActiveState == 1" class="item-btn btn-solid" @click.stop="applyOfcancel(list)">{{ list.IsTrip == 0 ? "我要报名" : "取消报名" }}</text>
  67. </block>
  68. <block v-else>
  69. <text class="item-btn btn-solid" v-if="list.IsSignup !== 1" @click.stop="interest(list)">感兴趣</text>
  70. <text class="item-btn btn-solid" @click.stop="beNotInterested(list)" v-else>已预报名</text>
  71. </block>
  72. </view>
  73. </view>
  74. </view>
  75. <image v-if="list.TripStatus == 2" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/confirm_XC_new.png" class="content-img"></image>
  76. <image v-if="list.TripStatus == 1" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/Y_apply_new.png" class="content-img"></image>
  77. <!-- 所有自定义弹框 -->
  78. <modalDialog
  79. :isShow="isShow"
  80. :signupType="signupType"
  81. :goFollow="goFollow"
  82. :hasPermission="hasPermission"
  83. :jurisdictionList="jurisdictionList"
  84. :editIsShow="editIsShow"
  85. :isCancelShow="isCancelShow"
  86. :idTypeCancel="idTypeCancel"
  87. :countryCode="countryCode"
  88. :mobileEdit="mobileEdit"
  89. :goOnNextStep="goOnNextStep"
  90. :isShowhasPermission="isShowhasPermission"
  91. :applyForIsShow="applyForIsShow"
  92. :mailboxBinding="mailboxBinding"
  93. />
  94. <u-modal
  95. v-model="specialGoFollowShow"
  96. :content-style="{ fontSize: '32rpx' }"
  97. :show-cancel-button="show_cancel_button"
  98. confirm-text="知道了"
  99. :show-confirm-button="show_confirm_button"
  100. :show-title="false"
  101. :cancel-style="{ borderRight: '1rpx solid #EBEBEB' }"
  102. :confirm-style="{ fontWeight: '700' }"
  103. :mask-close-able="specialIsHintShow"
  104. @confirm="ininModalHandler"
  105. @cancel="ininModalHandler"
  106. >
  107. <view class="slot-content">
  108. <block v-if="specialPopupMsg">
  109. <text>{{ specialAccounts }}</text>
  110. <text class="light-hint">{{ specialPopupMsg }}</text>
  111. </block>
  112. <rich-text v-else :nodes="specialAccounts"></rich-text>
  113. </view>
  114. </u-modal>
  115. <SelectPopup :selectShow.sync="selectShow" @signupIsAddOfCancel="signupIsAddOfCancel" :selectYdong="selectYdong" />
  116. <ShowResearchDlg :isResearchModalShow.sync="isResearchModalShow" :jurisdictionList="jurisdictionList" />
  117. </view>
  118. </template>
  119. <script>
  120. import modalDialog from "../modalDialog.vue";
  121. import { activity, User } from "@/config/api.js";
  122. import SelectPopup from "@/components/activity/selectPopup";
  123. import ShowResearchDlg from "@/components/activity/showResearchDlg.vue";
  124. export default {
  125. name: "",
  126. components: { modalDialog, SelectPopup, ShowResearchDlg },
  127. props: {
  128. list: {
  129. type: Object,
  130. default: {},
  131. required: true,
  132. },
  133. componentsPage: {
  134. type: String,
  135. default: "",
  136. },
  137. },
  138. data() {
  139. return {
  140. /**/
  141. tabsActive: 0,
  142. /**/
  143. /* 共用的弹框 */
  144. isShow: false, //弹框
  145. signupType: "", //关注类型
  146. goFollow: false, //是否关注公众号
  147. hasPermission: "", //是否有权限
  148. jurisdictionList: {},
  149. editIsShow: false, //外呼莫泰框
  150. isCancelShow: false,
  151. idTypeCancel: {
  152. id: "",
  153. type: 1,
  154. cutId: "",
  155. state: "",
  156. isNum: false,
  157. },
  158. countryCode: "", //外呼区号
  159. mobileEdit: "", //外呼手机号
  160. goOnNextStep: "", //设置外呼号后弹出哪个
  161. isShowhasPermission: false, //拨打销售电话
  162. applyForIsShow: false, //潜在用户
  163. mailboxBinding: false, //是否绑定邮箱
  164. selectShow: false, //是否显示弹框
  165. selectYdong: false, // 参会方式展示的文案
  166. specialIsHintShow: false, // 按钮的显示
  167. specialGoFollowShow: false, // 弹框的隐藏显示
  168. specialAccounts: `您已开启【专项调研】新活动通知<br/><br/>请关注【查研观向小助手】公众号,及时获取微信消息提醒`,
  169. specialIsFollow: false, // 是否关注
  170. specialPopupMsg: "", // 消息的文案
  171. show_cancel_button: false, // 取消按钮的隐藏显示
  172. show_confirm_button: false, // 确定按钮的隐藏显示
  173. itemData: {},
  174. isResearchModalShow: false,
  175. };
  176. },
  177. computed: {},
  178. watch: {},
  179. created() {},
  180. mounted() {},
  181. methods: {
  182. isEndBtnSlide(item) {
  183. let isKey = ["IsShowOutboundCall", "IsShowAppointment", "IsShowMeetingReminder", "IsShowHelpSsk", "IsShowDetails", "IsShowSignup"];
  184. let arr = [];
  185. Object.keys(item).forEach((key) => {
  186. if (isKey.includes(key)) {
  187. item[key] && arr.push(item[key]);
  188. }
  189. });
  190. return arr.length;
  191. },
  192. // 我要报名
  193. wanttosignup(item) {
  194. this.activityIdAdd = item.ActivityId;
  195. this.itemData = item;
  196. if (item.YidongActivityId) {
  197. this.goDetail(item);
  198. return;
  199. } else if ((item.IsYidongConduct && item.IsCanOutboundCall) || (!item.IsYidongConduct && item.IsLimitPeople == 1 && [1, 2, 3].includes(item.ActivityTypeId))) {
  200. this.selectShow = true;
  201. this.selectYdong = item.IsYidongConduct;
  202. } else {
  203. this.activityIdAdd = "";
  204. this.signupIsAddOfCancel(item, 3);
  205. }
  206. },
  207. //报名 取消报名 预约外呼/取消预约外呼报名
  208. signupIsAddOfCancel(item, type, valName = "") {
  209. let id = this.activityIdAdd || item.ActivityId;
  210. let itemData = item || this.itemData;
  211. if (item && item.IsSignup == 1) {
  212. const str = item.ActivityTime.replace(/-/g, "/");
  213. const date = new Date(str);
  214. const times = date.getTime();
  215. const num = new Date().getTime();
  216. if (times - num <= 3600000) {
  217. uni.showModal({
  218. confirmText: "知道了",
  219. showCancel: false,
  220. confirmColor: "#3385FF",
  221. content: type == 1 ? "活动开始前1小时内无法取消预约外呼,请联系对口销售处理" : "活动开始前1小时内无法取消报名,请联系对口销售处理",
  222. });
  223. return;
  224. }
  225. uni.showModal({
  226. content: type == 1 ? "您要取消此次活动预约外呼吗?" : "您要取消此次活动的报名吗?",
  227. confirmColor: "#3385FF",
  228. cancelColor: "#606266",
  229. success: async (res) => {
  230. if (res.confirm) {
  231. const res = await activity.signupCancel({
  232. ActivityId: item.ActivityId,
  233. SignupType: type,
  234. PageRouter: this.$store.state.pageRouterActivity,
  235. });
  236. if (res.Ret === 200) {
  237. this.parentDataEmit(itemData, "IsSignup", 0);
  238. this.init();
  239. type == 1
  240. ? uni.showToast({
  241. title: "预约外呼已取消",
  242. duration: 2000,
  243. })
  244. : uni.showToast({
  245. title: "已取消报名",
  246. duration: 2000,
  247. });
  248. if (valName === "我的") {
  249. this.getActivityList();
  250. }
  251. }
  252. }
  253. },
  254. });
  255. } else {
  256. let timer = null;
  257. if (this.flag) return;
  258. clearTimeout(timer);
  259. this.flag = true;
  260. this.selectShow = false;
  261. if (1 == 1) {
  262. this.researchPointsHandler(id, type, item);
  263. } else {
  264. this.myIsApplyHandler(id, type);
  265. }
  266. timer = setTimeout(() => {
  267. this.flag = false;
  268. }, 500);
  269. }
  270. },
  271. // 弹框的初始化
  272. init() {
  273. this.signupType = "";
  274. this.goFollow = false;
  275. this.isShow = false;
  276. this.isCancelShow = false;
  277. },
  278. //添加消息提醒接口
  279. meetingReminderAdd(item, type) {
  280. if (type != 0) {
  281. this.meetingReminderCancel(item);
  282. return;
  283. }
  284. activity
  285. .meetingReminderAdd({
  286. ActivityId: item.ActivityId,
  287. PageRouter: this.$store.state.pageRouterActivity,
  288. })
  289. .then((res) => {
  290. if (res.Ret == 200) {
  291. this.hasPermission = res.Data.HasPermission;
  292. this.jurisdictionList = res.Data;
  293. if (this.hasPermission == 1) {
  294. if ((res.Data.GoFollow && res.Data.SignupStatus !== "Success") || !res.Data.GoFollow) this.isShow = true;
  295. else this.goFollow = res.Data.GoFollow;
  296. this.signupType = 999;
  297. this.idTypeCancel = {
  298. cutId: res.Data.ActivityId,
  299. state: 1,
  300. name: "conference",
  301. };
  302. this.parentDataEmit(item, "IsCancelMeetingReminder", 1);
  303. } else if (this.hasPermission == 2) {
  304. this.isShowhasPermission = true;
  305. } else if (this.hasPermission == 3 || this.hasPermission == 4 || this.hasPermission == 5) {
  306. this.applyForIsShow = true;
  307. }
  308. }
  309. });
  310. },
  311. //取消消息提醒接口
  312. meetingReminderCancel(item) {
  313. activity
  314. .meetingReminderCancel({
  315. ActivityId: item.ActivityId,
  316. PageRouter: this.$store.state.pageRouterActivity,
  317. })
  318. .then((res) => {
  319. if (res.Ret == 200) {
  320. uni.showModal({
  321. confirmText: "知道了",
  322. confirmColor: "#3385FF",
  323. content: res.Msg,
  324. showCancel: false,
  325. success: (res) => {
  326. if (this.isrefresh) return this.getActivityList();
  327. if (res.confirm) {
  328. this.parentDataEmit(item, "IsCancelMeetingReminder", 0);
  329. }
  330. },
  331. });
  332. }
  333. });
  334. },
  335. //帮我带问
  336. async askingGo(item, type = "") {
  337. const res = await activity.checkAskActivity({ ActivityId: item.ActivityId, PageRouter: this.$store.state.pageRouterActivity });
  338. if (res.Ret == 200) {
  339. this.hasPermission = res.Data.HasPermission;
  340. this.jurisdictionList = res.Data;
  341. if (this.hasPermission == 1) {
  342. uni.navigateTo({
  343. url: "/activityPages/generationAsk/generationAsk?id=" + item.ActivityId + "&type=" + type,
  344. });
  345. } else if (this.hasPermission == 2) {
  346. this.isShowhasPermission = true;
  347. } else if (this.hasPermission == 3 || this.hasPermission == 4 || this.hasPermission == 5) {
  348. this.applyForIsShow = true;
  349. }
  350. }
  351. },
  352. // 弹框的初始化
  353. init() {
  354. this.signupType = "";
  355. this.goFollow = false;
  356. this.isShow = false;
  357. this.isCancelShow = false;
  358. },
  359. //预约纪要、取消预约纪要
  360. async summaryIsHandel(item, type = "") {
  361. if (item.IsAppointment == 0) {
  362. const res = await activity.postAppointmentAdd({ ActivityId: item.ActivityId, PageRouter: this.$store.state.pageRouterActivity });
  363. if (res.Ret == 200) {
  364. this.hasPermission = res.Data.HasPermission;
  365. this.jurisdictionList = res.Data;
  366. if (this.hasPermission == 1) {
  367. this.signupType = "summaryIsHandel";
  368. this.goOnNextStep = res.Data.GoFollow;
  369. if (res.Data.SignupStatus !== "Success") {
  370. this.isShow = true;
  371. } else {
  372. if (res.Data.GoFollow) this.goFollow = res.Data.GoFollow;
  373. else if (res.Data.SignupStatus == "Success") this.isShow = true;
  374. this.parentDataEmit(item, "IsAppointment", 1);
  375. }
  376. } else if (this.hasPermission == 2) {
  377. this.isShowhasPermission = true;
  378. } else if (this.hasPermission == 3 || this.hasPermission == 4 || this.hasPermission == 5) {
  379. this.applyForIsShow = true;
  380. }
  381. }
  382. } else {
  383. uni.showModal({
  384. content: "确定要取消预约本场调研的纪要吗?",
  385. confirmColor: "#3385FF",
  386. cancelColor: "#606266",
  387. success: async (res) => {
  388. if (res.confirm) {
  389. const res = await activity.postAppointmentCancel({ ActivityId: item.ActivityId, PageRouter: this.$store.state.pageRouterActivity });
  390. if (res.Ret === 200) {
  391. this.parentDataEmit(item, "IsAppointment", 0);
  392. this.init();
  393. if (type === "我的") {
  394. this.getActivityList();
  395. }
  396. }
  397. }
  398. },
  399. });
  400. }
  401. },
  402. //去往详情页面
  403. goDetail(item) {
  404. if (item.SourceType !== 1) {
  405. uni.navigateTo({ url: "/activityPages/specialDetail/specialDetail?id=" + item.ActivityId });
  406. } else {
  407. uni.navigateTo({ url: "/activityPages/activityDetail/activityDetail?id=" + item.ActivityId });
  408. }
  409. },
  410. // 查看行程的事件
  411. lookImg(item) {
  412. this.getRecordTracking(this.$store.state.pageRouterActivity, { ActivityId: item.ActivityId, Source: "查看行程" });
  413. uni.previewImage({
  414. urls: [item.TripImgLink], //查看图片的数组
  415. });
  416. },
  417. // 点击感兴趣
  418. async interest(item) {
  419. const res = await activity.postSpecialSignupAdd({
  420. ActivityId: item.ActivityId,
  421. PageRouter: this.$store.state.pageRouterActivity,
  422. });
  423. if (res.Ret === 200) {
  424. this.modalShow(res);
  425. if (res.Data.SignupStatus == 1) {
  426. this.parentDataEmit(item, "IsSignup", 1);
  427. }
  428. }
  429. },
  430. // 报名或者取消报名
  431. async applyOfcancel(item, type = "") {
  432. this.show_confirm_button = true;
  433. if ((type != "back" && item.IsTrip == 1) || (type == "back" && item.IsSignup == 1)) {
  434. // 取消报名
  435. const str = item.ActivityTime.replace(/-/g, "/");
  436. const date = new Date(str);
  437. const times = date.getTime();
  438. const num = new Date().getTime();
  439. let twoDays = times - num <= 3600000 * 48;
  440. uni.showModal({
  441. content: twoDays ? "活动开始前48小时内,取消报名仍会维持扣点,确定要取消报名吗?" : "您要取消此次专项调研的预报名吗?",
  442. confirmColor: "#3385FF",
  443. cancelColor: "#606266",
  444. success: async (res) => {
  445. if (res.confirm) {
  446. const res = await activity.activityApecialCancel({
  447. ActivityId: item.ActivityId,
  448. PageRouter: this.$store.state.pageRouterActivity,
  449. });
  450. if (res.Ret === 200) {
  451. uni.showToast({
  452. title: "已取消",
  453. duration: 2000,
  454. });
  455. item.TripNum > 0 && (item.TripNum -= 1);
  456. type == "back" ? this.parentDataEmit(item, "IsSignup", 0) : this.parentDataEmit(item, "IsTrip", 0);
  457. }
  458. }
  459. },
  460. });
  461. } else {
  462. // 报名
  463. const res = await activity.activityApecialAdd({ ActivityId: item.ActivityId, PageRouter: this.$store.state.pageRouterActivity });
  464. if (res.Ret == 200) {
  465. this.modalShow(res);
  466. if (res.Data.SignupStatus == 1) {
  467. type == "back" ? this.parentDataEmit(item, "IsSignup", 1) : this.parentDataEmit(item, "IsTrip", 1);
  468. }
  469. }
  470. }
  471. },
  472. // 弹框的数据重置
  473. ininModalHandler() {
  474. this.show_cancel_button = false;
  475. this.show_confirm_button = false;
  476. this.specialIsHintShow = false;
  477. this.specialGoFollowShow = false;
  478. this.isCancelBtn = false;
  479. },
  480. // 显示弹框
  481. modalShow(res) {
  482. this.show_confirm_button = true;
  483. this.specialGoFollowShow = true;
  484. this.specialAccounts = res.Data.PopupMsg;
  485. this.specialPopupMsg = res.Data.PopupMsg2;
  486. },
  487. // 已预报名、就是不感兴趣
  488. beNotInterested(item) {
  489. uni.showModal({
  490. content: "您要取消此次专研调研的预报名吗?",
  491. confirmColor: "#3385FF",
  492. cancelColor: "#606266",
  493. success: async (res) => {
  494. if (res.confirm) {
  495. const res = await activity.postSpecialSignupAdd({
  496. ActivityId: item.ActivityId,
  497. PageRouter: this.$store.state.pageRouterActivity,
  498. });
  499. if (res.Ret === 200) {
  500. this.parentDataEmit(item, "IsSignup", 0);
  501. }
  502. }
  503. },
  504. });
  505. },
  506. // 新调研通知
  507. async specialFollow() {
  508. this.show_confirm_button = true;
  509. if (this.specialIsFollow) {
  510. uni.showModal({
  511. content: "您要取消【专项调研】新活动通知吗?",
  512. confirmColor: "#3385FF",
  513. cancelColor: "#606266",
  514. success: async (res) => {
  515. if (res.confirm) {
  516. const res = await activity.postSpecialFollow();
  517. if (res.Ret === 200) {
  518. this.specialIsFollow = !this.specialIsFollow;
  519. }
  520. }
  521. },
  522. });
  523. } else {
  524. const res = await activity.postSpecialFollow();
  525. if (res.Ret === 200) {
  526. this.show_cancel_button = true;
  527. this.specialIsFollow = !this.specialIsFollow;
  528. this.specialGoFollowShow = true;
  529. }
  530. }
  531. },
  532. parentDataEmit(item, value, num) {
  533. let index = this.$parent.newDataList.findIndex((key) => key.Activity && key.Activity.ActivityId === item.ActivityId);
  534. this.$parent.newDataList[index].Activity[value] = num;
  535. },
  536. // 我要报名的请求拆分出来了
  537. async myIsApplyHandler(id, type) {
  538. const res = await activity.signupAdd({
  539. ActivityId: id,
  540. SignupType: type,
  541. PageRouter: this.$store.state.pageRouterActivity,
  542. });
  543. if (res.Ret == 200) {
  544. this.hasPermission = res.Data.HasPermission;
  545. this.jurisdictionList = res.Data;
  546. if (this.hasPermission == 1) {
  547. this.signupType = valName == "CClass" ? "CClass" : res.Data.SignupType;
  548. this.countryCode = res.Data.CountryCode;
  549. this.mobileEdit = res.Data.Mobile;
  550. this.goOnNextStep = res.Data.GoFollow;
  551. this.idTypeCancel = {
  552. cutId: res.Data.ActivityId,
  553. state: 1,
  554. };
  555. if (res.Data.GoBindEmail) {
  556. this.mailboxBinding = true;
  557. return;
  558. }
  559. if (res.Data.SignupStatus !== "Success") {
  560. this.isShow = true;
  561. } else {
  562. if (res.Data.GoOutboundMobile) this.editIsShow = true;
  563. else if (res.Data.GoFollow) this.goFollow = res.Data.GoFollow;
  564. else if (res.Data.SignupStatus == "Success") this.isShow = true;
  565. this.parentDataEmit(itemData, "IsSignup", 1);
  566. this.parentDataEmit(itemData, "SignupType", type);
  567. }
  568. } else if (this.hasPermission == 2) {
  569. this.isShowhasPermission = true;
  570. } else if (this.hasPermission == 3 || this.hasPermission == 4 || this.hasPermission == 5) {
  571. this.applyForIsShow = true;
  572. }
  573. }
  574. },
  575. // 研选扣点的事件
  576. async researchPointsHandler(id, type, item) {
  577. console.log(id, type, item);
  578. this.isResearchModalShow = true;
  579. this.jurisdictionList = item;
  580. },
  581. },
  582. };
  583. </script>
  584. <style scoped lang="scss">
  585. .container-activity-item {
  586. position: relative;
  587. width: 100%;
  588. background: #ffffff;
  589. box-shadow: 0rpx 3rpx 8rpx 0rpx rgba(0, 0, 0, 0.16);
  590. border-radius: 8rpx;
  591. padding: 20rpx;
  592. margin-bottom: 20rpx;
  593. font-size: 24rpx;
  594. overflow: hidden;
  595. .content-sign {
  596. display: flex;
  597. .is-up-down {
  598. width: 110rpx;
  599. height: 40rpx;
  600. text-align: center;
  601. line-height: 40rpx;
  602. border-radius: 4rpx;
  603. color: #fff;
  604. }
  605. .is-up {
  606. background: linear-gradient(90deg, #0151ff 0%, #01b9ff 100%);
  607. }
  608. .is-up-state {
  609. background: #ff9110;
  610. }
  611. .is-down-state {
  612. background-color: #01a7ff;
  613. }
  614. .is-down {
  615. background: linear-gradient(90deg, #ff8a05 0%, #ffb74d 100%);
  616. }
  617. .is-end {
  618. background: #dddddd;
  619. }
  620. .state {
  621. border-radius: 4rpx 0 4rpx 0;
  622. margin-left: 10rpx;
  623. }
  624. }
  625. .content-type {
  626. font-size: 32rpx;
  627. font-weight: 500;
  628. color: #333333;
  629. line-height: 38rpx;
  630. margin: 10rpx 0;
  631. }
  632. .content-title {
  633. font-size: 28rpx;
  634. font-weight: 400;
  635. color: #333333;
  636. line-height: 44rpx;
  637. image {
  638. width: 83rpx;
  639. height: 33rpx;
  640. vertical-align: middle;
  641. margin-right: 5rpx;
  642. }
  643. }
  644. .content-text {
  645. font-size: 28rpx;
  646. font-weight: 400;
  647. color: #999999;
  648. line-height: 44rpx;
  649. margin: 10rpx 0;
  650. }
  651. .content-time {
  652. color: #333333;
  653. margin-bottom: 15rpx;
  654. }
  655. .content-city {
  656. display: flex;
  657. justify-content: flex-end;
  658. align-items: center;
  659. color: #3385ff;
  660. image {
  661. width: 27rpx;
  662. height: 32rpx;
  663. margin-right: 8rpx;
  664. }
  665. }
  666. .content-img {
  667. position: absolute;
  668. top: 49rpx;
  669. right: 0;
  670. width: 205rpx;
  671. height: 119rpx;
  672. }
  673. .content-btn {
  674. display: flex;
  675. overflow: hidden;
  676. overflow-x: auto;
  677. margin-top: 20rpx;
  678. justify-content: flex-end;
  679. .item-btn {
  680. color: #3385ff;
  681. display: flex;
  682. align-items: center;
  683. justify-content: center;
  684. width: 113rpx;
  685. height: 42rpx;
  686. border-radius: 4rpx;
  687. border: 1rpx solid #3385ff;
  688. margin-left: 20rpx;
  689. flex-shrink: 0;
  690. }
  691. .btn-solid {
  692. background: #3385ff;
  693. border: none;
  694. color: #fff;
  695. }
  696. }
  697. .content-btn-end {
  698. justify-content: flex-start;
  699. }
  700. .bottom-box {
  701. display: flex;
  702. }
  703. .text-Line {
  704. text-overflow: -o-ellipsis-lastline;
  705. overflow: hidden;
  706. text-overflow: ellipsis;
  707. display: -webkit-box;
  708. -webkit-box-orient: vertical;
  709. word-wrap: break-word;
  710. word-break: break-all;
  711. -webkit-line-clamp: 3;
  712. line-clamp: 3;
  713. }
  714. .select-box {
  715. width: 100%;
  716. view {
  717. height: 95prx;
  718. line-height: 95rpx;
  719. text-align: center;
  720. font-size: 32rpx;
  721. border-bottom: 1rpx solid #ebebeb;
  722. }
  723. }
  724. .content-min-hight {
  725. min-height: 88rpx;
  726. text-overflow: -o-ellipsis-lastline;
  727. overflow: hidden;
  728. text-overflow: ellipsis;
  729. display: -webkit-box;
  730. -webkit-box-orient: vertical;
  731. word-wrap: break-word;
  732. word-break: break-all;
  733. -webkit-line-clamp: 2 !important;
  734. line-clamp: 2 !important;
  735. }
  736. }
  737. </style>