index.vue 8.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  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_title_ch', (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>
  94. </div>
  95. </template>
  96. <script>
  97. import Swiper from 'swiper'
  98. import { createNamespacedHelpers } from 'vuex'
  99. import wx from 'weixin-jsapi'
  100. const { mapState: mapUserState } = createNamespacedHelpers('user')
  101. export default {
  102. name: '',
  103. data () {
  104. return {
  105. swiper: null,
  106. marker: null,
  107. events: {
  108. click: () => {
  109. console.log(wx)
  110. wx.openLocation({
  111. latitude: 31.941891, // 纬度,浮点数,范围为90 ~ -90
  112. longitude: 118.818648, // 经度,浮点数,范围为180 ~ -180。
  113. name: '银城皇冠假日酒店'
  114. })
  115. }
  116. },
  117. audio: null,
  118. musicurl: 'https://jingcheng-h5.oss-cn-beijing.aliyuncs.com/nh/nh_music.mp3',
  119. playing: 'off',
  120. markers: [],
  121. mapCenter: [118.818648, 31.941891],
  122. meetings: [{
  123. time: '13:30-13:40',
  124. desc: '城中、江宁、合肥、大华、物色、银荔方、耘初',
  125. minutes: '10分钟'
  126. }, {
  127. time: '13:40-13:55',
  128. desc: '江北、锦城、荟盛行、海南',
  129. minutes: '15分钟'
  130. }, {
  131. time: '13:55-14:10',
  132. desc: '无锡、杭州、徐州、营销中心、荟房',
  133. minutes: '15分钟'
  134. }, {
  135. time: '14:30-14:35',
  136. desc: '视频',
  137. minutes: '5分钟'
  138. }, {
  139. time: '14:35-14:55',
  140. desc: '何总发言',
  141. minutes: '20分钟'
  142. }, {
  143. time: '14:55-15:25',
  144. desc: '案例分享2个(江宁、江北)',
  145. minutes: '30分钟'
  146. }, {
  147. time: '15:25-15:50',
  148. desc: '邀请集团领导发言',
  149. minutes: '25分钟'
  150. }, {
  151. time: '15:50-17:10',
  152. desc: '表彰优秀员工、团队',
  153. minutes: '80分钟'
  154. }, {
  155. time: '17:10-17:30',
  156. desc: '下达2019目标、誓师授旗',
  157. minutes: '20分钟'
  158. }, {
  159. time: '17:30-18:30',
  160. desc: '翻台、暖场互动',
  161. minutes: '60分钟'
  162. }, {
  163. time: '18:30-20:30',
  164. desc: '晚宴+节目+抽奖+互动',
  165. minutes: '120分钟'
  166. }],
  167. trigger: 'ontouchend' in window.document ? 'touchstart' : 'click'
  168. }
  169. },
  170. computed: {
  171. ...mapUserState({
  172. userInfo: item => item.userInfo
  173. })
  174. },
  175. mounted () {
  176. this.swiper = new Swiper('.swiper-container', {
  177. direction: 'vertical'
  178. })
  179. window.setTimeout(this.play, 1000)
  180. window.document.addEventListener(this.trigger, this.autoplay, false)
  181. },
  182. methods: {
  183. play () {
  184. if (this.musicurl) {
  185. if (!this.audio) {
  186. this.audio = window.document.createElement('audio')
  187. this.audio.src = this.musicurl
  188. this.audio.autoplay = 'autoplay'
  189. this.audio.preload = true
  190. this.audio.loop = true
  191. }
  192. this.audio.play()
  193. this.playing = 'on'
  194. }
  195. },
  196. stop () {
  197. this.audio.pause()
  198. this.playing = 'off'
  199. },
  200. troggle () {
  201. if (this.playing === 'on') {
  202. this.stop()
  203. } else {
  204. this.play()
  205. }
  206. }
  207. }
  208. }
  209. </script>
  210. <style lang="scss" scoped>
  211. @import "page.scss";
  212. </style>