From e5875fb659b76d981d83cc235db884ebcc4f9bcb Mon Sep 17 00:00:00 2001 From: leiyun Date: Tue, 4 Aug 2026 23:34:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DBUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/index.js | 10 +-- pages/invite/invite.vue | 6 +- pages/invite/landing.vue | 6 +- pages/point/earn.vue | 11 +++- pages/tool/ai-name.vue | 12 +++- pages/tool/anime-avatar.vue | 11 +++- pages/tool/anime-history.vue | 71 ++++++++++++++++----- pages/tool/id-photo-history.vue | 58 ++++++++++++----- pages/tool/id-photo.vue | 11 +++- pages/tool/name-history.vue | 72 ++++++++++++++++----- pages/tool/old-photo-history.vue | 69 +++++++++++++++----- pages/tool/old-photo.vue | 11 +++- pages/tool/portrait-history.vue | 69 +++++++++++++++----- pages/tool/portrait-photo.vue | 11 +++- pages/toolbox/toolbox.vue | 11 +++- pages/works/works.vue | 72 ++++++++++++++++----- utils/config.js | 12 ++-- utils/request.js | 104 ++++++++++++++++++++++--------- utils/share.js | 99 +++++++++++++++++++++++++++++ 19 files changed, 580 insertions(+), 146 deletions(-) create mode 100644 utils/share.js diff --git a/api/index.js b/api/index.js index b80323a..9c7afaf 100644 --- a/api/index.js +++ b/api/index.js @@ -36,10 +36,10 @@ export const userApi = { } export const inviteApi = { - getConfig: (params) => request({ url: API.INTERFACE_INVITE_GET_CONFIG, method: 'POST', params }), - getMy: (params) => request({ url: API.INTERFACE_INVITE_GET_MY, method: 'POST', params }), - getList: (params) => request({ url: API.INTERFACE_INVITE_GET_LIST, method: 'POST', params }), - getQrcode: (params) => request({ url: API.INTERFACE_INVITE_GET_QRCODE, method: 'POST', params }) + getConfig: (params, options = {}) => request({ url: API.INTERFACE_INVITE_GET_CONFIG, method: 'POST', params, ...options }), + getMy: (params, options = {}) => request({ url: API.INTERFACE_INVITE_GET_MY, method: 'POST', params, ...options }), + getList: (params, options = {}) => request({ url: API.INTERFACE_INVITE_GET_LIST, method: 'POST', params, ...options }), + getQrcode: (params, options = {}) => request({ url: API.INTERFACE_INVITE_GET_QRCODE, method: 'POST', params, ...options }) } export const commonApi = { @@ -112,7 +112,7 @@ export const oldPhotoApi = { } export const toolApi = { - getMyWorkList: (params) => request({ url: API.INTERFACE_WORK_GET_LIST, method: 'POST', params }), + getMyWorkList: (params, options = {}) => request({ url: API.INTERFACE_WORK_GET_LIST, method: 'POST', params, ...options }), getAppList: (params) => request({ url: API.INTERFACE_APP_GET_LIST, method: 'POST', params }), getAppDetail: (params) => request({ url: API.INTERFACE_APP_GET_DETAIL, method: 'POST', params }), getWorkList: (params) => request({ url: API.INTERFACE_ART_GET_LIST, method: 'POST', params }), diff --git a/pages/invite/invite.vue b/pages/invite/invite.vue index 0252e04..e3734aa 100644 --- a/pages/invite/invite.vue +++ b/pages/invite/invite.vue @@ -92,6 +92,7 @@ import { onShareAppMessage, onShow } from '@dcloudio/uni-app' import { inviteApi } from '@/api/index.js' import { useUserStore } from '@/store/user.js' import { useApp } from '@/utils/useApp.js' +import { buildShareOptions } from '@/utils/share.js' const userStore = useUserStore() const { toast } = useApp() @@ -113,10 +114,11 @@ onShow(() => { loadData() }) -onShareAppMessage(() => ({ +onShareAppMessage(() => buildShareOptions({ title: (share.value && share.value.title) || config.value.share_title || '邀请你体验 AI ONLINE', path: sharePath.value, - imageUrl: (share.value && share.value.image) || config.value.share_image || '' + imageUrl: (share.value && share.value.image) || config.value.share_image || '', + source: 'share_invite' })) async function loadData() { diff --git a/pages/invite/landing.vue b/pages/invite/landing.vue index 52534de..b09d6b8 100644 --- a/pages/invite/landing.vue +++ b/pages/invite/landing.vue @@ -32,6 +32,7 @@ import { onLoad, onShareAppMessage } from '@dcloudio/uni-app' import { inviteApi } from '@/api/index.js' import { useUserStore } from '@/store/user.js' import { useApp } from '@/utils/useApp.js' +import { buildShareOptions } from '@/utils/share.js' const userStore = useUserStore() const { toast } = useApp() @@ -47,10 +48,11 @@ onLoad((options = {}) => { loadConfig(options.scene || '') }) -onShareAppMessage(() => ({ +onShareAppMessage(() => buildShareOptions({ title: config.value.share_title || '邀请你体验 AI ONLINE', path: `/pages/invite/landing?invite_code=${inviteCode.value}`, - imageUrl: config.value.share_image || '' + imageUrl: config.value.share_image || '', + source: 'share_invite_landing' })) function parseInviteScene(scene) { diff --git a/pages/point/earn.vue b/pages/point/earn.vue index 5cca24e..ed8ee8f 100644 --- a/pages/point/earn.vue +++ b/pages/point/earn.vue @@ -107,14 +107,23 @@