specialDetail.vue 8.8 KB

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