同步接口
This commit is contained in:
parent
29a1e65e76
commit
4800553a0f
|
@ -16,14 +16,14 @@ export const mer_admin = {
|
||||||
loginByAccount: (params) => {
|
loginByAccount: (params) => {
|
||||||
return $http.post(`/auth/login`, {
|
return $http.post(`/auth/login`, {
|
||||||
...params,
|
...params,
|
||||||
type: 1
|
type: 1,
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
loginByMobile: (params) => {
|
loginByMobile: (params) => {
|
||||||
return $http.post(`/merchant-api/auth/sms/login`, {
|
return $http.post(`/merchant-api/auth/sms/login`, {
|
||||||
...params,
|
...params,
|
||||||
type: 2
|
type: 2,
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
getYZM(mobile) {
|
getYZM(mobile) {
|
||||||
return $http.get(`/merchant-api/auth/login/code?mobile=${mobile}`);
|
return $http.get(`/merchant-api/auth/login/code?mobile=${mobile}`);
|
||||||
|
@ -50,15 +50,35 @@ export const mer_admin = {
|
||||||
},
|
},
|
||||||
//商户商品分类
|
//商户商品分类
|
||||||
getProductCategory: () => {
|
getProductCategory: () => {
|
||||||
return $http.get(`/merchant-api/product/category/list?shopId=${JSON.parse(sessionStorage.getItem('userInfo')).shopId}`);
|
return $http.get(
|
||||||
|
`/merchant-api/product/category/list?shopId=${
|
||||||
|
JSON.parse(sessionStorage.getItem("userInfo")).shopId
|
||||||
|
}`
|
||||||
|
);
|
||||||
|
},
|
||||||
|
//上架或下架
|
||||||
|
putOnShelvesProducts: (data) => {
|
||||||
|
return $http.post(`/merchant-api/product/batch/update/status`, data);
|
||||||
|
},
|
||||||
|
//批量删除商品
|
||||||
|
BatchDeleteProducts: (data) => {
|
||||||
|
return $http.post(`/merchant-api/product/batch/delete`, data);
|
||||||
|
},
|
||||||
|
//打折扣
|
||||||
|
setDiscounts: (data) => {
|
||||||
|
return $http.post(`merchant-api/activity/save`, data);
|
||||||
},
|
},
|
||||||
//获取销售单位
|
//获取销售单位
|
||||||
getSaleUnit: (data) => {
|
getSaleUnit: (data) => {
|
||||||
return $http.request({ url: `/merchant-api/product/unit/list`, method: 'get', params: data });
|
return $http.request({
|
||||||
|
url: `/merchant-api/product/unit/list`,
|
||||||
|
method: "get",
|
||||||
|
params: data,
|
||||||
|
});
|
||||||
},
|
},
|
||||||
//文件上传
|
//文件上传
|
||||||
uploadFile: () => {
|
uploadFile: () => {
|
||||||
return `${window.SITE_CONFIG['baseUrl']}/merchant-api/file/upload`
|
return `${window.SITE_CONFIG["baseUrl"]}/merchant-api/file/upload`;
|
||||||
},
|
},
|
||||||
//直接获取城市数据
|
//直接获取城市数据
|
||||||
getCityOptions: () => {
|
getCityOptions: () => {
|
||||||
|
@ -75,8 +95,8 @@ export const mer_admin = {
|
||||||
//删除模板
|
//删除模板
|
||||||
removeShippingTemplate: (id) => {
|
removeShippingTemplate: (id) => {
|
||||||
return $http.post(`/merchant-api/shippingTemplates/delete`, {
|
return $http.post(`/merchant-api/shippingTemplates/delete`, {
|
||||||
id
|
id,
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
//更新模板
|
//更新模板
|
||||||
updateShippingTemplate: (data) => {
|
updateShippingTemplate: (data) => {
|
||||||
|
@ -85,25 +105,25 @@ export const mer_admin = {
|
||||||
//获取模板分页
|
//获取模板分页
|
||||||
getShippingTemplatePage: (data) => {
|
getShippingTemplatePage: (data) => {
|
||||||
return $http.request({
|
return $http.request({
|
||||||
method: 'get',
|
method: "get",
|
||||||
url: '/merchant-api/shippingTemplates/page',
|
url: "/merchant-api/shippingTemplates/page",
|
||||||
params: data
|
params: data,
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
//获取配送模板列表
|
//获取配送模板列表
|
||||||
getShippingTemplateList: (data) => {
|
getShippingTemplateList: (data) => {
|
||||||
return $http.request({
|
return $http.request({
|
||||||
method: 'get',
|
method: "get",
|
||||||
url: '/merchant-api/shippingTemplates/list',
|
url: "/merchant-api/shippingTemplates/list",
|
||||||
params: data
|
params: data,
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
//获取模板详情
|
//获取模板详情
|
||||||
getShippingTemplateInfo: (id) => {
|
getShippingTemplateInfo: (id) => {
|
||||||
return $http.request({
|
return $http.request({
|
||||||
method: 'get',
|
method: "get",
|
||||||
url: '/merchant-api/shippingTemplates/list',
|
url: "/merchant-api/shippingTemplates/list",
|
||||||
params: { id }
|
params: { id },
|
||||||
})
|
});
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
placeholder="商品搜索"
|
placeholder="商品搜索"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="$refs.oTable.reload()"
|
<el-button type="primary" @click="$refs.oTable.reload()"
|
||||||
>查询</el-button
|
>查询</el-button
|
||||||
|
@ -92,6 +91,7 @@ export default {
|
||||||
border: true,
|
border: true,
|
||||||
height: "auto",
|
height: "auto",
|
||||||
"row-id": "id",
|
"row-id": "id",
|
||||||
|
"show-overflow": false,
|
||||||
},
|
},
|
||||||
productFilterType: "SALE",
|
productFilterType: "SALE",
|
||||||
selectList: [],
|
selectList: [],
|
||||||
|
@ -112,6 +112,7 @@ export default {
|
||||||
type: "warning",
|
type: "warning",
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
console.log("111");
|
||||||
this.$api.mer_admin.BatchDeleteProducts(integers).then((res) => {
|
this.$api.mer_admin.BatchDeleteProducts(integers).then((res) => {
|
||||||
this.$refs.oTable.reload();
|
this.$refs.oTable.reload();
|
||||||
});
|
});
|
||||||
|
|
|
@ -187,16 +187,7 @@ export default {
|
||||||
productIntroducePhoto: "",
|
productIntroducePhoto: "",
|
||||||
productPhotoList: [],
|
productPhotoList: [],
|
||||||
productPlace: "",
|
productPlace: "",
|
||||||
productSpecificationList: [
|
productSpecificationList: [],
|
||||||
{
|
|
||||||
attributeValue: "默认",
|
|
||||||
costPrice: 20,
|
|
||||||
salePrice: 30,
|
|
||||||
stockNum: 10,
|
|
||||||
weight: 1,
|
|
||||||
volume: 0.3,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
productUnit: "",
|
productUnit: "",
|
||||||
productVideo: "",
|
productVideo: "",
|
||||||
shelfLife: "",
|
shelfLife: "",
|
||||||
|
@ -657,9 +648,10 @@ export default {
|
||||||
v-model={this.place}
|
v-model={this.place}
|
||||||
onChange={change}
|
onChange={change}
|
||||||
options={this.$api.mer_admin.getCityOptions()}
|
options={this.$api.mer_admin.getCityOptions()}
|
||||||
{...{
|
props={{
|
||||||
props: {
|
props: {
|
||||||
checkStrictly: true,
|
label: "name",
|
||||||
|
value: "name",
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
clearable
|
clearable
|
||||||
|
|
Loading…
Reference in New Issue