hookehuyr

feat(图片上传): 重构图片上传逻辑并添加审核结果处理

- 移除重复的审核不通过提示代码,统一处理上传失败情况
- 为上传成功的图片添加审核结果字段(qiniu_audit)
- 在多个页面添加头像上传须知对话框
- 使用主题颜色常量统一按钮样式
...@@ -5,7 +5,10 @@ ...@@ -5,7 +5,10 @@
5 <view class="w-24 h-24 rounded-full bg-gray-100 flex items-center justify-center mb-2 overflow-hidden"> 5 <view class="w-24 h-24 rounded-full bg-gray-100 flex items-center justify-center mb-2 overflow-hidden">
6 <image :src="formData.avatar_url || defaultAvatar" class="w-full h-full" mode="aspectFill" /> 6 <image :src="formData.avatar_url || defaultAvatar" class="w-full h-full" mode="aspectFill" />
7 </view> 7 </view>
8 - <text class="text-gray-500 text-sm">上传头像</text> 8 + <view class="flex items-center justify-center">
9 + <text class="text-gray-500 text-sm mr-1">上传头像</text>
10 + <Ask size="15" color="#888" @tap.stop="showAvatarTipDialog = true" />
11 + </view>
9 </view> 12 </view>
10 13
11 <!-- Form --> 14 <!-- Form -->
...@@ -102,13 +105,38 @@ ...@@ -102,13 +105,38 @@
102 </nut-popup> 105 </nut-popup>
103 106
104 <nut-image-preview v-model:show="previewVisible" :images="previewImages" /> 107 <nut-image-preview v-model:show="previewVisible" :images="previewImages" />
108 +
109 + <!-- 头像上传须知对话框 -->
110 + <nut-dialog
111 + v-model:visible="showAvatarTipDialog"
112 + title="头像上传须知"
113 + >
114 + <template #default>
115 + <view class="text-gray-700 leading-loose text-sm text-left break-words">
116 + <view class="mb-2">1. 头像大小不能超过5MB</view>
117 + <view class="mb-2">2. 头像格式为jpg、jpeg、png</view>
118 + <view>3. 头像未通过审核,可能原因:色情 / 暴恐内容、敏感人物、违规广告</view>
119 + </view>
120 + </template>
121 + <template #footer>
122 + <nut-button
123 + @click="showAvatarTipDialog = false"
124 + type="primary"
125 + size="normal"
126 + :color="THEME_COLORS.PRIMARY"
127 + block
128 + >
129 + 我知道了
130 + </nut-button>
131 + </template>
132 + </nut-dialog>
105 </view> 133 </view>
106 </template> 134 </template>
107 135
108 <script setup> 136 <script setup>
109 import { ref, reactive, onMounted, computed } from 'vue'; 137 import { ref, reactive, onMounted, computed } from 'vue';
110 import Taro from '@tarojs/taro'; 138 import Taro from '@tarojs/taro';
111 -import { Date as DateIcon, Right } from '@nutui/icons-vue-taro'; 139 +import { Date as DateIcon, Right, Ask } from '@nutui/icons-vue-taro';
112 import BASE_URL from '@/utils/config'; 140 import BASE_URL from '@/utils/config';
113 // 默认头像 141 // 默认头像
114 const defaultAvatar = 'https://cdn.ipadbiz.cn/mlaj/images/icon_1.jpeg' 142 const defaultAvatar = 'https://cdn.ipadbiz.cn/mlaj/images/icon_1.jpeg'
...@@ -128,6 +156,7 @@ const formData = reactive({ ...@@ -128,6 +156,7 @@ const formData = reactive({
128 wheelchair_text: '', 156 wheelchair_text: '',
129 gender: null, // 0 for 女, 1 for 男 157 gender: null, // 0 for 女, 1 for 男
130 gender_text: '', 158 gender_text: '',
159 + qiniu_audit: '', // 图片审核信息
131 }); 160 });
132 161
133 /** 162 /**
...@@ -137,6 +166,12 @@ const isFormValid = computed(() => { ...@@ -137,6 +166,12 @@ const isFormValid = computed(() => {
137 return formData.nickname && formData.birth_date && formData.wheelchair_needed !== null && formData.gender !== null; 166 return formData.nickname && formData.birth_date && formData.wheelchair_needed !== null && formData.gender !== null;
138 }); 167 });
139 168
169 +// --- Avatar Tip Dialog ---
170 +/**
171 + * @description 控制头像上传须知对话框显示
172 + */
173 +const showAvatarTipDialog = ref(false);
174 +
140 // --- Date Picker --- 175 // --- Date Picker ---
141 /** 176 /**
142 * @description 控制日期选择器显示 177 * @description 控制日期选择器显示
...@@ -249,15 +284,29 @@ const changeAvatar = () => { ...@@ -249,15 +284,29 @@ const changeAvatar = () => {
249 Taro.showLoading({ title: '上传中...' }); 284 Taro.showLoading({ title: '上传中...' });
250 285
251 Taro.uploadFile({ 286 Taro.uploadFile({
252 - url: BASE_URL + '/admin/?m=srv&a=upload', 287 + url: BASE_URL + '/admin/?m=srv&a=upload&image_audit=1',
253 filePath: tempFile.path, 288 filePath: tempFile.path,
254 name: 'file', 289 name: 'file',
255 success: (uploadRes) => { 290 success: (uploadRes) => {
256 Taro.hideLoading(); 291 Taro.hideLoading();
257 const data = JSON.parse(uploadRes.data); 292 const data = JSON.parse(uploadRes.data);
258 if (data.code == 0) { 293 if (data.code == 0) {
294 + // 检查是否为审核不通过
295 + if (data.data.audit_code == -1) {
296 + Taro.showModal({
297 + title: '温馨提示',
298 + content: data.msg,
299 + showCancel: false
300 + }).then(res => {
301 + if (res.confirm) {
302 + // 点击了确认按钮
303 + }
304 + });
305 + } else {
259 formData.avatar_url = data.data.src; 306 formData.avatar_url = data.data.src;
307 + formData.qiniu_audit = data.data.audit_result;
260 Taro.showToast({ title: '上传成功', icon: 'success' }); 308 Taro.showToast({ title: '上传成功', icon: 'success' });
309 + }
261 } else { 310 } else {
262 Taro.showToast({ title: data.msg || '上传失败', icon: 'none' }); 311 Taro.showToast({ title: data.msg || '上传失败', icon: 'none' });
263 } 312 }
......
1 <!-- 1 <!--
2 * @Date: 2025-08-27 17:44:53 2 * @Date: 2025-08-27 17:44:53
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2025-09-09 11:38:58 4 + * @LastEditTime: 2025-09-11 11:06:38
5 * @FilePath: /lls_program/src/pages/CreateFamily/index.vue 5 * @FilePath: /lls_program/src/pages/CreateFamily/index.vue
6 * @Description: 文件描述 6 * @Description: 文件描述
7 --> 7 -->
...@@ -191,6 +191,9 @@ const familyMottoPlaceholder = ref(['孝', '敬', '和', '睦']); ...@@ -191,6 +191,9 @@ const familyMottoPlaceholder = ref(['孝', '敬', '和', '睦']);
191 const familyNameError = ref(''); 191 const familyNameError = ref('');
192 const familyIntroError = ref(''); 192 const familyIntroError = ref('');
193 193
194 +// 图片审核信息
195 +const familyAvatarAudit = ref('');
196 +
194 // 区域选择器相关 197 // 区域选择器相关
195 const showDistrictPicker = ref(false); 198 const showDistrictPicker = ref(false);
196 const districtValue = ref([]); 199 const districtValue = ref([]);
...@@ -337,23 +340,11 @@ const uploadImage = (filePath) => { ...@@ -337,23 +340,11 @@ const uploadImage = (filePath) => {
337 success: () => { 340 success: () => {
338 if (upload_data.code == 0 && upload_data.data) { 341 if (upload_data.code == 0 && upload_data.data) {
339 familyAvatar.value = upload_data.data.src; 342 familyAvatar.value = upload_data.data.src;
343 + familyAvatarAudit.value = upload_data.data.audit_result;
340 showToast('上传成功', 'success'); 344 showToast('上传成功', 'success');
341 } else { 345 } else {
342 - // 检查是否为审核不通过
343 - if (upload_data.code == 0 && !upload_data.data && upload_data.msg && upload_data.msg.includes('审核不通过')) {
344 - Taro.showModal({
345 - title: '温馨提示',
346 - content: '您上传的内容未通过审核',
347 - showCancel: false
348 - }).then(res => {
349 - if (res.confirm) {
350 - // 点击了确认按钮
351 - }
352 - });
353 - } else {
354 showToast('服务器错误,稍后重试!', 'none'); 346 showToast('服务器错误,稍后重试!', 'none');
355 } 347 }
356 - }
357 }, 348 },
358 }); 349 });
359 }, 350 },
...@@ -484,6 +475,7 @@ const handleCreateFamily = async () => { ...@@ -484,6 +475,7 @@ const handleCreateFamily = async () => {
484 county: selectedDistrict.value, 475 county: selectedDistrict.value,
485 passphrase: familyMotto.value.join(''), 476 passphrase: familyMotto.value.join(''),
486 avatar_url: familyAvatar.value, 477 avatar_url: familyAvatar.value,
478 + qiniu_audit: familyAvatarAudit.value,
487 }); 479 });
488 480
489 Taro.hideLoading(); 481 Taro.hideLoading();
......
1 <!-- 1 <!--
2 * @Date: 2025-08-27 17:44:53 2 * @Date: 2025-08-27 17:44:53
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2025-09-09 11:39:20 4 + * @LastEditTime: 2025-09-11 10:41:23
5 * @FilePath: /lls_program/src/pages/EditFamily/index.vue 5 * @FilePath: /lls_program/src/pages/EditFamily/index.vue
6 * @Description: 文件描述 6 * @Description: 文件描述
7 --> 7 -->
...@@ -190,6 +190,9 @@ const familyMottoPlaceholder = ref(['孝', '敬', '和', '睦']); ...@@ -190,6 +190,9 @@ const familyMottoPlaceholder = ref(['孝', '敬', '和', '睦']);
190 const familyNameError = ref(''); 190 const familyNameError = ref('');
191 const familyIntroError = ref(''); 191 const familyIntroError = ref('');
192 192
193 +// 图片审核信息
194 +const familyAvatarAudit = ref('');
195 +
193 // 区域选择器相关 196 // 区域选择器相关
194 const showDistrictPicker = ref(false); 197 const showDistrictPicker = ref(false);
195 const districtValue = ref([]); 198 const districtValue = ref([]);
...@@ -325,23 +328,11 @@ const uploadImage = (filePath) => { ...@@ -325,23 +328,11 @@ const uploadImage = (filePath) => {
325 success: () => { 328 success: () => {
326 if (upload_data.code === 0 && upload_data.data) { 329 if (upload_data.code === 0 && upload_data.data) {
327 familyAvatar.value = upload_data.data.src; 330 familyAvatar.value = upload_data.data.src;
331 + familyAvatarAudit.value = upload_data.data.audit_result;
328 showToast('上传成功', 'success'); 332 showToast('上传成功', 'success');
329 } else { 333 } else {
330 - // 检查是否为审核不通过
331 - if (upload_data.code === 0 && !upload_data.data && upload_data.msg && upload_data.msg.includes('审核不通过')) {
332 - Taro.showModal({
333 - title: '温馨提示',
334 - content: '您上传的内容未通过审核',
335 - showCancel: false
336 - }).then(res => {
337 - if (res.confirm) {
338 - // 点击了确认按钮
339 - }
340 - });
341 - } else {
342 showToast('服务器错误,稍后重试!', 'none'); 334 showToast('服务器错误,稍后重试!', 'none');
343 } 335 }
344 - }
345 }, 336 },
346 }); 337 });
347 }, 338 },
...@@ -467,6 +458,7 @@ const handleSaveFamily = async () => { ...@@ -467,6 +458,7 @@ const handleSaveFamily = async () => {
467 county: selectedDistrict.value, 458 county: selectedDistrict.value,
468 passphrase: familyMotto.value.join(''), 459 passphrase: familyMotto.value.join(''),
469 avatar_url: familyAvatar.value, 460 avatar_url: familyAvatar.value,
461 + qiniu_audit: familyAvatarAudit.value,
470 }); 462 });
471 if (code) { 463 if (code) {
472 showToast('保存成功', 'success'); 464 showToast('保存成功', 'success');
......
1 <template> 1 <template>
2 <view class="min-h-screen bg-gray-50 p-5 pb-24"> 2 <view class="min-h-screen bg-gray-50 p-5 pb-24">
3 <!-- Avatar --> 3 <!-- Avatar -->
4 - <view class="flex flex-col items-center py-8" @click="changeAvatar"> 4 + <view class="flex flex-col items-center py-8" @tap="changeAvatar">
5 <view class="w-24 h-24 rounded-full bg-gray-100 flex items-center justify-center mb-2 overflow-hidden"> 5 <view class="w-24 h-24 rounded-full bg-gray-100 flex items-center justify-center mb-2 overflow-hidden">
6 <image :src="formData.avatar_url || defaultAvatar" class="w-full h-full" mode="aspectFill" /> 6 <image :src="formData.avatar_url || defaultAvatar" class="w-full h-full" mode="aspectFill" />
7 </view> 7 </view>
8 - <text class="text-gray-500 text-sm">上传头像</text> 8 + <view class="flex items-center justify-center">
9 + <text class="text-gray-500 text-sm mr-1">上传头像</text>
10 + <Ask size="15" color="#888" @tap.stop="showAvatarTipDialog = true" />
11 + </view>
9 </view> 12 </view>
10 13
11 <!-- Form --> 14 <!-- Form -->
...@@ -102,13 +105,38 @@ ...@@ -102,13 +105,38 @@
102 </nut-popup> 105 </nut-popup>
103 106
104 <nut-image-preview v-model:show="previewVisible" :images="previewImages" /> 107 <nut-image-preview v-model:show="previewVisible" :images="previewImages" />
108 +
109 + <!-- 头像上传须知对话框 -->
110 + <nut-dialog
111 + v-model:visible="showAvatarTipDialog"
112 + title="头像上传须知"
113 + >
114 + <template #default>
115 + <view class="text-gray-700 leading-loose text-sm text-left break-words">
116 + <view class="mb-2">1. 头像大小不能超过5MB</view>
117 + <view class="mb-2">2. 头像格式为jpg、jpeg、png</view>
118 + <view>3. 头像未通过审核,可能原因:色情 / 暴恐内容、敏感人物、违规广告</view>
119 + </view>
120 + </template>
121 + <template #footer>
122 + <nut-button
123 + @click="showAvatarTipDialog = false"
124 + type="primary"
125 + size="normal"
126 + :color="THEME_COLORS.PRIMARY"
127 + block
128 + >
129 + 我知道了
130 + </nut-button>
131 + </template>
132 + </nut-dialog>
105 </view> 133 </view>
106 </template> 134 </template>
107 135
108 <script setup> 136 <script setup>
109 import { ref, reactive, onMounted } from 'vue'; 137 import { ref, reactive, onMounted } from 'vue';
110 import Taro from '@tarojs/taro'; 138 import Taro from '@tarojs/taro';
111 -import { My, Date as DateIcon, Right } from '@nutui/icons-vue-taro'; 139 +import { My, Date as DateIcon, Right, Ask } from '@nutui/icons-vue-taro';
112 import BASE_URL from '@/utils/config'; 140 import BASE_URL from '@/utils/config';
113 // 默认头像 141 // 默认头像
114 const defaultAvatar = 'https://cdn.ipadbiz.cn/mlaj/images/icon_1.jpeg' 142 const defaultAvatar = 'https://cdn.ipadbiz.cn/mlaj/images/icon_1.jpeg'
...@@ -128,8 +156,15 @@ const formData = reactive({ ...@@ -128,8 +156,15 @@ const formData = reactive({
128 wheelchair_text: '', 156 wheelchair_text: '',
129 gender: null, // 0 for 女, 1 for 男 157 gender: null, // 0 for 女, 1 for 男
130 gender_text: '', 158 gender_text: '',
159 + qiniu_audit: '', // 图片审核信息
131 }); 160 });
132 161
162 +// --- Avatar Tip Dialog ---
163 +/**
164 + * @description 控制头像上传须知对话框显示
165 + */
166 +const showAvatarTipDialog = ref(false);
167 +
133 // --- Date Picker --- 168 // --- Date Picker ---
134 /** 169 /**
135 * @description 控制日期选择器显示 170 * @description 控制日期选择器显示
...@@ -242,15 +277,29 @@ const changeAvatar = () => { ...@@ -242,15 +277,29 @@ const changeAvatar = () => {
242 Taro.showLoading({ title: '上传中...' }); 277 Taro.showLoading({ title: '上传中...' });
243 278
244 Taro.uploadFile({ 279 Taro.uploadFile({
245 - url: BASE_URL + '/admin/?m=srv&a=upload', 280 + url: BASE_URL + '/admin/?m=srv&a=upload&image_audit=1',
246 filePath: tempFile.path, 281 filePath: tempFile.path,
247 name: 'file', 282 name: 'file',
248 success: (uploadRes) => { 283 success: (uploadRes) => {
249 Taro.hideLoading(); 284 Taro.hideLoading();
250 const data = JSON.parse(uploadRes.data); 285 const data = JSON.parse(uploadRes.data);
251 if (data.code === 0) { 286 if (data.code === 0) {
287 + // 检查是否为审核不通过
288 + if (data.data.audit_code == -1) {
289 + Taro.showModal({
290 + title: '温馨提示',
291 + content: data.msg,
292 + showCancel: false
293 + }).then(res => {
294 + if (res.confirm) {
295 + // 点击了确认按钮
296 + }
297 + });
298 + } else {
252 formData.avatar_url = data.data.src; 299 formData.avatar_url = data.data.src;
300 + formData.qiniu_audit = data.data.audit_result;
253 Taro.showToast({ title: '上传成功', icon: 'success' }); 301 Taro.showToast({ title: '上传成功', icon: 'success' });
302 + }
254 } else { 303 } else {
255 Taro.showToast({ title: data.msg || '上传失败', icon: 'none' }); 304 Taro.showToast({ title: data.msg || '上传失败', icon: 'none' });
256 } 305 }
......
...@@ -195,25 +195,13 @@ const uploadImage = (filePath) => { ...@@ -195,25 +195,13 @@ const uploadImage = (filePath) => {
195 if (upload_data.code === 0 && upload_data.data) { 195 if (upload_data.code === 0 && upload_data.data) {
196 screenshots.value.push({ 196 screenshots.value.push({
197 url: upload_data.data.src, 197 url: upload_data.data.src,
198 - localPath: filePath 198 + localPath: filePath,
199 + qiniu_audit: upload_data.data.audit_result,
199 }); 200 });
200 showToast('上传成功', 'success'); 201 showToast('上传成功', 'success');
201 } else { 202 } else {
202 - // 检查是否为审核不通过
203 - if (upload_data.code === 0 && !upload_data.data && upload_data.msg && upload_data.msg.includes('审核不通过')) {
204 - Taro.showModal({
205 - title: '温馨提示',
206 - content: '您上传的内容未通过审核',
207 - showCancel: false
208 - }).then(res => {
209 - if (res.confirm) {
210 - // 点击了确认按钮
211 - }
212 - });
213 - } else {
214 showToast('服务器错误,稍后重试!', 'error'); 203 showToast('服务器错误,稍后重试!', 'error');
215 } 204 }
216 - }
217 }, 205 },
218 }); 206 });
219 }, 207 },
......
...@@ -590,7 +590,7 @@ const uploadBackgroundImage = (filePath) => { ...@@ -590,7 +590,7 @@ const uploadBackgroundImage = (filePath) => {
590 Taro.showLoading({ title: '上传中...' }) 590 Taro.showLoading({ title: '上传中...' })
591 591
592 Taro.uploadFile({ 592 Taro.uploadFile({
593 - url: BASE_URL + '/admin/?m=srv&a=upload&image_audit=1', 593 + url: BASE_URL + '/admin/?m=srv&a=upload',
594 filePath, 594 filePath,
595 name: 'file', 595 name: 'file',
596 success: (uploadRes) => { 596 success: (uploadRes) => {
...@@ -601,21 +601,8 @@ const uploadBackgroundImage = (filePath) => { ...@@ -601,21 +601,8 @@ const uploadBackgroundImage = (filePath) => {
601 backgroundImages.value[currentPosterIndex.value] = data.data.src 601 backgroundImages.value[currentPosterIndex.value] = data.data.src
602 Taro.showToast({ title: '上传成功', icon: 'success' }) 602 Taro.showToast({ title: '上传成功', icon: 'success' })
603 } else { 603 } else {
604 - // 检查是否为审核不通过
605 - if (data.code === 0 && !data.data && data.msg && data.msg.includes('审核不通过')) {
606 - Taro.showModal({
607 - title: '温馨提示',
608 - content: '您上传的内容未通过审核',
609 - showCancel: false
610 - }).then(res => {
611 - if (res.confirm) {
612 - // 点击了确认按钮
613 - }
614 - })
615 - } else {
616 Taro.showToast({ title: data.msg || '上传失败', icon: 'none' }) 604 Taro.showToast({ title: data.msg || '上传失败', icon: 'none' })
617 } 605 }
618 - }
619 }, 606 },
620 fail: () => { 607 fail: () => {
621 Taro.hideLoading() 608 Taro.hideLoading()
......
...@@ -220,7 +220,8 @@ const chooseMedia = () => { ...@@ -220,7 +220,8 @@ const chooseMedia = () => {
220 uploadedFile.value = { 220 uploadedFile.value = {
221 type: 'image', 221 type: 'image',
222 url: file.tempFilePath, 222 url: file.tempFilePath,
223 - serverUrl: serverUrl, 223 + serverUrl: serverUrl.src,
224 + qiniu_audit: serverUrl.qiniu_audit,
224 size: file.size, 225 size: file.size,
225 name: `image_${Date.now()}.jpg` 226 name: `image_${Date.now()}.jpg`
226 }; 227 };
...@@ -228,7 +229,8 @@ const chooseMedia = () => { ...@@ -228,7 +229,8 @@ const chooseMedia = () => {
228 uploadedFile.value = { 229 uploadedFile.value = {
229 type: 'video', 230 type: 'video',
230 url: file.tempFilePath, 231 url: file.tempFilePath,
231 - serverUrl: serverUrl, 232 + serverUrl: serverUrl.src,
233 + qiniu_audit: serverUrl.qiniu_audit,
232 thumbnail: file.thumbTempFilePath, 234 thumbnail: file.thumbTempFilePath,
233 duration: Math.floor(file.duration), 235 duration: Math.floor(file.duration),
234 size: file.size, 236 size: file.size,
...@@ -388,20 +390,8 @@ const uploadFileToServer = (filePath) => { ...@@ -388,20 +390,8 @@ const uploadFileToServer = (filePath) => {
388 try { 390 try {
389 const upload_data = JSON.parse(res.data); 391 const upload_data = JSON.parse(res.data);
390 if (upload_data.code === 0 && upload_data.data) { 392 if (upload_data.code === 0 && upload_data.data) {
391 - resolve(upload_data.data.src); 393 + resolve({ src: upload_data.data.src, qiniu_audit: upload_data.data.audit_result });
392 } else { 394 } else {
393 - // 检查是否为审核不通过
394 - if (upload_data.code === 0 && !upload_data.data && upload_data.msg && upload_data.msg.includes('审核不通过')) {
395 - Taro.showModal({
396 - title: '温馨提示',
397 - content: '您上传的内容未通过审核',
398 - showCancel: false
399 - }).then(res => {
400 - if (res.confirm) {
401 - // 点击了确认按钮
402 - }
403 - });
404 - }
405 reject(new Error(upload_data.msg || '服务器错误')); 395 reject(new Error(upload_data.msg || '服务器错误'));
406 } 396 }
407 } catch (error) { 397 } catch (error) {
...@@ -450,7 +440,8 @@ const saveMedia = async () => { ...@@ -450,7 +440,8 @@ const saveMedia = async () => {
450 // url: uploadedFile.value.serverUrl, 440 // url: uploadedFile.value.serverUrl,
451 // size: uploadedFile.value.size, 441 // size: uploadedFile.value.size,
452 // name: uploadedFile.value.name, 442 // name: uploadedFile.value.name,
453 - // duration: uploadedFile.value.duration // 仅视频有此字段 443 + // duration: uploadedFile.value.duration, // 仅视频有此字段
444 + // qiniu_audit: uploadedFile.value.qiniu_audit,
454 // }); 445 // });
455 446
456 // 模拟接口调用 447 // 模拟接口调用
......
1 <!-- 1 <!--
2 * @Date: 2025-08-27 17:43:45 2 * @Date: 2025-08-27 17:43:45
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2025-09-06 21:59:10 4 + * @LastEditTime: 2025-09-11 11:34:37
5 * @FilePath: /lls_program/src/pages/Welcome/index.vue 5 * @FilePath: /lls_program/src/pages/Welcome/index.vue
6 * @Description: 文件描述 6 * @Description: 文件描述
7 --> 7 -->
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
96 @click="onPrivacyConfirm" 96 @click="onPrivacyConfirm"
97 type="primary" 97 type="primary"
98 size="normal" 98 size="normal"
99 - color="#007AFF" 99 + :color="THEME_COLORS.PRIMARY"
100 block 100 block
101 > 101 >
102 同意搜集 102 同意搜集
...@@ -123,7 +123,7 @@ ...@@ -123,7 +123,7 @@
123 @click="onAgeConfirm" 123 @click="onAgeConfirm"
124 type="primary" 124 type="primary"
125 size="normal" 125 size="normal"
126 - color="#007AFF" 126 + :color="THEME_COLORS.PRIMARY"
127 block 127 block
128 > 128 >
129 了解 129 了解
...@@ -151,6 +151,8 @@ import BottomNav from '../../components/BottomNav.vue'; // 假设BottomNav组件 ...@@ -151,6 +151,8 @@ import BottomNav from '../../components/BottomNav.vue'; // 假设BottomNav组件
151 import AdOverlay from '@/components/AdOverlay.vue' 151 import AdOverlay from '@/components/AdOverlay.vue'
152 // 获取接口信息 152 // 获取接口信息
153 import { getUserProfileAPI } from '@/api/user'; 153 import { getUserProfileAPI } from '@/api/user';
154 +// 导入主题颜色
155 +import { THEME_COLORS } from '@/utils/config';
154 156
155 const welcomeHomeImg = 'https://cdn.ipadbiz.cn/lls_prog/images/welcome_home.png'; 157 const welcomeHomeImg = 'https://cdn.ipadbiz.cn/lls_prog/images/welcome_home.png';
156 158
......