Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
fef86bcc
authored
Jan 19, 2025
by
芋道源码
Committed by
Gitee
Jan 19, 2025
Browse files
Options
Browse Files
Download
Plain Diff
!666 【功能完善】MALL: 模板装修优惠券组件优惠券列表回显
Merge pull request !666 from puhui999/dev
parents
a2ef21b2
5551c594
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
11 deletions
+31
-11
src/components/DiyEditor/components/mobile/CouponCard/property.vue
+20
-5
src/components/DiyEditor/components/mobile/NavigationBar/components/CellProperty.vue
+11
-6
No files found.
src/components/DiyEditor/components/mobile/CouponCard/property.vue
View file @
fef86bcc
...
@@ -68,7 +68,12 @@
...
@@ -68,7 +68,12 @@
</el-form>
</el-form>
</ComponentContainerProperty>
</ComponentContainerProperty>
<!-- 优惠券选择 -->
<!-- 优惠券选择 -->
<CouponSelect
ref=
"couponSelectDialog"
v-model:multiple-selection=
"couponList"
/>
<CouponSelect
ref=
"couponSelectDialog"
v-model:multiple-selection=
"couponList"
:take-type=
"CouponTemplateTakeTypeEnum.USER.type"
@
change=
"handleCouponSelect"
/>
</
template
>
</
template
>
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
...
@@ -76,7 +81,7 @@ import { CouponCardProperty } from './config'
...
@@ -76,7 +81,7 @@ import { CouponCardProperty } from './config'
import
{
useVModel
}
from
'@vueuse/core'
import
{
useVModel
}
from
'@vueuse/core'
import
*
as
CouponTemplateApi
from
'@/api/mall/promotion/coupon/couponTemplate'
import
*
as
CouponTemplateApi
from
'@/api/mall/promotion/coupon/couponTemplate'
import
{
floatToFixed2
}
from
'@/utils'
import
{
floatToFixed2
}
from
'@/utils'
import
{
PromotionDiscountTypeEnum
}
from
'@/utils/constants'
import
{
CouponTemplateTakeTypeEnum
,
PromotionDiscountTypeEnum
}
from
'@/utils/constants'
import
CouponSelect
from
'@/views/mall/promotion/coupon/components/CouponSelect.vue'
import
CouponSelect
from
'@/views/mall/promotion/coupon/components/CouponSelect.vue'
// 优惠券卡片属性面板
// 优惠券卡片属性面板
...
@@ -93,10 +98,20 @@ const couponSelectDialog = ref()
...
@@ -93,10 +98,20 @@ const couponSelectDialog = ref()
const
handleAddCoupon
=
()
=>
{
const
handleAddCoupon
=
()
=>
{
couponSelectDialog
.
value
.
open
()
couponSelectDialog
.
value
.
open
()
}
}
const
handleCouponSelect
=
()
=>
{
formData
.
value
.
couponIds
=
couponList
.
value
.
map
((
coupon
)
=>
coupon
.
id
)
}
watch
(
watch
(
()
=>
couponList
.
value
,
()
=>
formData
.
value
.
couponIds
,
()
=>
{
async
()
=>
{
formData
.
value
.
couponIds
=
couponList
.
value
.
map
((
coupon
)
=>
coupon
.
id
)
if
(
formData
.
value
.
couponIds
?.
length
>
0
)
{
couponList
.
value
=
await
CouponTemplateApi
.
getCouponTemplateList
(
formData
.
value
.
couponIds
)
}
},
{
immediate
:
true
,
deep
:
true
}
}
)
)
</
script
>
</
script
>
...
...
src/components/DiyEditor/components/mobile/NavigationBar/components/CellProperty.vue
View file @
fef86bcc
...
@@ -68,13 +68,18 @@ import { useVModel } from '@vueuse/core'
...
@@ -68,13 +68,18 @@ import { useVModel } from '@vueuse/core'
// 导航栏属性面板
// 导航栏属性面板
defineOptions
({
name
:
'NavigationBarCellProperty'
})
defineOptions
({
name
:
'NavigationBarCellProperty'
})
const
props
=
defineProps
<
{
const
props
=
withDefaults
(
modelValue
:
NavigationBarCellProperty
[]
defineProps
<
{
isMp
:
boolean
modelValue
:
NavigationBarCellProperty
[]
}
>
()
isMp
:
boolean
}
>
(),
{
modelValue
:
()
=>
[],
isMp
:
true
}
)
const
emit
=
defineEmits
([
'update:modelValue'
])
const
emit
=
defineEmits
([
'update:modelValue'
])
const
{
formData
:
cellList
}
=
usePropertyForm
(
props
.
modelValue
,
emit
)
const
cellList
=
useVModel
(
props
,
'modelValue'
,
emit
)
if
(
!
cellList
.
value
)
cellList
.
value
=
[]
// 单元格数量:小程序6个(右侧胶囊按钮占了2个),其它平台8个
// 单元格数量:小程序6个(右侧胶囊按钮占了2个),其它平台8个
const
cellCount
=
computed
(()
=>
(
props
.
isMp
?
6
:
8
))
const
cellCount
=
computed
(()
=>
(
props
.
isMp
?
6
:
8
))
...
...
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