diff --git a/src/api/upload.ts b/src/api/upload.ts index 3440786..df8337c 100644 --- a/src/api/upload.ts +++ b/src/api/upload.ts @@ -1,5 +1,5 @@ import { getCache } from '@/utils/cache'; -import { HOST, TENANT_ID } from '@/utils/request'; +import { request, HOST, TENANT_ID } from '@/utils/request'; /** * 上传图片到后端,返回 { url, ... } @@ -32,3 +32,19 @@ export const uploadFile = (filePath: string): Promise<{ url: string; [key: strin }); }); }; + +/** + * 检查图片是否合规 + */ +export const checkImage = (data: { + bizId: string; + bizType: number; + imageUrl: string; + scene: number; +}) => + request({ + url: '/applet/media/checkImage', + method: 'POST', + data, + silent: true, + }); diff --git a/src/pages/doWork/components/Question.vue b/src/pages/doWork/components/Question.vue index 5ff683e..1dda7ec 100644 --- a/src/pages/doWork/components/Question.vue +++ b/src/pages/doWork/components/Question.vue @@ -3,16 +3,9 @@ - - - - {{ idx }} - / - {{ total }} - - - {{ data.titleChannelTypeName }} - + + + {{ data.titleChannelTypeName }} @@ -261,10 +254,7 @@ > - - - + import { ref, computed, watch, onUnmounted } from 'vue'; -import { uploadFile } from '@/api/upload'; +import { uploadFile, checkImage } from '@/api/upload'; import ImageCropper from '@/components/ImageCropper/index.vue'; import { formatQuestionHtml } from '@/utils/questionHtml'; @@ -798,6 +788,19 @@ const uploadImage = async (filePath: string) => { submitAnswerPic.value = newList.join(','); emit('submit', { submitAnswerPic: submitAnswerPic.value }); uni.hideLoading(); + + // 上传成功后调用图片合规检查 + const bizId = props.data?.id || props.data?.itemId || ''; + if (bizId && newUrl) { + checkImage({ + bizId, + bizType: 1, + imageUrl: newUrl, + scene: 1, + }).catch(() => { + // 合规检查失败不影响上传流程,静默处理 + }); + } } catch (err: any) { uni.hideLoading(); uni.showToast({ title: err?.message || '上传失败', icon: 'none' }); @@ -952,45 +955,12 @@ onUnmounted(() => { padding: 10rpx 34rpx 10rpx 12rpx; } -.q-meta { - display: flex; - align-items: center; - gap: 6rpx; - margin-bottom: 6rpx; -} - -.q-badge { - display: inline-flex; - align-items: baseline; - gap: 2rpx; - padding: 3rpx 9rpx; - background: linear-gradient(180deg, #818cf8, #4f46e5); - color: #ffffff; - border-radius: 999rpx; - box-shadow: - 0 4rpx 10rpx rgba(79, 70, 229, 0.3), - inset 0 -3rpx 0 rgba(0, 0, 0, 0.12); - - .q-badge-num { - font-size: 15rpx; - font-weight: 800; - } - - .q-badge-divider { - font-size: 11rpx; - opacity: 0.6; - } - - .q-badge-total { - font-size: 12rpx; - opacity: 0.85; - } -} - .q-type { + display: inline-flex; padding: 2rpx 8rpx; background: #eef2ff; border-radius: 999rpx; + margin-bottom: 6rpx; text { font-size: 13rpx; @@ -1623,15 +1593,18 @@ onUnmounted(() => { position: absolute; top: 4rpx; right: 4rpx; - width: 36rpx; - height: 36rpx; - background: rgba(15, 23, 42, 0.7); + width: 38rpx; + height: 38rpx; + background: rgba(15, 23, 42, 0.65); border-radius: 50%; display: flex; align-items: center; justify-content: center; - svg { width: 22rpx; height: 22rpx; } + .del-icon { + width: 24rpx; + height: 24rpx; + } } } diff --git a/src/pages/doWork/index.vue b/src/pages/doWork/index.vue index 700e24d..26e018a 100644 --- a/src/pages/doWork/index.vue +++ b/src/pages/doWork/index.vue @@ -23,13 +23,7 @@ {{ paperList.length }} - - - - - - + {{ timeFilter }} @@ -586,7 +580,7 @@ onUnmounted(() => { display: flex; align-items: center; gap: 4rpx; - padding: 3rpx 10rpx; + padding: 5rpx 10rpx; background: #ffffff; border-radius: 999rpx; box-shadow: @@ -594,13 +588,9 @@ onUnmounted(() => { inset 0 -3rpx 0 rgba(199, 210, 254, 0.5); .clock-icon { - width: 15rpx; - height: 15rpx; - - svg { - width: 100%; - height: 100%; - } + width: 17rpx; + height: 17rpx; + flex-shrink: 0; } text { @@ -608,6 +598,8 @@ onUnmounted(() => { font-weight: 700; color: #4f46e5; font-variant-numeric: tabular-nums; + line-height: 20rpx; + vertical-align: middle; } } @@ -617,7 +609,7 @@ onUnmounted(() => { height: 0; position: relative; z-index: 1; - padding: 0 10rpx 5rpx; + padding: 0 10rpx; display: flex; flex-direction: column; } @@ -632,16 +624,16 @@ onUnmounted(() => { flex-shrink: 0; display: flex; align-items: center; - gap: 6rpx; - padding: 6rpx 0 calc(8rpx + constant(safe-area-inset-bottom)); - padding: 6rpx 0 calc(8rpx + env(safe-area-inset-bottom)); + gap: 4rpx; + padding: 3rpx 0 calc(6rpx + constant(safe-area-inset-bottom)); + padding: 3rpx 0 calc(6rpx + env(safe-area-inset-bottom)); box-sizing: border-box; } .indicator { flex: 1; width: 0; - height: 42rpx; + height: 40rpx; white-space: nowrap; } @@ -649,7 +641,7 @@ onUnmounted(() => { display: inline-flex; align-items: center; gap: 5rpx; - padding: 3rpx 0 7rpx; + padding: 4rpx 0; } .indicator-item { @@ -731,13 +723,13 @@ onUnmounted(() => { .btn-next { flex-shrink: 0; - height: 36rpx; - padding: 0 18rpx; + height: 32rpx; + padding: 0 14rpx; border-radius: 999rpx; display: flex; align-items: center; justify-content: center; - gap: 8rpx; + gap: 6rpx; background: linear-gradient(180deg, #4ade80, #16a34a); color: #ffffff; box-shadow: diff --git a/src/static/back.jpg b/src/static/back.jpg deleted file mode 100644 index 51a3658..0000000 Binary files a/src/static/back.jpg and /dev/null differ diff --git a/src/static/image/ab464291d2f39f4e38178ac21ca4f58.png b/src/static/image/ab464291d2f39f4e38178ac21ca4f58.png deleted file mode 100644 index 215d7d2..0000000 Binary files a/src/static/image/ab464291d2f39f4e38178ac21ca4f58.png and /dev/null differ diff --git a/src/static/image/svg/del.svg b/src/static/image/svg/del.svg new file mode 100644 index 0000000..9f56988 --- /dev/null +++ b/src/static/image/svg/del.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/static/image/svg/time.svg b/src/static/image/svg/time.svg new file mode 100644 index 0000000..1a6aaec --- /dev/null +++ b/src/static/image/svg/time.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/static/logo.png b/src/static/logo.png deleted file mode 100644 index 47d5eed..0000000 Binary files a/src/static/logo.png and /dev/null differ