@yxhl/specter-pui-vtk 1.0.38 → 1.0.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yxhl/specter-pui-vtk",
3
- "version": "1.0.38",
3
+ "version": "1.0.39",
4
4
  "description": "雅心互联 Vue 3 + Vuetify3 组件库",
5
5
  "type": "module",
6
6
  "main": "./dist/specter-pui.umd.js",
@@ -15,9 +15,9 @@ const service = axios.create({
15
15
  // request interceptor
16
16
  service.interceptors.request.use(
17
17
  (config) => {
18
- if (Storage.get("token")) {
18
+ if (Storage.get("_mis_acis_token")) {
19
19
  config.headers["X-Token"] = "1b0679be72ad976ad5d491ad57a5eec0";
20
- config.headers["Authorization"] = "Bearer " + Storage.get("token");
20
+ config.headers["Authorization"] = "Bearer " + Storage.get("_mis_acis_token");
21
21
  }
22
22
  return config;
23
23
  },
@@ -156,7 +156,7 @@ const getVtk = () => {
156
156
 
157
157
  // 组件挂载时执行
158
158
  onMounted(() => {
159
- user.value = typeof(proxy.$vtk.storage.get("user")) != 'object' ? JSON.parse(proxy.$vtk.storage.get("user")) : proxy.$vtk.storage.get("user") || '';
159
+ user.value = typeof(proxy.$vtk.storage.get("_mis_acis_users")) != 'object' ? JSON.parse(proxy.$vtk.storage.get("_mis_acis_users")) : proxy.$vtk.storage.get("_mis_acis_users") || '';
160
160
  area();
161
161
  });
162
162
 
@@ -198,7 +198,7 @@ watch(() => props.modelValue, (newVal, oldVal) => {
198
198
 
199
199
  // 组件挂载时执行
200
200
  onMounted(() => {
201
- user.value = proxy.$vtk.storage.get("user") && JSON.parse(proxy.$vtk.storage.get("user"));
201
+ user.value = proxy.$vtk.storage.get("_mis_acis_users") && JSON.parse(proxy.$vtk.storage.get("_mis_acis_users"));
202
202
  getAreaName(user.value.areacode);
203
203
  if (props.modelValue) {
204
204
  view(props.modelValue);
@@ -1,7 +1,7 @@
1
1
  <script setup>
2
2
  import { ref, computed, reactive, onMounted, getCurrentInstance, watch, nextTick } from "vue";
3
3
  const { proxy } = getCurrentInstance();
4
- const user = JSON.parse(proxy.$vtk.storage.get("user"));
4
+ const user = JSON.parse(proxy.$vtk.storage.get("_mis_acis_users"));
5
5
  const pause = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
6
6
 
7
7
  // 定义 props - 控制是否支持多选
@@ -160,12 +160,12 @@ const srcWithToken = computed(() => {
160
160
  try {
161
161
  // 首先尝试使用 $vtk.storage
162
162
  if (window.$vtk && typeof window.$vtk.storage?.get === 'function') {
163
- const token = window.$vtk.storage.get('token');
163
+ const token = window.$vtk.storage.get('_mis_acis_token');
164
164
  return token ? `${props.src}?stoken=${token}` : props.src;
165
165
  }
166
166
  // 如果 $vtk 不存在,尝试从 localStorage 获取 token
167
167
  else {
168
- const token = localStorage.getItem('token');
168
+ const token = localStorage.getItem('_mis_acis_token');
169
169
  return token ? `${props.src}?stoken=${token}` : props.src;
170
170
  }
171
171
  } catch (error) {
@@ -183,10 +183,10 @@ const currentImageUrl = computed(() => {
183
183
  try {
184
184
  // 为图片列表中的图片也添加token
185
185
  if (window.$vtk && typeof window.$vtk.storage?.get === 'function') {
186
- const token = window.$vtk.storage.get('token');
186
+ const token = window.$vtk.storage.get('_mis_acis_token');
187
187
  return token ? `${currentImage.url}?stoken=${token}` : currentImage.url;
188
188
  } else {
189
- const token = localStorage.getItem('token');
189
+ const token = localStorage.getItem('_mis_acis_token');
190
190
  return token ? `${currentImage.url}?stoken=${token}` : currentImage.url;
191
191
  }
192
192
  } catch (error) {
@@ -148,12 +148,12 @@ const srcWithToken = computed(() => {
148
148
  try {
149
149
  // 首先尝试使用 $vtk.storage
150
150
  if (window.$vtk && typeof window.$vtk.storage?.get === 'function') {
151
- const token = window.$vtk.storage.get('token');
151
+ const token = window.$vtk.storage.get('_mis_acis_token');
152
152
  return token ? `${props.src}?stoken=${token}` : props.src;
153
153
  }
154
154
  // 如果 $vtk 不存在,尝试从 localStorage 获取 token
155
155
  else {
156
- const token = localStorage.getItem('token');
156
+ const token = localStorage.getItem('_mis_acis_token');
157
157
  return token ? `${props.src}?stoken=${token}` : props.src;
158
158
  }
159
159
  } catch (error) {
@@ -299,7 +299,7 @@ const list = () => {
299
299
  const getUserInfo = () => {
300
300
  try {
301
301
  // 实际项目中从存储或状态管理获取
302
- return window.$vtk?.storage?.get('user') || {};
302
+ return window.$vtk?.storage?.get('_mis_acis_users') || {};
303
303
  } catch (error) {
304
304
  console.warn('获取用户信息失败:', error);
305
305
  return {};
@@ -99,7 +99,7 @@ watch(
99
99
  );
100
100
 
101
101
  onMounted(() => {
102
- user.value = JSON.parse(localStorage.getItem("user") || "{}");
102
+ user.value = JSON.parse(localStorage.getItem("_mis_acis_users") || "{}");
103
103
  initialIndex.value = 0;
104
104
  });
105
105
 
@@ -33,7 +33,7 @@ export function useMixins(urlConfig = {}) {
33
33
  * @returns {Object} 查询参数对象
34
34
  */
35
35
  const getQueryParams = () => {
36
- user.value = storage.get('user')
36
+ user.value = storage.get('_mis_acis_users')
37
37
  if (!queryParam.areaCode) {
38
38
  queryParam.areaCode = user.value?.areacode
39
39
  }