<template>
  <section>
    <h-header>
      <div slot="left" class="h-header-btn" @click="$routeGo(-1)">
        <i class="ion-ios-arrow-back"/>
      </div>
      <div slot="center">个人中心</div>
    </h-header>
    <h-content>
      <list-item :item-height="45">
        <item :show-arrow="true" @click.native="updateVersion">
          <div slot="name">检查更新</div>
        </item>
      </list-item>
    </h-content>
  </section>
</template>

<script>
export default {
  data () {
    return {}
  },
  activated () {

  },
  methods: {
    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)
          }
        },
      })
    },
  },
}
</script>

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

</style>
