@uxda/appkit 4.2.57 → 4.2.58

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/dist/index.js CHANGED
@@ -4,7 +4,7 @@ import '@nutui/nutui-taro/dist/packages/checkbox/style/css';
4
4
  import { defineComponent, reactive, createBlock, openBlock, withCtx, createElementBlock, Fragment, renderList, normalizeClass, createElementVNode, toDisplayString, createTextVNode, ref, computed, onUnmounted, createCommentVNode, renderSlot, createVNode, normalizeStyle, unref, isRef, onMounted, createStaticVNode, watch, withDirectives, vShow, useModel, mergeModels, resolveComponent, vModelText, watchPostEffect, withModifiers } from 'vue';
5
5
  import '@nutui/nutui-taro/dist/packages/grid/style/css';
6
6
  import '@nutui/nutui-taro/dist/packages/griditem/style/css';
7
- import Taro, { getSystemInfoSync, getMenuButtonBoundingClientRect, request as request$1, showToast, chooseMedia, chooseMessageFile, showLoading, uploadFile, hideLoading, useDidShow, useRouter } from '@tarojs/taro';
7
+ import Taro, { getSystemInfoSync, getMenuButtonBoundingClientRect, uploadFile, request as request$1, showToast, chooseMedia, chooseMessageFile, showLoading, hideLoading, useDidShow, getStorageSync, useRouter } from '@tarojs/taro';
8
8
  import '@nutui/nutui-taro/dist/packages/popup/style/css';
9
9
  import isMobilePhone from 'validator/es/lib/isMobilePhone';
10
10
  import isIdentityCard from 'validator/es/lib/isIdentityCard';
@@ -290,6 +290,25 @@ function useEncode() {
290
290
  };
291
291
  }
292
292
 
