文本类算法试用+单点登录bug修复
This commit is contained in:
parent
ae22bbd063
commit
b7b0a14b86
|
@ -1,8 +1,8 @@
|
||||||
<!--
|
<!--
|
||||||
* @Author: hisense.wuhongjian
|
* @Author: hisense.wuhongjian
|
||||||
* @Date: 2022-04-11 10:11:40
|
* @Date: 2022-04-11 10:11:40
|
||||||
* @LastEditors: hisense.liangjunhua
|
* @LastEditors: hisense.wuhongjian
|
||||||
* @LastEditTime: 2022-07-11 12:09:13
|
* @LastEditTime: 2022-07-11 18:56:36
|
||||||
* @Description: 告诉大家这是什么
|
* @Description: 告诉大家这是什么
|
||||||
-->
|
-->
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
@ -44,7 +44,7 @@
|
||||||
// window.SITE_CONFIG['apiURL'] = 'http://15.2.21.166:8888/renren-admin';
|
// window.SITE_CONFIG['apiURL'] = 'http://15.2.21.166:8888/renren-admin';
|
||||||
// window.SITE_CONFIG['apiURL'] = 'http://124.222.94.39:8888/renren-admin';
|
// window.SITE_CONFIG['apiURL'] = 'http://124.222.94.39:8888/renren-admin';
|
||||||
// window.SITE_CONFIG['apiURL'] = 'http://10.16.5.35:8888/renren-admin';
|
// window.SITE_CONFIG['apiURL'] = 'http://10.16.5.35:8888/renren-admin';
|
||||||
window.SITE_CONFIG['apiURL'] = 'http://15.2.21.238:8888/renren-admin';
|
window.SITE_CONFIG['apiURL'] = 'http://15.2.21.239:8888/renren-admin';
|
||||||
window.SITE_CONFIG['previewUrl'] = 'http://15.2.21.238:9796/';
|
window.SITE_CONFIG['previewUrl'] = 'http://15.2.21.238:9796/';
|
||||||
// window.SITE_CONFIG['apiURL'] = 'http://15.2.23.141:8000/renren-admin';
|
// window.SITE_CONFIG['apiURL'] = 'http://15.2.23.141:8000/renren-admin';
|
||||||
// WebSocket地址
|
// WebSocket地址
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<!--
|
<!--
|
||||||
* @Author: hisense.wuhongjian
|
* @Author: hisense.wuhongjian
|
||||||
* @Date: 2022-03-29 16:45:25
|
* @Date: 2022-03-29 16:45:25
|
||||||
* @LastEditors: hisense.liangjunhua
|
* @LastEditors: hisense.wuhongjian
|
||||||
* @LastEditTime: 2022-07-09 15:05:57
|
* @LastEditTime: 2022-07-11 18:10:24
|
||||||
* @Description: 告诉大家这是什么
|
* @Description: 告诉大家这是什么
|
||||||
-->
|
-->
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
window.SITE_CONFIG['backUrl'] = 'http://15.2.21.238:9797';
|
window.SITE_CONFIG['backUrl'] = 'http://15.2.21.238:9797';
|
||||||
window.SITE_CONFIG['previewUrl'] = 'http://15.2.21.238:9796/';
|
window.SITE_CONFIG['previewUrl'] = 'http://15.2.21.238:9796/';
|
||||||
window.SITE_CONFIG['frontUrl'] = 'http://15.2.21.238:9796/document/#/devModelFile/';
|
window.SITE_CONFIG['frontUrl'] = 'http://15.2.21.238:9796/document/#/devModelFile/';
|
||||||
window.SITE_CONFIG['apiURL'] = 'http://15.2.21.238:8888/renren-admin';
|
window.SITE_CONFIG['apiURL'] = 'http://15.2.21.239:8888/renren-admin';
|
||||||
window.SITE_CONFIG['POI_URL'] = 'http://15.2.21.238:8090/iserver/services/addressmatch-qingdaoPOI181015/restjsr/v1/address';
|
window.SITE_CONFIG['POI_URL'] = 'http://15.2.21.238:8090/iserver/services/addressmatch-qingdaoPOI181015/restjsr/v1/address';
|
||||||
// 穿透版本
|
// 穿透版本
|
||||||
// window.SITE_CONFIG['backUrl'] = 'http://124.222.94.39:9797';
|
// window.SITE_CONFIG['backUrl'] = 'http://124.222.94.39:9797';
|
||||||
|
@ -126,4 +126,4 @@
|
||||||
<!-- built files will be auto injected -->
|
<!-- built files will be auto injected -->
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/*
|
/*
|
||||||
* @Author: hisense.wuhongjian
|
* @Author: hisense.wuhongjian
|
||||||
* @Date: 2022-04-20 17:16:35
|
* @Date: 2022-04-20 17:16:35
|
||||||
* @LastEditors: hisense.liangjunhua
|
* @LastEditors: hisense.wuhongjian
|
||||||
* @LastEditTime: 2022-06-22 14:57:16
|
* @LastEditTime: 2022-07-11 19:02:33
|
||||||
* @Description: 告诉大家这是什么
|
* @Description: 告诉大家这是什么
|
||||||
*/
|
*/
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
@ -46,6 +46,10 @@ export function correct(params) {
|
||||||
export function paddleocr(params) {
|
export function paddleocr(params) {
|
||||||
return axios.post('http://15.72.183.90:7008/paddleocr', params, config2)
|
return axios.post('http://15.72.183.90:7008/paddleocr', params, config2)
|
||||||
}
|
}
|
||||||
|
// 算法总接口
|
||||||
|
export function algo(params) {
|
||||||
|
return axios.post('http://15.72.184.10:8888/api/algo', params, config2)
|
||||||
|
}
|
||||||
|
|
||||||
// 能力云图-数据资源
|
// 能力云图-数据资源
|
||||||
export function count() {
|
export function count() {
|
||||||
|
|
|
@ -29,12 +29,13 @@ const handleCode = (code, msg, res) => {
|
||||||
// message.error(msg || '登录失效')
|
// message.error(msg || '登录失效')
|
||||||
|
|
||||||
store.dispatch('user/resetAll').catch(() => {})
|
store.dispatch('user/resetAll').catch(() => {})
|
||||||
if (res.token) {
|
debugger
|
||||||
console.log('存在token信息', res.token)
|
// if (res.token) {
|
||||||
setAccessToken(res.token)
|
// console.log('存在token信息', res.token)
|
||||||
const token = getAccessToken()
|
// setAccessToken(res.token)
|
||||||
console.log('验证token信息', token)
|
// const token = getAccessToken()
|
||||||
}
|
// console.log('验证token信息', token)
|
||||||
|
// }
|
||||||
|
|
||||||
// // location.reload()
|
// // location.reload()
|
||||||
// if (redirect) {
|
// if (redirect) {
|
||||||
|
@ -71,8 +72,10 @@ const instance = axios.create({
|
||||||
*/
|
*/
|
||||||
instance.interceptors.request.use(
|
instance.interceptors.request.use(
|
||||||
(config) => {
|
(config) => {
|
||||||
if (store.getters['user/accessToken'])
|
debugger
|
||||||
config.headers[tokenName] = store.getters['user/accessToken']
|
const token = getAccessToken()
|
||||||
|
if (token)
|
||||||
|
config.headers[tokenName] = token
|
||||||
if (
|
if (
|
||||||
config.data &&
|
config.data &&
|
||||||
config.headers['Content-Type'] ===
|
config.headers['Content-Type'] ===
|
||||||
|
@ -101,10 +104,12 @@ instance.interceptors.response.use(
|
||||||
console.log('接口返回REDIRECT', response.headers.redirect)
|
console.log('接口返回REDIRECT', response.headers.redirect)
|
||||||
response['Access-Control-Expose-Headers'] = 'redirect'
|
response['Access-Control-Expose-Headers'] = 'redirect'
|
||||||
const { code, message } = response.data
|
const { code, message } = response.data
|
||||||
if (response.headers.token) {
|
debugger
|
||||||
|
if (code=='0' && response.headers.token) {
|
||||||
setAccessToken(response.headers.token)
|
setAccessToken(response.headers.token)
|
||||||
} else {
|
} else {
|
||||||
if (response.headers.redirect) {
|
const token = getAccessToken()
|
||||||
|
if (response.headers.redirect && !token) {
|
||||||
// window.location.href = response.headers.redirect
|
// window.location.href = response.headers.redirect
|
||||||
window.location.replace(response.headers.redirect)
|
window.location.replace(response.headers.redirect)
|
||||||
return
|
return
|
||||||
|
@ -154,16 +159,21 @@ instance.interceptors.response.use(
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
(error) => {
|
(error) => {
|
||||||
|
debugger
|
||||||
console.log('接口error', error)
|
console.log('接口error', error)
|
||||||
if (loadingInstance) loadingInstance.close()
|
if (loadingInstance) loadingInstance.close()
|
||||||
|
|
||||||
const { response, message } = error
|
const { response, message } = error
|
||||||
if (error.response && error.response.data) {
|
if (error.response) {
|
||||||
console.log('接口返回', response)
|
console.log('接口返回', response)
|
||||||
console.log('接口返回headers', response.headers)
|
console.log('接口返回headers', response.headers)
|
||||||
console.log('接口返回REDIRECT', response.headers.redirect)
|
console.log('接口返回REDIRECT', response.headers.redirect)
|
||||||
|
// if (response.headers.token) {
|
||||||
|
// setAccessToken(response.headers.token)
|
||||||
|
// }
|
||||||
if (response.headers.redirect) {
|
if (response.headers.redirect) {
|
||||||
window.location.replace(response.headers.redirect)
|
window.location.replace(response.headers.redirect)
|
||||||
return Promise.reject(error)
|
// return Promise.resolve()
|
||||||
}
|
}
|
||||||
const { status, data } = response
|
const { status, data } = response
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* @Author: hisense.wuhongjian
|
* @Author: hisense.wuhongjian
|
||||||
* @Date: 2022-04-01 17:23:11
|
* @Date: 2022-04-01 17:23:11
|
||||||
* @LastEditors: hisense.wuhongjian
|
* @LastEditors: hisense.wuhongjian
|
||||||
* @LastEditTime: 2022-07-08 18:55:28
|
* @LastEditTime: 2022-07-11 16:39:36
|
||||||
* @Description: 告诉大家这是什么
|
* @Description: 告诉大家这是什么
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
|
@ -33,8 +33,9 @@
|
||||||
if (!loginInterception) hasToken = true
|
if (!loginInterception) hasToken = true
|
||||||
console.log('hasToken存在巨大问题', hasToken)
|
console.log('hasToken存在巨大问题', hasToken)
|
||||||
if (hasToken) {
|
if (hasToken) {
|
||||||
setAccessToken(hasToken)
|
// setAccessToken(hasToken)
|
||||||
await store.dispatch('user/getUserInfo')
|
await store.dispatch('user/getUserInfo')
|
||||||
|
debugger
|
||||||
next()
|
next()
|
||||||
} else {
|
} else {
|
||||||
let accessRoutes = []
|
let accessRoutes = []
|
||||||
|
@ -45,6 +46,7 @@
|
||||||
if (routesWhiteList.indexOf(to.path) !== -1) {
|
if (routesWhiteList.indexOf(to.path) !== -1) {
|
||||||
next()
|
next()
|
||||||
} else {
|
} else {
|
||||||
|
// 这里是一个单点登录的入口
|
||||||
getUserInfo().then(res=>{
|
getUserInfo().then(res=>{
|
||||||
console.log(res)
|
console.log(res)
|
||||||
router.replace('/home')
|
router.replace('/home')
|
||||||
|
|
|
@ -26,9 +26,9 @@
|
||||||
<div class="bg bg4"></div>
|
<div class="bg bg4"></div>
|
||||||
<div class="top-left">
|
<div class="top-left">
|
||||||
<div class="text">
|
<div class="text">
|
||||||
<p>错误内容: {{ errorWord }}</p>
|
<p>返回结果: {{ errorWord }}</p>
|
||||||
<p>错误位置: {{ errorWordIndex }}</p>
|
<!-- <p>错误位置: {{ errorWordIndex }}</p>
|
||||||
<p>识别内容: {{ errorWordContent }}</p>
|
<p>识别内容: {{ errorWordContent }}</p> -->
|
||||||
<span></span>
|
<span></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -43,26 +43,37 @@
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { correct } from '@/api/file'
|
import { correct,algo } from '@/api/file'
|
||||||
|
import { useRouter } from 'vue-router'
|
||||||
|
const router = useRouter()
|
||||||
|
// const keyId = router.currentRoute.value.query.id
|
||||||
const wordValue = ref('')
|
const wordValue = ref('')
|
||||||
|
wordValue.value = router.currentRoute.value.query.data
|
||||||
const errorWord = ref('')
|
const errorWord = ref('')
|
||||||
const errorWordIndex = ref('')
|
// const errorWordIndex = ref('')
|
||||||
const errorWordContent = ref('')
|
// const errorWordContent = ref('')
|
||||||
const correctWord = () => {
|
const correctWord = () => {
|
||||||
const param = {
|
const param = {
|
||||||
sentence: wordValue.value,
|
// sentence: wordValue.value,
|
||||||
|
company: router.currentRoute.value.query.company,
|
||||||
|
algorithmName: router.currentRoute.value.query.algorithmName,
|
||||||
|
data: wordValue.value,
|
||||||
|
type: router.currentRoute.value.query.type
|
||||||
}
|
}
|
||||||
correct(param).then((res) => {
|
// correct(param).then((res) => {
|
||||||
// wordContent.value = res.data.data
|
// // wordContent.value = res.data.data
|
||||||
Object.keys(res.data.data).forEach((key) => {
|
// Object.keys(res.data.data).forEach((key) => {
|
||||||
console.log(key)
|
// console.log(key)
|
||||||
errorWord.value = key
|
// errorWord.value = key
|
||||||
})
|
// })
|
||||||
Object.values(res.data.data).forEach((val) => {
|
// Object.values(res.data.data).forEach((val) => {
|
||||||
console.log(val)
|
// console.log(val)
|
||||||
errorWordIndex.value = val.ix
|
// errorWordIndex.value = val.ix
|
||||||
errorWordContent.value = val.value
|
// errorWordContent.value = val.value
|
||||||
})
|
// })
|
||||||
|
// })
|
||||||
|
algo(param).then(res=>{
|
||||||
|
errorWord.value = res.data.text_data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -138,7 +138,7 @@
|
||||||
muted: false, //静音
|
muted: false, //静音
|
||||||
webFullScreen: false,
|
webFullScreen: false,
|
||||||
speedRate: ['0.75', '1.0', '1.25', '1.5', '2.0'], //播放倍速
|
speedRate: ['0.75', '1.0', '1.25', '1.5', '2.0'], //播放倍速
|
||||||
autoPlay: true, //自动播放
|
autoPlay: false, //自动播放
|
||||||
loop: false, //循环播放
|
loop: false, //循环播放
|
||||||
mirror: false, //镜像画面
|
mirror: false, //镜像画面
|
||||||
ligthOff: false, //关灯模式
|
ligthOff: false, //关灯模式
|
||||||
|
|
Loading…
Reference in New Issue