@uxda/appkit 1.2.73 → 1.2.76

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.
Files changed (41) hide show
  1. package/dist/appkit.css +829 -29
  2. package/dist/assets/asset-BnRbHhKf +88 -0
  3. package/dist/index.js +3191 -558
  4. package/package.json +2 -1
  5. package/src/balance/api/endpoints.ts +44 -44
  6. package/src/balance/types.ts +42 -42
  7. package/src/components/bt-cropper/index.vue +774 -0
  8. package/src/components/bt-cropper/utils/calcCropper.js +42 -0
  9. package/src/components/bt-cropper/utils/calcImagePosition.js +23 -0
  10. package/src/components/bt-cropper/utils/calcImageSize.js +37 -0
  11. package/src/components/bt-cropper/utils/calcPointDistance.js +12 -0
  12. package/src/components/bt-cropper/utils/calcRightAndBottom.js +7 -0
  13. package/src/components/bt-cropper/utils/ratio.js +3 -0
  14. package/src/components/bt-cropper/utils/tools.js +25 -0
  15. package/src/components/dd-search/index.vue +3 -3
  16. package/src/components/dd-skeleton/doc.md +19 -0
  17. package/src/components/dd-skeleton/index.vue +36 -0
  18. package/src/index.ts +1 -0
  19. package/src/notice/components/NoticeBanner.vue +1 -1
  20. package/src/notice/components/NoticeList.vue +3 -1
  21. package/src/notice/components/index.ts +1 -2
  22. package/src/shared/components/DeviceVersion.vue +3 -2
  23. package/src/shared/composables/index.ts +3 -0
  24. package/src/shared/composables/useCountdown.ts +46 -0
  25. package/src/shared/composables/useDragBox.ts +97 -0
  26. package/src/shared/composables/useEncode.ts +43 -0
  27. package/src/shared/composables/useValidator.ts +31 -0
  28. package/src/shared/http/Http.ts +4 -3
  29. package/src/user/api/endpoints.ts +17 -0
  30. package/src/user/api/index.ts +87 -0
  31. package/src/{notice → user}/components/LoginSetting.vue +3 -1
  32. package/src/user/components/UserBinding.vue +300 -0
  33. package/src/user/components/UserBindingSuccess.vue +80 -0
  34. package/src/user/components/UserEntry.vue +142 -0
  35. package/src/user/components/UserFeedback.vue +440 -0
  36. package/src/user/components/UserFeedbackEntry.vue +171 -0
  37. package/src/user/components/UserHeadCrop.vue +65 -0
  38. package/src/user/components/UserInfo.vue +632 -0
  39. package/src/user/components/UserResourceEmpty.vue +75 -0
  40. package/src/user/components/index.ts +21 -0
  41. package/src/user/index.ts +1 -0
