Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
严立
/
mini-shimao
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
e034c80f
authored
Apr 09, 2021
by
严立
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
首页调整
parent
36d8dfb0
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
62 additions
and
19 deletions
component/home-activity/home-activity.js
component/home-activity/home-activity.wxml
component/home-activity/home-activity.wxss
pages/home/home/home.js
pages/home/home/home.wxml
pages/home/home/home.wxss
component/home-activity/home-activity.js
View file @
e034c80f
...
@@ -13,7 +13,7 @@ Component({
...
@@ -13,7 +13,7 @@ Component({
data
:
{
data
:
{
list
:
[],
list
:
[],
disableOperation
:
''
,
disableOperation
:
false
,
},
},
observers
:
{
observers
:
{
...
@@ -40,7 +40,7 @@ Component({
...
@@ -40,7 +40,7 @@ Component({
break
break
case
1
:
case
1
:
list
.
push
(
nothindItem
)
list
.
unshift
(
nothindItem
)
list
.
push
(
nothindItem
)
list
.
push
(
nothindItem
)
this
.
setData
({
this
.
setData
({
list
:
list
,
list
:
list
,
...
@@ -52,21 +52,21 @@ Component({
...
@@ -52,21 +52,21 @@ Component({
list
.
push
(
nothindItem
)
list
.
push
(
nothindItem
)
this
.
setData
({
this
.
setData
({
list
:
list
,
list
:
list
,
disableOperation
:
''
disableOperation
:
false
})
})
break
break
case
3
:
case
3
:
this
.
setData
({
this
.
setData
({
list
:
list
,
list
:
list
,
disableOperation
:
''
disableOperation
:
false
})
})
break
break
default
:
default
:
this
.
setData
({
this
.
setData
({
list
:
list
,
list
:
list
,
disableOperation
:
''
disableOperation
:
false
})
})
break
break
}
}
...
...
component/home-activity/home-activity.wxml
View file @
e034c80f
<view class="swiper-container column cc ac">
<view class="swiper-container column cc ac">
<block wx:if="{{disableOperation}}">
<view class="swiper-list prohibit-move row ac">
<view class="swiper-item" wx:for="{{list}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view wx:if="{{!item.isNothing}}" class="card row ae" data-item="{{item}}" bindtap="onItem">
<view class="card-content column cc">
<view class="card-cover row cc ac">
<image class="card-cover-image" mode="heightFix" src="{{item.banner}}"></image>
</view>
<view class="card-name row ac">
<text class="fs38 fw700 c01 overflow_point_1">{{item.name}}</text>
</view>
<view class="card-date row ac">
<text class="fs22 fw400 c32">{{item.timeDate + item.timePeriod}}</text>
</view>
</view>
</view>
<view wx:if="{{item.isNothing}}">
<view class="card-content-nothing column cc ac">
<image class="nothing-icon" src="./image/nothing.png"></image>
<text class="nothing-tip">更多活动 敬请期待</text>
</view>
</view>
</view>
</view>
</block>
<block wx:if="{{!disableOperation}}">
<swiper class="swiper-list" circular="{{true}}" current="{{currentIndex}}">
<swiper class="swiper-list" circular="{{true}}" current="{{currentIndex}}">
<swiper-item class="swiper-item" wx:for="{{list}}" wx:for-index="index" wx:for-item="item" wx:key="index" catchtouchmove="{{disableOperation}}
">
<swiper-item class="swiper-item" wx:for="{{list}}" wx:for-index="index" wx:for-item="item" wx:key="index
">
<view wx:if="{{!item.isNothing}}" class="card row ae" data-item="{{item}}" bindtap="onItem">
<view wx:if="{{!item.isNothing}}" class="card row ae" data-item="{{item}}" bindtap="onItem">
<view class="card-content column cc">
<view class="card-content column cc">
<image class="card-cover" mode="heightFix" src="{{item.banner}}"></image>
<image class="card-cover" mode="heightFix" src="{{item.banner}}"></image>
...
@@ -20,4 +47,5 @@
...
@@ -20,4 +47,5 @@
</view>
</view>
</swiper-item>
</swiper-item>
</swiper>
</swiper>
</block>
</view>
</view>
\ No newline at end of file
component/home-activity/home-activity.wxss
View file @
e034c80f
...
@@ -2,17 +2,20 @@
...
@@ -2,17 +2,20 @@
/* 券码弹窗 */
/* 券码弹窗 */
.swiper-container {
.swiper-container {
position: relative;
width: 750rpx;
width: 750rpx;
margin: 30rpx 0 0 0;
margin: 30rpx 0 0 0;
padding: 20rpx 0 0 0;
padding: 20rpx 0 0 0;
}
}
.swiper-list {
.swiper-list {
white-space: nowrap;
width: 750rpx;
width: 750rpx;
height: 570rpx;
height: 570rpx;
}
}
.swiper-item {
.swiper-item {
display: inline-block;
left: 110rpx;
left: 110rpx;
width: 500rpx !important;
width: 500rpx !important;
height: 570rpx !important;
height: 570rpx !important;
...
@@ -31,7 +34,7 @@
...
@@ -31,7 +34,7 @@
padding: 380rpx 50rpx 0 50rpx;
padding: 380rpx 50rpx 0 50rpx;
border-radius: 2px;
border-radius: 2px;
background: #EEF3F9;
background: #EEF3F9;
overflow:
visible
;
overflow:
hidden
;
}
}
.card-cover {
.card-cover {
...
@@ -41,6 +44,13 @@
...
@@ -41,6 +44,13 @@
width: 400rpx;
width: 400rpx;
height: 400rpx;
height: 400rpx;
border-radius: 2px;
border-radius: 2px;
overflow: hidden;
}
.card-cover-image {
width: 400rpx;
height: 400rpx;
border-radius: 2px;
}
}
.card-name {
.card-name {
...
@@ -73,3 +83,15 @@
...
@@ -73,3 +83,15 @@
line-height: 42rpx;
line-height: 42rpx;
font-weight: 600;
font-weight: 600;
}
}
.prohibit-move {
position: relative;
left: -440rpx;
}
.prohibit-move .swiper-item {
position: relative;
top: 0;
left: 0;
margin: 0 16rpx;
}
\ No newline at end of file
pages/home/home/home.js
View file @
e034c80f
...
@@ -9,8 +9,6 @@ Page({
...
@@ -9,8 +9,6 @@ Page({
// 近期活动
// 近期活动
recentActivitiesList
:
[],
recentActivitiesList
:
[],
recentActivitiesListA
:
[],
recentActivitiesListB
:
[],
// 游客攻略
// 游客攻略
touristRouteList
:
[],
touristRouteList
:
[],
...
@@ -178,11 +176,8 @@ Page({
...
@@ -178,11 +176,8 @@ Page({
}
}
funcList
.
push
(
funcItem
)
funcList
.
push
(
funcItem
)
}
}
console
.
log
(
funcList
)
this
.
setData
({
recentActivitiesList
:
JSON
.
parse
(
JSON
.
stringify
(
funcList
))
})
this
.
setData
({
recentActivitiesList
:
JSON
.
parse
(
JSON
.
stringify
(
funcList
))
})
funcList
.
push
(
this
.
data
.
recentActivitiesList
[
0
])
this
.
setData
({
recentActivitiesListA
:
JSON
.
parse
(
JSON
.
stringify
(
funcList
))
})
funcList
.
push
(
this
.
data
.
recentActivitiesList
[
0
])
this
.
setData
({
recentActivitiesListB
:
JSON
.
parse
(
JSON
.
stringify
(
funcList
))
})
}).
catch
((
response
)
=>
{
}).
catch
((
response
)
=>
{
})
})
...
...
pages/home/home/home.wxml
View file @
e034c80f
...
@@ -112,15 +112,10 @@
...
@@ -112,15 +112,10 @@
<text class="fs26 fw400 c31" bindtap="onAllActivity">查看全部</text>
<text class="fs26 fw400 c31" bindtap="onAllActivity">查看全部</text>
</view>
</view>
<view class="recent_activities_list row" bindchange="swiperRecentChange">
<view class="recent_activities_list row" bindchange="swiperRecentChange">
<home-activity contentList="{{[]}}" bind:onItem="onActivityDetail"></home-activity>
<home-activity contentList="{{recentActivitiesList}}" bind:onItem="onActivityDetail"></home-activity>
<!-- <home-activity contentList="{{recentActivitiesList}}" bind:onItem="onActivityDetail"></home-activity> -->
</view>
</view>
</view>
</view>
<home-activity contentList="{{recentActivitiesList}}" bind:onItem="onActivityDetail"></home-activity>
<home-activity contentList="{{recentActivitiesListA}}" bind:onItem="onActivityDetail"></home-activity>
<home-activity contentList="{{recentActivitiesListB}}" bind:onItem="onActivityDetail"></home-activity>
<!-- 游客攻略 -->
<!-- 游客攻略 -->
<view class="route">
<view class="route">
<block wx:if="{{touristRouteList.length > 0}}">
<block wx:if="{{touristRouteList.length > 0}}">
...
...
pages/home/home/home.wxss
View file @
e034c80f
...
@@ -396,6 +396,7 @@
...
@@ -396,6 +396,7 @@
.recent_activities_list {
.recent_activities_list {
width: 750rpx;
width: 750rpx;
overflow: hidden;
}
}
/* 游客攻略 */
/* 游客攻略 */
...
...
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