index.vue 15 KB

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