feat:登录页面调整
This commit is contained in:
parent
915452ef49
commit
086bd44944
4
app.js
4
app.js
|
|
@ -50,8 +50,8 @@ App({
|
|||
globalData: {
|
||||
versionCode: 'V1',
|
||||
userInfo: {},
|
||||
// headerUrl: "http://42.193.40.239:8017/"
|
||||
headerUrl: "http://192.168.110.186:8017/"
|
||||
headerUrl: "http://42.193.40.239:8017/"
|
||||
// headerUrl: "http://192.168.110.186:8017/"
|
||||
},
|
||||
|
||||
// 文件服务器地址
|
||||
|
|
|
|||
|
|
@ -158,6 +158,16 @@ Page({
|
|||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 通知详情
|
||||
*/
|
||||
toMsgDetail: function (params) {
|
||||
const item = params.currentTarget.dataset.item;
|
||||
wx.navigateTo({
|
||||
url: `/pages/web/index?id=${item.govNoticeId}`,
|
||||
})
|
||||
},
|
||||
|
||||
onLoad(option) {
|
||||
this.data.userInfo = app.globalData.userInfo;
|
||||
this.getBanner();
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
<!-- 消息 -->
|
||||
<swiper class="item-bg swiper-msg" autoplay indicator-dots indicator-active-color='#ffffff'>
|
||||
<swiper-item class="item" wx:for="{{notice}}" wx:key="{{item}}">
|
||||
<image class="img" src="{{baseImgUrl+item.coverImg}}" mode="widthFix"></image>
|
||||
<image catchtap="toMsgDetail" data-item="{{item}}" class="img" src="{{baseImgUrl+item.coverImg}}" mode="widthFix"></image>
|
||||
<text class="title ellipsis">{{item.title}}</text>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,16 @@ Page({
|
|||
*/
|
||||
data: {
|
||||
username: 'admin',
|
||||
password: 'Daofu123456'
|
||||
password: 'Daofu123456',
|
||||
showLogin: true,
|
||||
},
|
||||
|
||||
/**
|
||||
* 切换登录/注册
|
||||
*/
|
||||
changeWay: function (e) {
|
||||
this.data.showLogin = e.currentTarget.dataset.type;
|
||||
this.setData(this.data)
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,8 +1,13 @@
|
|||
<!--pages/login/index.wxml-->
|
||||
<image class="bg-img" src="/images/bg.png" mode="aspectFill" />
|
||||
<view class="top">
|
||||
<text class="nh">您好!</text>
|
||||
<text class="des">欢迎来到鲜水镇“智慧鲜水”数字化平台</text>
|
||||
</view>
|
||||
<view class="v-div v-center form">
|
||||
<view class="item v-div v-center">
|
||||
<text class="title">“智慧鲜水”数字化平台</text>
|
||||
<!-- 登录 -->
|
||||
<view wx:if="{{showLogin}}" class="item v-div v-center">
|
||||
<text class="title">手机号登录</text>
|
||||
<view class="h-div v-center in-bg">
|
||||
<image src="/images/user_icon.png"></image>
|
||||
<input type="text" value="{{username}}" placeholder="请输入用户名" bindinput="inputMethed" data-type="username" />
|
||||
|
|
@ -13,8 +18,34 @@
|
|||
</view>
|
||||
|
||||
<view catchtap="login" class="btn" data-type="{{1}}">登录</view>
|
||||
<text class="tag">或</text>
|
||||
<view catchtap="login" class="wx-login" data-type="{{2}}">微信登录</view>
|
||||
<view class="h-div v-center bot">
|
||||
<text class="tag" catchtap="changeWay" data-type="{{false}}">还没有账号?立即注册</text>
|
||||
<view class="forget-pwd">忘记密码</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 注册 -->
|
||||
<view wx:else class="item v-div v-center">
|
||||
<text class="title">注册</text>
|
||||
<view class="h-div v-center in-bg">
|
||||
<text class="lab">姓名</text>
|
||||
<input type="text" value="{{form.name}}" placeholder="请输入姓名" bindinput="inputMethed" data-type="name" />
|
||||
</view>
|
||||
<view class="h-div v-center in-bg">
|
||||
<text class="lab">手机号码</text>
|
||||
<input type="text" value="{{form.phone}}" placeholder="请输入手机号码" bindinput="inputMethed" data-type="phone" />
|
||||
</view>
|
||||
<view class="h-div v-center in-bg">
|
||||
<text class="lab">登录密码</text>
|
||||
<input type="text" value="{{form.password}}" placeholder="请输入登录密码" bindinput="inputMethed" data-type="password" />
|
||||
</view>
|
||||
<view class="h-div v-center in-bg">
|
||||
<text class="lab">所属社区</text>
|
||||
</view>
|
||||
|
||||
<view catchtap="login" class="btn" data-type="{{1}}">立即注册</view>
|
||||
<view class="h-div v-center" style="margin-top: 30rpx;">
|
||||
<text class="tag" catchtap="changeWay" data-type="{{true}}">已有账号?立即登录</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,27 @@ page {
|
|||
height: 100vh;
|
||||
position: absolute;
|
||||
z-index: -1;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.top {
|
||||
margin: 190rpx 75rpx 0 75rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.top .nh {
|
||||
font-size: 70rpx;
|
||||
color: #FFFFFF;
|
||||
text-shadow: 0px 3px 6px #1054B7;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.top .des {
|
||||
font-size: 32rpx;
|
||||
color: #FFFFFF;
|
||||
text-shadow: 0px 3px 6px #1054B7;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.form {
|
||||
|
|
@ -16,23 +37,27 @@ page {
|
|||
justify-content: center;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.item {
|
||||
margin: 0 5%;
|
||||
width: 90%;
|
||||
padding: 30rpx 16rpx;
|
||||
background: rgba(255, 255, 255, 0.7);
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0px 0px 12rpx 1rpx #b6c7e4;
|
||||
border-radius: 20rpx;
|
||||
margin-top: 30rpx;
|
||||
margin-top: 100rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.item .title {
|
||||
font-size: 38rpx;
|
||||
color: #222222;
|
||||
font-weight: bold;
|
||||
margin-bottom: 50rpx;
|
||||
margin: 40rpx 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -56,6 +81,13 @@ page {
|
|||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.item .in-bg .lab {
|
||||
margin-left: 20rpx;
|
||||
width: 230rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
|
@ -72,15 +104,21 @@ page {
|
|||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.tag {
|
||||
font-size: 28rpx;
|
||||
.bot {
|
||||
width: 90%;
|
||||
margin: 30rpx 60rpx;
|
||||
}
|
||||
|
||||
.bot .tag {
|
||||
flex: 1;
|
||||
font-size: 30rpx;
|
||||
color: #666666;
|
||||
margin: 10rpx 0;
|
||||
}
|
||||
|
||||
.wx-login {
|
||||
.bot .forget-pwd {
|
||||
font-size: 30rpx;
|
||||
color: #666666;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.pop .btn {
|
||||
|
|
|
|||
|
|
@ -12,11 +12,26 @@ Page({
|
|||
title: ''
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取消息详情
|
||||
*/
|
||||
getDetail: function (id) {
|
||||
app.axios("GET", "app", `/notice/noticeDetail/${id}`, {}, false).then(res => {
|
||||
if (res.code == 1) {
|
||||
this.data.content = res.data.content;
|
||||
this.setData(this.data)
|
||||
wx.setNavigationBarTitle({
|
||||
title: res.data.title,
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
const title = options.title;
|
||||
const title = options.title || '';
|
||||
this.data.title = title;
|
||||
this.setData(this.data)
|
||||
wx.setNavigationBarTitle({
|
||||
|
|
@ -27,6 +42,8 @@ Page({
|
|||
this.data.url = url;
|
||||
this.setData(this.data)
|
||||
})
|
||||
|
||||
this.getDetail(options.id)
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
<!--pages/web/index.wxml-->
|
||||
<web-view wx:if="{{url}}" src="{{url}}" />
|
||||
<rich-text wx:else />
|
||||
<scroll-view wx:else class="sc">
|
||||
<rich-text nodes="{{content}}" />
|
||||
</scroll-view>
|
||||
|
|
@ -1,4 +1,10 @@
|
|||
/* pages/web/index.wxss */
|
||||
.web {
|
||||
width: 100vw;
|
||||
}
|
||||
|
||||
.sc {
|
||||
background-color: white;
|
||||
height: 100vh;
|
||||
padding: 30rpx 20rpx;
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user