activityItem.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756
  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 v-if="list.IsResearchPoints" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/Research_Points.png"></image>
  15. <image v-if="!list.IsResearchPoints && list.IsResearchPoints" 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" :checkResearchList.sync="checkResearchList" />
  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. checkResearchList: {},
  176. };
  177. },
  178. computed: {},
  179. watch: {},
  180. created() {},
  181. mounted() {},
  182. methods: {
  183. isEndBtnSlide(item) {
  184. let isKey = ["IsShowOutboundCall", "IsShowAppointment", "IsShowMeetingReminder", "IsShowHelpSsk", "IsShowDetails", "IsShowSignup"];
  185. let arr = [];
  186. Object.keys(item).forEach((key) => {
  187. if (isKey.includes(key)) {
  188. item[key] && arr.push(item[key]);
  189. }
  190. });
  191. return arr.length;
  192. },
  193. // 我要报名
  194. wanttosignup(item) {
  195. this.activityIdAdd = item.ActivityId;
  196. this.itemData = item;
  197. if (item.YidongActivityId) {
  198. this.goDetail(item);
  199. return;
  200. } else if ((item.IsYidongConduct && item.IsCanOutboundCall) || (!item.IsYidongConduct && item.IsLimitPeople == 1 && [1, 2, 3].includes(item.ActivityTypeId))) {
  201. this.selectShow = true;
  202. this.selectYdong = item.IsYidongConduct;
  203. } else {
  204. this.activityIdAdd = "";
  205. this.signupIsAddOfCancel(item, 3);
  206. }
  207. },
  208. //报名 取消报名 预约外呼/取消预约外呼报名
  209. signupIsAddOfCancel(item, type, valName = "") {
  210. let id = this.activityIdAdd || item.ActivityId;
  211. let itemData = item || this.itemData;
  212. if (item && item.IsSignup == 1) {
  213. const str = item.ActivityTime.replace(/-/g, "/");
  214. const date = new Date(str);
  215. const times = date.getTime();
  216. const num = new Date().getTime();
  217. if (times - num <= 3600000) {
  218. uni.showModal({
  219. confirmText: "知道了",
  220. showCancel: false,
  221. confirmColor: "#3385FF",
  222. content: type == 1 ? "活动开始前1小时内无法取消预约外呼,请联系对口销售处理" : "活动开始前1小时内无法取消报名,请联系对口销售处理",
  223. });
  224. return;
  225. }
  226. uni.showModal({
  227. content: type == 1 ? "您要取消此次活动预约外呼吗?" : "您要取消此次活动的报名吗?",
  228. confirmColor: "#3385FF",
  229. cancelColor: "#606266",
  230. success: async (res) => {
  231. if (res.confirm) {
  232. const res = await activity.signupCancel({
  233. ActivityId: item.ActivityId,
  234. SignupType: type,
  235. PageRouter: this.$store.state.pageRouterActivity,
  236. });
  237. if (res.Ret === 200) {
  238. this.parentDataEmit(itemData, "IsSignup", 0);
  239. this.init();
  240. type == 1
  241. ? uni.showToast({
  242. title: "预约外呼已取消",
  243. duration: 2000,
  244. })
  245. : uni.showToast({
  246. title: "已取消报名",
  247. duration: 2000,
  248. });
  249. if (valName === "我的") {
  250. this.getActivityList();
  251. }
  252. }
  253. }
  254. },
  255. });
  256. } else {
  257. let timer = null;
  258. if (this.flag) return;
  259. clearTimeout(timer);
  260. this.flag = true;
  261. this.selectShow = false;
  262. if (itemData.IsResearchPoints) {
  263. this.researchPointsHandler(id, type, item);
  264. } else {
  265. this.myIsApplyHandler(id, type);
  266. }
  267. timer = setTimeout(() => {
  268. this.flag = false;
  269. }, 500);
  270. }
  271. },
  272. // 弹框的初始化
  273. init() {
  274. this.signupType = "";
  275. this.goFollow = false;
  276. this.isShow = false;
  277. this.isCancelShow = false;
  278. },
  279. //添加消息提醒接口
  280. meetingReminderAdd(item, type) {
  281. if (type != 0) {
  282. this.meetingReminderCancel(item);
  283. return;
  284. }
  285. activity
  286. .meetingReminderAdd({
  287. ActivityId: item.ActivityId,
  288. PageRouter: this.$store.state.pageRouterActivity,
  289. })
  290. .then((res) => {
  291. if (res.Ret == 200) {
  292. this.hasPermission = res.Data.HasPermission;
  293. this.jurisdictionList = res.Data;
  294. if (this.hasPermission == 1) {
  295. if ((res.Data.GoFollow && res.Data.SignupStatus !== "Success") || !res.Data.GoFollow) this.isShow = true;
  296. else this.goFollow = res.Data.GoFollow;
  297. this.signupType = 999;
  298. this.idTypeCancel = {
  299. cutId: res.Data.ActivityId,
  300. state: 1,
  301. name: "conference",
  302. };
  303. this.parentDataEmit(item, "IsCancelMeetingReminder", 1);
  304. } else if (this.hasPermission == 2) {
  305. this.isShowhasPermission = true;
  306. } else if (this.hasPermission == 3 || this.hasPermission == 4 || this.hasPermission == 5) {
  307. this.applyForIsShow = true;
  308. }
  309. }
  310. });
  311. },
  312. //取消消息提醒接口
  313. meetingReminderCancel(item) {
  314. activity
  315. .meetingReminderCancel({
  316. ActivityId: item.ActivityId,
  317. PageRouter: this.$store.state.pageRouterActivity,
  318. })
  319. .then((res) => {
  320. if (res.Ret == 200) {
  321. uni.showModal({
  322. confirmText: "知道了",
  323. confirmColor: "#3385FF",
  324. content: res.Msg,
  325. showCancel: false,
  326. success: (res) => {
  327. if (this.isrefresh) return this.getActivityList();
  328. if (res.confirm) {
  329. this.parentDataEmit(item, "IsCancelMeetingReminder", 0);
  330. }
  331. },
  332. });
  333. }
  334. });
  335. },
  336. //帮我带问
  337. async askingGo(item, type = "") {
  338. const res = await activity.checkAskActivity({ ActivityId: item.ActivityId, PageRouter: this.$store.state.pageRouterActivity });
  339. if (res.Ret == 200) {
  340. this.hasPermission = res.Data.HasPermission;
  341. this.jurisdictionList = res.Data;
  342. if (this.hasPermission == 1) {
  343. uni.navigateTo({
  344. url: "/activityPages/generationAsk/generationAsk?id=" + item.ActivityId + "&type=" + type,
  345. });
  346. } else if (this.hasPermission == 2) {
  347. this.isShowhasPermission = true;
  348. } else if (this.hasPermission == 3 || this.hasPermission == 4 || this.hasPermission == 5) {
  349. this.applyForIsShow = true;
  350. }
  351. }
  352. },
  353. // 弹框的初始化
  354. init() {
  355. this.signupType = "";
  356. this.goFollow = false;
  357. this.isShow = false;
  358. this.isCancelShow = false;
  359. },
  360. //预约纪要、取消预约纪要
  361. async summaryIsHandel(item, type = "") {
  362. if (item.IsAppointment == 0) {
  363. const res = await activity.postAppointmentAdd({ ActivityId: item.ActivityId, PageRouter: this.$store.state.pageRouterActivity });
  364. if (res.Ret == 200) {
  365. this.hasPermission = res.Data.HasPermission;
  366. this.jurisdictionList = res.Data;
  367. if (this.hasPermission == 1) {
  368. this.signupType = "summaryIsHandel";
  369. this.goOnNextStep = res.Data.GoFollow;
  370. if (res.Data.SignupStatus !== "Success") {
  371. this.isShow = true;
  372. } else {
  373. if (res.Data.GoFollow) this.goFollow = res.Data.GoFollow;
  374. else if (res.Data.SignupStatus == "Success") this.isShow = true;
  375. this.parentDataEmit(item, "IsAppointment", 1);
  376. }
  377. } else if (this.hasPermission == 2) {
  378. this.isShowhasPermission = true;
  379. } else if (this.hasPermission == 3 || this.hasPermission == 4 || this.hasPermission == 5) {
  380. this.applyForIsShow = true;
  381. }
  382. }
  383. } else {
  384. uni.showModal({
  385. content: "确定要取消预约本场调研的纪要吗?",
  386. confirmColor: "#3385FF",
  387. cancelColor: "#606266",
  388. success: async (res) => {
  389. if (res.confirm) {
  390. const res = await activity.postAppointmentCancel({ ActivityId: item.ActivityId, PageRouter: this.$store.state.pageRouterActivity });
  391. if (res.Ret === 200) {
  392. this.parentDataEmit(item, "IsAppointment", 0);
  393. this.init();
  394. if (type === "我的") {
  395. this.getActivityList();
  396. }
  397. }
  398. }
  399. },
  400. });
  401. }
  402. },
  403. //去往详情页面
  404. goDetail(item) {
  405. if (item.SourceType !== 1) {
  406. uni.navigateTo({ url: "/activityPages/specialDetail/specialDetail?id=" + item.ActivityId });
  407. } else {
  408. uni.navigateTo({ url: "/activityPages/activityDetail/activityDetail?id=" + item.ActivityId });
  409. }
  410. },
  411. // 查看行程的事件
  412. lookImg(item) {
  413. this.getRecordTracking(this.$store.state.pageRouterActivity, { ActivityId: item.ActivityId, Source: "查看行程" });
  414. uni.previewImage({
  415. urls: [item.TripImgLink], //查看图片的数组
  416. });
  417. },
  418. // 点击感兴趣
  419. async interest(item) {
  420. const res = await activity.postSpecialSignupAdd({
  421. ActivityId: item.ActivityId,
  422. PageRouter: this.$store.state.pageRouterActivity,
  423. });
  424. if (res.Ret === 200) {
  425. this.modalShow(res);
  426. if (res.Data.SignupStatus == 1) {
  427. this.parentDataEmit(item, "IsSignup", 1);
  428. }
  429. }
  430. },
  431. // 报名或者取消报名
  432. async applyOfcancel(item, type = "") {
  433. this.show_confirm_button = true;
  434. if ((type != "back" && item.IsTrip == 1) || (type == "back" && item.IsSignup == 1)) {
  435. // 取消报名
  436. const str = item.ActivityTime.replace(/-/g, "/");
  437. const date = new Date(str);
  438. const times = date.getTime();
  439. const num = new Date().getTime();
  440. let twoDays = times - num <= 3600000 * 48;
  441. uni.showModal({
  442. content: twoDays ? "活动开始前48小时内,取消报名仍会维持扣点,确定要取消报名吗?" : "您要取消此次专项调研的预报名吗?",
  443. confirmColor: "#3385FF",
  444. cancelColor: "#606266",
  445. success: async (res) => {
  446. if (res.confirm) {
  447. const res = await activity.activityApecialCancel({
  448. ActivityId: item.ActivityId,
  449. PageRouter: this.$store.state.pageRouterActivity,
  450. });
  451. if (res.Ret === 200) {
  452. uni.showToast({
  453. title: "已取消",
  454. duration: 2000,
  455. });
  456. item.TripNum > 0 && (item.TripNum -= 1);
  457. type == "back" ? this.parentDataEmit(item, "IsSignup", 0) : this.parentDataEmit(item, "IsTrip", 0);
  458. }
  459. }
  460. },
  461. });
  462. } else {
  463. // 报名
  464. const res = await activity.activityApecialAdd({ ActivityId: item.ActivityId, PageRouter: this.$store.state.pageRouterActivity });
  465. if (res.Ret == 200) {
  466. this.modalShow(res);
  467. if (res.Data.SignupStatus == 1) {
  468. type == "back" ? this.parentDataEmit(item, "IsSignup", 1) : this.parentDataEmit(item, "IsTrip", 1);
  469. }
  470. }
  471. }
  472. },
  473. // 弹框的数据重置
  474. ininModalHandler() {
  475. this.show_cancel_button = false;
  476. this.show_confirm_button = false;
  477. this.specialIsHintShow = false;
  478. this.specialGoFollowShow = false;
  479. this.isCancelBtn = false;
  480. },
  481. // 显示弹框
  482. modalShow(res) {
  483. this.show_confirm_button = true;
  484. this.specialGoFollowShow = true;
  485. this.specialAccounts = res.Data.PopupMsg;
  486. this.specialPopupMsg = res.Data.PopupMsg2;
  487. },
  488. // 已预报名、就是不感兴趣
  489. beNotInterested(item) {
  490. uni.showModal({
  491. content: "您要取消此次专研调研的预报名吗?",
  492. confirmColor: "#3385FF",
  493. cancelColor: "#606266",
  494. success: async (res) => {
  495. if (res.confirm) {
  496. const res = await activity.postSpecialSignupAdd({
  497. ActivityId: item.ActivityId,
  498. PageRouter: this.$store.state.pageRouterActivity,
  499. });
  500. if (res.Ret === 200) {
  501. this.parentDataEmit(item, "IsSignup", 0);
  502. }
  503. }
  504. },
  505. });
  506. },
  507. // 新调研通知
  508. async specialFollow() {
  509. this.show_confirm_button = true;
  510. if (this.specialIsFollow) {
  511. uni.showModal({
  512. content: "您要取消【专项调研】新活动通知吗?",
  513. confirmColor: "#3385FF",
  514. cancelColor: "#606266",
  515. success: async (res) => {
  516. if (res.confirm) {
  517. const res = await activity.postSpecialFollow();
  518. if (res.Ret === 200) {
  519. this.specialIsFollow = !this.specialIsFollow;
  520. }
  521. }
  522. },
  523. });
  524. } else {
  525. const res = await activity.postSpecialFollow();
  526. if (res.Ret === 200) {
  527. this.show_cancel_button = true;
  528. this.specialIsFollow = !this.specialIsFollow;
  529. this.specialGoFollowShow = true;
  530. }
  531. }
  532. },
  533. parentDataEmit(item, value, num) {
  534. let index = this.$parent.newDataList.findIndex((key) => key.Activity && key.Activity.ActivityId === item.ActivityId);
  535. this.$parent.newDataList[index].Activity[value] = num;
  536. },
  537. // 我要报名的请求拆分出来了
  538. async myIsApplyHandler(id, type) {
  539. const res = await activity.signupAdd({
  540. ActivityId: id,
  541. SignupType: type,
  542. PageRouter: this.$store.state.pageRouterActivity,
  543. });
  544. if (res.Ret == 200) {
  545. this.hasPermission = res.Data.HasPermission;
  546. this.jurisdictionList = res.Data;
  547. if (this.hasPermission == 1) {
  548. this.signupType = valName == "CClass" ? "CClass" : res.Data.SignupType;
  549. this.countryCode = res.Data.CountryCode;
  550. this.mobileEdit = res.Data.Mobile;
  551. this.goOnNextStep = res.Data.GoFollow;
  552. this.idTypeCancel = {
  553. cutId: res.Data.ActivityId,
  554. state: 1,
  555. };
  556. if (res.Data.GoBindEmail) {
  557. this.mailboxBinding = true;
  558. return;
  559. }
  560. if (res.Data.SignupStatus !== "Success") {
  561. this.isShow = true;
  562. } else {
  563. if (res.Data.GoOutboundMobile) this.editIsShow = true;
  564. else if (res.Data.GoFollow) this.goFollow = res.Data.GoFollow;
  565. else if (res.Data.SignupStatus == "Success") this.isShow = true;
  566. this.parentDataEmit(itemData, "IsSignup", 1);
  567. this.parentDataEmit(itemData, "SignupType", type);
  568. }
  569. } else if (this.hasPermission == 2) {
  570. this.isShowhasPermission = true;
  571. } else if (this.hasPermission == 3 || this.hasPermission == 4 || this.hasPermission == 5) {
  572. this.applyForIsShow = true;
  573. }
  574. }
  575. },
  576. // 研选扣点的事件
  577. async researchPointsHandler(id, type, item) {
  578. const res = await activity.activityCheck({
  579. ActivityId: id,
  580. });
  581. if (res.Ret === 200) {
  582. let { Data } = res;
  583. this.checkResearchList = Data;
  584. this.checkResearchList.childrenType = type;
  585. this.jurisdictionList = item;
  586. this.isResearchModalShow = true;
  587. }
  588. },
  589. },
  590. };
  591. </script>
  592. <style scoped lang="scss">
  593. .container-activity-item {
  594. position: relative;
  595. width: 100%;
  596. background: #ffffff;
  597. box-shadow: 0rpx 3rpx 8rpx 0rpx rgba(0, 0, 0, 0.16);
  598. border-radius: 8rpx;
  599. padding: 20rpx;
  600. margin-bottom: 20rpx;
  601. font-size: 24rpx;
  602. overflow: hidden;
  603. .content-sign {
  604. display: flex;
  605. .is-up-down {
  606. width: 110rpx;
  607. height: 40rpx;
  608. text-align: center;
  609. line-height: 40rpx;
  610. border-radius: 4rpx;
  611. color: #fff;
  612. }
  613. .is-up {
  614. background: linear-gradient(90deg, #0151ff 0%, #01b9ff 100%);
  615. }
  616. .is-up-state {
  617. background: #ff9110;
  618. }
  619. .is-down-state {
  620. background-color: #01a7ff;
  621. }
  622. .is-down {
  623. background: linear-gradient(90deg, #ff8a05 0%, #ffb74d 100%);
  624. }
  625. .is-end {
  626. background: #dddddd;
  627. }
  628. .state {
  629. border-radius: 4rpx 0 4rpx 0;
  630. margin-left: 10rpx;
  631. }
  632. }
  633. .content-type {
  634. font-size: 32rpx;
  635. font-weight: 500;
  636. color: #333333;
  637. line-height: 38rpx;
  638. margin: 10rpx 0;
  639. }
  640. .content-title {
  641. font-size: 28rpx;
  642. font-weight: 400;
  643. color: #333333;
  644. line-height: 44rpx;
  645. image {
  646. width: 83rpx;
  647. height: 33rpx;
  648. vertical-align: middle;
  649. margin-right: 5rpx;
  650. }
  651. }
  652. .content-text {
  653. font-size: 28rpx;
  654. font-weight: 400;
  655. color: #999999;
  656. line-height: 44rpx;
  657. margin: 10rpx 0;
  658. }
  659. .content-time {
  660. color: #333333;
  661. margin-bottom: 15rpx;
  662. }
  663. .content-city {
  664. display: flex;
  665. justify-content: flex-end;
  666. align-items: center;
  667. color: #3385ff;
  668. image {
  669. width: 27rpx;
  670. height: 32rpx;
  671. margin-right: 8rpx;
  672. }
  673. }
  674. .content-img {
  675. position: absolute;
  676. top: 49rpx;
  677. right: 0;
  678. width: 205rpx;
  679. height: 119rpx;
  680. }
  681. .content-btn {
  682. display: flex;
  683. overflow: hidden;
  684. overflow-x: auto;
  685. margin-top: 20rpx;
  686. justify-content: flex-end;
  687. .item-btn {
  688. color: #3385ff;
  689. display: flex;
  690. align-items: center;
  691. justify-content: center;
  692. width: 113rpx;
  693. height: 42rpx;
  694. border-radius: 4rpx;
  695. border: 1rpx solid #3385ff;
  696. margin-left: 20rpx;
  697. flex-shrink: 0;
  698. }
  699. .btn-solid {
  700. background: #3385ff;
  701. border: none;
  702. color: #fff;
  703. }
  704. }
  705. .content-btn-end {
  706. justify-content: flex-start;
  707. }
  708. .bottom-box {
  709. display: flex;
  710. }
  711. .text-Line {
  712. text-overflow: -o-ellipsis-lastline;
  713. overflow: hidden;
  714. text-overflow: ellipsis;
  715. display: -webkit-box;
  716. -webkit-box-orient: vertical;
  717. word-wrap: break-word;
  718. word-break: break-all;
  719. -webkit-line-clamp: 3;
  720. line-clamp: 3;
  721. }
  722. .select-box {
  723. width: 100%;
  724. view {
  725. height: 95prx;
  726. line-height: 95rpx;
  727. text-align: center;
  728. font-size: 32rpx;
  729. border-bottom: 1rpx solid #ebebeb;
  730. }
  731. }
  732. .content-min-hight {
  733. min-height: 88rpx;
  734. text-overflow: -o-ellipsis-lastline;
  735. overflow: hidden;
  736. text-overflow: ellipsis;
  737. display: -webkit-box;
  738. -webkit-box-orient: vertical;
  739. word-wrap: break-word;
  740. word-break: break-all;
  741. -webkit-line-clamp: 2 !important;
  742. line-clamp: 2 !important;
  743. }
  744. }
  745. </style>