index.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489
  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://jhnewshop.oss-cn-chengdu.aliyuncs.com/RockHouseJail.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: '利用互联网模式,让传统代理商实现10倍收益',
  242. desc: '振合网实体联盟全国招商中',
  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: '利用互联网模式,让传统代理商实现10倍收益', // 分享标题
  252. desc: '振合网实体联盟全国招商中',
  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. this.play()
  270. if (e.detail.current != this.index) {
  271. this.index = e.detail.current;
  272. }
  273. },
  274. toMap() {
  275. uni.openLocation({
  276. latitude: 29.665085,
  277. longitude: 106.615366,
  278. scale: 18,
  279. name: '重庆丽星君顿酒店',
  280. address: '重庆市渝北区服装城大道48号',
  281. success() {},
  282. fail(error) {}
  283. });
  284. },
  285. save() {
  286. if (this.isAJAX) {
  287. return
  288. }
  289. this.isAJAX = true;
  290. this.fromData.m_id = uni.getStorageSync('m_id');
  291. userParticipation(this.fromData).then((res) => {
  292. if (res.code === 1) {
  293. tools.success('预约成功')
  294. this.fromData = {
  295. m_id: '',
  296. name: '',
  297. phone: '',
  298. corporate: '',
  299. inviter: '', //邀请人
  300. inviter_phone: '',
  301. }
  302. } else {
  303. tools.error(res.msg)
  304. }
  305. this.isAJAX = false;
  306. })
  307. }
  308. },
  309. }
  310. </script>
  311. <style lang="scss" scoped>
  312. .index-box {
  313. background-image: url('@/static/img/c-bg.png');
  314. background-size: 100% 100%;
  315. }
  316. .up-icon {
  317. width: 64rpx;
  318. height: 64rpx;
  319. margin: 0 auto;
  320. }
  321. .swiper {
  322. flex: 1;
  323. width: 100%;
  324. height: 100%;
  325. .swiper-item {
  326. width: 100%;
  327. height: 100%;
  328. }
  329. }
  330. .logo-img {
  331. width: 136rpx;
  332. height: 79rpx;
  333. margin-top: 8rpx;
  334. }
  335. .music-img {
  336. margin-top: 16rpx;
  337. width: 56rpx;
  338. height: 56rpx;
  339. }
  340. .music-anumation {
  341. animation: rotation 2s linear infinite;
  342. }
  343. @keyframes rotation {
  344. from {
  345. transform: rotate(0deg);
  346. }
  347. to {
  348. transform: rotate(360deg);
  349. }
  350. }
  351. .index-1 {
  352. .img-text {
  353. width: 384rpx;
  354. height: 232rpx;
  355. margin: 76rpx auto 36rpx auto;
  356. }
  357. .img-xian {
  358. width: 10rpx;
  359. height: 174rpx;
  360. margin: 0 auto 154rpx auto;
  361. }
  362. .name-text {
  363. width: 288rpx;
  364. height: 32rpx;
  365. margin: 0 auto 10rpx auto;
  366. }
  367. .time-text {
  368. width: 274rpx;
  369. height: 37rpx;
  370. margin: 0 auto 140rpx auto;
  371. }
  372. }
  373. .index-2 {
  374. width: 686rpx;
  375. min-height: 1032rpx;
  376. background: rgba(23, 49, 74, 0.51);
  377. border-radius: 12rpx;
  378. border: 2rpx solid rgba(51, 121, 163, 0.8);
  379. margin: 40rpx auto;
  380. box-sizing: border-box;
  381. padding: 32rpx;
  382. input {
  383. width: 622rpx;
  384. height: 80rpx;
  385. background: #FFFFFF;
  386. border-radius: 10rpx;
  387. box-sizing: border-box;
  388. padding: 0 20rpx;
  389. font-size: 28rpx;
  390. }
  391. .save-box {
  392. width: 622rpx;
  393. height: 80rpx;
  394. background: linear-gradient(90deg, #EBC795 0%, #E3BB83 100%);
  395. border-radius: 10rpx;
  396. text-align: center;
  397. line-height: 80rpx;
  398. font-size: 38rpx;
  399. font-weight: 600;
  400. color: #3A2E1C;
  401. }
  402. .text-img {
  403. width: 302rpx;
  404. height: 116rpx;
  405. margin: 0 auto 44rpx auto;
  406. }
  407. .text-box {
  408. line-height: 68rpx;
  409. letter-spacing: 4rpx;
  410. display: block;
  411. text-indent: 72rpx;
  412. }
  413. .text-img-1 {
  414. width: 224rpx;
  415. height: 116rpx;
  416. margin: 0 auto 44rpx auto;
  417. }
  418. .text-img-2 {
  419. width: 214rpx;
  420. height: 116rpx;
  421. margin: 0 auto 44rpx auto;
  422. }
  423. .img-1 {
  424. width: 622rpx;
  425. height: 328rpx;
  426. border-radius: 10rpx;
  427. margin-bottom: 24rpx;
  428. }
  429. .img-2 {
  430. width: 300rpx;
  431. height: 214rpx;
  432. margin-bottom: 60rpx;
  433. }
  434. .img-3 {
  435. width: 622rpx;
  436. height: 354rpx;
  437. border-radius: 10rpx;
  438. margin-bottom: 40rpx;
  439. }
  440. .b-f {
  441. position: relative;
  442. .b-c {
  443. position: absolute;
  444. right: 24rpx;
  445. bottom: 22rpx;
  446. width: 172rpx;
  447. height: 56rpx;
  448. background: #2F80ED;
  449. border-radius: 4rpx;
  450. text-align: center;
  451. line-height: 56rpx;
  452. font-size: 28rpx;
  453. color: #fff;
  454. }
  455. }
  456. }
  457. </style>