diff --git a/src/api/home.js b/src/api/home.js
new file mode 100644
index 0000000..43ec5b5
--- /dev/null
+++ b/src/api/home.js
@@ -0,0 +1,63 @@
+
+import request from '@/utils/request'
+
+/**
+ * 新增EbHome
+ * @param pram
+ */
+export function homeCreateApi(data) {
+ return request({
+ url: '/admin/floor/save',
+ method: 'POST',
+ data
+ })
+}
+
+/**
+ * ebhome更新
+ * @param pram
+ */
+export function homeUpdateApi(data) {
+ return request({
+ url: '/admin/floor/update',
+ method: 'POST',
+ data
+ })
+}
+
+/**
+ * ebhome详情
+ * @param pram
+ */
+export function homeDetailApi(id) {
+ return request({
+ url: `/admin/floor/info/${id}`,
+ method: 'GET'
+ })
+}
+
+/**
+ * ebhome删除
+ * @param pram
+ */
+export function homeDeleteApi(params) {
+ return request({
+ url: `/admin/floor/delete`,
+ method: 'post',
+ params
+ })
+}
+
+
+/**
+ * ebhome列表
+ * @param pram
+ */
+export function homeListApi(params) {
+ return request({
+ url: '/admin/floor/list',
+ method: 'GET',
+ params
+ })
+}
+
diff --git a/src/api/homeItem.js b/src/api/homeItem.js
new file mode 100644
index 0000000..d8e66e0
--- /dev/null
+++ b/src/api/homeItem.js
@@ -0,0 +1,63 @@
+
+import request from '@/utils/request'
+
+/**
+ * 新增EbHome
+ * @param pram
+ */
+export function createApi(data) {
+ return request({
+ url: '/admin/floorItem/save',
+ method: 'POST',
+ data
+ })
+}
+
+/**
+ * ebhome更新
+ * @param pram
+ */
+export function updateApi(data) {
+ return request({
+ url: '/admin/floorItem/update',
+ method: 'POST',
+ data
+ })
+}
+
+/**
+ * ebhome详情
+ * @param pram
+ */
+export function detailApi(id) {
+ return request({
+ url: `/admin/floorItem/info/${id}`,
+ method: 'GET'
+ })
+}
+
+/**
+ * ebhome删除
+ * @param pram
+ */
+export function deleteApi(params) {
+ return request({
+ url: `/admin/floorItem/delete`,
+ method: 'post',
+ params
+ })
+}
+
+
+/**
+ * ebhome列表
+ * @param pram
+ */
+export function listApi(params) {
+ return request({
+ url: '/admin/floorItem/list',
+ method: 'GET',
+ params
+ })
+}
+
diff --git a/src/router/modules/operation.js b/src/router/modules/operation.js
index 1a06601..ce2cea6 100644
--- a/src/router/modules/operation.js
+++ b/src/router/modules/operation.js
@@ -31,6 +31,22 @@ const operationRouter = {
icon: 'clipboard'
}
},
+ {
+ path: 'home',
+ name: 'home',
+ component: () => import('@/views/home'),
+ meta: {
+ title: '楼层设置',
+ icon: 'clipboard'
+ }
+ },
+ {
+ path: 'homeItem/list/:id',
+ component: () => import('@/views/home/item/index'),
+ name: 'homeItem',
+ meta: { title: '楼层项', noCache: true, activeMenu: `/home/index` },
+ hidden: true
+ },
{
path:'notification',
name:'notification',
diff --git a/src/router/modules/store.js b/src/router/modules/store.js
index ce17c28..4c225bd 100644
--- a/src/router/modules/store.js
+++ b/src/router/modules/store.js
@@ -36,6 +36,12 @@ const storeRouter = {
name: 'StoreComment',
meta: { title: '商品评论', icon: '' }
},
+ // {
+ // path: 'problem',
+ // component: () => import('@/views/store/problem/index'),
+ // name: 'Problem',
+ // meta: { title: '商品常见问题', icon: '' }
+ // },
{
path: 'list/creatProduct/:id?/:isDisabled?',
component: () => import('@/views/store/creatStore/index'),
diff --git a/src/views/home/add-and-update.vue b/src/views/home/add-and-update.vue
new file mode 100644
index 0000000..ae77dcf
--- /dev/null
+++ b/src/views/home/add-and-update.vue
@@ -0,0 +1,230 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 确定
+
+
+
+
+
diff --git a/src/views/home/index.vue b/src/views/home/index.vue
new file mode 100644
index 0000000..bfad371
--- /dev/null
+++ b/src/views/home/index.vue
@@ -0,0 +1,238 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 新增数据
+ 批量删除
+
+
+
+
+
+
+
+ {{ key }} :{{ value }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 无
+ 商品详情
+ 分类列表
+ 商品列表
+
+
+
+
+
+
+
+ 首页楼层
+ 随心配套餐层
+ 首页精品推荐
+
+
+
+
+
+
+ 无效
+ 有效
+
+
+
+
+
+ 楼层项
+
+ 修改
+ 删除
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/home/item/add-item.vue b/src/views/home/item/add-item.vue
new file mode 100644
index 0000000..228887d
--- /dev/null
+++ b/src/views/home/item/add-item.vue
@@ -0,0 +1,295 @@
+
+
+
+
+
+
+
+ 添加行
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 确定
+
+
+
+
+
diff --git a/src/views/home/item/index.vue b/src/views/home/item/index.vue
new file mode 100644
index 0000000..5a88c0e
--- /dev/null
+++ b/src/views/home/item/index.vue
@@ -0,0 +1,232 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 新增数据
+ 批量删除
+
+
+
+
+
+
+
+ {{ key }} :{{ value }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 无
+ 商品详情
+ 分类列表
+ 商品列表
+
+
+
+
+
+
+
+ 商品
+ 轮播图
+
+
+
+
+
+
+ 无效
+ 有效
+
+
+
+
+ 修改
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/home/item/update-item.vue b/src/views/home/item/update-item.vue
new file mode 100644
index 0000000..7ef746f
--- /dev/null
+++ b/src/views/home/item/update-item.vue
@@ -0,0 +1,204 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 确定
+
+
+
+
+
diff --git a/src/views/home/selectProduct.vue b/src/views/home/selectProduct.vue
new file mode 100644
index 0000000..41b68d1
--- /dev/null
+++ b/src/views/home/selectProduct.vue
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/systemSetting/deliverGoods/freightSet/creatTemplates.vue b/src/views/systemSetting/deliverGoods/freightSet/creatTemplates.vue
index 089d91f..ec9ab5c 100644
--- a/src/views/systemSetting/deliverGoods/freightSet/creatTemplates.vue
+++ b/src/views/systemSetting/deliverGoods/freightSet/creatTemplates.vue
@@ -70,7 +70,6 @@
size="small"
@click="confirmEdit(ruleForm.region,scope.$index)"
>
-
删除
diff --git a/src/views/systemSetting/help/add-and-update.vue b/src/views/systemSetting/help/add-and-update.vue
index 3f262b0..21c8d33 100644
--- a/src/views/systemSetting/help/add-and-update.vue
+++ b/src/views/systemSetting/help/add-and-update.vue
@@ -50,7 +50,7 @@ export default {
categoryList: [],
dataForm: {
id: 0,
- cid: 0,
+ cid: '',
title: '',
content: '',
jumpUrl: '',
diff --git a/src/views/systemSetting/help/index.vue b/src/views/systemSetting/help/index.vue
index 16d6993..ff54d12 100644
--- a/src/views/systemSetting/help/index.vue
+++ b/src/views/systemSetting/help/index.vue
@@ -22,15 +22,20 @@
- 新增数据
- 批量删除
+
+ 新增数据
+ 批量删除
+
+ >
- 默认全国
+
-
+
@@ -263,19 +261,25 @@ export default {
ruleForm: Object.assign({}, defaultRole),
listLoading: false,
cityList: [],
+ a_cityList: [],
columns: {
title: '首件',
title2: '续件',
title3: '包邮件数'
},
+ isShowPrice: true,
tempId: 0,
- type: 0 // 0添加 1编辑
+ type: 0, // 0添加 1编辑
+ defaultCity : {"id":0,"cityId":0,"name":"默认全国","city_ids":[[0]],"child":null}
}
},
mounted() {
setTimeout(()=>{
let cityList = JSON.parse(sessionStorage.getItem('cityList'));
+ let a_cityList = JSON.parse(sessionStorage.getItem('cityList'));
+ cityList.unshift(this.defaultCity);
this.cityList = cityList;
+ this.a_cityList = a_cityList;
},1000);
},
methods: {
@@ -312,10 +316,14 @@ export default {
}
},
changeRegion(value) {
- console.log(value)
},
changeRadio(num) {
this.columns = Object.assign({}, statusMap[num - 1])
+ if (num === 4) {
+ this.isShowPrice = false;
+ } else {
+ this.isShowPrice = true;
+ }
},
// 添加配送区域
addRegion(region) {
@@ -396,7 +404,10 @@ export default {
logistics.cityListTree().then(res => {
sessionStorage.setItem('cityList',JSON.stringify(res));
let cityList = JSON.parse(sessionStorage.getItem('cityList'));
+ let a_cityList = JSON.parse(sessionStorage.getItem('cityList'));
+ cityList.unshift(this.defaultCity);
this.cityList = cityList;
+ this.a_cityList = a_cityList;
}).catch(res => {
this.$message.error(res.message)
})
@@ -434,31 +445,38 @@ export default {
// // 指定包邮设置
// shippingTemplatesFreeRequestList: []
}
+ let isAllNum = 0;
this.ruleForm.region.forEach((el, index) => {
- el.title = el.city_ids.length > 0 ? JSON.stringify(el.city_ids) : JSON.stringify([[0, 0]])
- for (var i = 0; i < el.city_ids.length; i++) {
- el.city_ids[i].shift()
+ let cityId = 'all';
+ let title = JSON.stringify([[0]]);
+ if (el.city_ids.length > 0 && el.city_ids[0] != '0') {
+ cityId = el.city_ids.join(',');
+ title = JSON.stringify(el.city_ids);
+ } else {
+ isAllNum = isAllNum + 1;
}
- el.cityId = el.city_ids.length > 0 ? el.city_ids.join(',') : 'all'
+ el.title = title;
+ el.cityId = cityId
})
+ if (isAllNum > 1 || (isAllNum == 1 && this.ruleForm.region.length > 1)) {
+ this.$message.error('配送区域已有全国选项,请移除其他区域')
+ this.loading = false;
+ return ;
+ }
param.shippingTemplatesRegionRequestList = this.ruleForm.region
- param.shippingTemplatesRegionRequestList.forEach((el, index) => {
- // delete el.city_ids
- // delete el.city_id
- })
+
if (this.ruleForm.appoint) {
this.ruleForm.free.forEach((el, index) => {
- el.title = el.city_ids.length > 0 ? JSON.stringify(el.city_ids) : JSON.stringify([[0, 0]])
- for (var i = 0; i < el.city_ids.length; i++) {
- el.city_ids[i].shift()
+ let cityId = 'all';
+ let title = JSON.stringify([[0]]);
+ if (el.city_ids.length > 0 && el.city_ids[0] != '0') {
+ cityId = el.city_ids.join(',');
+ title = JSON.stringify(el.city_ids);
}
- el.cityId = el.city_ids.length > 0 ? el.city_ids.join(',') : 'all'
+ el.title = title;
+ el.cityId = cityId
})
param.shippingTemplatesFreeRequestList = this.ruleForm.free
- param.shippingTemplatesFreeRequestList.forEach((el, index) => {
- // delete el.city_ids
- // delete el.city_id
- })
}
if (this.type === 0) {
logistics.shippingSave(param).then(res => {
@@ -512,4 +530,7 @@ export default {
width: 100px !important;
}
}
+ .el-table__row .el-form-item--mini.el-form-item {
+ margin-bottom: 0;
+ }