Commit 7f0c6598 by 李伟康

增加30天免登

1 parent e0e714f2
// login/index/components/Protocol/Protocol.js // login/index/components/Agree/Agree.js
Component({ Component({
options: { options: {
styleIsolation: 'shared' styleIsolation: 'shared'
...@@ -7,27 +7,24 @@ Component({ ...@@ -7,27 +7,24 @@ Component({
* 组件的属性列表 * 组件的属性列表
*/ */
properties: { properties: {
agree:Boolean show: Boolean,
text: String,
value: Boolean
}, },
/** /**
* 组件的初始数据 * 组件的初始数据
*/ */
data: { data: {
agree: false
}, },
/** /**
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
agreeProtocol() { agree() {
const thisPage = wx.$router.getPageInstance(),
{agree} = thisPage.data
thisPage.setData({
agree: !agree
})
wx.vibrateShort()
thisPage.checkLoginBtn()
}, },
} }
}) })
\ No newline at end of file \ No newline at end of file
/* login/index/components/Protocol/Protocol.wxss */ /* login/index/components/Agree/Agree.wxss */
.protocol { .agree {
margin-top: 274rpx; margin-top: 274rpx;
text { text {
......
<block wx:if="{{show}}">
<view class="agree text-center">
<view class="icon {{agree}}" bindtap="agree">
<image src="https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/login/radio.png"></image>
</view>
<block wx:if="{{text}}">{{text}}</block>
<block wx:else>
<slot></slot>
</block>
</view>
</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
...@@ -5,8 +5,12 @@ Page({ ...@@ -5,8 +5,12 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
loginType: 0, /**0:微信 1:手机号 2:账号密码 */
disabled: true loginType: 2,
/**按钮disabled */
disabled: true,
/**同意免登 */
agree: true
}, },
onRoute(options) {}, onRoute(options) {},
/** /**
...@@ -28,6 +32,7 @@ Page({ ...@@ -28,6 +32,7 @@ Page({
wx.hideHomeButton({ wx.hideHomeButton({
success: res => { success: res => {
wx.hideLoading() wx.hideLoading()
this.checkLoginBtn()
} }
}) })
}, },
...@@ -55,7 +60,7 @@ Page({ ...@@ -55,7 +60,7 @@ Page({
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() {}, // onShareAppMessage() {},
checkLoginBtn(disabled = false) { checkLoginBtn(disabled = false) {
const { const {
loginType loginType
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
"navigation-bar": "/components/NavigationBar/NavigationBar", "navigation-bar": "/components/NavigationBar/NavigationBar",
"mask": "./components/Mask/Mask", "mask": "./components/Mask/Mask",
"box": "./components/Box/Box", "box": "./components/Box/Box",
"type-list": "./components/TypeList/TypeList" "type-list": "./components/TypeList/TypeList",
"agree": "./components/Agree/Agree"
}, },
"navigationStyle": "custom" "navigationStyle": "custom"
} }
\ No newline at end of file \ No newline at end of file
...@@ -3,5 +3,5 @@ ...@@ -3,5 +3,5 @@
<navigation-bar navStyle="background-color: rgba(0,0,0,0)">生意助手</navigation-bar> <navigation-bar navStyle="background-color: rgba(0,0,0,0)">生意助手</navigation-bar>
<box loginType="{{loginType}}" disabled="{{disabled}}" id="box" /> <box loginType="{{loginType}}" disabled="{{disabled}}" id="box" />
<type-list loginType="{{loginType}}" /> <type-list loginType="{{loginType}}" />
<!-- <protocol agree="{{agree}}" /> --> <agree show="{{loginType == 2}}" text="30天内免登陆" value="{{agree}}" />
</view> </view>
\ No newline at end of file \ No newline at end of file
...@@ -6,7 +6,7 @@ const target = ['ip', 'dev', 'uat', 'prod'] ...@@ -6,7 +6,7 @@ const target = ['ip', 'dev', 'uat', 'prod']
2测试 2测试
3生产 3生产
*/ */
const index = 0 const index = 1
const secretKey = { const secretKey = {
ip: {}, ip: {},
dev: { dev: {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!