293
+ const globalData = {};
294
+
295
+ const appKitOptions = {
296
+ app: () => "",
297
+ tenant: () => "",
298
+ token: () => "",
299
+ tempToken: () => "",
300
+ baseUrl: () => "",
301
+ 401() {
302
+ },
303
+ gray: () => ""
304
+ };
305
+ const useAppKitOptions = () => {
306
+ if (!globalData.$appKitOptions) {
307
+ globalData.$appKitOptions = appKitOptions;
308
+ }
309
+ return globalData.$appKitOptions;
310
+ };
311
+
293
312
  const mappings = {
294
313
  downloadUrl: "thrumb",
295
314
  fileId: "id",
@@ -303,14 +322,18 @@ const transformFields = (row) => {
303
322
  return Object.fromEntries(Object.entries(row).map(([k, v]) => [mappings[k] || k, v]));
304
323
  };
305
324
  const useUpload = (config) => {
325
+ const appkitOptions = useAppKitOptions();
326
+ console.log("===config", config);
327
+ console.log("===config", appkitOptions.tempToken() || appkitOptions.token());
306
328
  const upload = (url, file) => {
307
329
  return new Promise((resolve, reject) => {
308
- Taro.uploadFile({
330
+ uploadFile({
309
331
  url: config.baseUrl + url,
310
332
  filePath: file.path,
311
333
  name: "file",
312
- header: config.headers ?? {
313
- token: Taro.getStorageSync("session")
334
+ header: {
335
+ ...config.headers,
336
+ token: appkitOptions.tempToken() || appkitOptions.token()
314
337
  },
315
338
  success: (rsp) => {
316
339
  const { data } = rsp;
@@ -372,25 +395,6 @@ function useCrypto(config) {
372
395
  };
373
396
  }
374
397
 
375
- const globalData = {};
376
-
377
- const appKitOptions = {
378
- app: () => "",
379
- tenant: () => "",
380
- token: () => "",
381
- tempToken: () => "",
382
- baseUrl: () => "",
383
- 401() {
384
- },
385
- gray: () => ""
386
- };
387
- const useAppKitOptions = () => {
388
- if (!globalData.$appKitOptions) {
389
- globalData.$appKitOptions = appKitOptions;
390
- }
391
- return globalData.$appKitOptions;
392
- };
393
-
394
398
  const defaultLogOptions = {
395
399
  projectName: "ddyk-dev",
396
400
  logStore: "ddjf-internet-web",
@@ -1169,8 +1173,19 @@ var script$D = /* @__PURE__ */ defineComponent({
1169
1173
  onUploadFile(csRes);
1170
1174
  }
1171
1175
  }
1172
- function onPhotograph() {
1176
+ async function onPhotograph() {
1173
1177
  if (props.disabled) return;
1178
+ if (Taro.getEnv() === "WEB") {
1179
+ const csRes = await chooseMedia({
1180
+ count: 1,
1181
+ sourceType: ["album"],
1182
+ // "camera" | "album"
1183
+ maxDuration: 60
1184
+ // 使用duration属性判断是图片还是视频,图片没有该属性
1185
+ });
1186
+ onUploadFile(csRes);
1187
+ return;
1188
+ }
1174
1189
  activeSheetVisible.value = true;
1175
1190
  }
1176
1191
  return (_ctx, _cache) => {
@@ -1428,14 +1443,6 @@ const endpointsList$2 = {
1428
1443
  * http://ytech.dev.ddjf.info/payment/doc.html#/%E5%AE%A2%E6%88%B7%E5%9F%9FAPI/%E6%94%AF%E4%BB%98%E4%B8%AD%E5%BF%83-%E5%AF%B9%E5%A4%96%E6%8E%A5%E5%8F%A3/rechargePayUsingPOST
1429
1444
  */
1430
1445
  \u83B7\u53D6\u5FAE\u4FE1\u652F\u4ED8\u53C2\u6570\u5305: {
1431
- // {
1432
- // "amount": 100,
1433
- // "appCode": "crm",
1434
- // "caseCode": "aiApproveRecharge",
1435
- // "tenantId": "17454646",
1436
- // "transFlowNo": "4343244",
1437
- // "certificateNo": "o7k8L0QTqcwRIBKVUPzI7iPfghLM"
1438
- // }
1439
1446
  path: "/payment/outer/payment/rechargePay",
1440
1447
  translate: (params) => ({
1441
1448
  amount: params.amount,
@@ -4159,7 +4166,7 @@ var script$j = /* @__PURE__ */ defineComponent({
4159
4166
  const props = __props;
4160
4167
  const emit = __emit;
4161
4168
  const areaFormatOptions = computed(() => {
4162
- const { province_list, city_list, county_list } = JSON.parse(Taro.getStorageSync("wechat_area"));
4169
+ const { province_list, city_list, county_list } = JSON.parse(getStorageSync("wechat_area"));
4163
4170
  const map = /* @__PURE__ */ new Map();
4164
4171
  city_list.forEach((item) => {
4165
4172
  const provinceShortId = item.id.slice(0, 2);
@@ -5511,7 +5518,6 @@ var script$c = /* @__PURE__ */ defineComponent({
5511
5518
  const emits = __emit;
5512
5519
  return (_ctx, _cache) => {
5513
5520
  const _component_rich_text = resolveComponent("rich-text");
5514
- const _component_scroll_view = resolveComponent("scroll-view");
5515
5521
  return openBlock(), createElementBlock("div", _hoisted_1$b, [
5516
5522
  createVNode(script$d, {
5517
5523
  bordered: false,
@@ -5522,7 +5528,7 @@ var script$c = /* @__PURE__ */ defineComponent({
5522
5528
  }, null, 8, ["value"]),
5523
5529
  createElementVNode("div", _hoisted_2$7, [
5524
5530
  unref(list).length ? (openBlock(), createElementBlock("div", _hoisted_3$5, [
5525
- createVNode(_component_scroll_view, {
5531
+ createVNode(unref(ScrollView), {
5526
5532
  class: "content",
5527
5533
  "scroll-y": true,
5528
5534
  "refresher-enabled": true,
@@ -6015,7 +6021,7 @@ var script$9 = /* @__PURE__ */ defineComponent({
6015
6021
  });
6016
6022
  const appkitOptions = useAppKitOptions();
6017
6023
  const $http = useHttp();
6018
- let Res = await Taro.uploadFile({
6024
+ let Res = await uploadFile({
6019
6025
  url: `${appkitOptions.baseUrl()}/cas/file/uploadImg`,
6020
6026
  filePath,
6021
6027
  name: "file",
@@ -6149,7 +6155,6 @@ var script$9 = /* @__PURE__ */ defineComponent({
6149
6155
  return (_ctx, _cache) => {
6150
6156
  const _component_nut_cell = Cell;
6151
6157
  const _component_nut_button = Button;
6152
- const _component_scroll_view = resolveComponent("scroll-view");
6153
6158
  const _component_nut_input = Input;
6154
6159
  const _component_nut_dialog = Dialog;
6155
6160
  const _component_nut_popup = Popup;
@@ -6157,7 +6162,7 @@ var script$9 = /* @__PURE__ */ defineComponent({
6157
6162
  Fragment,
6158
6163
  null,
6159
6164
  [
6160
- createVNode(_component_scroll_view, {
6165
+ createVNode(unref(ScrollView), {
6161
6166
  "scroll-y": !userState.visible && !avatarVisible.value,
6162
6167
  class: "user-info"
6163
6168
  }, {
@@ -7824,15 +7829,15 @@ var script$4 = /* @__PURE__ */ defineComponent({
7824
7829
  type: item.fileType,
7825
7830
  status: "uploading"
7826
7831
  });
7827
- await uploadFile(formState.attachment[formState.attachment.length - 1]);
7832
+ await uploadFile$1(formState.attachment[formState.attachment.length - 1]);
7828
7833
  }
7829
7834
  }
7830
7835
  });
7831
7836
  }
7832
- async function uploadFile(item) {
7837
+ async function uploadFile$1(item) {
7833
7838
  const appkitOptions = useAppKitOptions();
7834
7839
  const token = appkitOptions.tempToken() || appkitOptions.token();
7835
- let Res = await Taro.uploadFile({
7840
+ let Res = await uploadFile({
7836
7841
  url: `${appkitOptions.baseUrl()}/saas-base/file/upload`,
7837
7842
  filePath: item.url,
7838
7843
  name: "file",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxda/appkit",
3
- "version": "4.2.57",
3
+ "version": "4.2.58",
4
4
  "description": "小程序应用开发包",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.ts",
@@ -4,7 +4,7 @@
4
4
  <!--* TIP: 微信原生实现多列选择器-->
5
5
  <script setup lang="ts">
6
6
  import { computed, ref, watch } from 'vue'
7
- import Taro from '@tarojs/taro'
7
+ import Taro, {getStorageSync} from '@tarojs/taro'
8
8
  import DdIcon from '../dd-icon/index.vue'
9
9
 
10
10
  interface AreaItem {
@@ -36,7 +36,7 @@ const props = withDefaults(defineProps<PropsType>(), {
36
36
  const emit = defineEmits(['update:value', 'change', 'cancel'])
37
37
 
38
38
  const areaFormatOptions = computed<AreaItem[]>(() => {
39
- const { province_list, city_list, county_list } = JSON.parse(Taro.getStorageSync('wechat_area'))
39
+ const { province_list, city_list, county_list } = JSON.parse(getStorageSync('wechat_area'))
40
40
  const map = new Map()
41
41
  city_list.forEach((item: any) => {
42
42
  const provinceShortId = item.id.slice(0, 2)
@@ -1,41 +1,18 @@
1
1
  <template>
2
2
  <div class="notice-list">
3
- <DdSearch
4
- :bordered="false"
5
- :focus="false"
6
- :value="query.title"
7
- placeholder="请输入关键字搜索"
8
- @search="onSearch"
9
- />
3
+ <DdSearch :bordered="false" :focus="false" :value="query.title" placeholder="请输入关键字搜索" @search="onSearch" />
10
4
 
11
5
  <div style="flex: 1; overflow: hidden">
12
6
  <div class="wrapper" v-if="list.length">
13
- <scroll-view
14
- class="content"
15
- :scroll-y="true"
16
- :refresher-enabled="true"
17
- :refresherTriggered="isRefresh"
18
- @refresherrefresh="onRefresh"
19
- :lower-threshold="100"
20
- @scrolltolower="runNext"
21
- bindscroll=""
22
- >
23
- <div
24
- class="card"
25
- :class="{ active: item.isRead != '1' }"
26
- v-for="(item, index) in list"
27
- :key="index"
28
- @click="notifyRead(item, index)"
29
- >
7
+ <ScrollView class="content" :scroll-y="true" :refresher-enabled="true" :refresherTriggered="isRefresh"
8
+ @refresherrefresh="onRefresh" :lower-threshold="100" @scrolltolower="runNext" bindscroll="">
9
+ <div class="card" :class="{ active: item.isRead != '1' }" v-for="(item, index) in list" :key="index"
10
+ @click="notifyRead(item, index)">
30
11
  <div class="point"></div>
31
12
  <div>
32
13
  <div class="time">{{ formatMinutes(item.receiveTime) }}</div>
33
- <div
34
- v-if="app !== 'loankit' || (app === 'loankit' && item.title !== item.context)"
35
- class="text tit"
36
- style="display: flex; align-items: center"
37
- :class="{ gray: item.isRead == '1' }"
38
- >
14
+ <div v-if="app !== 'loankit' || (app === 'loankit' && item.title !== item.context)" class="text tit"
15
+ style="display: flex; align-items: center" :class="{ gray: item.isRead == '1' }">
39
16
  {{ item.title }}
40
17
  <div class="notice-list-label" v-if="showApp && appMap[item.appCode]">
41
18
  {{ appMap[item.appCode] }}
@@ -43,26 +20,19 @@
43
20
  </div>
44
21
  <div class="text" :class="{ gray: item.isRead == '1' }">
45
22
  <rich-text style="white-space: pre-wrap" :nodes="item.context"></rich-text>
46
- <span
47
- v-if="item.link && item.msgType == 3"
48
- class="notice-list-file"
49
- @click="onNoticeView(item.link)"
50
- >
23
+ <span v-if="item.link && item.msgType == 3" class="notice-list-file" @click="onNoticeView(item.link)">
51
24
  查看附件
52
25
  </span>
53
26
  </div>
54
27
  </div>
55
28
  </div>
56
29
  <div v-if="isLast" class="cue-text" style="padding-bottom: 40px">没有更多了</div>
57
- </scroll-view>
30
+ </ScrollView>
58
31
  </div>
59
32
  <div v-else class="no-data">
60
33
  <div class="no-data-img">
61
- <img
62
- style="width: 100%; height: 100%"
63
- src="https://cdn.ddjf.com/static/images/loan-manage/no-data.png"
64
- alt=""
65
- />
34
+ <img style="width: 100%; height: 100%" src="https://cdn.ddjf.com/static/images/loan-manage/no-data.png"
35
+ alt="" />
66
36
  </div>
67
37
  <div class="text">暂无记录</div>
68
38
  </div>
@@ -79,6 +49,7 @@ import { useNotice } from './useNotice'
79
49
  import { useCommonList } from './useCommonList'
80
50
  import { NoticeListQueryTypes, NoticeListTypes } from '../types'
81
51
  import { useAppKitOptions } from '../../Appkit'
52
+ import { ScrollView } from '@tarojs/components'
82
53
 
83
54
  const props = withDefaults(
84
55
  defineProps<{
@@ -190,20 +161,24 @@ const emits = defineEmits(['view'])
190
161
  overflow: hidden;
191
162
  display: flex;
192
163
  flex-direction: column;
164
+
193
165
  .wrapper {
194
166
  height: 100%;
195
167
  padding: 10px 12px;
196
168
  box-sizing: border-box;
169
+
197
170
  .content {
198
171
  height: 100%;
199
172
  background: #ffffff;
200
173
  border-radius: 10px;
174
+
201
175
  .card {
202
176
  margin: 0 10px;
203
177
  min-height: 64px;
204
178
  background: #fff;
205
179
  position: relative;
206
180
  padding: 10px;
181
+
207
182
  &::before {
208
183
  content: '';
209
184
  position: absolute;
@@ -213,6 +188,7 @@ const emits = defineEmits(['view'])
213
188
  width: 1px;
214
189
  background: #d8d8d8;
215
190
  }
191
+
216
192
  &::after {
217
193
  content: '';
218
194
  position: absolute;
@@ -222,12 +198,15 @@ const emits = defineEmits(['view'])
222
198
  width: 1px;
223
199
  background: #d8d8d8;
224
200
  }
201
+
225
202
  &:first-child::before {
226
203
  display: none;
227
204
  }
205
+
228
206
  &:last-child::after {
229
207
  display: none;
230
208
  }
209
+
231
210
  .point {
232
211
  width: 5px;
233
212
  height: 5px;
@@ -238,6 +217,7 @@ const emits = defineEmits(['view'])
238
217
  top: 18px;
239
218
  z-index: 9;
240
219
  }
220
+
241
221
  .time {
242
222
  font-size: 13px;
243
223
  color: #353535;
@@ -245,26 +225,32 @@ const emits = defineEmits(['view'])
245
225
  opacity: 0.2;
246
226
  margin-bottom: 5px;
247
227
  }
228
+
248
229
  .text {
249
230
  font-size: 14px;
250
231
  line-height: 20px;
251
232
  color: #9fa0a1;
252
233
  }
234
+
253
235
  &.active {
254
236
  .point {
255
237
  background-color: #f43309;
256
238
  }
239
+
257
240
  .text {
258
241
  color: #171a1d;
259
242
  font-size: 13px;
243
+
260
244
  &.tit {
261
245
  font-size: 15px;
262
246
  margin-bottom: 4px;
263
247
  }
264
248
  }
249
+
265
250
  .notice-list-label {
266
251
  opacity: 1;
267
252
  }
253
+
268
254
  .notice-list-file {
269
255
  opacity: 1;
270
256
  }
@@ -272,18 +258,21 @@ const emits = defineEmits(['view'])
272
258
  }
273
259
  }
274
260
  }
261
+
275
262
  .no-data {
276
263
  background-color: #fff;
277
264
  display: flex;
278
265
  align-items: center;
279
266
  flex-direction: column;
280
267
  height: 100%;
268
+
281
269
  .text {
282
270
  height: 20px;
283
271
  font-size: 14px;
284
272
  color: #7e7e7e;
285
273
  line-height: 20px;
286
274
  }
275
+
287
276
  &-img {
288
277
  width: 238px;
289
278
  height: 157px;
@@ -291,17 +280,20 @@ const emits = defineEmits(['view'])
291
280
  margin-bottom: 19px;
292
281
  }
293
282
  }
283
+
294
284
  &-file {
295
285
  font-size: 10px;
296
286
  color: var(--app-primary-color, #017fff);
297
287
  opacity: 0.5;
298
288
  }
289
+
299
290
  .cue-text {
300
291
  font-size: 13px;
301
292
  color: rgba(60, 60, 60, 0.5);
302
293
  padding: 30px 0 calc(30px + env(safe-area-inset-bottom, 0px));
303
294
  text-align: center;
304
295
  }
296
+
305
297
  &-label {
306
298
  border: 1px solid #caa264;
307
299
  color: #caa264;
@@ -26,14 +26,6 @@ const endpointsList: HttpEndpoints = {
26
26
  * http://ytech.dev.ddjf.info/payment/doc.html#/%E5%AE%A2%E6%88%B7%E5%9F%9FAPI/%E6%94%AF%E4%BB%98%E4%B8%AD%E5%BF%83-%E5%AF%B9%E5%A4%96%E6%8E%A5%E5%8F%A3/rechargePayUsingPOST
27
27
  */
28
28
  获取微信支付参数包: {
29
- // {
30
- // "amount": 100,
31
- // "appCode": "crm",
32
- // "caseCode": "aiApproveRecharge",
33
- // "tenantId": "17454646",
34
- // "transFlowNo": "4343244",
35
- // "certificateNo": "o7k8L0QTqcwRIBKVUPzI7iPfghLM"
36
- // }
37
29
  path: '/payment/outer/payment/rechargePay',
38
30
  translate: (params: PaymentParams) => ({
39
31
  amount: params.amount,
@@ -190,9 +190,20 @@ async function chooseImages(item: any) {
190
190
  }
191
191
  }
192
192
 
193
- function onPhotograph() {
193
+ async function onPhotograph() {
194
194
  if (props.disabled) return
195
195
 
196
+ if (Taro.getEnv() === 'WEB') {
197
+ const csRes = await chooseMedia({
198
+ count: 1,
199
+ sourceType: ['album'], // "camera" | "album"
200
+ maxDuration: 60, // 使用duration属性判断是图片还是视频,图片没有该属性
201
+ })
202
+
203
+ onUploadFile(csRes)
204
+ return
205
+ }
206
+
196
207
  activeSheetVisible.value = true
197
208
  }
198
209
  </script>
@@ -1,20 +1,21 @@
1
- import Taro from '@tarojs/taro'
1
+ import Taro, { uploadFile } from '@tarojs/taro'
2
2
  import { Media } from '@uxda/nutshell/taro'
3
+ import { useAppKitOptions } from '../../Appkit'
3
4
 
4
5
  export type UploadConfig = {
5
- baseUrl: string,
6
- name?: string,
6
+ baseUrl: string
7
+ name?: string
7
8
  headers?: Record<string, string>
8
9
  }
9
10
 
10
- const mappings: {[x: string]: keyof Media} = {
11
+ const mappings: { [x: string]: keyof Media } = {
11
12
  downloadUrl: 'thrumb',
12
13
  fileId: 'id',
13
14
  fileName: 'name',
14
15
  fileSize: 'size',
15
16
  fileSuffix: 'ext',
16
17
  fileType: 'type',
17
- originalUrl: 'url'
18
+ originalUrl: 'url',
18
19
  }
19
20
 
20
21
  const transformFields = (row: any) => {
@@ -24,14 +25,19 @@ const transformFields = (row: any) => {
24
25
  type UploadFunction = (url: string, file: Media) => Promise<Media>
25
26
 
26
27
  export const useUpload = (config: UploadConfig) => {
28
+ const appkitOptions = useAppKitOptions()
29
+ console.log('===config', config)
30
+ console.log('===config', appkitOptions.tempToken() || appkitOptions.token())
31
+
27
32
  const upload: UploadFunction = (url: string, file: Media) => {
28
33
  return new Promise<Media>((resolve, reject) => {
29
- Taro.uploadFile({
34
+ uploadFile({
30
35
  url: config.baseUrl + url,
31
36
  filePath: file.path!,
32
37
  name: 'file',
33
- header: config.headers ?? {
34
- token: Taro.getStorageSync('session')
38
+ header: {
39
+ ...config.headers,
40
+ token: appkitOptions.tempToken() || appkitOptions.token(),
35
41
  },
36
42
  success: (rsp: any) => {
37
43
  const { data } = rsp
@@ -42,7 +48,7 @@ export const useUpload = (config: UploadConfig) => {
42
48
  resolve(transformFields(response.result))
43
49
  } catch (e) {
44
50
  reject({
45
- message: '文件上传异常'
51
+ message: '文件上传异常',
46
52
  })
47
53
  }
48
54
  },
@@ -50,6 +56,6 @@ export const useUpload = (config: UploadConfig) => {
50
56
  })
51
57
  }
52
58
  return {
53
- upload
59
+ upload,
54
60
  }
55
- }
61
+ }
@@ -38,7 +38,7 @@
38
38
  </template>
39
39
 
40
40
  <script lang="ts" setup>
41
- import Taro, { showToast, showLoading, chooseMedia } from '@tarojs/taro'
41
+ import Taro, { showToast, showLoading, chooseMedia, uploadFile as TaroUploadFile } from '@tarojs/taro'
42
42
  import { onMounted, reactive, ref } from 'vue'
43
43
  import { useAppKitOptions } from '../../Appkit'
44
44
  import { useHttp } from '../api'
@@ -139,7 +139,7 @@ async function uploadFile(item: any) {
139
139
  const appkitOptions = useAppKitOptions()
140
140
  const token = appkitOptions.tempToken() || appkitOptions.token()
141
141
 
142
- let Res: any = await Taro.uploadFile({
142
+ let Res: any = await TaroUploadFile({
143
143
  url: `${appkitOptions.baseUrl()}/saas-base/file/upload`,
144
144
  filePath: item.url,
145
145
  name: 'file',
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <scroll-view :scroll-y="!userState.visible && !avatarVisible" class="user-info">
2
+ <ScrollView :scroll-y="!userState.visible && !avatarVisible" class="user-info">
3
3
  <DdSkeleton v-if="firstLoading" :row="3"></DdSkeleton>
4
4
  <div v-else class="user-info-wrap">
5
5
  <div class="user-info-tit">账号信息</div>
@@ -78,7 +78,7 @@
78
78
  type="primary">退出登录</nut-button>
79
79
  </div>
80
80
  </div>
81
- </scroll-view>
81
+ </ScrollView>
82
82
 
83
83
  <!-- 修改用户名弹框 -->
84
84
  <nut-dialog title="输入新的用户名" :border="false" pop-class="change-username-popup" v-model:visible="userState.visible"
@@ -128,12 +128,13 @@
128
128
  </template>
129
129
 
130
130
  <script lang="ts" setup>
131
- import Taro, { useDidShow, showToast, showLoading, hideLoading } from "@tarojs/taro";
131
+ import Taro, { useDidShow, showToast, showLoading, hideLoading, uploadFile } from "@tarojs/taro";
132
132
  import { ref, onMounted, reactive, onUnmounted } from "vue";
133
133
  import { useAppKitOptions } from "../../Appkit";
134
134
  import { useEncode } from "../../shared/composables/useEncode";
135
135
  import DdSkeleton from "../../components/dd-skeleton/index.vue";
136
136
  import { useHttp } from "../api";
137
+ import { ScrollView } from '@tarojs/components'
137
138
 
138
139
  const props = withDefaults(
139
140
  defineProps<{
@@ -216,7 +217,7 @@ async function updateImage(filePath: string) {
216
217
  const appkitOptions = useAppKitOptions();
217
218
  const $http = useHttp();
218
219
 
219
- let Res: any = await Taro.uploadFile({
220
+ let Res: any = await uploadFile({
220
221
  url: `${appkitOptions.baseUrl()}/cas/file/uploadImg`,
221
222
  filePath: filePath,
222
223
  name: "file",