适配修改后的api

master
paulGao 2022-02-12 15:20:36 +08:00
parent 61a9110c51
commit acff55dc65
16 changed files with 167 additions and 94 deletions

View File

@ -52,7 +52,7 @@ export function getAddrDetail (id) {
// 传给后台citycode 获取城市街道等id
export function handleRegion (params) {
return request({
url: `${commonUrl}/common/common/common/region/region`,
url: `${commonUrl}/common/common/region/region`,
needToken: true,
method: Method.GET,
params

View File

@ -214,7 +214,7 @@ export function afterSaleInfo (sn) {
// 获取申请售后、投诉原因
export function afterSaleReason (serviceType) {
return request({
url: `/buyer/order/afterSale//get/afterSaleReason/${serviceType}`,
url: `/buyer/order/afterSale/get/afterSaleReason/${serviceType}`,
method: Method.GET,
needToken: true
});
@ -222,7 +222,7 @@ export function afterSaleReason (serviceType) {
// 获取申请售后详情
export function afterSaleDetail (sn) {
return request({
url: `/buyer/order/afterSale//get/${sn}`,
url: `/buyer/order/afterSale/get/${sn}`,
method: Method.GET,
needToken: true
});
@ -230,7 +230,7 @@ export function afterSaleDetail (sn) {
// 售后日志
export function afterSaleLog (sn) {
return request({
url: `/buyer/order/afterSale//get/getAfterSaleLog/${sn}`,
url: `/buyer/order/afterSale/get/getAfterSaleLog/${sn}`,
method: Method.GET,
needToken: true
});

View File

@ -7,7 +7,7 @@ export const getChildRegion = (id) => {
// 点地图获取地址信息
export const getRegion = (params) => {
return getRequest(`${commonUrl}/common/region/region`, params);
return getRequest(`${commonUrl}/common/common/region/region`, params);
};
// 获取拼图验证

View File

@ -26,15 +26,15 @@ export const disableBrand = (id, params) => {
}
//根据分类id获取关联品牌
export const getCategoryBrandListData = (category_id, params) => {
return getRequest(`/goods/category/brand/${category_id}`, params)
return getRequest(`/goods/categoryBrand/${category_id}`, params)
}
//保存获取关联品牌
export const saveCategoryBrand = (category_id, params) => {
return postRequest(`/goods/category/brand/${category_id}`, params)
return postRequest(`/goods/categoryBrand/${category_id}`, params)
}
//保存获取关联规格
export const saveCategorySpec = (category_id, params) => {
return postRequest(`/goods/category/spec/${category_id}`, params)
return postRequest(`/goods/categorySpec/${category_id}`, params)
}
//获取所有可用品牌
@ -88,7 +88,7 @@ export const updateSpec = (id,params) => {
}
//根据分类id获取关联规格
export const getCategorySpecListData = (category_id, params) => {
return getRequest(`/goods/category/spec/${category_id}`, params)
return getRequest(`/goods/categorySpec/${category_id}`, params)
}
//删除gUI个
export const delSpec = (id, params) => {
@ -130,7 +130,7 @@ export const authGoods = (id, params) => {
//查询分类绑定参数信息
export const getCategoryParamsListData = (id, params) => {
return getRequest(`/goods/category/parameters/${id}`, params)
return getRequest(`/goods/categoryParameters/${id}`, params)
}
//查询商品绑定参数信息
@ -151,20 +151,20 @@ export const deleteParams = (id, params) => {
}
//保存参数组
export const insertParamsGroup = (params) => {
return postRequest('/goods/category/parameters', params)
return postRequest('/goods/categoryParameters', params)
}
//更新参数组
export const updateParamsGroup = (params) => {
return putRequest('/goods/category/parameters', params)
return putRequest('/goods/categoryParameters', params)
}
//删除参数组
export const deleteParamsGroup = (id, params) => {
return deleteRequest(`/goods/category/parameters/${id}`, params)
return deleteRequest(`/goods/categoryParameters/${id}`, params)
}
//保存获取关联规格
export const getGoodsSpecInfo = (category_id, params) => {
return getRequest(`/goods/category/spec/goods/${category_id}`, params)
return getRequest(`/goods/categorySpec/goods/${category_id}`, params)
}

View File

@ -22,7 +22,7 @@ export const ws = managerUrl + "/ws";
//获取所有city
export const getAllCity = (params) => {
return getRequest(commonUrl + '/common/region/allCity', params)
return getRequest(commonUrl + '/common/common/region/allCity', params)
}
@ -53,7 +53,7 @@ export const login = (params) => {
// 登出
export const logout = () => {
return postRequest("/user/logout");
return postRequest("/passport/user/logout");
};
// 刷新token
@ -277,11 +277,11 @@ export const deleteAllLog = (params) => {
// 分页获取消息数据
export const getMessageData = (params) => {
return getRequest("/message/getByCondition", params);
return getRequest("/other/message/getByCondition", params);
};
// 获取单个消息详情
export const getMessageDataById = (id, params) => {
return getRequest(`/message/get/${id}`, params);
return getRequest(`/other/message/get/${id}`, params);
};
// 发送消息
export const addMessage = (params) => {
@ -289,11 +289,11 @@ export const addMessage = (params) => {
};
// 编辑消息
export const editMessage = (params) => {
return postRequest("/message/edit", params);
return postRequest("/other/message/edit", params);
};
// 删除消息
export const deleteMessage = (ids, params) => {
return deleteRequest(`/message/delByIds/${ids}`, params);
return deleteRequest(`/other/message/delByIds/${ids}`, params);
};
// 编辑发送消息
export const editMessageSend = (params) => {

View File

@ -35,12 +35,12 @@ export const insertOrUpdateSpec = params => {
// 获取会员列表
export const getMemberListData = params => {
return getRequest("/member/passport", params);
return getRequest("/passport/member", params);
};
// 获取会员详情
export const getMemberInfoData = (id) => {
return getRequest(`/member/passport/${id}`);
return getRequest(`/passport/member/${id}`);
};
// 修改会员基本信息
@ -50,22 +50,22 @@ export const updateMember = (params) => {
// 添加会员基本信息
export const addMember = params => {
return postRequest(`/member/passport`, params);
return postRequest(`/passport/member`, params);
};
// 获取会员列表
export const getMemberAll = () => {
return getRequest("/member/passport/getAll");
return getRequest("/passport/member/getAll");
};
// 增加或修改会员列表
export const operationMemberListData = params => {
return postRequest("/member/passport/insertOrUpdate", params);
return postRequest("/passport/member/insertOrUpdate", params);
};
// 增加或修改会员列表
export const deleteMemberListData = ids => {
return deleteRequest(`/member/passport/delByIds/${ids}`);
return deleteRequest(`/passport/member/delByIds/${ids}`);
};
// 获取充值记录列表数据
export const getUserRecharge = params => {
@ -110,7 +110,7 @@ export const historyMemberChartList = () => {
//查询会员数量
export const getMemberNum = params => {
return getRequest("/member/passport/num", params);
return getRequest("/passport/member/num", params);
};
//查询会员历史积分
export const getHistoryPointData = (params) => {

View File

@ -153,5 +153,5 @@ export const refundLog = (params) => {
//售后单商家收货信息
export const storeAddress = (sn) => {
return getRequest(`/afterSale/getStoreAfterSaleAddress/${sn}`)
return getRequest(`/order/afterSale/getStoreAfterSaleAddress/${sn}`)
}

View File

@ -72,7 +72,7 @@ export const saveArticleCategory = (params) => {
//删除文章分类
export const delArticleCategory = (id) => {
return deleteRequest(`/other/articleCategory${id}`)
return deleteRequest(`/other/articleCategory/${id}`)
}
//修改文章分类
export const updateArticleCategory = (params, id) => {

View File

@ -66,29 +66,29 @@ export const updatePintuanStatus = (pintuanId, params) => {
// 修改砍价活动商品
export const saveKanJiaActivityGoods = params => {
return postRequest("/promotion/kan-jia-goods", params, {
return postRequest("/promotion/kanJiaGoods", params, {
"Content-type": "application/json"
});
};
// 修改砍价活动商品
export const editKanJiaActivityGoods = params => {
return putRequest("/promotion/kan-jia-goods", params, {
return putRequest("/promotion/kanJiaGoods", params, {
"Content-type": "application/json"
});
};
// 获取砍价活动商品
export const getKanJiaGoodsList = params => {
return getRequest(`/promotion/kan-jia-goods`, params);
return getRequest(`/promotion/kanJiaGoods`, params);
};
//删除砍价活动商品
export const delKanJiaGoods = ids => {
return deleteRequest(`/promotion/kan-jia-goods/${ids}`);
return deleteRequest(`/promotion/kanJiaGoods/${ids}`);
};
// 砍价活动商品详情
export const getKanJiaActivityGoodsById = id => {
return getRequest(`/promotion/kan-jia-goods/${id}`);
return getRequest(`/promotion/kanJiaGoods/${id}`);
};
// 保存平台优惠券

View File

@ -11,7 +11,7 @@ export const getMessageData = params => {
};
//修改短信模板
export const editSmsMessageTemplate = (id, params) => {
return putRequest(`/message/sms/${id}`, params)
return putRequest(`/sms/sms/${id}`, params)
}
//修改站内信模板
export const editNoticeMessage = (id, params) => {
@ -61,7 +61,7 @@ export const getNoticeMessageData = params => {
};
//删除站内信
export const deleteMessage = (id) => {
return deleteRequest(`message/${id}`);
return deleteRequest(`/other/message/${id}`);
};
// 开启站内信模板
export const openNoticeMessage = (id) => {

View File

@ -47,12 +47,12 @@ export const shopDetail = (id) => {
// 获取结算单分页
export const getBuyBillPage = (params) => {
return getRequest(`/store/bill/getByPage`,params)
return getRequest(`/order/bill/getByPage`,params)
}
// 获取结算单详情
export const getBuyBillDetail = (id) => {
return getRequest(`/store/bill/get/${id}`)
return getRequest(`/order/bill/get/${id}`)
}
@ -64,12 +64,12 @@ export const getStoreFlow = (id,params) => {
// 审核结算单
export const examine = (id) => {
return putRequest(`/store/bill/examine/${id}`)
return putRequest(`/order/bill/examine/${id}`)
}
// 审核结算单
export const pay = (id) => {
return putRequest(`/store/bill/pay/${id}`)
return putRequest(`/order/bill/pay/${id}`)
}
//获取所有商家

View File

@ -2,10 +2,10 @@ import {commonUrl, getRequest} from '@/libs/axios';
// 通过id获取子地区
export const getChildRegion = (id) => {
return getRequest(`${commonUrl}/common/region/item/${id}`);
return getRequest(`${commonUrl}/common/common/region/item/${id}`);
};
// 点地图获取地址信息
export const getRegion = (params) => {
return getRequest(`${commonUrl}/common/region/region`, params);
return getRequest(`${commonUrl}/common/common/region/region`, params);
};

View File

@ -69,7 +69,7 @@ export const saveCategoryBrand = (category_id, params) => {
};
//保存获取关联规格
export const saveCategorySpec = (category_id, params) => {
return postRequest(`/goods/category/spec/${category_id}`, params);
return postRequest(`/goods/categorySpec/${category_id}`, params);
};
//获取所有可用品牌
@ -117,7 +117,7 @@ export const insertOrUpdateSpec = params => {
};
//根据分类id获取关联规格
export const getCategorySpecListData = (category_id, params) => {
return getRequest(`/goods/category/spec/${category_id}`, params);
return getRequest(`/goods/categorySpec/${category_id}`, params);
};
//删除gUI个
export const delSpec = (id, params) => {

View File

@ -53,22 +53,22 @@ export const logisticsUnChecked = (id, params) => {
}
// 获取商家自提点
export const getShopAddress = (id, params) => {
return getRequest(`/storeAddress/`, params)
return getRequest(`/member/storeAddress/`, params)
}
// 修改商家自提点
export const editShopAddress = (id, params) => {
return putRequest(`/storeAddress/${id}`, params)
return putRequest(`/member/storeAddress/${id}`, params)
}
// 添加商品自提点
export const addShopAddress = (params) => {
return postRequest(`/storeAddress/`, params)
return postRequest(`/member/storeAddress/`, params)
}
// 添加商品自提点
export const deleteShopAddress = (id) => {
return deleteRequest(`/storeAddress/${id}`)
return deleteRequest(`/member/storeAddress/${id}`)
}
// 获取商家详细信息

View File

@ -2,24 +2,52 @@
<div class="search">
<Card>
<Row @keydown.enter.native="handleSearch">
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
<Form
ref="searchForm"
:model="searchForm"
inline
:label-width="70"
class="search-form"
>
<Form-item label="商品名称" prop="goodsName">
<Input type="text" v-model="searchForm.goodsName" placeholder="请输入商品名称" clearable style="width: 200px" />
<Input
type="text"
v-model="searchForm.goodsName"
placeholder="请输入商品名称"
clearable
style="width: 200px"
/>
</Form-item>
<Form-item label="状态" prop="status">
<Select v-model="searchForm.marketEnable" placeholder="请选择" clearable style="width: 200px">
<Select
v-model="searchForm.marketEnable"
placeholder="请选择"
clearable
style="width: 200px"
>
<Option value="DOWN">下架</Option>
<Option value="UPPER">上架</Option>
</Select>
</Form-item>
<Form-item label="商品类型" prop="status">
<Select v-model="searchForm.goodsType" placeholder="请选择" clearable style="width: 200px">
<Select
v-model="searchForm.goodsType"
placeholder="请选择"
clearable
style="width: 200px"
>
<Option value="PHYSICAL_GOODS">实物商品</Option>
<Option value="VIRTUAL_GOODS">虚拟商品</Option>
</Select>
</Form-item>
<Form-item label="商品编号" prop="sn">
<Input type="text" v-model="searchForm.id" placeholder="商品编号" clearable style="width: 200px" />
<Input
type="text"
v-model="searchForm.id"
placeholder="商品编号"
clearable
style="width: 200px"
/>
</Form-item>
<Button @click="handleSearch" type="primary" class="search-btn">搜索</Button>
<Button @click="handleReset" class="search-btn">重置</Button>
@ -41,40 +69,82 @@
</Dropdown>
</Row>
<Table class="mt_10" :loading="loading" border :columns="columns" :data="data" ref="table" @on-selection-change="changeSelect">
<Table
class="mt_10"
:loading="loading"
border
:columns="columns"
:data="data"
ref="table"
@on-selection-change="changeSelect"
>
<!-- 商品栏目格式化 -->
<template slot="goodsSlot" slot-scope="{row}">
<div style="margin-top: 5px;height: 90px; display: flex;">
<template slot="goodsSlot" slot-scope="{ row }">
<div style="margin-top: 5px; height: 90px; display: flex">
<div style="">
<img :src="row.original" style="height: 80px;margin-top: 3px;width: 70px">
<img
:src="row.original"
style="height: 80px; margin-top: 3px; width: 70px"
/>
</div>
<div style="margin-left: 13px;">
<div style="margin-left: 13px">
<div class="div-zoom">
<a @click="linkTo(row.id,row.skuId)">{{ row.goodsName }}</a>
<a @click="linkTo(row.id, row.skuId)">{{ row.goodsName }}</a>
</div>
<Poptip trigger="hover" title="扫码在手机中查看" transfer>
<div slot="content">
<!-- <vueQr>123</vueQr> -->
<vue-qr :text="wapLinkTo(row.id,row.skuId)" :margin="0" colorDark="#000" colorLight="#fff" :size="150"></vue-qr>
<vue-qr
:text="wapLinkTo(row.id, row.skuId)"
:margin="0"
colorDark="#000"
colorLight="#fff"
:size="150"
></vue-qr>
</div>
<img src="../../../assets/qrcode.svg" class="hover-pointer" width="20" height="20" alt="">
<img
src="../../../assets/qrcode.svg"
class="hover-pointer"
width="20"
height="20"
alt=""
/>
</Poptip>
</div>
</div>
</template>
</Table>
<Row type="flex" justify="end" class="mt_10">
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" size="small"
show-total show-elevator show-sizer></Page>
<Page
:current="searchForm.pageNumber"
:total="total"
:page-size="searchForm.pageSize"
@on-change="changePage"
@on-page-size-change="changePageSize"
:page-size-opts="[10, 20, 50]"
size="small"
show-total
show-elevator
show-sizer
></Page>
</Row>
</Card>
<Modal title="更新库存" v-model="updateStockModalVisible" :mask-closable="false" :width="500">
<Modal
title="更新库存"
v-model="updateStockModalVisible"
:mask-closable="false"
:width="500"
>
<Tabs value="updateStock">
<TabPane label="手动规格更新" name="updateStock">
<Table class="mt_10" :columns="updateStockColumns" :data="stockList" border ></Table>
<Table
class="mt_10"
:columns="updateStockColumns"
:data="stockList"
border
></Table>
</TabPane>
<TabPane label="批量规格更新" name="stockAll">
<Input type="number" v-model="stockAllUpdate" placeholder="统一规格修改" />
@ -88,11 +158,17 @@
</Modal>
<!-- 批量设置物流模板 -->
<Modal title="批量设置物流模板" v-model="shipTemplateModal" :mask-closable="false" :width="500">
<Modal
title="批量设置物流模板"
v-model="shipTemplateModal"
:mask-closable="false"
:width="500"
>
<Form ref="shipTemplateForm" :model="shipTemplateForm" :label-width="120">
<FormItem class="form-item-view-el" label="物流模板" prop="templateId">
<Select v-model="shipTemplateForm.templateId" style="width: 200px">
<Option v-for="item in logisticsTemplate" :value="item.id" :key="item.id">{{ item.name }}
<Option v-for="item in logisticsTemplate" :value="item.id" :key="item.id"
>{{ item.name }}
</Option>
</Select>
</FormItem>
@ -113,12 +189,11 @@ import {
upGoods,
lowGoods,
deleteGoods,
batchShipTemplate
batchShipTemplate,
} from "@/api/goods";
import * as API_Shop from "@/api/shops";
export default {
name: "goods",
data() {
return {
@ -160,11 +235,11 @@ export default {
width: 130,
render: (h, params) => {
if (params.row.authFlag == "TOBEAUDITED") {
return h("Tag", {props: {color: "blue",},},"待审核");
return h("Tag", { props: { color: "blue" } }, "待审核");
} else if (params.row.authFlag == "PASS") {
return h("Tag", {props: {color: "green",},},"通过");
return h("Tag", { props: { color: "green" } }, "通过");
} else if (params.row.authFlag == "REFUSE") {
return h("Tag", {props: {color: "red",},},"审核拒绝");
return h("Tag", { props: { color: "red" } }, "审核拒绝");
}
},
},
@ -216,12 +291,12 @@ export default {
key: "goodsType",
width: 130,
render: (h, params) => {
if (params.row.goodsType === 'PHYSICAL_GOODS') {
return h("Tag", {props: {color: "geekblue"}},"实物商品");
} else if (params.row.goodsType === 'VIRTUAL_GOODS') {
return h("Tag", {props: {color: "purple"}},"虚拟商品");
if (params.row.goodsType === "PHYSICAL_GOODS") {
return h("Tag", { props: { color: "geekblue" } }, "实物商品");
} else if (params.row.goodsType === "VIRTUAL_GOODS") {
return h("Tag", { props: { color: "purple" } }, "虚拟商品");
} else {
return h("Tag", {props: {color: "cyan"}},"电子卡券");
return h("Tag", { props: { color: "cyan" } }, "电子卡券");
}
},
},
@ -230,10 +305,7 @@ export default {
key: "price",
width: 130,
render: (h, params) => {
return h(
"div",
this.$options.filters.unitPrice(params.row.price, "¥")
);
return h("div", this.$options.filters.unitPrice(params.row.price, "¥"));
},
},
{
@ -254,11 +326,11 @@ export default {
width: 120,
render: (h, params) => {
if (params.row.authFlag == "PASS") {
return h("Tag", {props: {color: "green"}},"通过");
return h("Tag", { props: { color: "green" } }, "通过");
} else if (params.row.authFlag == "TOBEAUDITED") {
return h("Tag", {props: {color: "volcano"}},"待审核");
return h("Tag", { props: { color: "volcano" } }, "待审核");
} else if (params.row.authFlag == "REFUSE") {
return h("Tag", {props: {color: "red"}},"审核拒绝");
return h("Tag", { props: { color: "red" } }, "审核拒绝");
}
},
},
@ -269,9 +341,9 @@ export default {
sortable: false,
render: (h, params) => {
if (params.row.marketEnable == "DOWN") {
return h("Tag", {props: {color: "red"}},"下架");
return h("Tag", { props: { color: "red" } }, "下架");
} else if (params.row.marketEnable == "UPPER") {
return h("Tag", {props: {color: "green"}},"上架");
return h("Tag", { props: { color: "green" } }, "上架");
}
},
},
@ -371,7 +443,8 @@ export default {
};
},
methods: {
init() { //
init() {
//
this.getDataList();
},
//
@ -425,6 +498,7 @@ export default {
if (res.success) {
this.updateStockModalVisible = false;
this.$Message.success("更新库存成功");
this.getDataList();
}
});
},
@ -466,8 +540,7 @@ export default {
saveShipTemplate() {
this.$Modal.confirm({
title: "确认设置物流模板",
content:
"您确认要设置所选的 " + this.selectCount + " 个商品的物流模板?",
content: "您确认要设置所选的 " + this.selectCount + " 个商品的物流模板?",
loading: true,
onOk: () => {
let ids = [];
@ -493,7 +566,7 @@ export default {
this.$Message.warning("您还未选择要设置物流模板的商品");
return;
}
this.getShipTempList()
this.getShipTempList();
let data = [];
this.selectList.forEach(function (e) {
data.push(e.id);
@ -514,12 +587,12 @@ export default {
});
},
//
getShipTempList () {
getShipTempList() {
API_Shop.getShipTemplate().then((res) => {
if (res.success) {
this.logisticsTemplate = res.result;
}
})
});
},
//
lower(v) {

View File

@ -78,7 +78,7 @@
>
<Button
type="success"
v-if="row.promotionStatus === 'CLOSE' || row.promotionStatus === 'NEW'"
v-if="row.promotionStatus === 'CLOSE'"
style="margin-left: 5px"
size="small"
@click="openOrClose(row)"