Commit 9b6ff7ee by zhangquan

dev:登录页开发

1 parent 96f68995
{ {
"pages": ["pages/tab/index/index", "pages/tab/discovery/discovery", "pages/tab/mine/mine", "pages/webView/webView"], "pages": [
"requiredPrivateInfos": ["getLocation"], "pages/tab/index/index",
"pages/tab/discovery/discovery",
"pages/tab/mine/mine",
"pages/webView/webView",
"pages/login/login/login",
"pages/login/register/register"
],
"requiredPrivateInfos": [
"getLocation"
],
"lazyCodeLoading": "requiredComponents", "lazyCodeLoading": "requiredComponents",
"window": { "window": {
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
...@@ -12,7 +21,8 @@ ...@@ -12,7 +21,8 @@
"selectedColor": "#5C72F6", "selectedColor": "#5C72F6",
"backgroundColor": "#FFFFFF", "backgroundColor": "#FFFFFF",
"borderStyle": "white", "borderStyle": "white",
"list": [{ "list": [
{
"pagePath": "pages/tab/index/index", "pagePath": "pages/tab/index/index",
"text": "活动", "text": "活动",
"iconPath": "images/icon_activity.png", "iconPath": "images/icon_activity.png",
...@@ -34,7 +44,8 @@ ...@@ -34,7 +44,8 @@
}, },
"subpackages": [], "subpackages": [],
"usingComponents": { "usingComponents": {
"navigation-bar": "/components/NavigationBar/NavigationBar" "navigation-bar": "/components/NavigationBar/NavigationBar",
"popup": "/components/Popup/Popup"
}, },
"style": "v2", "style": "v2",
"resolveAlias": { "resolveAlias": {
......
// tabWorkOrder/pages/createOrder/createOrderComponents/Popup/Popup.js // tabWorkOrder/pages/createOrder/createOrderComponents/Popup/Popup.js
import {
componentsMixin
} from '../../mixins/index'
Component({ Component({
behaviors: [componentsMixin],
/** /**
* 组件的属性列表 * 组件的属性列表
*/ */
externalClasses:['cust-title'],
properties: { properties: {
show: { show: {
type: Boolean, type: Boolean,
...@@ -34,6 +31,8 @@ Component({ ...@@ -34,6 +31,8 @@ Component({
} }
}, },
title: String, title: String,
confirmText: String,
cancelText: String,
height: { height: {
type: String, type: String,
value: '85%' value: '85%'
......
...@@ -2,17 +2,17 @@ ...@@ -2,17 +2,17 @@
<view class="popup-bg" bindtap="hidePopup"></view> <view class="popup-bg" bindtap="hidePopup"></view>
<view class="popup-content {{close?'close':''}}" style="height:{{height}}"> <view class="popup-content {{close?'close':''}}" style="height:{{height}}">
<block wx:if="{{title}}"> <block wx:if="{{title}}">
<view class="popup-title text-center">{{title}}</view> <view class="popup-title cust-title">{{title}}</view>
</block> </block>
<view class="popup-slot {{isTab && !hideTab? '': title?'isFullSucreen':'isFullSucreen-notitle'}}"> <view class="popup-slot {{isTab && !hideTab? '': title?'isFullSucreen':'isFullSucreen-notitle'}}">
<slot></slot> <slot></slot>
</view> </view>
<view class="popup-footer {{isTab && !hideTab?'':'isFullSucreen'}}" wx:if="{{only}}"> <view class="popup-footer {{isTab && !hideTab?'':'isFullSucreen'}}" wx:if="{{only}}">
<view class="cancel btn text-center" bindtap="hidePopup">取消</view> <view class="cancel btn text-center" bindtap="hidePopup">{{cancelText || '取消' }}</view>
<view class="confirm btn text-center" bindtap="confirm">确认</view> <view class="confirm btn text-center" bindtap="confirm">{{confirmText || '确认' }}</view>
</view> </view>
<view class="popup-footer {{isTab && !hideTabb?'':'isFullSucreen'}}" wx:else> <view class="popup-footer {{isTab && !hideTabb?'':'isFullSucreen'}}" wx:else>
<view class="confirm doubtn text-center" bindtap="confirm">确认</view> <view class="confirm doubtn text-center" bindtap="confirm">{{cancelText || '取消' }}</view>
</view> </view>
</view> </view>
</view> </view>
\ No newline at end of file \ No newline at end of file
...@@ -39,9 +39,14 @@ ...@@ -39,9 +39,14 @@
.popup-title { .popup-title {
height: 98rpx; height: 98rpx;
font-size: 32rpx; font-size: 40rpx;
color: #333333; color: #333333;
border-bottom: 2rpx solid #EBEDF0; border-bottom: 2rpx solid #EBEDF0;
display: flex;
font-weight: 500;
align-items: center;
justify-content: start;
padding: 0 50rpx;
} }
.popup-slot { .popup-slot {
...@@ -60,10 +65,11 @@ ...@@ -60,10 +65,11 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
padding: 10rpx 32rpx; padding: 10rpx 50rpx;
position: relative; position: relative;
background-color: #fff; background-color: #fff;
z-index: 2; z-index: 2;
font-size: 32rpx;
} }
.popup-footer.isFullSucreen { .popup-footer.isFullSucreen {
...@@ -72,10 +78,10 @@ ...@@ -72,10 +78,10 @@
} }
.popup-footer .btn { .popup-footer .btn {
width: 330rpx; width: 316rpx;
height: 80rpx; height: 80rpx;
box-sizing: border-box; box-sizing: border-box;
border-radius: 12rpx; border-radius: 20rpx;
font-size: 28rpx; font-size: 28rpx;
} }
...@@ -89,11 +95,11 @@ ...@@ -89,11 +95,11 @@
.popup-footer .cancel { .popup-footer .cancel {
color: #323233; color: #323233;
border: 2rpx solid #DCDEE0; border: 2rpx solid #DCDFE6;
} }
.popup-footer .confirm { .popup-footer .confirm {
background: var(--btnColor); background-image: linear-gradient(-60deg, #556AF5 0%, #7197FF 100%);
color: #fff; color: #fff;
} }
......
<!--pages/login.wxml-->
<view>
<text>您好</text>
<text>欢迎登录门店助手</text>
<image></image>
</view>
.container{
height: 100vh;
background-color: #fff;
.salutation-wrap{
padding: 112rpx 96rpx 0;
.salutation{
height: 88rpx;
line-height: 88rpx;
font-weight: 600;
font-size: 60rpx;
color: #333333;
line-height: 88rpx;
}
.welcome{
margin-top: 8rpx;
height: 64rpx;
line-height: 64rpx;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 48rpx;
color: #333333;
line-height: 64rpx;
}
}
.footer{
top: 544rpx;
width: 100%;
position: fixed;
background-size: 100% 100%;
bottom: 0;
.login-wrap{
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
flex-wrap: nowrap;
margin-top: 528rpx;
.login-btn{
width: 590rpx;
height: 88rpx;
line-height: 88rpx;
border-radius: 16rpx;
font-weight: 500;
font-size: 32rpx;
letter-spacing: 0;
text-align: center;
}
.wx-btn{
background-image: linear-gradient(-60deg, #556AF5 0%, #7197FF 100%);
color: #FFFFFF;
}
.phone-btn{
margin-top: 40rpx;
background: #F9F9F9;
color: #1B233D;
}
}
}
}
\ No newline at end of file \ No newline at end of file
// pages/login.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
inputBindFocus(e){
console.log(e.detail.height,2222,888)
},
login(){
console.log(111)
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
@import '../login.scss';
.popup-content{
height: 100%;
padding: 0 50rpx;
display: flex;
align-items: center;
font-weight: 400;
font-size: 32rpx;
color: #333333;
}
.login-input-wrap{
margin-top: 486rpx !important;
.phone, .code{
background-color: #fff;
display: flex;
align-items: center;
padding: 24rpx 45rpx;
box-sizing: border-box;
text-align: left!important;
}
.phone{
margin-bottom: 24rpx;
}
.code{
margin-bottom: 50rpx;
}
.code-btn{
width: 180rpx;
height: 52rpx;
line-height: 52rpx;
text-align: center;
opacity: 0.2;
background: #F1F1F1;
border-radius: 28rpx;
font-size: 24rpx;
color: #707070;
}
.placeholderClass,.placeholder{
color: #BCBCBC;
}
}
<!--pages/login.wxml-->
<view class="container">
<view class="salutation-wrap">
<view class="salutation">您好</view>
<view class="welcome">欢迎登录门店助手</view>
</view>
<view class="footer" style="background-image: url('{{IMGURL}}register.png');">
<!-- <view class="login-wrap">
<view class="wx-btn login-btn">微信授权登录</view>
<view class="phone-btn login-btn">手机号码登录</view>
</view> -->
<view class="login-wrap login-input-wrap">
<view class="login-btn phone">
<input adjust-position="{{false}}" bindfocus="inputBindFocus" placeholder-class="placeholderClass" placeholder="请输入手机号码"/>
</view>
<view class="login-btn code">
<input placeholder-class="placeholder" placeholder="请输入验证码"/>
<view class="code-btn">获取验证码</view>
</view>
<view class="login-btn wx-btn" bindtap="login">登录</view>
</view>
</view>
<popup show="{{false}}" confirmText="联系客服" title="提示" height="560rpx">
<view class="popup-content">当前登录手机号未认证,请联系客服处理</view>
</popup>
</view>
// pages/login/register/register.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
@import '../login.scss';
<!--pages/login/register/register.wxml-->
<view class="container">
<view class="salutation-wrap">
<view class="salutation">您好</view>
<view class="welcome">欢迎登录门店助手</view>
</view>
<view class="footer" style="background-image: url('{{IMGURL}}register.png');">
<view class="login-wrap">
<view class="wx-btn login-btn">微信授权一键注册</view>
<view class="phone-btn login-btn">已有账号,返回登录</view>
</view>
</view>
</view>
// 特色产品 // 特色产品
.prod-wrap .big-title{ .prod-wrap .big-title{
margin-left: 40rpx; margin-left: 40rpx;
font-family: PingFangSC-S0pxibold;
font-weight: 600; font-weight: 600;
font-size: 36rpx; font-size: 36rpx;
color: #1B233D; color: #1B233D;
...@@ -23,7 +22,6 @@ ...@@ -23,7 +22,6 @@
font-size: 24rpx; font-size: 24rpx;
letter-spacing: 0; letter-spacing: 0;
text-align: center; text-align: center;
font-family: PingFangSC-Regular;
line-height: 64rpx; line-height: 64rpx;
margin-right: 12rpx; margin-right: 12rpx;
background: #FFFFFF; background: #FFFFFF;
...@@ -69,7 +67,6 @@ ...@@ -69,7 +67,6 @@
line-height: 40rpx; line-height: 40rpx;
background: #D7F5EB; background: #D7F5EB;
border-radius: 4rpx; border-radius: 4rpx;
font-family: PingFangSC-Medium;
font-weight: 600; font-weight: 600;
font-size: 24rpx; font-size: 24rpx;
color: #24B38C; color: #24B38C;
...@@ -90,7 +87,6 @@ ...@@ -90,7 +87,6 @@
line-height: 40rpx; line-height: 40rpx;
} }
.prod-info .title{ .prod-info .title{
font-family: PingFangSC-Medium;
font-weight: 600; font-weight: 600;
font-size: 28rpx; font-size: 28rpx;
color: #323436; color: #323436;
......
...@@ -62,6 +62,20 @@ ...@@ -62,6 +62,20 @@
"query": "", "query": "",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null
},
{
"name": "",
"pathName": "pages/login/login/login",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "pages/login/register/register",
"query": "",
"launchMode": "default",
"scene": null
} }
] ]
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!