|
@@ -1,5 +1,6 @@
|
|
<script setup>
|
|
<script setup>
|
|
import chartBox from './component/chartBox.vue'
|
|
import chartBox from './component/chartBox.vue'
|
|
|
|
+import noAuth from './component/noAuth.vue'
|
|
import { Popup, Toast,Picker } from 'vant';
|
|
import { Popup, Toast,Picker } from 'vant';
|
|
import {ref,onMounted, reactive, watch} from 'vue'
|
|
import {ref,onMounted, reactive, watch} from 'vue'
|
|
import {useRoute, useRouter,onBeforeRouteUpdate} from 'vue-router'
|
|
import {useRoute, useRouter,onBeforeRouteUpdate} from 'vue-router'
|
|
@@ -148,6 +149,8 @@ let chartData=ref({
|
|
})// 图表配置数据
|
|
})// 图表配置数据
|
|
let resData=ref(null)//接口详情数据
|
|
let resData=ref(null)//接口详情数据
|
|
let loading=ref(false)
|
|
let loading=ref(false)
|
|
|
|
+let noauth=ref(false)
|
|
|
|
+let noAuthData=ref(null)
|
|
// 如果type:init 则是初始化获取数据
|
|
// 如果type:init 则是初始化获取数据
|
|
const getChartInfo=async (type)=>{
|
|
const getChartInfo=async (type)=>{
|
|
// resData.value=null
|
|
// resData.value=null
|
|
@@ -202,6 +205,9 @@ const getChartInfo=async (type)=>{
|
|
wx.miniProgram.postMessage({ data: postData });
|
|
wx.miniProgram.postMessage({ data: postData });
|
|
|
|
|
|
|
|
|
|
|
|
+ }else if(res.code==403){
|
|
|
|
+ noauth.value=true
|
|
|
|
+ noAuthData.value=res.data
|
|
}
|
|
}
|
|
}
|
|
}
|
|
getChartInfo('init')
|
|
getChartInfo('init')
|
|
@@ -913,7 +919,7 @@ const pageTouchmove=(e)=>{
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<template>
|
|
<template>
|
|
- <div class="chart-detail" v-if="!loading">
|
|
|
|
|
|
+ <div class="chart-detail" v-if="!loading&&!noauth">
|
|
<div class="chart-title">{{resData.ChartInfo.ChartName}}</div>
|
|
<div class="chart-title">{{resData.ChartInfo.ChartName}}</div>
|
|
<div class="top-box">
|
|
<div class="top-box">
|
|
<div class="flex calendar-box" style="float:left" @click="handleShowDate">
|
|
<div class="flex calendar-box" style="float:left" @click="handleShowDate">
|
|
@@ -1026,6 +1032,7 @@ const pageTouchmove=(e)=>{
|
|
</div>
|
|
</div>
|
|
</Popup>
|
|
</Popup>
|
|
</div>
|
|
</div>
|
|
|
|
+ <noAuth v-if="noauth" :data="noAuthData"></noAuth>
|
|
|
|
|
|
|
|
|
|
|
|
|