仿中国婚博会微信小程序
app.json
{
"pages": [
"pages/index/index",
"pages/cash/cash",
"pages/marry/marry",
"pages/community/community",
"pages/me/me",
"pages/type/type"
],
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#D73E3E",
"navigationBarTitleText": "中国婚博会",
"navigationBarTextStyle": "white"
},
"tabBar": {
"selectedColor": "#D73E3E",
"backgroundColor": "#F3F1EF",
"borderStyle": "white",
"list": [
{
"pagePath": "pages/index/index",
"text": "首页",
"iconPath": "images/bar/index-0.jpg",
"selectedIconPath": "images/bar/index-1.jpg"
},
{
"pagePath": "pages/cash/cash",
"text": "现金券",
"iconPath": "images/bar/cash-0.jpg",
"selectedIconPath": "images/bar/cash-1.jpg"
},
{
"pagePath": "pages/marry/marry",
"text": "婚博会", "iconPath": "images/bar/marry-0.jpg",
"selectedIconPath": "images/bar/marry-1.jpg"
},
{
"pagePath": "pages/community/community",
"text": "社区",
"iconPath": "images/bar/community-0.jpg",
"selectedIconPath": "images/bar/community-1.jpg"
},
{
"pagePath": "pages/me/me",
"text": "我的",
"iconPath": "images/bar/me-0.jpg",
"selectedIconPath": "images/bar/me-1.jpg"
}
]
},
"sitemapLocation": "sitemap.json"
}
app.wxss 文件代码:
.container {
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
padding: 200rpx 0;
box-sizing: border-box;
}
index.wxml 文件代码如下:
<view class="haibao">
<swiper indicator-
dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="
{{duration}}">
<block wx:for="{{imgUrls}}">
<swiper-item> <image src="{{item}}" class="silde-
image" style="width:100%;height:176px;"></image>
</swiper-item>
</block>
</swiper>
</view>
<view class="nav">
<block wx:for="{{navs}}">
<view class="item" bindtap="navBtn" id="{{index}}">
<view>
<image src="{{item.img}}" style="width:58px;height:56px;"></image>
</view>
<view>
{{item.name}}
</view>
</view>
</block>
</view>
<view class="hr"></view>
剩余代码图片资源链接https://download.csdn.net/download/weixin_43474701/13769718