You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.2 KiB
JavaScript
51 lines
1.2 KiB
JavaScript
6 months ago
|
import request from '@/utils/request'
|
||
|
|
||
|
// api地址
|
||
|
const api = {
|
||
|
userInfo: 'clientApi/user/info',
|
||
|
qrCode: 'clientApi/user/qrCode',
|
||
|
assets: 'clientApi/user/asset',
|
||
|
setting: 'clientApi/user/setting',
|
||
|
defaultStore: 'clientApi/user/defaultStore',
|
||
|
save: 'clientApi/user/saveInfo'
|
||
|
}
|
||
|
|
||
|
// 当前登录的用户信息
|
||
|
export const info = (param, option) => {
|
||
|
const options = {
|
||
|
isPrompt: true, //(默认 true 说明:本接口抛出的错误是否提示)
|
||
|
load: true, //(默认 true 说明:本接口是否提示加载动画)
|
||
|
...option
|
||
|
}
|
||
|
return request.get(api.userInfo, param, options)
|
||
|
}
|
||
|
|
||
|
// 当前登录的会员码信息
|
||
|
export const qrCode = (param, option) => {
|
||
|
const options = {
|
||
|
isPrompt: true,
|
||
|
load: true,
|
||
|
...option
|
||
|
}
|
||
|
return request.get(api.qrCode, param, options)
|
||
|
}
|
||
|
|
||
|
// 账户资产
|
||
|
export const assets = (param, option) => {
|
||
|
return request.get(api.assets, param)
|
||
|
}
|
||
|
|
||
|
// 获取会员设置
|
||
|
export const setting = (param, option) => {
|
||
|
return request.get(api.setting, param)
|
||
|
}
|
||
|
|
||
|
// 设置会员的默认店铺
|
||
|
export const defaultStore = (storeId) => {
|
||
|
return request.get(api.defaultStore, { storeId })
|
||
|
}
|
||
|
|
||
|
// 保存会员信息
|
||
|
export const save = (param, option) => {
|
||
|
return request.post(api.save, param)
|
||
|
}
|