<template>
  <view class="versions-container">
    <view class="logo-content"></view>
    <view class="versions-content">版本号：{{ versionNumber }}</view>
    <view class="versions-content">appVersionCode：{{ appVersionCode }}</view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      versionNumber: "",
      appVersionCode: "", //热更新
    };
  },
  onShow() {
    // 获取当前app的版本
    const systemInfo = uni.getSystemInfoSync();
    this.versionNumber = systemInfo.appVersion;
    this.appVersionCode = systemInfo.appVersionCode;
  },
};
</script>

<style lang="scss">
.versions-container {
  .logo-content {
    margin: 50% auto;
    margin-bottom: 32rpx;
    width: 228rpx;
    height: 228rpx;
    background-size: 100% 100%;
    background-image: url("../../static/logo-2.png");
    border-radius: 12rpx;
    overflow: hidden;
  }
  .versions-content {
    text-align: center;
  }
}
</style>