@@ -0,0 +1,42 @@
1
+ import ratio from './ratio'
2
+ import calcRightAndBottom from './calcRightAndBottom'
3
+ const defaultImagePosition = {
4
+ left: 0,
5
+ top: 0,
6
+ width: 9,
7
+ height: 16
8
+ }
9
+ const defaultTarget = {
10
+ width: 2,
11
+ height: 1
12
+ }
13
+ /**
14
+ * 计算初始的裁剪框位置
15
+ * @param {*} imagePosition
16
+ * @param {*} target
17
+ */
18
+ export default function (imagePosition = defaultImagePosition, target = defaultTarget) {
19
+ const cropperPosition = {
20
+ left: 0,
21
+ right: 0,
22
+ top: 0,
23
+ bottom: 0,
24
+ width: 0,
25
+ height: 0
26
+ }
27
+ const targetRatio = ratio(target.width, target.height)
28
+ const imageRatio = ratio(imagePosition.width, imagePosition.height)
29
+ if (targetRatio > imageRatio) {
30
+ cropperPosition.width = imagePosition.width
31
+ cropperPosition.height = cropperPosition.width / targetRatio
32
+ cropperPosition.left = imagePosition.left
33
+ cropperPosition.top = (imagePosition.height - cropperPosition.height) / 2 + imagePosition.top
34
+ } else {
35
+ cropperPosition.height = imagePosition.height
36
+ cropperPosition.width =
37
+ targetRatio === 0 ? imagePosition.width : cropperPosition.height * targetRatio
38
+ cropperPosition.left = (imagePosition.width - cropperPosition.width) / 2 + imagePosition.left
39
+ cropperPosition.top = imagePosition.top
40
+ }
41
+ return calcRightAndBottom(cropperPosition)
42
+ }
@@ -0,0 +1,23 @@
1
+ import calcRightAndBottom from './calcRightAndBottom'
2
+ const defaultPosition = {
3
+ left: 0,
4
+ top: 0,
5
+ width: 0,
6
+ height: 0
7
+ }
8
+ const defaultTransfrom = {
9
+ imgTranslateX: 0,
10
+ imgTranslateY: 0,
11
+ imgScale: 1
12
+ }
13
+ // 先默认变换原点在中间
14
+ export default function (imagePosition = defaultPosition, transfrom = defaultTransfrom) {
15
+ const width = imagePosition.width * transfrom.imgScale
16
+ const height = imagePosition.height * transfrom.imgScale
17
+ return calcRightAndBottom({
18
+ left: imagePosition.left + transfrom.imgTranslateX - (width - imagePosition.width) / 2,
19
+ top: imagePosition.top + transfrom.imgTranslateY - (height - imagePosition.height) / 2,
20
+ width,
21
+ height
22
+ })
23
+ }
@@ -0,0 +1,37 @@
1
+ import ratio from './ratio.js'
2
+ export default async function (
3
+ imageInfo,
4
+ container = {
5
+ width: 9,
6
+ height: 16
7
+ }
8
+ ) {
9
+ const defaultcontainer = {
10
+ width: 9,
11
+ height: 16
12
+ }
13
+ if (!container) {
14
+ container = defaultcontainer
15
+ }
16
+ const containerRatio = ratio(container.width, container.height)
17
+ const imageRatio = ratio(imageInfo.width, imageInfo.height)
18
+ if (containerRatio > imageRatio) {
19
+ const width = container.height * imageRatio
20
+ const height = container.height
21
+ return {
22
+ width,
23
+ height,
24
+ left: (container.width - width) / 2,
25
+ top: 0
26
+ }
27
+ } else {
28
+ const width = container.width
29
+ const height = container.width / imageRatio
30
+ return {
31
+ width,
32
+ height,
33
+ left: 0,
34
+ top: (container.height - height) / 2
35
+ }
36
+ }
37
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * 计算两点之间距离
3
+ * @param {*} point1
4
+ * @param {*} point2
5
+ */
6
+ export default function (point1 = [0, 0], point2 = [0, 0]) {
7
+ const X1 = point1[0],
8
+ X2 = point2[0],
9
+ Y1 = point1[1],
10
+ Y2 = point2[1]
11
+ return Math.sqrt(Math.pow(X1 - X2, 2) + Math.pow(Y1 - Y2, 2))
12
+ }
@@ -0,0 +1,7 @@
1
+ export default function (position) {
2
+ return {
3
+ ...position,
4
+ right: position.left + position.width,
5
+ bottom: position.top + position.height
6
+ }
7
+ }
@@ -0,0 +1,3 @@
1
+ export default function (width = 2, height = 1) {
2
+ return width / height
3
+ }
@@ -0,0 +1,25 @@
1
+ export function getTouchPoints(touchs) {
2
+ return Array.from(touchs).map((ev) => {
3
+ return [ev.clientX, ev.clientY]
4
+ })
5
+ }
6
+ export function debounce(fn, wait = 200) {
7
+ var timer = null
8
+ console.log('debounce')
9
+ return function () {
10
+ if (timer !== null) {
11
+ clearTimeout(timer)
12
+ }
13
+ timer = setTimeout(fn, wait)
14
+ }
15
+ }
16
+
17
+ /**
18
+ * @description 睡眠
19
+ * @param {number} time 等待时间毫秒数
20
+ */
21
+ export function sleep(time = 200) {
22
+ return new Promise((resolve) => {
23
+ setTimeout(resolve, time)
24
+ })
25
+ }
@@ -119,7 +119,7 @@ const isFoucs = ref(props.focus)
119
119
  }
