123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- <!-- pages/user/user.wxml -->
- <block wx:if="{{!login}}">
- <!-- logo -->
- <view class="hmly-logo">
- <image class="hmly-logo-img" src="/image/logo.png" mode="widthFix"></image>
- </view>
- <!-- 登录按钮 -->
- <view class="hmly-login-button">
- <!-- 在本小程序中只实现了微信登录 -->
- <view class="hmly-wechat-login">
- <button open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">
- <text class="icon-message"></text> 微信登录
- </button>
- </view>
- <view class="hmly-phone-login" bindtap="phoneLogin">
- <button>手机号登录</button>
- </view>
- </view>
- </block>
- <!-- 已经登录显示界面 -->
- <block wx:else>
- <view class="hmly-body" style="height:{{phoneHeight}}px">
- <!-- 头像昵称签到部分 -->
- <view class="hmly-top-bar">
- <!-- 头像昵称 -->
- <view class="hmly-user-img">
- <view class="hmly-avatar-nickname">
- <view class="hmly-avatar">
- <image class="hmly-avatar-img" src="{{avatarUrl}}"></image>
- </view>
- <view class="hmly-nickname">
- <text class="#">{{nickName}}</text>
- <!-- vip勋章 -->
- <text class="icon-vip" style="margin-left:30rpx"></text>
- </view>
- </view>
- <view class="hmly-kefu"><text class="icon-service"></text>客服服务</view>
- </view>
- <!-- 签到 -->
- <view class="hmly-qian-dao">
- <!-- 签到涉及canvas所以暂时搁置 -->
- <view class="hmly-qian-text">
- <text class="icon-dateTable text-gray"></text>
- <text style="margin-left:20rpx">签到</text>
- </view>
- <view class="hmly-icon_">
- <text class="icon-right text-gray"></text>
- </view>
- </view>
- </view>
- <!-- 选项卡部分 -->
- <view class="hmly-chioce">
- <!-- 选项卡item -->
- <view class="hmly-choice-item" bindtap="openSwitch">
- <view class="">
- <text class="icon-time text-gray"></text>
- <text style="margin-left:20rpx">定时关闭</text>
- </view>
- <text class="icon-right text-gray"></text>
- </view>
- <view class="hmly-choice-item">
- <!--
-
- 因为切换为夜间模式需要使用自定义的tarbar,
- 而这个小程序是一个初级学习项目,所以此功能暂时搁置
-
- -->
- <view class="">
- <text class="icon-tip text-gray"></text>
- <text style="margin-left:20rpx">夜间模式</text>
- </view>
- <switch></switch>
- </view>
- <view class="hmly-choice-item">
- <!-- 意见反馈需要使用button的open-type属性 此处没有设置-->
- <view class="">
- <text class="icon-write text-gray"></text>
- <text style="margin-left:20rpx">意见反馈</text>
- </view>
- <text class="icon-right text-gray"></text>
- </view>
- <view class="hmly-choice-item" bindtap="gotoLogin">
- <view class="">
- <text class="icon-changeCount text-gray"></text>
- <text style="margin-left:20rpx">切换账号</text>
- </view>
- <text class="icon-right text-gray"></text>
- </view>
- </view>
- </view>
- </block>
- <!-- 定时关闭部分 -->
- <block wx:if="{{show}}">
- <view class="hmly-switch">
- <scroll-view class="hmly-scroll-wrapper" scroll-y scroll-with-animation="true" catchtouchmove="preventTouchMove">
- <view class="hmly-switch-item" wx:for="{{timeout}}" wx:key="{{index}}" bindtap="chooseTimeOut" data-activeIndex="{{index}}">
- <view>{{item.text}}</view>
- <view class="hmly-active" wx:if="{{index == activeIndex}}"></view>
- </view>
- </scroll-view>
- <view class="hmly-close" bindtap="close">关闭</view>
- </view>
- <view class="hmly-cover"></view>
- </block>
|