index.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591
  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. isEnroll:true
  218. }
  219. },
  220. onLoad(data) {
  221. if(data.noEnroll!==undefined){
  222. this.isEnroll=false
  223. }
  224. },
  225. onshow() {
  226. this.$wow.init();
  227. },
  228. mounted() {
  229. this.userName = uni.getStorageSync('userName');
  230. let isWeiXin = tools.isWx();
  231. if (isWeiXin) {
  232. this.getJsConfig()
  233. }
  234. // this.musicPlay()
  235. const isiOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
  236. this.isIos=isiOS
  237. if (isiOS) {
  238. console.log('This is an iOS device');
  239. } else {
  240. this.audioServe = useBgMusic({
  241. src: './static/mp3/4272600974.mp3',
  242. loop: 999, // 循环次数
  243. controls:false // 显示右上角控制元素
  244. });
  245. }
  246. },
  247. methods: {
  248. musicPlay() {
  249. // if (!this.audioServe) {
  250. // this.audioServe = uni.createInnerAudioContext();
  251. // this.audioServe.autoplay = true;
  252. // this.audioServe.loop = true;
  253. // this.audioServe.obeyMuteSwitch = true;
  254. // this.audioServe.src = 'https://jhxcnc.oss-cn-chengdu.aliyuncs.com/mp3/4272600974.mp3';
  255. // }
  256. // this.audioServe.play();
  257. // this.audioServe.onPlay(() => {
  258. // this.isPlay = true;
  259. // this.isAutoPlay = true
  260. // })
  261. // 创建bgAudioManager对象
  262. // const bgAudioManager = uni.getBackgroundAudioManager();
  263. // bgAudioManager.src = 'https://jhxcnc.oss-cn-chengdu.aliyuncs.com/mp3/4272600974.mp3';
  264. // // 开始播放的回调函数
  265. // bgAudioManager.onPlay(() => {
  266. // console.log('开始播放');
  267. // });
  268. // // 播放报错的事件监听
  269. // bgAudioManager.onError((res) => {
  270. // console.log(res.errMsg);
  271. // console.log(res.errCode);
  272. // });
  273. },
  274. play() {
  275. if (!this.isPlay && this.audioServe ) {
  276. // this.audioServe.play();
  277. // this.audioServe.onPlay(() => {
  278. // this.isPlay = true;
  279. // this.isAutoPlay = true
  280. // })
  281. }
  282. },
  283. musicPause() {
  284. // if (this.audioServe) {
  285. // this.audioServe.pause();
  286. // this.audioServe.onPause(() => {
  287. // this.isPlay = false;
  288. // });
  289. // }
  290. },
  291. getJsConfig() {
  292. console.log(window.location)
  293. let url = window.location.href.split('#')[0];
  294. getJsConfig({
  295. 'url': url
  296. }).then(res => {
  297. if (res.code === 1) {
  298. wxJs.config({
  299. debug: false,
  300. appId: res.data.appid,
  301. nonceStr: res.data.noncestr,
  302. signature: res.data.signature,
  303. timestamp: res.data.timestamp * 1, // 必填,生成签名的时间戳
  304. jsApiList: ['updateAppMessageShareData', 'updateTimelineShareData']
  305. })
  306. wxJs.ready(() => {
  307. //自定义“分享给朋友”
  308. // this.musicPlay()
  309. wxJs.updateAppMessageShareData({
  310. title: this.isEnroll?'振合网“实体联盟”招商说明会-邀请函':"<畅通国民经济循环 发展新质生产力>研讨会",
  311. desc: this.isEnroll?'10月20日我们不见不散!':'实现共同富裕',
  312. link: "https://enroll.jhcs888.com", // 分享链接,该链接域名或路径必须与当前页面对应的公众号 JS 安全域名一致
  313. imgUrl: 'https://jhnewshop.oss-cn-chengdu.aliyuncs.com/storage/attest/20210927/949e48fb7c286836097efdd4ba4d0bd9.jpg', // 分享图标
  314. success: function() {
  315. // 设置成功
  316. }
  317. })
  318. //自定义“分享到朋友圈”
  319. wxJs.updateTimelineShareData({
  320. title: this.isEnroll?'振合网“实体联盟”招商说明会-邀请函':'<畅通国民经济循环 发展新质生产力>研讨会',
  321. desc: this.isEnroll?'10月20日我们不见不散!':'实现共同富裕',
  322. link: "https://enroll.jhcs888.com", // 分享链接,该链接域名或路径必须与当前页面对应的公众号 JS 安全域名一致
  323. imgUrl: 'https://jhnewshop.oss-cn-chengdu.aliyuncs.com/storage/attest/20210927/949e48fb7c286836097efdd4ba4d0bd9.jpg', // 分享图标
  324. success: function() {
  325. // 设置成功
  326. }
  327. })
  328. if(this.audioServe){
  329. this.audioServe.play();
  330. }else if (!this.isIos){
  331. this.$refs.musicObj.playTo()
  332. }
  333. });
  334. }
  335. })
  336. },
  337. playPhone() {
  338. uni.makePhoneCall({
  339. phoneNumber: '023-67177907'
  340. });
  341. },
  342. swiperChange(e) {
  343. this.play()
  344. if (e.detail.current !== this.index) {
  345. this.index = e.detail.current;
  346. }
  347. },
  348. toMap() {
  349. uni.openLocation({
  350. latitude: 29.665085,
  351. longitude: 106.615366,
  352. scale: 18,
  353. name: '重庆丽星君顿酒店',
  354. address: '重庆市渝北区服装城大道48号',
  355. success() {},
  356. fail(error) {}
  357. });
  358. },
  359. save() {
  360. if (this.isAJAX) {
  361. return
  362. }
  363. this.isAJAX = true;
  364. this.fromData.m_id = uni.getStorageSync('m_id');
  365. userParticipation(this.fromData).then((res) => {
  366. if (res.code === 1) {
  367. tools.success('预约成功')
  368. this.fromData = {
  369. m_id: '',
  370. name: '',
  371. phone: '',
  372. corporate: '',
  373. inviter: '', //邀请人
  374. inviter_phone: '',
  375. }
  376. } else {
  377. tools.error(res.msg)
  378. }
  379. this.isAJAX = false;
  380. })
  381. }
  382. },
  383. }
  384. </script>
  385. <style lang="scss" scoped>
  386. .w-588{
  387. width: 588rpx;
  388. }
  389. .playphone-box{
  390. width: 100%;
  391. height: 86rpx;
  392. background: linear-gradient( 90deg, #E4BD85 0%, #CEB590 100%);
  393. border-radius: 10rpx;
  394. }
  395. .index-box {
  396. background-image: url('@/static/img/c-bg.png');
  397. background-size: 100% 100%;
  398. }
  399. .up-icon {
  400. width: 64rpx;
  401. height: 64rpx;
  402. margin: 0 auto;
  403. }
  404. .swiper {
  405. flex: 1;
  406. width: 100%;
  407. height: 100%;
  408. .swiper-item {
  409. width: 100%;
  410. height: 100%;
  411. }
  412. }
  413. .logo-img {
  414. width: 136rpx;
  415. height: 80rpx;
  416. margin-top: 8rpx;
  417. }
  418. .music-img {
  419. margin-top: 16rpx;
  420. width: 56rpx;
  421. height: 56rpx;
  422. }
  423. .music-anumation {
  424. animation: rotation 2s linear infinite;
  425. }
  426. @keyframes rotation {
  427. from {
  428. transform: rotate(0deg);
  429. }
  430. to {
  431. transform: rotate(360deg);
  432. }
  433. }
  434. .index-1 {
  435. .img-text {
  436. width: 384rpx;
  437. height: 232rpx;
  438. margin: 76rpx auto 36rpx auto;
  439. }
  440. .img-xian {
  441. width: 10rpx;
  442. height: 174rpx;
  443. margin: 0 auto 154rpx auto;
  444. }
  445. .name-text {
  446. width: 288rpx;
  447. height: 100rpx;
  448. margin: 0 auto 140rpx auto;
  449. }
  450. .time-text {
  451. width: 274rpx;
  452. height: 37rpx;
  453. margin: 0 auto 140rpx auto;
  454. }
  455. }
  456. .index-2 {
  457. width: 686rpx;
  458. min-height: 1032rpx;
  459. background: rgba(5,19,103,0.5);
  460. border-radius: 12rpx;
  461. border: 2rpx solid #112495;
  462. margin: 40rpx auto;
  463. box-sizing: border-box;
  464. padding: 32rpx;
  465. input {
  466. width: 622rpx;
  467. height: 80rpx;
  468. background: #FFFFFF;
  469. border-radius: 10rpx;
  470. box-sizing: border-box;
  471. padding: 0 20rpx;
  472. font-size: 28rpx;
  473. }
  474. .save-box {
  475. width: 622rpx;
  476. height: 80rpx;
  477. background: linear-gradient(90deg, #EBC795 0%, #E3BB83 100%);
  478. border-radius: 10rpx;
  479. text-align: center;
  480. line-height: 80rpx;
  481. font-size: 38rpx;
  482. font-weight: 600;
  483. color: #3A2E1C;
  484. }
  485. .text-img {
  486. width: 302rpx;
  487. height: 116rpx;
  488. margin: 0 auto 44rpx auto;
  489. }
  490. .text-box {
  491. line-height: 68rpx;
  492. letter-spacing: 4rpx;
  493. display: block;
  494. text-indent: 72rpx;
  495. }
  496. .text-img-1 {
  497. width: 224rpx;
  498. height: 116rpx;
  499. margin: 0 auto 44rpx auto;
  500. }
  501. .text-img-2 {
  502. width: 214rpx;
  503. height: 116rpx;
  504. margin: 0 auto 44rpx auto;
  505. }
  506. .text-img-3 {
  507. width: 192rpx;
  508. height: 116rpx;
  509. margin: 0 auto 44rpx auto;
  510. }
  511. .img-1 {
  512. width: 622rpx;
  513. height: 328rpx;
  514. border-radius: 10rpx;
  515. margin-bottom: 24rpx;
  516. }
  517. .img-2 {
  518. width: 300rpx;
  519. height: 214rpx;
  520. margin-bottom: 60rpx;
  521. }
  522. .img-3 {
  523. width: 622rpx;
  524. height: 354rpx;
  525. border-radius: 10rpx;
  526. margin-bottom: 40rpx;
  527. }
  528. .icon-img{
  529. width: 23rpx;
  530. height: 23rpx;
  531. margin-right: 8rpx;
  532. }
  533. .b-f {
  534. position: relative;
  535. .b-c {
  536. position: absolute;
  537. right: 24rpx;
  538. bottom: 22rpx;
  539. width: 172rpx;
  540. height: 56rpx;
  541. background: #2F80ED;
  542. border-radius: 4rpx;
  543. text-align: center;
  544. line-height: 56rpx;
  545. font-size: 28rpx;
  546. color: #fff;
  547. }
  548. }
  549. }
  550. </style>