From 15c7b64f52794cec1bd4faadc0c5d6209aac6d6f Mon Sep 17 00:00:00 2001
From: zkthink <2622059983@qq.com>
Date: Tue, 23 Jun 2020 09:13:54 +0800
Subject: [PATCH] 1.0.1
---
src/api/Applet.js | 10 +-
src/api/AxiosApi.js | 1 -
src/api/Goods.js | 9 +-
src/components/Management/SearchBar.vue | 11 +
src/components/applet/Goods.vue | 151 +++++------
src/components/applet/GoodsClass.vue | 64 +++--
src/components/applet/Shops.vue | 245 ++++++++++++++++++
src/layout/components/AppMain.vue | 3 +-
src/layout/index.vue | 2 +-
src/store/modules/creationCamp.js | 48 +++-
src/styles/sidebar.scss | 2 +
.../Allocation/AddComponent/index.vue | 194 ++++++++------
.../Allocation/Carousel/index.vue | 129 +++++----
.../Allocation/CategoryNavigation/index.vue | 70 +++--
.../Allocation/Commodity/index.vue | 43 +--
.../OperationArea/Allocation/Editor/index.vue | 30 ++-
.../OperationArea/Allocation/Footer/index.vue | 79 ++----
.../Allocation/GraphicNavigation/index.vue | 59 ++---
.../Allocation/GroupList/index.vue | 69 +++--
.../Allocation/ImageBox/index.vue | 75 +++---
.../OperationArea/Allocation/Search/index.vue | 9 +-
.../Allocation/SingleItem/index.vue | 79 ++++--
.../OperationArea/Allocation/Video/index.vue | 2 +-
.../Allocation/components/Jump.vue | 242 +++++++++++++++++
.../Allocation/components/widgetFormitem.vue | 24 +-
.../Components/SingleItem/index.vue | 3 +-
.../PreviewContent/Components/Video/index.vue | 6 +-
.../CreationCamp/PreviewContent/index.vue | 2 +-
src/views/applet/index.vue | 27 +-
src/views/cash/details.vue | 2 +-
src/views/cash/index.vue | 19 ++
31 files changed, 1199 insertions(+), 510 deletions(-)
create mode 100644 src/components/applet/Shops.vue
create mode 100644 src/views/applet/CreationCamp/OperationArea/Allocation/components/Jump.vue
diff --git a/src/api/Applet.js b/src/api/Applet.js
index a126608..2dcbabb 100644
--- a/src/api/Applet.js
+++ b/src/api/Applet.js
@@ -3,9 +3,17 @@ import axiosApi from './AxiosApi.js'
const apiList = {
getPlatformTemplate: `/authority/cmsTemplate/getPlatformTemplate`,
updateTemplate: '/authority/cmsTemplate/updateTemplate',
- getCmsTemplate: '/authority/cmsTemplate/'
+ getCmsTemplate: '/authority/cmsTemplate/',
+ getStorePage: '/authority/store/findStoreListForPlatform'
}
export default {
+ getStorePage(data) {
+ return axiosApi({
+ method: 'POST',
+ url: apiList.getStorePage,
+ data
+ })
+ },
getCmsTemplate(id) {
return axiosApi({
method: 'GET',
diff --git a/src/api/AxiosApi.js b/src/api/AxiosApi.js
index 370f3a2..b8dc15a 100644
--- a/src/api/AxiosApi.js
+++ b/src/api/AxiosApi.js
@@ -38,7 +38,6 @@ axios.interceptors.response.use(
function handleError(error, reject) {
if (error.code === 'ECONNABORTED') {
- debugger
Message({
message: '请求超时'
})
diff --git a/src/api/Goods.js b/src/api/Goods.js
index 104f9e5..9194872 100644
--- a/src/api/Goods.js
+++ b/src/api/Goods.js
@@ -8,10 +8,17 @@ const apiList = {
findCategoryList: '/authority/productCategory/findCategoryListByDepth/',
saveProduct: '/authority/product/save',
findAdminProductList: '/authority/platformProduct/findAdminProductList',
- findGoods: '/authority/platformProduct/findProductListByCategoryOrProductIdList'
+ findGoods: '/authority/platformProduct/findProductListByCategoryOrProductIdList',
+ queryAllCategory: '/authority/productCategory/queryAllCategory'
}
export default {
+ queryAllCategory() {
+ return axiosApi({
+ method: 'POST',
+ url: apiList.queryAllCategory
+ })
+ },
findGoods(data) {
return axiosApi({
method: 'POST',
diff --git a/src/components/Management/SearchBar.vue b/src/components/Management/SearchBar.vue
index e250550..c553cf5 100644
--- a/src/components/Management/SearchBar.vue
+++ b/src/components/Management/SearchBar.vue
@@ -19,6 +19,7 @@
+
@@ -53,6 +54,16 @@ export default {
},
addManagement() {
this.$emit('addManagement')
+ },
+ reset() {
+ this.formParams = {
+ name: '',
+ code: '',
+ duty: '',
+ status: {
+ code: ''
+ }
+ }
}
}
}
diff --git a/src/components/applet/Goods.vue b/src/components/applet/Goods.vue
index 6d0d753..a48e5dd 100644
--- a/src/components/applet/Goods.vue
+++ b/src/components/applet/Goods.vue
@@ -9,10 +9,7 @@
>
-
+
-
-
-
-
+
+
+
+
-
-
-
-
+ :options="categoryList"
+ clearable
+ :props="{
+ checkStrictly: true,
+ expandTrigger: 'hover',
+ label: 'categoryName',
+ value: 'id',
+ children: 'childs'
+ }"
+ />
-
+
查询
@@ -99,35 +79,20 @@
height="80"
width="80"
:src="scope.row.productImg"
- >
+ />
-
+
-
-
-
-
+
+
+
+
i.id)
this.tableData.adminProductVOList.map(item => {
if (excludeIds.indexOf(item.id) > 0) {
- this.$refs.multipleTable && this.$refs.multipleTable.toggleRowSelection(item, true)
+ this.$refs.multipleTable &&
+ this.$refs.multipleTable.toggleRowSelection(item, true)
} else {
- this.$refs.multipleTable && this.$refs.multipleTable.toggleRowSelection(item, false)
+ this.$refs.multipleTable &&
+ this.$refs.multipleTable.toggleRowSelection(item, false)
}
})
}
},
- reset () {
+ reset() {
this.radioId = null
this.formParams = {
- "categoryId": '',
- "hasStock": '',
- "keyword": "",
- "pageSize": 10,
- "pageIndex": 1,
- "status": ''
+ categoryId: '',
+ hasStock: '',
+ keyword: '',
+ pageSize: 10,
+ pageIndex: 1,
+ status: ''
}
}
}
@@ -315,7 +282,7 @@ export default {
+
diff --git a/src/layout/components/AppMain.vue b/src/layout/components/AppMain.vue
index 137fbcb..54a6831 100644
--- a/src/layout/components/AppMain.vue
+++ b/src/layout/components/AppMain.vue
@@ -20,7 +20,8 @@ export default {
diff --git a/src/views/applet/CreationCamp/OperationArea/Allocation/Carousel/index.vue b/src/views/applet/CreationCamp/OperationArea/Allocation/Carousel/index.vue
index 35e7b65..1af3af7 100644
--- a/src/views/applet/CreationCamp/OperationArea/Allocation/Carousel/index.vue
+++ b/src/views/applet/CreationCamp/OperationArea/Allocation/Carousel/index.vue
@@ -7,8 +7,18 @@
@@ -18,8 +28,18 @@
轮播间隔
-
-
+
+
@@ -33,41 +53,40 @@
class="collapse-item"
>
-
+
添加图片
@@ -77,9 +96,11 @@
diff --git a/src/views/applet/CreationCamp/OperationArea/Allocation/Footer/index.vue b/src/views/applet/CreationCamp/OperationArea/Allocation/Footer/index.vue
index c4429d9..dcf8de1 100644
--- a/src/views/applet/CreationCamp/OperationArea/Allocation/Footer/index.vue
+++ b/src/views/applet/CreationCamp/OperationArea/Allocation/Footer/index.vue
@@ -10,20 +10,23 @@
class="collapse-item"
>
@@ -35,29 +38,27 @@
class="full-input"
/>
默认图标
-
+
选中图标
-
-
跳转至
-
+
+
-
+
添加图片
@@ -65,40 +66,15 @@
-
diff --git a/src/views/applet/CreationCamp/OperationArea/Allocation/SingleItem/index.vue b/src/views/applet/CreationCamp/OperationArea/Allocation/SingleItem/index.vue
index 2770788..8676cc7 100644
--- a/src/views/applet/CreationCamp/OperationArea/Allocation/SingleItem/index.vue
+++ b/src/views/applet/CreationCamp/OperationArea/Allocation/SingleItem/index.vue
@@ -3,48 +3,75 @@
卖点
-
+
原价
-
+
售价
-
+
按钮
-
+
-
+
-
+
商品
-
{{ category.productName }}
+
+ {{ category.productName }}
+
-
-
+
+
添加商品
+
+
跳转至
+
+
+
+
+
+
+ 商品
+
+
{{ category.productName }}
+
+
+
+
+
+
+
+ 添加商品
+
+
+
+
+ 类别
+
+
{{ category.categoryName }}
+
+
+
+
+
+
+
+ 添加类别
+
+
+
+
+ 店铺
+
+
{{ shop.storeName }}
+
+
+
+
+
+
+
+ 添加店铺
+
+
+
+
+
+
+
+
diff --git a/src/views/applet/CreationCamp/OperationArea/Allocation/components/widgetFormitem.vue b/src/views/applet/CreationCamp/OperationArea/Allocation/components/widgetFormitem.vue
index 867874b..1a6cb05 100644
--- a/src/views/applet/CreationCamp/OperationArea/Allocation/components/widgetFormitem.vue
+++ b/src/views/applet/CreationCamp/OperationArea/Allocation/components/widgetFormitem.vue
@@ -1,24 +1,24 @@
-
+
-
+
diff --git a/src/views/applet/CreationCamp/PreviewContent/Components/SingleItem/index.vue b/src/views/applet/CreationCamp/PreviewContent/Components/SingleItem/index.vue
index e846afd..404fd69 100644
--- a/src/views/applet/CreationCamp/PreviewContent/Components/SingleItem/index.vue
+++ b/src/views/applet/CreationCamp/PreviewContent/Components/SingleItem/index.vue
@@ -5,7 +5,7 @@
商城好物
-
+
@@ -50,7 +50,7 @@ export default {
font-weight: bold;
color: rgba(51, 51, 51, 1);
&::before {
- content: "";
+ content: '';
position: absolute;
left: 0;
top: 0;
diff --git a/src/views/applet/CreationCamp/PreviewContent/index.vue b/src/views/applet/CreationCamp/PreviewContent/index.vue
index 639057f..5ba115f 100644
--- a/src/views/applet/CreationCamp/PreviewContent/index.vue
+++ b/src/views/applet/CreationCamp/PreviewContent/index.vue
@@ -1,7 +1,7 @@
-
+
-
+
{
- const { name, config } = item
+ const { name, id } = item
return {
- value: config,
- label: name
+ value: id,
+ label: name,
+ isCustom: true
}
})
this.initTemplatePage(templates)
@@ -97,7 +98,21 @@ export default {
content: this.footerComponent
}
const diyComponents = this.diyComponents.concat(footerComponent)
+ let temp = false
const diyComponentsString = JSON.stringify(diyComponents)
+ if (diyComponents.length) {
+ diyComponents.forEach((item) => {
+ const t = item.content
+ if ((t.list && !t.list.length) || (t.goodsList && !t.goodsList.length) || (t.categoryList && !t.categoryList.length)) {
+ temp = true
+ return this.$message({
+ message: `${item.name}组件内容不能为空`,
+ type: 'error'
+ })
+ }
+ })
+ }
+ if (temp) return
const res = await Applet.updateTemplate({
config: diyComponentsString,
sCustom: false,
@@ -117,11 +132,11 @@ export default {