Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
marketing
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
marketing-web
marketing
Commits
322a3fbc
Commit
322a3fbc
authored
May 13, 2022
by
crushh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: dist
parent
9335d063
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
54 additions
and
13 deletions
+54
-13
img.vue
src/components/upload/img.vue
+5
-1
index.js
src/router/index.js
+4
-0
game.js
src/router/modules/game.js
+2
-1
base-config.vue
src/views/game/cmh/base-config.vue
+0
-0
form.vue
src/views/game/cmh/form.vue
+43
-11
No files found.
src/components/upload/img.vue
View file @
322a3fbc
<
template
>
<div>
<label
class=
"el-button el-button--primary"
:class=
"
{ 'is-disabled': copyDisabled }
" :style="labelStyle">
<label
:class=
"[textType ? 'el-button el-button--text el-button--small' : 'el-button el-button--primary', copyDisabled ? 'is-disabled' : '']
"
:style=
"labelStyle"
>
<i
v-if=
"icon"
:class=
"icon"
></i>
{{
label
}}
<input
type=
"file"
style=
"display:none;"
:disabled=
"copyDisabled"
accept=
"image/gif, image/jpeg,image/png"
ref=
"uploader"
v-upload=
"this"
/>
...
...
@@ -63,6 +63,10 @@ export default {
disabled
:
{
type
:
Boolean
,
default
:
false
},
textType
:
{
type
:
Boolean
,
default
:
false
}
},
watch
:
{
...
...
src/router/index.js
View file @
322a3fbc
...
...
@@ -25,9 +25,13 @@ let router = new Router({
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
// 获取是否限流
let
path
=
to
.
path
;
Object
.
keys
(
to
.
params
).
map
(
key
=>
{
path
=
path
.
replace
(
to
.
params
[
key
],
`:
${
key
}
`
);
});
if
(
to
.
meta
.
hiddenLayout
)
{
store
.
dispatch
(
'setShowLayout'
,
false
);
}
axios
.
get
(
`/api-plug/rate-limit?requestPath=
${
path
}
&enterpriseId=
${
store
.
state
.
marketing
.
enterpriseId
}
`
)
.
then
(
limitRes
=>
{
...
...
src/router/modules/game.js
View file @
322a3fbc
...
...
@@ -230,7 +230,8 @@ export default {
name
:
'新建拆盲盒'
,
component
:
()
=>
import
(
/* webpackChunkName: "game" */
'../../views/game/cmh/form.vue'
),
meta
:
{
type
:
'add'
type
:
'add'
,
hiddenLayout
:
true
}
},
{
...
...
src/views/game/cmh/base-config.vue
View file @
322a3fbc
This diff is collapsed.
Click to expand it.
src/views/game/cmh/form.vue
View file @
322a3fbc
...
...
@@ -29,7 +29,7 @@
<dm-step
title=
"步骤三"
@
click
.
native=
"active = 2"
></dm-step>
</dm-steps>
<div
class=
"formContent"
>
<baseConfig
v-if=
"active == 0
"
/>
<baseConfig
:templateArr=
"templateData"
v-if=
"active == 0"
@
change=
"handleBaseConfigChange
"
/>
</div>
<dm-form-bottom
class=
"footer"
>
<el-button
type=
"primary"
>
保存并下一步
</el-button>
...
...
@@ -43,12 +43,15 @@
import
steps
from
'@/views/game/dm-steps/steps'
;
import
step
from
'@/views/game/dm-step/step'
;
import
baseConfig
from
'./base-config.vue'
;
import
Img
from
'../../../components/upload/img.vue
'
;
import
{
getGameTemplateByType
}
from
'@/service/api/gameApi.js
'
;
export
default
{
data
()
{
return
{
active
:
0
,
menuActive
:
0
,
templateData
:
[],
prizeMax
:
10
,
prizeMin
:
1
,
bcImg
:
{
1
:
''
},
...
...
@@ -58,10 +61,17 @@ export default {
components
:
{
'dm-steps'
:
steps
,
'dm-step'
:
step
,
baseConfig
,
Img
baseConfig
},
mounted
()
{
this
.
getGameTemplateByType
();
},
methods
:
{
handleBaseConfigChange
(
data
)
{
console
.
log
(
'handleBaseConfigChange----->'
);
console
.
log
(
data
);
},
returnNext
()
{
this
.
$store
.
dispatch
(
'setShowLayout'
,
true
);
this
.
$router
.
go
(
-
1
);
...
...
@@ -69,11 +79,32 @@ export default {
handleMenuSelect
(
index
,
indexPath
)
{
console
.
log
(
index
,
indexPath
);
this
.
menuActive
=
index
;
},
getGameTemplateByType
()
{
getGameTemplateByType
({
templateType
:
1
}).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
if
(
res
.
result
&&
res
.
result
.
length
)
{
res
.
result
.
forEach
(
item
=>
{
const
{
gameTemplateMaterialList
}
=
item
;
let
materialMap
=
{};
gameTemplateMaterialList
.
forEach
(
val
=>
{
if
(
materialMap
.
hasOwnProperty
(
val
.
materialKey
))
{
materialMap
[
val
.
materialKey
].
push
(
val
);
}
else
{
materialMap
[
val
.
materialKey
]
=
[
val
];
}
});
item
.
materialMap
=
materialMap
;
});
this
.
templateData
=
res
.
result
;
const
{
prizeMax
,
prizeMin
}
=
res
.
result
[
0
];
this
.
prizeMax
=
prizeMax
;
this
.
prizeMin
=
prizeMin
;
}
console
.
log
(
this
.
templateData
);
}
});
}
},
mounted
()
{
console
.
log
(
this
);
this
.
$store
.
dispatch
(
'setShowLayout'
,
false
);
}
};
</
script
>
...
...
@@ -106,6 +137,7 @@ export default {
}
.content
{
display
:
flex
;
overflow
:
hidden
;
}
.left-content
{
width
:
520px
;
...
...
@@ -155,15 +187,15 @@ export default {
margin
:
0
20px
0
13px
;
}
.rightForm
{
padding
:
30px
20px
;
padding
:
30px
20px
0
30px
;
box-sizing
:
border-box
;
width
:
calc
(
100vw
-
520px
);
height
:
100vh
;
height
:
calc
(
100vh
-
108px
)
;
background
:
#ffffff
;
.formContent
{
margin-top
:
20px
;
overflow-y
:
auto
;
height
:
10
0%
;
height
:
9
0%
;
}
.footer
{
width
:
calc
(
100%
-
520px
)
!important
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment