specialDetail.vue 11 KB

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