增加接口联调
This commit is contained in:
@@ -24,14 +24,17 @@
|
||||
<script setup>
|
||||
import { ref,getCurrentInstance } from 'vue';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import { MINIO_KEY } from '@/enums/cacheEnums';
|
||||
import { versionCheck,getBindStatus } from '@/api/auth.js';
|
||||
import { formatIOS } from '@/utils/status.js'
|
||||
import { requestAndroidPermissionAsync,requestAndroidPermission } from '@/utils/common.js'
|
||||
// import { requestAndroidPermissionAsync,requestAndroidPermission } from '@/utils/common.js'
|
||||
import {showAlert} from '@/utils/message.js'
|
||||
import { minioParam } from '@/api/polling.js'
|
||||
import { useUserStore } from '@/stores/user';
|
||||
const userStore = useUserStore();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const networkEnv = ref(proxy.$NETWORK_ENV);//1-内网 2-外网
|
||||
console.log(111,networkEnv.value)
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
// 获取 存储手机的module
|
||||
@@ -48,7 +51,6 @@ let versionData = ref({}); //版本参数
|
||||
// 初始load页面
|
||||
onLoad(async(opt) => {
|
||||
console.log("onLoad");
|
||||
|
||||
// uni.preloadPage({url: "/pages/login/login"});
|
||||
// uni.preloadPage({url: "/pages/deviceAuth/deviceAuth"});
|
||||
// uni.preloadPage({url: "/pages/home/home"});
|
||||
@@ -89,8 +91,19 @@ onLoad(async(opt) => {
|
||||
// },1000)
|
||||
// #endif
|
||||
|
||||
// 内网才有minio参数
|
||||
if(networkEnv.value==1){
|
||||
getMinioParam();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// 获取minio参数
|
||||
const getMinioParam=async ()=>{
|
||||
let data = await minioParam({});
|
||||
uni.setStorageSync(MINIO_KEY,JSON.stringify(data))
|
||||
}
|
||||
|
||||
// 检查版本是否是最新的s
|
||||
const getOSVesion = async()=>{
|
||||
let networkEnv = proxy.$NETWORK_ENV;//1-内网 2-外网
|
||||
|
||||
Reference in New Issue
Block a user