Files
jczxw-pc/.output/public/_nuxt/D1PxpBgp.js
赵忠林 528fe28ffc feat(api): 添加多路由代理处理实现
- 新增api目录下多个接口路径代理处理文件,支持动态拼接目标URL
- 根据环境变量选择不同的后端服务地址(如dev和生产环境)
- 统一添加TenantId和Authorization请求头传递租户及身份信息
- 实现请求参数及搜索参数的完整转发
- 引入better-sqlite3及node内建模块支持服务端功能
- 新增专家详情页面,实现文章、成果及预约咨询功能展示
- 页面实现加载骨架屏、标签页切换及空状态提示优化体验
2026-04-28 13:50:27 +08:00

2 lines
3.4 KiB
JavaScript

import{b as m,I as g,L as d,U as A,a2 as S}from"./DPwbf7XO.js";var v={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 512a48 48 0 1096 0 48 48 0 10-96 0zm200 0a48 48 0 1096 0 48 48 0 10-96 0zm-400 0a48 48 0 1096 0 48 48 0 10-96 0zm661.2-173.6c-22.6-53.7-55-101.9-96.3-143.3a444.35 444.35 0 00-143.3-96.3C630.6 75.7 572.2 64 512 64h-2c-60.6.3-119.3 12.3-174.5 35.9a445.35 445.35 0 00-142 96.5c-40.9 41.3-73 89.3-95.2 142.8-23 55.4-34.6 114.3-34.3 174.9A449.4 449.4 0 00112 714v152a46 46 0 0046 46h152.1A449.4 449.4 0 00510 960h2.1c59.9 0 118-11.6 172.7-34.3a444.48 444.48 0 00142.8-95.2c41.3-40.9 73.8-88.7 96.5-142 23.6-55.2 35.6-113.9 35.9-174.5.3-60.9-11.5-120-34.8-175.6zm-151.1 438C704 845.8 611 884 512 884h-1.7c-60.3-.3-120.2-15.3-173.1-43.5l-8.4-4.5H188V695.2l-4.5-8.4C155.3 633.9 140.3 574 140 513.7c-.4-99.7 37.7-193.3 107.6-263.8 69.8-70.5 163.1-109.5 262.8-109.9h1.7c50 0 98.5 9.7 144.2 28.9 44.6 18.7 84.6 45.6 119 80 34.3 34.3 61.3 74.4 80 119 19.4 46.2 29.1 95.2 28.9 145.8-.6 99.6-39.7 192.9-110.1 262.7z"}}]},name:"message",theme:"outlined"};function h(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?Object(arguments[e]):{},o=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable}))),o.forEach(function(n){b(t,n,r[n])})}return t}function b(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var p=function(e,r){var o=h({},e,r.attrs);return m(g,h({},o,{icon:v}),null)};p.displayName="MessageOutlined";p.inheritAttrs=!1;const O="$s";function z(...t){const e=typeof t[t.length-1]=="string"?t.pop():void 0;typeof t[0]!="string"&&t.unshift(e);const[r,o]=t;if(!r||typeof r!="string")throw new TypeError("[nuxt] [useState] key must be a string: "+r);if(o!==void 0&&typeof o!="function")throw new Error("[nuxt] [useState] init must be a function: "+o);const n=O+r,l=d(),u=A(l.payload.state,n);if(u.value===void 0&&o){const i=o();if(S(i))return l.payload.state[n]=i,i;u.value=i}return u}const c="Authz";function a(t){const e=new Set;for(const r of t){const o=typeof r=="string"?r.trim():"";!o||o==="null"||o==="undefined"||e.add(o)}return Array.from(e)}function w(t){try{return JSON.parse(t)}catch{return}}function s(t){return Array.isArray(t)?a(t.filter(e=>typeof e=="string")):typeof t=="string"?a(t.split(",").map(e=>e.trim()).filter(Boolean)):[]}function y(){try{const t=localStorage.getItem(c);if(!t)return{roles:[],authorities:[]};const e=w(t);if(!e||typeof e!="object")return{roles:[],authorities:[]};const r=e;return{roles:s(r.roles),authorities:s(r.authorities)}}catch{return{roles:[],authorities:[]}}}function C(t){try{localStorage.setItem(c,JSON.stringify(t))}catch{}}function f(){try{return z("authz",()=>y())}catch{return null}}function P(){return f()?.value??y()}function j(t){const e=P(),r={roles:s(t.roles??e.roles),authorities:s(t.authorities??e.authorities)},o=f();o&&(o.value=r),C(r)}function N(){const t=f();t&&(t.value={roles:[],authorities:[]});try{localStorage.removeItem(c)}catch{}}function x(t){const e=[],r=s(t?.roleCode);e.push(...r);const o=t?.roles;if(Array.isArray(o))for(const n of o)n&&e.push(n.roleCode);return a(e)}function E(t){const e=[],r=t?.authorities;if(Array.isArray(r))for(const o of r)o&&e.push(o.authority);return a(e)}function R(t){j({roles:x(t),authorities:E(t)})}export{p as M,N as c,R as s};