xlb-main-login
Version:
``` yarn install ```
94 lines (85 loc) • 2.23 kB
JavaScript
import { locality, localitys, brand } from './config'
import { axios } from '@/utils/request'
// 新增店铺
export function addShop(data) {
//TODO { 'Content-Type': 'multipart/form-data;charset=utf-8' }
return axios({
headers: { 'Content-Type': 'multipart/form-data' },
url: locality + '/v1/shop/info/config/',
method: 'post',
data,
})
}
// 查询店铺
export function acquireShop() {
return axios({
url: locality + '/v1/shop/info/config/',
method: 'get',
})
}
// 查询店铺
export function acquireShoptype(type) {
return axios({
url: brand + '/brand/?type=' + type,
method: 'get',
})
}
export function acquireShoptypes(type) {
return axios({
url: locality + '/v1/shop/info/config/?type=' + type,
method: 'get',
})
}
// 编辑店铺
export function compileShop(data) {
//TODO { 'Content-Type': 'multipart/form-data;charset=utf-8' }
return axios({
headers: { 'Content-Type': 'multipart/form-data' },
url: locality + '/v1/shop/info/config/',
method: 'put',
data,
})
}
// 公众号
export function getaccount() {
return axios({
url: localitys + '/demo-wechat-open/v1/wechat/user/info/',
method: 'get',
})
}
//新增企业微信
export function addShoptype(data, type) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: brand + '/brand/?type=' + type,
method: 'post',
data,
})
}
//新增企业微信
export function addShoptypes(body, type) {
return axios({
headers: { 'Content-Type': 'multipart/form-data' },
url: locality + '/v1/shop/info/config/work?type=' + type,
method: 'post',
body,
})
}
// 编辑店铺
export function compileShoptype(data, type) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: brand + '/brand/?type=' + type,
method: 'put',
data,
})
}
// 编辑店铺
export function compileShoptypes(data, type) {
return axios({
headers: { 'Content-Type': 'multipart/form-data' },
url: locality + '/v1/shop/info/config/work?type=' + type,
method: 'put',
data,
})
}