agent.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632
  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'"
  6. src="@/static/img/c-music.png" mode="scaleToFill" @click.stop="musicPause()"></image>
  7. <mumu-music v-else ref="musicObj"
  8. musicSrc='https://jhxcnc.oss-cn-chengdu.aliyuncs.com/mp3/4272600974.mp3'></mumu-music>
  9. </view>
  10. <swiper class="swiper" :vertical='true' @change="swiperChange">
  11. <!-- 邀请函 -->
  12. <swiper-item>
  13. <view class="swiper-item index-1" v-if="index == 0">
  14. <image class="img-text wow animate__animated animate__bounceInUp" src="@/static/img/yqh-text-1.png"
  15. mode="scaleToFill"></image>
  16. <view class="" v-if="isEnroll">
  17. <view class="fs-40 fc-E2E7FA text-align-center mb-16 wow animate__animated animate__bounceInLeft">
  18. 科技创新体系•助推实体经济发展</view>
  19. <image class="zhw-img-text mb-16 wow animate__animated animate__bounceInLeft" src="@/static/img/index-text-3.png" mode="scaleToFill"></image>
  20. <view class="fs-32 fc-E2E7FA text-align-center mb-72 wow animate__animated animate__bounceInLeft">
  21. 项目说明会 </view>
  22. </view>
  23. <view class="" v-else>
  24. <view class="fs-40 fc-E2E7FA text-align-center mb-16 wow animate__animated animate__bounceInLeft">
  25. 畅通国民经济循环 发展新质生产力</view>
  26. <view class="fs-40 fc-E2E7FA text-align-center mb-16 wow animate__animated animate__bounceInLeft">
  27. 实现共同富裕</view>
  28. <view class="fs-32 fc-E2E7FA text-align-center mb-72 wow animate__animated animate__bounceInLeft">
  29. 项目说明会 </view>
  30. </view>
  31. <image class="img-xian wow animate__animated animate__bounceInUp" src="@/static/img/xian.png"
  32. mode="scaleToFill"></image>
  33. <view class="fs-32 fc-CFB591 fw-500 text-align-left mb-40 ml-80">
  34. 主办单位:重庆振合网科技集团
  35. </view>
  36. <view class="display-flex mb-72 ml-80">
  37. <view class="fs-32 fc-CFB591 fw-500">协办单位:</view>
  38. <view class="">
  39. <view class="fs-32 fc-CFB591 fw-500 text-align-left">中国信用网</view>
  40. <view class="fs-32 fc-CFB591 fw-500 text-align-left">重庆电视台《重庆特色》栏目</view>
  41. </view>
  42. </view>
  43. <image class="up-icon wow animate__animated animate__bounceInUp" src="@/static/img/c-up-icon.png"
  44. mode="scaleToFill"></image>
  45. </view>
  46. </swiper-item>
  47. <!-- 诚挚邀请 -->
  48. <swiper-item>
  49. <view class="swiper-item">
  50. <view class="index-2" v-if="index == 1">
  51. <image class="text-img-3 wow animate__animated animate__bounceInUp"
  52. src="@/static/img/hynr-text.png" mode="scaleToFill"></image>
  53. <view class="fs-32 fc-CFB591 text-box wow animate__animated animate__bounceInUp" >
  54. 党的二十大三中全会提出,“让国家变得更加富强,让社会变得更加公平公正,让人民生活得更加美好”。
  55. </view>
  56. <view class="fs-32 fc-CFB591 text-box wow animate__animated animate__bounceInUp">
  57. 振合网将以互联网注入实体经济数字化转型为导向,帮助生产厂家,传统代理商解决销售难、资金难、库存压力大。帮助实体店摆脱困境,实现跨界收益和互联网收益,助推实体经济数字化转型升级发展。
  58. </view>
  59. <view class="fs-32 fc-CFB591 text-box wow animate__animated animate__bounceInUp">
  60. 助推乡村全面振兴,让农户爱上种地,解决返乡民工创业就业难和农产品销售难等问题;在乡村振兴发展的势头中,如何助力乡村振兴、牢固脱贫攻艰的成果,真正实现城乡融合发展。
  61. </view>
  62. </view>
  63. <image class="up-icon wow animate__animated animate__bounceInUp" src="@/static/img/c-up-icon.png"
  64. mode="scaleToFill"></image>
  65. </view>
  66. </swiper-item>
  67. <!-- 参会名单 -->
  68. <swiper-item>
  69. <view class="swiper-item">
  70. <view class="index-2" v-if="index == 2">
  71. <image class="text-img-1 wow animate__animated animate__bounceInUp"
  72. src="@/static/img/chdb-text.png" mode="scaleToFill"></image>
  73. <image class="text-img-ty wow animate__animated animate__bounceInUp"
  74. src="@/static/img/tyjb-text.png" mode="scaleToFill"></image>
  75. <view class="align-items-center mb-24">
  76. <image class="icon-img-1" src="@/static/img/icon-img.png" mode="scaleToFill"></image>
  77. <view class="fs-28 fc-CFB591 w-588">原全国人大常委农委副主任、现任中国供销合作经济学会会长</view>
  78. </view>
  79. <view class="align-items-center mb-24">
  80. <image class="icon-img-1" src="@/static/img/icon-img.png" mode="scaleToFill"></image>
  81. <view class="fs-28 fc-CFB591 w-588">原国务院研究室主任、国务院国有监事会主席、中央第九巡视组副组长、经济学博士</view>
  82. </view>
  83. <view class="align-items-center mb-24">
  84. <image class="icon-img-1" src="@/static/img/icon-img.png" mode="scaleToFill"></image>
  85. <view class="fs-28 fc-CFB591 w-588">原农业部副部长、国务院研究室副主任</view>
  86. </view>
  87. <view class="align-items-center mb-24">
  88. <image class="icon-img-1" src="@/static/img/icon-img.png" mode="scaleToFill"></image>
  89. <view class="fs-28 fc-CFB591 w-588">原全国工商联副主席、全国政协特聘专家</view>
  90. </view>
  91. <view class="align-items-center mb-24">
  92. <image class="icon-img-1" src="@/static/img/icon-img.png" mode="scaleToFill"></image>
  93. <view class="fs-28 fc-CFB591 w-588">中宣部原副部长、中国文联副主席</view>
  94. </view>
  95. <view class="align-items-center mb-48">
  96. <image class="icon-img-1" src="@/static/img/icon-img.png" mode="scaleToFill"></image>
  97. <view class="fs-28 fc-CFB591 w-588">原国防大学少将(副军职)及其他相关领导</view>
  98. </view>
  99. <image class="text-img-ty wow animate__animated animate__bounceInUp"
  100. src="@/static/img/chdw-text-1.png" mode="scaleToFill"></image>
  101. <view class="align-items-center mb-24">
  102. <image class="icon-img-1" src="@/static/img/icon-img.png" mode="scaleToFill"></image>
  103. <view class="fs-28 fc-CFB591 w-588">中国信用网</view>
  104. </view>
  105. <view class="align-items-center mb-24">
  106. <image class="icon-img-1" src="@/static/img/icon-img.png" mode="scaleToFill"></image>
  107. <view class="fs-28 fc-CFB591 w-588">重庆电视台</view>
  108. </view>
  109. <view class="align-items-center mb-24">
  110. <image class="icon-img-1" src="@/static/img/icon-img.png" mode="scaleToFill"></image>
  111. <view class="fs-28 fc-CFB591 w-588">全国知名企业</view>
  112. </view>
  113. <view class="align-items-center mb-24">
  114. <image class="icon-img-1" src="@/static/img/icon-img.png" mode="scaleToFill"></image>
  115. <view class="fs-28 fc-CFB591 w-588">全国知名品牌代理商</view>
  116. </view>
  117. </view>
  118. <image class="up-icon wow animate__animated animate__bounceInUp" src="@/static/img/c-up-icon.png"
  119. mode="scaleToFill"></image>
  120. </view>
  121. </swiper-item>
  122. <!-- 活动地址 -->
  123. <swiper-item>
  124. <view class="swiper-item">
  125. <view class="index-2" v-if="index == 3">
  126. <image class="text-img-1 wow animate__animated animate__bounceInUp"
  127. src="@/static/img/hdtd-text.png" mode="scaleToFill"></image>
  128. <image class="img-1 wow animate__animated animate__bounceInUp" src="@/static/img/h-1.png"
  129. mode="scaleToFill"></image>
  130. <view class="flex-justify-space">
  131. <image class="img-2 wow animate__animated animate__bounceInLeft" src="@/static/img/h-2.png"
  132. mode="scaleToFill"></image>
  133. <image class="img-2 wow animate__animated animate__bounceInRight" src="@/static/img/h-3.png"
  134. mode="scaleToFill"></image>
  135. </view>
  136. <view
  137. class="fc-CFB591 fs-28 text-align-center mb-32 wow animate__animated animate__bounceInRight">
  138. 签到时间:10月19日</view>
  139. <view
  140. class="fc-CFB591 fs-28 text-align-center mb-32 wow animate__animated animate__bounceInRight">
  141. 会议时间:10月20日</view>
  142. <view
  143. class="fc-CFB591 fs-28 text-align-center mb-32 wow animate__animated animate__bounceInRight">
  144. 振合网科技集团期待与您相见!
  145. </view>
  146. </view>
  147. <image class="up-icon wow animate__animated animate__bounceInUp" src="@/static/img/c-up-icon.png"
  148. mode="scaleToFill"></image>
  149. </view>
  150. </swiper-item>
  151. </swiper>
  152. </view>
  153. </template>
  154. <script>
  155. import {
  156. getJsConfig,
  157. userParticipation
  158. } from '@/api/user.js';
  159. import tools from "@/service/tools";
  160. import wxJs from "jweixin-module"
  161. import {
  162. useBgMusic
  163. } from '@/uni_modules/y-bg-music/js_sdk';
  164. export default {
  165. components: {},
  166. data() {
  167. return {
  168. userName: '',
  169. fromData: {
  170. m_id: '',
  171. name: '',
  172. phone: '',
  173. corporate: '',
  174. inviter: '', //邀请人
  175. inviter_phone: '',
  176. },
  177. isAJAX: false,
  178. index: 0,
  179. audioServe: undefined,
  180. isPlay: false,
  181. isAutoPlay: false,
  182. isIos: true,
  183. isEnroll: true
  184. }
  185. },
  186. onLoad(data) {
  187. if (data.noEnroll !== undefined) {
  188. this.isEnroll = false
  189. }
  190. },
  191. onshow() {
  192. this.$wow.init();
  193. },
  194. mounted() {
  195. this.userName = uni.getStorageSync('userName');
  196. let isWeiXin = tools.isWx();
  197. if (isWeiXin) {
  198. this.getJsConfig()
  199. }
  200. // this.musicPlay()
  201. const isiOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
  202. this.isIos = isiOS
  203. if (isiOS) {
  204. console.log('This is an iOS device');
  205. } else {
  206. this.audioServe = useBgMusic({
  207. src: './static/mp3/4272600974.mp3',
  208. loop: 999, // 循环次数
  209. controls: false // 显示右上角控制元素
  210. });
  211. }
  212. },
  213. methods: {
  214. musicPlay() {
  215. // if (!this.audioServe) {
  216. // this.audioServe = uni.createInnerAudioContext();
  217. // this.audioServe.autoplay = true;
  218. // this.audioServe.loop = true;
  219. // this.audioServe.obeyMuteSwitch = true;
  220. // this.audioServe.src = 'https://jhxcnc.oss-cn-chengdu.aliyuncs.com/mp3/4272600974.mp3';
  221. // }
  222. // this.audioServe.play();
  223. // this.audioServe.onPlay(() => {
  224. // this.isPlay = true;
  225. // this.isAutoPlay = true
  226. // })
  227. // 创建bgAudioManager对象
  228. // const bgAudioManager = uni.getBackgroundAudioManager();
  229. // bgAudioManager.src = 'https://jhxcnc.oss-cn-chengdu.aliyuncs.com/mp3/4272600974.mp3';
  230. // // 开始播放的回调函数
  231. // bgAudioManager.onPlay(() => {
  232. // console.log('开始播放');
  233. // });
  234. // // 播放报错的事件监听
  235. // bgAudioManager.onError((res) => {
  236. // console.log(res.errMsg);
  237. // console.log(res.errCode);
  238. // });
  239. },
  240. play() {
  241. if (!this.isPlay && this.audioServe) {
  242. // this.audioServe.play();
  243. // this.audioServe.onPlay(() => {
  244. // this.isPlay = true;
  245. // this.isAutoPlay = true
  246. // })
  247. }
  248. },
  249. musicPause() {
  250. // if (this.audioServe) {
  251. // this.audioServe.pause();
  252. // this.audioServe.onPause(() => {
  253. // this.isPlay = false;
  254. // });
  255. // }
  256. },
  257. getJsConfig() {
  258. console.log(window.location)
  259. let url = window.location.href.split('#')[0];
  260. getJsConfig({
  261. 'url': url
  262. }).then(res => {
  263. if (res.code === 1) {
  264. wxJs.config({
  265. debug: false,
  266. appId: res.data.appid,
  267. nonceStr: res.data.noncestr,
  268. signature: res.data.signature,
  269. timestamp: res.data.timestamp * 1, // 必填,生成签名的时间戳
  270. jsApiList: ['updateAppMessageShareData', 'updateTimelineShareData']
  271. })
  272. wxJs.ready(() => {
  273. //自定义“分享给朋友”
  274. // this.musicPlay()
  275. wxJs.updateAppMessageShareData({
  276. title: this.isEnroll ? '振合网“实体联盟”项目说明会-邀请函' :
  277. "<畅通国民经济循环 发展新质生产力>研讨会",
  278. desc: this.isEnroll ? '10月20日我们不见不散!' : '实现共同富裕',
  279. link: "https://enroll.jhcs888.com/#/pages/index/agent", // 分享链接,该链接域名或路径必须与当前页面对应的公众号 JS 安全域名一致
  280. imgUrl:"https://jhxcnc.oss-cn-chengdu.aliyuncs.com/storage/d746c4d87006d9aa19bc7a56e736751.png", // 分享图标
  281. success: function() {
  282. // 设置成功
  283. }
  284. })
  285. //自定义“分享到朋友圈”
  286. wxJs.updateTimelineShareData({
  287. title: this.isEnroll ? '振合网“实体联盟”项目说明会-邀请函' :
  288. '<畅通国民经济循环 发展新质生产力>研讨会',
  289. desc: this.isEnroll ? '10月20日我们不见不散!' : '实现共同富裕',
  290. link: "https://enroll.jhcs888.com/#/pages/index/agent", // 分享链接,该链接域名或路径必须与当前页面对应的公众号 JS 安全域名一致
  291. imgUrl:"https://jhxcnc.oss-cn-chengdu.aliyuncs.com/storage/d746c4d87006d9aa19bc7a56e736751.png", // 分享图标
  292. success: function() {
  293. // 设置成功
  294. }
  295. })
  296. if (this.audioServe) {
  297. this.audioServe.play();
  298. } else if (!this.isIos) {
  299. this.$refs.musicObj.playTo()
  300. }
  301. });
  302. }
  303. })
  304. },
  305. playPhone() {
  306. uni.makePhoneCall({
  307. phoneNumber: '023-67177907'
  308. });
  309. },
  310. swiperChange(e) {
  311. this.play()
  312. if (e.detail.current !== this.index) {
  313. this.index = e.detail.current;
  314. }
  315. },
  316. toMap() {
  317. uni.openLocation({
  318. latitude: 29.665085,
  319. longitude: 106.615366,
  320. scale: 18,
  321. name: '重庆丽星君顿酒店',
  322. address: '重庆市渝北区服装城大道48号',
  323. success() {},
  324. fail(error) {}
  325. });
  326. },
  327. save() {
  328. if (this.isAJAX) {
  329. return
  330. }
  331. this.isAJAX = true;
  332. this.fromData.m_id = uni.getStorageSync('m_id');
  333. userParticipation(this.fromData).then((res) => {
  334. if (res.code === 1) {
  335. tools.success('预约成功')
  336. this.fromData = {
  337. m_id: '',
  338. name: '',
  339. phone: '',
  340. corporate: '',
  341. inviter: '', //邀请人
  342. inviter_phone: '',
  343. }
  344. } else {
  345. tools.error(res.msg)
  346. }
  347. this.isAJAX = false;
  348. })
  349. }
  350. },
  351. }
  352. </script>
  353. <style lang="scss" scoped>
  354. .box-yuan {
  355. width: 32rpx;
  356. height: 32rpx;
  357. line-height: 32rpx;
  358. text-align: center;
  359. font-size: 18rpx;
  360. color: #061363;
  361. border-radius: 50%;
  362. margin-right: 16rpx;
  363. background-color: #CEB48F;
  364. }
  365. .w-246 {
  366. width: 246rpx;
  367. }
  368. .w-588 {
  369. width: 588rpx;
  370. }
  371. .zhw-img-text{
  372. width: 280rpx;
  373. height: 40rpx;
  374. margin-left: auto;
  375. margin-right: auto;
  376. }
  377. .playphone-box {
  378. width: 100%;
  379. height: 86rpx;
  380. background: linear-gradient(90deg, #E4BD85 0%, #CEB590 100%);
  381. border-radius: 10rpx;
  382. }
  383. .index-box {
  384. background-image: url('@/static/img/a-bg.png');
  385. background-size: 100% 100%;
  386. }
  387. .up-icon {
  388. width: 64rpx;
  389. height: 64rpx;
  390. margin: 0 auto;
  391. }
  392. .swiper {
  393. flex: 1;
  394. width: 100%;
  395. height: 100%;
  396. .swiper-item {
  397. width: 100%;
  398. height: 100%;
  399. }
  400. }
  401. .logo-img {
  402. width: 136rpx;
  403. height: 80rpx;
  404. margin-top: 8rpx;
  405. }
  406. .music-img {
  407. margin-top: 16rpx;
  408. width: 56rpx;
  409. height: 56rpx;
  410. }
  411. .music-anumation {
  412. animation: rotation 2s linear infinite;
  413. }
  414. @keyframes rotation {
  415. from {
  416. transform: rotate(0deg);
  417. }
  418. to {
  419. transform: rotate(360deg);
  420. }
  421. }
  422. .index-1 {
  423. .img-text {
  424. width: 384rpx;
  425. height: 232rpx;
  426. margin: 76rpx auto 36rpx auto;
  427. }
  428. .img-xian {
  429. width: 10rpx;
  430. height: 174rpx;
  431. margin: 0 auto 154rpx auto;
  432. }
  433. .name-text {
  434. width: 392rpx;
  435. height: 88rpx;
  436. margin: 0 auto 36rpx auto;
  437. }
  438. .name-text-1{
  439. width: 288rpx;
  440. height: 100rpx;
  441. margin: 0 auto 40rpx auto;
  442. }
  443. .name-text-2{
  444. width: 424rpx;
  445. height: 146rpx;
  446. margin: 0 auto 104rpx auto;
  447. }
  448. .time-text {
  449. width: 274rpx;
  450. height: 37rpx;
  451. margin: 0 auto 140rpx auto;
  452. }
  453. }
  454. .index-2 {
  455. width: 686rpx;
  456. min-height: 532rpx;
  457. // background: rgba(5, 19, 103, 0.5);
  458. border-radius: 12rpx;
  459. // border: 2rpx solid #112495;
  460. margin: 40rpx auto;
  461. box-sizing: border-box;
  462. padding: 32rpx;
  463. input {
  464. width: 622rpx;
  465. height: 80rpx;
  466. background: #FFFFFF;
  467. border-radius: 10rpx;
  468. box-sizing: border-box;
  469. padding: 0 20rpx;
  470. font-size: 28rpx;
  471. }
  472. .save-box {
  473. width: 622rpx;
  474. height: 80rpx;
  475. background: linear-gradient(90deg, #EBC795 0%, #E3BB83 100%);
  476. border-radius: 10rpx;
  477. text-align: center;
  478. line-height: 80rpx;
  479. font-size: 38rpx;
  480. font-weight: 600;
  481. color: #3A2E1C;
  482. }
  483. .text-img {
  484. width: 302rpx;
  485. height: 116rpx;
  486. margin: 0 auto 44rpx auto;
  487. }
  488. .text-box {
  489. line-height: 68rpx;
  490. letter-spacing: 4rpx;
  491. display: block;
  492. text-indent: 72rpx;
  493. }
  494. .text-img-ty{
  495. width: 156rpx;
  496. height: 54rpx;
  497. margin-bottom: 24rpx;
  498. }
  499. .text-img-1 {
  500. width: 224rpx;
  501. height: 116rpx;
  502. margin: 0 auto 44rpx auto;
  503. }
  504. .text-img-2 {
  505. width: 214rpx;
  506. height: 116rpx;
  507. margin: 0 auto 44rpx auto;
  508. }
  509. .text-img-3 {
  510. width: 192rpx;
  511. height: 116rpx;
  512. margin: 0 auto 44rpx auto;
  513. }
  514. .text-img-4 {
  515. width: 314rpx;
  516. height: 116rpx;
  517. margin: 0 auto 44rpx auto;
  518. }
  519. .img-1 {
  520. width: 622rpx;
  521. height: 328rpx;
  522. border-radius: 10rpx;
  523. margin-bottom: 24rpx;
  524. }
  525. .img-2 {
  526. width: 300rpx;
  527. height: 214rpx;
  528. margin-bottom: 60rpx;
  529. }
  530. .img-3 {
  531. width: 622rpx;
  532. height: 354rpx;
  533. border-radius: 10rpx;
  534. margin-bottom: 40rpx;
  535. }
  536. .icon-img {
  537. width: 23rpx;
  538. height: 23rpx;
  539. margin-right: 8rpx;
  540. }
  541. .icon-img-1 {
  542. width: 24rpx;
  543. height: 24rpx;
  544. margin-right: 16rpx;
  545. }
  546. .b-f {
  547. position: relative;
  548. .b-c {
  549. position: absolute;
  550. right: 24rpx;
  551. bottom: 22rpx;
  552. width: 172rpx;
  553. height: 56rpx;
  554. background: #2F80ED;
  555. border-radius: 4rpx;
  556. text-align: center;
  557. line-height: 56rpx;
  558. font-size: 28rpx;
  559. color: #fff;
  560. }
  561. }
  562. }
  563. </style>