index.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475
  1. <template>
  2. <view class="index-box box-border-box flex-common-css">
  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" @click.stop="musicPause()" mode="scaleToFill"></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. musicPause() {
  206. if (this.audioServe) {
  207. this.audioServe.pause();
  208. this.audioServe.onPause(() => {
  209. this.isPlay = false;
  210. });
  211. }else{
  212. this.musicPlay();
  213. }
  214. },
  215. getJsConfig() {
  216. console.log(window.location)
  217. let url = window.location.href.split('#')[0];
  218. getJsConfig({
  219. 'url': url
  220. }).then(res => {
  221. if (res.code === 1) {
  222. wxJs.config({
  223. debug: false,
  224. appId: res.data.appid,
  225. nonceStr: res.data.noncestr,
  226. signature: res.data.signature,
  227. timestamp: res.data.timestamp * 1, // 必填,生成签名的时间戳
  228. jsApiList: ['updateAppMessageShareData', 'updateTimelineShareData']
  229. })
  230. wxJs.ready(() => {
  231. //自定义“分享给朋友”
  232. // this.musicPlay()
  233. wxJs.updateAppMessageShareData({
  234. title: '利用互联网模式,让传统代理商实现10倍收益',
  235. desc: '振合网实体联盟全国招商中',
  236. link: "https://enroll.jhcs888.com/#/", // 分享链接,该链接域名或路径必须与当前页面对应的公众号 JS 安全域名一致
  237. imgUrl: 'https://jhnewshop.oss-cn-chengdu.aliyuncs.com/storage/attest/20210927/949e48fb7c286836097efdd4ba4d0bd9.jpg', // 分享图标
  238. success: function() {
  239. // 设置成功
  240. }
  241. })
  242. //自定义“分享到朋友圈”
  243. wxJs.updateTimelineShareData({
  244. title: '利用互联网模式,让传统代理商实现10倍收益', // 分享标题
  245. desc: '振合网实体联盟全国招商中',
  246. link: "https://enroll.jhcs888.com/#/", // 分享链接,该链接域名或路径必须与当前页面对应的公众号 JS 安全域名一致
  247. imgUrl: 'https://jhnewshop.oss-cn-chengdu.aliyuncs.com/storage/attest/20210927/949e48fb7c286836097efdd4ba4d0bd9.jpg', // 分享图标
  248. success: function() {
  249. // 设置成功
  250. }
  251. })
  252. });
  253. }
  254. })
  255. },
  256. playPhone() {
  257. uni.makePhoneCall({
  258. phoneNumber: '023-67177907'
  259. });
  260. },
  261. swiperChange(e) {
  262. if (e.detail.current != this.index) {
  263. this.index = e.detail.current;
  264. }
  265. },
  266. toMap() {
  267. uni.openLocation({
  268. latitude: 29.665085,
  269. longitude: 106.615366,
  270. scale: 18,
  271. name: '重庆丽星君顿酒店',
  272. address: '重庆市渝北区服装城大道48号',
  273. success() {},
  274. fail(error) {}
  275. });
  276. },
  277. save() {
  278. if (this.isAJAX) {
  279. return
  280. }
  281. this.isAJAX = true;
  282. this.fromData.m_id = uni.getStorageSync('m_id');
  283. userParticipation(this.fromData).then((res) => {
  284. if (res.code === 1) {
  285. tools.success('预约成功')
  286. this.fromData = {
  287. m_id: '',
  288. name: '',
  289. phone: '',
  290. corporate: '',
  291. inviter: '', //邀请人
  292. inviter_phone: '',
  293. }
  294. } else {
  295. tools.error(res.msg)
  296. }
  297. this.isAJAX = false;
  298. })
  299. }
  300. },
  301. }
  302. </script>
  303. <style lang="scss" scoped>
  304. .index-box {
  305. background-image: url('@/static/img/c-bg.png');
  306. background-size: 100% 100%;
  307. }
  308. .up-icon {
  309. width: 64rpx;
  310. height: 64rpx;
  311. margin: 0 auto;
  312. }
  313. .swiper {
  314. flex: 1;
  315. width: 100%;
  316. height: 100%;
  317. .swiper-item {
  318. width: 100%;
  319. height: 100%;
  320. }
  321. }
  322. .logo-img {
  323. width: 136rpx;
  324. height: 79rpx;
  325. margin-top: 8rpx;
  326. }
  327. .music-img {
  328. margin-top: 16rpx;
  329. width: 56rpx;
  330. height: 56rpx;
  331. }
  332. .music-anumation{
  333. animation: rotation 2s linear infinite;
  334. }
  335. @keyframes rotation {
  336. from { transform: rotate(0deg); }
  337. to { transform: rotate(360deg); }
  338. }
  339. .index-1 {
  340. .img-text {
  341. width: 384rpx;
  342. height: 232rpx;
  343. margin: 76rpx auto 36rpx auto;
  344. }
  345. .img-xian {
  346. width: 10rpx;
  347. height: 174rpx;
  348. margin: 0 auto 154rpx auto;
  349. }
  350. .name-text {
  351. width: 288rpx;
  352. height: 32rpx;
  353. margin: 0 auto 10rpx auto;
  354. }
  355. .time-text {
  356. width: 274rpx;
  357. height: 37rpx;
  358. margin: 0 auto 140rpx auto;
  359. }
  360. }
  361. .index-2 {
  362. width: 686rpx;
  363. min-height: 1032rpx;
  364. background: rgba(23, 49, 74, 0.51);
  365. border-radius: 12rpx;
  366. border: 2rpx solid rgba(51, 121, 163, 0.8);
  367. margin: 40rpx auto;
  368. box-sizing: border-box;
  369. padding: 32rpx;
  370. input {
  371. width: 622rpx;
  372. height: 80rpx;
  373. background: #FFFFFF;
  374. border-radius: 10rpx;
  375. box-sizing: border-box;
  376. padding: 0 20rpx;
  377. font-size: 28rpx;
  378. }
  379. .save-box {
  380. width: 622rpx;
  381. height: 80rpx;
  382. background: linear-gradient(90deg, #EBC795 0%, #E3BB83 100%);
  383. border-radius: 10rpx;
  384. text-align: center;
  385. line-height: 80rpx;
  386. font-size: 38rpx;
  387. font-weight: 600;
  388. color: #3A2E1C;
  389. }
  390. .text-img {
  391. width: 302rpx;
  392. height: 116rpx;
  393. margin: 0 auto 44rpx auto;
  394. }
  395. .text-box {
  396. line-height: 68rpx;
  397. letter-spacing: 4rpx;
  398. display: block;
  399. text-indent: 72rpx;
  400. }
  401. .text-img-1 {
  402. width: 224rpx;
  403. height: 116rpx;
  404. margin: 0 auto 44rpx auto;
  405. }
  406. .text-img-2 {
  407. width: 214rpx;
  408. height: 116rpx;
  409. margin: 0 auto 44rpx auto;
  410. }
  411. .img-1 {
  412. width: 622rpx;
  413. height: 328rpx;
  414. border-radius: 10rpx;
  415. margin-bottom: 24rpx;
  416. }
  417. .img-2 {
  418. width: 300rpx;
  419. height: 214rpx;
  420. margin-bottom: 60rpx;
  421. }
  422. .img-3 {
  423. width: 622rpx;
  424. height: 354rpx;
  425. border-radius: 10rpx;
  426. margin-bottom: 40rpx;
  427. }
  428. .b-f {
  429. position: relative;
  430. .b-c {
  431. position: absolute;
  432. right: 24rpx;
  433. bottom: 22rpx;
  434. width: 172rpx;
  435. height: 56rpx;
  436. background: #2F80ED;
  437. border-radius: 4rpx;
  438. text-align: center;
  439. line-height: 56rpx;
  440. font-size: 28rpx;
  441. color: #fff;
  442. }
  443. }
  444. }
  445. </style>