微信

App.vue 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <template>
  2. <div id="app" v-if="showPage">
  3. <router-view></router-view>
  4. </div>
  5. </template>
  6. <script>
  7. import '../../common/css/reset.css'
  8. import logo from '../../common/icon/indexlogo.jpg'
  9. import wxsdk from '../../util/share'
  10. import { mapState, createNamespacedHelpers } from 'vuex'
  11. const { mapActions: actions } = createNamespacedHelpers('userCenter')
  12. export default {
  13. name: 'app',
  14. data () {
  15. return {
  16. showPage: true,
  17. logo
  18. }
  19. },
  20. components: {},
  21. computed: {
  22. ...mapState({
  23. userInfo: x => x.userCenter.userInfo,
  24. org: x => x.app.orgId
  25. })
  26. },
  27. created () {
  28. // if (location.search && this.toolClass.UrlSearch(location.search).code) {
  29. // this.code = this.toolClass.UrlSearch(location.search).code
  30. // } else {
  31. // this.code = null
  32. // }
  33. // this.getUserInfo({ org: this.org, code: this.code }).then(() => {
  34. // this.showPage = true
  35. // })
  36. // wxsdk({ url: encodeURIComponent(window.location.href.split('#')[0]) }, {
  37. // title: '城的空间',
  38. // desc: '城的空间',
  39. // link: `${window.location.origin}${window.location.pathname}#/mainPage/indexPage`,
  40. // thu_image: `https://jingcheng-resourceplat.oss-cn-shanghai.aliyuncs.com/citymini%2Findexlogo.jpg`
  41. // })
  42. },
  43. methods: {
  44. ...actions(['getUserInfo'])
  45. }
  46. }
  47. </script>
  48. <style>
  49. #app {
  50. width: 100%;
  51. height: 100%;
  52. position: relative;
  53. }
  54. </style>