Compare commits
23 Commits
production
...
805b384958
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
805b384958 | ||
|
|
77f97892bc | ||
|
|
20191c9454 | ||
|
|
97a5c34e70 | ||
| 6024ae44a4 | |||
| ab63143792 | |||
|
|
29fe2aff0e | ||
|
|
90591289d0 | ||
|
|
e5c5902322 | ||
|
|
f1b18203ae | ||
| fc2d0f90ec | |||
| 6b20c045a9 | |||
| 183c71da3c | |||
| 5e2f8ac169 | |||
| bca67b7f25 | |||
| 83a1078a4d | |||
| e4d100242b | |||
|
|
5497398498 | ||
|
|
e67c53404b | ||
|
|
60a0448aa7 | ||
| 3eca164bde | |||
| a7d6b8709c | |||
| ca7273f152 |
35
App.vue
@@ -9,23 +9,26 @@ import config from '@/config.js';
|
|||||||
const appword = 'aKd20dbGdFvmuwrt'; // 固定值
|
const appword = 'aKd20dbGdFvmuwrt'; // 固定值
|
||||||
|
|
||||||
onLaunch((options) => {
|
onLaunch((options) => {
|
||||||
getUserInfo();
|
|
||||||
// useUserStore().initSeesionId(); //更新
|
|
||||||
useDictStore().getDictData();
|
|
||||||
// uni.hideTabBar();
|
// uni.hideTabBar();
|
||||||
// 登录
|
useDictStore().getDictData();
|
||||||
// let token = uni.getStorageSync('token') || ''; // 同步获取 缓存信息
|
try {
|
||||||
// if (token) {
|
getUserInfo();
|
||||||
// useUserStore()
|
} catch {
|
||||||
// .loginSetToken(token)
|
console.log('不是爱山东平台,使用测试登陆');
|
||||||
// .then(() => {
|
useUserStore().initSeesionId(); //更新
|
||||||
// $api.msg('登录成功');
|
let token = uni.getStorageSync('token') || ''; // 同步获取 缓存信息
|
||||||
// });
|
if (token) {
|
||||||
// } else {
|
useUserStore()
|
||||||
// uni.redirectTo({
|
.loginSetToken(token)
|
||||||
// url: '/pages/login/login',
|
.then(() => {
|
||||||
// });
|
$api.msg('登录成功');
|
||||||
// }
|
});
|
||||||
|
} else {
|
||||||
|
uni.redirectTo({
|
||||||
|
url: '/pages/login/login',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
onMounted(() => {});
|
onMounted(() => {});
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import useUserStore from "../stores/useUserStore";
|
import useUserStore from "../stores/useUserStore";
|
||||||
import {
|
import {
|
||||||
request,
|
|
||||||
createRequest,
|
createRequest,
|
||||||
uploadFile
|
uploadFile
|
||||||
} from "../utils/request";
|
} from "../utils/request";
|
||||||
@@ -8,6 +7,9 @@ import streamRequest, {
|
|||||||
chatRequest
|
chatRequest
|
||||||
} from "../utils/streamRequest.js";
|
} from "../utils/streamRequest.js";
|
||||||
|
|
||||||
|
const sm4 = typeof window.sm4 !== 'undefined' ? window.sm4 :
|
||||||
|
(typeof window.smCrypto !== 'undefined' ? window.smCrypto.sm4 : null);
|
||||||
|
|
||||||
export const CloneDeep = (props) => {
|
export const CloneDeep = (props) => {
|
||||||
if (typeof props !== 'object' || props === null) {
|
if (typeof props !== 'object' || props === null) {
|
||||||
return props
|
return props
|
||||||
@@ -563,7 +565,6 @@ function aes_Decrypt(word, key) {
|
|||||||
return decrypt.toString(CryptoJS.enc.Utf8)
|
return decrypt.toString(CryptoJS.enc.Utf8)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export function sm2_Decrypt(word, key) {
|
export function sm2_Decrypt(word, key) {
|
||||||
return SM.decrypt(word, key);
|
return SM.decrypt(word, key);
|
||||||
}
|
}
|
||||||
@@ -572,11 +573,51 @@ export function sm2_Encrypt(word, key) {
|
|||||||
return SM.encrypt(word, key);
|
return SM.encrypt(word, key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function sm4Decrypt(key, value, mode = "hex") {
|
||||||
|
try {
|
||||||
|
if (key.length !== 32) {
|
||||||
|
alert('密钥必须是32位16进制字符串(128位)');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const decrypted = sm4.decrypt(value, key, {
|
||||||
|
mode: 'ecb',
|
||||||
|
cipherType: mode === 'hex' ? 'hex' : 'base64',
|
||||||
|
padding: 'pkcs#5'
|
||||||
|
});
|
||||||
|
|
||||||
|
return decrypted
|
||||||
|
|
||||||
|
} catch (e) {
|
||||||
|
console.log('解密失败')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export function sm4Encrypt(key, value, mode = "hex") {
|
||||||
|
try {
|
||||||
|
|
||||||
|
if (key.length !== 32) {
|
||||||
|
alert('密钥必须是32位16进制字符串(128位)');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const encrypted = sm4.encrypt(value, key, {
|
||||||
|
mode: 'ecb',
|
||||||
|
cipherType: mode === 'hex' ? 'hex' : 'base64',
|
||||||
|
padding: 'pkcs#5'
|
||||||
|
});
|
||||||
|
|
||||||
|
return encrypted
|
||||||
|
|
||||||
|
} catch (e) {
|
||||||
|
console.log('加密失败')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
export const $api = {
|
export const $api = {
|
||||||
msg,
|
msg,
|
||||||
prePage,
|
prePage,
|
||||||
sleep,
|
sleep,
|
||||||
request,
|
|
||||||
createRequest,
|
createRequest,
|
||||||
streamRequest,
|
streamRequest,
|
||||||
chatRequest,
|
chatRequest,
|
||||||
@@ -615,6 +656,7 @@ export default {
|
|||||||
insertSortData,
|
insertSortData,
|
||||||
isInWechatMiniProgramWebview,
|
isInWechatMiniProgramWebview,
|
||||||
isEmptyObject,
|
isEmptyObject,
|
||||||
|
sm4Decrypt,
|
||||||
aes_Decrypt,
|
aes_Decrypt,
|
||||||
sm2_Decrypt,
|
sm2_Decrypt,
|
||||||
sm2_Encrypt
|
sm2_Encrypt
|
||||||
|
|||||||
@@ -1,17 +1,37 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>{{ salaryText }}</view>
|
<view>
|
||||||
|
<view v-if="!minSalary || !maxSalary">面议</view>
|
||||||
|
<view v-else class="texts">
|
||||||
|
<text class="num">{{ minSalary / 1000 }}</text>
|
||||||
|
<text class="unit">k</text>
|
||||||
|
<text class="gap">~</text>
|
||||||
|
<text class="num">{{ maxSalary / 1000 }}</text>
|
||||||
|
<text class="unit">k</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { inject, computed } from 'vue';
|
import { inject, computed } from "vue";
|
||||||
import useDictStore from '../../stores/useDictStore';
|
import useDictStore from "../../stores/useDictStore";
|
||||||
const { minSalary, maxSalary, isMonth } = defineProps(['minSalary', 'maxSalary', 'isMonth']);
|
const { minSalary, maxSalary } = defineProps(["minSalary", "maxSalary"]);
|
||||||
|
|
||||||
const salaryText = computed(() => {
|
|
||||||
if (!minSalary || !maxSalary) return '面议';
|
|
||||||
if (isMonth) {
|
|
||||||
return `${minSalary}-${maxSalary}/月`;
|
|
||||||
}
|
|
||||||
return `${minSalary / 1000}k-${maxSalary / 1000}k`;
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.texts{
|
||||||
|
letter-spacing: 1rpx;
|
||||||
|
}
|
||||||
|
.num{
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
.unit{
|
||||||
|
font-size: 24rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
.gap{
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
margin-left: 5rpx;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, defineProps, onMounted, computed } from 'vue';
|
import { ref, onMounted, computed } from 'vue';
|
||||||
import { useReadMsg } from '@/stores/useReadMsg';
|
import { useReadMsg } from '@/stores/useReadMsg';
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
currentpage: {
|
currentpage: {
|
||||||
|
|||||||
14
config.js
@@ -1,6 +1,6 @@
|
|||||||
export default {
|
export default {
|
||||||
baseUrl: 'https://fw.rc.qingdao.gov.cn/rgpp-api/api', // 内网
|
// baseUrl: 'https://fw.rc.qingdao.gov.cn/rgpp-api/api', // 内网
|
||||||
// baseUrl: 'https://qd.zhaopinzao8dian.com/api', // 测试
|
baseUrl: 'https://qd.zhaopinzao8dian.com/api', // 测试
|
||||||
// baseUrl: "http://192.168.98.110:18181",
|
// baseUrl: "http://192.168.98.110:18181",
|
||||||
// baseUrl: "http://192.168.3.19:8080",
|
// baseUrl: "http://192.168.3.19:8080",
|
||||||
// sseAI+
|
// sseAI+
|
||||||
@@ -18,10 +18,6 @@ export default {
|
|||||||
OnlyUseCachedDB: false,
|
OnlyUseCachedDB: false,
|
||||||
// 使用模拟定位
|
// 使用模拟定位
|
||||||
UsingSimulatedPositioning: true,
|
UsingSimulatedPositioning: true,
|
||||||
// 私钥
|
|
||||||
pubilcKey: '',
|
|
||||||
// 公钥
|
|
||||||
privateKey: '',
|
|
||||||
// 应用信息
|
// 应用信息
|
||||||
appInfo: {
|
appInfo: {
|
||||||
// 应用名称
|
// 应用名称
|
||||||
@@ -75,5 +71,11 @@ export default {
|
|||||||
title: '找工作,用 AI 更高效|青岛市智能求职平台',
|
title: '找工作,用 AI 更高效|青岛市智能求职平台',
|
||||||
desc: '融合海量岗位、智能简历匹配、竞争力分析,助你精准锁定理想职位!',
|
desc: '融合海量岗位、智能简历匹配、竞争力分析,助你精准锁定理想职位!',
|
||||||
imgUrl: 'https://qd.zhaopinzao8dian.com/file/csn/qd_shareLogo.jpg',
|
imgUrl: 'https://qd.zhaopinzao8dian.com/file/csn/qd_shareLogo.jpg',
|
||||||
|
},
|
||||||
|
sm4Config: {
|
||||||
|
key: '86C63180C1306ABC4D8F989E0A0BC9F3',
|
||||||
|
mode: 'ECB', // default
|
||||||
|
iv: 'UISwD9fW6cFh9SNS', // default is null
|
||||||
|
cipherType: 'base64' // default is base64
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
19
index.html
@@ -17,18 +17,23 @@
|
|||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
<title></title>
|
<title></title>
|
||||||
<!-- vconsole -->
|
<!-- eruda -->
|
||||||
<script src="https://unpkg.com/vconsole@latest/dist/vconsole.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/eruda"></script>
|
||||||
<script>
|
<script>
|
||||||
var vConsole = new window.VConsole();
|
eruda.init();
|
||||||
vConsole.destroy();
|
|
||||||
</script>
|
</script>
|
||||||
<!-- 爱山东jssdk -->
|
<!-- 爱山东jssdk 本sdk存在性能问题 -->
|
||||||
<script type="text/javascript" src="https://isdapp.shandong.gov.cn/jmopen/jssdk/index.js"></script>
|
<script type="text/javascript" src="https://isdapp.shandong.gov.cn/jmopen/jssdk/index.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript" src="./static/encryption/aes.js"></script>
|
<script type="text/javascript" src="./static/js/sm4.min.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript" src="./static/encryption/SM.js"></script>
|
<script type="text/javascript" src="./static/js/SM.js"></script>
|
||||||
|
|
||||||
|
<script type="text/javascript" src="./static/js/aes.js"></script>
|
||||||
|
|
||||||
|
<script type="text/javascript" src="./static/js/sm4.min.js"></script>
|
||||||
|
|
||||||
|
<script type="text/javascript" src="./static/js/pixi.min.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<!-- <body> -->
|
<!-- <body> -->
|
||||||
<div id="app"><!--app-html--></div>
|
<div id="app"><!--app-html--></div>
|
||||||
|
|||||||
@@ -7,31 +7,56 @@
|
|||||||
</template>
|
</template>
|
||||||
<view class="mys-container">
|
<view class="mys-container">
|
||||||
<!-- 个人信息 -->
|
<!-- 个人信息 -->
|
||||||
<view class="card-top" style="margin-top: 12rpx; padding: 0; background: none">
|
<view
|
||||||
|
class="card-top"
|
||||||
|
style="margin-top: 12rpx; padding: 0; background: none"
|
||||||
|
>
|
||||||
<view class="mys-tops btn-feel">
|
<view class="mys-tops btn-feel">
|
||||||
<view class="tops-left">
|
<view class="tops-left">
|
||||||
<view class="name">
|
<view class="name">
|
||||||
<text>{{ userInfo.name || "编辑用户名" }}</text>
|
<text>{{ userInfo.name || "编辑用户名" }}</text>
|
||||||
<view class="edit-icon mar_le10">
|
<view class="edit-icon mar_le10">
|
||||||
<image class="button-click" src="@/static/icon/edit1.png" @click="navTo('/packageA/pages/personalInfo/personalInfo')"></image>
|
<image
|
||||||
|
class="button-click"
|
||||||
|
src="@/static/icon/edit1.png"
|
||||||
|
@click="navTo('/packageA/pages/personalInfo/personalInfo')"
|
||||||
|
></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="subName">
|
<view class="subName">
|
||||||
<dict-Label class="mar_ri10" dictType="sex" :value="userInfo.sex"></dict-Label>
|
<dict-Label
|
||||||
|
class="mar_ri10"
|
||||||
|
dictType="sex"
|
||||||
|
:value="userInfo.sex"
|
||||||
|
></dict-Label>
|
||||||
<text class="mar_ri10">{{ userInfo.age }}岁</text>
|
<text class="mar_ri10">{{ userInfo.age }}岁</text>
|
||||||
<dict-Label class="mar_ri10" dictType="education" :value="userInfo.education"></dict-Label>
|
<dict-Label
|
||||||
<dict-Label class="mar_ri10" dictType="affiliation" :value="userInfo.politicalAffiliation"></dict-Label>
|
class="mar_ri10"
|
||||||
|
dictType="education"
|
||||||
|
:value="userInfo.education"
|
||||||
|
></dict-Label>
|
||||||
|
<dict-Label
|
||||||
|
class="mar_ri10"
|
||||||
|
dictType="affiliation"
|
||||||
|
:value="userInfo.politicalAffiliation"
|
||||||
|
></dict-Label>
|
||||||
</view>
|
</view>
|
||||||
<view class="subName">{{ userInfo.phone }}</view>
|
<view class="subName">{{ userInfo.phone }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="tops-right">
|
<view class="tops-right">
|
||||||
<view class="right-imghead">
|
<view class="right-imghead">
|
||||||
<image v-if="userInfo.avatar" :src="userInfo.avatar"></image>
|
<image v-if="userInfo.avatar" :src="userInfo.avatar"></image>
|
||||||
<image v-else-if="userInfo.sex == '0'" src="@/static/icon/boy.png"></image>
|
<image
|
||||||
|
v-else-if="userInfo.sex == '0'"
|
||||||
|
src="@/static/icon/boy.png"
|
||||||
|
></image>
|
||||||
<image v-else src="@/static/icon/girl.png"></image>
|
<image v-else src="@/static/icon/girl.png"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="right-sex">
|
<view class="right-sex">
|
||||||
<image v-if="userInfo.sex === '0'" src="@/static/icon/boy1.png"></image>
|
<image
|
||||||
|
v-if="userInfo.sex === '0'"
|
||||||
|
src="@/static/icon/boy1.png"
|
||||||
|
></image>
|
||||||
<image v-else src="@/static/icon/girl1.png"></image>
|
<image v-else src="@/static/icon/girl1.png"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -43,19 +68,34 @@
|
|||||||
<view class="mys-info btn-feel">
|
<view class="mys-info btn-feel">
|
||||||
<view class="mys-h4">
|
<view class="mys-h4">
|
||||||
<view>求职期望</view>
|
<view>求职期望</view>
|
||||||
<image class="icon" src="@/static/icon/edit1.png" @click="navTo('/packageA/pages/jobExpect/jobExpect')"></image>
|
<image
|
||||||
|
class="icon"
|
||||||
|
src="@/static/icon/edit1.png"
|
||||||
|
@click="navTo('/packageA/pages/jobExpect/jobExpect')"
|
||||||
|
></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="mys-text">
|
<view class="mys-text">
|
||||||
<text>期望薪资:</text>
|
<text>期望薪资:</text>
|
||||||
<text>{{ userInfo.salaryMin / 1000 }}k-{{ userInfo.salaryMax / 1000 }}k</text>
|
<text
|
||||||
|
>{{ userInfo.salaryMin / 1000 }}k-{{
|
||||||
|
userInfo.salaryMax / 1000
|
||||||
|
}}k</text
|
||||||
|
>
|
||||||
</view>
|
</view>
|
||||||
<view class="mys-text">
|
<view class="mys-text">
|
||||||
<text>期望工作地:</text>
|
<text>期望工作地:</text>
|
||||||
<text>青岛市-</text>
|
<text>青岛市-</text>
|
||||||
<dict-Label dictType="area" :value="Number(userInfo.area)"></dict-Label>
|
<dict-Label
|
||||||
|
dictType="area"
|
||||||
|
:value="Number(userInfo.area)"
|
||||||
|
></dict-Label>
|
||||||
</view>
|
</view>
|
||||||
<view class="mys-list">
|
<view class="mys-list">
|
||||||
<view class="cards button-click" v-for="(title, index) in userInfo.jobTitle" :key="index">
|
<view
|
||||||
|
class="cards button-click"
|
||||||
|
v-for="(title, index) in userInfo.jobTitle"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
{{ title }}
|
{{ title }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -65,19 +105,35 @@
|
|||||||
<view class="mys-info" style="padding: 0">
|
<view class="mys-info" style="padding: 0">
|
||||||
<view class="mys-h4 btn-feel">
|
<view class="mys-h4 btn-feel">
|
||||||
<text>工作经历</text>
|
<text>工作经历</text>
|
||||||
<view class="mys-edit-icon btn-feel" @click="navTo('/packageA/pages/workExp/workExp')">
|
<view
|
||||||
<image class="icon button-click btn-feel" src="@/static/icon/plus.png"></image>
|
class="mys-edit-icon btn-feel"
|
||||||
|
@click="navTo('/packageA/pages/workExp/workExp')"
|
||||||
|
>
|
||||||
|
<image
|
||||||
|
class="icon button-click btn-feel"
|
||||||
|
src="@/static/icon/plus.png"
|
||||||
|
></image>
|
||||||
<view class="txt">添加</view>
|
<view class="txt">添加</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="exp-item btn-feel" v-for="item in userInfo.workExp" :key="item.id">
|
<view
|
||||||
|
class="exp-item btn-feel"
|
||||||
|
v-for="item in userInfo.workExp"
|
||||||
|
:key="item.id"
|
||||||
|
>
|
||||||
<view class="fl_box fl_justbet mar_top15">
|
<view class="fl_box fl_justbet mar_top15">
|
||||||
<view class="fs_16">{{ item.company }}</view>
|
<view class="fs_16">{{ item.company }}</view>
|
||||||
<image class="icon btn-feel" src="@/static/icon/edit1.png" @click="navTo(`/packageA/pages/workExp/workExp?id=${item.id}`)"></image>
|
<image
|
||||||
|
class="icon btn-feel"
|
||||||
|
src="@/static/icon/edit1.png"
|
||||||
|
@click="navTo(`/packageA/pages/workExp/workExp?id=${item.id}`)"
|
||||||
|
></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="mys-text fl_box fl_justbet">
|
<view class="mys-text fl_box fl_justbet">
|
||||||
<text class="color_333333 fs_14">{{ item.position }}</text>
|
<text class="color_333333 fs_14">{{ item.position }}</text>
|
||||||
<text class="datetext">{{ item.startTime }}--{{ item.endTime || "至今" }}</text>
|
<text class="datetext"
|
||||||
|
>{{ item.startTime }}--{{ item.endTime || "至今" }}</text
|
||||||
|
>
|
||||||
</view>
|
</view>
|
||||||
<view class="mys-text">
|
<view class="mys-text">
|
||||||
<text>{{ item.duty }}</text>
|
<text>{{ item.duty }}</text>
|
||||||
@@ -88,7 +144,9 @@
|
|||||||
</view>
|
</view>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<view class="footer-container">
|
<view class="footer-container">
|
||||||
<view class="footer-button btn-feel">上传简历</view>
|
<view class="footer-button btn-feel" @click="chooseResume"
|
||||||
|
>上传简历</view
|
||||||
|
>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</AppLayout>
|
</AppLayout>
|
||||||
@@ -104,6 +162,69 @@ import useDictStore from "@/stores/useDictStore";
|
|||||||
const { userInfo } = storeToRefs(useUserStore());
|
const { userInfo } = storeToRefs(useUserStore());
|
||||||
const { getUserResume } = useUserStore();
|
const { getUserResume } = useUserStore();
|
||||||
const { getDictData, oneDictData } = useDictStore();
|
const { getDictData, oneDictData } = useDictStore();
|
||||||
|
import config from "@/config.js";
|
||||||
|
|
||||||
|
onLoad(() => {
|
||||||
|
getUserResume();
|
||||||
|
});
|
||||||
|
|
||||||
|
function chooseResume() {
|
||||||
|
uni.chooseImage({
|
||||||
|
sizeType: ["original", "compressed"],
|
||||||
|
sourceType: ["album", "camera"],
|
||||||
|
count: 1,
|
||||||
|
success: ({ tempFilePaths, tempFiles }) => {
|
||||||
|
uploadResume(tempFilePaths[0], true)
|
||||||
|
.then((res) => {
|
||||||
|
res = JSON.parse(res);
|
||||||
|
getUserResume();
|
||||||
|
$api.msg("上传成功");
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
$api.msg("上传失败");
|
||||||
|
});
|
||||||
|
},
|
||||||
|
fail: (error) => {},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function uploadResume(tempFilePath, loading) {
|
||||||
|
if (loading) {
|
||||||
|
uni.showLoading({
|
||||||
|
title: "请稍后",
|
||||||
|
mask: true,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
let Authorization = "";
|
||||||
|
if (useUserStore().token) {
|
||||||
|
Authorization = `${useUserStore().token}`;
|
||||||
|
}
|
||||||
|
const header = {};
|
||||||
|
header["Authorization"] = encodeURIComponent(Authorization);
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
uni.uploadFile({
|
||||||
|
url: config.baseUrl + "/app/oss/uploadToObs",
|
||||||
|
filePath: tempFilePath,
|
||||||
|
name: "file",
|
||||||
|
header,
|
||||||
|
success: (uploadFileRes) => {
|
||||||
|
if (uploadFileRes.statusCode === 200) {
|
||||||
|
resolve(uploadFileRes.data);
|
||||||
|
} else {
|
||||||
|
reject();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fail: (err) => {
|
||||||
|
reject(err);
|
||||||
|
},
|
||||||
|
complete: () => {
|
||||||
|
if (loading) {
|
||||||
|
uni.hideLoading();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
|
|||||||
@@ -102,9 +102,9 @@
|
|||||||
<text class="title">竞争力分析</text>
|
<text class="title">竞争力分析</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="description">
|
<view class="description">
|
||||||
三个月内共15位求职者申请,你的简历匹配度为{{ raderData.matchScore }}分,排名位于第{{
|
三个月内共{{ raderData.totalApplicants }}位求职者申请,你的简历匹配度为{{
|
||||||
raderData.rank
|
raderData.matchScore
|
||||||
}}位,超过{{ raderData.percentile }}%的竞争者,处在优秀位置。
|
}}分,排名位于第{{ raderData.rank }}位,超过{{ raderData.percentile }}%的竞争者,处在优秀位置。
|
||||||
</view>
|
</view>
|
||||||
<RadarMap :value="raderData"></RadarMap>
|
<RadarMap :value="raderData"></RadarMap>
|
||||||
|
|
||||||
|
|||||||
@@ -37,8 +37,8 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="des-card" style="margin-top: 24rpx">
|
<view class="des-card" style="margin-top: 24rpx">
|
||||||
<view class="fl_box fl_justbet">
|
<view class="fl_box fl_justbet">
|
||||||
<view>求职意向岗位</view>
|
<view style="white-space:nowrap">求职意向岗位</view>
|
||||||
<view>{{ userInfo.jobIntention || "-" }}</view>
|
<view class="line_1" style="padding-left:40rpx" >{{ userInfo.jobIntention || userInfo.jobTitle?.join(',') || '-' }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="fl_box fl_justbet">
|
<view class="fl_box fl_justbet">
|
||||||
<view>毕业学校</view>
|
<view>毕业学校</view>
|
||||||
|
|||||||
534
pages.json
@@ -1,288 +1,284 @@
|
|||||||
{
|
{
|
||||||
"pages": [
|
"pages": [
|
||||||
//pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
|
//pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
|
||||||
{
|
|
||||||
"path": "pages/index/index",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "青岛智慧就业平台",
|
|
||||||
// #ifdef H5
|
|
||||||
"navigationStyle": "custom"
|
|
||||||
// #endif
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/mine/mine",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "我的",
|
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/msglog/msglog",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "消息",
|
|
||||||
"navigationStyle": "custom",
|
|
||||||
"enablePullDownRefresh": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/careerfair/careerfair",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "招聘会",
|
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/login/login",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "AI+就业服务程序",
|
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/nearby/nearby",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "附近",
|
|
||||||
"navigationBarBackgroundColor": "#4778EC",
|
|
||||||
"navigationBarTextStyle": "white",
|
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/chat/chat",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "AI+",
|
|
||||||
"navigationBarBackgroundColor": "#4778EC",
|
|
||||||
"navigationBarTextStyle": "white",
|
|
||||||
"enablePullDownRefresh": false,
|
|
||||||
// #ifdef H5
|
|
||||||
"navigationStyle": "custom"
|
|
||||||
//#endif
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/search/search",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "",
|
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"subpackages": [
|
|
||||||
{
|
|
||||||
"root": "packageA",
|
|
||||||
"pages": [
|
|
||||||
{
|
{
|
||||||
"path": "pages/choiceness/choiceness",
|
"path": "pages/index/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "精选",
|
"navigationBarTitleText": "青岛智慧就业平台",
|
||||||
"navigationBarBackgroundColor": "#4778EC",
|
// #ifdef H5
|
||||||
"navigationBarTextStyle": "white",
|
"navigationStyle": "custom"
|
||||||
"navigationStyle": "custom"
|
// #endif
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/post/post",
|
"path": "pages/mine/mine",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "职位详情",
|
"navigationBarTitleText": "我的",
|
||||||
"navigationBarBackgroundColor": "#4778EC",
|
"navigationStyle": "custom"
|
||||||
"navigationBarTextStyle": "white",
|
}
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/UnitDetails/UnitDetails",
|
"path": "pages/msglog/msglog",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "单位详情",
|
"navigationBarTitleText": "消息",
|
||||||
"navigationBarBackgroundColor": "#4778EC",
|
"navigationStyle": "custom",
|
||||||
"navigationBarTextStyle": "white",
|
"enablePullDownRefresh": false
|
||||||
"navigationStyle": "custom"
|
}
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/exhibitors/exhibitors",
|
"path": "pages/careerfair/careerfair",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "参展单位",
|
"navigationBarTitleText": "招聘会",
|
||||||
"navigationBarBackgroundColor": "#4778EC",
|
"navigationStyle": "custom"
|
||||||
"navigationBarTextStyle": "white",
|
}
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/myResume/myResume",
|
"path": "pages/login/login",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "我的简历",
|
"navigationBarTitleText": "AI+就业服务程序",
|
||||||
"navigationBarBackgroundColor": "#FFFFFF",
|
"navigationStyle": "custom"
|
||||||
"navigationStyle": "custom"
|
}
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/vCard/vCard",
|
"path": "pages/nearby/nearby",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "点子名片",
|
"navigationBarTitleText": "附近",
|
||||||
"navigationBarBackgroundColor": "#FFFFFF",
|
"navigationBarBackgroundColor": "#4778EC",
|
||||||
"navigationStyle": "custom"
|
"navigationBarTextStyle": "white",
|
||||||
}
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/Intendedposition/Intendedposition",
|
"path": "pages/chat/chat",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "投递记录",
|
"navigationBarTitleText": "AI+",
|
||||||
"navigationBarBackgroundColor": "#FFFFFF"
|
"navigationBarBackgroundColor": "#4778EC",
|
||||||
}
|
"navigationBarTextStyle": "white",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
// #ifdef H5
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
//#endif
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/collection/collection",
|
"path": "pages/search/search",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "我的收藏",
|
"navigationBarTitleText": "",
|
||||||
"navigationBarBackgroundColor": "#FFFFFF",
|
"navigationStyle": "custom"
|
||||||
"navigationStyle": "custom"
|
}
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/browseJob/browseJob",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "我的浏览",
|
|
||||||
"navigationBarBackgroundColor": "#FFFFFF",
|
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/addPosition/addPosition",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "添加岗位",
|
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/selectDate/selectDate",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "",
|
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/personalInfo/personalInfo",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "个人信息",
|
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/jobExpect/jobExpect",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "求职期望",
|
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/workExp/workExp",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "工作经历",
|
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/reservation/reservation",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "我的预约",
|
|
||||||
"navigationBarBackgroundColor": "#FFFFFF"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/choicenessList/choicenessList",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "精选企业",
|
|
||||||
"navigationBarBackgroundColor": "#FFFFFF",
|
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/newJobPosition/newJobPosition",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "新职位推荐",
|
|
||||||
"navigationBarBackgroundColor": "#FFFFFF"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/systemNotification/systemNotification",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "系统通知",
|
|
||||||
"navigationBarBackgroundColor": "#FFFFFF"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/tiktok/tiktok",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "",
|
|
||||||
"navigationBarBackgroundColor": "#FFFFFF",
|
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/moreJobs/moreJobs",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "更多岗位",
|
|
||||||
"navigationBarBackgroundColor": "#FFFFFF"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
}
|
"subpackages": [{
|
||||||
],
|
"root": "packageA",
|
||||||
"tabBar": {
|
"pages": [{
|
||||||
"custom": true,
|
"path": "pages/choiceness/choiceness",
|
||||||
"display": "none",
|
"style": {
|
||||||
"color": "#5E5F60",
|
"navigationBarTitleText": "精选",
|
||||||
"selectedColor": "#256BFA",
|
"navigationBarBackgroundColor": "#4778EC",
|
||||||
"borderStyle": "black",
|
"navigationBarTextStyle": "white",
|
||||||
"backgroundColor": "#ffffff",
|
"navigationStyle": "custom"
|
||||||
"midButton": {
|
}
|
||||||
"width": "50px",
|
},
|
||||||
"height": "50px",
|
{
|
||||||
"backgroundImage": "static/tabbar/logo2copy.png"
|
"path": "pages/post/post",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "职位详情",
|
||||||
|
"navigationBarBackgroundColor": "#4778EC",
|
||||||
|
"navigationBarTextStyle": "white",
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/UnitDetails/UnitDetails",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "单位详情",
|
||||||
|
"navigationBarBackgroundColor": "#4778EC",
|
||||||
|
"navigationBarTextStyle": "white",
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/exhibitors/exhibitors",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "参展单位",
|
||||||
|
"navigationBarBackgroundColor": "#4778EC",
|
||||||
|
"navigationBarTextStyle": "white",
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/myResume/myResume",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "我的简历",
|
||||||
|
"navigationBarBackgroundColor": "#FFFFFF",
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/vCard/vCard",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "点子名片",
|
||||||
|
"navigationBarBackgroundColor": "#FFFFFF",
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/Intendedposition/Intendedposition",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "投递记录",
|
||||||
|
"navigationBarBackgroundColor": "#FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/collection/collection",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "我的收藏",
|
||||||
|
"navigationBarBackgroundColor": "#FFFFFF",
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/browseJob/browseJob",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "我的浏览",
|
||||||
|
"navigationBarBackgroundColor": "#FFFFFF",
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/addPosition/addPosition",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "添加岗位",
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/selectDate/selectDate",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "",
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/personalInfo/personalInfo",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "个人信息",
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/jobExpect/jobExpect",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "求职期望",
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/workExp/workExp",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "工作经历",
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/reservation/reservation",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "我的预约",
|
||||||
|
"navigationBarBackgroundColor": "#FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/choicenessList/choicenessList",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "精选企业",
|
||||||
|
"navigationBarBackgroundColor": "#FFFFFF",
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/newJobPosition/newJobPosition",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "新职位推荐",
|
||||||
|
"navigationBarBackgroundColor": "#FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/systemNotification/systemNotification",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "系统通知",
|
||||||
|
"navigationBarBackgroundColor": "#FFFFFF"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/tiktok/tiktok",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "",
|
||||||
|
"navigationBarBackgroundColor": "#FFFFFF",
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/moreJobs/moreJobs",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "更多岗位",
|
||||||
|
"navigationBarBackgroundColor": "#FFFFFF"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}],
|
||||||
|
"tabBar": {
|
||||||
|
"custom": true,
|
||||||
|
"display": "none",
|
||||||
|
"color": "#5E5F60",
|
||||||
|
"selectedColor": "#256BFA",
|
||||||
|
"borderStyle": "black",
|
||||||
|
"backgroundColor": "#ffffff",
|
||||||
|
"midButton": {
|
||||||
|
"width": "50px",
|
||||||
|
"height": "50px",
|
||||||
|
"backgroundImage": "static/tabbar/logo2copy.png"
|
||||||
|
},
|
||||||
|
"list": [{
|
||||||
|
"pagePath": "pages/index/index",
|
||||||
|
"iconPath": "static/tabbar/calendar.png",
|
||||||
|
"selectedIconPath": "static/tabbar/calendared.png",
|
||||||
|
"text": "职位"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pagePath": "pages/careerfair/careerfair",
|
||||||
|
"iconPath": "static/tabbar/post.png",
|
||||||
|
"selectedIconPath": "static/tabbar/posted.png",
|
||||||
|
"text": "招聘会"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pagePath": "pages/chat/chat",
|
||||||
|
"iconPath": "static/tabbar/logo3.png",
|
||||||
|
"selectedIconPath": "static/tabbar/logo3.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pagePath": "pages/msglog/msglog",
|
||||||
|
"iconPath": "static/tabbar/chat4.png",
|
||||||
|
"selectedIconPath": "static/tabbar/chat4ed.png",
|
||||||
|
"text": "消息"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pagePath": "pages/mine/mine",
|
||||||
|
"iconPath": "static/tabbar/mine.png",
|
||||||
|
"selectedIconPath": "static/tabbar/mined.png",
|
||||||
|
"text": "我的"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"list": [
|
"globalStyle": {
|
||||||
{
|
"navigationBarTextStyle": "black",
|
||||||
"pagePath": "pages/index/index",
|
"navigationBarTitleText": "uni-app",
|
||||||
"iconPath": "static/tabbar/calendar.png",
|
"navigationBarBackgroundColor": "#F8F8F8",
|
||||||
"selectedIconPath": "static/tabbar/calendared.png",
|
"backgroundColor": "#F8F8F8",
|
||||||
"text": "职位"
|
// "enablePullDownRefresh": false,
|
||||||
},
|
// "navigationStyle": "custom",
|
||||||
{
|
"rpxCalcBaseDeviceWidth": 375,
|
||||||
"pagePath": "pages/careerfair/careerfair",
|
"rpxCalcMaxDeviceWidth": 750,
|
||||||
"iconPath": "static/tabbar/post.png",
|
"rpxCalcIncludeWidth": 750
|
||||||
"selectedIconPath": "static/tabbar/posted.png",
|
},
|
||||||
"text": "招聘会"
|
"uniIdRouter": {}
|
||||||
},
|
|
||||||
{
|
|
||||||
"pagePath": "pages/chat/chat",
|
|
||||||
"iconPath": "static/tabbar/logo3.png",
|
|
||||||
"selectedIconPath": "static/tabbar/logo3.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pagePath": "pages/msglog/msglog",
|
|
||||||
"iconPath": "static/tabbar/chat4.png",
|
|
||||||
"selectedIconPath": "static/tabbar/chat4ed.png",
|
|
||||||
"text": "消息"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pagePath": "pages/mine/mine",
|
|
||||||
"iconPath": "static/tabbar/mine.png",
|
|
||||||
"selectedIconPath": "static/tabbar/mined.png",
|
|
||||||
"text": "我的"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"globalStyle": {
|
|
||||||
"navigationBarTextStyle": "black",
|
|
||||||
"navigationBarTitleText": "uni-app",
|
|
||||||
"navigationBarBackgroundColor": "#F8F8F8",
|
|
||||||
"backgroundColor": "#F8F8F8",
|
|
||||||
// "enablePullDownRefresh": false,
|
|
||||||
// "navigationStyle": "custom",
|
|
||||||
"rpxCalcBaseDeviceWidth": 375,
|
|
||||||
"rpxCalcMaxDeviceWidth": 750,
|
|
||||||
"rpxCalcIncludeWidth": 750
|
|
||||||
},
|
|
||||||
"uniIdRouter": {}
|
|
||||||
}
|
}
|
||||||
@@ -250,8 +250,6 @@ import {
|
|||||||
ref,
|
ref,
|
||||||
inject,
|
inject,
|
||||||
nextTick,
|
nextTick,
|
||||||
defineProps,
|
|
||||||
defineEmits,
|
|
||||||
onMounted,
|
onMounted,
|
||||||
onUnmounted,
|
onUnmounted,
|
||||||
toRaw,
|
toRaw,
|
||||||
@@ -448,7 +446,7 @@ const scrollToBottom = throttle(function () {
|
|||||||
}, 500);
|
}, 500);
|
||||||
|
|
||||||
function getGuess() {
|
function getGuess() {
|
||||||
$api.chatRequest('/guest', { sessionId: chatSessionID.value }, 'POST').then((res) => {
|
$api.chatRequest('/app/chat/guest', { sessionId: chatSessionID.value }, 'POST').then((res) => {
|
||||||
guessList.value = res.data;
|
guessList.value = res.data;
|
||||||
showGuess.value = true;
|
showGuess.value = true;
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, inject, defineEmits } from 'vue';
|
import { ref, inject } from 'vue';
|
||||||
const emit = defineEmits(['onSend']);
|
const emit = defineEmits(['onSend']);
|
||||||
const { $api } = inject('globalFunction');
|
const { $api } = inject('globalFunction');
|
||||||
const popup = ref(null);
|
const popup = ref(null);
|
||||||
|
|||||||
370
pages/index/components/AIMatch.vue
Normal file
@@ -0,0 +1,370 @@
|
|||||||
|
<template>
|
||||||
|
<view class="container" id="pixi-box" ref="pixiContainerRef"></view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { onMounted, onUnmounted, ref, nextTick } from 'vue';
|
||||||
|
const emit = defineEmits(['tag-click']);
|
||||||
|
|
||||||
|
// DOM Ref
|
||||||
|
const pixiContainerRef = ref(null);
|
||||||
|
|
||||||
|
// PIXI 变量
|
||||||
|
let app = null;
|
||||||
|
let tagsContainer = null;
|
||||||
|
let activeTagInstances = [];
|
||||||
|
|
||||||
|
// 配置数据
|
||||||
|
const mockTags = [
|
||||||
|
{ name: '医生', bgColor: 0x0069fe, fontColor: 0xffffff, size: 17, opacity: 1.0, angle: 0, radius: 0 },
|
||||||
|
{
|
||||||
|
name: '工程师',
|
||||||
|
bgColor: 0x87e2ec,
|
||||||
|
fontColor: 0xffffff,
|
||||||
|
size: 14,
|
||||||
|
opacity: 1,
|
||||||
|
angle: -Math.PI / 2,
|
||||||
|
radius: 68,
|
||||||
|
tailRotation: Math.PI / 2,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '建筑师',
|
||||||
|
bgColor: 0xffebeb,
|
||||||
|
tailColor: 0xffe1e1,
|
||||||
|
fontColor: 0xff6969,
|
||||||
|
size: 11.5,
|
||||||
|
opacity: 1,
|
||||||
|
angle: -Math.PI / 4.2,
|
||||||
|
radius: 125,
|
||||||
|
tailRotation: (3 * Math.PI) / 4,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '律师',
|
||||||
|
bgColor: 0x21ea85,
|
||||||
|
fontColor: 0xffffff,
|
||||||
|
size: 15,
|
||||||
|
opacity: 1,
|
||||||
|
angle: -Math.PI / 10,
|
||||||
|
radius: 130,
|
||||||
|
tailRotation: (3 * Math.PI) / 4,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '记者',
|
||||||
|
bgColor: 0xebf3ff,
|
||||||
|
tailColor: 0xb9d3ff,
|
||||||
|
fontColor: 0x1d71ef,
|
||||||
|
size: 12,
|
||||||
|
opacity: 1,
|
||||||
|
angle: Math.PI / 120,
|
||||||
|
radius: 130,
|
||||||
|
tailRotation: (3 * Math.PI) / 3.4,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '程序员',
|
||||||
|
bgColor: 0xffd4b6,
|
||||||
|
fontColor: 0xffffff,
|
||||||
|
size: 14,
|
||||||
|
opacity: 1,
|
||||||
|
angle: Math.PI / 7,
|
||||||
|
radius: 120,
|
||||||
|
tailRotation: (5 * Math.PI) / 4,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '摄影师',
|
||||||
|
bgColor: 0xd8e5fe,
|
||||||
|
tailColor: 0xb9d3ff,
|
||||||
|
fontColor: 0x1d71ef,
|
||||||
|
size: 11,
|
||||||
|
opacity: 1,
|
||||||
|
angle: Math.PI / 3,
|
||||||
|
radius: 79,
|
||||||
|
tailRotation: (3 * Math.PI) / 2,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '设计师',
|
||||||
|
bgColor: 0xff9400,
|
||||||
|
fontColor: 0xffffff,
|
||||||
|
size: 14,
|
||||||
|
opacity: 1,
|
||||||
|
angle: (2 * Math.PI) / 3,
|
||||||
|
radius: 92,
|
||||||
|
tailRotation: (7 * Math.PI) / 4,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '心理咨询师',
|
||||||
|
bgColor: 0xebf3ff,
|
||||||
|
tailColor: 0xb9d3ff,
|
||||||
|
fontColor: 0x1d71ef,
|
||||||
|
size: 10.5,
|
||||||
|
opacity: 1,
|
||||||
|
angle: (5.4 * Math.PI) / 6,
|
||||||
|
radius: 110,
|
||||||
|
tailRotation:(3 * Math.PI) /1.78,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '护士',
|
||||||
|
bgColor: 0xff6969,
|
||||||
|
fontColor: 0xffffff,
|
||||||
|
size: 15,
|
||||||
|
opacity: 1,
|
||||||
|
angle: (6.3 * Math.PI) / 5.9,
|
||||||
|
radius: 110,
|
||||||
|
tailRotation: Math.PI / 4,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '会计',
|
||||||
|
bgColor: 0xfce9c9,
|
||||||
|
fontColor: 0xfbc55f,
|
||||||
|
size: 13,
|
||||||
|
opacity: 1,
|
||||||
|
angle: (7.2 * Math.PI) / 5.9,
|
||||||
|
radius: 120,
|
||||||
|
tailRotation: Math.PI / 4,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
await nextTick();
|
||||||
|
setTimeout(() => {
|
||||||
|
initPixi();
|
||||||
|
}, 100);
|
||||||
|
window.addEventListener('resize', handleResize);
|
||||||
|
});
|
||||||
|
|
||||||
|
onUnmounted(() => {
|
||||||
|
window.removeEventListener('resize', handleResize);
|
||||||
|
if (app) {
|
||||||
|
app.destroy(true, { children: true, texture: true, baseTexture: true });
|
||||||
|
app = null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const getContainerDOM = () => {
|
||||||
|
const refVal = pixiContainerRef.value;
|
||||||
|
if (!refVal) return document.getElementById('pixi-box');
|
||||||
|
if (refVal.$el) return refVal.$el;
|
||||||
|
return refVal;
|
||||||
|
};
|
||||||
|
|
||||||
|
const clamp = (num, min, max) => Math.min(Math.max(num, min), max);
|
||||||
|
|
||||||
|
const initPixi = () => {
|
||||||
|
const container = getContainerDOM();
|
||||||
|
if (!container) return;
|
||||||
|
|
||||||
|
const width = container.clientWidth || 300;
|
||||||
|
const height = container.clientHeight || 300;
|
||||||
|
|
||||||
|
if (app) return;
|
||||||
|
|
||||||
|
app = new PIXI.Application({
|
||||||
|
width: width,
|
||||||
|
height: height,
|
||||||
|
backgroundAlpha: 0,
|
||||||
|
backgroundColor: 0xf5f7fa,
|
||||||
|
antialias: true,
|
||||||
|
resolution: window.devicePixelRatio || 1,
|
||||||
|
autoDensity: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
container.appendChild(app.view);
|
||||||
|
|
||||||
|
tagsContainer = new PIXI.Container();
|
||||||
|
app.stage.addChild(tagsContainer);
|
||||||
|
|
||||||
|
renderScene(width, height);
|
||||||
|
};
|
||||||
|
|
||||||
|
const renderScene = (sw, sh) => {
|
||||||
|
tagsContainer.removeChildren();
|
||||||
|
activeTagInstances = [];
|
||||||
|
|
||||||
|
const baseSize = 375;
|
||||||
|
const scaleFactor = (Math.min(sw, sh) / baseSize) * 0.9;
|
||||||
|
|
||||||
|
mockTags.forEach((data, index) => {
|
||||||
|
const scaledRadius = data.radius * (scaleFactor < 1 ? 1 : scaleFactor * 0.8);
|
||||||
|
|
||||||
|
let x = sw / 2 + scaledRadius * Math.cos(data.angle);
|
||||||
|
let y = sh / 2 + scaledRadius * Math.sin(data.angle);
|
||||||
|
|
||||||
|
const tag = createTag(data, index);
|
||||||
|
|
||||||
|
tagsContainer.addChild(tag);
|
||||||
|
|
||||||
|
const safeW = tag.width / 2 + 10;
|
||||||
|
const safeH = tag.height / 2 + 10;
|
||||||
|
|
||||||
|
// 强制修正 x 和 y,使其不超出屏幕
|
||||||
|
x = clamp(x, safeW, sw - safeW);
|
||||||
|
y = clamp(y, safeH, sh - safeH);
|
||||||
|
|
||||||
|
tag.x = x;
|
||||||
|
tag.y = y;
|
||||||
|
|
||||||
|
// 4. 保存元数据
|
||||||
|
tag.userData = {
|
||||||
|
originalX: x,
|
||||||
|
originalY: y,
|
||||||
|
angle: data.angle,
|
||||||
|
radius: scaledRadius,
|
||||||
|
floatOffset: Math.random() * Math.PI * 2,
|
||||||
|
floatSpeed: 0.01 + Math.random() * 0.02,
|
||||||
|
floatRange: 2 + Math.random() * 2,
|
||||||
|
safeH: safeH,
|
||||||
|
};
|
||||||
|
|
||||||
|
if (data.radius > 0) {
|
||||||
|
const tail = createCometTail( data.tailColor || data.bgColor, data.tailRotation, tag.width);
|
||||||
|
tag.addChildAt(tail, 0);
|
||||||
|
tag.updateTail = () => tail.updateAnim();
|
||||||
|
}
|
||||||
|
|
||||||
|
activeTagInstances.push(tag);
|
||||||
|
});
|
||||||
|
|
||||||
|
// 动画循环
|
||||||
|
app.ticker.add(() => {
|
||||||
|
const screenH = app.screen.height;
|
||||||
|
|
||||||
|
activeTagInstances.forEach((tag) => {
|
||||||
|
const meta = tag.userData;
|
||||||
|
if (meta) {
|
||||||
|
// 计算新的浮动位置
|
||||||
|
meta.floatOffset += meta.floatSpeed;
|
||||||
|
let nextY = meta.originalY + Math.sin(meta.floatOffset) * meta.floatRange;
|
||||||
|
|
||||||
|
// 再次进行边界检查
|
||||||
|
if (nextY < meta.safeH) nextY = meta.safeH;
|
||||||
|
if (nextY > screenH - meta.safeH) nextY = screenH - meta.safeH;
|
||||||
|
|
||||||
|
tag.y = nextY;
|
||||||
|
|
||||||
|
if (tag.updateTail) tag.updateTail();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const createTag = (tagData, index) => {
|
||||||
|
const tagGroup = new PIXI.Container();
|
||||||
|
tagGroup.eventMode = 'static';
|
||||||
|
tagGroup.cursor = 'pointer';
|
||||||
|
|
||||||
|
tagGroup.on('pointertap', () => emit('tag-click', tagData));
|
||||||
|
|
||||||
|
const text = new PIXI.Text(tagData.name, {
|
||||||
|
fontFamily: ['PingFang SC', 'Microsoft YaHei', 'Arial'],
|
||||||
|
fontSize: tagData.size,
|
||||||
|
fill: tagData.fontColor,
|
||||||
|
padding: 4,
|
||||||
|
resolution: 2,
|
||||||
|
});
|
||||||
|
text.anchor.set(0.5);
|
||||||
|
|
||||||
|
const paddingH = 26;
|
||||||
|
const paddingV = 10;
|
||||||
|
let bgWidth = text.width + paddingH;
|
||||||
|
let bgHeight = text.height + paddingV;
|
||||||
|
|
||||||
|
if (index === 0) bgWidth = Math.max(bgWidth, tagData.size * 4.5);
|
||||||
|
|
||||||
|
const bg = new PIXI.Graphics();
|
||||||
|
bg.beginFill(tagData.bgColor, tagData.opacity ?? 1);
|
||||||
|
bg.drawRoundedRect(-bgWidth / 2, -bgHeight / 2, bgWidth, bgHeight, bgHeight / 2);
|
||||||
|
bg.endFill();
|
||||||
|
|
||||||
|
tagGroup.addChild(bg);
|
||||||
|
tagGroup.addChild(text);
|
||||||
|
|
||||||
|
return tagGroup;
|
||||||
|
};
|
||||||
|
|
||||||
|
const createCometTail = (bgColor, tailRotation, parentWidth) => {
|
||||||
|
const tailGroup = new PIXI.Container();
|
||||||
|
const graphics = new PIXI.Graphics();
|
||||||
|
tailGroup.addChild(graphics);
|
||||||
|
|
||||||
|
const baseLength = 45;
|
||||||
|
const startWidth = parentWidth * 0.6;
|
||||||
|
const endWidth = 20;
|
||||||
|
|
||||||
|
let breathPhase = Math.random() * Math.PI * 2;
|
||||||
|
const breathSpeed = 0.04;
|
||||||
|
|
||||||
|
tailGroup.updateAnim = () => {
|
||||||
|
breathPhase += breathSpeed;
|
||||||
|
const breathScale = 0.85 + 0.15 * Math.sin(breathPhase);
|
||||||
|
graphics.clear();
|
||||||
|
const currentLength = baseLength * breathScale;
|
||||||
|
|
||||||
|
const cos = Math.cos(tailRotation);
|
||||||
|
const sin = Math.sin(tailRotation);
|
||||||
|
const perpX = -sin;
|
||||||
|
const perpY = cos;
|
||||||
|
|
||||||
|
const p1 = { x: perpX * (startWidth / 2), y: perpY * (startWidth / 2) };
|
||||||
|
const p2 = { x: -perpX * (startWidth / 2), y: -perpY * (startWidth / 2) };
|
||||||
|
const endCX = cos * currentLength;
|
||||||
|
const endCY = sin * currentLength;
|
||||||
|
const p3 = { x: endCX - perpX * (endWidth / 2), y: endCY - perpY * (endWidth / 2) };
|
||||||
|
const p4 = { x: endCX + perpX * (endWidth / 2), y: endCY + perpY * (endWidth / 2) };
|
||||||
|
|
||||||
|
const segments = 8;
|
||||||
|
for (let i = 0; i < segments; i++) {
|
||||||
|
const t1 = i / segments;
|
||||||
|
const t2 = (i + 1) / segments;
|
||||||
|
const alpha = 0.4 * (1 - t1);
|
||||||
|
const sp1 = { x: p1.x + (p4.x - p1.x) * t1, y: p1.y + (p4.y - p1.y) * t1 };
|
||||||
|
const sp2 = { x: p2.x + (p3.x - p2.x) * t1, y: p2.y + (p3.y - p2.y) * t1 };
|
||||||
|
const ep1 = { x: p1.x + (p4.x - p1.x) * t2, y: p1.y + (p4.y - p1.y) * t2 };
|
||||||
|
const ep2 = { x: p2.x + (p3.x - p2.x) * t2, y: p2.y + (p3.y - p2.y) * t2 };
|
||||||
|
graphics.beginFill(bgColor, alpha);
|
||||||
|
graphics.moveTo(sp1.x, sp1.y);
|
||||||
|
graphics.lineTo(sp2.x, sp2.y);
|
||||||
|
graphics.lineTo(ep2.x, ep2.y);
|
||||||
|
graphics.lineTo(ep1.x, ep1.y);
|
||||||
|
graphics.endFill();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
tailGroup.updateAnim();
|
||||||
|
return tailGroup;
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleResize = () => {
|
||||||
|
const container = getContainerDOM();
|
||||||
|
if (!app || !container) return;
|
||||||
|
|
||||||
|
const w = container.clientWidth || 300;
|
||||||
|
const h = container.clientHeight || 300;
|
||||||
|
|
||||||
|
app.renderer.resize(w, h);
|
||||||
|
|
||||||
|
activeTagInstances.forEach((tag) => {
|
||||||
|
const meta = tag.userData;
|
||||||
|
if (!meta) return;
|
||||||
|
|
||||||
|
let newX = w / 2 + meta.radius * Math.cos(meta.angle);
|
||||||
|
let newY = h / 2 + meta.radius * Math.sin(meta.angle);
|
||||||
|
|
||||||
|
const safeW = tag.width / 2 + 10;
|
||||||
|
const safeH = tag.height / 2 + 10;
|
||||||
|
|
||||||
|
meta.originalX = clamp(newX, safeW, w - safeW);
|
||||||
|
meta.originalY = clamp(newY, safeH, h - safeH);
|
||||||
|
meta.safeH = safeH; // 更新安全高度
|
||||||
|
|
||||||
|
tag.x = meta.originalX;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.container {
|
||||||
|
width: 100%;
|
||||||
|
height: 500rpx;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
color: #b9d3ff;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -148,14 +148,14 @@
|
|||||||
<!-- 筛选 -->
|
<!-- 筛选 -->
|
||||||
<select-filter ref="selectFilterModel"></select-filter>
|
<select-filter ref="selectFilterModel"></select-filter>
|
||||||
|
|
||||||
<!-- <view class="maskFristEntry" v-if="maskFristEntry">
|
<view class="maskFristEntry" v-if="maskFristEntry">
|
||||||
<view class="entry-content">
|
<view class="entry-content">
|
||||||
<text class="text1">左滑查看视频</text>
|
<text class="text1">左滑查看视频</text>
|
||||||
<text class="text2">左滑查看视频</text>
|
<text class="text2">左滑查看视频</text>
|
||||||
<view class="goExperience">去体验</view>
|
<view class="goExperience">去体验</view>
|
||||||
<view class="maskFristEntry-Close" @click="closeFristEntry">1</view>
|
<view class="maskFristEntry-Close" @click="closeFristEntry">1</view>
|
||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -183,7 +183,7 @@ const waterfallsFlowRef = ref(null);
|
|||||||
const loadmoreRef = ref(null);
|
const loadmoreRef = ref(null);
|
||||||
const conditionSearch = ref({});
|
const conditionSearch = ref({});
|
||||||
const waterfallcolumn = ref(2);
|
const waterfallcolumn = ref(2);
|
||||||
const maskFristEntry = ref(false);
|
const maskFristEntry = ref(true);
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
tabIndex: 'all',
|
tabIndex: 'all',
|
||||||
});
|
});
|
||||||
|
|||||||
1372
pages/index/components/index-refactor.vue
Normal file
@@ -47,11 +47,13 @@
|
|||||||
import { reactive, inject, watch, ref, onMounted } from 'vue';
|
import { reactive, inject, watch, ref, onMounted } from 'vue';
|
||||||
import Tabbar from '@/components/tabbar/midell-box.vue';
|
import Tabbar from '@/components/tabbar/midell-box.vue';
|
||||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||||
|
import IndexRefactor from './components/index-refactor.vue';
|
||||||
import IndexOne from './components/index-one.vue';
|
import IndexOne from './components/index-one.vue';
|
||||||
import IndexTwo from './components/index-two.vue';
|
import IndexTwo from './components/index-two.vue';
|
||||||
const loadedMap = reactive([false, false]);
|
const loadedMap = reactive([false, false]);
|
||||||
const swiperRefs = [ref(null), ref(null)];
|
const swiperRefs = [ref(null), ref(null)];
|
||||||
const components = [IndexOne, IndexTwo];
|
// const components = [IndexOne, IndexTwo];
|
||||||
|
const components = [IndexRefactor, IndexTwo];
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import { useReadMsg } from '@/stores/useReadMsg';
|
import { useReadMsg } from '@/stores/useReadMsg';
|
||||||
const { unreadCount } = storeToRefs(useReadMsg());
|
const { unreadCount } = storeToRefs(useReadMsg());
|
||||||
|
|||||||
@@ -109,6 +109,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</tabcontrolVue>
|
</tabcontrolVue>
|
||||||
<SelectJobs ref="selectJobsModel"></SelectJobs>
|
<SelectJobs ref="selectJobsModel"></SelectJobs>
|
||||||
|
<view class="backdoor" @click="loginbackdoor">后门</view>
|
||||||
</AppLayout>
|
</AppLayout>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -149,7 +150,6 @@ const fromValue = reactive({
|
|||||||
});
|
});
|
||||||
|
|
||||||
onLoad((parmas) => {
|
onLoad((parmas) => {
|
||||||
console.log(parmas);
|
|
||||||
getTreeselect();
|
getTreeselect();
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -244,6 +244,23 @@ function getTreeselect() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function loginbackdoor() {
|
||||||
|
$api.createRequest('/app/mock/login', {}, 'post').then((resData) => {
|
||||||
|
$api.msg('模拟帐号密码测试登录成功');
|
||||||
|
loginSetToken(resData.token).then((resume) => {
|
||||||
|
if (resume.data.jobTitleId) {
|
||||||
|
// 设置推荐列表,每次退出登录都需要更新
|
||||||
|
useUserStore().initSeesionId();
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/index/index',
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
nextStep();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// 登录
|
// 登录
|
||||||
function loginTest() {
|
function loginTest() {
|
||||||
// uni.share({
|
// uni.share({
|
||||||
@@ -290,6 +307,12 @@ function complete() {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
|
.backdoor{
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
top: 500rpx;
|
||||||
|
background: red
|
||||||
|
}
|
||||||
.input-nx
|
.input-nx
|
||||||
position: relative
|
position: relative
|
||||||
border-bottom: 2rpx solid #EBEBEB
|
border-bottom: 2rpx solid #EBEBEB
|
||||||
|
|||||||
@@ -45,9 +45,7 @@
|
|||||||
<text v-if="userInfo.jobTitle.length - 1 !== index">|</text>
|
<text v-if="userInfo.jobTitle.length - 1 !== index">|</text>
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="top-btn button-click" >
|
<view class="top-btn button-click">电子名片</view>
|
||||||
电子名片
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="card-main">
|
<view class="card-main">
|
||||||
<view class="main-title">服务专区</view>
|
<view class="main-title">服务专区</view>
|
||||||
@@ -132,7 +130,6 @@ const isAbove90 = (percent) => parseFloat(percent) < 90;
|
|||||||
|
|
||||||
function getUserstatistics() {
|
function getUserstatistics() {
|
||||||
$api.createRequest('/app/user/statistics').then((resData) => {
|
$api.createRequest('/app/user/statistics').then((resData) => {
|
||||||
console.log(resData);
|
|
||||||
counts.value = resData.data;
|
counts.value = resData.data;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
static/icon/add-circle.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
static/icon/ai-card-bg.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
static/icon/bottom-card-bg.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
static/icon/flame3.png
Normal file
|
After Width: | Height: | Size: 987 B |
BIN
static/icon/index-robot.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
static/icon/index-search.png
Normal file
|
After Width: | Height: | Size: 683 B |
BIN
static/icon/index-text-bg.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
static/icon/index-text-bg2.png
Normal file
|
After Width: | Height: | Size: 5.3 KiB |
BIN
static/icon/item-bg-img1.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
static/icon/item-bg-img2.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
static/icon/item-bg-img3.png
Normal file
|
After Width: | Height: | Size: 9.7 KiB |
BIN
static/icon/item-bg-text.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
static/icon/leart-gold.png
Normal file
|
After Width: | Height: | Size: 778 B |
BIN
static/icon/match-card-bg.png
Normal file
|
After Width: | Height: | Size: 85 KiB |
BIN
static/icon/pintDate2.png
Normal file
|
After Width: | Height: | Size: 514 B |
BIN
static/icon/polygon-down.png
Normal file
|
After Width: | Height: | Size: 295 B |
BIN
static/icon/position-icon.png
Normal file
|
After Width: | Height: | Size: 555 B |
BIN
static/icon/top-card-bg.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
static/icon/video-mask.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
static/icon/work-img1.png
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
BIN
static/icon/work-img2.png
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
234
static/js/aes.js
Normal file
@@ -0,0 +1,234 @@
|
|||||||
|
;(function (root, factory, undef) {
|
||||||
|
if (typeof exports === "object") {
|
||||||
|
// CommonJS
|
||||||
|
module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core"));
|
||||||
|
}
|
||||||
|
else if (typeof define === "function" && define.amd) {
|
||||||
|
// AMD
|
||||||
|
define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Global (browser)
|
||||||
|
factory(root.CryptoJS);
|
||||||
|
}
|
||||||
|
}(this, function (CryptoJS) {
|
||||||
|
|
||||||
|
(function () {
|
||||||
|
// Shortcuts
|
||||||
|
var C = CryptoJS;
|
||||||
|
var C_lib = C.lib;
|
||||||
|
var BlockCipher = C_lib.BlockCipher;
|
||||||
|
var C_algo = C.algo;
|
||||||
|
|
||||||
|
// Lookup tables
|
||||||
|
var SBOX = [];
|
||||||
|
var INV_SBOX = [];
|
||||||
|
var SUB_MIX_0 = [];
|
||||||
|
var SUB_MIX_1 = [];
|
||||||
|
var SUB_MIX_2 = [];
|
||||||
|
var SUB_MIX_3 = [];
|
||||||
|
var INV_SUB_MIX_0 = [];
|
||||||
|
var INV_SUB_MIX_1 = [];
|
||||||
|
var INV_SUB_MIX_2 = [];
|
||||||
|
var INV_SUB_MIX_3 = [];
|
||||||
|
|
||||||
|
// Compute lookup tables
|
||||||
|
(function () {
|
||||||
|
// Compute double table
|
||||||
|
var d = [];
|
||||||
|
for (var i = 0; i < 256; i++) {
|
||||||
|
if (i < 128) {
|
||||||
|
d[i] = i << 1;
|
||||||
|
} else {
|
||||||
|
d[i] = (i << 1) ^ 0x11b;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Walk GF(2^8)
|
||||||
|
var x = 0;
|
||||||
|
var xi = 0;
|
||||||
|
for (var i = 0; i < 256; i++) {
|
||||||
|
// Compute sbox
|
||||||
|
var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4);
|
||||||
|
sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63;
|
||||||
|
SBOX[x] = sx;
|
||||||
|
INV_SBOX[sx] = x;
|
||||||
|
|
||||||
|
// Compute multiplication
|
||||||
|
var x2 = d[x];
|
||||||
|
var x4 = d[x2];
|
||||||
|
var x8 = d[x4];
|
||||||
|
|
||||||
|
// Compute sub bytes, mix columns tables
|
||||||
|
var t = (d[sx] * 0x101) ^ (sx * 0x1010100);
|
||||||
|
SUB_MIX_0[x] = (t << 24) | (t >>> 8);
|
||||||
|
SUB_MIX_1[x] = (t << 16) | (t >>> 16);
|
||||||
|
SUB_MIX_2[x] = (t << 8) | (t >>> 24);
|
||||||
|
SUB_MIX_3[x] = t;
|
||||||
|
|
||||||
|
// Compute inv sub bytes, inv mix columns tables
|
||||||
|
var t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100);
|
||||||
|
INV_SUB_MIX_0[sx] = (t << 24) | (t >>> 8);
|
||||||
|
INV_SUB_MIX_1[sx] = (t << 16) | (t >>> 16);
|
||||||
|
INV_SUB_MIX_2[sx] = (t << 8) | (t >>> 24);
|
||||||
|
INV_SUB_MIX_3[sx] = t;
|
||||||
|
|
||||||
|
// Compute next counter
|
||||||
|
if (!x) {
|
||||||
|
x = xi = 1;
|
||||||
|
} else {
|
||||||
|
x = x2 ^ d[d[d[x8 ^ x2]]];
|
||||||
|
xi ^= d[d[xi]];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}());
|
||||||
|
|
||||||
|
// Precomputed Rcon lookup
|
||||||
|
var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* AES block cipher algorithm.
|
||||||
|
*/
|
||||||
|
var AES = C_algo.AES = BlockCipher.extend({
|
||||||
|
_doReset: function () {
|
||||||
|
var t;
|
||||||
|
|
||||||
|
// Skip reset of nRounds has been set before and key did not change
|
||||||
|
if (this._nRounds && this._keyPriorReset === this._key) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Shortcuts
|
||||||
|
var key = this._keyPriorReset = this._key;
|
||||||
|
var keyWords = key.words;
|
||||||
|
var keySize = key.sigBytes / 4;
|
||||||
|
|
||||||
|
// Compute number of rounds
|
||||||
|
var nRounds = this._nRounds = keySize + 6;
|
||||||
|
|
||||||
|
// Compute number of key schedule rows
|
||||||
|
var ksRows = (nRounds + 1) * 4;
|
||||||
|
|
||||||
|
// Compute key schedule
|
||||||
|
var keySchedule = this._keySchedule = [];
|
||||||
|
for (var ksRow = 0; ksRow < ksRows; ksRow++) {
|
||||||
|
if (ksRow < keySize) {
|
||||||
|
keySchedule[ksRow] = keyWords[ksRow];
|
||||||
|
} else {
|
||||||
|
t = keySchedule[ksRow - 1];
|
||||||
|
|
||||||
|
if (!(ksRow % keySize)) {
|
||||||
|
// Rot word
|
||||||
|
t = (t << 8) | (t >>> 24);
|
||||||
|
|
||||||
|
// Sub word
|
||||||
|
t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff];
|
||||||
|
|
||||||
|
// Mix Rcon
|
||||||
|
t ^= RCON[(ksRow / keySize) | 0] << 24;
|
||||||
|
} else if (keySize > 6 && ksRow % keySize == 4) {
|
||||||
|
// Sub word
|
||||||
|
t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff];
|
||||||
|
}
|
||||||
|
|
||||||
|
keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Compute inv key schedule
|
||||||
|
var invKeySchedule = this._invKeySchedule = [];
|
||||||
|
for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) {
|
||||||
|
var ksRow = ksRows - invKsRow;
|
||||||
|
|
||||||
|
if (invKsRow % 4) {
|
||||||
|
var t = keySchedule[ksRow];
|
||||||
|
} else {
|
||||||
|
var t = keySchedule[ksRow - 4];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (invKsRow < 4 || ksRow <= 4) {
|
||||||
|
invKeySchedule[invKsRow] = t;
|
||||||
|
} else {
|
||||||
|
invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[(t >>> 16) & 0xff]] ^
|
||||||
|
INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
encryptBlock: function (M, offset) {
|
||||||
|
this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX);
|
||||||
|
},
|
||||||
|
|
||||||
|
decryptBlock: function (M, offset) {
|
||||||
|
// Swap 2nd and 4th rows
|
||||||
|
var t = M[offset + 1];
|
||||||
|
M[offset + 1] = M[offset + 3];
|
||||||
|
M[offset + 3] = t;
|
||||||
|
|
||||||
|
this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX);
|
||||||
|
|
||||||
|
// Inv swap 2nd and 4th rows
|
||||||
|
var t = M[offset + 1];
|
||||||
|
M[offset + 1] = M[offset + 3];
|
||||||
|
M[offset + 3] = t;
|
||||||
|
},
|
||||||
|
|
||||||
|
_doCryptBlock: function (M, offset, keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) {
|
||||||
|
// Shortcut
|
||||||
|
var nRounds = this._nRounds;
|
||||||
|
|
||||||
|
// Get input, add round key
|
||||||
|
var s0 = M[offset] ^ keySchedule[0];
|
||||||
|
var s1 = M[offset + 1] ^ keySchedule[1];
|
||||||
|
var s2 = M[offset + 2] ^ keySchedule[2];
|
||||||
|
var s3 = M[offset + 3] ^ keySchedule[3];
|
||||||
|
|
||||||
|
// Key schedule row counter
|
||||||
|
var ksRow = 4;
|
||||||
|
|
||||||
|
// Rounds
|
||||||
|
for (var round = 1; round < nRounds; round++) {
|
||||||
|
// Shift rows, sub bytes, mix columns, add round key
|
||||||
|
var t0 = SUB_MIX_0[s0 >>> 24] ^ SUB_MIX_1[(s1 >>> 16) & 0xff] ^ SUB_MIX_2[(s2 >>> 8) & 0xff] ^ SUB_MIX_3[s3 & 0xff] ^ keySchedule[ksRow++];
|
||||||
|
var t1 = SUB_MIX_0[s1 >>> 24] ^ SUB_MIX_1[(s2 >>> 16) & 0xff] ^ SUB_MIX_2[(s3 >>> 8) & 0xff] ^ SUB_MIX_3[s0 & 0xff] ^ keySchedule[ksRow++];
|
||||||
|
var t2 = SUB_MIX_0[s2 >>> 24] ^ SUB_MIX_1[(s3 >>> 16) & 0xff] ^ SUB_MIX_2[(s0 >>> 8) & 0xff] ^ SUB_MIX_3[s1 & 0xff] ^ keySchedule[ksRow++];
|
||||||
|
var t3 = SUB_MIX_0[s3 >>> 24] ^ SUB_MIX_1[(s0 >>> 16) & 0xff] ^ SUB_MIX_2[(s1 >>> 8) & 0xff] ^ SUB_MIX_3[s2 & 0xff] ^ keySchedule[ksRow++];
|
||||||
|
|
||||||
|
// Update state
|
||||||
|
s0 = t0;
|
||||||
|
s1 = t1;
|
||||||
|
s2 = t2;
|
||||||
|
s3 = t3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Shift rows, sub bytes, add round key
|
||||||
|
var t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++];
|
||||||
|
var t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++];
|
||||||
|
var t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++];
|
||||||
|
var t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++];
|
||||||
|
|
||||||
|
// Set output
|
||||||
|
M[offset] = t0;
|
||||||
|
M[offset + 1] = t1;
|
||||||
|
M[offset + 2] = t2;
|
||||||
|
M[offset + 3] = t3;
|
||||||
|
},
|
||||||
|
|
||||||
|
keySize: 256/32
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Shortcut functions to the cipher's object interface.
|
||||||
|
*
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* var ciphertext = CryptoJS.AES.encrypt(message, key, cfg);
|
||||||
|
* var plaintext = CryptoJS.AES.decrypt(ciphertext, key, cfg);
|
||||||
|
*/
|
||||||
|
C.AES = BlockCipher._createHelper(AES);
|
||||||
|
}());
|
||||||
|
|
||||||
|
|
||||||
|
return CryptoJS.AES;
|
||||||
|
|
||||||
|
}));
|
||||||
1108
static/js/pixi.min.js
vendored
Normal file
7
static/js/sm4.min.js
vendored
Normal file
@@ -180,7 +180,7 @@ const useChatGroupDBStore = defineStore("messageGroup", () => {
|
|||||||
resolve();
|
resolve();
|
||||||
}
|
}
|
||||||
|
|
||||||
$api.streamRequest('/chat', params, onDataReceived, onError, onComplete);
|
$api.streamRequest('/app/chat/chat', params, onDataReceived, onError, onComplete);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
reject(err);
|
reject(err);
|
||||||
@@ -230,7 +230,7 @@ const useChatGroupDBStore = defineStore("messageGroup", () => {
|
|||||||
|
|
||||||
// 云端数据
|
// 云端数据
|
||||||
function getHistory() {
|
function getHistory() {
|
||||||
$api.chatRequest('/getHistory').then((res) => {
|
$api.chatRequest('/app/chat/getHistory').then((res) => {
|
||||||
if (!res.data.list.length) return
|
if (!res.data.list.length) return
|
||||||
let tabel = parseHistory(res.data.list)
|
let tabel = parseHistory(res.data.list)
|
||||||
if (tabel && tabel.length) {
|
if (tabel && tabel.length) {
|
||||||
@@ -250,7 +250,7 @@ const useChatGroupDBStore = defineStore("messageGroup", () => {
|
|||||||
const params = {
|
const params = {
|
||||||
sessionId: chatSessionID.value
|
sessionId: chatSessionID.value
|
||||||
}
|
}
|
||||||
$api.chatRequest('/detail', params, 'GET', loading).then((res) => {
|
$api.chatRequest('/app/chat/detail', params, 'GET', loading).then((res) => {
|
||||||
let list = parseHistoryDetail(res.data.list, chatSessionID.value)
|
let list = parseHistoryDetail(res.data.list, chatSessionID.value)
|
||||||
if (list.length) {
|
if (list.length) {
|
||||||
baseDB.db.add(massageName.value, list).then((ids) => {
|
baseDB.db.add(massageName.value, list).then((ids) => {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<view
|
<view
|
||||||
v-for="(item, index) in data.column"
|
v-for="(item, index) in data.column"
|
||||||
:key="index"
|
:key="index"
|
||||||
class="waterfalls-flow-column"
|
class="waterfalls-flow-column "
|
||||||
:id="`waterfalls_flow_column_${index + 1}`"
|
:id="`waterfalls_flow_column_${index + 1}`"
|
||||||
:msg="msg"
|
:msg="msg"
|
||||||
:style="{ width: w, 'margin-left': index == 0 ? 0 : m }"
|
:style="{ width: w, 'margin-left': index == 0 ? 0 : m }"
|
||||||
|
|||||||
109
utils/request.js
@@ -4,73 +4,21 @@ import {
|
|||||||
sm2_Encrypt
|
sm2_Encrypt
|
||||||
} from '@/common/globalFunction';
|
} from '@/common/globalFunction';
|
||||||
import useUserStore from '@/stores/useUserStore';
|
import useUserStore from '@/stores/useUserStore';
|
||||||
|
import {
|
||||||
|
sm4Decrypt,
|
||||||
|
sm4Encrypt
|
||||||
|
} from '../common/globalFunction';
|
||||||
|
|
||||||
|
|
||||||
|
const needToEncrypt = [
|
||||||
export function request({
|
["post", "/app/login"],
|
||||||
url,
|
["get", "/app/user/resume"],
|
||||||
method = 'GET',
|
["post", "/app/user/resume"],
|
||||||
data = {},
|
["post", "/app/user/experience/edit"],
|
||||||
load = false,
|
["post", "/app/user/experience/delete"],
|
||||||
header = {}
|
["get", "/app/user/experience/getSingle/{value}"],
|
||||||
} = {}) {
|
["get", "/app/user/experience/list"]
|
||||||
|
]
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
if (load) {
|
|
||||||
uni.showLoading({
|
|
||||||
title: '请稍候',
|
|
||||||
mask: true
|
|
||||||
});
|
|
||||||
}
|
|
||||||
let Authorization = ''
|
|
||||||
if (useUserStore().token) {
|
|
||||||
Authorization = `${useUserStore().userInfo.token}${useUserStore().token}`
|
|
||||||
}
|
|
||||||
uni.request({
|
|
||||||
url: config.baseUrl + url,
|
|
||||||
method,
|
|
||||||
data: data,
|
|
||||||
header: {
|
|
||||||
'Authorization': Authorization || '',
|
|
||||||
},
|
|
||||||
success: resData => {
|
|
||||||
// 响应拦截
|
|
||||||
if (resData.statusCode === 200) {
|
|
||||||
const {
|
|
||||||
code,
|
|
||||||
msg
|
|
||||||
} = resData.data
|
|
||||||
if (code === 200) {
|
|
||||||
resolve(resData.data)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
uni.showToast({
|
|
||||||
title: msg,
|
|
||||||
icon: 'none'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if (resData.data?.code === 401 || resData.data?.code === 402) {
|
|
||||||
useUserStore().logOut()
|
|
||||||
uni.showToast({
|
|
||||||
title: '登录过期,请重新登录',
|
|
||||||
icon: 'none'
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const err = new Error('请求出现异常,请联系工作人员')
|
|
||||||
err.error = resData
|
|
||||||
reject(err)
|
|
||||||
},
|
|
||||||
fail: err => reject(err),
|
|
||||||
complete() {
|
|
||||||
if (load) {
|
|
||||||
uni.hideLoading();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param url String,请求的地址,默认:none
|
* @param url String,请求的地址,默认:none
|
||||||
@@ -94,15 +42,44 @@ export function createRequest(url, data = {}, method = 'GET', loading = false, h
|
|||||||
|
|
||||||
const header = headers || {};
|
const header = headers || {};
|
||||||
header["Authorization"] = encodeURIComponent(Authorization);
|
header["Authorization"] = encodeURIComponent(Authorization);
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------
|
||||||
|
// 检查当前请求是否需要加密
|
||||||
|
const isEncrypt = needToEncrypt.some(item => {
|
||||||
|
const matchMethod = item[0].toLowerCase() === method.toLowerCase();
|
||||||
|
const matchUrl = item[1].includes('{') ?
|
||||||
|
url.startsWith(item[1].split('/{')[0]) // 检查动态路径的前缀
|
||||||
|
:
|
||||||
|
item[1] === url; // 检查静态路径
|
||||||
|
return matchMethod && matchUrl;
|
||||||
|
});
|
||||||
|
|
||||||
|
let requestData = data;
|
||||||
|
|
||||||
|
if (isEncrypt) {
|
||||||
|
const jsonData = JSON.stringify(data);
|
||||||
|
const encryptedBody = sm4Encrypt(config.sm4Config.key, jsonData);
|
||||||
|
requestData = {
|
||||||
|
encrypted: true,
|
||||||
|
encryptedData: encryptedBody,
|
||||||
|
timestamp: Date.now()
|
||||||
|
};
|
||||||
|
}
|
||||||
|
// ------------------------------------------------------------------
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
uni.request({
|
uni.request({
|
||||||
url: config.baseUrl + url,
|
url: config.baseUrl + url,
|
||||||
method: method,
|
method: method,
|
||||||
data: data,
|
data: requestData,
|
||||||
header,
|
header,
|
||||||
success: resData => {
|
success: resData => {
|
||||||
// 响应拦截
|
// 响应拦截
|
||||||
if (resData.statusCode === 200) {
|
if (resData.statusCode === 200) {
|
||||||
|
if (resData.data.encrypted) {
|
||||||
|
const decryptedData = sm4Decrypt(config
|
||||||
|
.sm4Config.key, resData.data.encryptedData)
|
||||||
|
resData.data = JSON.parse(decryptedData)
|
||||||
|
}
|
||||||
const {
|
const {
|
||||||
code,
|
code,
|
||||||
msg
|
msg
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export default function StreamRequest(url, data = {}, onDataReceived, onError, o
|
|||||||
};
|
};
|
||||||
return new Promise(async (resolve, reject) => {
|
return new Promise(async (resolve, reject) => {
|
||||||
try {
|
try {
|
||||||
const response = await fetch(config.StreamBaseURl + url, {
|
const response = await fetch(config.baseUrl + url, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers,
|
headers,
|
||||||
body: JSON.stringify(data)
|
body: JSON.stringify(data)
|
||||||
@@ -46,6 +46,7 @@ export default function StreamRequest(url, data = {}, onDataReceived, onError, o
|
|||||||
let lines = buffer.split("\n");
|
let lines = buffer.split("\n");
|
||||||
buffer = lines.pop(); // 可能是不完整的 JSON 片段,留待下次解析
|
buffer = lines.pop(); // 可能是不完整的 JSON 片段,留待下次解析
|
||||||
for (let line of lines) {
|
for (let line of lines) {
|
||||||
|
line = line.slice(5).trim()
|
||||||
if (line.startsWith("data: ")) {
|
if (line.startsWith("data: ")) {
|
||||||
const jsonData = line.slice(6).trim();
|
const jsonData = line.slice(6).trim();
|
||||||
if (jsonData === "[DONE]") {
|
if (jsonData === "[DONE]") {
|
||||||
@@ -104,7 +105,7 @@ export function chatRequest(url, data = {}, method = 'GET', loading = false, hea
|
|||||||
header["Authorization"] = encodeURIComponent(Authorization);
|
header["Authorization"] = encodeURIComponent(Authorization);
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
uni.request({
|
uni.request({
|
||||||
url: config.StreamBaseURl + url,
|
url: config.baseUrl + url,
|
||||||
method: method,
|
method: method,
|
||||||
data: data,
|
data: data,
|
||||||
header,
|
header,
|
||||||
|
|||||||