120
120
  &.focus {
121
121
  .dd-search__form {
122
- border-color: #017fff;
122
+ border-color: var(--app-primary-color, #017fff);
123
123
  }
124
124
  }
125
125
  &__placeholder {
@@ -143,7 +143,7 @@ const isFoucs = ref(props.focus)
143
143
  width: 100%;
144
144
  box-sizing: border-box;
145
145
  padding: 0 10px;
146
- caret-color: #017fff;
146
+ caret-color: var(--app-primary-color, #017fff);
147
147
  }
148
148
  &__prefix,
149
149
  &__suffix {
@@ -155,7 +155,7 @@ const isFoucs = ref(props.focus)
155
155
  line-height: 33px;
156
156
  padding: 0 10px;
157
157
  font-size: 16px;
158
- color: #017fff;
158
+ color: var(--app-primary-color, #017fff);
159
159
  }
160
160
  &.disabled &__suffix {
161
161
  display: none;
@@ -0,0 +1,19 @@
1
+ # ddSkeleton 骨架屏
2
+
3
+ #
4
+ ## 使用
5
+
6
+ ``` javascript
7
+ import ddSkeleton from '~/components/ddSkeleton/index.vue'
8
+ ```
9
+ ``` html
10
+ <dd-skeleton @onSuccess="onSuccess" />
11
+ ```
12
+
13
+ ## Prop
14
+
15
+ | 字段 | 说明 | 类型 | 默认值 |
16
+ |-----------|-------------|---------|----------|
17
+ | row | 大骨架个数 | number | 3 |
18
+ | shortRow | 短骨架的行数 | string | 2 |
19
+ | longRow | 长骨架的行数 | string | 3 |
@@ -0,0 +1,36 @@
1
+ <script setup lang="ts">
2
+ interface PropType {
3
+ row?: number
4
+ shortRow?: string
5
+ longRow?: string
6
+ }
7
+
8
+ withDefaults(defineProps<PropType>(), {
9
+ row: 3,
10
+ shortRow: '2',
11
+ longRow: '4',
12
+ })
13
+ </script>
14
+
15
+ <template>
16
+ <div class="dd-skeleton">
17
+ <div class="dd-skeleton__item" v-for="(item, key) in row" :key="key">
18
+ <nut-skeleton
19
+ width="40%"
20
+ height="15px"
21
+ animated
22
+ v-if="Number(shortRow) > 0"
23
+ :row="shortRow"
24
+ ></nut-skeleton>
25
+ <nut-skeleton width="100%" height="15px" title animated :row="longRow"></nut-skeleton>
26
+ </div>
27
+ </div>
28
+ </template>
29
+
30
+ <style lang="scss">
31
+ .dd-skeleton {
32
+ &__item {
33
+ margin-top: 10px;
34
+ }
35
+ }
36
+ </style>
package/src/index.ts CHANGED
@@ -85,4 +85,5 @@ export * from './balance'
85
85
  export * from './shared'
86
86
  export * from './register'
87
87
  export * from './notice'
88
+ export * from './user'
88
89
  export { type AppKitOptions }
@@ -236,7 +236,7 @@ const emits = defineEmits(['detail', 'close', 'view', 'popup'])
236
236
  text-align: left;
237
237
  }
238
238
  &-btn {
239
- color: #017fff;
239
+ color: var(--app-primary-color, #017fff);
240
240
  padding-left: 6px;
241
241
  }
242
242
  }
@@ -132,6 +132,8 @@ function formatMinutes(time: number) {
132
132
  const diffInMinutes = end.diff(start, 'minute')
133
133
  if (diffInMinutes < 60 && diffInMinutes > 0) {
134
134
  return `${diffInMinutes}分钟前`
135
+ } else if (diffInMinutes === 0) {
136
+ return `刚刚`
135
137
  }
136
138
 
137
139
  return dayjs(time).format('YYYY-MM-DD HH:mm:ss')
@@ -287,7 +289,7 @@ const emits = defineEmits(['view'])
287
289
  }
288
290
  &-file {
289
291
  font-size: 10px;
290
- color: #017fff;
292
+ color: var(--app-primary-color, #017fff);
291
293
  opacity: 0.5;
292
294
  }
293
295
  .cue-text {
@@ -1,6 +1,5 @@
1
1
  import NoticeBanner from './NoticeBanner.vue'
2
- import LoginSetting from './LoginSetting.vue'
3
2
  import NoticeEntry from './NoticeEntry.vue'
4
3
  import NoticeList from './NoticeList.vue'
5
4
 
6
- export { NoticeBanner, LoginSetting, NoticeEntry, NoticeList }
5
+ export { NoticeBanner, NoticeEntry, NoticeList }
@@ -14,6 +14,7 @@ import DdNoticeBar from '../../components/dd-notice-bar/index.vue'
14
14
  import { useSafeArea } from '../composables'
15
15
  import Taro from '@tarojs/taro'
16
16
  import { useHttp } from '../../balance/api'
17
+ import debounce from 'lodash/debounce'
17
18
 
18
19
  const showAlert = ref(false)
19
20
  const safeArea = useSafeArea()
@@ -24,7 +25,7 @@ const topStype = computed(() => {
24
25
 
25
26
  const recommendVersions = ref()
26
27
  // 获取系统配置 - 小程序推荐版本
27
- async function getPropertieByCode() {
28
+ const getPropertieByCode = debounce(async () => {
28
29
  if (recommendVersions.value) return
29
30
 
30
31
  const $http = useHttp()
@@ -35,7 +36,7 @@ async function getPropertieByCode() {
35
36
  .then((res: any) => {
36
37
  recommendVersions.value = JSON.parse(res.value || '{}')
37
38
  })
38
- }
39
+ }, 100)
39
40
 
40
41
  onMounted(async () => {
41
42
  await getPropertieByCode()
@@ -1,2 +1,5 @@
1
1
  export * from './useSafeArea'
2
2
  export * from './useTabbar'
3
+ export * from './useCountdown'
4
+ export * from './useValidator'
5
+ export * from './useEncode'
@@ -0,0 +1,46 @@
1
+ /**
2
+ * @description: 倒计时
3
+ * @param {number} time
4
+ * @return {*}
5
+ */
6
+ import { ref, onUnmounted, computed } from 'vue'
7
+
8
+ export function useCountdown() {
9
+ let timer: any = null
10
+ const countdown = ref(60)
11
+ const countdownActive = computed(() => countdown.value > 0 && countdown.value < 60)
12
+
13
+ const startCountdown = () => {
14
+ countdown.value = 60
15
+ timer = setInterval(() => {
16
+ countdown.value--
17
+ if (countdown.value <= 0) {
18
+ stopCountdown()
19
+ }
20
+ }, 1000)
21
+ }
22
+
23
+ const stopCountdown = () => {
24
+ clearInterval(timer)
25
+ countdown.value = 60 // 重置倒计时
26
+ }
27
+
28
+ onUnmounted(() => {
29
+ // stopCountdown() // 组件卸载时确保清除定时器
30
+ })
31
+
32
+ const countdownText = computed(() => {
33
+ if (countdown.value === 60) {
34
+ return '获取验证码'
35
+ } else {
36
+ return `重新发送(${countdown.value}s)`
37
+ }
38
+ })
39
+
40
+ return {
41
+ countdownActive,
42
+ countdownText,
43
+ startCountdown,
44
+ stopCountdown,
45
+ }
46
+ }
@@ -0,0 +1,97 @@
1
+ /**
2
+ * 元素拖拽功能
3
+ */
4
+ import Taro from '@tarojs/taro'
5
+ import { reactive } from 'vue'
6
+
7
+ export function useDragBox() {
8
+ const dragData = reactive({
9
+ left: 0, // 浮动按钮的左边距
10
+ top: 0, // 浮动按钮的上边距
11
+ width: 0, // 浮动按钮的宽度
12
+ height: 0, // 浮动按钮的高度
13
+ startX: 0, // 手指触摸起始点的横坐标
14
+ startY: 0, // 手指触摸起始点的纵坐标
15
+ screenWidth: 0, // 屏幕宽度
16
+ screenHeight: 0, // 屏幕高度
17
+ isDrag: false, // 是否开始拖拽
18
+ oldLeft: 0,
19
+ limitHorizontal: [0, 0], // 横向拖动限制范围
20
+ limitVertical: [0, 0], // 纵向拖动限制范围
21
+ })
22
+
23
+ // 初始化元素拖拽模型
24
+ function initDragData(data: any) {
25
+ // 获取屏幕宽度和高度
26
+ const res = Taro.getSystemInfoSync()
27
+ dragData.screenWidth = res.windowWidth
28
+ dragData.screenHeight = res.windowHeight
29
+ if (!data) data = {}
30
+
31
+ const scale = dragData.screenWidth / 375
32
+ dragData.width = data.width * scale || 0
33
+ dragData.height = data.height * scale || 0
34
+ dragData.left = data.left * scale || 0
35
+ dragData.top = data.top * scale || 0
36
+ dragData.oldLeft = data.left * scale || 0
37
+
38
+ if (data?.limitHorizontal?.length) {
39
+ dragData.limitHorizontal = data?.limitHorizontal
40
+ }
41
+ if (data?.limitVertical?.length) {
42
+ dragData.limitVertical = data?.limitVertical
43
+ }
44
+ }
45
+
46
+ // 触屏开始
47
+ function onDragStart(event: any) {
48
+ dragData.startX = event.touches[0].clientX
49
+ dragData.startY = event.touches[0].clientY
50
+ dragData.isDrag = true
51
+ }
52
+
53
+ // 触屏移动
54
+ function onDragMove(event: any) {
55
+ const moveX = event.touches[0].clientX - dragData.startX
56
+ const moveY = event.touches[0].clientY - dragData.startY
57
+
58
+ let left = dragData.left + moveX
59
+ let top = dragData.top + moveY
60
+
61
+ // 防止浮动按钮移出屏幕
62
+ if (left < dragData.limitHorizontal[0]) {
63
+ left = dragData.limitHorizontal[0]
64
+ } else if (left > dragData.screenWidth - dragData.width - dragData.limitHorizontal[1]) {
65
+ left = dragData.screenWidth - dragData.width - dragData.limitHorizontal[1]
66
+ }
67
+
68
+ if (top < dragData.limitVertical[0]) {
69
+ top = dragData.limitVertical[0]
70
+ } else if (top > dragData.screenHeight - dragData.height - dragData.limitVertical[1]) {
71
+ top = dragData.screenHeight - dragData.height - dragData.limitVertical[1]
72
+ }
73
+
74
+ dragData.left = left
75
+ dragData.top = top
76
+
77
+ dragData.startX = event.touches[0].clientX
78
+ dragData.startY = event.touches[0].clientY
79
+
80
+ // 阻止页面滚动
81
+ event.preventDefault()
82
+ }
83
+
84
+ // 触屏结束
85
+ function onDragEnd() {
86
+ dragData.isDrag = false
87
+ dragData.left = dragData.oldLeft
88
+ }
89
+
90
+ return {
91
+ dragData,
92
+ initDragData,
93
+ onDragStart,
94
+ onDragMove,
95
+ onDragEnd,
96
+ }
97
+ }
@@ -0,0 +1,43 @@
1
+ /**
2
+ * @description: 脱敏相关方法
3
+ */
4
+
5
+ export function useEncode() {
6
+ // 姓名脱敏
7
+ function encodeName(name: string) {
8
+ name = name.trim()
9
+ if (name.length > 2) {
10
+ return name[0].padEnd(name.length - 1, '*') + (name[name.length - 1] || '')
11
+ }
12
+ if (name.length == 0) {
13
+ return ''
14
+ } else {
15
+ return name[0].padEnd(name.length, '*')
16
+ }
17
+ }
18
+
19
+ // 证件脱敏
20
+ function encodeCard(card: string) {
21
+ if (card.length === 18) {
22
+ return card.replace(/(\d{6})\d{8}(\d{3}.)/g, '$1********$2')
23
+ } else {
24
+ return card
25
+ }
26
+ }
27
+
28
+ // 手机脱敏
29
+ function encodePhone(phone: string) {
30
+ phone = String(phone)
31
+ if (phone.length === 11) {
32
+ return phone.replace(/(1\d{2})\d{4}(\d{4})/g, '$1****$2')
33
+ } else {
34
+ return phone
35
+ }
36
+ }
37
+
38
+ return {
39
+ encodeName,
40
+ encodeCard,
41
+ encodePhone,
42
+ }
43
+ }
@@ -0,0 +1,31 @@
1
+ /**
2
+ * 通用表单校验器
3
+ */
4
+ import { isMobilePhone, isIdentityCard } from 'validator'
5
+
6
+ export function useValidator() {
7
+ // 身份证号码校验
8
+ function certNoValidator(value: unknown) {
9
+ if (!value) {
10
+ return '请输入身份证号'
11
+ } else if (!isIdentityCard(value, 'zh-CN')) {
12
+ return '请输入正确的身份证号码'
13
+ }
14
+ return false
15
+ }
16
+
17
+ // 电话号码校验
18
+ function phoneValidator(value: unknown) {
19
+ if (!value) {
20
+ return '请输入手机号码'
21
+ } else if (!isMobilePhone(value, 'zh-CN')) {
22
+ return '请输入正确的手机号'
23
+ }
24
+ return false
25
+ }
26
+
27
+ return {
28
+ certNoValidator,
29
+ phoneValidator,
30
+ }
31
+ }
@@ -66,9 +66,10 @@ const request: HttpInstance['request'] = <T>(config: HttpRequestConfig) => {
66
66
  // 前端要求分页
67
67
  // 在 endpoints transform 之前格式化分页数据
68
68
  // 并拼装回原 raw 数据
69
- const paging = (config.data as RequestData).page
70
- ? (clientConfig.paging as Paging).transform(raw.data)
71
- : void 0
69
+ const paging =
70
+ config.data && config.data.page
71
+ ? (clientConfig.paging as Paging).transform(raw.data)
72
+ : void 0
72
73
  resolve(
73
74
  paging
74
75
  ? ({
@@ -0,0 +1,17 @@
1
+ import { HttpEndpoints } from '../../shared/http'
2
+
3
+ const endpointsList: HttpEndpoints = {}
4
+
5
+ const endpoints = Object.fromEntries(
6
+ Object.entries(endpointsList).map(([name, def]) => [name, def.path])
7
+ )
8
+
9
+ const translates = Object.fromEntries(
10
+ Object.entries(endpointsList).map(([, def]) => [def.path, def.translate])
11
+ )
12
+
13
+ const transforms = Object.fromEntries(
14
+ Object.entries(endpointsList).map(([, def]) => [def.path, def.transform])
15
+ )
16
+
17
+ export { endpoints, translates, transforms }
@@ -0,0 +1,87 @@
1
+ import Taro from '@tarojs/taro'
2
+ import { HttpRequestConfig, PagingData, PagingParams, ResponseRaw, createHttp } from '../../shared'
3
+ import { translates, transforms } from './endpoints'
4
+ import { useAppKitOptions } from '../../Appkit'
5
+
6
+ /**
7
+ * 小程序端 Http
8
+ * 使用 Taro.request 实现
9
+ */
10
+ const vendor = {
11
+ async request<T>(config: HttpRequestConfig) {
12
+ return new Promise<ResponseRaw<T>>((resolve, reject) => {
13
+ Taro.request({
14
+ url: config.url,
15
+ method: config.method,
16
+ header: config.headers,
17
+ data: config.data,
18
+ })
19
+ .then(({ data }) => {
20
+ resolve({
21
+ status: +data.code,
22
+ message: data.msg,
23
+ data: data.result as T,
24
+ })
25
+ })
26
+ .catch((e: any) => {
27
+ reject(e)
28
+ })
29
+ })
30
+ },
31
+ }
32
+
33
+ function useHttp() {
34
+ const appkitOptions = useAppKitOptions()
35
+ const headers: any = {
36
+ Token: appkitOptions.tempToken() || appkitOptions.token(),
37
+ Appcode: appkitOptions.app(),
38
+ cookie: `tid=${appkitOptions.tenant()}`,
39
+ gray: appkitOptions.gray ? appkitOptions.gray() : '0',
40
+ }
41
+
42
+ /**
43
+ * 传入配置获取 Http instanse
44
+ */
45
+ const $http = createHttp({
46
+ vendor,
47
+ baseUrl: appkitOptions.baseUrl(),
48
+ headers,
49
+ interceptors: [
50
+ (raw) => {
51
+ if (raw.status == 401) {
52
+ appkitOptions[401]()
53
+ return true
54
+ }
55
+ return false
56
+ },
57
+ (raw) => {
58
+ if (raw.status > 500 && raw.status != 51015 && raw.status != 51014) {
59
+ Taro.showToast({
60
+ title: raw.message,
61
+ icon: 'none',
62
+ })
63
+ return true
64
+ }
65
+ return false
66
+ },
67
+ ],
68
+ paging: {
69
+ translate: (params: PagingParams) => ({
70
+ pageNum: params.page,
71
+ pageSize: params.pageSize,
72
+ }),
73
+ transform(data: any): PagingData {
74
+ return {
75
+ totalPages: data.pages,
76
+ }
77
+ },
78
+ },
79
+ translates,
80
+ transforms,
81
+ })
82
+ return $http
83
+ }
84
+
85
+ export { useHttp }
86
+
87
+ export * from './endpoints'
@@ -92,13 +92,13 @@ const emits = defineEmits(['show'])
92
92
  top: 10px;
93
93
  bottom: 10px;
94
94
  align-items: center;
95
- justify-content: center;
96
95
  width: calc(100% - 24px);
97
96
  background: #ffffff;
98
97
  border-radius: 5px;
99
98
  display: flex;
100
99
  flex-direction: column;
101
100
  &-img {
101
+ margin-top: 50%;
102
102
  height: 111px;
103
103
  width: 198px;
104
104
  }
@@ -107,6 +107,8 @@ const emits = defineEmits(['show'])
107
107
  color: #353535;
108
108
  opacity: 0.4;
109
109
  font-size: 12px;
110
+ padding: 0 30px;
111
+ text-align: center;
110
112
  }
111
113
  }
112
114
  </style>