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
3a4d6591
authored
Sep 23, 2020
by
wjw
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
ww-儿童营地镜像
parent
97433572
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
10 deletions
pages/campsite/home-mirror/home-mirror.js
pages/campsite/home-mirror/home-mirror.wxml
pages/campsite/home-mirror/home-mirror.wxss
pages/campsite/home-mirror/home-mirror.js
View file @
3a4d6591
...
@@ -93,7 +93,7 @@ Page({
...
@@ -93,7 +93,7 @@ Page({
// 获取活动信息
// 获取活动信息
queryActivity
:
function
()
{
queryActivity
:
function
()
{
let
that
=
this
let
that
=
this
let
shopInfo
=
wx
.
getStorage
Info
Sync
(
'shopInfoBuffer'
)
let
shopInfo
=
wx
.
getStorageSync
(
'shopInfoBuffer'
)
App
.
wxRequest
({
App
.
wxRequest
({
url
:
'/api/v1/activity/getList'
,
url
:
'/api/v1/activity/getList'
,
data
:
{
data
:
{
...
...
pages/campsite/home-mirror/home-mirror.wxml
View file @
3a4d6591
...
@@ -77,18 +77,19 @@
...
@@ -77,18 +77,19 @@
</view>
</view>
</view>
</view>
<!-- 全部活动 -->
<view class="activity" bindtap="onAllActivity">
<image src="{{appResourcesBase + 'campsite/title.png'}}"></image>
</view>
<!-- 滚动图片 -->
<!-- 滚动图片 -->
<!-- 单张图片 -->
<!-- 无活动 -->
<view class="swiper" wx:if="{{childActivity.length <= 1}}">
<view class="activity-empty" wx:if="{{childActivity.length === 0}}">
<block>
<image src="{{appResourcesBase + 'campsite/empty.png'}}"></image>
</block>
</view>
<!-- 单活动 -->
<view class="swiper" wx:if="{{childActivity.length === 1}}">
<image mode="scaleToFill" src="{{childActivity[0].childImg}}"></image>
<image mode="scaleToFill" src="{{childActivity[0].childImg}}"></image>
</view>
</view>
<!-- 多
张图片
-->
<!-- 多
活动
-->
<swiper class="swiper" indicator-dots indicator-color="#F6DADA" indicator-active-color="#E57C99" autoplay circular wx:
else
>
<swiper class="swiper" indicator-dots indicator-color="#F6DADA" indicator-active-color="#E57C99" autoplay circular wx:
if="{{childActivity.length > 1}}"
>
<block wx:for="{{childActivity}}" wx:key="id">
<block wx:for="{{childActivity}}" wx:key="id">
<swiper-item>
<swiper-item>
<image mode="scaleToFill" src="{{item.cover}}" bindtap="onActivityDetail" data-id="{{item.id}}"></image>
<image mode="scaleToFill" src="{{item.cover}}" bindtap="onActivityDetail" data-id="{{item.id}}"></image>
...
...
pages/campsite/home-mirror/home-mirror.wxss
View file @
3a4d6591
...
@@ -167,6 +167,15 @@
...
@@ -167,6 +167,15 @@
height: 34rpx;
height: 34rpx;
}
}
.activity-empty {
width: 750rpx;
height: 544rpx;
}
.activity-empty image {
width: 750rpx;
height: 544rpx;
}
.swiper {
.swiper {
width: 750rpx;
width: 750rpx;
height: 1160rpx;
height: 1160rpx;
...
...
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