diff --git a/src/api/product/attribute.js b/src/api/product/attribute.js
new file mode 100644
index 0000000..948166e
--- /dev/null
+++ b/src/api/product/attribute.js
@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询商品属性列表
+export function listAttribute(query) {
+ return request({
+ url: '/product/attribute/list',
+ method: 'get',
+ params: query
+ })
+}
+
+// 查询商品属性详细
+export function getAttribute(id) {
+ return request({
+ url: '/product/attribute/' + id,
+ method: 'get'
+ })
+}
+
+// 新增商品属性
+export function addAttribute(data) {
+ return request({
+ url: '/product/attribute',
+ method: 'post',
+ data: data
+ })
+}
+
+// 修改商品属性
+export function updateAttribute(data) {
+ return request({
+ url: '/product/attribute',
+ method: 'put',
+ data: data
+ })
+}
+
+// 删除商品属性
+export function delAttribute(id) {
+ return request({
+ url: '/product/attribute/' + id,
+ method: 'delete'
+ })
+}
diff --git a/src/api/product/attributeGroup.js b/src/api/product/attributeGroup.js
new file mode 100644
index 0000000..97500df
--- /dev/null
+++ b/src/api/product/attributeGroup.js
@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询属性组列表
+export function listAttributeGroup(query) {
+ return request({
+ url: '/product/attributeGroup/list',
+ method: 'get',
+ params: query
+ })
+}
+
+// 查询属性组详细
+export function getAttributeGroup(id) {
+ return request({
+ url: '/product/attributeGroup/' + id,
+ method: 'get'
+ })
+}
+
+// 新增属性组
+export function addAttributeGroup(data) {
+ return request({
+ url: '/product/attributeGroup',
+ method: 'post',
+ data: data
+ })
+}
+
+// 修改属性组
+export function updateAttributeGroup(data) {
+ return request({
+ url: '/product/attributeGroup',
+ method: 'put',
+ data: data
+ })
+}
+
+// 删除属性组
+export function delAttributeGroup(id) {
+ return request({
+ url: '/product/attributeGroup/' + id,
+ method: 'delete'
+ })
+}
diff --git a/src/api/product/brand.js b/src/api/product/brand.js
new file mode 100644
index 0000000..7221cc3
--- /dev/null
+++ b/src/api/product/brand.js
@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询商品品牌列表
+export function listBrand(query) {
+ return request({
+ url: '/product/brand/list',
+ method: 'get',
+ params: query
+ })
+}
+
+// 查询商品品牌详细
+export function getBrand(id) {
+ return request({
+ url: '/product/brand/' + id,
+ method: 'get'
+ })
+}
+
+// 新增商品品牌
+export function addBrand(data) {
+ return request({
+ url: '/product/brand',
+ method: 'post',
+ data: data
+ })
+}
+
+// 修改商品品牌
+export function updateBrand(data) {
+ return request({
+ url: '/product/brand',
+ method: 'put',
+ data: data
+ })
+}
+
+// 删除商品品牌
+export function delBrand(id) {
+ return request({
+ url: '/product/brand/' + id,
+ method: 'delete'
+ })
+}
diff --git a/src/api/product/category.js b/src/api/product/category.js
new file mode 100644
index 0000000..d6ef8a4
--- /dev/null
+++ b/src/api/product/category.js
@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询品类信息列表
+export function listCategory(query) {
+ return request({
+ url: '/product/category/list',
+ method: 'get',
+ params: query
+ })
+}
+
+// 查询品类信息详细
+export function getCategory(id) {
+ return request({
+ url: '/product/category/' + id,
+ method: 'get'
+ })
+}
+
+// 新增品类信息
+export function addCategory(data) {
+ return request({
+ url: '/product/category',
+ method: 'post',
+ data: data
+ })
+}
+
+// 修改品类信息
+export function updateCategory(data) {
+ return request({
+ url: '/product/category',
+ method: 'put',
+ data: data
+ })
+}
+
+// 删除品类信息
+export function delCategory(id) {
+ return request({
+ url: '/product/category/' + id,
+ method: 'delete'
+ })
+}
diff --git a/src/api/product/comment.js b/src/api/product/comment.js
new file mode 100644
index 0000000..c1fe87e
--- /dev/null
+++ b/src/api/product/comment.js
@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询商品评论列表
+export function listComment(query) {
+ return request({
+ url: '/product/comment/list',
+ method: 'get',
+ params: query
+ })
+}
+
+// 查询商品评论详细
+export function getComment(id) {
+ return request({
+ url: '/product/comment/' + id,
+ method: 'get'
+ })
+}
+
+// 新增商品评论
+export function addComment(data) {
+ return request({
+ url: '/product/comment',
+ method: 'post',
+ data: data
+ })
+}
+
+// 修改商品评论
+export function updateComment(data) {
+ return request({
+ url: '/product/comment',
+ method: 'put',
+ data: data
+ })
+}
+
+// 删除商品评论
+export function delComment(id) {
+ return request({
+ url: '/product/comment/' + id,
+ method: 'delete'
+ })
+}
diff --git a/src/api/product/info.js b/src/api/product/info.js
new file mode 100644
index 0000000..00f7037
--- /dev/null
+++ b/src/api/product/info.js
@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询商品信息列表
+export function listInfo(query) {
+ return request({
+ url: '/product/info/list',
+ method: 'get',
+ params: query
+ })
+}
+
+// 查询商品信息详细
+export function getInfo(id) {
+ return request({
+ url: '/product/info/' + id,
+ method: 'get'
+ })
+}
+
+// 新增商品信息
+export function addInfo(data) {
+ return request({
+ url: '/product/info',
+ method: 'post',
+ data: data
+ })
+}
+
+// 修改商品信息
+export function updateInfo(data) {
+ return request({
+ url: '/product/info',
+ method: 'put',
+ data: data
+ })
+}
+
+// 删除商品信息
+export function delInfo(id) {
+ return request({
+ url: '/product/info/' + id,
+ method: 'delete'
+ })
+}
diff --git a/src/api/product/rule.js b/src/api/product/rule.js
new file mode 100644
index 0000000..18dacc1
--- /dev/null
+++ b/src/api/product/rule.js
@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询商品规格列表
+export function listRule(query) {
+ return request({
+ url: '/product/rule/list',
+ method: 'get',
+ params: query
+ })
+}
+
+// 查询商品规格详细
+export function getRule(id) {
+ return request({
+ url: '/product/rule/' + id,
+ method: 'get'
+ })
+}
+
+// 新增商品规格
+export function addRule(data) {
+ return request({
+ url: '/product/rule',
+ method: 'post',
+ data: data
+ })
+}
+
+// 修改商品规格
+export function updateRule(data) {
+ return request({
+ url: '/product/rule',
+ method: 'put',
+ data: data
+ })
+}
+
+// 删除商品规格
+export function delRule(id) {
+ return request({
+ url: '/product/rule/' + id,
+ method: 'delete'
+ })
+}
diff --git a/src/utils/request.js b/src/utils/request.js
index 47d1bcb..406490d 100644
--- a/src/utils/request.js
+++ b/src/utils/request.js
@@ -73,7 +73,6 @@ service.interceptors.request.use(config => {
// 响应拦截器
service.interceptors.response.use(res => {
- debugger
// 未设置状态码则默认成功状态
const code = res.data.code || 200;
// 获取错误信息
diff --git a/src/views/product/attribute/index.vue b/src/views/product/attribute/index.vue
new file mode 100644
index 0000000..b0229f9
--- /dev/null
+++ b/src/views/product/attribute/index.vue
@@ -0,0 +1,274 @@
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+ 新增
+
+
+ 修改
+
+
+ 删除
+
+
+ 导出
+
+
+
+
+
+
+
+
+
+
+
+
+ 修改
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/product/attributeGroup/index.vue b/src/views/product/attributeGroup/index.vue
new file mode 100644
index 0000000..e87f6f7
--- /dev/null
+++ b/src/views/product/attributeGroup/index.vue
@@ -0,0 +1,287 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+ 新增
+
+
+ 修改
+
+
+ 删除
+
+
+ 导出
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 修改
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{dict.label}}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/product/brand/index.vue b/src/views/product/brand/index.vue
new file mode 100644
index 0000000..1088585
--- /dev/null
+++ b/src/views/product/brand/index.vue
@@ -0,0 +1,294 @@
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+ 新增
+
+
+ 修改
+
+
+ 删除
+
+
+ 导出
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 修改
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/product/category/index.vue b/src/views/product/category/index.vue
new file mode 100644
index 0000000..bdf0ad1
--- /dev/null
+++ b/src/views/product/category/index.vue
@@ -0,0 +1,316 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+ 新增
+
+
+ 修改
+
+
+ 删除
+
+
+ 导出
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 修改
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/product/comment/index.vue b/src/views/product/comment/index.vue
new file mode 100644
index 0000000..409f9c3
--- /dev/null
+++ b/src/views/product/comment/index.vue
@@ -0,0 +1,293 @@
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+ 新增
+
+
+ 修改
+
+
+ 删除
+
+
+ 导出
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 修改
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/product/info/index.vue b/src/views/product/info/index.vue
new file mode 100644
index 0000000..1bc5c86
--- /dev/null
+++ b/src/views/product/info/index.vue
@@ -0,0 +1,368 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+ 新增
+
+
+ 修改
+
+
+ 删除
+
+
+ 导出
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 修改
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{dict.label}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/product/rule/index.vue b/src/views/product/rule/index.vue
new file mode 100644
index 0000000..0d61973
--- /dev/null
+++ b/src/views/product/rule/index.vue
@@ -0,0 +1,263 @@
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+ 新增
+
+
+ 修改
+
+
+ 删除
+
+
+ 导出
+
+
+
+
+
+
+
+
+
+
+
+
+ 修改
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/tool/gen/editTable.vue b/src/views/tool/gen/editTable.vue
index de0ad40..ff38a78 100644
--- a/src/views/tool/gen/editTable.vue
+++ b/src/views/tool/gen/editTable.vue
@@ -183,7 +183,7 @@ export default {
const basicForm = this.$refs.basicInfo.$refs.basicInfoForm;
const genForm = this.$refs.genInfo.$refs.genInfoForm;
Promise.all([basicForm, genForm].map(this.getFormPromise)).then(res => {
- const validateResult = res.data.every(item => !!item);
+ const validateResult = res.every(item => !!item);
if (validateResult) {
const genTable = Object.assign({}, basicForm.model, genForm.model);
genTable.columns = this.columns;
@@ -194,7 +194,7 @@ export default {
parentMenuId: genTable.parentMenuId
};
updateGenTable(genTable).then(res => {
- this.$modal.msgSuccess(res.data.msg);
+ this.$modal.msgSuccess(res.msg);
if (res.code === 200) {
this.close();
}
diff --git a/src/views/tool/gen/importTable.vue b/src/views/tool/gen/importTable.vue
index 44f569e..48d7e49 100644
--- a/src/views/tool/gen/importTable.vue
+++ b/src/views/tool/gen/importTable.vue
@@ -108,7 +108,7 @@ export default {
return;
}
importTable({tables: tableNames}).then(res => {
- this.$modal.msgSuccess(res.data.msg);
+ this.$modal.msgSuccess(res.msg);
this.visible = false;
this.$emit("ok");
});
diff --git a/vue.config.js b/vue.config.js
index dd8b15d..f122eba 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -35,7 +35,7 @@ module.exports = {
proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
- target: `http://localhost:8080`,
+ target: `http://localhost:18080`,
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''