| | |
| | | <view class="title"><text class="cuIcon-lock margin-right-xs"></text>密码:</view> |
| | | <input class="uni-input" placeholder="请输入密码" :password="!showPassword" v-model="password" /> |
| | | <view class="action text-lg"> |
| | | <text :class="[showPassword ? 'cuIcon-attention' : 'cuIcon-attentionforbid']" @click="changePassword"></text> |
| | | <text :class="[showPassword ? 'cuIcon-attention' : 'cuIcon-attentionforbid']" |
| | | @click="changePassword"></text> |
| | | </view> |
| | | </view> |
| | | <view class="padding text-center margin-top"> |
| | | <button class="cu-btn bg-blue lg margin-right shadow" :loading="loading" :class="[shape=='round'?'round':'']" |
| | | @tap="onLogin"><text space="emsp">{{loading ? "登录中...":" 登录 "}}</text> |
| | | <button class="cu-btn bg-blue lg margin-right shadow" :loading="loading" |
| | | :class="[shape=='round'?'round':'']" @tap="onLogin"><text |
| | | space="emsp">{{loading ? "登录中...":" 登录 "}}</text> |
| | | </button> |
| | | <!-- <button class="cu-btn line-blue lg margin-left shadow" :loading="loading" :class="[shape=='round'?'round':'']" |
| | | @tap="loginWay=3-loginWay">短信登录 |
| | |
| | | <view class="title"><text class="cuIcon-lock margin-right-xs"></text>验证码:</view> |
| | | <input class="uni-input" placeholder="请输入验证码" v-model="smsCode"/> |
| | | <view class="action"> |
| | | <button class="cu-btn line-blue sm" :disabled="!isSendSMSEnable" @click="onSMSSend"> {{ getSendBtnText }}</button> |
| | | <button class="cu-btn line-blue sm" :disabled="!isSendSMSEnable" @click="onSMSSend"> |
| | | {{ getSendBtnText }}</button> |
| | | </view> |
| | | </view> |
| | | <view class="padding text-center margin-top"> |
| | | <button class="cu-btn bg-blue lg margin-right shadow" :loading="loading" :class="[shape=='round'?'round':'']" |
| | | @tap="onSMSLogin"><text space="emsp">{{loading ? "登录中...":" 登录 "}}</text> |
| | | <button class="cu-btn bg-blue lg margin-right shadow" :loading="loading" |
| | | :class="[shape=='round'?'round':'']" @tap="onSMSLogin"><text |
| | | space="emsp">{{loading ? "登录中...":" 登录 "}}</text> |
| | | </button> |
| | | <button class="cu-btn line-blue lg margin-left shadow" :loading="loading" :class="[shape=='round'?'round':'']" |
| | | @tap="loginWay=1">账户登录 |
| | | <button class="cu-btn line-blue lg margin-left shadow" :loading="loading" |
| | | :class="[shape=='round'?'round':'']" @tap="loginWay=1">账户登录 |
| | | </button> |
| | | </view> |
| | | </block> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { ACCESS_TOKEN,USER_NAME,USER_INFO } from "@/common/util/constants" |
| | | import { mapActions } from "vuex" |
| | | import { |
| | | ACCESS_TOKEN, |
| | | USER_NAME, |
| | | USER_INFO |
| | | } from "@/common/util/constants" |
| | | import { |
| | | mapActions |
| | | } from "vuex" |
| | | import configService from '@/common/service/config.service.js'; |
| | | |
| | | export default { |
| | |
| | | thirdLoginState:false, |
| | | bindingPhoneModal:false, |
| | | thirdUserUuid:'', |
| | | id: '', |
| | | url: { |
| | | bindingThirdPhone: '/sys/thirdLogin/bindingThirdPhone' |
| | | } |
| | | }; |
| | | }, |
| | | onLoad:function(){ |
| | | onLoad: function(options) { |
| | | this.id = options.id; |
| | | // #ifdef APP-PLUS |
| | | var that=this |
| | | plus.runtime.getProperty( plus.runtime.appid, function ( wgtinfo ) { |
| | |
| | | // #endif |
| | | // #ifndef APP-PLUS |
| | | this.$tip.success('登录成功!') |
| | | this.$Router.replaceAll({name:'index'}) |
| | | this.$Router.replaceAll({ |
| | | name: 'index' |
| | | }) |
| | | // if (this.id) { |
| | | // uni.navigateTo({ |
| | | // url: `/pages/device/deviceWebDeils/deviceWebDeils?equipmentId=${this.id}` |
| | | // }); |
| | | |
| | | // } else { |
| | | // this.$tip.success('登录成功!') |
| | | // this.$Router.replaceAll({ |
| | | // name: 'index' |
| | | // }) |
| | | // } |
| | | |
| | | |
| | | // #endif |
| | | }else{ |
| | | this.$tip.alert(res.data.message); |
| | |
| | | saveClientId(){ |
| | | var info = plus.push.getClientInfo(); |
| | | var cid = info.clientid; |
| | | this.$http.get("/sys/user/saveClientId",{params:{clientId:cid}}).then(res=>{ |
| | | this.$http.get("/sys/user/saveClientId", { |
| | | params: { |
| | | clientId: cid |
| | | } |
| | | }).then(res => { |
| | | console.log("res::saveClientId>",res) |
| | | this.$tip.success('登录成功!') |
| | | this.$Router.replaceAll({name:'index'}) |
| | | this.$Router.replaceAll({ |
| | | name: 'index' |
| | | }) |
| | | }) |
| | | }, |
| | | changePassword() { |
| | |
| | | console.log("res====》",res) |
| | | if(res.data.success){ |
| | | this.$tip.success('登录成功!') |
| | | this.$Router.replaceAll({name:'index'}) |
| | | this.$Router.replaceAll({ |
| | | name: 'index' |
| | | }) |
| | | }else{ |
| | | this.$tip.error(res.data.message); |
| | | } |
| | |
| | | }, |
| | | loginSuccess() { |
| | | // 登陆成功,重定向到主页 |
| | | this.$Router.replace({name:'index'}) |
| | | this.$Router.replace({ |
| | | name: 'index' |
| | | }) |
| | | }, |
| | | requestFailed(err) { |
| | | this.$message.warning("登录失败") |
| | |
| | | text-align: center; |
| | | } |
| | | |
| | | .input-placeholder, .zai-input { |
| | | .input-placeholder, |
| | | .zai-input { |
| | | color: #94afce; |
| | | } |
| | | |
| | |
| | | .zai-btn.button-hover { |
| | | transform: translate(1upx, 1upx); |
| | | } |
| | | |
| | | </style> |