Compare commits
4 Commits
production
...
e4d100242b
| Author | SHA1 | Date | |
|---|---|---|---|
| e4d100242b | |||
| 3eca164bde | |||
| a7d6b8709c | |||
| ca7273f152 |
122
App.vue
@@ -3,32 +3,37 @@ import { reactive, inject, onMounted } from 'vue';
|
|||||||
import { onLaunch, onShow, onHide } from '@dcloudio/uni-app';
|
import { onLaunch, onShow, onHide } from '@dcloudio/uni-app';
|
||||||
import useUserStore from './stores/useUserStore';
|
import useUserStore from './stores/useUserStore';
|
||||||
import useDictStore from './stores/useDictStore';
|
import useDictStore from './stores/useDictStore';
|
||||||
const { $api, navTo, appendScriptTagElement, aes_Decrypt, sm2_Decrypt } = inject('globalFunction');
|
const { $api, navTo, appendScriptTagElement } = inject('globalFunction');
|
||||||
import config from '@/config.js';
|
import config from '@/config.js';
|
||||||
|
|
||||||
const appword = 'aKd20dbGdFvmuwrt'; // 固定值
|
|
||||||
|
|
||||||
onLaunch((options) => {
|
onLaunch((options) => {
|
||||||
getUserInfo();
|
useUserStore().initSeesionId(); //更新
|
||||||
// useUserStore().initSeesionId(); //更新
|
|
||||||
useDictStore().getDictData();
|
useDictStore().getDictData();
|
||||||
// uni.hideTabBar();
|
// uni.hideTabBar();
|
||||||
|
|
||||||
// 登录
|
// 登录
|
||||||
// let token = uni.getStorageSync('token') || ''; // 同步获取 缓存信息
|
let token = uni.getStorageSync('token') || ''; // 同步获取 缓存信息
|
||||||
// if (token) {
|
if (token) {
|
||||||
// useUserStore()
|
useUserStore()
|
||||||
// .loginSetToken(token)
|
.loginSetToken(token)
|
||||||
// .then(() => {
|
.then(() => {
|
||||||
// $api.msg('登录成功');
|
$api.msg('登录成功');
|
||||||
// });
|
});
|
||||||
// } else {
|
} else {
|
||||||
// uni.redirectTo({
|
uni.redirectTo({
|
||||||
// url: '/pages/login/login',
|
url: '/pages/login/login',
|
||||||
// });
|
});
|
||||||
// }
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
onMounted(() => {});
|
onMounted(() => {
|
||||||
|
// #ifndef MP-WEIXIN
|
||||||
|
appendScriptTagElement('https://qd.zhaopinzao8dian.com/file/csn/jweixin-1.4.0.js').then(() => {
|
||||||
|
console.log('✅ 微信 JSSDK 加载完成');
|
||||||
|
// signatureFn();
|
||||||
|
});
|
||||||
|
// #endif
|
||||||
|
});
|
||||||
|
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
console.log('App Show');
|
console.log('App Show');
|
||||||
@@ -37,87 +42,6 @@ onShow(() => {
|
|||||||
onHide(() => {
|
onHide(() => {
|
||||||
console.log('App Hide');
|
console.log('App Hide');
|
||||||
});
|
});
|
||||||
|
|
||||||
function getUserInfo() {
|
|
||||||
lightAppJssdk.user.getUserInfoWithEncryptedParamByAppId({
|
|
||||||
appId: 'qdsrgznrgpp', // 接入方在成功创建应用后自动生成
|
|
||||||
success: function (data) {
|
|
||||||
if (data == '未登录') onLoginApp();
|
|
||||||
else {
|
|
||||||
if (typeof data == 'string') data = JSON.parse(data);
|
|
||||||
|
|
||||||
const sm2_privateKey = '7e14966df4ecd4241ed082ef716d82b52113cb5899ebdc704a98844d0a32b0dc';
|
|
||||||
let sm2_encrypt_result = data.data;
|
|
||||||
let sm2_decrypt_result = sm2_Decrypt(sm2_encrypt_result, sm2_privateKey);
|
|
||||||
|
|
||||||
if (typeof sm2_decrypt_result == 'string') sm2_decrypt_result = JSON.parse(sm2_decrypt_result);
|
|
||||||
|
|
||||||
// 其次,对sm2解密后的结果进行 aes解密
|
|
||||||
// aes解密需要用到 appword , 为固定值,使用示例代码中的即可
|
|
||||||
let aes_encrypt_result = sm2_decrypt_result.data;
|
|
||||||
let aes_decrypt_result = aes_Decrypt(aes_encrypt_result, appword);
|
|
||||||
|
|
||||||
// 加密
|
|
||||||
loginCallback(aes_decrypt_result);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
fail: function (data) {
|
|
||||||
console.log('err', data);
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 使用jssdk调用登录页面
|
|
||||||
*/
|
|
||||||
function onLoginApp() {
|
|
||||||
lightAppJssdk.user.loginapp({
|
|
||||||
success: function (data) {
|
|
||||||
if (data == '未登录') {
|
|
||||||
//取消登录或登录失败,关闭页面
|
|
||||||
oncloseWindow();
|
|
||||||
} else {
|
|
||||||
getUserInfo();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
fail: function (data) {
|
|
||||||
//关闭页面
|
|
||||||
oncloseWindow();
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 关闭容器
|
|
||||||
*/
|
|
||||||
function oncloseWindow() {
|
|
||||||
lightAppJssdk.navigation.close({
|
|
||||||
success: function (data) {},
|
|
||||||
fail: function (data) {},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function loginCallback(userInfo) {
|
|
||||||
let params = {
|
|
||||||
username: userInfo,
|
|
||||||
};
|
|
||||||
$api.createRequest('/app/login', params, 'post').then((resData) => {
|
|
||||||
useUserStore()
|
|
||||||
.loginSetToken(resData.token)
|
|
||||||
.then((resume) => {
|
|
||||||
if (resume.data.jobTitleId) {
|
|
||||||
useUserStore().initSeesionId();
|
|
||||||
uni.reLaunch({
|
|
||||||
url: '/pages/index/index',
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
uni.redirectTo({
|
|
||||||
url: '/pages/login/login',
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|||||||
@@ -67,14 +67,14 @@ export const navTo = function(url, {
|
|||||||
onBack = null
|
onBack = null
|
||||||
} = {}) {
|
} = {}) {
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
if (isJumping) return
|
if(isJumping) return
|
||||||
isJumping = true
|
isJumping=true
|
||||||
if (needLogin && !userStore.hasLogin) {
|
if (needLogin && !userStore.hasLogin) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/login/login'
|
url: '/pages/login/login'
|
||||||
});
|
});
|
||||||
isJumping = false
|
isJumping=false
|
||||||
}, 170);
|
}, 170);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -94,7 +94,7 @@ export const navTo = function(url, {
|
|||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: finalUrl
|
url: finalUrl
|
||||||
});
|
});
|
||||||
isJumping = false
|
isJumping=false
|
||||||
}, 170);
|
}, 170);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -552,25 +552,6 @@ function isEmptyObject(obj) {
|
|||||||
return obj && typeof obj === 'object' && !Array.isArray(obj) && Object.keys(obj).length === 0;
|
return obj && typeof obj === 'object' && !Array.isArray(obj) && Object.keys(obj).length === 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
function aes_Decrypt(word, key) {
|
|
||||||
var key = CryptoJS.enc.Utf8.parse(key) //转为128bit
|
|
||||||
var srcs = CryptoJS.enc.Hex.parse(word) //转为16进制
|
|
||||||
var str = CryptoJS.enc.Base64.stringify(srcs) //变为Base64编码的字符串
|
|
||||||
var decrypt = CryptoJS.AES.decrypt(str, key, {
|
|
||||||
mode: CryptoJS.mode.ECB,
|
|
||||||
spadding: CryptoJS.pad.Pkcs7
|
|
||||||
})
|
|
||||||
return decrypt.toString(CryptoJS.enc.Utf8)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
export function sm2_Decrypt(word, key) {
|
|
||||||
return SM.decrypt(word, key);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function sm2_Encrypt(word, key) {
|
|
||||||
return SM.encrypt(word, key);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const $api = {
|
export const $api = {
|
||||||
msg,
|
msg,
|
||||||
@@ -584,8 +565,7 @@ export const $api = {
|
|||||||
uploadFile,
|
uploadFile,
|
||||||
formatFileSize,
|
formatFileSize,
|
||||||
sendingMiniProgramMessage,
|
sendingMiniProgramMessage,
|
||||||
copyText,
|
copyText
|
||||||
aes_Decrypt,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -615,7 +595,4 @@ export default {
|
|||||||
insertSortData,
|
insertSortData,
|
||||||
isInWechatMiniProgramWebview,
|
isInWechatMiniProgramWebview,
|
||||||
isEmptyObject,
|
isEmptyObject,
|
||||||
aes_Decrypt,
|
|
||||||
sm2_Decrypt,
|
|
||||||
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>
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, reactive, computed, inject, nextTick, onMounted } from 'vue';
|
import { ref, reactive, computed, inject, nextTick, defineExpose, onMounted } from 'vue';
|
||||||
const { $api, navTo, setCheckedNodes, cloneDeep } = inject('globalFunction');
|
const { $api, navTo, setCheckedNodes, cloneDeep } = inject('globalFunction');
|
||||||
import useUserStore from '@/stores/useUserStore';
|
import useUserStore from '@/stores/useUserStore';
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
|
|||||||
12
config.js
@@ -1,8 +1,6 @@
|
|||||||
export default {
|
export default {
|
||||||
baseUrl: 'https://fw.rc.qingdao.gov.cn/rgpp-api/api', // 内网
|
// baseUrl: 'http://39.98.44.136:8080', // 测试
|
||||||
// baseUrl: 'https://qd.zhaopinzao8dian.com/api', // 测试
|
baseUrl: 'https://qd.zhaopinzao8dian.com/api', // 测试
|
||||||
// baseUrl: "http://192.168.98.110:18181",
|
|
||||||
// baseUrl: "http://192.168.3.19:8080",
|
|
||||||
// sseAI+
|
// sseAI+
|
||||||
// StreamBaseURl: 'http://39.98.44.136:8000',
|
// StreamBaseURl: 'http://39.98.44.136:8000',
|
||||||
StreamBaseURl: 'https://qd.zhaopinzao8dian.com/ai',
|
StreamBaseURl: 'https://qd.zhaopinzao8dian.com/ai',
|
||||||
@@ -15,13 +13,9 @@ export default {
|
|||||||
// indexedDB
|
// indexedDB
|
||||||
DBversion: 2,
|
DBversion: 2,
|
||||||
// 只使用本地缓寸的数据
|
// 只使用本地缓寸的数据
|
||||||
OnlyUseCachedDB: false,
|
OnlyUseCachedDB: true,
|
||||||
// 使用模拟定位
|
// 使用模拟定位
|
||||||
UsingSimulatedPositioning: true,
|
UsingSimulatedPositioning: true,
|
||||||
// 私钥
|
|
||||||
pubilcKey: '',
|
|
||||||
// 公钥
|
|
||||||
privateKey: '',
|
|
||||||
// 应用信息
|
// 应用信息
|
||||||
appInfo: {
|
appInfo: {
|
||||||
// 应用名称
|
// 应用名称
|
||||||
|
|||||||
@@ -49,7 +49,6 @@ export function useTTSPlayer() {
|
|||||||
const newUtterance = new SpeechSynthesisUtterance(filteredText); // Use filtered text
|
const newUtterance = new SpeechSynthesisUtterance(filteredText); // Use filtered text
|
||||||
utteranceRef.value = newUtterance;
|
utteranceRef.value = newUtterance;
|
||||||
|
|
||||||
newUtterance.lang = 'zh-CN';
|
|
||||||
newUtterance.rate = options.rate || 1;
|
newUtterance.rate = options.rate || 1;
|
||||||
newUtterance.pitch = options.pitch || 1;
|
newUtterance.pitch = options.pitch || 1;
|
||||||
if (options.voice) {
|
if (options.voice) {
|
||||||
|
|||||||
@@ -18,17 +18,13 @@
|
|||||||
</script>
|
</script>
|
||||||
<title></title>
|
<title></title>
|
||||||
<!-- vconsole -->
|
<!-- vconsole -->
|
||||||
<script src="https://unpkg.com/vconsole@latest/dist/vconsole.min.js"></script>
|
<!-- <script src="https://unpkg.com/vconsole@latest/dist/vconsole.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
var vConsole = new window.VConsole();
|
var vConsole = new window.VConsole();
|
||||||
vConsole.destroy();
|
vConsole.destroy();
|
||||||
</script>
|
</script> -->
|
||||||
<!-- 爱山东jssdk -->
|
<!-- 爱山东jssdk -->
|
||||||
<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/encryption/SM.js"></script>
|
|
||||||
</head>
|
</head>
|
||||||
<!-- <body> -->
|
<!-- <body> -->
|
||||||
<div id="app"><!--app-html--></div>
|
<div id="app"><!--app-html--></div>
|
||||||
|
|||||||
@@ -80,7 +80,7 @@
|
|||||||
"locale": "zh-Hans",
|
"locale": "zh-Hans",
|
||||||
"h5": {
|
"h5": {
|
||||||
"router": {
|
"router": {
|
||||||
"base": "./",
|
"base": "/app/",
|
||||||
"mode": "hash"
|
"mode": "hash"
|
||||||
},
|
},
|
||||||
"title": "青岛智慧就业服务",
|
"title": "青岛智慧就业服务",
|
||||||
@@ -97,9 +97,6 @@
|
|||||||
"serviceHost": ""
|
"serviceHost": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"devServer": {
|
|
||||||
"https": false
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
5
package.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"dependencies": {
|
||||||
|
"pixi.js": "^7.4.3"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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>
|
||||||
|
|||||||
345
pages/index/components/AIMatch.vue
Normal file
@@ -0,0 +1,345 @@
|
|||||||
|
<template>
|
||||||
|
<view class="container">
|
||||||
|
<!-- 用于承载 PIXI 的 Canvas -->
|
||||||
|
<!-- #ifdef H5 -->
|
||||||
|
<view id="matchCanvas" class="match-canvas"></view>
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifndef H5 -->
|
||||||
|
<canvas type="webgl" id="matchCanvas" canvas-id="matchCanvas" class="match-canvas" />
|
||||||
|
<!-- #endif -->
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { onMounted, onUnmounted, ref } from "vue";
|
||||||
|
import * as PIXI from "pixi.js";
|
||||||
|
|
||||||
|
const appRef = ref(null); // 存储 PIXI 应用实例
|
||||||
|
|
||||||
|
// 标签数据:包含名称、颜色、大小、位置(角度、半径)
|
||||||
|
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, // 12点方向
|
||||||
|
radius: 60,
|
||||||
|
tailRotation: Math.PI / 2, // 拖尾向下
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "建筑师",
|
||||||
|
bgColor: 0xffebeb,
|
||||||
|
fontColor: 0xf86e6e,
|
||||||
|
size: 11.5,
|
||||||
|
opacity: 1,
|
||||||
|
angle: -Math.PI / 4, // 1点方向
|
||||||
|
radius: 115,
|
||||||
|
tailRotation: (3 * Math.PI) / 4, // 拖尾向左下
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "律师",
|
||||||
|
bgColor: 0x21ea85,
|
||||||
|
fontColor: 0xffffff,
|
||||||
|
size: 15,
|
||||||
|
opacity: 1,
|
||||||
|
angle: -Math.PI / 10, // 2点方向
|
||||||
|
radius: 130,
|
||||||
|
tailRotation: (3 * Math.PI) / 4, // 拖尾向左下
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "记者",
|
||||||
|
bgColor: 0xebf3ff,
|
||||||
|
fontColor: 0x1d71ef,
|
||||||
|
size: 12,
|
||||||
|
opacity: 1,
|
||||||
|
angle: Math.PI / 120, // 3点方向
|
||||||
|
radius: 130,
|
||||||
|
tailRotation: Math.PI, // 拖尾向左
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "程序员",
|
||||||
|
bgColor: 0xff9d57,
|
||||||
|
fontColor: 0xffffff,
|
||||||
|
size: 14.5,
|
||||||
|
opacity: 0.6,
|
||||||
|
angle: Math.PI / 9, // 4点方向
|
||||||
|
radius: 120,
|
||||||
|
tailRotation: (5 * Math.PI) / 4, // 拖尾向左上
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "摄影师",
|
||||||
|
bgColor: 0xd8e5fe,
|
||||||
|
fontColor: 0x1d71ef,
|
||||||
|
size: 11,
|
||||||
|
opacity: 1,
|
||||||
|
angle: Math.PI / 3.2, // 5点方向
|
||||||
|
radius: 75,
|
||||||
|
tailRotation: (3 * Math.PI) / 2, // 拖尾向上
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "设计师",
|
||||||
|
bgColor: 0xff9400,
|
||||||
|
fontColor: 0xffffff,
|
||||||
|
size: 14,
|
||||||
|
opacity: 1,
|
||||||
|
angle: (2 * Math.PI) / 3, // 7点方向
|
||||||
|
radius: 92,
|
||||||
|
tailRotation: (7 * Math.PI) / 4, // 拖尾向右上
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "心理咨询师",
|
||||||
|
bgColor: 0xebf3ff,
|
||||||
|
fontColor: 0x1d71ef,
|
||||||
|
size: 10.5,
|
||||||
|
opacity: 1,
|
||||||
|
angle: (5.4 * Math.PI) / 6, // 8点方向
|
||||||
|
radius: 110,
|
||||||
|
tailRotation: 0, // 拖尾向右
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "护士",
|
||||||
|
bgColor: 0xff6969,
|
||||||
|
fontColor: 0xffffff,
|
||||||
|
size: 15,
|
||||||
|
opacity: 1,
|
||||||
|
angle: (6.3 * Math.PI) / 6, // 10点方向
|
||||||
|
radius: 110,
|
||||||
|
tailRotation: Math.PI / 4, // 拖尾向右下
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "会计",
|
||||||
|
bgColor: 0xfce9c9,
|
||||||
|
fontColor: 0xfbc55f,
|
||||||
|
size: 13,
|
||||||
|
opacity: 1,
|
||||||
|
angle: (7.2 * Math.PI) / 6, // 11点方向
|
||||||
|
radius: 115,
|
||||||
|
tailRotation: Math.PI / 4, // 拖尾向右下
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
if (appRef.value) return;
|
||||||
|
// 初始化 PIXI 应用
|
||||||
|
const canvas = document.getElementById("matchCanvas");
|
||||||
|
const sw = canvas.clientWidth;
|
||||||
|
const sh = canvas.clientHeight;
|
||||||
|
|
||||||
|
const app = new PIXI.Application({
|
||||||
|
backgroundAlpha: 0,
|
||||||
|
antialias: true,
|
||||||
|
autoDensity: true,
|
||||||
|
width: sw,
|
||||||
|
height: sh,
|
||||||
|
backgroundColor: 0xf5f7fa,
|
||||||
|
});
|
||||||
|
appRef.value = app;
|
||||||
|
|
||||||
|
canvas.appendChild(app.view);
|
||||||
|
|
||||||
|
// 标签容器(管理所有标签)
|
||||||
|
const tagsContainer = new PIXI.Container();
|
||||||
|
app.stage.addChild(tagsContainer);
|
||||||
|
|
||||||
|
// 存储已放置标签的信息(位置、尺寸、浮动动画参数)
|
||||||
|
const placedTags = [];
|
||||||
|
|
||||||
|
for (let i = 0; i < mockTags.length; i++) {
|
||||||
|
const { angle, radius, tailRotation, ...tagData } = mockTags[i];
|
||||||
|
const x = sw / 2 + radius * Math.cos(angle);
|
||||||
|
const y = sh / 2 + radius * Math.sin(angle);
|
||||||
|
const tag = createTag(tagData, x, y, placedTags, app, i);
|
||||||
|
|
||||||
|
// 上下浮动动画
|
||||||
|
const originalY = tag.y;
|
||||||
|
let floatOffset = Math.random() * Math.PI * 2;
|
||||||
|
let floatSpeed = 0.01 + Math.random() * 0.02;
|
||||||
|
let floatRange = 2 + Math.random() * 2;
|
||||||
|
|
||||||
|
// 为标签添加彗星拖尾效果
|
||||||
|
if (radius > 0) {
|
||||||
|
// 中心标签不需要拖尾
|
||||||
|
const tail = createCometTail(tagData.bgColor, tailRotation, tag);
|
||||||
|
|
||||||
|
// 修正:使用 addChildAt 将拖尾添加到最底层
|
||||||
|
tag.addChildAt(tail, 0);
|
||||||
|
|
||||||
|
// 为拖尾添加单独的动画
|
||||||
|
app.ticker.add(() => {
|
||||||
|
if (tail.updateTail) {
|
||||||
|
tail.updateTail();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 使用PIXI ticker进行动画
|
||||||
|
app.ticker.add(() => {
|
||||||
|
floatOffset += floatSpeed;
|
||||||
|
tag.y = originalY + Math.sin(floatOffset) * floatRange;
|
||||||
|
});
|
||||||
|
|
||||||
|
tagsContainer.addChild(tag);
|
||||||
|
placedTags.push({ ...tagData, bounds: tag.getBounds() });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 销毁时清理资源
|
||||||
|
onUnmounted(() => {
|
||||||
|
if (appRef.value) {
|
||||||
|
appRef.value.destroy(true, true);
|
||||||
|
appRef.value = null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 创建彗星拖尾效果
|
||||||
|
function createCometTail(bgColor, tailRotation, tag) {
|
||||||
|
const tailGroup = new PIXI.Container();
|
||||||
|
|
||||||
|
// 拖尾直接放在标签中心位置
|
||||||
|
tailGroup.x = 0;
|
||||||
|
tailGroup.y = 0;
|
||||||
|
|
||||||
|
const tail = new PIXI.Graphics();
|
||||||
|
tailGroup.addChild(tail);
|
||||||
|
|
||||||
|
// 拖尾参数
|
||||||
|
const baseLength = 45; // 基础长度
|
||||||
|
const startWidth = tag.width * 0.9; // 起始宽度(长边)
|
||||||
|
const endWidth = 35; // 末端宽度(短边)
|
||||||
|
|
||||||
|
// 拖尾动画参数
|
||||||
|
let breathPhase = Math.random() * Math.PI * 2;
|
||||||
|
const breathSpeed = 0.04;
|
||||||
|
|
||||||
|
// 更新拖尾的呼吸动画
|
||||||
|
tailGroup.updateTail = () => {
|
||||||
|
breathPhase += breathSpeed;
|
||||||
|
const breathScale = 0.85 + 0.15 * Math.sin(breathPhase);
|
||||||
|
tail.clear();
|
||||||
|
|
||||||
|
// 绘制梯形拖尾
|
||||||
|
const currentLength = baseLength * breathScale;
|
||||||
|
|
||||||
|
// 计算拖尾的四个顶点
|
||||||
|
// 长边在标签中心,水平方向(与标签长边平行)
|
||||||
|
const startLeft = { x: -startWidth / 2, y: 0 };
|
||||||
|
const startRight = { x: startWidth / 2, y: 0 };
|
||||||
|
|
||||||
|
// 短边在拖尾方向,保持水平
|
||||||
|
const endCenter = {
|
||||||
|
x: Math.cos(tailRotation) * currentLength,
|
||||||
|
y: Math.sin(tailRotation) * currentLength,
|
||||||
|
};
|
||||||
|
|
||||||
|
const endLeft = {
|
||||||
|
x: endCenter.x - endWidth / 2,
|
||||||
|
y: endCenter.y,
|
||||||
|
};
|
||||||
|
|
||||||
|
const endRight = {
|
||||||
|
x: endCenter.x + endWidth / 2,
|
||||||
|
y: endCenter.y,
|
||||||
|
};
|
||||||
|
|
||||||
|
// 使用分段绘制实现渐变
|
||||||
|
const segments = 6;
|
||||||
|
for (let i = 0; i < segments; i++) {
|
||||||
|
const progress = i / segments;
|
||||||
|
const nextProgress = (i + 1) / segments;
|
||||||
|
|
||||||
|
// 计算分段的位置 - 保持长边水平
|
||||||
|
const segmentStartLeft = {
|
||||||
|
x: startLeft.x * (1 - progress) + endLeft.x * progress,
|
||||||
|
y: startLeft.y * (1 - progress) + endLeft.y * progress,
|
||||||
|
};
|
||||||
|
const segmentStartRight = {
|
||||||
|
x: startRight.x * (1 - progress) + endRight.x * progress,
|
||||||
|
y: startRight.y * (1 - progress) + endRight.y * progress,
|
||||||
|
};
|
||||||
|
const segmentEndLeft = {
|
||||||
|
x: startLeft.x * (1 - nextProgress) + endLeft.x * nextProgress,
|
||||||
|
y: startLeft.y * (1 - nextProgress) + endLeft.y * nextProgress,
|
||||||
|
};
|
||||||
|
const segmentEndRight = {
|
||||||
|
x: startRight.x * (1 - nextProgress) + endRight.x * nextProgress,
|
||||||
|
y: startRight.y * (1 - nextProgress) + endRight.y * nextProgress,
|
||||||
|
};
|
||||||
|
|
||||||
|
// 透明度从0.4渐变到0
|
||||||
|
const segmentAlpha = 0.4 * (1 - progress);
|
||||||
|
|
||||||
|
tail.beginFill(bgColor, segmentAlpha);
|
||||||
|
tail.moveTo(segmentStartLeft.x, segmentStartLeft.y);
|
||||||
|
tail.lineTo(segmentEndLeft.x, segmentEndLeft.y);
|
||||||
|
tail.lineTo(segmentEndRight.x, segmentEndRight.y);
|
||||||
|
tail.lineTo(segmentStartRight.x, segmentStartRight.y);
|
||||||
|
tail.lineTo(segmentStartLeft.x, segmentStartLeft.y);
|
||||||
|
tail.endFill();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 初始绘制
|
||||||
|
tailGroup.updateTail();
|
||||||
|
|
||||||
|
return tailGroup;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 创建单个标签(背景+文本)
|
||||||
|
function createTag(tagData, x, y, placedTags, app, index) {
|
||||||
|
const tagGroup = new PIXI.Container();
|
||||||
|
tagGroup.x = x;
|
||||||
|
tagGroup.y = y;
|
||||||
|
|
||||||
|
// 先创建文本以测量宽度
|
||||||
|
const text = new PIXI.Text(tagData.name, {
|
||||||
|
fontFamily: "Arial",
|
||||||
|
fontSize: tagData.size,
|
||||||
|
fill: tagData.fontColor,
|
||||||
|
});
|
||||||
|
text.anchor.set(0.5);
|
||||||
|
|
||||||
|
// 根据文字个数动态计算宽度
|
||||||
|
const padding = 10;
|
||||||
|
const charWidth = tagData.size * 1.5;
|
||||||
|
const charHeight = tagData.size * 1.3;
|
||||||
|
const textWidth = tagData.name.length * charWidth;
|
||||||
|
|
||||||
|
let width = textWidth + padding * 2;
|
||||||
|
if (index == 0) width = tagData.size * 4.5 + 10;
|
||||||
|
|
||||||
|
const height = charHeight + padding;
|
||||||
|
|
||||||
|
// 背景(圆角矩形)
|
||||||
|
const bg = new PIXI.Graphics();
|
||||||
|
bg.beginFill(tagData.bgColor, tagData.opacity ?? 1);
|
||||||
|
bg.drawRoundedRect(-width / 2, -height / 2, width, height, 20);
|
||||||
|
bg.endFill();
|
||||||
|
tagGroup.addChild(bg);
|
||||||
|
|
||||||
|
// 添加文本
|
||||||
|
tagGroup.addChild(text);
|
||||||
|
|
||||||
|
return tagGroup;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.container {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.match-canvas {
|
||||||
|
width: 100%;
|
||||||
|
height: 350rpx; /* 可根据需求调整高度 */
|
||||||
|
}
|
||||||
|
</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',
|
||||||
});
|
});
|
||||||
|
|||||||
1351
pages/index/components/index-refactor copy 2.vue
Normal file
1276
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());
|
||||||
@@ -67,7 +69,7 @@ onLoad(() => {
|
|||||||
|
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
// 获取消息列表
|
// 获取消息列表
|
||||||
// useReadMsg().fetchMessages();
|
useReadMsg().fetchMessages();
|
||||||
});
|
});
|
||||||
|
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ const { getDictSelectOption, oneDictData } = useDictStore();
|
|||||||
const openSelectPopup = inject('openSelectPopup');
|
const openSelectPopup = inject('openSelectPopup');
|
||||||
// status
|
// status
|
||||||
const selectJobsModel = ref();
|
const selectJobsModel = ref();
|
||||||
const tabCurrent = ref(1);
|
const tabCurrent = ref(0);
|
||||||
const salay = [2, 5, 10, 15, 20, 25, 30, 50, 80, 100];
|
const salay = [2, 5, 10, 15, 20, 25, 30, 50, 80, 100];
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
station: [],
|
station: [],
|
||||||
@@ -149,7 +149,6 @@ const fromValue = reactive({
|
|||||||
});
|
});
|
||||||
|
|
||||||
onLoad((parmas) => {
|
onLoad((parmas) => {
|
||||||
console.log(parmas);
|
|
||||||
getTreeselect();
|
getTreeselect();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
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 |
@@ -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 }"
|
||||||
|
|||||||
@@ -1,12 +1,5 @@
|
|||||||
import config from "@/config.js"
|
import config from "@/config.js"
|
||||||
import {
|
|
||||||
sm2_Decrypt,
|
|
||||||
sm2_Encrypt
|
|
||||||
} from '@/common/globalFunction';
|
|
||||||
import useUserStore from '@/stores/useUserStore';
|
import useUserStore from '@/stores/useUserStore';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export function request({
|
export function request({
|
||||||
url,
|
url,
|
||||||
method = 'GET',
|
method = 'GET',
|
||||||
|
|||||||