Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
mlaj
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2025-12-26 12:01:03 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5862c12a9326c7ed84f0c7e29d48027e5efb0a22
5862c12a
1 parent
07095a68
feat(recall): 添加补充信息获取和编辑功能
添加获取和编辑补充信息的API接口 在活动历史页面实现补充信息的获取和提交功能
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
10 deletions
src/api/recall_users.js
src/views/recall/ActivityHistoryPage.vue
src/api/recall_users.js
View file @
5862c12
/*
* @Date: 2025-12-19 10:43:09
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-12-2
4 17:19:47
* @LastEditTime: 2025-12-2
6 11:44:09
* @FilePath: /mlaj/src/api/recall_users.js
* @Description: 引入外部接口, 召回旧用户相关接口
*/
...
...
@@ -13,6 +13,8 @@ const Api = {
USER_SEARCH_OLD_ACTIVITY
:
'/srv/?a=desk_calendar&t=search_old_activity'
,
USER_GET_POSTER
:
'/srv/?a=desk_calendar&t=get_poster'
,
USER_EDIT_POSTER
:
'/srv/?a=desk_calendar&t=edit_poster'
,
USER_GET_SUPPLEMENT
:
'/srv/?a=desk_calendar&t=get_supplement'
,
USER_EDIT_SUPPLEMENT
:
'/srv/?a=desk_calendar&t=edit_supplement'
,
}
/**
...
...
@@ -55,3 +57,15 @@ export const getPosterAPI = (params) => fn(fetch.get(Api.USER_GET_POSTER, params
* @param: background_image 海报背景图URL
*/
export
const
editPosterAPI
=
(
params
)
=>
fn
(
fetch
.
post
(
Api
.
USER_EDIT_POSTER
,
params
));
/**
* @description: 查询补充信息
* @return: data: { note 补充说明 }
*/
export
const
getSupplementAPI
=
(
params
)
=>
fn
(
fetch
.
get
(
Api
.
USER_GET_SUPPLEMENT
,
params
));
/**
* @description: 编辑补充信息
* @param: note 补充说明
*/
export
const
editSupplementAPI
=
(
params
)
=>
fn
(
fetch
.
post
(
Api
.
USER_EDIT_SUPPLEMENT
,
params
));
...
...
src/views/recall/ActivityHistoryPage.vue
View file @
5862c12
...
...
@@ -107,7 +107,7 @@ import { useRouter } from 'vue-router'
import { useTitle } from '@vueuse/core'
import { showToast } from 'vant'
import { userInfoAPI, searchOldActivityAPI } from '@/api/recall_users'
import { userInfoAPI, searchOldActivityAPI
, getSupplementAPI, editSupplementAPI
} from '@/api/recall_users'
import { oldActivityBatchActivityRegistrationAPI } from '@/api/points'
const historyBg = 'https://cdn.ipadbiz.cn/mlaj/recall/img/history_bg@2x.png'
...
...
@@ -159,19 +159,28 @@ const handleCollectCoins = async () => {
}
}
const handleSubmitMissing = () => {
if (!missingInfo.value
.trim()
) {
showToast('请输入
活动
信息')
const handleSubmitMissing =
async
() => {
if (!missingInfo.value) {
showToast('请输入
补充
信息')
return
}
showToast({
message: '感谢您为我们找回偏轨的星球活动',
icon: 'success'
const res = await editSupplementAPI({
note: missingInfo.value
})
showMissingPopup.value = false
missingInfo.value = ''
if (res.code) {
showToast('提交成功')
showMissingPopup.value = false
}
}
// 获取补充信息
const fetchSupplementInfo = async () => {
const res = await getSupplementAPI()
if (res.code && res.data && res.data.note) {
missingInfo.value = res.data.note
}
}
const userInfo = ref({});
...
...
@@ -182,6 +191,9 @@ const activityInfo = ref({})
const recordDate = ref('')
onMounted(async () => {
// 获取补充信息
fetchSupplementInfo()
// 从缓存获取用户信息
const cachedUserInfo = localStorage.getItem('cached_user_info')
if (cachedUserInfo) {
...
...
Please
register
or
login
to post a comment