<script>
// #ifdef APP-PLUS
import APPUpdate, { getCurrentNo } from "@/config/appUpdate";
// #endif
import { GetAPPversion } from "@/api/checkAPPupdate";

export default {
  data() {
    return {
      version: "",
    };
  },
  onLaunch: function () {
    // #ifdef APP-PLUS
    getCurrentNo((res) => {
      this.version = res.version;
      console.log("asdas", res);
    });
    this.onAPPUpdate();
    // #endif
  },
  onShow: function () {
    this.getAPPversion();
  },
  onHide: function () {},
  onBackPress: function () {},
  methods: {
    onAPPUpdate() {
      APPUpdate(this.version);
    },
    async getAPPversion() {
      let params = {
        marketId: 100,
        packageName: "com.xiaofa.shopAdmin",
        currVersionKey: 1,
      };

      let res = await GetAPPversion(params);
      console.log(res);
    },
  },
};
</script>

<style lang="scss">
// @import "./uni_modules/uview-ui/index.scss";
// @import "./uni_modules/uview-ui/theme.scss";
/*每个页面公共css */

@import "@/static/font/iconfont.css";
</style>
