electricity_bill_calc_wx/pages/home/index.wxml
2024-07-17 17:05:58 +08:00

53 lines
1.8 KiB
Plaintext

<!--pages/home/index.wxml-->
<page-meta page-style="{{ show ? 'overflow: hidden;' : '' }}" />
<view>
<view class="top">
<custom-status-bar transparent="{{true}}" />
<view class="chooseParkWrapper">
用电管理服务 ·
<view class="parkContent" bind:tap="choosePark" wx:if="{{park.id}}">
<view class="park">
{{park.name}}
</view>
<van-icon name="arrow-down" style="margin-left: 16rpx;" />
</view>
</view>
</view>
<custom-status-bar />
<view class="chooseParkWrapper">
</view>
<view class="login" wx:if="{{!user || !user.id}}" class="notLoginWrapper">
<van-image width="100rpx" height="100rpx" src="/assets/images/defaultAvatar.png" class="defaultAvatar"/>
<van-button type="primary" size="small" plain="{{true}}" class="loginBtn" bind:tap="jumpToLogin">请登录</van-button>
</view>
<view class="logined" wx:else>
<avatar text="{{ user.nickName }}" />
<view>
<view class="company" bind:tap="chooseTenement">
<view class="companyName"> {{tenement.name}} </view>
<van-icon name="arrow-down" style="margin-left: 16rpx;" />
</view>
<view class="welcome"> 欢迎使用华昌宝能用电管理系统! </view>
</view>
</view>
<swiper indicator-dots="{{true}}" autoplay="{{true}}" interval="{{8000}}" duration="{{300}}">
<block wx:for="{{background}}" wx:key="*this">
<swiper-item>
<view class="swiper-item {{item}}">
{{item}}
</view>
</swiper-item>
</block>
</swiper>
<van-grid column-num="2" direction="horizontal">
<van-grid-item icon="balance-list-o" text="充值" bind:tap="jumpToRecharge" />
<van-grid-item icon="shop-o" text="商城" bind:tap="jumpToShop" />
</van-grid>
</view>
<picker show="{{show}}" valueKey="name" columns="{{columns}}" bind:ok="onOk" bind:cancel="onCancel" type="{{pickerType}}" />