diff --git a/app/components/ContactFloatingButton.vue b/app/components/ContactFloatingButton.vue index 40be96a..d81f48e 100644 --- a/app/components/ContactFloatingButton.vue +++ b/app/components/ContactFloatingButton.vue @@ -1,21 +1,208 @@ + + diff --git a/app/config/api.ts b/app/config/api.ts index e9b9f1c..a8f5153 100644 --- a/app/config/api.ts +++ b/app/config/api.ts @@ -189,3 +189,39 @@ export async function getArticleDetail(id: string): Promise
{ } } +/** + * 商家加盟申请数据类型定义 + */ +export interface MchApplyParams { + name: string + mobile: string + content: string + hasDevice: number + city: string +} + +/** + * 提交商家加盟申请 + * @param params 申请参数 + * @returns Promise> 返回申请结果 + */ +export async function submitMchApply(params: MchApplyParams): Promise> { + try { + const response = await $fetch>( + `${API_BASE_URL}/app/mchApply`, + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + body: params, + } + ) + + return response + } catch (error) { + console.error('提交商家加盟申请时发生错误:', error) + throw error + } +} +