|
@@ -4,29 +4,29 @@
|
|
<div class="vongi-login-logo" style="
|
|
<div class="vongi-login-logo" style="
|
|
text-align: center;
|
|
text-align: center;
|
|
margin-top: 40px;">
|
|
margin-top: 40px;">
|
|
- <img v-if="branchParameter=='51team'"
|
|
|
|
|
|
+ <img v-if="branchParameter=='51team'"
|
|
src="@/assets/img/logo.png" style="
|
|
src="@/assets/img/logo.png" style="
|
|
width: 72px;
|
|
width: 72px;
|
|
height: 72px;
|
|
height: 72px;
|
|
border-radius: 15px;
|
|
border-radius: 15px;
|
|
- " />
|
|
|
|
- <img v-if="branchParameter=='youdian'"
|
|
|
|
- src="@/assets/img/logoUd.jpg" style="
|
|
|
|
- width: 72px;
|
|
|
|
- height: 72px;
|
|
|
|
- border-radius: 15px;
|
|
|
|
|
|
+ " />
|
|
|
|
+ <img v-if="branchParameter=='youdian'"
|
|
|
|
+ src="@/assets/img/logoUd.jpg" style="
|
|
|
|
+ width: 72px;
|
|
|
|
+ height: 72px;
|
|
|
|
+ border-radius: 15px;
|
|
" />
|
|
" />
|
|
<div style="
|
|
<div style="
|
|
color: rgba(16, 16, 16, 100);
|
|
color: rgba(16, 16, 16, 100);
|
|
font-size: 18px;
|
|
font-size: 18px;
|
|
text-align: center;
|
|
text-align: center;
|
|
font-family: PingFangSC-regular;
|
|
font-family: PingFangSC-regular;
|
|
- ">{{projectName}}</div>
|
|
|
|
|
|
+ ">{{projectName}}</div>
|
|
<!-- 51充电联盟 -->
|
|
<!-- 51充电联盟 -->
|
|
</div>
|
|
</div>
|
|
<view class="login-title">
|
|
<view class="login-title">
|
|
<!-- <u-icon name="qichexiangguan-chongdianzhan" custom-prefix="custom-icon" color="#1677ff" size="56"></u-icon>
|
|
<!-- <u-icon name="qichexiangguan-chongdianzhan" custom-prefix="custom-icon" color="#1677ff" size="56"></u-icon>
|
|
- --> <h3>电单车充电系统</h3>
|
|
|
|
|
|
+ --> <h3>优电联盟-电单车充电系统</h3>
|
|
</view>
|
|
</view>
|
|
<view class="login-main">
|
|
<view class="login-main">
|
|
<u-form :model="form" ref="uForm">
|
|
<u-form :model="form" ref="uForm">
|
|
@@ -57,7 +57,7 @@
|
|
} from '@/utils'
|
|
} from '@/utils'
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
- return {
|
|
|
|
|
|
+ return {
|
|
validateGuestCode:0,
|
|
validateGuestCode:0,
|
|
form: {
|
|
form: {
|
|
phone: '',
|
|
phone: '',
|
|
@@ -125,18 +125,18 @@
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
- API.validateCode({
|
|
|
|
|
|
+ API.validateCode({
|
|
validateGuestCode:this.validateGuestCode,
|
|
validateGuestCode:this.validateGuestCode,
|
|
verifyCode: this.form.code,
|
|
verifyCode: this.form.code,
|
|
telephone: this.form.phone,
|
|
telephone: this.form.phone,
|
|
openId: this.carhelp.getOpenId(),
|
|
openId: this.carhelp.getOpenId(),
|
|
- headImg: headImg,
|
|
|
|
|
|
+ headImg: headImg,
|
|
source:1,
|
|
source:1,
|
|
}).then((response) => {
|
|
}).then((response) => {
|
|
var token = response ? response.data.token : '';
|
|
var token = response ? response.data.token : '';
|
|
this.carhelp.setToken(token);
|
|
this.carhelp.setToken(token);
|
|
- this.carhelp.setPersonInfo(response.data.regUser);
|
|
|
|
- this.carhelp.setPersonInfoPlus(response.data.data )
|
|
|
|
|
|
+ this.carhelp.setPersonInfo(response.data.regUser);
|
|
|
|
+ this.carhelp.setPersonInfoPlus(response.data.data )
|
|
|
|
|
|
//this.gotoUrl("pages/user/index")
|
|
//this.gotoUrl("pages/user/index")
|
|
uni.redirectTo({
|
|
uni.redirectTo({
|
|
@@ -207,64 +207,64 @@
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
this.$refs.uCode.start();
|
|
this.$refs.uCode.start();
|
|
- },
|
|
|
|
- query(){
|
|
|
|
- uni.showLoading({
|
|
|
|
- title: "加载中",
|
|
|
|
- mask: true,
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
- API.findByOpenId({
|
|
|
|
-
|
|
|
|
- openId: this.carhelp.getOpenId(),
|
|
|
|
-
|
|
|
|
- }).then((response) => {
|
|
|
|
-
|
|
|
|
- if(response.data.regUser.userType==1){
|
|
|
|
- this.validateGuestCode=1;
|
|
|
|
- throw 1
|
|
|
|
- }
|
|
|
|
- var token = response ? response.data.token : '';
|
|
|
|
- this.carhelp.setToken(token);
|
|
|
|
- this.carhelp.setPersonInfo(response.data.regUser);
|
|
|
|
- //this.gotoUrl("pages/user/index")
|
|
|
|
- this.carhelp.setPersonInfoPlus(response.data.data )
|
|
|
|
-
|
|
|
|
- uni.redirectTo({
|
|
|
|
- url: '/pages/user/rechargeIndex?site=1'
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
- }).catch(error => {
|
|
|
|
- console.log(error)
|
|
|
|
- uni.hideLoading();
|
|
|
|
- if (!this.carhelp.getOpenId()) {
|
|
|
|
- // uni.showToast({
|
|
|
|
- // title: "请使用“微信”访问本系统登录"
|
|
|
|
- // })
|
|
|
|
- // return
|
|
|
|
- } else if (this.message) {
|
|
|
|
- uni.showToast({
|
|
|
|
- title: this.message.split(",")[0],
|
|
|
|
- icon: "none"
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- var time = this.carhelp.get("getvcodetime");
|
|
|
|
- if (time) {
|
|
|
|
- //this.$refs.uCode.start();
|
|
|
|
- var nowtime = new Date().getTime()
|
|
|
|
- var differ = (nowtime - time) / 1000
|
|
|
|
- if (differ < 2 * 60) {
|
|
|
|
- this.sendMsgSecond = 2 * 60 - parseInt(differ)
|
|
|
|
- this.isSendMsgIng = true;
|
|
|
|
- this.$refs.uCode.start();
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- })
|
|
|
|
|
|
+ },
|
|
|
|
+ query(){
|
|
|
|
+ uni.showLoading({
|
|
|
|
+ title: "加载中",
|
|
|
|
+ mask: true,
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ API.findByOpenId({
|
|
|
|
+
|
|
|
|
+ openId: this.carhelp.getOpenId(),
|
|
|
|
+
|
|
|
|
+ }).then((response) => {
|
|
|
|
+
|
|
|
|
+ if(response.data.regUser.userType==1){
|
|
|
|
+ this.validateGuestCode=1;
|
|
|
|
+ throw 1
|
|
|
|
+ }
|
|
|
|
+ var token = response ? response.data.token : '';
|
|
|
|
+ this.carhelp.setToken(token);
|
|
|
|
+ this.carhelp.setPersonInfo(response.data.regUser);
|
|
|
|
+ //this.gotoUrl("pages/user/index")
|
|
|
|
+ this.carhelp.setPersonInfoPlus(response.data.data )
|
|
|
|
+
|
|
|
|
+ uni.redirectTo({
|
|
|
|
+ url: '/pages/user/rechargeIndex?site=1'
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ }).catch(error => {
|
|
|
|
+ console.log(error)
|
|
|
|
+ uni.hideLoading();
|
|
|
|
+ if (!this.carhelp.getOpenId()) {
|
|
|
|
+ // uni.showToast({
|
|
|
|
+ // title: "请使用“微信”访问本系统登录"
|
|
|
|
+ // })
|
|
|
|
+ // return
|
|
|
|
+ } else if (this.message) {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: this.message.split(",")[0],
|
|
|
|
+ icon: "none"
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ var time = this.carhelp.get("getvcodetime");
|
|
|
|
+ if (time) {
|
|
|
|
+ //this.$refs.uCode.start();
|
|
|
|
+ var nowtime = new Date().getTime()
|
|
|
|
+ var differ = (nowtime - time) / 1000
|
|
|
|
+ if (differ < 2 * 60) {
|
|
|
|
+ this.sendMsgSecond = 2 * 60 - parseInt(differ)
|
|
|
|
+ this.isSendMsgIng = true;
|
|
|
|
+ this.$refs.uCode.start();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ })
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- onReady() {
|
|
|
|
- this.query()
|
|
|
|
|
|
+ onReady() {
|
|
|
|
+ this.query()
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -295,4 +295,4 @@
|
|
.login-code {
|
|
.login-code {
|
|
color: #1677ff;
|
|
color: #1677ff;
|
|
}
|
|
}
|
|
-</style>
|
|
|
|
|
|
+</style>
|