index.vue 10.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. <template>
  2. <div class="swiper-container">
  3. <div class="musicbox" @click="troggle">
  4. <img :class="playing" :src="'https://jingcheng-h5.oss-cn-beijing.aliyuncs.com/nh/music_'+playing+'.png'" alt="">
  5. </div>
  6. <div class="swiper-wrapper">
  7. <div class="swiper-slide mainPage">
  8. <div>
  9. <img class="main_logo" src="https://jingcheng-h5.oss-cn-beijing.aliyuncs.com/nh/19nhyqh_logo.png">
  10. <div class="subPage">
  11. <div>
  12. <img :class="['main_main', (swiper || {}).activeIndex === 0 ? 'animated zoomIn': '']" src="https://jingcheng-h5.oss-cn-beijing.aliyuncs.com/nh/19nhyqh_main.png">
  13. <img :class="['main_title', (swiper || {}).activeIndex === 0 ? 'animated fadeInUp': '']" src="https://jingcheng-h5.oss-cn-beijing.aliyuncs.com/nh/19nhyqh_maintitle1.png">
  14. <img :class="['main_happy', (swiper || {}).activeIndex === 0 ? 'animated rotateIn': '']" src="https://jingcheng-h5.oss-cn-beijing.aliyuncs.com/nh/19nhyqh_happy.png">
  15. </div>
  16. </div>
  17. </div>
  18. </div>
  19. <div class="swiper-slide yqhPage">
  20. <div>
  21. <div class="subPage">
  22. <div class="sub_title">
  23. <img :class="['yqh_title', (swiper || {}).activeIndex === 1 ? 'animated zoomIn': '']" src="https://jingcheng-h5.oss-cn-beijing.aliyuncs.com/nh/19nhyqh_title.png">
  24. <img :class="['yqh_title_min', (swiper || {}).activeIndex === 1 ? 'animated fadeInLeft': '']" style="animation-delay: 0.5s;" src="https://jingcheng-h5.oss-cn-beijing.aliyuncs.com/nh/19nhyqh_title_min.png">
  25. </div>
  26. <div class="yqh">
  27. <div class="div_xz">
  28. <div :class="[(swiper || {}).activeIndex === 1 ? 'animated fadeInUp': '']" style="animation-delay: 1s;width:100%;height:100%;opacity: 0;">
  29. <div>
  30. <a>
  31. <img
  32. v-if="userInfo !== null"
  33. :src="userInfo.Headimgurl.replace(/http:\/\/.+\.qlogo\.cn\//i, 'http://wx.jinchengjiaye.com/wechat-avatar/') || ''"
  34. class="cover"
  35. alt
  36. >
  37. </a>
  38. <span>{{userInfo !== null ? userInfo.Nickyname : ''}}:</span>
  39. </div>
  40. <img class="yqh_xz" src="https://jingcheng-h5.oss-cn-beijing.aliyuncs.com/nh/19nhyqh_xz1.png">
  41. </div>
  42. </div>
  43. <div class="div_xf_top">
  44. <img src="https://jingcheng-h5.oss-cn-beijing.aliyuncs.com/nh/19nhyqh_xftop.png">
  45. </div>
  46. <div class="div_xf_down">
  47. <img src="https://jingcheng-h5.oss-cn-beijing.aliyuncs.com/nh/19nhyqh_xfdown.png">
  48. </div>
  49. <img :class="['yqh_happy', (swiper || {}).activeIndex === 1 ? 'animated rotateIn': '']" style="animation-delay: 2s" src="https://jingcheng-h5.oss-cn-beijing.aliyuncs.com/nh/19nhyqh_happy.png">
  50. </div>
  51. </div>
  52. </div>
  53. </div>
  54. <div class="swiper-slide hylcPage">
  55. <div>
  56. <div class="subPage">
  57. <div class="sub_title">
  58. <img :class="['hylc_title', (swiper || {}).activeIndex === 2 ? 'animated zoomIn': '']" src="https://jingcheng-h5.oss-cn-beijing.aliyuncs.com/nh/19nhyqh_title.png">
  59. <img :class="['hylc_title_hy', (swiper || {}).activeIndex === 2 ? 'animated fadeInLeft': '']" style="animation-delay: 0.5s;" src="https://jingcheng-h5.oss-cn-beijing.aliyuncs.com/nh/19nhyqh_title_hy.png">
  60. </div>
  61. <div :class="[(swiper || {}).activeIndex === 2 ? 'animated fadeIn': '']" style="animation-delay: 1s">
  62. <ul>
  63. <li v-for="(item, index) in meetings" class="flex-h" :key="index">
  64. <span :class="[(swiper || {}).activeIndex === 2 ? 'animated fadeInLeft': '']" style="animation-delay: 1.5s;animation-duration:0.5s">{{item.time}}</span>
  65. <div :class="['flex-item', (swiper || {}).activeIndex === 2 ? 'animated fadeInRight': '']" style="animation-delay: 1s;animation-duration:1s">{{item.desc}}</div>
  66. <span :class="[(swiper || {}).activeIndex === 2 ? 'animated fadeInRight': '']" style="animation-delay: 1.5s;animation-duration:0.5s">{{item.minutes}}</span>
  67. </li>
  68. </ul>
  69. </div>
  70. <div class="sub_bottom">
  71. <img src="https://jingcheng-h5.oss-cn-beijing.aliyuncs.com/nh/19nhyqh_logo.png">
  72. </div>
  73. </div>
  74. </div>
  75. </div>
  76. <div class="swiper-slide chxzPage">
  77. <div>
  78. <div class="subPage">
  79. <div class="sub_title">
  80. <img :class="['chxz_title', (swiper || {}).activeIndex === 3 ? 'animated zoomIn': '']" src="https://jingcheng-h5.oss-cn-beijing.aliyuncs.com/nh/19nhyqh_title.png">
  81. <img :class="['chxz_title_ch', (swiper || {}).activeIndex === 3 ? 'animated fadeInLeft': '']" style="animation-delay: 0.5s;" src="https://jingcheng-h5.oss-cn-beijing.aliyuncs.com/nh/19nhyqh_title_ch.png">
  82. <img :class="['chxz_desc', (swiper || {}).activeIndex === 3 ? 'animated fadeIn': '']" style="animation-delay: 1s;" src="https://jingcheng-h5.oss-cn-beijing.aliyuncs.com/nh/19nhyqh_ch_desc.png">
  83. </div>
  84. <el-amap ref="map" vid="amapDemo" :center="mapCenter" :zoom="15" :class="['amap', (swiper || {}).activeIndex === 3 ? 'animated fadeIn': '']" style="animation-delay: 1s;">
  85. <el-amap-marker :position="mapCenter" :events="events"></el-amap-marker>
  86. </el-amap>
  87. <div class="sub_bottom">
  88. <img src="https://jingcheng-h5.oss-cn-beijing.aliyuncs.com/nh/19nhyqh_logo.png">
  89. </div>
  90. </div>
  91. </div>
  92. </div>
  93. <div class="swiper-slide hydlPage">
  94. <div>
  95. <div class="subPage">
  96. <div class="sub_title">
  97. <img :class="['hydl_title', (swiper || {}).activeIndex === 4 ? 'animated zoomIn': '']" src="https://jingcheng-h5.oss-cn-beijing.aliyuncs.com/nh/19nhyqh_title.png">
  98. <img :class="['hydl_title_en', (swiper || {}).activeIndex === 4 ? 'animated fadeIn': '']" style="animation-delay: 0.5s;" src="https://jingcheng-h5.oss-cn-beijing.aliyuncs.com/nh/invitation_letter.png">
  99. </div>
  100. <div class="sub_content">
  101. <img :class="['sub_content_img', (swiper || {}).activeIndex === 4 ? 'animated fadeInUp': '']" src="https://jingcheng-h5.oss-cn-beijing.aliyuncs.com/nh/welcome.png" alt="">
  102. </div>
  103. <div class="sub_bottom">
  104. <img src="https://jingcheng-h5.oss-cn-beijing.aliyuncs.com/nh/bottom-logo.png">
  105. </div>
  106. </div>
  107. </div>
  108. </div>
  109. </div>
  110. </div>
  111. </template>
  112. <script>
  113. import Swiper from 'swiper'
  114. import { createNamespacedHelpers } from 'vuex'
  115. import wx from 'weixin-jsapi'
  116. const { mapState: mapUserState } = createNamespacedHelpers('user')
  117. export default {
  118. name: '',
  119. data () {
  120. return {
  121. swiper: null,
  122. marker: null,
  123. events: {
  124. click: () => {
  125. console.log(wx)
  126. wx.openLocation({
  127. latitude: 31.941891, // 纬度,浮点数,范围为90 ~ -90
  128. longitude: 118.818648, // 经度,浮点数,范围为180 ~ -180。
  129. name: '银城皇冠假日酒店'
  130. })
  131. }
  132. },
  133. audio: null,
  134. musicurl: 'https://jingcheng-h5.oss-cn-beijing.aliyuncs.com/nh/nh_music.mp3',
  135. playing: 'off',
  136. markers: [],
  137. mapCenter: [118.818648, 31.941891],
  138. meetings: [{
  139. time: '13:30-13:40',
  140. desc: '分段入场: 城中、江宁、合肥、大华、物色、银荔方、耘初',
  141. minutes: '10分钟'
  142. }, {
  143. time: '13:40-13:55',
  144. desc: '分段入场: 江北、锦城、荟盛行、海南',
  145. minutes: '15分钟'
  146. }, {
  147. time: '13:55-14:10',
  148. desc: '分段入场: 无锡、杭州、徐州、营销中心、荟房',
  149. minutes: '15分钟'
  150. }, {
  151. time: '14:30-14:35',
  152. desc: '视频',
  153. minutes: '5分钟'
  154. }, {
  155. time: '14:35-14:55',
  156. desc: '何总发言',
  157. minutes: '20分钟'
  158. }, {
  159. time: '14:55-15:25',
  160. desc: '案例分享2个(江宁、江北)',
  161. minutes: '30分钟'
  162. }, {
  163. time: '15:25-15:50',
  164. desc: '邀请集团领导发言',
  165. minutes: '25分钟'
  166. }, {
  167. time: '15:50-17:10',
  168. desc: '表彰优秀员工、团队',
  169. minutes: '80分钟'
  170. }, {
  171. time: '17:10-17:30',
  172. desc: '下达2019目标、誓师授旗',
  173. minutes: '20分钟'
  174. }, {
  175. time: '17:30-18:30',
  176. desc: '翻台、暖场互动',
  177. minutes: '60分钟'
  178. }, {
  179. time: '18:30-20:30',
  180. desc: '晚宴+节目+抽奖+互动',
  181. minutes: '120分钟'
  182. }],
  183. trigger: 'ontouchend' in window.document ? 'touchstart' : 'click'
  184. }
  185. },
  186. computed: {
  187. ...mapUserState({
  188. userInfo: item => item.userInfo
  189. })
  190. },
  191. mounted () {
  192. this.swiper = new Swiper('.swiper-container', {
  193. direction: 'vertical'
  194. })
  195. window.setTimeout(this.play, 1000)
  196. window.document.addEventListener(this.trigger, this.autoplay, false)
  197. },
  198. methods: {
  199. play () {
  200. if (this.musicurl) {
  201. if (!this.audio) {
  202. this.audio = window.document.createElement('audio')
  203. this.audio.src = this.musicurl
  204. this.audio.autoplay = 'autoplay'
  205. this.audio.preload = true
  206. this.audio.loop = true
  207. }
  208. this.audio.play()
  209. this.playing = 'on'
  210. }
  211. },
  212. stop () {
  213. this.audio.pause()
  214. this.playing = 'off'
  215. },
  216. troggle () {
  217. if (this.playing === 'on') {
  218. this.stop()
  219. } else {
  220. this.play()
  221. }
  222. }
  223. }
  224. }
  225. </script>
  226. <style lang="scss" scoped>
  227. @import "page.scss";
  228. </style>