index.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585
  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" v-if="!isIos" :class="isPlay?'music-anumation':'music-anumation'" src="@/static/img/c-music.png" mode="scaleToFill" @click.stop="musicPause()"></image>
  6. <mumu-music v-else ref="musicObj" 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-E2E7FA text-align-center mb-16 wow animate__animated animate__bounceInLeft">
  15. 振合网科技集团实体联盟</view>
  16. <view class="fs-32 fc-E2E7FA 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__bounceInUp"
  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-CFB591 fw-b mb-24 wow animate__animated animate__bounceInUp">
  35. 尊敬的{{userName?userName:'用户'}}</view>
  36. <view class="fs-32 fc-CFB591 text-box wow animate__animated animate__bounceInUp">
  37. 您好!感谢百忙之中阅读此邀请函。我们诚挚的邀请您参加于10月20日振合科技集团举办的2024年度招商说明会。我们深知在发展的道路上离不开您的信任与支持,我们取得的成绩中有您的辛勤付出。此次盛会邀请多位行业专家共聚一堂,特此诚邀您出席盛会,期待与您共话友情、
  38. 展望末来、共创属于我们新的商业传奇。
  39. </view>
  40. <view
  41. class="fc-CFB591 fw-b fs-32 text-align-right mt-32 wow animate__animated animate__bounceInUp">
  42. 振合网科技集团</view>
  43. <view class="fs-28 fc-CFB591 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-CFB591 fs-40 text-align-center mb-16 wow animate__animated animate__bounceInUp">
  65. 重庆丽星君顿酒店</view>
  66. <view class="fs-28 fc-CFB591 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-CFB591 fs-36 text-align-center mb-16 wow animate__animated animate__bounceInLeft">
  85. 会议地址</view>
  86. <view
  87. class="fc-CFB591 fs-28 text-align-center mb-32 wow animate__animated animate__bounceInRight">
  88. 重庆丽星君顿酒店</view>
  89. <view
  90. class="fc-CFB591 fs-36 text-align-center mb-16 wow animate__animated animate__bounceInLeft">
  91. 会议时间</view>
  92. <view
  93. class="fc-CFB591 fs-28 text-align-center mb-32 wow animate__animated animate__bounceInRight">
  94. 10月20日 上午08:30</view>
  95. <view
  96. class="fc-CFB591 fs-36 text-align-center mb-16 wow animate__animated animate__bounceInLeft"
  97. @click.stop="playPhone()">联系方式</view>
  98. <view
  99. class="fc-CFB591 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-CFB591 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-CFB591 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-CFB591 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-CFB591 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-CFB591 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. <image class="up-icon wow animate__animated animate__bounceInUp" src="@/static/img/c-up-icon.png"
  149. mode="scaleToFill"></image>
  150. </view>
  151. </swiper-item>
  152. <!-- 提示 -->
  153. <swiper-item>
  154. <view class="swiper-item" v-if="index == 5">
  155. <view class="index-2">
  156. <image class="text-img-3 wow animate__animated animate__bounceInUp"
  157. src="@/static/img/wxts-text.png" mode="scaleToFill"></image>
  158. <view class="align-items-center mb-48">
  159. <image class="icon-img" src="@/static/img/icon-img.png" mode=""></image>
  160. <view class="fc-CFB591 fs-32 w-588">
  161. 请您提前规划好行程,确保准时参加会议。
  162. </view>
  163. </view>
  164. <view class="align-items-center mb-48">
  165. <image class="icon-img" src="@/static/img/icon-img.png" mode=""></image>
  166. <view class="fc-CFB591 fs-32 w-588">
  167. 请携带好相关证件及资料,以便会议签到和交流,需要的资料类型请咨询邀约人员。
  168. </view>
  169. </view>
  170. <view class="align-items-center mb-214">
  171. <image class="icon-img" src="@/static/img/icon-img.png" mode=""></image>
  172. <view class="fc-CFB591 fs-32 w-588">
  173. 非常感谢你对本次会议的关注和支持,我们期待着在会议上与你相见!振合网科技集团会议筹备组
  174. </view>
  175. </view>
  176. <view class="fc-CFB591 fs-24 mb-16">
  177. 如有任何疑问或需要帮助,请随时联系我们,联系电话:023-67177907
  178. </view>
  179. <view class="playphone-box align-items-center justify-content-center" @click.stop="playPhone()">
  180. <uni-icons style="margin-right: 10rpx;" type="phone" color="#333" size="26">
  181. </uni-icons>
  182. <view class="fs-32 fc-3A2E1C">一键拨打</view>
  183. </view>
  184. </view>
  185. </view>
  186. </swiper-item>
  187. </swiper>
  188. </view>
  189. </template>
  190. <script>
  191. import {
  192. getJsConfig,
  193. userParticipation
  194. } from '@/api/user.js';
  195. import tools from "@/service/tools";
  196. import wxJs from "jweixin-module"
  197. import { useBgMusic } from '@/uni_modules/y-bg-music/js_sdk';
  198. export default {
  199. components: {},
  200. data() {
  201. return {
  202. userName: '',
  203. fromData: {
  204. m_id: '',
  205. name: '',
  206. phone: '',
  207. corporate: '',
  208. inviter: '', //邀请人
  209. inviter_phone: '',
  210. },
  211. isAJAX: false,
  212. index: 0,
  213. audioServe: undefined,
  214. isPlay: false,
  215. isAutoPlay: false,
  216. isIos: true,
  217. }
  218. },
  219. onshow() {
  220. this.$wow.init();
  221. },
  222. mounted() {
  223. this.userName = uni.getStorageSync('userName');
  224. let isWeiXin = tools.isWx();
  225. if (isWeiXin) {
  226. this.getJsConfig()
  227. }
  228. // this.musicPlay()
  229. const isiOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
  230. this.isIos=isiOS
  231. if (isiOS) {
  232. console.log('This is an iOS device');
  233. } else {
  234. this.audioServe = useBgMusic({
  235. src: './static/mp3/4272600974.mp3',
  236. loop: 999, // 循环次数
  237. controls:false // 显示右上角控制元素
  238. });
  239. }
  240. },
  241. methods: {
  242. musicPlay() {
  243. // if (!this.audioServe) {
  244. // this.audioServe = uni.createInnerAudioContext();
  245. // this.audioServe.autoplay = true;
  246. // this.audioServe.loop = true;
  247. // this.audioServe.obeyMuteSwitch = true;
  248. // this.audioServe.src = 'https://jhxcnc.oss-cn-chengdu.aliyuncs.com/mp3/4272600974.mp3';
  249. // }
  250. // this.audioServe.play();
  251. // this.audioServe.onPlay(() => {
  252. // this.isPlay = true;
  253. // this.isAutoPlay = true
  254. // })
  255. // 创建bgAudioManager对象
  256. // const bgAudioManager = uni.getBackgroundAudioManager();
  257. // bgAudioManager.src = 'https://jhxcnc.oss-cn-chengdu.aliyuncs.com/mp3/4272600974.mp3';
  258. // // 开始播放的回调函数
  259. // bgAudioManager.onPlay(() => {
  260. // console.log('开始播放');
  261. // });
  262. // // 播放报错的事件监听
  263. // bgAudioManager.onError((res) => {
  264. // console.log(res.errMsg);
  265. // console.log(res.errCode);
  266. // });
  267. },
  268. play() {
  269. if (!this.isPlay && this.audioServe ) {
  270. // this.audioServe.play();
  271. // this.audioServe.onPlay(() => {
  272. // this.isPlay = true;
  273. // this.isAutoPlay = true
  274. // })
  275. }
  276. },
  277. musicPause() {
  278. // if (this.audioServe) {
  279. // this.audioServe.pause();
  280. // this.audioServe.onPause(() => {
  281. // this.isPlay = false;
  282. // });
  283. // }
  284. },
  285. getJsConfig() {
  286. console.log(window.location)
  287. let url = window.location.href.split('#')[0];
  288. getJsConfig({
  289. 'url': url
  290. }).then(res => {
  291. if (res.code === 1) {
  292. wxJs.config({
  293. debug: false,
  294. appId: res.data.appid,
  295. nonceStr: res.data.noncestr,
  296. signature: res.data.signature,
  297. timestamp: res.data.timestamp * 1, // 必填,生成签名的时间戳
  298. jsApiList: ['updateAppMessageShareData', 'updateTimelineShareData']
  299. })
  300. wxJs.ready(() => {
  301. //自定义“分享给朋友”
  302. // this.musicPlay()
  303. wxJs.updateAppMessageShareData({
  304. title: '振合网“实体联盟”招商说明会-邀请函',
  305. desc: '10月20日我们不见不散!',
  306. link: "https://enroll.jhcs888.com", // 分享链接,该链接域名或路径必须与当前页面对应的公众号 JS 安全域名一致
  307. imgUrl: 'https://jhnewshop.oss-cn-chengdu.aliyuncs.com/storage/attest/20210927/949e48fb7c286836097efdd4ba4d0bd9.jpg', // 分享图标
  308. success: function() {
  309. // 设置成功
  310. }
  311. })
  312. //自定义“分享到朋友圈”
  313. wxJs.updateTimelineShareData({
  314. title: '振合网“实体联盟”招商说明会-邀请函',
  315. desc: '10月20日我们不见不散!',
  316. link: "https://enroll.jhcs888.com", // 分享链接,该链接域名或路径必须与当前页面对应的公众号 JS 安全域名一致
  317. imgUrl: 'https://jhnewshop.oss-cn-chengdu.aliyuncs.com/storage/attest/20210927/949e48fb7c286836097efdd4ba4d0bd9.jpg', // 分享图标
  318. success: function() {
  319. // 设置成功
  320. }
  321. })
  322. if(this.audioServe){
  323. this.audioServe.play();
  324. }else if (!this.isIos){
  325. this.$refs.musicObj.playTo()
  326. }
  327. });
  328. }
  329. })
  330. },
  331. playPhone() {
  332. uni.makePhoneCall({
  333. phoneNumber: '023-67177907'
  334. });
  335. },
  336. swiperChange(e) {
  337. console.log('aaaaaaaaaaaaaaaaaaaaaaaaaaaa')
  338. this.play()
  339. if (e.detail.current != this.index) {
  340. this.index = e.detail.current;
  341. }
  342. },
  343. toMap() {
  344. uni.openLocation({
  345. latitude: 29.665085,
  346. longitude: 106.615366,
  347. scale: 18,
  348. name: '重庆丽星君顿酒店',
  349. address: '重庆市渝北区服装城大道48号',
  350. success() {},
  351. fail(error) {}
  352. });
  353. },
  354. save() {
  355. if (this.isAJAX) {
  356. return
  357. }
  358. this.isAJAX = true;
  359. this.fromData.m_id = uni.getStorageSync('m_id');
  360. userParticipation(this.fromData).then((res) => {
  361. if (res.code === 1) {
  362. tools.success('预约成功')
  363. this.fromData = {
  364. m_id: '',
  365. name: '',
  366. phone: '',
  367. corporate: '',
  368. inviter: '', //邀请人
  369. inviter_phone: '',
  370. }
  371. } else {
  372. tools.error(res.msg)
  373. }
  374. this.isAJAX = false;
  375. })
  376. }
  377. },
  378. }
  379. </script>
  380. <style lang="scss" scoped>
  381. .w-588{
  382. width: 588rpx;
  383. }
  384. .playphone-box{
  385. width: 100%;
  386. height: 86rpx;
  387. background: linear-gradient( 90deg, #E4BD85 0%, #CEB590 100%);
  388. border-radius: 10rpx;
  389. }
  390. .index-box {
  391. background-image: url('@/static/img/c-bg.png');
  392. background-size: 100% 100%;
  393. }
  394. .up-icon {
  395. width: 64rpx;
  396. height: 64rpx;
  397. margin: 0 auto;
  398. }
  399. .swiper {
  400. flex: 1;
  401. width: 100%;
  402. height: 100%;
  403. .swiper-item {
  404. width: 100%;
  405. height: 100%;
  406. }
  407. }
  408. .logo-img {
  409. width: 136rpx;
  410. height: 80rpx;
  411. margin-top: 8rpx;
  412. }
  413. .music-img {
  414. margin-top: 16rpx;
  415. width: 56rpx;
  416. height: 56rpx;
  417. }
  418. .music-anumation {
  419. animation: rotation 2s linear infinite;
  420. }
  421. @keyframes rotation {
  422. from {
  423. transform: rotate(0deg);
  424. }
  425. to {
  426. transform: rotate(360deg);
  427. }
  428. }
  429. .index-1 {
  430. .img-text {
  431. width: 384rpx;
  432. height: 232rpx;
  433. margin: 76rpx auto 36rpx auto;
  434. }
  435. .img-xian {
  436. width: 10rpx;
  437. height: 174rpx;
  438. margin: 0 auto 154rpx auto;
  439. }
  440. .name-text {
  441. width: 288rpx;
  442. height: 100rpx;
  443. margin: 0 auto 140rpx auto;
  444. }
  445. .time-text {
  446. width: 274rpx;
  447. height: 37rpx;
  448. margin: 0 auto 140rpx auto;
  449. }
  450. }
  451. .index-2 {
  452. width: 686rpx;
  453. min-height: 1032rpx;
  454. background: rgba(5,19,103,0.5);
  455. border-radius: 12rpx;
  456. border: 2rpx solid #112495;
  457. margin: 40rpx auto;
  458. box-sizing: border-box;
  459. padding: 32rpx;
  460. input {
  461. width: 622rpx;
  462. height: 80rpx;
  463. background: #FFFFFF;
  464. border-radius: 10rpx;
  465. box-sizing: border-box;
  466. padding: 0 20rpx;
  467. font-size: 28rpx;
  468. }
  469. .save-box {
  470. width: 622rpx;
  471. height: 80rpx;
  472. background: linear-gradient(90deg, #EBC795 0%, #E3BB83 100%);
  473. border-radius: 10rpx;
  474. text-align: center;
  475. line-height: 80rpx;
  476. font-size: 38rpx;
  477. font-weight: 600;
  478. color: #3A2E1C;
  479. }
  480. .text-img {
  481. width: 302rpx;
  482. height: 116rpx;
  483. margin: 0 auto 44rpx auto;
  484. }
  485. .text-box {
  486. line-height: 68rpx;
  487. letter-spacing: 4rpx;
  488. display: block;
  489. text-indent: 72rpx;
  490. }
  491. .text-img-1 {
  492. width: 224rpx;
  493. height: 116rpx;
  494. margin: 0 auto 44rpx auto;
  495. }
  496. .text-img-2 {
  497. width: 214rpx;
  498. height: 116rpx;
  499. margin: 0 auto 44rpx auto;
  500. }
  501. .text-img-3 {
  502. width: 192rpx;
  503. height: 116rpx;
  504. margin: 0 auto 44rpx auto;
  505. }
  506. .img-1 {
  507. width: 622rpx;
  508. height: 328rpx;
  509. border-radius: 10rpx;
  510. margin-bottom: 24rpx;
  511. }
  512. .img-2 {
  513. width: 300rpx;
  514. height: 214rpx;
  515. margin-bottom: 60rpx;
  516. }
  517. .img-3 {
  518. width: 622rpx;
  519. height: 354rpx;
  520. border-radius: 10rpx;
  521. margin-bottom: 40rpx;
  522. }
  523. .icon-img{
  524. width: 23rpx;
  525. height: 23rpx;
  526. margin-right: 8rpx;
  527. }
  528. .b-f {
  529. position: relative;
  530. .b-c {
  531. position: absolute;
  532. right: 24rpx;
  533. bottom: 22rpx;
  534. width: 172rpx;
  535. height: 56rpx;
  536. background: #2F80ED;
  537. border-radius: 4rpx;
  538. text-align: center;
  539. line-height: 56rpx;
  540. font-size: 28rpx;
  541. color: #fff;
  542. }
  543. }
  544. }
  545. </style>