Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
quantum-blocks
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
ui
quantum-blocks
Commits
6a44611a
Commit
6a44611a
authored
Oct 20, 2022
by
Xuguangxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 页面配置增加优惠券弹窗选项
parent
29a6c92d
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
19 deletions
+32
-19
operation.api.ts
app/web/api/operation.api.ts
+5
-0
index.vue
...onent/DynamicForm/component/CouponModalSelector/index.vue
+23
-18
index.ts
app/web/page/editor/component/DynamicPageForm/index.ts
+1
-1
index.ts
app/web/page/editor/view/dashboard/index.ts
+2
-0
state.ts
app/web/page/store/modules/editor/state.ts
+1
-0
No files found.
app/web/api/operation.api.ts
View file @
6a44611a
...
...
@@ -105,4 +105,9 @@ export default {
accessToken
:
true
});
},
getCouponModalList
(
params
)
{
return
http
.
post
(
`
${
config
.
opapiHost
}
/kdspOp/api/kdsp/app/app-config-push/listAll`
,
params
,
{
accessToken
:
true
});
}
};
\ No newline at end of file
app/web/page/editor/component/DynamicForm/component/CouponModalSelector/index.vue
View file @
6a44611a
<
template
>
<div
class=
"
snapUpActivityContaine
r"
>
<Select
v-model=
"
activityInfoId"
filte
rable
>
<Option
v-for=
"item in list"
:value=
"item.id"
:key=
"item.id"
>
{{
`id ${item.id
}
- ${item.
titl
e
}
`
}}
<
/Option
>
<div
class=
"
couponModalSeleto
r"
>
<Select
v-model=
"
modalId"
filterable
clea
rable
>
<Option
v-for=
"item in list"
:value=
"item.id"
:key=
"item.id"
>
{{
`id ${item.id
}
- ${item.
nam
e
}
`
}}
<
/Option
>
<
/Select
>
<!--
<
Button
type
=
"
primary
"
@
click
=
"
save
"
>
保存
<
/Button> --
>
<
/div
>
...
...
@@ -16,8 +16,11 @@ export default {
}
}
,
watch
:
{
activityInfoId
(
val
)
{
this
.
$emit
(
'
input
'
,
val
);
value
(
val
)
{
this
.
modalId
=
val
;
}
,
modalId
(
val
)
{
this
.
$emit
(
'
input
'
,
val
?
val
:
''
);
}
}
,
components
:
{
...
...
@@ -25,25 +28,27 @@ export default {
data
()
{
return
{
list
:
[],
activityInfo
Id
:
''
modal
Id
:
''
}
}
,
created
()
{
this
.
activityInfoId
=
this
.
value
;
this
.
getActivityList
();
console
.
log
(
this
.
value
)
this
.
modalId
=
this
.
value
;
this
.
getCouponModalList
();
}
,
methods
:
{
async
getActivityList
()
{
const
res
=
await
operationApi
.
getActivityList
({
templateType
:
11
,
crowdType
:
[
1
],
userType
:[]
async
getCouponModalList
()
{
const
res
=
await
operationApi
.
getCouponModalList
({
elementType
:
4
,
// 4为优惠券弹窗类型
enable
:
'
VALID
'
}
);
for
(
let
i
=
0
;
i
<
res
.
length
;
i
++
)
{
res
[
i
].
id
=
res
[
i
].
id
.
toString
();
}
this
.
list
=
res
;
const
list
=
res
.
list
.
map
(
item
=>
{
let
obj
=
{
}
;
obj
.
id
=
item
.
id
.
toString
();
obj
.
name
=
item
.
componentName
;
return
obj
;
}
)
console
.
log
(
list
)
this
.
list
=
list
;
}
}
}
...
...
app/web/page/editor/component/DynamicPageForm/index.ts
View file @
6a44611a
...
...
@@ -179,7 +179,7 @@ export default class DynamicPageForm extends Mixins(ContextMenuMixin) {
},
];
get
propsSchema
()
{
return
[...
this
.
titleSchema
,
...
this
.
bottomSchema
,
...
this
.
floatSchema
,
...
this
.
otherProps
];
return
[...
this
.
titleSchema
,
...
this
.
bottomSchema
,
...
this
.
floatSchema
,
...
this
.
otherProps
,
...
this
.
floatModal
];
}
@
Watch
(
'
cartAndShareBtn
'
,
{
immediate
:
true
})
...
...
app/web/page/editor/view/dashboard/index.ts
View file @
6a44611a
...
...
@@ -113,6 +113,8 @@ export default class DashBoard extends Mixins(ContextMenuMixin, GoodsTabsMixin,
return
;
}
}
// console.log({ pageInfo, pageData: this.pageData }, 0);
// return;
await
this
.
savePageData
({
pageInfo
,
pageData
:
this
.
pageData
});
if
(
this
.
uuid
)
{
await
this
.
getPageDate
({
pageId
:
this
.
uuid
});
}
this
.
showSubmitPopup
=
false
;
...
...
app/web/page/store/modules/editor/state.ts
View file @
6a44611a
...
...
@@ -100,6 +100,7 @@ export const defaultState = {
showPageBottomTip
:
true
,
pageBottomTxt
:
'
没有更多啦~
'
,
pageBottomColor
:
'
#333
'
,
couponModal
:
''
,
showBackTop
:
true
,
btAttachVal
:
[
{
...
...
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