51 lines
1.4 KiB
Vue
51 lines
1.4 KiB
Vue
<template>
|
|
<view class="content">
|
|
<view class="page">
|
|
<web-view :src="src" ></web-view>
|
|
</view>
|
|
<tabBar :value="1"></tabBar>
|
|
</view>
|
|
</template>
|
|
|
|
<script setup>
|
|
import { reactive, ref } from 'vue';
|
|
import { onShow,onLoad } from "@dcloudio/uni-app";
|
|
import tabBar from '@/components/tabBar/tabBar.vue';
|
|
const src = ref('')
|
|
onLoad((options)=>{
|
|
if(process.env.UNI_PLATFORM =="h5"){
|
|
let token='';
|
|
if(window.location.href.indexOf('//casedata.igandan.com')>-1){
|
|
token=uni.getStorageSync("AUTH_TOKEN_CASEDATA");
|
|
src.value = 'https://prod-caseplatform.igandan.com/web/home?token='+token;
|
|
}else{
|
|
token=uni.getStorageSync("DEV_AUTH_TOKEN_CASEDATA");
|
|
src.value = 'https://dev-caseplatform.igandan.com/web/home?token='+token;
|
|
}
|
|
|
|
}else{
|
|
const { envVersion } = uni.getAccountInfoSync().miniProgram;
|
|
let token=''
|
|
if (envVersion == "release") {
|
|
token=uni.getStorageSync("AUTH_TOKEN_CASEDATA");
|
|
src.value = 'https://prod-caseplatform.igandan.com/web/home?token='+token;
|
|
} else {
|
|
token= uni.getStorageSync("DEV_AUTH_TOKEN_CASEDATA");
|
|
src.value = 'https://dev-caseplatform.igandan.com/web/home?token='+token;
|
|
};
|
|
console.log(src.value)
|
|
}
|
|
|
|
})
|
|
|
|
</script>
|
|
|
|
<style scoped>
|
|
.page{
|
|
width:100%;
|
|
height:calc(100vh - 100rpx);
|
|
overflow-y: scroll;
|
|
}
|
|
|
|
</style>
|