index.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490
  1. <template>
  2. <view class="index-box box-border-box flex-common-css" @click.stop="play()">
  3. <view class="flex-justify-space box-border-box plr-32">
  4. <image class="logo-img" src="@/static/img/c-logo.png" mode="scaleToFill"></image>
  5. <image class="music-img" :class="isPlay?'music-anumation':''" src="@/static/img/c-music.png" mode="scaleToFill" @click.stop="musicPause()"></image>
  6. </view>
  7. <swiper class="swiper" :vertical='true' @change="swiperChange">
  8. <!-- 邀请函 -->
  9. <swiper-item>
  10. <view class="swiper-item index-1" v-if="index == 0">
  11. <image class="img-text wow animate__animated animate__bounceInUp" src="@/static/img/yqh-text.png"
  12. mode="scaleToFill"></image>
  13. <view class="fs-48 fc-f text-align-center mb-16 wow animate__animated animate__bounceInLeft">
  14. 振合网科技集团实体联盟</view>
  15. <view class="fs-32 fc-f text-align-center mb-72 wow animate__animated animate__bounceInRight">未来已来
  16. 一触即发</view>
  17. <image class="img-xian wow animate__animated animate__bounceInUp" src="@/static/img/xian.png"
  18. mode="scaleToFill"></image>
  19. <image class="name-text wow animate__animated animate__bounceInLeft"
  20. src="@/static/img/name-text.png" mode="scaleToFill"></image>
  21. <image class="time-text wow animate__animated animate__bounceInRight"
  22. src="@/static/img/time-text.png" mode="scaleToFill"></image>
  23. <image class="up-icon wow animate__animated animate__bounceInUp" src="@/static/img/c-up-icon.png"
  24. mode="scaleToFill"></image>
  25. </view>
  26. </swiper-item>
  27. <!-- 诚挚邀请 -->
  28. <swiper-item>
  29. <view class="swiper-item">
  30. <view class="index-2" v-if="index == 1">
  31. <image class="text-img wow animate__animated animate__bounceInUp"
  32. src="@/static/img/czyq-text.png" mode="scaleToFill"></image>
  33. <view class="fs-32 fc-F2D4A9 fw-b mb-24 wow animate__animated animate__bounceInUp">
  34. 尊敬的{{userName?userName:'用户'}}</view>
  35. <view class="fs-32 fc-F2D4A9 text-box wow animate__animated animate__bounceInUp">
  36. 您好!感谢百忙之中阅读此邀请函。我们诚挚的邀请您参加于10月20日振合科技集团举办的2024年度招商说明会。我们深知在发展的道路上离不开您的信任与支持,我们取得的成绩中有您的辛勤付出。此次盛会邀请多位行业专家共聚一堂,特此诚邀您出席盛会,期待与您共话友情、
  37. 展望末来、共创属于我们新的商业传奇。
  38. </view>
  39. <view
  40. class="fc-F2D4A9 fw-b fs-32 text-align-right mt-32 wow animate__animated animate__bounceInUp">
  41. 振合网科技集团</view>
  42. <view class="fs-28 fc-F2D4A9 text-align-right wow animate__animated animate__bounceInUp">
  43. 2024年10月20日</view>
  44. </view>
  45. <image class="up-icon wow animate__animated animate__bounceInUp" src="@/static/img/c-up-icon.png"
  46. mode="scaleToFill"></image>
  47. </view>
  48. </swiper-item>
  49. <!-- 活动地址 -->
  50. <swiper-item>
  51. <view class="swiper-item">
  52. <view class="index-2" v-if="index == 2">
  53. <image class="text-img-1 wow animate__animated animate__bounceInUp"
  54. src="@/static/img/hdtd-text.png" mode="scaleToFill"></image>
  55. <image class="img-1 wow animate__animated animate__bounceInUp" src="@/static/img/h-1.png"
  56. mode="scaleToFill"></image>
  57. <view class="flex-justify-space">
  58. <image class="img-2 wow animate__animated animate__bounceInLeft" src="@/static/img/h-2.png"
  59. mode="scaleToFill"></image>
  60. <image class="img-2 wow animate__animated animate__bounceInRight" src="@/static/img/h-3.png"
  61. mode="scaleToFill"></image>
  62. </view>
  63. <view class="fc-F2D4A9 fs-40 text-align-center mb-16 wow animate__animated animate__bounceInUp">
  64. 重庆丽星君顿酒店</view>
  65. <view class="fs-28 fc-F2D4A9 text-align-center wow animate__animated animate__bounceInUp">
  66. 地址:重庆市渝北区服装城大道48号</view>
  67. </view>
  68. <image class="up-icon wow animate__animated animate__bounceInUp" src="@/static/img/c-up-icon.png"
  69. mode="scaleToFill"></image>
  70. </view>
  71. </swiper-item>
  72. <!-- 地址导航 -->
  73. <swiper-item>
  74. <view class="swiper-item" v-if="index == 3">
  75. <view class="index-2">
  76. <image class="text-img wow animate__animated animate__bounceInUp"
  77. src="@/static/img/dzdh-text.png" mode="scaleToFill"></image>
  78. <view class="b-f wow animate__animated animate__bounceInUp" @click.stop="toMap()">
  79. <image class="img-3" src="@/static/img/map.png" mode="scaleToFill"></image>
  80. <view class="b-c">开始导航</view>
  81. </view>
  82. <view
  83. class="fc-F2D4A9 fs-36 text-align-center mb-16 wow animate__animated animate__bounceInLeft">
  84. 会议地址</view>
  85. <view
  86. class="fc-F2D4A9 fs-28 text-align-center mb-32 wow animate__animated animate__bounceInRight">
  87. 重庆丽星君顿酒店</view>
  88. <view
  89. class="fc-F2D4A9 fs-36 text-align-center mb-16 wow animate__animated animate__bounceInLeft">
  90. 会议时间</view>
  91. <view
  92. class="fc-F2D4A9 fs-28 text-align-center mb-32 wow animate__animated animate__bounceInRight">
  93. 10月20日 上午08:30</view>
  94. <view
  95. class="fc-F2D4A9 fs-36 text-align-center mb-16 wow animate__animated animate__bounceInLeft"
  96. @click.stop="playPhone()">联系方式</view>
  97. <view
  98. class="fc-F2D4A9 fs-28 text-align-center mb-32 wow animate__animated animate__bounceInRight"
  99. @click.stop="playPhone()">
  100. <uni-icons style="margin-right: 10rpx;" type="phone-filled" color="#f2d4a9" size="14">
  101. </uni-icons>
  102. 023-67177907
  103. </view>
  104. </view>
  105. <image class="up-icon wow animate__animated animate__bounceInUp" src="@/static/img/c-up-icon.png"
  106. mode="scaleToFill"></image>
  107. </view>
  108. </swiper-item>
  109. <!-- 参与预约 -->
  110. <swiper-item>
  111. <view class="swiper-item" v-if="index == 4">
  112. <view class="index-2">
  113. <image class="text-img-2 wow animate__animated animate__bounceInUp"
  114. src="@/static/img/cyyy-text.png" mode="scaleToFill"></image>
  115. <view class="mb-32">
  116. <view class="fc-F2D4A9 fs-32 mb-16 wow animate__animated animate__bounceInLeft">您的姓名<span
  117. class="fc-ED301D fs-32">*</span></view>
  118. <input class="wow animate__animated animate__bounceInRight" v-model="fromData.name"
  119. type="text" placeholder="请输入您的姓名">
  120. </view>
  121. <view class="mb-32">
  122. <view class="fc-F2D4A9 fs-32 mb-16 wow animate__animated animate__bounceInLeft">您的手机号<span
  123. class="fc-ED301D fs-32">*</span></view>
  124. <input class="wow animate__animated animate__bounceInRight" v-model="fromData.phone"
  125. type="number" placeholder="请输入您的手机号">
  126. </view>
  127. <view class="mb-32">
  128. <view class="fc-F2D4A9 fs-32 mb-16 wow animate__animated animate__bounceInLeft">您的公司名称<span
  129. class="fc-ED301D fs-32">*</span></view>
  130. <input class="wow animate__animated animate__bounceInRight" v-model="fromData.corporate"
  131. type="text" placeholder="请输入您的公司名称">
  132. </view>
  133. <view class="mb-32">
  134. <view class="fc-F2D4A9 fs-32 mb-16 wow animate__animated animate__bounceInLeft">邀请人<span
  135. class="fc-ED301D fs-32">*</span></view>
  136. <input class="wow animate__animated animate__bounceInRight" v-model="fromData.inviter"
  137. type="text" placeholder="请输入您的邀请人">
  138. </view>
  139. <view class="mb-72">
  140. <view class="fc-F2D4A9 fs-32 mb-16 wow animate__animated animate__bounceInLeft">邀请人手机号<span
  141. class="fc-ED301D fs-32">*</span></view>
  142. <input class="wow animate__animated animate__bounceInRight" v-model="fromData.inviter_phone"
  143. type="number" placeholder="请输入邀请人的手机号">
  144. </view>
  145. <view class="save-box wow animate__animated animate__bounceInUp" @click.stop="save()">提交</view>
  146. </view>
  147. </view>
  148. </swiper-item>
  149. </swiper>
  150. </view>
  151. </template>
  152. <script>
  153. import {
  154. getJsConfig,
  155. userParticipation
  156. } from '@/api/user.js';
  157. import tools from "@/service/tools";
  158. import wxJs from "jweixin-module"
  159. export default {
  160. components: {},
  161. data() {
  162. return {
  163. userName: '',
  164. fromData: {
  165. m_id: '',
  166. name: '',
  167. phone: '',
  168. corporate: '',
  169. inviter: '', //邀请人
  170. inviter_phone: '',
  171. },
  172. isAJAX: false,
  173. index: 0,
  174. audioServe: undefined,
  175. isPlay: false,
  176. isAutoPlay: false,
  177. }
  178. },
  179. onshow() {
  180. this.$wow.init();
  181. },
  182. mounted() {
  183. this.userName = uni.getStorageSync('userName');
  184. let isWeiXin = tools.isWx();
  185. if (isWeiXin) {
  186. this.getJsConfig()
  187. }
  188. this.musicPlay()
  189. },
  190. methods: {
  191. musicPlay() {
  192. if (!this.audioServe) {
  193. this.audioServe = uni.createInnerAudioContext();
  194. this.audioServe.autoplay = true;
  195. this.audioServe.loop = true;
  196. this.audioServe.obeyMuteSwitch = true;
  197. this.audioServe.src = 'https://jhxcnc.oss-cn-chengdu.aliyuncs.com/mp3/4272600974.mp3';
  198. }
  199. this.audioServe.play();
  200. this.audioServe.onPlay(() => {
  201. this.isPlay = true;
  202. this.isAutoPlay = true
  203. })
  204. },
  205. play() {
  206. if (!this.isPlay && this.audioServe) {
  207. this.audioServe.play();
  208. this.audioServe.onPlay(() => {
  209. this.isPlay = true;
  210. this.isAutoPlay = true
  211. })
  212. }
  213. },
  214. musicPause() {
  215. if (this.audioServe) {
  216. this.audioServe.pause();
  217. this.audioServe.onPause(() => {
  218. this.isPlay = false;
  219. });
  220. }
  221. },
  222. getJsConfig() {
  223. console.log(window.location)
  224. let url = window.location.href.split('#')[0];
  225. getJsConfig({
  226. 'url': url
  227. }).then(res => {
  228. if (res.code === 1) {
  229. wxJs.config({
  230. debug: false,
  231. appId: res.data.appid,
  232. nonceStr: res.data.noncestr,
  233. signature: res.data.signature,
  234. timestamp: res.data.timestamp * 1, // 必填,生成签名的时间戳
  235. jsApiList: ['updateAppMessageShareData', 'updateTimelineShareData']
  236. })
  237. wxJs.ready(() => {
  238. //自定义“分享给朋友”
  239. // this.musicPlay()
  240. wxJs.updateAppMessageShareData({
  241. title: '振合网“实体联盟”招商说明会-邀请函',
  242. desc: '10月20日我们不见不散!',
  243. link: "https://enroll.jhcs888.com/#/", // 分享链接,该链接域名或路径必须与当前页面对应的公众号 JS 安全域名一致
  244. imgUrl: 'https://jhnewshop.oss-cn-chengdu.aliyuncs.com/storage/attest/20210927/949e48fb7c286836097efdd4ba4d0bd9.jpg', // 分享图标
  245. success: function() {
  246. // 设置成功
  247. }
  248. })
  249. //自定义“分享到朋友圈”
  250. wxJs.updateTimelineShareData({
  251. title: '振合网“实体联盟”招商说明会-邀请函',
  252. desc: '10月20日我们不见不散!',
  253. link: "https://enroll.jhcs888.com/#/", // 分享链接,该链接域名或路径必须与当前页面对应的公众号 JS 安全域名一致
  254. imgUrl: 'https://jhnewshop.oss-cn-chengdu.aliyuncs.com/storage/attest/20210927/949e48fb7c286836097efdd4ba4d0bd9.jpg', // 分享图标
  255. success: function() {
  256. // 设置成功
  257. }
  258. })
  259. });
  260. }
  261. })
  262. },
  263. playPhone() {
  264. uni.makePhoneCall({
  265. phoneNumber: '023-67177907'
  266. });
  267. },
  268. swiperChange(e) {
  269. console.log('aaaaaaaaaaaaaaaaaaaaaaaaaaaa')
  270. this.play()
  271. if (e.detail.current != this.index) {
  272. this.index = e.detail.current;
  273. }
  274. },
  275. toMap() {
  276. uni.openLocation({
  277. latitude: 29.665085,
  278. longitude: 106.615366,
  279. scale: 18,
  280. name: '重庆丽星君顿酒店',
  281. address: '重庆市渝北区服装城大道48号',
  282. success() {},
  283. fail(error) {}
  284. });
  285. },
  286. save() {
  287. if (this.isAJAX) {
  288. return
  289. }
  290. this.isAJAX = true;
  291. this.fromData.m_id = uni.getStorageSync('m_id');
  292. userParticipation(this.fromData).then((res) => {
  293. if (res.code === 1) {
  294. tools.success('预约成功')
  295. this.fromData = {
  296. m_id: '',
  297. name: '',
  298. phone: '',
  299. corporate: '',
  300. inviter: '', //邀请人
  301. inviter_phone: '',
  302. }
  303. } else {
  304. tools.error(res.msg)
  305. }
  306. this.isAJAX = false;
  307. })
  308. }
  309. },
  310. }
  311. </script>
  312. <style lang="scss" scoped>
  313. .index-box {
  314. background-image: url('@/static/img/c-bg.png');
  315. background-size: 100% 100%;
  316. }
  317. .up-icon {
  318. width: 64rpx;
  319. height: 64rpx;
  320. margin: 0 auto;
  321. }
  322. .swiper {
  323. flex: 1;
  324. width: 100%;
  325. height: 100%;
  326. .swiper-item {
  327. width: 100%;
  328. height: 100%;
  329. }
  330. }
  331. .logo-img {
  332. width: 136rpx;
  333. height: 79rpx;
  334. margin-top: 8rpx;
  335. }
  336. .music-img {
  337. margin-top: 16rpx;
  338. width: 56rpx;
  339. height: 56rpx;
  340. }
  341. .music-anumation {
  342. animation: rotation 2s linear infinite;
  343. }
  344. @keyframes rotation {
  345. from {
  346. transform: rotate(0deg);
  347. }
  348. to {
  349. transform: rotate(360deg);
  350. }
  351. }
  352. .index-1 {
  353. .img-text {
  354. width: 384rpx;
  355. height: 232rpx;
  356. margin: 76rpx auto 36rpx auto;
  357. }
  358. .img-xian {
  359. width: 10rpx;
  360. height: 174rpx;
  361. margin: 0 auto 154rpx auto;
  362. }
  363. .name-text {
  364. width: 288rpx;
  365. height: 32rpx;
  366. margin: 0 auto 10rpx auto;
  367. }
  368. .time-text {
  369. width: 274rpx;
  370. height: 37rpx;
  371. margin: 0 auto 140rpx auto;
  372. }
  373. }
  374. .index-2 {
  375. width: 686rpx;
  376. min-height: 1032rpx;
  377. background: rgba(23, 49, 74, 0.51);
  378. border-radius: 12rpx;
  379. border: 2rpx solid rgba(51, 121, 163, 0.8);
  380. margin: 40rpx auto;
  381. box-sizing: border-box;
  382. padding: 32rpx;
  383. input {
  384. width: 622rpx;
  385. height: 80rpx;
  386. background: #FFFFFF;
  387. border-radius: 10rpx;
  388. box-sizing: border-box;
  389. padding: 0 20rpx;
  390. font-size: 28rpx;
  391. }
  392. .save-box {
  393. width: 622rpx;
  394. height: 80rpx;
  395. background: linear-gradient(90deg, #EBC795 0%, #E3BB83 100%);
  396. border-radius: 10rpx;
  397. text-align: center;
  398. line-height: 80rpx;
  399. font-size: 38rpx;
  400. font-weight: 600;
  401. color: #3A2E1C;
  402. }
  403. .text-img {
  404. width: 302rpx;
  405. height: 116rpx;
  406. margin: 0 auto 44rpx auto;
  407. }
  408. .text-box {
  409. line-height: 68rpx;
  410. letter-spacing: 4rpx;
  411. display: block;
  412. text-indent: 72rpx;
  413. }
  414. .text-img-1 {
  415. width: 224rpx;
  416. height: 116rpx;
  417. margin: 0 auto 44rpx auto;
  418. }
  419. .text-img-2 {
  420. width: 214rpx;
  421. height: 116rpx;
  422. margin: 0 auto 44rpx auto;
  423. }
  424. .img-1 {
  425. width: 622rpx;
  426. height: 328rpx;
  427. border-radius: 10rpx;
  428. margin-bottom: 24rpx;
  429. }
  430. .img-2 {
  431. width: 300rpx;
  432. height: 214rpx;
  433. margin-bottom: 60rpx;
  434. }
  435. .img-3 {
  436. width: 622rpx;
  437. height: 354rpx;
  438. border-radius: 10rpx;
  439. margin-bottom: 40rpx;
  440. }
  441. .b-f {
  442. position: relative;
  443. .b-c {
  444. position: absolute;
  445. right: 24rpx;
  446. bottom: 22rpx;
  447. width: 172rpx;
  448. height: 56rpx;
  449. background: #2F80ED;
  450. border-radius: 4rpx;
  451. text-align: center;
  452. line-height: 56rpx;
  453. font-size: 28rpx;
  454. color: #fff;
  455. }
  456. }
  457. }
  458. </style>