index.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405
  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" src="@/static/img/c-music.png" 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" mode="scaleToFill"></image>
  12. <view class="fs-48 fc-f text-align-center mb-16 wow animate__animated animate__bounceInLeft">振合网科技集团实体联盟</view>
  13. <view class="fs-32 fc-f text-align-center mb-72 wow animate__animated animate__bounceInRight">未来已来 一触即发</view>
  14. <image class="img-xian wow animate__animated animate__bounceInUp" src="@/static/img/xian.png" mode="scaleToFill"></image>
  15. <image class="name-text wow animate__animated animate__bounceInLeft" src="@/static/img/name-text.png" mode="scaleToFill"></image>
  16. <image class="time-text wow animate__animated animate__bounceInRight" src="@/static/img/time-text.png" mode="scaleToFill"></image>
  17. <image class="up-icon wow animate__animated animate__bounceInUp" src="@/static/img/c-up-icon.png" mode="scaleToFill"></image>
  18. </view>
  19. </swiper-item>
  20. <!-- 诚挚邀请 -->
  21. <swiper-item>
  22. <view class="swiper-item">
  23. <view class="index-2" v-if="index == 1">
  24. <image class="text-img wow animate__animated animate__bounceInUp" src="@/static/img/czyq-text.png" mode="scaleToFill"></image>
  25. <view class="fs-32 fc-F2D4A9 fw-b mb-24 wow animate__animated animate__bounceInUp">尊敬的{{userName?userName:'用户'}}</view>
  26. <view class="fs-32 fc-F2D4A9 text-box wow animate__animated animate__bounceInUp">
  27. 您好!感谢百忙之中阅读此邀请函。我们诚挚的邀请您参加于10月20日振合科技集团举办的2024年度招商说明会。我们深知在发展的道路上离不开您的信任与支持,我们取得的成绩中有您的辛勤付出。此次盛会邀请多位行业专家共聚一堂,特此诚邀您出席盛会,期待与您共话友情、 展望末来、共创属于我们新的商业传奇。
  28. </view>
  29. <view class="fc-F2D4A9 fw-b fs-32 text-align-right mt-32 wow animate__animated animate__bounceInUp">振合网科技集团</view>
  30. <view class="fs-28 fc-F2D4A9 text-align-right wow animate__animated animate__bounceInUp">2024年10月20日</view>
  31. </view>
  32. <image class="up-icon wow animate__animated animate__bounceInUp" src="@/static/img/c-up-icon.png" mode="scaleToFill"></image>
  33. </view>
  34. </swiper-item>
  35. <!-- 活动地址 -->
  36. <swiper-item>
  37. <view class="swiper-item">
  38. <view class="index-2" v-if="index == 2">
  39. <image class="text-img-1 wow animate__animated animate__bounceInUp" src="@/static/img/hdtd-text.png" mode="scaleToFill"></image>
  40. <image class="img-1 wow animate__animated animate__bounceInUp" src="@/static/img/h-1.png" mode="scaleToFill"></image>
  41. <view class="flex-justify-space">
  42. <image class="img-2 wow animate__animated animate__bounceInLeft" src="@/static/img/h-2.png" mode="scaleToFill"></image>
  43. <image class="img-2 wow animate__animated animate__bounceInRight" src="@/static/img/h-3.png" mode="scaleToFill"></image>
  44. </view>
  45. <view class="fc-F2D4A9 fs-40 text-align-center mb-16 wow animate__animated animate__bounceInUp">重庆丽星君顿酒店</view>
  46. <view class="fs-28 fc-F2D4A9 text-align-center wow animate__animated animate__bounceInUp">地址:重庆市渝北区服装城大道48号</view>
  47. </view>
  48. <image class="up-icon wow animate__animated animate__bounceInUp" src="@/static/img/c-up-icon.png" mode="scaleToFill"></image>
  49. </view>
  50. </swiper-item>
  51. <!-- 地址导航 -->
  52. <swiper-item>
  53. <view class="swiper-item" v-if="index == 3">
  54. <view class="index-2">
  55. <image class="text-img wow animate__animated animate__bounceInUp" src="@/static/img/dzdh-text.png" mode="scaleToFill"></image>
  56. <view class="b-f wow animate__animated animate__bounceInUp" @click="toMap()">
  57. <image class="img-3" src="@/static/img/map.png" mode="scaleToFill"></image>
  58. <view class="b-c">开始导航</view>
  59. </view>
  60. <view class="fc-F2D4A9 fs-36 text-align-center mb-16 wow animate__animated animate__bounceInLeft">会议地址</view>
  61. <view class="fc-F2D4A9 fs-28 text-align-center mb-32 wow animate__animated animate__bounceInRight">重庆丽星君顿酒店</view>
  62. <view class="fc-F2D4A9 fs-36 text-align-center mb-16 wow animate__animated animate__bounceInLeft">会议时间</view>
  63. <view class="fc-F2D4A9 fs-28 text-align-center mb-32 wow animate__animated animate__bounceInRight">10月20日 上午08:30</view>
  64. <view class="fc-F2D4A9 fs-36 text-align-center mb-16 wow animate__animated animate__bounceInLeft" @click="playPhone()">联系方式</view>
  65. <view class="fc-F2D4A9 fs-28 text-align-center mb-32 wow animate__animated animate__bounceInRight" @click="playPhone()">
  66. <uni-icons style="margin-right: 10rpx;" type="phone-filled" color="#f2d4a9" size="14"></uni-icons>
  67. 023-67177907
  68. </view>
  69. </view>
  70. <image class="up-icon wow animate__animated animate__bounceInUp" src="@/static/img/c-up-icon.png" mode="scaleToFill"></image>
  71. </view>
  72. </swiper-item>
  73. <!-- 参与预约 -->
  74. <swiper-item>
  75. <view class="swiper-item" v-if="index == 4">
  76. <view class="index-2">
  77. <image class="text-img-2 wow animate__animated animate__bounceInUp" src="@/static/img/cyyy-text.png" mode="scaleToFill"></image>
  78. <view class="mb-32">
  79. <view class="fc-F2D4A9 fs-32 mb-16 wow animate__animated animate__bounceInLeft">您的姓名<span class="fc-ED301D fs-32">*</span></view>
  80. <input class="wow animate__animated animate__bounceInRight" v-model="fromData.name" type="text" placeholder="请输入您的姓名">
  81. </view>
  82. <view class="mb-32">
  83. <view class="fc-F2D4A9 fs-32 mb-16 wow animate__animated animate__bounceInLeft">您的手机号<span class="fc-ED301D fs-32">*</span></view>
  84. <input class="wow animate__animated animate__bounceInRight" v-model="fromData.phone" type="number" placeholder="请输入您的手机号">
  85. </view>
  86. <view class="mb-32">
  87. <view class="fc-F2D4A9 fs-32 mb-16 wow animate__animated animate__bounceInLeft">您的公司名称<span class="fc-ED301D fs-32">*</span></view>
  88. <input class="wow animate__animated animate__bounceInRight" v-model="fromData.corporate" type="text" placeholder="请输入您的公司名称">
  89. </view>
  90. <view class="mb-32">
  91. <view class="fc-F2D4A9 fs-32 mb-16 wow animate__animated animate__bounceInLeft">邀请人<span class="fc-ED301D fs-32">*</span></view>
  92. <input class="wow animate__animated animate__bounceInRight" v-model="fromData.inviter" type="text" placeholder="请输入您的邀请人">
  93. </view>
  94. <view class="mb-72">
  95. <view class="fc-F2D4A9 fs-32 mb-16 wow animate__animated animate__bounceInLeft">邀请人手机号<span class="fc-ED301D fs-32">*</span></view>
  96. <input class="wow animate__animated animate__bounceInRight" v-model="fromData.inviter_phone" type="number" placeholder="请输入邀请人的手机号">
  97. </view>
  98. <view class="save-box wow animate__animated animate__bounceInUp" @click="save()">提交</view>
  99. </view>
  100. </view>
  101. </swiper-item>
  102. </swiper>
  103. </view>
  104. </template>
  105. <script>
  106. import {getJsConfig, userParticipation} from '@/api/user.js';
  107. import tools from "@/service/tools";
  108. import wxJs from "jweixin-module"
  109. export default {
  110. components: {},
  111. data() {
  112. return {
  113. userName:'',
  114. fromData:{
  115. m_id:'',
  116. name:'',
  117. phone:'',
  118. corporate:'',
  119. inviter:'',//邀请人
  120. inviter_phone:'',
  121. },
  122. isAJAX:false,
  123. index:0,
  124. audioServe:undefined,
  125. isPlay:false,
  126. isAutoPlay:false,
  127. }
  128. },
  129. onshow() {
  130. this.$wow.init();
  131. },
  132. mounted() {
  133. this.userName = uni.getStorageSync('userName');
  134. let isWeiXin = tools.isWx();
  135. if(isWeiXin){
  136. this.getJsConfig()
  137. }
  138. this.musicPlay()
  139. },
  140. methods: {
  141. musicPlay() {
  142. if (!this.audioServe) {
  143. this.audioServe = uni.createInnerAudioContext();
  144. this.audioServe.autoplay = true;
  145. this.audioServe.loop = true;
  146. this.audioServe.obeyMuteSwitch = true;
  147. this.audioServe.src = 'https://jhnewshop.oss-cn-chengdu.aliyuncs.com/RockHouseJail.mp3';
  148. }
  149. this.audioServe.play();
  150. this.audioServe.onPlay(() => {
  151. this.isPlay = true;
  152. this.isAutoPlay = true
  153. })
  154. },
  155. play(){
  156. if(!this.isPlay && this.audioServe){
  157. this.audioServe.play();
  158. this.audioServe.onPlay(() => {
  159. this.isPlay = true;
  160. this.isAutoPlay = true
  161. })
  162. }
  163. },
  164. musicPause() {
  165. if (this.audioServe) {
  166. this.audioServe.pause();
  167. this.audioServe.onPause(() => {
  168. this.isPlay = false;
  169. });
  170. }
  171. },
  172. getJsConfig(){
  173. console.log(window.location)
  174. let url = window.location.href.split('#')[0];
  175. getJsConfig({
  176. 'url': url
  177. }).then(res=>{
  178. if (res.code===1){
  179. wxJs.config({
  180. debug: false,
  181. appId: res.data.appid,
  182. nonceStr: res.data.noncestr,
  183. signature: res.data.signature,
  184. timestamp: res.data.timestamp * 1, // 必填,生成签名的时间戳
  185. jsApiList: ['updateAppMessageShareData', 'updateTimelineShareData']
  186. })
  187. wxJs.ready(() => {
  188. //自定义“分享给朋友”
  189. // this.musicPlay()
  190. wxJs.updateAppMessageShareData({
  191. title: '振合网“实体联盟”招商说明会-邀请函',
  192. desc: '10月20日我们不见不散!',
  193. link: "https://enroll.jhcs888.com/#/" , // 分享链接,该链接域名或路径必须与当前页面对应的公众号 JS 安全域名一致
  194. imgUrl: 'https://jhnewshop.oss-cn-chengdu.aliyuncs.com/storage/attest/20210927/949e48fb7c286836097efdd4ba4d0bd9.jpg', // 分享图标
  195. success: function() {
  196. // 设置成功
  197. }
  198. })
  199. //自定义“分享到朋友圈”
  200. wxJs.updateTimelineShareData({
  201. title: '振合网“实体联盟”招商说明会-邀请函',
  202. desc: '10月20日我们不见不散!',
  203. link: "https://enroll.jhcs888.com/#/", // 分享链接,该链接域名或路径必须与当前页面对应的公众号 JS 安全域名一致
  204. imgUrl: 'https://jhnewshop.oss-cn-chengdu.aliyuncs.com/storage/attest/20210927/949e48fb7c286836097efdd4ba4d0bd9.jpg', // 分享图标
  205. success: function() {
  206. // 设置成功
  207. }
  208. })
  209. });
  210. }
  211. })
  212. },
  213. playPhone() {
  214. uni.makePhoneCall({
  215. phoneNumber: '023-67177907'
  216. });
  217. },
  218. swiperChange(e){
  219. this.play()
  220. if(e.detail.current!=this.index){
  221. this.index = e.detail.current;
  222. }
  223. },
  224. toMap(){
  225. uni.openLocation({
  226. latitude: 29.665085,
  227. longitude: 106.615366,
  228. scale: 18,
  229. name: '重庆丽星君顿酒店',
  230. address: '重庆市渝北区服装城大道48号',
  231. success() {},
  232. fail(error) {}
  233. });
  234. },
  235. save(){
  236. if(this.isAJAX){
  237. return
  238. }
  239. this.isAJAX = true;
  240. this.fromData.m_id = uni.getStorageSync('m_id');
  241. userParticipation(this.fromData).then((res)=>{
  242. if(res.code === 1){
  243. tools.success('预约成功')
  244. this.fromData = {
  245. m_id:'',
  246. name:'',
  247. phone:'',
  248. corporate:'',
  249. inviter:'',//邀请人
  250. inviter_phone:'',
  251. }
  252. }else{
  253. tools.error(res.msg)
  254. }
  255. this.isAJAX = false;
  256. })
  257. }
  258. },
  259. }
  260. </script>
  261. <style lang="scss" scoped>
  262. .index-box{
  263. background-image: url('@/static/img/c-bg.png');
  264. background-size: 100% 100%;
  265. }
  266. .up-icon{
  267. width: 64rpx;
  268. height: 64rpx;
  269. margin: 0 auto;
  270. }
  271. .swiper{
  272. flex: 1;
  273. width: 100%;
  274. height: 100%;
  275. .swiper-item{
  276. width: 100%;
  277. height: 100%;
  278. }
  279. }
  280. .logo-img{
  281. width: 136rpx;
  282. height: 79rpx;
  283. margin-top: 8rpx;
  284. }
  285. .music-img{
  286. margin-top: 16rpx;
  287. width: 56rpx;
  288. height: 56rpx;
  289. }
  290. .index-1{
  291. .img-text{
  292. width: 384rpx;
  293. height: 232rpx;
  294. margin: 76rpx auto 36rpx auto;
  295. }
  296. .img-xian{
  297. width: 10rpx;
  298. height: 174rpx;
  299. margin: 0 auto 154rpx auto;
  300. }
  301. .name-text{
  302. width: 288rpx;
  303. height: 32rpx;
  304. margin: 0 auto 10rpx auto;
  305. }
  306. .time-text{
  307. width: 274rpx;
  308. height: 37rpx;
  309. margin: 0 auto 140rpx auto;
  310. }
  311. }
  312. .index-2{
  313. width: 686rpx;
  314. min-height: 1032rpx;
  315. background: rgba(23,49,74,0.51);
  316. border-radius: 12rpx;
  317. border: 2rpx solid rgba(51,121,163,0.8);
  318. margin: 40rpx auto;
  319. box-sizing: border-box;
  320. padding: 32rpx;
  321. input{
  322. width: 622rpx;
  323. height: 80rpx;
  324. background: #FFFFFF;
  325. border-radius: 10rpx;
  326. box-sizing: border-box;
  327. padding: 0 20rpx;
  328. font-size: 28rpx;
  329. }
  330. .save-box{
  331. width: 622rpx;
  332. height: 80rpx;
  333. background: linear-gradient( 90deg, #EBC795 0%, #E3BB83 100%);
  334. border-radius: 10rpx;
  335. text-align: center;
  336. line-height: 80rpx;
  337. font-size: 38rpx;
  338. font-weight: 600;
  339. color: #3A2E1C;
  340. }
  341. .text-img{
  342. width: 302rpx;
  343. height: 116rpx;
  344. margin: 0 auto 44rpx auto;
  345. }
  346. .text-box{
  347. line-height: 68rpx;
  348. letter-spacing: 4rpx;
  349. display: block;
  350. text-indent: 72rpx;
  351. }
  352. .text-img-1{
  353. width: 224rpx;
  354. height: 116rpx;
  355. margin: 0 auto 44rpx auto;
  356. }
  357. .text-img-2{
  358. width: 214rpx;
  359. height: 116rpx;
  360. margin: 0 auto 44rpx auto;
  361. }
  362. .img-1{
  363. width: 622rpx;
  364. height: 328rpx;
  365. border-radius: 10rpx;
  366. margin-bottom: 24rpx;
  367. }
  368. .img-2{
  369. width: 300rpx;
  370. height: 214rpx;
  371. margin-bottom: 60rpx;
  372. }
  373. .img-3{
  374. width: 622rpx;
  375. height: 354rpx;
  376. border-radius: 10rpx;
  377. margin-bottom: 40rpx;
  378. }
  379. .b-f{
  380. position: relative;
  381. .b-c{
  382. position: absolute;
  383. right: 24rpx;
  384. bottom: 22rpx;
  385. width: 172rpx;
  386. height: 56rpx;
  387. background: #2F80ED;
  388. border-radius: 4rpx;
  389. text-align: center;
  390. line-height: 56rpx;
  391. font-size: 28rpx;
  392. color: #fff;
  393. }
  394. }
  395. }
  396. </style>