<script lang="ts" setup>
import { onHide, onLaunch, onShow } from "@dcloudio/uni-app";
// import {
// 	request,
// 	ipConfig
// } from '@/utils/request.js';
// import apiMapper from '@/apiMapper/index.js';
import { secondGenerationAppUpdate } from "@/common/appUpdate.js";

onLaunch(() => {
  console.log("App Launch");
  // 自动检测
  setTimeout(() => {
  	// 获取版本号
  	let clent = uni.getSystemInfoSync();
  	let version = '';

  	// #ifdef APP
  	version = clent.appWgtVersion;
  	// #endif
  	// #ifdef H5
  	version = clent.appVersion;
  	// #endif

  	if (clent.platform == 'android') {
  		secondGenerationAppUpdate(version || 0, 'Android');
  	} else {
  		secondGenerationAppUpdate(version || 0, 'IOS');
  	}
  }, 50)
  ammsLaunch();
});
onShow(() => {
  console.log("App Show");
});
onHide(() => {
  console.log("App Hide");
});
function ammsLaunch() {
  // 设置域名参数
  uni.setStorageSync("_PARAMETERS_", "10076");
  // uni.setStorageSync('urlPrefix', window.location.origin)
}
</script>

<style lang="less">
/* #ifndef APP-NVUE */
@import "colorui/main.css";
@import "colorui/icon.css";
/* @import "uni.scss"; */
/*每个页面公共css */
@import "static/style/public.less";
/* #endif */
uni-page-body {
  height: 100%;
  overflow: auto;
}
.h1 {
  height: 70upx;
}

.home {
  overflow-y: scroll;
}

.uni-modal__bd {
  text-align: left;
}
</style>
<style lang="scss">
/* 注意要写在第一行，同时给style标签加入lang="scss"属性 */
@import "uview-plus/index.scss";
// 加入mocp主题相关样式
@import "mocpStatic/css/theme.scss";
// 加入mocp字体图标
@import "mocpStatic/font/iconfont.css";
</style>
