迁移版本

This commit is contained in:
李琦
2026-06-05 14:06:20 +08:00
commit 139ce6b2f8
564 changed files with 62049 additions and 0 deletions

11
api/page/auth.js Normal file
View File

@@ -0,0 +1,11 @@
import {get, post} from '../request';
const prefix = 'auth/'
export const loginApi = async (code, phoneCode, avatarUrl, nickName) => {
return await post(`${prefix}login`, {
code,
phone_code: phoneCode,
avatar: avatarUrl,
nick_name: nickName
})
}

30
api/page/cart.js Normal file
View File

@@ -0,0 +1,30 @@
import {get, post} from '../request';
const prefix = 'list/'
export const getCartListApi = async () => {
return await get(`${prefix}list`)
}
export const getCartItemApi = async (id) => {
return await get(`${prefix}detail`, {id})
}
export const createCartApi = async (params) => {
return await post(`${prefix}create`, params)
}
export const deleteCartApi = async (id) => {
return await post(`${prefix}delete`, {
ids: [id]
})
}
export const deleteCartItemApi = async (id) => {
return await post(`${prefix}delete-item`, {
ids: [id]
})
}
export const toCartApi = async (listId, productId) => {
return await post(`${prefix}to-cart`, {
list_id: listId,
product_id: productId
})
}

10
api/page/home.js Normal file
View File

@@ -0,0 +1,10 @@
import {get} from '../request';
const prefix = 'home/'
export const getCarouselApi = async () => {
return await get(`${prefix}carousel`)
}
export const getCategoryListApi = async () => {
return await get(`${prefix}category-list`)
}

15
api/page/image.js Normal file
View File

@@ -0,0 +1,15 @@
import {get, post} from '../request';
const prefix = 'w-oss/'
export const getImageApi = async (hash = '') => {
return await get(`${prefix}getImage`, {
hash
})
}
export const uploadImageWatermarkApi = async (imageUrl = '', watermark = 'BRM') => {
return await post(`${prefix}watermark`, {
image_url: imageUrl,
watermark
})
}

14
api/page/product.js Normal file
View File

@@ -0,0 +1,14 @@
import {get} from '../request';
const prefix = 'product/'
export const getProductListApi = async (param) => {
return await get(`${prefix}list`, param)
}
export const getCategoryListByPidApi = async (pid = 0) => {
return await get(`${prefix}category-list-by-pid`, {pid})
}
export const getProductDetailApi = async (id = 0, p_user_id = 0) => {
return await get(`${prefix}detail`, {id, p_user_id})
}

17
api/page/user.js Normal file
View File

@@ -0,0 +1,17 @@
import {get, post} from '../request';
const prefix = 'user/'
export const getUserInfoApi = async () => {
return await get(`${prefix}my-info`)
}
export const bandPhoneApi = async (phone) => {
return await post(`${prefix}band-phone`, {
phone: phone
})
}
export const updateNickNameApi = async (nick_name) => {
return await post(`${prefix}update-nick-name`, {
nick_name
})
}