微信小程序 首页制作简单实例
实现效果图:
首先从大的方面来讲,就是设置了window的属性
"navigationBarBackgroundColor": "#AFE2E6",//bar背景颜色"navigationBarTextStyle": "white",//bar字体颜色"backgroundColor": "white",//背景颜色"enablePullDownRefresh": "true"//下拉是否刷新
tabBar属性
完整代码如下(wxml)
<view><navigator url='/pages/14/1'><view class="waylist"><view class="im im1">1</view><view class="way">广从1号线</view><view class="ste">市汽车客运站-从化汽车站</view><image src="/assets/images/subway.jpg" style="width:30px; height:30px;" /></view></navigator><navigator url='/pages/14/2'><view class="waylist"><view class="im im2">2</view><view class="way">广从2号线</view><view class="ste">芳村汽车客运站-从化汽车站</view><image src="/assets/images/subway.jpg" style="width:30px; height:30px;" /></view></navigator><navigator url='/pages/14/3'><view class="waylist"><view class="im im3">3</view><view class="way">广从3号线</view><view class="ste">罗冲围汽车客运站-从化汽车站</view><image src="/assets/images/subway.jpg" style="width:30px; height:30px;" class="hidden" /><view class="jian">></view></view></navigator><navigator url='/pages/14/4'><view class="waylist"><view class="im im4">4</view><view class="way">广从4快号线</view><view class="ste">天河客运站 -从化汽车站</view><image src="/assets/images/subway.jpg" style="width:30px; height:30px;" /></view></navigator><navigator url='/pages/14/5'><view class="waylist"><view class="im im4">4</view><view class="way">广从4线</view><view class="ste">天河客运站 -从化汽车站</view><image src="/assets/images/subway.jpg" style="width:30px; height:30px;" /></view></navigator><navigator url='/pages/14/6'><view class="waylist"><view class="im im5">5</view><view class="way">广从5号线</view><view class="ste">东站汽车客运站-从化汽车站</view><image src="/assets/images/subway.jpg" style="width:30px; height:30px;" /></view></navigator><navigator url='/pages/14/7'><view class="waylist"><view class="im im6">6</view><view class="way">广从6号线</view><view class="ste">东圃客运站-从化汽车站</view><image src="/assets/images/subway.jpg" style="width:30px; height:30px;" class="hidden" /><view class="jian">></view></view></navigator><navigator url='/pages/14/8'><view class="waylist"><view class="im im7">7</view><view class="way">广从7号线</view><view class="ste">黄埔客运站-从化汽车站</view><image src="/assets/images/subway.jpg" style="width:30px; height:30px;" class="hidden" /><view class="jian">></view></view></navigator><navigator url='/pages/14/9'><view class="waylist"><view class="im im8">8</view><view class="way">广从8号线</view><view class="ste">广园汽车客运站-从化汽车站</view><image src="/assets/images/subway.jpg" style="width:30px; height:30px;" class="hidden" /><view class="jian">></view></view></navigator><navigator url='/pages/14/10'><view class="waylist"><view class="im im8">8</view><view class="way">广从8快线</view><view class="ste">广园汽车客运站-从化汽车站</view><image src="/assets/images/subway.jpg" style="width:30px; height:30px;" class="hidden" /><view class="jian">></view></view></navigator><navigator url='/pages/14/11'><view class="waylist"><view class="im im9">9</view><view class="way">广从9号线</view><view class="ste">