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
127589e8
Commit
127589e8
authored
May 16, 2022
by
crushh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: 小程序跳转
parent
322a3fbc
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
78 additions
and
20 deletions
+78
-20
index.html
index.html
+2
-2
Navbar.png
src/assets/img/Navbar.png
+0
-0
幸运盲盒.png
src/assets/img/幸运盲盒.png
+0
-0
upload.js
src/directives/upload.js
+2
-1
form.vue
src/views/ai/task/form.vue
+0
-7
base-config.vue
src/views/game/cmh/base-config.vue
+68
-8
audio-upload.vue
src/views/game/common/audio-upload.vue
+5
-1
form.vue
src/views/game/ptyx/form.vue
+1
-1
No files found.
index.html
View file @
127589e8
...
...
@@ -9,8 +9,8 @@
<link
rel=
"stylesheet"
type=
"text/css"
href=
"<%= htmlWebpackPlugin.options.BASE_URL %>static/fonts/iconfont.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"<%= htmlWebpackPlugin.options.BASE_URL %>static/css/common.css"
>
<!-- <link rel="stylesheet" href="//at.alicdn.com/t/font_2996579_93aeeozj35q.css"> -->
<link
rel=
"stylesheet"
href=
"//at.alicdn.com/t/font_3229694_
vfjtu9hqyrc
.css"
>
<!--GIC3.0营销-->
<script
src=
"//at.alicdn.com/t/font_3229694_
vfjtu9hqyrc
.js"
></script>
<!--GIC3.0营销-->
<link
rel=
"stylesheet"
href=
"//at.alicdn.com/t/font_3229694_
y7sxqipi2a
.css"
>
<!--GIC3.0营销-->
<script
src=
"//at.alicdn.com/t/font_3229694_
y7sxqipi2a
.js"
></script>
<!--GIC3.0营销-->
<link
rel=
"stylesheet"
href=
"//at.alicdn.com/t/font_2996579_875h3lycepk.css"
>
<!-- 3.0企业 -->
<script
src=
"//at.alicdn.com/t/font_2996579_875h3lycepk.js"
></script>
<!-- 3.0企业 -->
<link
src=
"//at.alicdn.com/t/font_2859043_udehp133w1.css"
>
<!--3.0组件库-->
...
...
src/assets/img/Navbar.png
0 → 100644
View file @
127589e8
1.45 KB
src/assets/img/幸运盲盒.png
0 → 100644
View file @
127589e8
6.77 KB
src/directives/upload.js
View file @
127589e8
...
...
@@ -44,9 +44,10 @@ export default {
el
.
addEventListener
(
'change'
,
function
(
e
)
{
if
(
e
.
target
.
value
)
binding
.
value
.
loading
=
true
;
else
return
;
console
.
log
(
binding
.
value
);
const
size
=
binding
.
value
.
limit
&&
binding
.
value
.
limit
.
maxSize
?
binding
.
value
.
limit
.
maxSize
:
2
;
// 默认最大2M限制
if
(
el
.
files
[
0
].
size
>
size
*
1024
*
1024
)
{
binding
.
value
.
$tips
({
type
:
'warning'
,
message
:
`上传
${
binding
.
value
.
accept
Type
.
indexOf
(
'image'
)
>=
0
?
'图片'
:
'文件'
}
不能大于
${
size
}
M`
});
binding
.
value
.
$tips
({
type
:
'warning'
,
message
:
`上传
${
binding
.
value
.
file
Type
.
indexOf
(
'image'
)
>=
0
?
'图片'
:
'文件'
}
不能大于
${
size
}
M`
});
binding
.
value
.
loading
=
false
;
return
;
}
...
...
src/views/ai/task/form.vue
View file @
127589e8
...
...
@@ -288,7 +288,6 @@ import tagPop from '@/views/ai/task/tagPop.vue';
import
{
formatDateTimeByType
,
_debounce
}
from
'@/utils/index'
;
import
gicNewMemberGroup
from
'@/components/dm-new-member-group/index.vue'
;
import
ruleFilter
from
'@/components/dm-new-rule/ruleFilter.vue'
;
import
{
enableAccessControl
}
from
'@/utils/auth.js'
;
export
default
{
mixins
:
[
filterAvater
],
data
()
{
...
...
@@ -468,12 +467,6 @@ export default {
return
str
;
}
},
created
()
{
if
(
this
.
$store
.
state
.
marketing
.
superAdmin
!=
1
&&
enableAccessControl
())
{
// 不是超管且开启分权 不展示金字塔分层
this
.
showTabs
=
[
0
,
1
];
}
},
mounted
()
{
const
{
scene
,
id
}
=
this
.
$route
.
params
;
this
.
form
.
scene
=
scene
&&
Number
(
scene
);
...
...
src/views/game/cmh/base-config.vue
View file @
127589e8
...
...
@@ -60,12 +60,11 @@
</el-form-item>
<el-form-item
label=
"背景音乐"
prop=
"gameName"
>
<el-switch
v-model=
"baseForm.backMusicFlag"
:active-value=
"1"
:inactive-value=
"0"
/>
<el-button
size=
"small"
>
点击试听
</el-button>
<el-select
v-model=
"baseForm.materialId"
style=
"width: 381px;"
>
<el-option
v-for=
"item in backMusicOptions"
:key=
"item.materialId"
:value=
"item.materialId"
>
{{
item
.
materialName
}}
</el-option>
<el-button
size=
"small"
@
click=
"handleListen"
><i
:class=
"['iconfont fz14', isPlay ? 'icon-zanting' : 'icon-kaiqi']"
></i>
点击试听
</el-button>
<el-select
v-model=
"baseForm.backMusicUrl"
value-key=
"materialValue"
style=
"width: 381px;"
@
clear=
"handleClear"
:clearable=
"customMusicOptions.length"
>
<el-option
v-for=
"item in backMusicOptionsComputed"
:key=
"item.materialValue"
:value=
"item"
:label=
"item.materialName"
>
</el-option>
</el-select>
<audio-upload
tips=
""
@
sendAduioList=
"setAudioList"
:textType=
"true"
label=
"替换音乐"
></audio-upload>
</el-form-item>
<el-form-item
label=
"氛围弹幕"
prop=
"gameName"
>
<el-switch
v-model=
"baseForm.bulletFlag"
:active-value=
"1"
:inactive-value=
"0"
/>
...
...
@@ -73,7 +72,11 @@
</el-form-item>
<el-form-item
label=
"广告位"
prop=
"adsImageUrl"
>
<el-switch
v-model=
"baseForm.adsFlag"
:active-value=
"1"
:inactive-value=
"0"
/>
<div
class=
"tips"
>
图片建议尺寸
{{
baseForm
.
adsImageUrlSize0
}}
或等比图片,格式 jpg/png/gif,大小
{{
baseForm
.
adsImageUrlSize1
}}
以内。
</div>
<div
class=
"adsImg"
>
<dm-upload-avatar
width=
"375"
height=
"75"
:limit=
"
{ type: false, maxSize: 1 }" fileType="img" :model.sync="adsImageUrl" label="上传图片" tips="" @backImg="handleAdsChange" :unused="isInfo">
</dm-upload-avatar>
<div
class=
"tips"
>
图片建议尺寸
{{
baseForm
.
adsImageUrlSize0
}}
或等比图片,格式 jpg/png/gif,大小
{{
baseForm
.
adsImageUrlSize1
}}
以内。
</div>
<el-form-item
label=
"小程序跳转路径"
prop=
"link"
>
</el-form-item>
</div>
</el-form-item>
</div>
</el-form>
...
...
@@ -83,8 +86,10 @@
import
config
from
'@/config'
;
import
dmUploadAvatar
from
'@/components/upload/avatar'
;
import
dmUploadImg
from
'@/components/upload/img'
;
import
audioUpload
from
'../common/audio-upload.vue'
;
let
_minTime
=
null
;
let
_maxTime
=
null
;
const
music
=
new
Audio
();
export
default
{
data
()
{
return
{
...
...
@@ -96,9 +101,13 @@ export default {
templateId
:
''
,
backMusicFlag
:
1
,
adsFlag
:
1
,
bulletFlag
:
1
bulletFlag
:
1
,
backMusicUrl
:
''
},
adsImageUrl
:
{
imgUrl
:
''
,
code
:
''
},
isPlay
:
false
,
backMusicOptions
:
[],
customMusicOptions
:
[],
isDisabled
:
false
,
templateData
:
[],
api
:
config
.
api
,
...
...
@@ -133,7 +142,17 @@ export default {
},
components
:
{
dmUploadAvatar
,
dmUploadImg
dmUploadImg
,
audioUpload
},
computed
:
{
backMusicOptionsComputed
()
{
if
(
this
.
customMusicOptions
.
length
)
{
return
this
.
customMusicOptions
;
}
else
{
return
this
.
backMusicOptions
;
}
}
},
watch
:
{
templateArr
(
val
)
{
...
...
@@ -203,11 +222,46 @@ export default {
}
else
{
this
.
backMusicOptions
=
data
.
materialMap
[
'backMusicUrl'
];
console
.
log
(
this
.
backMusicOptions
);
if
(
data
.
materialMap
[
'backMusicUrl'
]
&&
data
.
materialMap
[
'backMusicUrl'
].
length
)
{
this
.
baseForm
.
backMusicUrl
=
data
.
materialMap
[
'backMusicUrl'
][
0
];
}
const
prizeStyle
=
data
.
materialMap
[
'prizeStyleJson'
][
0
];
this
.
baseForm
[
'prizeStyleJson'
]
=
JSON
.
parse
(
prizeStyle
.
materialValue
);
}
});
console
.
log
(
this
.
baseForm
);
},
handleListen
()
{
this
.
isPlay
=
!
this
.
isPlay
;
console
.
log
(
this
.
isPlay
);
this
.
backMusicOptions
.
forEach
(
item
=>
{
if
(
item
.
materialValue
==
this
.
baseForm
.
backMusicUrl
.
materialValue
)
{
music
.
src
=
this
.
baseForm
.
backMusicUrl
.
materialValue
;
console
.
log
(
this
.
baseForm
.
backMusicUrl
.
materialValue
);
this
.
isPlay
?
music
.
play
()
:
music
.
pause
();
}
});
},
handleClear
()
{
this
.
customMusicOptions
=
[];
this
.
baseForm
.
backMusicUrl
=
this
.
backMusicOptions
[
0
];
},
setAudioList
(
obj
)
{
console
.
log
(
obj
);
const
{
name
,
url
}
=
obj
;
this
.
customMusicOptions
=
[
{
materialName
:
name
,
materialValue
:
url
,
customFlag
:
1
,
materialKey
:
'backMusicUrl'
}
];
this
.
baseForm
.
backMusicUrl
=
this
.
customMusicOptions
[
0
];
},
handleAdsChange
(
obj
)
{
console
.
log
(
obj
);
this
.
baseForm
.
adsImageUrl
=
obj
.
imgUrl
;
}
}
};
...
...
@@ -259,4 +313,10 @@ export default {
color
:
#606266
;
}
}
.adsImg
{
width
:
600px
;
height
:
187px
;
background
:
#f7f8fa
;
padding
:
16px
20px
;
}
</
style
>
src/views/game/
ptyx/partials
/audio-upload.vue
→
src/views/game/
common
/audio-upload.vue
View file @
127589e8
<
template
>
<div>
<label
class=
"el-button el-button--primary"
:class=
"
{ 'is-disabled': disabled }
">
<label
:class=
"[textType ? 'el-button el-button--text el-button--small' : 'el-button el-button--primary', disabled ? 'is-disabled' : '']
"
>
{{
disabled
?
'上传中...'
:
label
}}
<input
type=
"file"
style=
"display:none;"
:disabled=
"disabled"
accept=
"audio/mpeg"
ref=
"uploader"
v-audioUpload=
"this"
/>
</label>
...
...
@@ -29,6 +29,10 @@ export default {
url
:
{
type
:
String
,
default
:
'/api-marketing/upload-game-music'
},
textType
:
{
type
:
Boolean
,
default
:
false
}
},
data
()
{
...
...
src/views/game/ptyx/form.vue
View file @
127589e8
...
...
@@ -120,7 +120,7 @@ import { numberToChinese, formatDateTimeByType } from '@/utils/index.js';
import
dmUploadAvatar
from
'@/components/upload/avatar'
;
import
editAlertMixin
from
'../common/editAlertMixin.js'
;
import
ptyxSkin
from
'./partials/ptyx-skin.vue'
;
import
audioUpload
from
'.
/partials
/audio-upload.vue'
;
import
audioUpload
from
'.
./common
/audio-upload.vue'
;
import
dmShare
from
'../common/share.vue'
;
import
dmThreshold
from
'../common/threshold.vue'
;
let
gameInfo
=
{};
...
...
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