Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
肖康
/
iedgeMini
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
7e73221c
authored
Jun 27, 2025
by
liangjianmin
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
爱智活动兼容
parent
0fa01044
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
896 additions
and
95 deletions
assets/css/activity/index.scss
pages.json
pages/activity/index.vue
unpackage/dist/cache/.vite/deps/_metadata.json
util/util.js
assets/css/activity/index.scss
0 → 100644
View file @
7e73221c
.activity-box
{
width
:
100%
;
min-height
:
100vh
;
.header-activity
{
height
:
88rpx
;
background
:
linear-gradient
(
200deg
,
#d6e8ff
0%
,
#ffffff
100%
);
&
.fixedtop
{
padding-top
:
88rpx
;
.search-topb
{
position
:
fixed
;
top
:
0rpx
;
left
:
0rpx
;
background
:
#fff
;
z-index
:
9
;
.searchinput
{
border
:
1rpx
solid
#f0f0f2
;
&
.searchtitleb
{
border
:
0rpx
;
}
}
}
}
.search-topb
{
width
:
750rpx
;
height
:
88rpx
;
padding
:
11rpx
0
;
padding-left
:
32rpx
;
padding-right
:
24rpx
;
box-sizing
:
border-box
;
.searchbtnx
{
width
:
150rpx
;
height
:
66rpx
;
line-height
:
66rpx
;
text-align
:
center
;
color
:
#1969f9
;
font-size
:
30rpx
;
}
image
{
width
:
120rpx
;
height
:
58rpx
;
display
:
block
;
flex-shrink
:
0
;
position
:
relative
;
top
:
4rpx
;
}
.searchinput
{
width
:
388rpx
;
height
:
66rpx
;
background
:
#ffffff
;
border-radius
:
33rpx
;
line-height
:
66rpx
;
margin-left
:
39rpx
;
flex-shrink
:
0
;
&
.searchtitleb
{
background
:
none
;
}
.seartext
{
color
:
#c2c4cc
;
font-size
:
34rpx
;
margin-left
:
16rpx
;
margin-right
:
11rpx
;
}
input
{
height
:
66rpx
;
font-size
:
24rpx
;
line-height
:
66rpx
;
width
:
264rpx
;
color
:
#292b33
;
flex-shrink
:
0
;
}
}
.newsbox
{
height
:
66rpx
;
line-height
:
66rpx
;
margin-left
:
37rpx
;
position
:
relative
;
.icon
{
font-size
:
44rpx
;
color
:
#292b33
;
}
.counts
{
width
:
46rpx
;
height
:
32rpx
;
background
:
#ff3700
;
border-radius
:
16rpx
;
border
:
2rpx
solid
#ffffff
;
position
:
absolute
;
right
:
5rpx
;
top
:
0rpx
;
color
:
#fff
;
font-size
:
24rpx
;
line-height
:
28rpx
;
text-align
:
center
;
}
}
.cdbox
{
height
:
66rpx
;
line-height
:
66rpx
;
position
:
relative
;
left
:
6rpx
;
.icon
{
font-size
:
44rpx
;
color
:
#292b33
;
}
.sj
{
position
:
absolute
;
border-style
:
solid
;
border-width
:
10rpx
;
border-color
:
transparent
transparent
#292b33
transparent
;
top
:
57rpx
;
left
:
10rpx
;
display
:
none
;
}
.cdcons
{
position
:
absolute
;
width
:
200rpx
;
background
:
#292b33
;
border-radius
:
10px
;
padding
:
0
24rpx
;
padding-bottom
:
10rpx
;
display
:
none
;
top
:
75rpx
;
left
:
-150rpx
;
z-index
:
2
;
a
{
height
:
73rpx
;
display
:
block
;
width
:
152rpx
;
border-bottom
:
1rpx
solid
#484b59
;
color
:
#fff
;
line-height
:
72rpx
;
font-size
:
24rpx
;
&
:last-child
{
border
:
0rpx
;
}
}
}
&
:hover
{
.cdcons
,
.sj
{
display
:
block
;
}
}
}
}
}
.cube-set-drag-area
{
width
:
100%
;
.cube-initial
{
width
:
100%
;
.cube-set-drag-content
{
height
:
100%
;
&
.customLayout
{
.box
{
position
:
relative
;
height
:
100%
;
overflow
:
hidden
;
.pic
{
height
:
100%
;
}
}
}
&
.lotteryCircle
{
height
:
950rpx
;
.number-of-draw
{
padding
:
24rpx
0
;
.t1
{
font-size
:
30rpx
;
color
:
#ffffff
;
}
.t2
{
font-size
:
32rpx
;
color
:
#ffffff
;
font-weight
:
bold
;
}
}
.lotteryCircle-bg
{
width
:
100%
;
height
:
100%
;
.pic
{
width
:
100%
;
height
:
100%
;
}
.btn-wrap
{
padding
:
24rpx
;
.contactBg
{
width
:
300rpx
;
height
:
60rpx
;
text-align
:
center
;
font-size
:
24rpx
;
color
:
#fff
;
background
:
#e0be7d
;
border-radius
:
2rpx
;
box-sizing
:
border-box
;
}
.prizeBg
{
width
:
300rpx
;
height
:
60rpx
;
text-align
:
center
;
font-size
:
24rpx
;
color
:
#fff
;
background
:
#e0be7d
;
border-radius
:
2rpx
;
box-sizing
:
border-box
;
}
}
}
}
&
.lotterySquare
{
height
:
1000rpx
;
.number-of-draw
{
padding
:
24rpx
0
;
.t1
{
font-size
:
30rpx
;
color
:
#ffffff
;
}
.t2
{
font-size
:
32rpx
;
color
:
#ffffff
;
font-weight
:
bold
;
}
}
.lotteryCircle-bg
{
width
:
100%
;
height
:
100%
;
.pic
{
width
:
100%
;
height
:
100%
;
}
.btn-wrap
{
padding
:
24rpx
;
.contactBg
{
width
:
300rpx
;
height
:
60rpx
;
text-align
:
center
;
font-size
:
24rpx
;
color
:
#fff
;
background
:
#e0be7d
;
border-radius
:
2rpx
;
box-sizing
:
border-box
;
}
.prizeBg
{
width
:
300rpx
;
height
:
60rpx
;
text-align
:
center
;
font-size
:
24rpx
;
color
:
#fff
;
background
:
#e0be7d
;
border-radius
:
2rpx
;
box-sizing
:
border-box
;
}
}
}
}
&
.coupon
{
.carousel
{
.swiper
{
width
:
100%
;
height
:
100%
;
.swiper-item
{
position
:
relative
;
width
:
100%
;
height
:
100%
;
&.
curr
:
:
after
{
position
:
absolute
;
left
:
0
;
top
:
0
;
width
:
100%
;
height
:
100%
;
background
:
rgba
(
0
,
0
,
0
,
0
.8
);
background-size
:
cover
;
content
:
'已领取'
;
z-index
:
1
;
display
:
flex
;
opacity
:
0
.8
;
text-align
:
center
;
color
:
#fff
;
font-size
:
13px
;
align-items
:
center
;
justify-content
:
center
;
}
.pic
{
width
:
100%
;
height
:
100%
;
}
}
}
}
.carousel-list
{
flex-wrap
:
wrap
;
.box
{
position
:
relative
;
height
:
100%
;
overflow
:
hidden
;
margin-bottom
:
24rpx
;
&.
curr
:
:
after
{
position
:
absolute
;
left
:
0
;
top
:
0
;
width
:
100%
;
height
:
100%
;
background
:
rgba
(
0
,
0
,
0
,
0
.8
);
background-size
:
cover
;
content
:
'已领取'
;
z-index
:
1
;
display
:
flex
;
opacity
:
0
.8
;
text-align
:
center
;
color
:
#fff
;
font-size
:
13px
;
align-items
:
center
;
justify-content
:
center
;
}
.pic
{
width
:
100%
;
height
:
100%
;
}
}
}
}
&
.formModule
{
.form-box
{
padding
:
24rpx
;
background-color
:
transparent
;
.input-box
{
position
:
relative
;
margin-bottom
:
28rpx
;
.tt
{
font-size
:
24rpx
;
color
:
#484b59
;
margin-bottom
:
16rpx
;
}
.uni-input
{
height
:
72rpx
;
background
:
#f5f5f7
;
border-radius
:
10rpx
;
text-indent
:
24rpx
;
font-size
:
24rpx
;
border
:
1px
solid
transparent
;
transition
:
all
0
.4s
ease
;
&
:focus-within
{
background-color
:
#ffffff
;
border
:
1px
solid
#1969f9
;
}
&
:
:-
webkit-input-placeholder
{
color
:
#919399
;
}
}
.mobile
{
background
:
#f5f5f7
;
.picker-box
{
padding-left
:
24rpx
;
padding-right
:
16rpx
;
width
:
159rpx
;
height
:
40rpx
;
border-right
:
1px
solid
#c2c4cc
;
.uni-inputs
{
font-size
:
26rpx
;
color
:
#484b59
;
}
.iconfont
{
font-size
:
32rpx
;
}
}
.text
{
padding-right
:
24rpx
;
font-size
:
26rpx
;
color
:
#1969f9
;
white-space
:
nowrap
;
}
.uni-input
{
font-size
:
26rpx
;
text-indent
:
23rpx
;
&
:focus-within
{
background
:
#f5f5f7
;
border
:
1px
solid
transparent
;
}
}
}
.pic
{
position
:
absolute
;
right
:
15rpx
;
bottom
:
5rpx
;
width
:
160rpx
;
height
:
62rpx
;
}
.code
{
position
:
absolute
;
right
:
15rpx
;
bottom
:
20rpx
;
font-size
:
26rpx
;
color
:
#1969f9
;
white-space
:
nowrap
;
&
.disabled
{
color
:
#919399
;
}
}
}
.formBtn
{
width
:
100%
;
height
:
68rpx
;
background
:
#1969f9
;
border-radius
:
10rpx
;
font-size
:
28rpx
;
color
:
#ffffff
;
&
.disabled
{
opacity
:
0
.5
;
}
}
}
}
}
}
}
}
.no-data
{
image
{
width
:
356rpx
;
height
:
356rpx
;
}
.tt
{
margin-top
:
32rpx
;
font-size
:
28rpx
;
color
:
#292b33
;
}
}
.layer-box
{
padding
:
24rpx
;
background
:
linear-gradient
(
180deg
,
#f0f6ff
0%
,
#ffffff
88rpx
);
border-radius
:
10rpx
10rpx
0px
0px
;
.title
{
height
:
88rpx
;
margin-bottom
:
13rpx
;
.left
{
font-size
:
32rpx
;
color
:
#292b33
;
font-weight
:
bold
;
}
.right
{
.iconfont
{
font-size
:
40rpx
;
color
:
#c2c4cc
;
}
}
}
.form-box
{
.input-box
{
margin-bottom
:
28rpx
;
.tt
{
font-size
:
24rpx
;
color
:
#484b59
;
margin-bottom
:
16rpx
;
}
.sel
{
font-size
:
24rpx
;
color
:
#1969f9
;
}
.uni-input
{
height
:
72rpx
;
background
:
#f5f5f7
;
border-radius
:
10rpx
;
text-indent
:
24rpx
;
font-size
:
24rpx
;
border
:
1px
solid
transparent
;
transition
:
all
0
.4s
ease
;
&
:focus-within
{
background-color
:
#ffffff
;
border
:
1px
solid
#1969f9
;
}
&
:
:-
webkit-input-placeholder
{
color
:
#919399
;
}
}
.select-box
{
height
:
72rpx
;
background
:
#f5f5f7
;
border-radius
:
10rpx
;
.uni-input
{
width
:
80%
;
}
.iconfont
{
margin-right
:
24rpx
;
}
}
.textarea-box
{
height
:
144rpx
;
background
:
#f5f5f7
;
border-radius
:
10rpx
;
padding
:
20rpx
24rpx
0
24rpx
;
border
:
1px
solid
transparent
;
transition
:
all
0
.4s
ease
;
textarea
{
height
:
100%
;
font-size
:
24rpx
;
&
:
:-
webkit-input-placeholder
{
color
:
#919399
;
}
}
&
:focus-within
{
background-color
:
#ffffff
;
border
:
1px
solid
#1969f9
;
}
}
.mobile
{
background
:
#f5f5f7
;
.picker-box
{
padding-left
:
24rpx
;
padding-right
:
16rpx
;
width
:
159rpx
;
height
:
40rpx
;
border-right
:
1px
solid
#c2c4cc
;
.uni-inputs
{
font-size
:
26rpx
;
color
:
#484b59
;
}
.iconfont
{
font-size
:
32rpx
;
}
}
.text
{
padding-right
:
24rpx
;
font-size
:
26rpx
;
color
:
#1969f9
;
white-space
:
nowrap
;
}
.uni-input
{
font-size
:
26rpx
;
text-indent
:
23rpx
;
&
:focus-within
{
background
:
#f5f5f7
;
border
:
1px
solid
transparent
;
}
}
}
}
}
.list-box
{
max-height
:
500rpx
;
overflow-y
:
auto
;
.head
{
height
:
60rpx
;
.tt
{
width
:
50%
;
font-size
:
26rpx
;
font-weight
:
bold
;
color
:
#666
;
}
}
.box
{
height
:
60rpx
;
.tt
{
width
:
50%
;
font-size
:
24rpx
;
color
:
#666
;
}
}
}
.save
{
height
:
68rpx
;
background
:
#1969f9
;
border-radius
:
10rpx
;
font-size
:
28rpx
;
color
:
#fff
;
}
}
pages.json
View file @
7e73221c
{
"pages"
:
[
{
"path"
:
"pages/index/index"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"navigationBarBackgroundColor"
:
"#BF0009"
,
"navigationBarTextStyle"
:
"white"
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/index/kf"
,
"style"
:
{
"navigationBarTitleText"
:
"iEdge爱智 - 在线咨询"
,
"navigationBarBackgroundColor"
:
"#BF0009"
,
"navigationBarTextStyle"
:
"white"
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/class/nav"
},
{
"path"
:
"pages/class/list"
},
{
"path"
:
"pages/search/nav"
},
{
"path"
:
"pages/search/list"
},
{
"path"
:
"pages/goods/detail"
},
{
"path"
:
"pages/auth/login"
},
{
"path"
:
"pages/auth/reg"
},
{
"path"
:
"pages/auth/regSuccess"
},
{
"path"
:
"pages/auth/forget"
},
{
"path"
:
"pages/auth/findSuccess"
},
{
"path"
:
"pages/auth/rule"
},
{
"path"
:
"pages/auth/changeEmail"
},
{
"path"
:
"pages/car/list"
},
{
"path"
:
"pages/car/confirmOrder"
},
{
"path"
:
"pages/car/confirmQuote"
},
{
"path"
:
"pages/car/confirmQuoteSuccess"
},
{
"path"
:
"pages/car/confirmRule"
},
{
"path"
:
"pages/user/userInfo"
},
{
"path"
:
"pages/user/msgList"
},
{
"path"
:
"pages/user/coupon"
},
{
"path"
:
"pages/user/address"
},
{
"path"
:
"pages/user/qDlist"
},
{
"path"
:
"pages/user/qdDetail"
},
{
"path"
:
"pages/user/addressAdd"
},
{
"path"
:
"pages/user/addressEdit"
},
{
"path"
:
"pages/user/invoice"
},
{
"path"
:
"pages/user/invoiceEdit"
},
{
"path"
:
"pages/user/invoiceAdd"
},
{
"path"
:
"pages/user/companyInfo"
},
{
"path"
:
"pages/user/companyInfoList"
},
{
"path"
:
"pages/user/setting"
},
{
"path"
:
"pages/user/orderList"
},
{
"path"
:
"pages/user/orderDetail"
},
{
"path"
:
"pages/user/orderPay"
},
{
"path"
:
"pages/user/orderPayLine"
},
{
"path"
:
"pages/activity/ac618"
}
],
"globalStyle"
:
{
"navigationBarTextStyle"
:
"black"
,
"navigationBarTitleText"
:
"爱智工业品"
,
"navigationBarBackgroundColor"
:
"#F8F8F8"
,
//
"backgroundColor"
:
"#fff"
"navigationStyle"
:
"custom"
},
"pages"
:
[{
"path"
:
"pages/index/index"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"navigationBarBackgroundColor"
:
"#BF0009"
,
"navigationBarTextStyle"
:
"white"
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/index/kf"
,
"style"
:
{
"navigationBarTitleText"
:
"iEdge爱智 - 在线咨询"
,
"navigationBarBackgroundColor"
:
"#BF0009"
,
"navigationBarTextStyle"
:
"white"
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/class/nav"
},
{
"path"
:
"pages/class/list"
},
{
"path"
:
"pages/search/nav"
},
{
"path"
:
"pages/search/list"
},
{
"path"
:
"pages/goods/detail"
},
{
"path"
:
"pages/auth/login"
},
{
"path"
:
"pages/auth/reg"
},
{
"path"
:
"pages/auth/regSuccess"
},
{
"path"
:
"pages/auth/forget"
},
{
"path"
:
"pages/auth/findSuccess"
},
{
"path"
:
"pages/auth/rule"
},
{
"path"
:
"pages/auth/changeEmail"
},
{
"path"
:
"pages/car/list"
},
{
"path"
:
"pages/car/confirmOrder"
},
{
"path"
:
"pages/car/confirmQuote"
},
{
"path"
:
"pages/car/confirmQuoteSuccess"
},
{
"path"
:
"pages/car/confirmRule"
},
{
"path"
:
"pages/user/userInfo"
},
{
"path"
:
"pages/user/msgList"
},
{
"path"
:
"pages/user/coupon"
},
{
"path"
:
"pages/user/address"
},
{
"path"
:
"pages/user/qDlist"
},
{
"path"
:
"pages/user/qdDetail"
},
{
"path"
:
"pages/user/addressAdd"
},
{
"path"
:
"pages/user/addressEdit"
},
{
"path"
:
"pages/user/invoice"
},
{
"path"
:
"pages/user/invoiceEdit"
},
{
"path"
:
"pages/user/invoiceAdd"
},
{
"path"
:
"pages/user/companyInfo"
},
{
"path"
:
"pages/user/companyInfoList"
},
{
"path"
:
"pages/user/setting"
},
{
"path"
:
"pages/user/orderList"
},
{
"path"
:
"pages/user/orderDetail"
},
{
"path"
:
"pages/user/orderPay"
},
{
"path"
:
"pages/user/orderPayLine"
},
{
"path"
:
"pages/activity/ac618"
},
{
"path"
:
"pages/activity/index"
}
],
"globalStyle"
:
{
"navigationBarTextStyle"
:
"black"
,
"navigationBarTitleText"
:
"爱智工业品"
,
"navigationBarBackgroundColor"
:
"#F8F8F8"
,
"navigationStyle"
:
"custom"
},
"uniIdRouter"
:
{}
"uniIdRouter"
:
{}
}
\ No newline at end of file
pages/activity/index.vue
0 → 100644
View file @
7e73221c
<
template
>
<view
class=
"activity-box"
:style=
"boxStyle"
>
<!-- 活动中心区域 -->
<view
class=
"cube-set-drag-area"
>
<view
class=
"cube-initial row verCenter rowCenter"
v-for=
"(item, index) in list"
:key=
"index"
:style=
"'height:' + item.height + 'rpx'"
>
<!-- customLayout -->
<template
v-if=
"item.basic_elements == 'customLayout'"
>
<!-- 列数为1 -->
<template
v-if=
"item.columns == 1"
>
<view
class=
"cube-set-drag-content customLayout row verCenter"
:style=
"item.width == 750 ? 'width:100%' : 'width:' + item.width + 'rpx'"
>
<a
class=
"box row"
:href=
"item.columnOneHref ? item.columnOneHref : 'javascript:;'"
:target=
"item.columnOneHref ? '_blank' : ''"
:style=
"item.columnWidthOne == 750 ? 'width:100%' : item.width"
>
<text
v-if=
"item.hot"
@
click
.
stop=
"toUrl(item.hot[0].url, $event)"
:style=
"'position:absolute;background-size:cover;background-repeat:no-repeat;background-position: center;z-index:8;width:' + item.hot[0].width + 'rpx;height:' + item.hot[0].height + 'rpx;left:' + item.hot[0].x + 'rpx;top:' + item.hot[0].y + 'rpx;background-image:url(' + item.hot[0].pic + ')'"
></text>
<image
:style=
"item.columnWidthOne == 750 ? 'width:100%' : item.width"
class=
"pic"
:src=
"item.columnOneUrl"
mode=
"aspectFill"
></image>
</a>
</view>
</
template
>
<!-- 列数为2 -->
<
template
v-else-if=
"item.columns == 2"
>
<view
class=
"cube-set-drag-content customLayout row verCenter"
:style=
"item.width == 750 ? 'width:100%' : 'width:' + item.width + 'rpx'"
>
<a
class=
"box row"
:href=
"item.columnOneHref ? item.columnOneHref : 'javascript:;'"
:target=
"item.columnOneHref ? '_blank' : ''"
:style=
"'width:' + item.columnWidthOne + 'rpx;margin-right:' + item.spacing + 'rpx'"
>
<text
v-if=
"item.hot"
@
click
.
stop=
"toUrl(item.hot[0].url, $event)"
:style=
"'position:absolute;background-size:cover;background-repeat:no-repeat;background-position: center;z-index:8;width:' + item.hot[0].width + 'rpx;height:' + item.hot[0].height + 'rpx;left:' + item.hot[0].x + 'rpx;top:' + item.hot[0].y + 'rpx;background-image:url(' + item.hot[0].pic + ')'"
></text>
<image
class=
"pic"
:src=
"item.columnOneUrl"
mode=
"aspectFill"
></image>
</a>
<a
class=
"box row"
:href=
"item.columnTwoHref ? item.columnTwoHref : 'javascript:;'"
:target=
"item.columnTwoHref ? '_blank' : ''"
:style=
"'width:' + item.columnWidthTwo + 'rpx'"
>
<text
v-if=
"item.hot"
@
click
.
stop=
"toUrl(item.hot[1].url, $event)"
:style=
"'position:absolute;background-size:cover;background-repeat:no-repeat;background-position: center;z-index:8;width:' + item.hot[1].width + 'rpx;height:' + item.hot[1].height + 'rpx;left:' + item.hot[1].x + 'rpx;top:' + item.hot[1].y + 'rpx;background-image:url(' + item.hot[1].pic + ')'"
></text>
<image
class=
"pic"
:src=
"item.columnTwoUrl"
mode=
"aspectFill"
></image>
</a>
</view>
</
template
>
<!-- 列数为3 -->
<
template
v-else-if=
"item.columns == 3"
>
<view
class=
"cube-set-drag-content customLayout row verCenter"
:style=
"item.width == 750 ? 'width:100%' : 'width:' + item.width + 'rpx'"
>
<a
class=
"box row"
:href=
"item.columnOneHref ? item.columnOneHref : 'javascript:;'"
:target=
"item.columnOneHref ? '_blank' : ''"
:style=
"'width:' + item.columnWidthOne + 'rpx;margin-right:' + item.spacing + 'rpx'"
>
<text
v-if=
"item.hot"
@
click
.
stop=
"toUrl(item.hot[0].url, $event)"
:style=
"'position:absolute;background-size:cover;background-repeat:no-repeat;background-position: center;z-index:8;width:' + item.hot[0].width + 'rpx;height:' + item.hot[0].height + 'rpx;left:' + item.hot[0].x + 'rpx;top:' + item.hot[0].y + 'rpx;background-image:url(' + item.hot[0].pic + ')'"
></text>
<image
class=
"pic"
:src=
"item.columnOneUrl"
mode=
"aspectFill"
></image>
</a>
<a
class=
"box row"
:href=
"item.columnTwoHref ? item.columnTwoHref : 'javascript:;'"
:target=
"item.columnTwoHref ? '_blank' : ''"
:style=
"'width:' + item.columnWidthTwo + 'rpx;margin-right:' + item.spacing + 'rpx'"
>
<text
v-if=
"item.hot"
@
click
.
stop=
"toUrl(item.hot[1].url, $event)"
:style=
"'position:absolute;background-size:cover;background-repeat:no-repeat;background-position: center;z-index:8;width:' + item.hot[1].width + 'rpx;height:' + item.hot[1].height + 'rpx;left:' + item.hot[1].x + 'rpx;top:' + item.hot[1].y + 'rpx;background-image:url(' + item.hot[1].pic + ')'"
></text>
<image
class=
"pic"
:src=
"item.columnTwoUrl"
mode=
"aspectFill"
></image>
</a>
<a
class=
"box row"
:href=
"item.columnThreeHref ? item.columnThreeHref : 'javascript:;'"
:target=
"item.columnThreeHref ? '_blank' : ''"
:style=
"'width:' + item.columnWidthThree + 'rpx'"
>
<text
v-if=
"item.hot"
@
click
.
stop=
"toUrl(item.hot[2].url, $event)"
:style=
"'position:absolute;background-size:cover;background-repeat:no-repeat;background-position: center;z-index:8;width:' + item.hot[2].width + 'rpx;height:' + item.hot[2].height + 'rpx;left:' + item.hot[2].x + 'rpx;top:' + item.hot[2].y + 'rpx;background-image:url(' + item.hot[2].pic + ')'"
></text>
<image
class=
"pic"
:src=
"item.columnThreeUrl"
mode=
"aspectFill"
></image>
</a>
</view>
</
template
>
<!-- 列数为4 -->
<
template
v-else-if=
"item.columns == 4"
>
<view
class=
"cube-set-drag-content customLayout row verCenter"
:style=
"item.width == 750 ? 'width:100%' : 'width:' + item.width + 'rpx'"
>
<a
class=
"box row"
:href=
"item.columnOneHref ? item.columnOneHref : 'javascript:;'"
:target=
"item.columnOneHref ? '_blank' : ''"
:style=
"'width:' + item.columnWidthOne + 'rpx;margin-right:' + item.spacing + 'rpx'"
>
<text
v-if=
"item.hot"
@
click
.
stop=
"toUrl(item.hot[0].url, $event)"
:style=
"'position:absolute;background-size:cover;background-repeat:no-repeat;background-position: center;z-index:8;width:' + item.hot[0].width + 'rpx;height:' + item.hot[0].height + 'rpx;left:' + item.hot[0].x + 'rpx;top:' + item.hot[0].y + 'rpx;background-image:url(' + item.hot[0].pic + ')'"
></text>
<image
class=
"pic"
:src=
"item.columnOneUrl"
mode=
"aspectFill"
></image>
</a>
<a
class=
"box row"
:href=
"item.columnTwoHref ? item.columnTwoHref : 'javascript:;'"
:target=
"item.columnTwoHref ? '_blank' : ''"
:style=
"'width:' + item.columnWidthTwo + 'rpx;margin-right:' + item.spacing + 'rpx'"
>
<text
v-if=
"item.hot"
@
click
.
stop=
"toUrl(item.hot[1].url, $event)"
:style=
"'position:absolute;background-size:cover;background-repeat:no-repeat;background-position: center;z-index:8;width:' + item.hot[1].width + 'rpx;height:' + item.hot[1].height + 'rpx;left:' + item.hot[1].x + 'rpx;top:' + item.hot[1].y + 'rpx;background-image:url(' + item.hot[1].pic + ')'"
></text>
<image
class=
"pic"
:src=
"item.columnTwoUrl"
mode=
"aspectFill"
></image>
</a>
<a
class=
"box row"
:href=
"item.columnThreeHref ? item.columnThreeHref : 'javascript:;'"
:target=
"item.columnThreeHref ? '_blank' : ''"
:style=
"'width:' + item.columnWidthThree + 'rpx;margin-right:' + item.spacing + 'rpx'"
>
<text
v-if=
"item.hot"
@
click
.
stop=
"toUrl(item.hot[2].url, $event)"
:style=
"'position:absolute;background-size:cover;background-repeat:no-repeat;background-position: center;z-index:8;width:' + item.hot[2].width + 'rpx;height:' + item.hot[2].height + 'rpx;left:' + item.hot[2].x + 'rpx;top:' + item.hot[2].y + 'rpx;background-image:url(' + item.hot[2].pic + ')'"
></text>
<image
class=
"pic"
:src=
"item.columnThreeUrl"
mode=
"aspectFill"
></image>
</a>
<a
class=
"box row"
:href=
"item.columnFourHref ? item.columnFourHref : 'javascript:;'"
:target=
"item.columnFourHref ? '_blank' : ''"
:style=
"'width:' + item.columnWidthFour + 'rpx'"
>
<text
v-if=
"item.hot"
@
click
.
stop=
"toUrl(item.hot[3].url, $event)"
:style=
"'position:absolute;background-size:cover;background-repeat:no-repeat;background-position: center;z-index:8;width:' + item.hot[3].width + 'rpx;height:' + item.hot[3].height + 'rpx;left:' + item.hot[3].x + 'rpx;top:' + item.hot[3].y + 'rpx;background-image:url(' + item.hot[3].pic + ')'"
></text>
<image
class=
"pic"
:src=
"item.columnFourUrl"
mode=
"aspectFill"
></image>
</a>
</view>
</
template
>
</template>
<!-- coupon -->
<
template
v-else-if=
"item.basic_elements == 'coupon'"
>
<view
class=
"cube-set-drag-content coupon"
:style=
"'width:100%;background-size:cover;background-repeat:no-repeat;background-position: center;background-image:url(' + item.bg + ')'"
>
<template
v-if=
"item.pattern == 1"
>
<view
class=
"carousel row"
:style=
"'height:' + item.couponWidth + 'rpx'"
>
<swiper
class=
"swiper"
circular
:indicator-dots=
"indicatorDots"
:autoplay=
"autoplay"
indicator-color=
"#C6C7CC"
indicator-active-color=
"#1969F9"
>
<swiper-item
class=
"swiper-item"
:class=
"
{ curr: coupon_flag[i] }" @click="issueChange(JSON.parse(item.columnCouponId)[i], i)" v-for="(v, i) in JSON.parse(item.columnCouponUrl)" :key="i">
<image
mode=
"aspectFill"
:src=
"v"
lazy-load=
"true"
class=
"pic"
></image>
</swiper-item>
</swiper>
</view>
</
template
>
<
template
v-else-if=
"item.pattern == 2"
>
<view
class=
"carousel-list row rowCenter verCenter"
>
<template
v-if=
"JSON.parse(item.columnCouponUrl).length == 1"
>
<view
class=
"box"
:class=
"
{ curr: coupon_flag[i] }" @click="issueChange(JSON.parse(item.columnCouponId)[i], i)" :data-id="JSON.parse(item.columnCouponId)[i]" :style="'width:' + item.couponLength + 'rpx;margin-right:0;height:' + item.couponWidth + 'rpx'" v-for="(v, i) in JSON.parse(item.columnCouponUrl)" :key="i">
<image
mode=
"aspectFill"
:src=
"v"
lazy-load=
"true"
class=
"pic"
></image>
</view>
</
template
>
<
template
v-else
>
<view
class=
"box"
:class=
"
{ curr: coupon_flag[i] }" @click="issueChange(JSON.parse(item.columnCouponId)[i], i)" :data-id="JSON.parse(item.columnCouponId)[i]" :style="'width:' + item.couponLength + 'rpx;height:' + item.couponWidth + 'rpx'" v-for="(v, i) in JSON.parse(item.columnCouponUrl)" :key="i">
<image
mode=
"aspectFill"
:src=
"v"
lazy-load=
"true"
class=
"pic"
></image>
</view>
</
template
>
</view>
</template>
</view>
</template>
</view>
</view>
</view>
</template>
<
script
>
import
{
Api_Url
}
from
'@/util/api.js'
import
{
createArray
}
from
'@/util/util.js'
;
export
default
{
data
()
{
return
{
boxStyle
:
{},
activity_code
:
''
,
ActivityInfo
:
{},
//活动所有配置
list
:
{},
//活动列表
coupon_flag
:
[],
//优惠券标记
};
},
onLoad
(
opyions
)
{
this
.
activity_code
=
opyions
.
activity_code
||
'iedgeyuan'
;
this
.
getData
()
},
methods
:
{
getData
()
{
this
.
request
(
Api_Url
+
'/api/activity/getActivityInfo'
,
'GET'
,
{
activity_code
:
this
.
activity_code
},
true
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
//活动过期的时候,禁止访问
if
(
res
.
data
.
activity_status
==
-
1
)
{
uni
.
showModal
({
title
:
'提示'
,
content
:
'该活动已过期'
,
showCancel
:
false
,
confirmText
:
'确定'
,
success
:
function
(
res
)
{
if
(
res
.
confirm
)
{
window
.
location
.
href
=
'/'
;
}
}
});
}
else
{
if
(
res
.
data
&&
res
.
data
.
h5_html_config
)
{
this
.
ActivityInfo
=
res
.
data
;
var
data
=
JSON
.
parse
(
res
.
data
.
h5_html_config
);
var
arr
=
Object
.
entries
(
data
).
filter
(
item
=>
item
[
0
]
!==
'baseConfig'
);
var
mergedObj
=
arr
.
reduce
((
result
,
[
key
,
value
])
=>
Object
.
assign
(
result
,
{
[
key
]:
value
}),
{});
//剔除其他字段转成对象
this
.
list
=
mergedObj
;
// 获取配置
var
activityConfig
=
JSON
.
parse
(
this
.
ActivityInfo
.
h5_html_config
).
baseConfig
;
var
backgroundColor
=
activityConfig
.
page_color
||
''
;
var
backgroundImage
=
activityConfig
.
page_background
;
// 更新数据绑定,以更新样式
this
.
boxStyle
=
{
background
:
backgroundColor
,
backgroundImage
:
`url(
${
backgroundImage
}
)`
,
backgroundSize
:
'contain'
,
backgroundRepeat
:
'no-repeat'
,
backgroundPosition
:
'center 45px'
};
// 设置样式
var
couponExecuted
=
false
;
var
formModuleExecuted
=
false
;
Object
.
values
(
mergedObj
).
forEach
(
obj
=>
{
const
element
=
obj
.
basic_elements
;
if
(
element
===
'coupon'
&&
!
couponExecuted
)
{
var
columnCouponId
=
JSON
.
parse
(
obj
.
columnCouponId
);
this
.
coupon_flag
=
createArray
(
columnCouponId
.
length
,
false
);
couponExecuted
=
true
;
}
else
if
(
element
===
'formModule'
&&
!
formModuleExecuted
)
{
//表单模块
this
.
formModuleData
=
obj
;
this
.
formModule
.
form_data
=
obj
.
form_data
.
map
(
obj
=>
({
...
obj
,
input_value
:
''
}));
}
});
}
else
{
uni
.
showToast
({
title
:
'暂无该活动,请检查活动地址'
,
icon
:
'none'
});
setTimeout
(()
=>
{
window
.
location
.
href
=
'/'
;
},
2000
);
}
}
}
else
{
uni
.
showToast
({
title
:
res
.
msg
,
icon
:
'none'
});
}
});
},
/**
* 领取优惠券
*/
issueChange
(
id
,
index
)
{
this
.
request
(
Api_Url
+
'/api/coupon/issue'
,
'GET'
,
{
id
:
id
},
true
,
true
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
$set
(
this
.
coupon_flag
,
index
,
true
);
uni
.
showToast
({
title
:
res
.
msg
,
icon
:
'success'
});
setTimeout
(()
=>
{
this
.
getData
();
},
2000
)
}
else
{
uni
.
showToast
({
title
:
res
.
msg
,
icon
:
'none'
});
}
});
}
}
};
</
script
>
<
style
scoped
lang=
"scss"
>
@import
'../../assets/css/activity/index.scss'
;
::v-deep
uni-page-body
{
padding-top
:
0
!important
;
}
</
style
>
\ No newline at end of file
unpackage/dist/cache/.vite/deps/_metadata.json
View file @
7e73221c
{
"hash"
:
"
a9213757
"
,
"configHash"
:
"
4d6e96d7
"
,
"hash"
:
"
8f3bac2e
"
,
"configHash"
:
"
f66efb7f
"
,
"lockfileHash"
:
"e3b0c442"
,
"browserHash"
:
"
1f133704
"
,
"browserHash"
:
"
878b3a45
"
,
"optimized"
:
{},
"chunks"
:
{}
}
\ No newline at end of file
util/util.js
View file @
7e73221c
...
...
@@ -13,26 +13,26 @@ export const request = (url = '', type = 'GET', param = {}, Loading, headertype)
// //h5统一携带参数pf
var
params
=
Object
.
assign
(
param
,
{
pf
:
process
.
env
.
UNI_PLATFORM
==
'h5'
?
'h5'
:
'xcx'
pf
:
process
.
env
.
UNI_PLATFORM
==
'h5'
?
'h5'
:
'xcx'
});
// //请求es相关
// if (url.indexOf("so12.ichunt.") != -1 || url.indexOf("/esapi/") != -1 || url.indexOf("/goods/detail") != -1|| url.indexOf("/optimum/goods") != -1|| url.indexOf("/cart/lists") != -1) {
// params = Object.assign(param, { hkyefgyd: 1 });
// }
const
token
=
uni
.
getStorageSync
(
"token"
)
const
token
=
uni
.
getStorageSync
(
"token"
)
//请求类型判断
let
header
=
{
"Content-Type"
:
"application/json; charset=utf-8"
}
if
(
headertype
)
{
header
=
{
'Content-Type'
:
'application/x-www-form-urlencoded'
}
}
if
(
token
)
{
header
.
token
=
token
}
if
(
token
)
{
header
.
token
=
token
}
return
new
Promise
((
resolve
,
reject
)
=>
{
uni
.
request
({
method
:
type
,
...
...
@@ -45,20 +45,20 @@ export const request = (url = '', type = 'GET', param = {}, Loading, headertype)
if
(
Loading
)
uni
.
hideLoading
();
if
(
response
.
statusCode
===
200
)
{
let
result
=
response
.
data
;
if
(
result
.
code
==
101
||
result
.
msg
==
'账号未登录'
)
{
var
pages
=
getCurrentPages
();
// 获取栈实例
let
currentPage
=
pages
[
pages
.
length
-
1
];
// 获取当前页面实例
let
currentPath
=
currentPage
.
route
;
// 获取当前页面路由
let
currentPageFullPath
=
currentPage
[
'$page'
][
'fullPath'
];
// 当前页面路径
console
.
log
(
currentPageFullPath
)
uni
.
reLaunch
({
url
:
`/pages/auth/login?referer=
${
encodeURIComponent
(
currentPageFullPath
)}
`
});
return
}
if
(
result
.
code
==
101
||
result
.
msg
==
'账号未登录'
)
{
var
pages
=
getCurrentPages
();
// 获取栈实例
let
currentPage
=
pages
[
pages
.
length
-
1
];
// 获取当前页面实例
let
currentPath
=
currentPage
.
route
;
// 获取当前页面路由
let
currentPageFullPath
=
currentPage
[
'$page'
][
'fullPath'
];
// 当前页面路径
console
.
log
(
currentPageFullPath
)
uni
.
reLaunch
({
url
:
`/pages/auth/login?referer=
${
encodeURIComponent
(
currentPageFullPath
)}
`
});
return
}
resolve
(
result
);
}
else
{
reject
(
response
);
...
...
@@ -94,6 +94,15 @@ export const getPlatform = () => {
return
platform
;
}
/**
* 来创建指定长度且所有元素都被初始化为 false 的数组
*/
export
const
createArray
=
(
length
,
value
)
=>
{
return
Array
(
length
).
fill
(
value
);
}
/**
* 手机验证码倒计时函数
* @param {Object} options - 配置项
...
...
@@ -136,7 +145,4 @@ export const startCountdown = (options) => {
start
,
stop
,
};
}
}
\ No newline at end of file
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