case-data/pages/case/case.vue
zoujiandong 34878c34b4 8.20
2025-08-20 13:43:33 +08:00

51 lines
1.3 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://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://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;
};
}
})
</script>
<style scoped>
.page{
width:100%;
height:calc(100vh - 100rpx);
overflow-y: scroll;
}
</style>