Commit efa6efd0 by 李伟康

提交代码

1 parent 8f775219
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
z-index: 2; z-index: 2;
background-color: #fff; background-color: #fff;
} }
.flex-center { .flex-center {
display: flex; display: flex;
align-items: center; align-items: center;
......
// login/index/components/LoginBox.js
Component({
/**
* 组件的属性列表
*/
properties: {
loginType: Number
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* login/index/components/LoginBox.wxss */
.box {
height: 800rpx;
.img {
width: 472rpx;
height: 458rpx;
position: absolute;
left: 151rpx;
top: 264rpx;
}
}
\ No newline at end of file \ No newline at end of file
<view class="box">
<block wx:if="{{loginType == 0}}">
<image webp class="img" src="https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/login/login.png" />
</block>
<block wx:else>
</block>
</view>
\ No newline at end of file \ No newline at end of file
// login/index/components/Protocol/Protocol.js
Component({
options: {
styleIsolation: 'shared'
},
/**
* 组件的属性列表
*/
properties: {
agree:Boolean
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
agreeProtocol() {
const thisPage = wx.$router.getPageInstance(),
{agree} = thisPage.data
thisPage.setData({
agree: !agree
})
thisPage.checkLoginBtn()
},
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* login/index/components/Protocol/Protocol.wxss */
.protocol {
margin-top: 274rpx;
text {
color: #5092FF;
}
.icon {
border: 2rpx solid #8A8C90;
border-radius: 100%;
width: 24rpx;
height: 24rpx;
box-sizing: border-box;
margin-right: 8rpx;
image {
display: none;
}
}
.icon.true {
border: none;
image {
display: block;
}
}
}
\ No newline at end of file \ No newline at end of file
<view class="protocol text-center">
<view class="icon {{agree}}" bindtap="agreeProtocol">
<image src="https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/login/radio.png"></image>
</view>
我已阅读并同意<text>《隐私权政策》</text>
</view>
\ No newline at end of file \ No newline at end of file
// login/index/components/TypeList.js
Component({
/**
* 组件的属性列表
*/
properties: {
loginType: Number
},
/**
* 组件的初始数据
*/
data: {
loginList: ['微信登录', '手机号', '账号密码'],
},
/**
* 组件的方法列表
*/
methods: {
changLoginType(e) {
const thisPage = wx.$router.getPageInstance(),
loginType = e.currentTarget.dataset.index
thisPage.setData({
loginType
})
thisPage.checkLoginBtn()
},
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* login/index/components/TypeList.wxss */
.tips {
padding-top: 120rpx;
text-align: center;
margin-bottom: 40rpx;
}
.login-list {
display: flex;
align-items: center;
justify-content: center;
gap: 0 118rpx;
.item {
display: flex;
align-items: center;
flex-direction: column;
width: 100rpx;
animation: opacity-view .25s forwards;
.icon {
width: 68rpx;
height: 68rpx;
margin-bottom: 12rpx;
}
}
}
\ No newline at end of file \ No newline at end of file
<view class="tips">其他方式</view>
<view class="login-list">
<block wx:for="{{loginList}}" wx:key="index">
<block wx:if="{{loginType != index}}">
<view class="item" bindtap="changLoginType" data-index="{{index}}">
<image class="icon" src="https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/login/icon-{{index}}.png"></image>
{{item}}
</view>
</block>
</block>
</view>
\ No newline at end of file \ No newline at end of file
...@@ -6,7 +6,8 @@ Page({ ...@@ -6,7 +6,8 @@ Page({
*/ */
data: { data: {
navStyle: 'background-color: rgba(0,0,0,0);', navStyle: 'background-color: rgba(0,0,0,0);',
loginType: 1 loginType: 0,
agree: true
}, },
/** /**
...@@ -68,5 +69,14 @@ Page({ ...@@ -68,5 +69,14 @@ Page({
*/ */
onShareAppMessage() { onShareAppMessage() {
},
checkLoginBtn() {
const {
agree,
loginType
} = this.data
this.setData({
disabled: !agree
})
} }
}) })
\ No newline at end of file \ No newline at end of file
{ {
"usingComponents": { "usingComponents": {
"navigation-bar":"/components/NavigationBar/NavigationBar" "navigation-bar": "/components/NavigationBar/NavigationBar",
"box": "./components/Box/Box",
"type-list": "./components/TypeList/TypeList",
"protocol": "./components/Protocol/Protocol"
}, },
"navigationStyle": "custom" "navigationStyle": "custom"
} }
\ No newline at end of file \ No newline at end of file
@keyframes opacity-view {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
.layout { .layout {
position: relative; position: relative;
padding: 0 32rpx; padding: 0 32rpx;
font-size: 24rpx;
color: #8A8C90;
&::after { &::after {
content: ''; content: '';
width: 100%; width: 100%;
height: 486rpx; height: 486rpx;
background-image: linear-gradient(0deg, rgba(255, 255, 255, 0.00) 0%, #DCF1FF 53%, #FFFFFF 100%); background: url('https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/login/bg.png') no-repeat;
background-size: 100% 486rpx;
position: absolute; position: absolute;
left: 0; left: 0;
top: 0; top: 0;
z-index: -1; z-index: -1;
} }
.box {
height: 800rpx;
}
.button { .button {
width: 100%; width: 100%;
height: 88rpx; height: 88rpx;
...@@ -28,7 +36,11 @@ ...@@ -28,7 +36,11 @@
line-height: 88rpx; line-height: 88rpx;
padding: 0; padding: 0;
} }
.btn-hover{ .disabled{
background: #CCCED1;
}
.btn-hover {
opacity: .75; opacity: .75;
} }
} }
\ No newline at end of file \ No newline at end of file
<navigation-bar navStyle="{{navStyle}}">生意助手</navigation-bar> <navigation-bar navStyle="{{navStyle}}">生意助手</navigation-bar>
<view class="layout"> <view class="layout">
<view class="box"></view> <box loginType="{{loginType}}" />
<button class="button" hover-class="btn-hover">{{loginType == 1?'微信登陆':'登陆'}}</button> <button class="button {{disabled?'disabled':''}}" hover-class="btn-hover">{{loginType == 0?'微信登陆':'登陆'}}</button>
<type-list loginType="{{loginType}}" />
<protocol agree="{{agree}}" />
</view> </view>
\ No newline at end of file \ No newline at end of file
<import src="index.skeleton.wxml" />
<template is="skeleton" data="{{skeletonData,navHeight}}" wx:if="{{!hideSkeleton}}" />
<navigation-bar navStyle="{{navStyle}}" page-title="首页"> <navigation-bar navStyle="{{navStyle}}" page-title="首页">
<block wx:if="{{IMGURL}}"> <block wx:if="{{IMGURL}}">
<view class="logo y-center" data-skeleton-hide="{{skeletonData.logo}}"> <view class="logo y-center" data-skeleton-hide="{{skeletonData.logo}}">
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
] ]
} }
}, },
"projectname": "miniprogram-template", "projectname": "business-assistant",
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"libVersion": "2.24.4" "libVersion": "2.24.4"
} }
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!