ai-read-over-mobile 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -0
- package/components/demo/api/index.js +104 -0
- package/components/demo/index.js +7 -0
- package/components/demo/plugins/cache.js +77 -0
- package/components/demo/src/chat-tools.vue +420 -0
- package/components/demo/src/main.vue +783 -0
- package/components/demo/src/member-table.vue +298 -0
- package/components/demo/src/read-over.vue +398 -0
- package/components/demo/src/tab-filter.vue +313 -0
- package/components/demo/static/bg-img.svg +10 -0
- package/components/demo/static/cai-active.png +0 -0
- package/components/demo/static/cai.png +0 -0
- package/components/demo/static/correct.png +0 -0
- package/components/demo/static/error.png +0 -0
- package/components/demo/static/filter-block.svg +23 -0
- package/components/demo/static/filter-block_hover.svg +23 -0
- package/components/demo/static/filter-block_selected.svg +23 -0
- package/components/demo/static/filter.png +0 -0
- package/components/demo/static/iconfont/iconfont.css +29 -0
- package/components/demo/static/iconfont/iconfont.js +1 -0
- package/components/demo/static/iconfont/iconfont.json +37 -0
- package/components/demo/static/iconfont/iconfont.ttf +0 -0
- package/components/demo/static/logo.png +0 -0
- package/components/demo/static/robot.png +0 -0
- package/components/demo/static/send-icon.png +0 -0
- package/components/demo/static/zan-active.png +0 -0
- package/components/demo/static/zan.png +0 -0
- package/components/demo/utils/aes-utils.js +35 -0
- package/components/demo/utils/config.js +46 -0
- package/components/demo/utils/constants.js +15 -0
- package/components/demo/utils/request.js +74 -0
- package/components/index.js +15 -0
- package/dist/ai-read-over-mobile.common.js +12129 -0
- package/dist/ai-read-over-mobile.common.js.map +1 -0
- package/dist/ai-read-over-mobile.css +1 -0
- package/dist/ai-read-over-mobile.umd.js +12148 -0
- package/dist/ai-read-over-mobile.umd.js.map +1 -0
- package/dist/ai-read-over-mobile.umd.min.js +18 -0
- package/dist/ai-read-over-mobile.umd.min.js.map +1 -0
- package/dist/demo.html +1 -0
- package/dist/img/filter-block.6f369747.svg +23 -0
- package/dist/img/filter-block_hover.5314be0a.svg +23 -0
- package/dist/img/filter-block_selected.f523d7f3.svg +23 -0
- package/package.json +44 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "",
|
|
3
|
+
"name": "",
|
|
4
|
+
"font_family": "iconfont",
|
|
5
|
+
"css_prefix_text": "icon-",
|
|
6
|
+
"description": "",
|
|
7
|
+
"glyphs": [
|
|
8
|
+
{
|
|
9
|
+
"icon_id": "34452874",
|
|
10
|
+
"name": "message-comments-fill",
|
|
11
|
+
"font_class": "message-comments-fill",
|
|
12
|
+
"unicode": "e82e",
|
|
13
|
+
"unicode_decimal": 59438
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"icon_id": "34453014",
|
|
17
|
+
"name": "help-fill",
|
|
18
|
+
"font_class": "help-fill",
|
|
19
|
+
"unicode": "e83d",
|
|
20
|
+
"unicode_decimal": 59453
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"icon_id": "40228530",
|
|
24
|
+
"name": "messageSolid",
|
|
25
|
+
"font_class": "messageSolid",
|
|
26
|
+
"unicode": "e6e2",
|
|
27
|
+
"unicode_decimal": 59106
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"icon_id": "42520887",
|
|
31
|
+
"name": "重新回答",
|
|
32
|
+
"font_class": "zhongxinhuida",
|
|
33
|
+
"unicode": "e686",
|
|
34
|
+
"unicode_decimal": 59014
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import CryptoJS from 'crypto-js';
|
|
2
|
+
import { Base64 } from 'js-base64';
|
|
3
|
+
|
|
4
|
+
const a = 'RU5D';
|
|
5
|
+
const b = 'ODE';
|
|
6
|
+
const c = 'AE';
|
|
7
|
+
const d = 'S_K';
|
|
8
|
+
const e = 'RVkx';
|
|
9
|
+
const z = Base64.decode(a).concat(b, '_', c, d, Base64.decode(e), '6');
|
|
10
|
+
const f = 'd3d3';
|
|
11
|
+
const g = 'w.e';
|
|
12
|
+
const i = 'mru';
|
|
13
|
+
const j = 'bik';
|
|
14
|
+
const k = 'Y29t';
|
|
15
|
+
const n = Base64.decode(f).concat(g, i, j, '.', Base64.decode(k));
|
|
16
|
+
const key = CryptoJS.enc.Utf8.parse(z);
|
|
17
|
+
const iv = CryptoJS.enc.Utf8.parse(n);
|
|
18
|
+
// 解密方法
|
|
19
|
+
export function decrypt(word) {
|
|
20
|
+
const stringToEncode = 'Hello, World!'; // 要进行 Base64 编码的字符串
|
|
21
|
+
const encodedString = Base64.encode(stringToEncode); // 进行 Base64 编码
|
|
22
|
+
const decodedString = Base64.decode(encodedString); // 进行 Base64 解码
|
|
23
|
+
|
|
24
|
+
let base64 = CryptoJS.enc.Base64.parse(word);
|
|
25
|
+
let src = CryptoJS.enc.Base64.stringify(base64);
|
|
26
|
+
|
|
27
|
+
let decrypt = CryptoJS.AES.decrypt(src, key, {
|
|
28
|
+
iv: iv,
|
|
29
|
+
mode: CryptoJS.mode.CBC,
|
|
30
|
+
padding: CryptoJS.pad.Pkcs7,
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
let decryptedStr = decrypt.toString(CryptoJS.enc.Utf8);
|
|
34
|
+
return decryptedStr.toString();
|
|
35
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ssoAuth, authUser } from '../api/index';
|
|
2
|
+
// import constants from '../utils/constants';
|
|
3
|
+
import cache from '../plugins/cache';
|
|
4
|
+
export const errorList = [
|
|
5
|
+
{
|
|
6
|
+
name: "格式问题",
|
|
7
|
+
code: "1",
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
name: "逻辑问题",
|
|
11
|
+
code: "2",
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
name: "有害信息",
|
|
15
|
+
code: "3",
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
name: "事实错误",
|
|
19
|
+
code: "4",
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
name: "没有帮助",
|
|
23
|
+
code: "5",
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: "答非所问",
|
|
27
|
+
code: "6",
|
|
28
|
+
},
|
|
29
|
+
]
|
|
30
|
+
|
|
31
|
+
// export const getUserInfo = async (token) => {
|
|
32
|
+
// const ssoRes = await ssoAuth(token);
|
|
33
|
+
// const userRes = await authUser({
|
|
34
|
+
// 'X-Auth-User': encodeURIComponent(ssoRes.name),
|
|
35
|
+
// 'X-Auth-Token': ssoRes.password,
|
|
36
|
+
// 'X-Enterprise-Id': `${constants['X-Enterprise-Id']}`,
|
|
37
|
+
// 'X-App-Id': `${constants['X-App-Id']}`,
|
|
38
|
+
// 'X-App-Secret': `${constants['X-App-Secret']}`,
|
|
39
|
+
// 'X-Auth-User-Type': '1',
|
|
40
|
+
// });
|
|
41
|
+
// cache.session.setJSON('SRKJ_TOKEN_CACHE', userRes);
|
|
42
|
+
// }
|
|
43
|
+
export const getUserInfo = async (token, businessSource) => {
|
|
44
|
+
await ssoAuth(token, businessSource);
|
|
45
|
+
cache.session.setJSON('SRKJ_TOKEN_CACHE', token);
|
|
46
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
let appId = '601a39a2a4a7cd88d5ddcef5';
|
|
2
|
+
const whiteList = ['/home', '/overview'];
|
|
3
|
+
if (process.env.VITE_APP_BUILD_TYPE === 'aliyun') {
|
|
4
|
+
appId = '6572ba195ec962924cc39951';
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
'X-Enterprise-Id': 'www.hep-zj.com.cn',
|
|
9
|
+
'X-App-Id': '90403a27c0704259ab7a3c8aab4489b3',
|
|
10
|
+
'X-App-Secret': 'bc11ce7c44824fcaa23ff301a54b7094',
|
|
11
|
+
appId,
|
|
12
|
+
whiteList,
|
|
13
|
+
publicPath: 'https://agent.icve.com.cn/heatp-portal/do/',
|
|
14
|
+
publicPrefix: '/heatp'
|
|
15
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import axios from 'axios'
|
|
2
|
+
import cache from '../plugins/cache'
|
|
3
|
+
import { Message } from 'element-ui'
|
|
4
|
+
const door = sessionStorage.getItem('AI-INTELLIGENT-TOOLS_BASE_URL');
|
|
5
|
+
import { decrypt } from './aes-utils';
|
|
6
|
+
import constants from '../utils/constants';
|
|
7
|
+
|
|
8
|
+
axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8';
|
|
9
|
+
|
|
10
|
+
const service = axios.create({
|
|
11
|
+
// axios中请求配置有baseURL选项,表示请求URL公共部分
|
|
12
|
+
baseURL: door || constants.publicPath,
|
|
13
|
+
// 超时
|
|
14
|
+
timeout: 80000
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
service.interceptors.request.use(config => {
|
|
18
|
+
if (cache.session.getJSON('SRKJ_TOKEN_CACHE')) {
|
|
19
|
+
// config.headers["X-Id-Token"] = cache.session.getJSON('SRKJ_TOKEN_CACHE');
|
|
20
|
+
if (!config.params) config.params = {};
|
|
21
|
+
config.params.token = cache.session.getJSON('SRKJ_TOKEN_CACHE');
|
|
22
|
+
}
|
|
23
|
+
// 是否需要防止数据重复提交
|
|
24
|
+
const isRepeatSubmit = (config.headers || {}).repeatSubmit === false;
|
|
25
|
+
if (!isRepeatSubmit && (config.method === 'post' || config.method === 'put')) {
|
|
26
|
+
const requestObj = {
|
|
27
|
+
url: config.url,
|
|
28
|
+
data: typeof config.data === 'object' ? JSON.stringify(config.data) : config.data,
|
|
29
|
+
time: new Date().getTime()
|
|
30
|
+
}
|
|
31
|
+
const sessionObj = cache.session.getJSON('sessionObj')
|
|
32
|
+
if (sessionObj === undefined || sessionObj === null || sessionObj === '') {
|
|
33
|
+
cache.session.setJSON('sessionObj', requestObj)
|
|
34
|
+
} else {
|
|
35
|
+
const s_url = sessionObj.url; // 请求地址
|
|
36
|
+
const s_data = sessionObj.data; // 请求数据
|
|
37
|
+
const s_time = sessionObj.time; // 请求时间
|
|
38
|
+
const interval = 100; // 间隔时间(ms),小于此时间视为重复提交
|
|
39
|
+
if (s_data === requestObj.data && requestObj.time - s_time < interval && s_url === requestObj.url) {
|
|
40
|
+
} else {
|
|
41
|
+
cache.session.setJSON('sessionObj', requestObj)
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return config
|
|
46
|
+
}, error => {
|
|
47
|
+
Promise.reject(error)
|
|
48
|
+
})
|
|
49
|
+
|
|
50
|
+
service.interceptors.response.use(res => {
|
|
51
|
+
// 二进制数据则直接返回
|
|
52
|
+
if (res.request.responseType === 'blob' || res.request.responseType === 'arraybuffer') {
|
|
53
|
+
return res.data
|
|
54
|
+
}
|
|
55
|
+
let srkjData = res.data;
|
|
56
|
+
// if (srkjData) {
|
|
57
|
+
// const respData = decrypt(srkjData);
|
|
58
|
+
// try {
|
|
59
|
+
// srkjData = JSON.parse(respData);
|
|
60
|
+
// } catch (e) {}
|
|
61
|
+
// }
|
|
62
|
+
cache.session.remove('ERROR_SR_CODE');
|
|
63
|
+
if (res.status === 401) {
|
|
64
|
+
Message.warning(srkjData.message.description);
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
if (!srkjData.resultCode.endsWith('0000')) {
|
|
68
|
+
cache.session.setJSON('ERROR_SR_CODE', srkjData.message.description);
|
|
69
|
+
// Message.warning(srkjData.message.description)
|
|
70
|
+
}
|
|
71
|
+
return srkjData.queryData || srkjData.data || srkjData.token;
|
|
72
|
+
})
|
|
73
|
+
|
|
74
|
+
export default service
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import AiReadOverMobile from './demo'
|
|
2
|
+
const components = {
|
|
3
|
+
AiReadOverMobile
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
const install = function (Vue) {
|
|
7
|
+
if (install.installed) return
|
|
8
|
+
Object.keys(components).forEach(key => {
|
|
9
|
+
Vue.component(components[key].name,components[key])
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default {
|
|
14
|
+
install
|
|
15
|
+
}
|