diff --git a/src/router/modules/marketing.js b/src/router/modules/marketing.js
index 1f55299..51b409d 100644
--- a/src/router/modules/marketing.js
+++ b/src/router/modules/marketing.js
@@ -38,17 +38,6 @@ const marketingRouter = {
hidden: true,
component: () => import('@/views/marketing/coupon/list/creatCoupon')
},
- {
- path: 'list/saveTree/:id?',
- name: 'treeAdd',
- meta: {
- title: '茶树添加',
- noCache: true,
- activeMenu: `/marketing/coupon/list`
- },
- hidden: true,
- component: () => import('@/views/marketing/coupon/list/createTree')
- },
{
path: 'list',
component: () => import('@/views/marketing/coupon/list/index'),
@@ -78,6 +67,20 @@ const marketingRouter = {
]
},
+ {
+ path: 'raffle',
+ component: () => import('@/views/marketing/raffle/config/index'),
+ name: 'raffle',
+ meta: { title: '抽奖管理', icon: '' },
+ children: [
+ {
+ path: 'config',
+ component: () => import('@/views/marketing/raffle/config/index'),
+ name: 'config',
+ meta: { title: '抽奖配置', icon: '' }
+ },
+ ]
+ },
{
path: 'bargain',
component: () => import('@/views/marketing/bargain/index'),
@@ -187,7 +190,7 @@ const marketingRouter = {
path: 'activity',
component: () => import('@/views/marketing/activity/index'),
name: 'activity',
- meta: { title: '预约', icon: '' },
+ meta: { title: '预约管理', icon: '' },
children: [
{
path: 'activityList',
@@ -201,9 +204,6 @@ const marketingRouter = {
name: 'VenueReservation',
meta: { title: '场地预约', icon: '' }
},
-
-
-
]
},
]
diff --git a/src/views/marketing/lottery/config/index.vue b/src/views/marketing/lottery/config/index.vue
index 3c6d52c..cb3534c 100644
--- a/src/views/marketing/lottery/config/index.vue
+++ b/src/views/marketing/lottery/config/index.vue
@@ -7,9 +7,15 @@
-
-
-
+
+
+
+
![]()
+
+
+
+
+
@@ -25,7 +31,7 @@
-
+
阳光值小于:
@@ -34,17 +40,19 @@
- 阳光值区间:
+ 阳光值区间:
+
以下,每次消耗:
- 阳光值大于:
+ 阳光值大于:
+
以上,每次消耗:
-
-
-
+
@@ -208,7 +214,7 @@
提交修改
@@ -320,9 +326,12 @@
+
+
+
+
-
+
提交
@@ -336,14 +345,15 @@
import Tinymce from '@/components/Tinymce/index'
import {bargainDeleteApi, marketingGameInfoListApi, marketingGameListApi} from "@/api/marketing";
import {gamesUpdateApi} from "@/api/games";
+
export default {
- components: {Tinymce },
+ components: {Tinymce},
// everySunlightStair
data() {
return {
- min:{begin:0,end:40,sunlight:2},
- center:{begin:41,end:69,sunlight:4},
- max:{begin:70,end:9999,sunlight:5},
+ min: {begin: 0, end: 40, sunlight: 2},
+ center: {begin: 41, end: 69, sunlight: 4},
+ max: {begin: 70, end: 9999, sunlight: 5},
visible: false,
gameFrom: {},
specsData: {},
@@ -393,36 +403,36 @@ export default {
this.getDataList()
},
methods: {
- minInput(value){
- //最小值不能大于最大值
- if (value >= this.max.begin){
- this.$message.error('阳光最小值不能大于或等于最大值!');
- this.min.end = this.specsData.rule.everySunlightStair[0].end
- return
- }
+ minInput(value) {
+ //最小值不能大于最大值
+ if (value >= this.max.begin) {
+ this.$message.error('阳光最小值不能大于或等于最大值!');
+ this.min.end = this.specsData.rule.everySunlightStair[0].end
+ return
+ }
- //中间区间等于+1
- this.center.begin = this.min.end +1
- },
- maxInput(value){
- //最大值不能小于最大值
- if (value <= this.min.end){
- this.max.begin = this.specsData.rule.everySunlightStair[3].begin
- this.$message.error('阳光最大值不能小于或等于最小值!');
- return
- }
//中间区间等于+1
- this.center.end = this.max.begin -1
+ this.center.begin = this.min.end + 1
+ },
+ maxInput(value) {
+ //最大值不能小于最大值
+ if (value <= this.min.end) {
+ this.max.begin = this.specsData.rule.everySunlightStair[3].begin
+ this.$message.error('阳光最大值不能小于或等于最小值!');
+ return
+ }
+ //中间区间等于+1
+ this.center.end = this.max.begin - 1
},
submitForm() {
this.$refs.formRef.validate((valid) => {
if (valid) {
- if (this.teaPlants.id === undefined){
+ if (this.teaPlants.id === undefined) {
this.specsData.items.push(this.teaPlants)
- }else {
+ } else {
this.gameFrom[this.teaPlants.index] = this.teaPlants
- delete this.teaPlants.index
+ delete this.teaPlants.index
}
this.visible = false
}
@@ -434,9 +444,9 @@ export default {
this.teaPlants.index = index
this.visible = true
},
+ //添加茶株
add() {
-
- this.$modal.confirm('确定添加吗?添加不能移除,请谨慎!').then(function() {
+ this.$modal.confirm('确定添加吗?添加不能移除,请谨慎!').then(function () {
bargainDeleteApi({id: id}).then(() => {
this.teaPlants = {
title: '',
@@ -458,12 +468,13 @@ export default {
}
this.visible = true
})
- }).catch(() => {});
+ }).catch(() => {
+ });
},
//最终提交
submit() {
//封装光照区间
- let everySunlightStair = []
+ let everySunlightStair = []
everySunlightStair.push(this.min)
everySunlightStair.push(this.center)
everySunlightStair.push(this.max)
@@ -475,9 +486,8 @@ export default {
this.gameFrom.cid = this.specsData.cid
this.gameFrom.id = this.specsData.id
//todo
- this.gameFrom.image = "茶株游戏不需要图片"
+ this.gameFrom.image = this.specsData.image
this.gameFrom.name = "茶株游戏"
-
gamesUpdateApi(this.gameFrom).then(() => {
this.$message.success('操作成功');
})
@@ -500,6 +510,9 @@ export default {
case 'pi4':
_this.teaPlants.hotImage = img[0].sattDir;
break;
+ case 'pi6':
+ _this.specsData.image = img[0].sattDir;
+ break;
case 'pi5':
_this.teaPlants.productImage = img[0].sattDir;
break;
diff --git a/src/views/marketing/raffle/config/index.vue b/src/views/marketing/raffle/config/index.vue
new file mode 100644
index 0000000..1169532
--- /dev/null
+++ b/src/views/marketing/raffle/config/index.vue
@@ -0,0 +1,306 @@
+
+
+
+
+ 规则
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ intToString(scope.row.productType)}}
+
+
+
+
+
+
+
+
+
+
+
+
+ 修改
+
+
+
+
+
提交修改
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+
+
+
+
+
+
+
diff --git a/src/views/marketing/raffle/index.vue b/src/views/marketing/raffle/index.vue
new file mode 100644
index 0000000..d2c9c01
--- /dev/null
+++ b/src/views/marketing/raffle/index.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+