my-info.vue 1.62 KB
Newer Older
李晓兵's avatar
李晓兵 committed
1 2 3 4 5 6
<template>
  <section>
    <h-header>
      <div slot="left" class="h-header-btn" @click="$routeGo(-1)">
        <i class="ion-ios-arrow-back"/>
      </div>
李晓兵's avatar
李晓兵 committed
7
      <div slot="center">个人中心</div>
李晓兵's avatar
李晓兵 committed
8 9 10
    </h-header>
    <h-content>
      <list-item :item-height="45">
李晓兵's avatar
李晓兵 committed
11 12
        <item :show-arrow="true" @click.native="updateVersion">
          <div slot="name">检查更新</div>
李晓兵's avatar
李晓兵 committed
13
        </item>
李晓兵's avatar
李晓兵 committed
14 15 16
        <item :show-arrow="true" @click.native="logOut">
          <div slot="name">退出登录</div>
        </item>
李晓兵's avatar
李晓兵 committed
17 18 19 20 21 22 23 24
      </list-item>
    </h-content>
  </section>
</template>

<script>
export default {
  data () {
李晓兵's avatar
李晓兵 committed
25
    return {}
李晓兵's avatar
李晓兵 committed
26 27 28 29 30
  },
  activated () {

  },
  methods: {
李晓兵's avatar
李晓兵 committed
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
    updateVersion () {
      if (vum.Platform.isAndroid()) {
        this.hote_update_version('发现新版本是否更新', 'http://hlsapp.hand-china.com/file/XCMG/www/android/www.zip')
      } else {
        this.hote_update_version('发现新版本是否更新', 'http://hlsapp.hand-china.com/file/XCMG/www/ios/www.zip')
      }
    },
    hote_update_version (content, url) {
      hlsPopup.showConfirm({
        title: '版本更新',
        content: content,
        onConfirm: function (index) {
          if (index === 1) {
            hotpatch.updateNewVersion(url)
          }
        },
      })
    },
李晓兵's avatar
李晓兵 committed
49 50 51 52 53 54 55 56 57 58 59 60 61
    logOut () {
      let vm = this
      hlsPopup.showConfirm({
        title: '提示',
        content: '确定退出',
        onConfirm: function (index) {
          if (index === 1) {
            window.localStorage.clear()
            vm.$router.push('/login')
          }
        },
      })
    },
李晓兵's avatar
李晓兵 committed
62 63 64 65 66 67 68
  },
}
</script>

<style lang="less" type="text/less">

</style>