temp
This commit is contained in:
9
.hbuilderx/launch.json
Normal file
9
.hbuilderx/launch.json
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"version" : "1.0",
|
||||||
|
"configurations" : [
|
||||||
|
{
|
||||||
|
"playground" : "standard",
|
||||||
|
"type" : "uni-app:app-ios"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
25
index.html
25
index.html
@@ -1,21 +1,28 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
|
||||||
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<link rel="icon" href="static/logo.svg">
|
<link rel="icon" href="static/logo.svg">
|
||||||
<script>
|
<script>
|
||||||
const coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)')
|
const coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)')
|
||||||
|| CSS.supports('top: constant(a)'))
|
|| CSS.supports('top: constant(a)'))
|
||||||
document.write(
|
document.write(
|
||||||
`<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0${
|
`<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0${coverSupport ? ', viewport-fit=cover' : ''}" />`)
|
||||||
coverSupport ? ', viewport-fit=cover' : ''}" />`)
|
|
||||||
</script>
|
</script>
|
||||||
<title></title>
|
<title>全能查 - 婚恋评估、司法涉诉查询、婚姻状态、判决书查询工具</title>
|
||||||
<!--preload-links-->
|
<meta name="description"
|
||||||
<!--app-context-->
|
content="全能查提供婚恋评估报告、司法涉诉查询、婚姻状态查询、判决书查询、失信人、个人涉诉、企业涉诉、车辆核验等多项服务,帮助您查询婚姻信息、名下车辆、涉诉风险等,提供全面的法律与金融风险防范工具。" />
|
||||||
</head>
|
<meta name="keywords"
|
||||||
<body>
|
content="婚恋评估, 司法涉诉查询, 判决书查询, 婚姻状态查询, 失信人, 个人涉诉查询, 企业涉诉查询, 名下车辆核验, 车辆核验, 婚姻报告, 法律风险, 信用风险, 银行卡黑名单, 手机身份证核验, 学历核验, AI律师" />
|
||||||
|
<meta name="author" content="全能查" />
|
||||||
|
<meta name="baidu-site-verification" content="4d551d55896a88badef8dcdb14cf874c" />
|
||||||
|
<meta name="baidu-site-verification" content="4d551d55896a88badef8dcdb14cf874c" />
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
<div id="app"><!--app-html--></div>
|
<div id="app"><!--app-html--></div>
|
||||||
<script type="module" src="/src/main.ts"></script>
|
<script type="module" src="/src/main.ts"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { defineManifestConfig } from '@uni-helper/vite-plugin-uni-manifest'
|
import { defineManifestConfig } from '@uni-helper/vite-plugin-uni-manifest'
|
||||||
|
|
||||||
export default defineManifestConfig({
|
export default defineManifestConfig({
|
||||||
'name': 'qnc-app',
|
'name': '全能查-司法涉诉_婚恋信息_企业查询平台-学宇思科技',
|
||||||
'appid': '__UNI__CC3DA09',
|
'appid': '__UNI__CC3DA09',
|
||||||
'description': '',
|
'description': '',
|
||||||
'versionName': '1.0.0',
|
'versionName': '1.0.0',
|
||||||
|
|||||||
1658
native-js使用教程.txt
Normal file
1658
native-js使用教程.txt
Normal file
File diff suppressed because it is too large
Load Diff
@@ -9,7 +9,7 @@ export default defineUniPages({
|
|||||||
backgroundTextStyle: '@bgTxtStyle',
|
backgroundTextStyle: '@bgTxtStyle',
|
||||||
navigationBarBackgroundColor: '#ffffff',
|
navigationBarBackgroundColor: '#ffffff',
|
||||||
navigationBarTextStyle: '@navTxtStyle',
|
navigationBarTextStyle: '@navTxtStyle',
|
||||||
navigationBarTitleText: '全能查',
|
navigationBarTitleText: '',
|
||||||
navigationStyle: 'default',
|
navigationStyle: 'default',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
// import { WxH5Login } from '@/utils/login.js'
|
|
||||||
|
|
||||||
onLaunch(() => {
|
onLaunch(() => {
|
||||||
console.log('onlaunch')
|
// 调用 Android 的 Intent 打开网页
|
||||||
// WxH5Login()
|
|
||||||
})
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -42,3 +42,11 @@ html.dark {
|
|||||||
display: none; /* Chrome, Safari, and Edge */
|
display: none; /* Chrome, Safari, and Edge */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.disclaimer {
|
||||||
|
padding: 10px;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #999;
|
||||||
|
text-align: center;
|
||||||
|
border-top: 1px solid #e0e0e0;
|
||||||
|
padding-bottom: 40px;
|
||||||
|
}
|
||||||
|
|||||||
4
src/components.d.ts
vendored
4
src/components.d.ts
vendored
@@ -15,8 +15,12 @@ declare module 'vue' {
|
|||||||
LExpandCollapse: typeof import('./components/LExpandCollapse.vue')['default']
|
LExpandCollapse: typeof import('./components/LExpandCollapse.vue')['default']
|
||||||
LTable: typeof import('./components/LTable.vue')['default']
|
LTable: typeof import('./components/LTable.vue')['default']
|
||||||
LTitle: typeof import('./components/LTitle.vue')['default']
|
LTitle: typeof import('./components/LTitle.vue')['default']
|
||||||
|
WdButton: typeof import('wot-design-uni/components/wd-button/wd-button.vue')['default']
|
||||||
|
WdCell: typeof import('wot-design-uni/components/wd-cell/wd-cell.vue')['default']
|
||||||
WdCheckbox: typeof import('wot-design-uni/components/wd-checkbox/wd-checkbox.vue')['default']
|
WdCheckbox: typeof import('wot-design-uni/components/wd-checkbox/wd-checkbox.vue')['default']
|
||||||
WdIcon: typeof import('wot-design-uni/components/wd-icon/wd-icon.vue')['default']
|
WdIcon: typeof import('wot-design-uni/components/wd-icon/wd-icon.vue')['default']
|
||||||
|
WdImg: typeof import('wot-design-uni/components/wd-img/wd-img.vue')['default']
|
||||||
|
WdInput: typeof import('wot-design-uni/components/wd-input/wd-input.vue')['default']
|
||||||
WdLoadmore: typeof import('wot-design-uni/components/wd-loadmore/wd-loadmore.vue')['default']
|
WdLoadmore: typeof import('wot-design-uni/components/wd-loadmore/wd-loadmore.vue')['default']
|
||||||
WdNavbar: typeof import('wot-design-uni/components/wd-navbar/wd-navbar.vue')['default']
|
WdNavbar: typeof import('wot-design-uni/components/wd-navbar/wd-navbar.vue')['default']
|
||||||
WdNoticeBar: typeof import('wot-design-uni/components/wd-notice-bar/wd-notice-bar.vue')['default']
|
WdNoticeBar: typeof import('wot-design-uni/components/wd-notice-bar/wd-notice-bar.vue')['default']
|
||||||
|
|||||||
@@ -16,9 +16,11 @@ onMounted(() => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
const token = uni.getStorageSync('token') // 从本地缓存中获取 token
|
const token = uni.getStorageSync('token') // 从本地缓存中获取 token
|
||||||
|
// const baseUrl = `${window.location.origin}/app`
|
||||||
|
const baseUrl = 'https://www.quannengcha.com/app'
|
||||||
|
// const baseUrl = 'http://localhost:5678'
|
||||||
const webviewUrl = computed(() => {
|
const webviewUrl = computed(() => {
|
||||||
const url = new URL(props.webviewSrc)
|
const url = new URL(baseUrl + props.webviewSrc)
|
||||||
if (token) {
|
if (token) {
|
||||||
url.searchParams.set('token', token) // 在 URL 中添加 token 参数
|
url.searchParams.set('token', token) // 在 URL 中添加 token 参数
|
||||||
}
|
}
|
||||||
@@ -26,30 +28,46 @@ const webviewUrl = computed(() => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const isLoading = ref(true) // 控制加载动画显示状态
|
const isLoading = ref(true) // 控制加载动画显示状态
|
||||||
|
const processedMessages = new Set() // 存储已处理的消息ID
|
||||||
|
|
||||||
// 页面加载完成时,隐藏加载动画
|
// 页面加载完成时,隐藏加载动画
|
||||||
function handleLoaded(e) {
|
function handleLoaded() {
|
||||||
console.log('webview loaded', e)
|
|
||||||
isLoading.value = false
|
isLoading.value = false
|
||||||
}
|
}
|
||||||
// 监听消息事件,隐藏加载动画
|
// 监听消息事件,隐藏加载动画
|
||||||
window.addEventListener('message', (event) => {
|
window.addEventListener('message', (event) => {
|
||||||
const data = event.data
|
const message = event.data
|
||||||
if (data.hello || data.wappalyzer)
|
const action = message?.action
|
||||||
|
const messageId = message?.messageId
|
||||||
|
const data = message?.data
|
||||||
|
if (message.hello || message.wappalyzer)
|
||||||
return
|
return
|
||||||
console.log('message', data)
|
if (!action)
|
||||||
|
return
|
||||||
if (data?.loaded) {
|
if (processedMessages.has(messageId)) {
|
||||||
console.log('loaded')
|
return
|
||||||
|
}
|
||||||
|
processedMessages.add(messageId)
|
||||||
|
if (action === 'loaded') {
|
||||||
|
if (data)
|
||||||
isLoading.value = false
|
isLoading.value = false
|
||||||
}
|
}
|
||||||
else if (data?.type === 'payment') {
|
else if (action === 'navigateTo') {
|
||||||
|
uni.navigateTo(data)
|
||||||
|
}
|
||||||
|
else if (action === 'redirectTo') {
|
||||||
|
uni.redirectTo(data)
|
||||||
|
}
|
||||||
|
else if (action === 'navigateBack') {
|
||||||
|
uni.navigateBack(data)
|
||||||
|
}
|
||||||
|
else if (action === 'payment') {
|
||||||
payment(data)
|
payment(data)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
function payment(data) {
|
function payment(data) {
|
||||||
window.location.href = data.data
|
window.location.href = data
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,11 @@ onMounted(() => {
|
|||||||
const pageName = currentPage.split('/').pop()
|
const pageName = currentPage.split('/').pop()
|
||||||
tabbar.value = pageName
|
tabbar.value = pageName
|
||||||
})
|
})
|
||||||
|
function toComplaint() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/complaint',
|
||||||
|
})
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -62,7 +67,7 @@ export default {
|
|||||||
<wd-tabbar-item v-for="(item, index) in menu" :key="index" :name="item.name" :title="item.title" :icon="item.icon" />
|
<wd-tabbar-item v-for="(item, index) in menu" :key="index" :name="item.name" :title="item.title" :icon="item.icon" />
|
||||||
</wd-tabbar>
|
</wd-tabbar>
|
||||||
</view>
|
</view>
|
||||||
<view class="fixed bottom-24 right-4 z-1000 flex items-center rounded-3xl from-red-500 to-red-400 bg-gradient-to-b px-2 py-1 text-center text-white shadow-2xl">
|
<view class="fixed bottom-24 right-4 z-1000 flex items-center rounded-3xl from-red-500 to-red-400 bg-gradient-to-b px-2 py-1 text-center text-white shadow-2xl" @click="toComplaint">
|
||||||
<wd-icon name="warning" class="mr-1" size="22px" />
|
<wd-icon name="warning" class="mr-1" size="22px" />
|
||||||
<view>投诉</view>
|
<view>投诉</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
<script setup>
|
|
||||||
function handleClickLeft() {
|
|
||||||
uni.navigateBack()
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<wd-navbar
|
|
||||||
title="标题" left-text="返回" placeholder left-arrow safe-area-inset-top fixed
|
|
||||||
@click-left="handleClickLeft"
|
|
||||||
/>
|
|
||||||
<view class="box-border min-h-screen">
|
|
||||||
<!-- <view class="box-border min-h-full from-lightblue-100 to-white bg-gradient-to-b"> -->
|
|
||||||
<slot />
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
|
|
||||||
</style>
|
|
||||||
@@ -1,4 +1,36 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
|
// 需要进行 token 判断的页面路径
|
||||||
|
const protectedPages = [
|
||||||
|
'pages/example',
|
||||||
|
'pages/history_query',
|
||||||
|
'pages/inquire',
|
||||||
|
'pages/report',
|
||||||
|
'pages/result',
|
||||||
|
]
|
||||||
|
|
||||||
|
// 路由守卫的逻辑
|
||||||
|
function checkToken() {
|
||||||
|
// 获取当前页面的路径
|
||||||
|
const pages = getCurrentPages()
|
||||||
|
const currentPage = pages[pages.length - 1].route
|
||||||
|
// 判断当前页面是否需要进行 token 检查
|
||||||
|
if (protectedPages.includes(currentPage)) {
|
||||||
|
// 获取缓存中的 token
|
||||||
|
const token = uni.getStorageSync('token')
|
||||||
|
|
||||||
|
// 如果没有 token 且当前页面不是登录页面,跳转到登录页面
|
||||||
|
if (!token && currentPage !== 'pages/login') {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/login',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 页面加载完成时检查 token
|
||||||
|
onLoad(() => {
|
||||||
|
checkToken()
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -6,5 +38,5 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
/* 在此添加您的样式 */
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "qnc-app",
|
"name": "全能查-司法涉诉_婚恋信息_企业查询平台-学宇思科技",
|
||||||
"appid": "__UNI__CC3DA09",
|
"appid": "__UNI__CC3DA09",
|
||||||
"description": "",
|
"description": "",
|
||||||
"versionName": "1.0.0",
|
"versionName": "1.0.0",
|
||||||
@@ -63,6 +63,11 @@
|
|||||||
"enable": false
|
"enable": false
|
||||||
},
|
},
|
||||||
"vueVersion": "3",
|
"vueVersion": "3",
|
||||||
|
"plugins": {
|
||||||
|
"urlLauncher": {
|
||||||
|
"path": "plugins/urlLauncher"
|
||||||
|
}
|
||||||
|
},
|
||||||
"h5": {
|
"h5": {
|
||||||
"darkmode": false,
|
"darkmode": false,
|
||||||
"themeLocation": "theme.json"
|
"themeLocation": "theme.json"
|
||||||
|
|||||||
@@ -16,9 +16,17 @@
|
|||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/complaint",
|
||||||
|
"type": "page",
|
||||||
|
"layout": "page",
|
||||||
|
"title": "投诉服务"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/example",
|
"path": "pages/example",
|
||||||
"type": "page"
|
"type": "page",
|
||||||
|
"layout": "page",
|
||||||
|
"title": "示例报告"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/history_query",
|
"path": "pages/history_query",
|
||||||
@@ -28,23 +36,33 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/inquire",
|
"path": "pages/inquire",
|
||||||
"type": "page"
|
"type": "page",
|
||||||
|
"layout": "page",
|
||||||
|
"title": "报告查询"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/list_lawsuit",
|
"path": "pages/list_lawsuit",
|
||||||
"type": "page"
|
"type": "page",
|
||||||
|
"layout": "page",
|
||||||
|
"title": "司法涉诉"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/list_marriage",
|
"path": "pages/list_marriage",
|
||||||
"type": "page"
|
"type": "page",
|
||||||
|
"layout": "page",
|
||||||
|
"title": "婚姻评估"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/list_risk",
|
"path": "pages/list_risk",
|
||||||
"type": "page"
|
"type": "page",
|
||||||
|
"layout": "page",
|
||||||
|
"title": "风险评估"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/list_verify",
|
"path": "pages/list_verify",
|
||||||
"type": "page"
|
"type": "page",
|
||||||
|
"layout": "page",
|
||||||
|
"title": "验证工具"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/login",
|
"path": "pages/login",
|
||||||
@@ -65,20 +83,27 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/privacyPolicy",
|
"path": "pages/privacyPolicy",
|
||||||
"type": "page"
|
"type": "page",
|
||||||
|
"layout": "page",
|
||||||
|
"title": "隐私政策"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/report",
|
"path": "pages/report",
|
||||||
"type": "page"
|
"type": "page",
|
||||||
|
"layout": "page",
|
||||||
|
"title": "报告结果"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/result",
|
"path": "pages/service",
|
||||||
"type": "page",
|
"type": "page",
|
||||||
"layout": "page"
|
"layout": "page",
|
||||||
|
"title": "客户服务"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/userAgreement",
|
"path": "pages/userAgreement",
|
||||||
"type": "page"
|
"type": "page",
|
||||||
|
"layout": "page",
|
||||||
|
"title": "用户协议"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
@@ -88,7 +113,7 @@
|
|||||||
"backgroundTextStyle": "@bgTxtStyle",
|
"backgroundTextStyle": "@bgTxtStyle",
|
||||||
"navigationBarBackgroundColor": "#ffffff",
|
"navigationBarBackgroundColor": "#ffffff",
|
||||||
"navigationBarTextStyle": "@navTxtStyle",
|
"navigationBarTextStyle": "@navTxtStyle",
|
||||||
"navigationBarTitleText": "全能查",
|
"navigationBarTitleText": "",
|
||||||
"navigationStyle": "default"
|
"navigationStyle": "default"
|
||||||
},
|
},
|
||||||
"subPackages": []
|
"subPackages": []
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { onMounted, ref } from 'vue'
|
|||||||
|
|
||||||
const userMessage = ref('')
|
const userMessage = ref('')
|
||||||
const messages = ref([
|
const messages = ref([
|
||||||
{ sender: 'ai', text: 'Welcome! How can I assist you today?' },
|
{ sender: 'ai', text: '欢迎!请问有什么可以帮助您的吗?' },
|
||||||
])
|
])
|
||||||
|
|
||||||
function sendMessage() {
|
function sendMessage() {
|
||||||
@@ -12,19 +12,30 @@ function sendMessage() {
|
|||||||
|
|
||||||
messages.value.push({ sender: 'user', text: userMessage.value })
|
messages.value.push({ sender: 'user', text: userMessage.value })
|
||||||
|
|
||||||
// Simulate AI response (for example purposes)
|
// AI 统一回复(中文套话)
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
messages.value.push({
|
messages.value.push({
|
||||||
sender: 'ai',
|
sender: 'ai',
|
||||||
text: `I'm here to assist with your questions: "${userMessage.value}"`,
|
text: '感谢您的提问!我们会尽力为您提供帮助。',
|
||||||
})
|
})
|
||||||
}, 1000)
|
}, 1000)
|
||||||
|
|
||||||
userMessage.value = ''
|
userMessage.value = ''
|
||||||
}
|
}
|
||||||
|
const safeAreaTop = ref(44)
|
||||||
|
onShow(() => {
|
||||||
|
uni.getSystemInfo({
|
||||||
|
success: (res) => {
|
||||||
|
if (res.safeArea && res.safeArea.top) {
|
||||||
|
safeAreaTop.value = res.safeArea.top // 设置安全区顶部距离
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<view class="box-border min-h-screen from-blue-100 to-white bg-gradient-to-b" style="paddingTop:44px">
|
||||||
<view class="chat-page mx-4 flex flex-col rounded-xl shadow-lg">
|
<view class="chat-page mx-4 flex flex-col rounded-xl shadow-lg">
|
||||||
<view class="chat-window flex-1 overflow-auto border p-4">
|
<view class="chat-window flex-1 overflow-auto border p-4">
|
||||||
<view v-for="(message, index) in messages" :key="index" class="mb-2">
|
<view v-for="(message, index) in messages" :key="index" class="mb-2">
|
||||||
@@ -32,23 +43,32 @@ function sendMessage() {
|
|||||||
v-if="message.sender === 'ai'"
|
v-if="message.sender === 'ai'"
|
||||||
class="inline-block max-w-max rounded-xl bg-white p-2 text-left text-green-600 font-medium shadow-md"
|
class="inline-block max-w-max rounded-xl bg-white p-2 text-left text-green-600 font-medium shadow-md"
|
||||||
>
|
>
|
||||||
<span>AI:</span> {{ message.text }}
|
{{ message.text }}
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
v-else
|
v-else
|
||||||
class="ml-auto inline-block max-w-max rounded-xl from-purple-400 via-pink-500 to-red-500 bg-gradient-to-r p-2 text-right text-white font-medium shadow-md"
|
class="ml-auto inline-block max-w-max rounded-xl from-sky-300 via-sky-300 to-sky-300 bg-gradient-to-r p-2 text-right text-white font-medium shadow-md"
|
||||||
>
|
>
|
||||||
<span>User:</span> {{ message.text }}
|
{{ message.text }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="input-area mx-2 flex items-center gap-2 p-4">
|
<view class="input-area mx-2 flex items-center gap-2 p-4">
|
||||||
<wd-input v-model="userMessage" placeholder="Type your message..." class="flex-1" size="large" />
|
<wd-input v-model="userMessage" placeholder="请输入您的问题..." class="flex-1" size="large" />
|
||||||
<wd-button custom-class="shadow" type="primary" @click="sendMessage">
|
<wd-button custom-class="shadow" type="primary" @click="sendMessage">
|
||||||
发送
|
发送
|
||||||
</wd-button>
|
</wd-button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="disclaimer">
|
||||||
|
<a href="https://beian.miit.gov.cn">
|
||||||
|
备案号:琼ICP备2024038584号-2
|
||||||
|
</a>
|
||||||
|
<div>
|
||||||
|
海南省学宇思网络科技有限公司版权所有
|
||||||
|
</div>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@@ -62,16 +82,6 @@ function sendMessage() {
|
|||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// .chat-window {
|
|
||||||
// flex-grow: 1;
|
|
||||||
// overflow-y: auto;
|
|
||||||
// overflow-x: hidden;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// .input-area {
|
|
||||||
// flex-shrink: 0;
|
|
||||||
// }
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<route lang="json">
|
<route lang="json">
|
||||||
|
|||||||
17
src/pages/complaint.vue
Normal file
17
src/pages/complaint.vue
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<script setup>
|
||||||
|
import WebviewPage from '@/components/WebviewPage.vue'
|
||||||
|
|
||||||
|
const webviewSrc = '/complaint' // 可以根据不同页面设置不同的值
|
||||||
|
const navigationBarTitleText = '投诉服务' // 同样可以根据需要修改
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<WebviewPage :webview-src="webviewSrc" :navigation-bar-title-text="navigationBarTitleText" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<route lang="json">
|
||||||
|
{
|
||||||
|
"layout": "page",
|
||||||
|
"title": "投诉服务"
|
||||||
|
}
|
||||||
|
</route>
|
||||||
@@ -1,10 +1,29 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import WebviewPage from '@/components/WebviewPage.vue'
|
import WebviewPage from '@/components/WebviewPage.vue'
|
||||||
|
|
||||||
const webviewSrc = 'http://192.168.1.124:5678/example' // 可以根据不同页面设置不同的值
|
const webviewSrc = ref('') // 可以根据不同页面设置不同的值
|
||||||
|
|
||||||
|
onLoad((option) => {
|
||||||
|
let feature = ''
|
||||||
|
if (option.feature) {
|
||||||
|
feature = option.feature
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
webviewSrc.value = `/example?feature=${feature}`
|
||||||
|
})
|
||||||
|
|
||||||
const navigationBarTitleText = '示例报告'
|
const navigationBarTitleText = '示例报告'
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<WebviewPage :webview-src="webviewSrc" :navigation-bar-title-text="navigationBarTitleText" />
|
<WebviewPage :webview-src="webviewSrc" :navigation-bar-title-text="navigationBarTitleText" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<route lang="json">
|
||||||
|
{
|
||||||
|
"layout": "page",
|
||||||
|
"title": "示例报告"
|
||||||
|
}
|
||||||
|
</route>
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
|
import urlLauncher from '@/plugins/urlLauncher/index.js'
|
||||||
|
|
||||||
function toInquire(name) {
|
function toInquire(name) {
|
||||||
if (name === 'marriage') {
|
if (name === 'marriage') {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/inquire?p=toc_marriage`,
|
url: `/pages/inquire?p=toc_Marriage`,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -14,17 +16,222 @@ function toInquire(name) {
|
|||||||
|
|
||||||
// 页面加载时生成 30 条通知数据
|
// 页面加载时生成 30 条通知数据
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|
||||||
})
|
})
|
||||||
function toHistory() {
|
function toHistory() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/history_query',
|
url: '/pages/history_query',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function launch() {
|
||||||
|
uni.getSystemInfo({
|
||||||
|
success(res) {
|
||||||
|
if (res.uniPlatform === 'app') {
|
||||||
|
if (res.osName === 'android') {
|
||||||
|
const CustomTabsIntent = plus.android.importClass('androidx.browser.customtabs.CustomTabsIntent')
|
||||||
|
const Uri = plus.android.importClass('android.net.Uri')
|
||||||
|
const activity = plus.android.runtimeMainActivity()
|
||||||
|
const builder = new CustomTabsIntent.Builder()
|
||||||
|
const customTabsIntent = builder.build()
|
||||||
|
const uri = Uri.parse('https://www.quannengcha.com/inquire/toc_Marriage')
|
||||||
|
customTabsIntent.launchUrl(activity, uri)
|
||||||
|
}
|
||||||
|
else if (res.osName === 'ios') {
|
||||||
|
// turnonLight(true)
|
||||||
|
testUIAlertController()
|
||||||
|
// launchSafariViewController('https://www.quannengcha.com/inquire/toc_Marriage').then((res) => {
|
||||||
|
// console.log('成功打开')
|
||||||
|
// })
|
||||||
|
// const SFSafariViewController = plus.ios.importClass('SFSafariViewController')
|
||||||
|
// const NSURL = plus.ios.import('NSURL')
|
||||||
|
// const nsurl = NSURL.URLWithString('https://www.quannengcha.com/inquire/toc_Marriage')
|
||||||
|
// const sfsviewController = new SFSafariViewController(nsurl)
|
||||||
|
// const currentViewController = plus.ios.currentWebview()
|
||||||
|
// // currentViewController().presentViewController(sfsviewController)
|
||||||
|
// console.log('sfsviewController', sfsviewController)
|
||||||
|
// console.log('currentViewController', currentViewController)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 在iOS平台通过SFSafariViewController打开指定的URL
|
||||||
|
* @param {string} url - 要打开的URL
|
||||||
|
* @returns {Promise} - 返回一个 Promise,表示操作的成功或失败
|
||||||
|
*/
|
||||||
|
function launchSafariViewController(url) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
// 仅在iOS平台执行
|
||||||
|
if (typeof plus === 'undefined' || !plus.os || plus.os.name.toLowerCase() !== 'ios') {
|
||||||
|
reject({ success: false, message: '仅支持iOS平台' })
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!url) {
|
||||||
|
reject({ success: false, message: 'URL缺失' })
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
// 导入必要的iOS类
|
||||||
|
const SFSafariViewController = plus.ios.importClass('SFSafariViewController')
|
||||||
|
const NSURL = plus.ios.importClass('NSURL')
|
||||||
|
const UIApplication = plus.ios.importClass('UIApplication')
|
||||||
|
|
||||||
|
// 创建NSURL实例
|
||||||
|
const nsUrl = NSURL.URLWithString(url)
|
||||||
|
if (!nsUrl) {
|
||||||
|
reject({ success: false, message: '无效的URL' })
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 创建SFSafariViewController实例并初始化
|
||||||
|
// 使用 newObject 并传递初始化方法和参数
|
||||||
|
const safariVC = plus.ios.newObject('SFSafariViewController', 'initWithURL:', nsUrl)
|
||||||
|
console.log('SFSafariViewController已初始化')
|
||||||
|
|
||||||
|
// 获取UIApplication实例
|
||||||
|
const app = UIApplication.sharedApplication()
|
||||||
|
const delegate = plus.ios.invoke(app, 'delegate')
|
||||||
|
|
||||||
|
// 尝试通过代理获取窗口
|
||||||
|
let window = null
|
||||||
|
if (delegate && plus.ios.invoke(delegate, 'window')) {
|
||||||
|
window = plus.ios.invoke(delegate, 'window')
|
||||||
|
console.log('通过代理获取窗口:', window)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果无法通过代理获取窗口,则尝试获取keyWindow
|
||||||
|
if (!window) {
|
||||||
|
window = plus.ios.invoke(app, 'keyWindow')
|
||||||
|
console.log('通过keyWindow获取窗口:', window)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果仍然无法获取窗口,则遍历所有窗口并选择第一个可见的窗口
|
||||||
|
if (!window) {
|
||||||
|
const windows = plus.ios.invoke(app, 'windows')
|
||||||
|
const count = plus.ios.invoke(windows, 'count')
|
||||||
|
for (let i = 0; i < count; i++) {
|
||||||
|
const tempWindow = plus.ios.invoke(windows, 'objectAtIndex:', i)
|
||||||
|
if (plus.ios.invoke(tempWindow, 'isKeyWindow')) {
|
||||||
|
window = tempWindow
|
||||||
|
console.log('找到可见的窗口:', window)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取根视图控制器
|
||||||
|
let rootVC = null
|
||||||
|
if (window) {
|
||||||
|
// 使用 plus.ios.invoke 来访问属性
|
||||||
|
rootVC = plus.ios.invoke(window, 'rootViewController')
|
||||||
|
console.log('rootViewController:', rootVC)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!rootVC) {
|
||||||
|
reject({ success: false, message: '无法获取根视图控制器' })
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 正确调用带有多个参数的选择器,确保选择器字符串正确
|
||||||
|
plus.ios.invoke(rootVC, 'presentViewController:animated:completion:', [safariVC, true, null])
|
||||||
|
console.log('SFSafariViewController已展示')
|
||||||
|
resolve({ success: true })
|
||||||
|
|
||||||
|
// 延迟释放对象,确保视图控制器被正确展示
|
||||||
|
setTimeout(() => {
|
||||||
|
plus.ios.deleteObject(nsUrl)
|
||||||
|
plus.ios.deleteObject(app)
|
||||||
|
plus.ios.deleteObject(delegate)
|
||||||
|
plus.ios.deleteObject(window)
|
||||||
|
plus.ios.deleteObject(rootVC)
|
||||||
|
// 不立即删除 safariVC,以避免被提前销毁
|
||||||
|
}, 1000)
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
console.log('错误:', e.message)
|
||||||
|
reject({ success: false, message: e.message })
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
function turnonLight(isOn) {
|
||||||
|
if (plus.os.name == 'iOS') {
|
||||||
|
const avcaptClass = plus.ios.importClass('AVCaptureDevice')
|
||||||
|
if (avcaptClass) {
|
||||||
|
const device = avcaptClass.defaultDeviceWithMediaType('vide')
|
||||||
|
plus.ios.invoke(device, 'lockForConfiguration:', null)
|
||||||
|
if (isOn) {
|
||||||
|
plus.ios.invoke(device, 'setTorchMode:', 1)
|
||||||
|
plus.ios.invoke(device, 'setFlashMode:', 1)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
plus.ios.invoke(device, 'setTorchMode:', 0)
|
||||||
|
plus.ios.invoke(device, 'setFlashMode:', 0)
|
||||||
|
}
|
||||||
|
plus.ios.invoke(device, 'unlockForConfiguration')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* 在iOS平台通过UIAlertController显示系统提示框
|
||||||
|
*/
|
||||||
|
function testUIAlertController() {
|
||||||
|
if (plus.os.name.toLowerCase() !== 'ios') {
|
||||||
|
console.log('仅支持iOS平台')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
const UIAlertController = plus.ios.importClass('UIAlertController')
|
||||||
|
const UIAlertAction = plus.ios.importClass('UIAlertAction')
|
||||||
|
const UIApplication = plus.ios.importClass('UIApplication')
|
||||||
|
|
||||||
|
// 创建UIAlertController实例
|
||||||
|
const alert = UIAlertController.alertControllerWithTitleMessagePreferredStyle(
|
||||||
|
'测试标题',
|
||||||
|
'这是一个测试消息',
|
||||||
|
1, // UIAlertControllerStyleAlert
|
||||||
|
)
|
||||||
|
|
||||||
|
// 创建UIAlertAction实例
|
||||||
|
const okAction = UIAlertAction.actionWithTitleStyleHandler(
|
||||||
|
'确定',
|
||||||
|
0, // UIAlertActionStyleDefault
|
||||||
|
null,
|
||||||
|
)
|
||||||
|
|
||||||
|
// 添加动作到alert
|
||||||
|
alert.addAction(okAction)
|
||||||
|
|
||||||
|
// 获取UIApplication实例
|
||||||
|
const app = UIApplication.sharedApplication()
|
||||||
|
const window = plus.ios.invoke(app, 'keyWindow')
|
||||||
|
const rootVC = plus.ios.invoke(window, 'rootViewController')
|
||||||
|
|
||||||
|
// 展示alert
|
||||||
|
plus.ios.invoke(rootVC, 'presentViewController:animated:completion:', [alert, true, null])
|
||||||
|
|
||||||
|
// 释放对象
|
||||||
|
plus.ios.deleteObject(alert)
|
||||||
|
plus.ios.deleteObject(okAction)
|
||||||
|
plus.ios.deleteObject(app)
|
||||||
|
plus.ios.deleteObject(window)
|
||||||
|
plus.ios.deleteObject(rootVC)
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
console.log('错误:', e.message)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 调用该函数,打开一个 URL
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view class="relative h-[165px] p-4">
|
<view class="relative h-[165px] p-4">
|
||||||
<image class="h-full w-full overflow-hidden rounded-xl" src="/static/image/banner.png" />
|
<image class="h-full w-full overflow-hidden rounded-xl" src="/static/image/banner.png" @click="launch" />
|
||||||
</view>
|
</view>
|
||||||
<view class="relative p-4 pb-4 pt-2">
|
<view class="relative p-4 pb-4 pt-2">
|
||||||
<view class="grid grid-cols-2 gap-3">
|
<view class="grid grid-cols-2 gap-3">
|
||||||
@@ -114,6 +321,14 @@ function toHistory() {
|
|||||||
<image class="shadow-3xl w-full overflow-hidden rounded-xl" src="/static/image/liu.png" mode="widthFix" />
|
<image class="shadow-3xl w-full overflow-hidden rounded-xl" src="/static/image/liu.png" mode="widthFix" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="disclaimer">
|
||||||
|
<a href="https://beian.miit.gov.cn">
|
||||||
|
备案号:琼ICP备2024038584号-2
|
||||||
|
</a>
|
||||||
|
<div>
|
||||||
|
海南省学宇思网络科技有限公司版权所有
|
||||||
|
</div>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@@ -5,10 +5,9 @@ const product = ref('')
|
|||||||
const webviewSrc = ref('') // 可以根据不同页面设置不同的值\
|
const webviewSrc = ref('') // 可以根据不同页面设置不同的值\
|
||||||
|
|
||||||
onLoad((option) => {
|
onLoad((option) => {
|
||||||
console.log('option', option)
|
|
||||||
if (option.p) {
|
if (option.p) {
|
||||||
product.value = option.p
|
product.value = option.p
|
||||||
webviewSrc.value = `http://192.168.1.124:5678/inquire/${product.value}`
|
webviewSrc.value = `/inquire/${product.value}`
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const navigationBarTitleText = '报告查询' // 同样可以根据需要修改
|
const navigationBarTitleText = '报告查询' // 同样可以根据需要修改
|
||||||
@@ -17,3 +16,10 @@ const navigationBarTitleText = '报告查询' // 同样可以根据需要修改
|
|||||||
<template>
|
<template>
|
||||||
<WebviewPage :webview-src="webviewSrc" :navigation-bar-title-text="navigationBarTitleText" />
|
<WebviewPage :webview-src="webviewSrc" :navigation-bar-title-text="navigationBarTitleText" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<route lang="json">
|
||||||
|
{
|
||||||
|
"layout": "page",
|
||||||
|
"title": "报告查询"
|
||||||
|
}
|
||||||
|
</route>
|
||||||
|
|||||||
@@ -1,10 +1,17 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import WebviewPage from '@/components/WebviewPage.vue'
|
import WebviewPage from '@/components/WebviewPage.vue'
|
||||||
|
|
||||||
const webviewSrc = 'http://192.168.1.124:5678/listLawsuit' // 可以根据不同页面设置不同的值
|
const webviewSrc = '/listLawsuit' // 可以根据不同页面设置不同的值
|
||||||
const navigationBarTitleText = '司法涉诉' // 同样可以根据需要修改
|
const navigationBarTitleText = '司法涉诉' // 同样可以根据需要修改
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<WebviewPage :webview-src="webviewSrc" :navigation-bar-title-text="navigationBarTitleText" />
|
<WebviewPage :webview-src="webviewSrc" :navigation-bar-title-text="navigationBarTitleText" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<route lang="json">
|
||||||
|
{
|
||||||
|
"layout": "page",
|
||||||
|
"title": "司法涉诉"
|
||||||
|
}
|
||||||
|
</route>
|
||||||
|
|||||||
@@ -1,10 +1,17 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import WebviewPage from '@/components/WebviewPage.vue'
|
import WebviewPage from '@/components/WebviewPage.vue'
|
||||||
|
|
||||||
const webviewSrc = 'http://192.168.1.124:5678/listMarriage' // 可以根据不同页面设置不同的值
|
const webviewSrc = '/listMarriage' // 可以根据不同页面设置不同的值
|
||||||
const navigationBarTitleText = '婚姻评估' // 同样可以根据需要修改
|
const navigationBarTitleText = '婚姻评估' // 同样可以根据需要修改
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<WebviewPage :webview-src="webviewSrc" :navigation-bar-title-text="navigationBarTitleText" />
|
<WebviewPage :webview-src="webviewSrc" :navigation-bar-title-text="navigationBarTitleText" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<route lang="json">
|
||||||
|
{
|
||||||
|
"layout": "page",
|
||||||
|
"title": "婚姻评估"
|
||||||
|
}
|
||||||
|
</route>
|
||||||
|
|||||||
@@ -1,10 +1,17 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import WebviewPage from '@/components/WebviewPage.vue'
|
import WebviewPage from '@/components/WebviewPage.vue'
|
||||||
|
|
||||||
const webviewSrc = 'http://192.168.1.124:5678/listRisk' // 可以根据不同页面设置不同的值
|
const webviewSrc = '/listRisk' // 可以根据不同页面设置不同的值
|
||||||
const navigationBarTitleText = '风险评估' // 同样可以根据需要修改
|
const navigationBarTitleText = '风险评估' // 同样可以根据需要修改
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<WebviewPage :webview-src="webviewSrc" :navigation-bar-title-text="navigationBarTitleText" />
|
<WebviewPage :webview-src="webviewSrc" :navigation-bar-title-text="navigationBarTitleText" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<route lang="json">
|
||||||
|
{
|
||||||
|
"layout": "page",
|
||||||
|
"title": "风险评估"
|
||||||
|
}
|
||||||
|
</route>
|
||||||
|
|||||||
@@ -1,10 +1,17 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import WebviewPage from '@/components/WebviewPage.vue'
|
import WebviewPage from '@/components/WebviewPage.vue'
|
||||||
|
|
||||||
const webviewSrc = 'http://192.168.1.124:5678/listVerify' // 可以根据不同页面设置不同的值
|
const webviewSrc = '/listVerify' // 可以根据不同页面设置不同的值
|
||||||
const navigationBarTitleText = '验证工具' // 同样可以根据需要修改
|
const navigationBarTitleText = '验证工具' // 同样可以根据需要修改
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<WebviewPage :webview-src="webviewSrc" :navigation-bar-title-text="navigationBarTitleText" />
|
<WebviewPage :webview-src="webviewSrc" :navigation-bar-title-text="navigationBarTitleText" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<route lang="json">
|
||||||
|
{
|
||||||
|
"layout": "page",
|
||||||
|
"title": "验证工具"
|
||||||
|
}
|
||||||
|
</route>
|
||||||
|
|||||||
@@ -5,34 +5,37 @@ const userName = ref('点击登录')
|
|||||||
const userAvatar = ref('https://img0.baidu.com/it/u=1240274933,2284862568&fm=253&fmt=auto&app=138&f=PNG?w=180&h=180')
|
const userAvatar = ref('https://img0.baidu.com/it/u=1240274933,2284862568&fm=253&fmt=auto&app=138&f=PNG?w=180&h=180')
|
||||||
const isLoggedIn = ref(false)
|
const isLoggedIn = ref(false)
|
||||||
const features = ref([
|
const features = ref([
|
||||||
{ title: '我的订单', icon: 'phone', action: () => handleFeatureClick('Account Settings') },
|
{ title: '我的报告', icon: 'list', action: () => toHistory() },
|
||||||
{ title: '我的报告', icon: 'phone', action: () => handleFeatureClick('My Orders') },
|
{ title: '联系客服', icon: 'service', action: () => toService() },
|
||||||
{ title: '联系客服', icon: 'phone', action: () => handleFeatureClick('Help & Support') },
|
{ title: '用户协议', icon: 'file', action: () => toUserAgreement() },
|
||||||
{ title: '用户协议', icon: 'phone', action: () => handleFeatureClick('Privacy Policy') },
|
{ title: '退出登录', icon: 'logout', action: () => handleLogout() },
|
||||||
{ title: '退出登录', icon: 'phone', action: () => handleLogout() },
|
|
||||||
])
|
])
|
||||||
|
function toHistory() {
|
||||||
function handleFeatureClick(feature) {
|
uni.navigateTo({
|
||||||
if (!isLoggedIn.value) {
|
url: '/pages/history_query',
|
||||||
redirectToLogin()
|
})
|
||||||
return
|
}
|
||||||
}
|
function toUserAgreement() {
|
||||||
console.log(`Clicked on: ${feature}`)
|
uni.navigateTo({
|
||||||
|
url: '/pages/userAgreement',
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function redirectToLogin() {
|
function redirectToLogin() {
|
||||||
console.log('jabhdsasdbhj')
|
|
||||||
uni.reLaunch({ url: '/pages/login' }) // 使用 uni-app 路由跳转到登录页
|
uni.reLaunch({ url: '/pages/login' }) // 使用 uni-app 路由跳转到登录页
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleLogout() {
|
function handleLogout() {
|
||||||
console.log('asdasd')
|
|
||||||
uni.removeStorageSync('token')
|
uni.removeStorageSync('token')
|
||||||
isLoggedIn.value = false
|
isLoggedIn.value = false
|
||||||
userName.value = '点击登录'
|
userName.value = '点击登录'
|
||||||
userAvatar.value = 'https://img0.baidu.com/it/u=1240274933,2284862568&fm=253&fmt=auto&app=138&f=PNG?w=180&h=180'
|
userAvatar.value = 'https://img0.baidu.com/it/u=1240274933,2284862568&fm=253&fmt=auto&app=138&f=PNG?w=180&h=180'
|
||||||
}
|
}
|
||||||
|
function toService() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/service',
|
||||||
|
})
|
||||||
|
}
|
||||||
async function fetchUserInfo() {
|
async function fetchUserInfo() {
|
||||||
try {
|
try {
|
||||||
// 假设通过 API 获取用户信息
|
// 假设通过 API 获取用户信息
|
||||||
@@ -40,7 +43,7 @@ async function fetchUserInfo() {
|
|||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
console.log('res', res)
|
console.log('res', res)
|
||||||
const userinfo = res.data.userInfo
|
const userinfo = res.data.userInfo
|
||||||
userName.value = userinfo.userName || '182****1590'
|
userName.value = userinfo.nickName || ''
|
||||||
userAvatar.value = userinfo.userAvatar || 'https://img0.baidu.com/it/u=1240274933,2284862568&fm=253&fmt=auto&app=138&f=PNG?w=180&h=180'
|
userAvatar.value = userinfo.userAvatar || 'https://img0.baidu.com/it/u=1240274933,2284862568&fm=253&fmt=auto&app=138&f=PNG?w=180&h=180'
|
||||||
isLoggedIn.value = true
|
isLoggedIn.value = true
|
||||||
}
|
}
|
||||||
@@ -50,7 +53,7 @@ async function fetchUserInfo() {
|
|||||||
console.error('获取用户信息失败', error)
|
console.error('获取用户信息失败', error)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const safeAreaTop = ref(0)
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const token = uni.getStorageSync('token')
|
const token = uni.getStorageSync('token')
|
||||||
if (token) {
|
if (token) {
|
||||||
@@ -60,11 +63,19 @@ onMounted(() => {
|
|||||||
else {
|
else {
|
||||||
isLoggedIn.value = false
|
isLoggedIn.value = false
|
||||||
}
|
}
|
||||||
|
uni.getSystemInfo({
|
||||||
|
success: (res) => {
|
||||||
|
if (res.safeArea) {
|
||||||
|
safeAreaTop.value = res.safeArea.top
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view class="my-page min-h-screen flex flex-col p-4">
|
<view class="box-border min-h-screen from-blue-100 to-white bg-gradient-to-b" style="paddingTop:44px">
|
||||||
|
<view class="flex flex-col p-4">
|
||||||
<view
|
<view
|
||||||
class="profile-section mb-4 flex items-center gap-4 rounded-md bg-white p-4 shadow-md"
|
class="profile-section mb-4 flex items-center gap-4 rounded-md bg-white p-4 shadow-md"
|
||||||
@click="!isLoggedIn ? redirectToLogin() : null"
|
@click="!isLoggedIn ? redirectToLogin() : null"
|
||||||
@@ -86,11 +97,18 @@ onMounted(() => {
|
|||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="disclaimer">
|
||||||
|
<a href="https://beian.miit.gov.cn">
|
||||||
|
备案号:琼ICP备2024038584号-2
|
||||||
|
</a>
|
||||||
|
<div>
|
||||||
|
海南省学宇思网络科技有限公司版权所有
|
||||||
|
</div>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.my-page {}
|
|
||||||
|
|
||||||
.profile-section {
|
.profile-section {
|
||||||
@apply flex items-center gap-4 p-4 bg-white rounded-md shadow-md mb-4;
|
@apply flex items-center gap-4 p-4 bg-white rounded-md shadow-md mb-4;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,17 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import WebviewPage from '@/components/WebviewPage.vue'
|
import WebviewPage from '@/components/WebviewPage.vue'
|
||||||
|
|
||||||
const webviewSrc = 'http://192.168.1.124:5678/privacyPolicy' // 可以根据不同页面设置不同的值
|
const webviewSrc = '/privacyPolicy' // 可以根据不同页面设置不同的值
|
||||||
const navigationBarTitleText = '隐私政策' // 同样可以根据需要修改
|
const navigationBarTitleText = '隐私政策' // 同样可以根据需要修改
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<WebviewPage :webview-src="webviewSrc" :navigation-bar-title-text="navigationBarTitleText" />
|
<WebviewPage :webview-src="webviewSrc" :navigation-bar-title-text="navigationBarTitleText" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<route lang="json">
|
||||||
|
{
|
||||||
|
"layout": "page",
|
||||||
|
"title": "隐私政策"
|
||||||
|
}
|
||||||
|
</route>
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ onLoad((option) => {
|
|||||||
else {
|
else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
webviewSrc.value = `http://192.168.1.124:5678/report?${reportId}`
|
webviewSrc.value = `/report?${reportId}`
|
||||||
})
|
})
|
||||||
const navigationBarTitleText = '报告结果' // 同样可以根据需要修改
|
const navigationBarTitleText = '报告结果' // 同样可以根据需要修改
|
||||||
</script>
|
</script>
|
||||||
@@ -22,3 +22,10 @@ const navigationBarTitleText = '报告结果' // 同样可以根据需要修改
|
|||||||
<template>
|
<template>
|
||||||
<WebviewPage :webview-src="webviewSrc" :navigation-bar-title-text="navigationBarTitleText" />
|
<WebviewPage :webview-src="webviewSrc" :navigation-bar-title-text="navigationBarTitleText" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<route lang="json">
|
||||||
|
{
|
||||||
|
"layout": "page",
|
||||||
|
"title": "报告结果"
|
||||||
|
}
|
||||||
|
</route>
|
||||||
|
|||||||
@@ -1,186 +0,0 @@
|
|||||||
<script setup>
|
|
||||||
import CBad from '@/ui/CBad.vue'
|
|
||||||
import CBankLoanApplication from '@/ui/CBankLoanApplication.vue'
|
|
||||||
import CBankLoanBehavior from '@/ui/CBankLoanBehavior.vue'
|
|
||||||
import CLawsuit from '@/ui/CLawsuit.vue'
|
|
||||||
import CRelatedEnterprises from '@/ui/CRelatedEnterprises.vue'
|
|
||||||
import CSpecialList from '@/ui/CSpecialList.vue'
|
|
||||||
import CTabs from '@/ui/CTabs.vue'
|
|
||||||
import { queryResultByOrder } from '@/api/apis'
|
|
||||||
import CMarriage from '@/ui/CMarriage.vue'
|
|
||||||
|
|
||||||
const isDone = ref(false)
|
|
||||||
const entData = ref([])
|
|
||||||
const lawsuitData = ref({})
|
|
||||||
const badData = ref({})
|
|
||||||
|
|
||||||
const specialData = ref({})
|
|
||||||
|
|
||||||
const bankLoanApplicationData = ref({})
|
|
||||||
const marriageData = ref({})
|
|
||||||
const bankLoanBehavior = ref({})
|
|
||||||
onLoad((option) => {
|
|
||||||
console.log('option', option)
|
|
||||||
const { id } = option
|
|
||||||
if (id) {
|
|
||||||
queryResultByOrder(id).then((res) => {
|
|
||||||
console.log('res', res)
|
|
||||||
if (res.code === 200) {
|
|
||||||
res.data.query_data.forEach((item) => {
|
|
||||||
if (item.success) {
|
|
||||||
switch (item.apiID) {
|
|
||||||
case 'G09SC02':
|
|
||||||
marriageData.value = item.data
|
|
||||||
break
|
|
||||||
case 'G27BJ05':
|
|
||||||
bankLoanApplicationData.value = item.data
|
|
||||||
break
|
|
||||||
case 'G28BJ05':
|
|
||||||
bankLoanBehavior.value = item.data
|
|
||||||
break
|
|
||||||
case 'G26BJ05':
|
|
||||||
specialData.value = item.data
|
|
||||||
break
|
|
||||||
case 'G05HZ01':
|
|
||||||
entData.value = item.data
|
|
||||||
break
|
|
||||||
case 'G34BJ03':
|
|
||||||
badData.value = item.data
|
|
||||||
break
|
|
||||||
case 'G35SC01':
|
|
||||||
lawsuitData.value = item.data
|
|
||||||
break
|
|
||||||
default:
|
|
||||||
console.log(`未知的apiID: ${item.apiID}`)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}).finally(() => {
|
|
||||||
isDone.value = true
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
const tabs = ref([
|
|
||||||
{ label: '涉诉案件', value: 'lawsuit' },
|
|
||||||
{ label: '异常名单', value: 'special' },
|
|
||||||
{ label: '贷款申请记录', value: 'loan' },
|
|
||||||
{ label: '报告概述', value: 'overview' },
|
|
||||||
{ label: '基本信息', value: 'base' },
|
|
||||||
{ label: '婚姻状态', value: 'marriage' },
|
|
||||||
{ label: '网络贷款申请记录', value: 'netloan' },
|
|
||||||
])
|
|
||||||
const reportItems = ref([
|
|
||||||
{ label: '涉诉案件', value: 'lawsuit', status: '正常' },
|
|
||||||
{ label: '异常名单', value: 'special', status: '存在风险' },
|
|
||||||
{ label: '借贷记录', value: 'loan', status: '正常' },
|
|
||||||
{ label: '不良风险评估', value: 'overview', status: '存在风险' },
|
|
||||||
{ label: '关联企业信息', value: 'base', status: '正常' },
|
|
||||||
{ label: '婚姻状态', value: 'marriage', status: '正常' },
|
|
||||||
{ label: '接待申请记录', value: 'netloan', status: '存在风险' },
|
|
||||||
])
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<div class="min-h-full from-blue-100 to-white bg-gradient-to-b">
|
|
||||||
<!-- <div class="w-full">
|
|
||||||
<img class="w-full object-fill" src="https://picnew13.photophoto.cn/20190315/jianyueshishangfengtaobaonanxiehaibaobannermoban-32390729_1.jpg">
|
|
||||||
</div> -->
|
|
||||||
<CTabs
|
|
||||||
:tabs="tabs"
|
|
||||||
type="blue-green"
|
|
||||||
/>
|
|
||||||
<template v-if="isDone">
|
|
||||||
<div class="flex flex-col gap-y-4 p-4 pt-12">
|
|
||||||
<div id="overview" class="title">
|
|
||||||
报告概述
|
|
||||||
</div>
|
|
||||||
<div class="card">
|
|
||||||
<div class="flex flex-col gap-y-4">
|
|
||||||
<div class="flex justify-between">
|
|
||||||
<span class="text-gray-700 font-bold">报告时间:</span>
|
|
||||||
<span class="text-gray-600">2024年11月18日 23:11:23</span>
|
|
||||||
</div>
|
|
||||||
<div class="flex justify-between">
|
|
||||||
<span class="text-gray-700 font-bold">报告编号:</span>
|
|
||||||
<span class="text-gray-600">HUIS829981926</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="mt-6">
|
|
||||||
<div class="flex flex-col gap-y-2">
|
|
||||||
<div v-for="item in reportItems" :key="item.value" class="flex justify-between">
|
|
||||||
<span class="text-gray-700 font-bold">{{ item.label }}:</span>
|
|
||||||
<span class="font-bold" :class="item.status === '正常' ? 'text-green-500' : 'text-red-500 '">{{ item.status }}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- <div id="base" class="title">
|
|
||||||
基本信息
|
|
||||||
</div>
|
|
||||||
<div class="card">
|
|
||||||
<div class="flex flex-col gap-y-4">
|
|
||||||
<div class="flex justify-between">
|
|
||||||
<span class="text-gray-700 font-bold">姓名:</span>
|
|
||||||
<span class="text-gray-600">张三</span>
|
|
||||||
</div>
|
|
||||||
<div class="flex justify-between">
|
|
||||||
<span class="text-gray-700 font-bold">年龄:</span>
|
|
||||||
<span class="text-gray-600">25</span>
|
|
||||||
</div>
|
|
||||||
<div class="flex justify-between">
|
|
||||||
<span class="text-gray-700 font-bold">性别:</span>
|
|
||||||
<span class="text-gray-600">男</span>
|
|
||||||
</div>
|
|
||||||
<div class="flex justify-between">
|
|
||||||
<span class="text-gray-700 font-bold">身份证号码:</span>
|
|
||||||
<span class="text-gray-600">123456789012345678</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
<div id="special" class="title">
|
|
||||||
异常名单
|
|
||||||
</div>
|
|
||||||
<CSpecialList :data="specialData" />
|
|
||||||
<div id="netloan" class="title">
|
|
||||||
借贷记录
|
|
||||||
</div>
|
|
||||||
<CBankLoanBehavior :data="bankLoanBehavior" />
|
|
||||||
<div id="loan" class="title">
|
|
||||||
借贷申请记录
|
|
||||||
</div>
|
|
||||||
<CBankLoanApplication :data="bankLoanApplicationData" />
|
|
||||||
<div id="marriage" class="title">
|
|
||||||
婚姻状态
|
|
||||||
</div>
|
|
||||||
<CMarriage :data="marriageData" />
|
|
||||||
|
|
||||||
<div id="ent" class="title">
|
|
||||||
关联企业
|
|
||||||
</div>
|
|
||||||
<CRelatedEnterprises :data="entData" />
|
|
||||||
<div id="bad" class="title">
|
|
||||||
不良风险评估
|
|
||||||
</div>
|
|
||||||
<CBad :data="badData" />
|
|
||||||
<div id="lawsuit" class="title">
|
|
||||||
涉诉案件
|
|
||||||
</div>
|
|
||||||
<CLawsuit :data="lawsuitData" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<route lang="json">
|
|
||||||
{
|
|
||||||
"layout": "page"
|
|
||||||
}
|
|
||||||
</route>
|
|
||||||
17
src/pages/service.vue
Normal file
17
src/pages/service.vue
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<script setup>
|
||||||
|
import WebviewPage from '@/components/WebviewPage.vue'
|
||||||
|
|
||||||
|
const webviewSrc = '/service' // 可以根据不同页面设置不同的值
|
||||||
|
const navigationBarTitleText = '客户服务' // 同样可以根据需要修改
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<WebviewPage :webview-src="webviewSrc" :navigation-bar-title-text="navigationBarTitleText" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<route lang="json">
|
||||||
|
{
|
||||||
|
"layout": "page",
|
||||||
|
"title": "客户服务"
|
||||||
|
}
|
||||||
|
</route>
|
||||||
@@ -1,10 +1,17 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import WebviewPage from '@/components/WebviewPage.vue'
|
import WebviewPage from '@/components/WebviewPage.vue'
|
||||||
|
|
||||||
const webviewSrc = 'http://192.168.1.124:5678/userAgreement' // 可以根据不同页面设置不同的值
|
const webviewSrc = '/userAgreement' // 可以根据不同页面设置不同的值
|
||||||
const navigationBarTitleText = '用户协议' // 同样可以根据需要修改
|
const navigationBarTitleText = '用户协议' // 同样可以根据需要修改
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<WebviewPage :webview-src="webviewSrc" :navigation-bar-title-text="navigationBarTitleText" />
|
<WebviewPage :webview-src="webviewSrc" :navigation-bar-title-text="navigationBarTitleText" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<route lang="json">
|
||||||
|
{
|
||||||
|
"layout": "page",
|
||||||
|
"title": "用户协议"
|
||||||
|
}
|
||||||
|
</route>
|
||||||
|
|||||||
17
src/plugins/urlLauncher/index.js
Normal file
17
src/plugins/urlLauncher/index.js
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
function launch(url) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
// 调用原生插件的 launch 方法
|
||||||
|
uni.requireNativePlugin('urlLauncher').launch({ url }, (res) => {
|
||||||
|
if (res.success) {
|
||||||
|
resolve()
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
reject(res.message)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
launch,
|
||||||
|
}
|
||||||
7
src/plugins/urlLauncher/ios/urlLauncherPlugin.h
Normal file
7
src/plugins/urlLauncher/ios/urlLauncherPlugin.h
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#import <SafariServices/SafariServices.h>
|
||||||
|
#import <UniPlugin.h>
|
||||||
|
|
||||||
|
@interface UrlLauncherPlugin : NSObject<UniPlugin>
|
||||||
|
@end
|
||||||
28
src/plugins/urlLauncher/ios/urlLauncherPlugin.m
Normal file
28
src/plugins/urlLauncher/ios/urlLauncherPlugin.m
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
#import "urlLauncherPlugin.h"
|
||||||
|
|
||||||
|
@implementation UrlLauncherPlugin
|
||||||
|
|
||||||
|
// 实现插件的启动方法
|
||||||
|
- (void)launch:(NSDictionary*)arguments callback:(UniReturnValueCallback)callback {
|
||||||
|
NSString *urlString = arguments[@"url"];
|
||||||
|
if (!urlString) {
|
||||||
|
callback(@{@"success": @(NO), @"message": @"URL is missing"});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
NSURL *url = [NSURL URLWithString:urlString];
|
||||||
|
if (!url) {
|
||||||
|
callback(@{@"success": @(NO), @"message": @"Invalid URL"});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
|
UIViewController *rootVC = [UIApplication sharedApplication].keyWindow.rootViewController;
|
||||||
|
SFSafariViewController *safariVC = [[SFSafariViewController alloc] initWithURL:url];
|
||||||
|
[rootVC presentViewController:safariVC animated:YES completion:^{
|
||||||
|
callback(@{@"success": @(YES)});
|
||||||
|
}];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
3
src/uni-pages.d.ts
vendored
3
src/uni-pages.d.ts
vendored
@@ -6,6 +6,7 @@
|
|||||||
interface NavigateToOptions {
|
interface NavigateToOptions {
|
||||||
url: "/pages/index" |
|
url: "/pages/index" |
|
||||||
"/pages/ai" |
|
"/pages/ai" |
|
||||||
|
"/pages/complaint" |
|
||||||
"/pages/example" |
|
"/pages/example" |
|
||||||
"/pages/history_query" |
|
"/pages/history_query" |
|
||||||
"/pages/inquire" |
|
"/pages/inquire" |
|
||||||
@@ -17,7 +18,7 @@ interface NavigateToOptions {
|
|||||||
"/pages/me" |
|
"/pages/me" |
|
||||||
"/pages/privacyPolicy" |
|
"/pages/privacyPolicy" |
|
||||||
"/pages/report" |
|
"/pages/report" |
|
||||||
"/pages/result" |
|
"/pages/service" |
|
||||||
"/pages/userAgreement";
|
"/pages/userAgreement";
|
||||||
}
|
}
|
||||||
interface RedirectToOptions extends NavigateToOptions {}
|
interface RedirectToOptions extends NavigateToOptions {}
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
let BASE_URL = '/api/v1'
|
const BASE_URL = '/api/v1'
|
||||||
|
|
||||||
// #ifdef APP || MP-WEIXIN
|
|
||||||
BASE_URL = 'https://6m4685017o.goho.co/api/v1'
|
|
||||||
// #endif
|
|
||||||
|
|
||||||
function request(options) {
|
function request(options) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
|||||||
@@ -46,6 +46,11 @@ export default async () => {
|
|||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
// rewrite: path => path.replace(/^\/api/, ''), // 将请求路径中的 '/api' 替换为空
|
// rewrite: path => path.replace(/^\/api/, ''), // 将请求路径中的 '/api' 替换为空
|
||||||
},
|
},
|
||||||
|
// '/api/v1': {
|
||||||
|
// target: 'http://www.quannengcha.com', // 本地接口地址
|
||||||
|
// changeOrigin: true,
|
||||||
|
// // rewrite: path => path.replace(/^\/api/, ''), // 将请求路径中的 '/api' 替换为空
|
||||||
|
// },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user