|
|
@@ -230,6 +230,7 @@ let listInitPromise: Promise<void> | null = null
|
|
|
|
|
|
/** 列表接口调试:最近一次请求参数与完整响应 */
|
|
|
const showListRawJsonPopup = ref(false)
|
|
|
+const showApiFullUrlPopup = ref(false)
|
|
|
const listLastReqParams = ref<PageQuestionReportDataReq | null>(null)
|
|
|
const listLastApiResponse = ref<ApiResponse<PageResp<QuestionListRes>> | null>(null)
|
|
|
|
|
|
@@ -243,6 +244,20 @@ const listApiRawJson = computed(() => {
|
|
|
return JSON.stringify(listLastApiResponse.value, null, 2)
|
|
|
})
|
|
|
|
|
|
+const httpsOrigin = computed(() => {
|
|
|
+ if (typeof window === 'undefined') return ''
|
|
|
+ const host = window.location.host || ''
|
|
|
+ return host ? `https://${host}` : ''
|
|
|
+})
|
|
|
+
|
|
|
+const listApiFullUrl = computed(() => `${httpsOrigin.value}/api/questionReport/pageQuestionReportData`)
|
|
|
+const detailApiFullUrl = computed(() => `${httpsOrigin.value}/api/questionReport/detailsQuestionReportData/{id}`)
|
|
|
+const currentPageUrl = computed(() => {
|
|
|
+ if (typeof window === 'undefined') return ''
|
|
|
+ return window.location.href || ''
|
|
|
+})
|
|
|
+const detailPageUrl = computed(() => `${httpsOrigin.value}/subPages/pages/reportProblems/detail?id={id}`)
|
|
|
+
|
|
|
const resetQuestionList = () => {
|
|
|
list.value = []
|
|
|
pageInfo.value.pageNumber = 1
|
|
|
@@ -400,6 +415,7 @@ watch(active, async (value) => {
|
|
|
<view class="tab-container">
|
|
|
<view class="mb-[8px]">
|
|
|
<van-button size="small" plain type="primary" @click="showListRawJsonPopup = true">查看接口原始JSON</van-button>
|
|
|
+ <van-button class="ml-[8px]" size="small" plain type="primary" @click="showApiFullUrlPopup = true">查看完整访问地址</van-button>
|
|
|
</view>
|
|
|
<van-list
|
|
|
v-model:loading="loading"
|
|
|
@@ -444,6 +460,35 @@ watch(active, async (value) => {
|
|
|
</scroll-view>
|
|
|
</view>
|
|
|
</van-popup>
|
|
|
+ <van-popup
|
|
|
+ v-model:show="showApiFullUrlPopup"
|
|
|
+ round
|
|
|
+ position="bottom"
|
|
|
+ :style="{ height: '55%' }"
|
|
|
+ >
|
|
|
+ <view class="json-popup">
|
|
|
+ <view class="json-title">当前HTTPS域名</view>
|
|
|
+ <scroll-view scroll-y class="json-scroll json-scroll--small">
|
|
|
+ <text class="json-text">{{ httpsOrigin || '当前环境未获取到浏览器域名' }}</text>
|
|
|
+ </scroll-view>
|
|
|
+ <view class="json-title">问题答复列表接口</view>
|
|
|
+ <scroll-view scroll-y class="json-scroll json-scroll--small">
|
|
|
+ <text class="json-text">{{ listApiFullUrl }}</text>
|
|
|
+ </scroll-view>
|
|
|
+ <view class="json-title">详情接口</view>
|
|
|
+ <scroll-view scroll-y class="json-scroll">
|
|
|
+ <text class="json-text">{{ detailApiFullUrl }}</text>
|
|
|
+ </scroll-view>
|
|
|
+ <view class="json-title">当前页面访问地址</view>
|
|
|
+ <scroll-view scroll-y class="json-scroll json-scroll--small">
|
|
|
+ <text class="json-text">{{ currentPageUrl || '当前环境未获取到页面地址' }}</text>
|
|
|
+ </scroll-view>
|
|
|
+ <view class="json-title">详情页访问地址</view>
|
|
|
+ <scroll-view scroll-y class="json-scroll">
|
|
|
+ <text class="json-text">{{ detailPageUrl }}</text>
|
|
|
+ </scroll-view>
|
|
|
+ </view>
|
|
|
+ </van-popup>
|
|
|
</view>
|
|
|
</van-tab>
|
|
|
</van-tabs>
|