specialDetail.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455
  1. <template>
  2. <view class="container special-detail">
  3. <view class="" v-if="haveAuth == 1">
  4. <view class="top-notice-special">
  5. <view class="notice">
  6. <van-notice-bar color="#FFFFFF" background="#FE9000" text="专项调研行程持续更新中,满五家即开团,欢迎点击感兴趣预报名" />
  7. </view>
  8. <view class="inform-btn" @click="specialFollow">{{ specialIsFollow ? "取消通知" : "新调研通知" }}</view>
  9. </view>
  10. <view class="content">
  11. <view class="dialog-title" :class="1 == 1 ? 'brackets-title' : ''">{{ detailData.ResearchTheme }}</view>
  12. <view class="network">
  13. <view class="network-left">活动类型:</view>
  14. <view class="network-right">{{ detailData.ActivityTypeName }}</view>
  15. </view>
  16. <view class="network">
  17. <view class="network-left">所属行业:</view>
  18. <view class="network-right">{{ detailData.ChartPermissionName }}</view>
  19. </view>
  20. <view class="network" v-if="detailData.TripStatus == 2">
  21. <view class="network-left">开始时间:</view>
  22. <view class="network-right">{{ detailData.ActivityTimeTextByDay }}</view>
  23. </view>
  24. <view class="network" v-else>
  25. <view class="network-left">预期时间:</view>
  26. <view class="network-right">{{ detailData.ActivityTimeText }}</view>
  27. </view>
  28. <view class="network">
  29. <view class="network-left">调研形式:</view>
  30. <view class="network-right">
  31. {{ detailData.SpecialType == 1 ? "线上" : "线下" }}
  32. <block v-if="detailData.SpecialType == 2">({{ detailData.City }})</block>
  33. </view>
  34. </view>
  35. <block v-if="detailData.IndustrialName || detailData.IndustrialSubjectName">
  36. <view class="network">
  37. <view class="network-left">产业名称:</view>
  38. <view class="network-right">{{ detailData.IndustrialName }}</view>
  39. </view>
  40. <view class="network">
  41. <view class="network-left">相关公司:</view>
  42. <view class="network-right">{{ detailData.IndustrialSubjectName }}</view>
  43. </view>
  44. </block>
  45. <block v-else>
  46. <view class="network">
  47. <view class="network-left">相关主题:</view>
  48. <view class="network-right">{{ detailData.Label }}</view>
  49. </view>
  50. </block>
  51. <view class="reminder-item">
  52. <image v-if="detailData.TripStatus == 1" class="item" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/Y_apply.png"></image>
  53. <image v-if="detailData.TripStatus == 2" class="item" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/confirm_XC.png"></image>
  54. <image v-if="detailData.Explain" @click="reminderTextHandler(detailData)" class="reminder" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/reminder_icon.png"></image>
  55. </view>
  56. </view>
  57. <view class="" style="height: 50rpx"></view>
  58. <view class="look-Trip" @click="lookImg">
  59. 查看行程安排
  60. <van-icon name="arrow" />
  61. </view>
  62. <view class="interest-btn">
  63. <block v-if="detailData.TripStatus == 2">
  64. <text class="button" @click="applyOfcancel(detailData)">{{ detailData.IsTrip == 0 ? "我要报名" : "取消报名" }}</text>
  65. </block>
  66. <block v-else>
  67. <text class="button" v-if="detailData.IsSignup !== 1" @click="interest">感兴趣</text>
  68. <text class="button" @click="beNotInterested" v-else>已预报名</text>
  69. </block>
  70. </view>
  71. </view>
  72. <!-- 权限部分 -->
  73. <view v-else>
  74. <jurisdiction :idAct="id" :haveAuth="haveAuth" :industryMsg="industryMsg" :msgType="msgType" :sellerMobile="sellerMobile" :sellerName="sellerName"></jurisdiction>
  75. </view>
  76. <freeCharge class="free-charge" :isShowFreeBtn="isShowFree" />
  77. <u-modal
  78. v-model="specialGoFollowShow"
  79. :content-style="{ fontSize: '32rpx' }"
  80. :show-cancel-button="show_cancel_button"
  81. confirm-text="知道了"
  82. @cancel="isCancelBtn = false"
  83. :show-confirm-button="show_confirm_button"
  84. :show-title="false"
  85. :cancel-style="{ borderRight: '1rpx solid #EBEBEB' }"
  86. :confirm-style="{ fontWeight: '700' }"
  87. :mask-close-able="specialIsHintShow"
  88. >
  89. <view class="slot-content">
  90. <block v-if="specialPopupMsg">
  91. <text>{{ specialAccounts }}</text>
  92. <text class="light-hint">{{ specialPopupMsg }}</text>
  93. </block>
  94. <rich-text v-else :nodes="specialAccounts"></rich-text>
  95. </view>
  96. </u-modal>
  97. </view>
  98. </template>
  99. <script>
  100. import { activity, User } from "@/config/api.js";
  101. import jurisdiction from "../activityDetail/jurisdiction/components.vue";
  102. import freeCharge from "@/components/freeCharge";
  103. import specialMixins from "../components/specialMixins";
  104. let app = getApp({ allowDefault: true });
  105. export default {
  106. data() {
  107. return {
  108. id: "",
  109. detailData: {},
  110. haveAuth: "",
  111. industryMsg: "",
  112. sellerMobile: "",
  113. sellerName: "", //销售名称
  114. msgType: "",
  115. specialIsFollow: false,
  116. };
  117. },
  118. components: {
  119. jurisdiction,
  120. freeCharge,
  121. },
  122. mixins: [specialMixins],
  123. watch: {
  124. haveAuth: {
  125. handler() {
  126. //上传页面统计
  127. // if (this.haveAuth == 1) {
  128. // this.$store.dispatch("statistics", { PageType: "ActivitParticulars", DetailId: this.id });
  129. // }
  130. },
  131. immediate: true,
  132. },
  133. },
  134. methods: {
  135. async getActivityDetail() {
  136. const res = await activity.getSpecialDetailList({ ActivityId: this.id });
  137. if (res.Ret == 200) {
  138. this.specialIsFollow = res.Data.IsFollow;
  139. this.haveAuth = res.Data.HasPermission;
  140. this.industryMsg = res.Data.PopupMsg;
  141. this.sellerMobile = res.Data.SellerMobile;
  142. this.sellerName = res.Data.SellerName;
  143. this.msgType = res.Data.MsgType;
  144. if (res.Data.HasPermission == 1) {
  145. this.detailData = res.Data.Detail;
  146. }
  147. }
  148. },
  149. //感兴趣
  150. async interest() {
  151. const res = await activity.postSpecialSignupAdd({
  152. ActivityId: this.detailData.ActivityId,
  153. });
  154. if (res.Ret === 200) {
  155. this.detailData.IsSignup = 1;
  156. this.currentPages();
  157. uni.showModal({
  158. content: "预报名成功,已通知您的销售",
  159. confirmText: "知道了",
  160. showCancel: false,
  161. confirmColor: "#3385FF",
  162. });
  163. }
  164. },
  165. //已预报名、就是不感兴趣
  166. beNotInterested() {
  167. uni.showModal({
  168. content: "您要取消此次专研调研的预报名吗?",
  169. confirmColor: "#3385FF",
  170. cancelColor: "#606266",
  171. success: async (res) => {
  172. if (res.confirm) {
  173. const res = await activity.postSpecialSignupAdd({
  174. ActivityId: this.detailData.ActivityId,
  175. });
  176. if (res.Ret === 200) {
  177. this.detailData.IsSignup = 0;
  178. this.currentPages();
  179. }
  180. }
  181. },
  182. });
  183. },
  184. currentPages() {
  185. let pages = getCurrentPages();
  186. let prevPage = pages[pages.length - 2];
  187. let path = prevPage.$page.fullPath;
  188. if (path == "/activityPages/specialResearchPage/specialResearchPage") {
  189. const index = prevPage.$vm.collectList.findIndex((item) => item.ActivityId == this.id);
  190. prevPage.$vm.collectList[index].IsSignup = this.detailData.IsSignup;
  191. }
  192. },
  193. //查看行程的事件
  194. lookImg() {
  195. uni.previewImage({
  196. urls: [this.detailData.TripImgLink], //查看图片的数组
  197. });
  198. },
  199. //新调研通知
  200. async specialFollow() {
  201. if (this.specialIsFollow) {
  202. uni.showModal({
  203. content: "您要取消【专项调研】新活动通知吗?",
  204. confirmColor: "#3385FF",
  205. cancelColor: "#606266",
  206. success: async (res) => {
  207. if (res.confirm) {
  208. const res = await activity.postSpecialFollow();
  209. if (res.Ret === 200) {
  210. this.specialIsFollow = !this.specialIsFollow;
  211. }
  212. }
  213. },
  214. });
  215. } else {
  216. const res = await activity.postSpecialFollow();
  217. if (res.Ret === 200) {
  218. this.specialIsFollow = !this.specialIsFollow;
  219. this.specialGoFollowShow = true;
  220. }
  221. }
  222. },
  223. },
  224. onLoad(option) {
  225. this.id = option.id || "";
  226. },
  227. async onShow() {
  228. await this.$store.dispatch("checkHandle");
  229. if (!this.$store.state.isAuth && !this.$store.state.isBind) {
  230. //已授权已绑定
  231. this.getActivityDetail();
  232. }
  233. },
  234. /**
  235. * 用户点击分享
  236. */
  237. onShareAppMessage: function (res) {
  238. return {
  239. title: this.isHorzMobile ? "好友向您推荐此内容,上传名片享查研观向免费试用月卡!" : "活动详情",
  240. path: "/activityPages/specialDetail/specialDetail?id=" + this.id,
  241. success: (res) => {},
  242. fail: (err) => {},
  243. };
  244. },
  245. };
  246. </script>
  247. <style lang="scss" scoped>
  248. .special-detail {
  249. padding-bottom: 100rpx;
  250. .top-notice-special {
  251. height: 96rpx;
  252. padding-right: 20rpx;
  253. background-color: #fe9000;
  254. position: relative;
  255. .notice {
  256. width: 80%;
  257. }
  258. .inform-btn {
  259. position: absolute;
  260. right: 20rpx;
  261. top: 50%;
  262. transform: translateY(-50%);
  263. width: 147rpx;
  264. height: 40rpx;
  265. background: #ffffff;
  266. border-radius: 4rpx;
  267. text-align: center;
  268. line-height: 40rpx;
  269. font-size: 24rpx;
  270. color: #ff9e58;
  271. }
  272. }
  273. .notice {
  274. height: 60rpx;
  275. width: 100%;
  276. }
  277. .choose-limit {
  278. position: relative;
  279. display: flex;
  280. align-items: center;
  281. // margin-left: 20rpx;
  282. image {
  283. width: 93rpx;
  284. height: 38rpx;
  285. }
  286. .limit-img {
  287. position: absolute;
  288. top: -13rpx;
  289. right: -30rpx;
  290. width: 46rpx;
  291. height: 26rpx;
  292. }
  293. }
  294. .content {
  295. padding: 34rpx 34rpx 0rpx;
  296. margin-bottom: -20rpx;
  297. color: #333333;
  298. font-size: 28rpx;
  299. position: relative;
  300. view {
  301. padding-left: 20rpx;
  302. }
  303. text {
  304. line-height: 80rpx;
  305. padding-left: 20rpx;
  306. }
  307. .phone {
  308. padding: 0;
  309. display: inline-block;
  310. color: #2c83ff;
  311. }
  312. .reminder-item {
  313. position: absolute;
  314. top: 0;
  315. right: 0;
  316. width: 204rpx;
  317. height: 118rpx;
  318. z-index: 9;
  319. .item {
  320. width: 100%;
  321. height: 100%;
  322. }
  323. .reminder {
  324. position: absolute;
  325. top: 0rpx;
  326. right: 0rpx;
  327. width: 28rpx;
  328. height: 28rpx;
  329. z-index: 10;
  330. padding: 10rpx 10rpx 20rpx 20rpx;
  331. }
  332. }
  333. .dialog-title {
  334. width: 682rpx;
  335. padding: 20rpx;
  336. background: #f2f2f2;
  337. opacity: 0.8;
  338. text-align: center;
  339. font-size: 30rpx;
  340. font-weight: bold;
  341. margin-bottom: 30rpx;
  342. color: #000;
  343. }
  344. .brackets-title {
  345. padding-left: 20rpx;
  346. }
  347. .city-box {
  348. display: flex;
  349. align-items: center;
  350. text {
  351. padding: 0;
  352. }
  353. .city {
  354. display: flex;
  355. color: #2088ff;
  356. align-items: center;
  357. image {
  358. width: 27rpx;
  359. height: 32rpx;
  360. margin-right: 12rpx;
  361. }
  362. }
  363. }
  364. }
  365. .light-hint {
  366. color: #999;
  367. font-size: 24rpx;
  368. }
  369. .network {
  370. margin-bottom: 30rpx;
  371. padding: 0 !important;
  372. display: flex;
  373. .network-left {
  374. width: 160rpx;
  375. text-align-last: justify;
  376. text-align: justify;
  377. }
  378. .network-right {
  379. width: 480rpx;
  380. }
  381. .network-zoom {
  382. .text_zoom {
  383. width: 100%;
  384. word-break: break-all;
  385. color: #333333;
  386. }
  387. view {
  388. padding: 0 !important;
  389. margin: 0 !important;
  390. }
  391. .copy-zoom {
  392. display: inline-block;
  393. padding: 5rpx 17rpx !important;
  394. border-radius: 34rpx;
  395. background-color: #ebf4ff;
  396. font-size: 24rpx;
  397. color: #2c83ff;
  398. margin: 0 10rpx;
  399. margin-top: 30rpx;
  400. }
  401. }
  402. .network-link {
  403. width: 520rpx !important;
  404. view {
  405. padding: 0 !important;
  406. margin: 0 !important;
  407. width: 100%;
  408. display: flex;
  409. justify-content: space-between;
  410. :first-child {
  411. width: 350rpx;
  412. }
  413. .copy-link {
  414. padding: 5rpx 17rpx !important;
  415. border-radius: 34rpx;
  416. background-color: #ebf4ff;
  417. font-size: 24rpx;
  418. color: #2c83ff;
  419. }
  420. }
  421. }
  422. }
  423. .look-Trip {
  424. width: 100%;
  425. text-align: center;
  426. font-size: 28rpx;
  427. color: #3385ff;
  428. font-weight: 500;
  429. }
  430. .interest-btn {
  431. width: 100%;
  432. text-align: center;
  433. text {
  434. width: 318rpx;
  435. height: 67rpx;
  436. background: #3385ff;
  437. font-size: 28rpx;
  438. color: #fff;
  439. font-weight: 500;
  440. border-radius: 4rpx;
  441. line-height: 67rpx;
  442. margin: 90rpx auto 40rpx;
  443. }
  444. }
  445. }
  446. </style>