| | |
| | | data: { |
| | | phone: '', |
| | | password: '', |
| | | checked: false, |
| | | imageWidth: 100, |
| | | imageHeight: 100, |
| | | inputViewWidth: 100, |
| | |
| | | passwordInput: function (e) { |
| | | this.setData({ |
| | | password: e.detail.value |
| | | }) |
| | | }, |
| | | // 记住密码框 |
| | | rememberPwd(e) { |
| | | this.setData({ |
| | | checked: e.detail.value.includes('1') |
| | | }) |
| | | }, |
| | | // 获取输入电话号码 |
| | |
| | | // SVersion: sysInfo.version |
| | | // } |
| | | let data={ |
| | | LoginName: this.data.phone, |
| | | LoginPwd: this.data.password, |
| | | LoginName: that.data.phone, |
| | | LoginPwd: that.data.password, |
| | | Software:Constant.Software |
| | | } |
| | | // console.log(JSON.stringify(data),110) |
| | |
| | | if(Token){ |
| | | isNeedToken = true |
| | | } |
| | | |
| | | |
| | | let Checked={} |
| | | if(that.data.checked){ |
| | | Checked={ |
| | | phone:that.data.phone, |
| | | password:that.data.password, |
| | | checked:that.data.checked |
| | | } |
| | | } |
| | | let ExpreTime = new Date().getTime() //获取当前时间戳 |
| | | |
| | | wx.setStorageSync('AccountInfo',Checked) |
| | | wx.setStorageSync('AccessToken', { |
| | | Token:Token, |
| | | ExpreTime:ExpreTime, |
| | | isNeedToken:isNeedToken |
| | | isNeedToken:isNeedToken, |
| | | }) |
| | | |
| | | var return_user = return_data.User; |
| | |
| | | var screenHight = screenSize.height; |
| | | var screenWidthScale = screenSize.width / 750; |
| | | var screenHightScale = screenSize.height / 1334; |
| | | |
| | | if(wx.getStorageSync('AccountInfo')&&wx.getStorageSync('AccountInfo').checked) |
| | | { |
| | | let getPhone=wx.getStorageSync('AccountInfo').phone |
| | | let getPassword=wx.getStorageSync('AccountInfo').password |
| | | that.setData({ |
| | | phone:getPhone, |
| | | password:getPassword, |
| | | checked: wx.getStorageSync('AccountInfo').checked |
| | | }) |
| | | } |
| | | that.setData({ |
| | | imageWidth: screenWidth, |
| | | imageHeight: screenHightScale * 520 + 10, |
| | |
| | | inputViewWidth: screenWidth, |
| | | inputViewHeight: screenHightScale * 88, |
| | | inputWidth: screenWidth, |
| | | inputHeight: screenHightScale * 177 |
| | | inputHeight: screenHightScale * 177, |
| | | }); |
| | | |
| | | }, |
| | |
| | | <icon wx:if="{{!isShowPwd}}" class="cuIcon-attention" bindtap="changePwdView" style="font-size: 30rpx;line-height: 2;"></icon> |
| | | <icon wx:else class="cuIcon-attentionforbid" bindtap="changePwdView" style="font-size: 30rpx;line-height: 2;"></icon> |
| | | </view> |
| | | <view class="psdBox"> |
| | | <checkbox-group bindchange="rememberPwd"> |
| | | <checkbox value="1" checked="{{checked}}" /> |
| | | <label for="check">记住密码</label> |
| | | </checkbox-group> |
| | | </view> |
| | | </view> |
| | | <view class="loginBtnView"> |
| | | <button class="loginBtnReal" type="primary" bindtap="tapBindUserReal" style="background-color: #39b5de;">登录</button> |
| | |
| | | bottom: 0rpx; |
| | | margin-top: 10px; |
| | | margin-bottom: 20px; |
| | | } |
| | | .psdBox { |
| | | margin: 14rpx 20rpx 28rpx 20rpx |
| | | } |
| | | checkbox .wx-checkbox-input { |
| | | width: 28rpx; |
| | | height: 28rpx; |
| | | } |
| | | checkbox .wx-checkbox-input { |
| | | border-color: #409eff; |
| | | background-color: transparent; |
| | | transition: background-color .3s; |
| | | } |
| | | checkbox .wx-checkbox-input.wx-checkbox-input-checked { |
| | | color: #fff; |
| | | background-color: #409eff; |
| | | } |
| | | radio::before, checkbox::before { |
| | | right: 0px; |
| | | } |