修改第三方登录
parent
e73d76eb57
commit
4a5a4c19a5
|
@ -4,45 +4,107 @@
|
||||||
<u-navbar :is-back="showBack" :border-bottom="false"></u-navbar>
|
<u-navbar :is-back="showBack" :border-bottom="false"></u-navbar>
|
||||||
<div>
|
<div>
|
||||||
<div class="title">{{ loginTitleWay[current].title }}</div>
|
<div class="title">{{ loginTitleWay[current].title }}</div>
|
||||||
<div :class="current == 1 ? 'desc-light':'desc'">{{loginTitleWay[current].desc}}<span
|
<div :class="current == 1 ? 'desc-light' : 'desc'">
|
||||||
v-if="current == 1">{{mobile | secrecyMobile}}</span></div>
|
{{ loginTitleWay[current].desc
|
||||||
|
}}<span v-if="current == 1">{{ mobile | secrecyMobile }}</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 手机号 -->
|
<!-- 手机号 -->
|
||||||
<div v-show="current == 0">
|
<div v-show="current == 0">
|
||||||
<u-input :custom-style="inputStyle" :placeholder-style="placeholderStyle" placeholder="请输入手机号 (11位)"
|
<u-input
|
||||||
class='mobile' focus v-model="mobile" type="number" maxlength="11" />
|
:custom-style="inputStyle"
|
||||||
<div :class="!enabuleFetchCode ?'disable':'fetch'" @click="fetchCode" class=" btn">获取验证码</div>
|
:placeholder-style="placeholderStyle"
|
||||||
|
placeholder="请输入手机号 (11位)"
|
||||||
|
class="mobile"
|
||||||
|
focus
|
||||||
|
v-model="mobile"
|
||||||
|
type="number"
|
||||||
|
maxlength="11"
|
||||||
|
/>
|
||||||
|
<div
|
||||||
|
:class="!enabuleFetchCode ? 'disable' : 'fetch'"
|
||||||
|
@click="fetchCode"
|
||||||
|
class="btn"
|
||||||
|
>
|
||||||
|
获取验证码
|
||||||
|
</div>
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<u-checkbox-group :icon-size="24" width="45rpx">
|
<u-checkbox-group :icon-size="24" width="45rpx">
|
||||||
<u-checkbox shape="circle" v-model="enabulePrivacy" active-color="#FF5E00"></u-checkbox>
|
<u-checkbox
|
||||||
|
shape="circle"
|
||||||
|
v-model="enabulePrivacy"
|
||||||
|
active-color="#FF5E00"
|
||||||
|
></u-checkbox>
|
||||||
</u-checkbox-group>
|
</u-checkbox-group>
|
||||||
<div class="tips">未注册的手机号验证后将自动创建用户账号,登录即代表您已同意<span @click="navigateToPrivacy('privacy')">《使用条款及隐私协议》</span>
|
<div class="tips">
|
||||||
|
未注册的手机号验证后将自动创建用户账号,登录即代表您已同意<span
|
||||||
|
@click="navigateToPrivacy('privacy')"
|
||||||
|
>《使用条款及隐私协议》</span
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- 输入验证码 -->
|
<!-- 输入验证码 -->
|
||||||
<div v-show="current == 1" class="box-code">
|
<div v-show="current == 1" class="box-code">
|
||||||
<verifyCode type="bottom" @confirm="submit" boxActiveColor="#D8D8D8" v-model="code" isFocus
|
<verifyCode
|
||||||
boxNormalColor="#D8D8D8" cursorColor="#D8D8D8" />
|
type="bottom"
|
||||||
|
@confirm="submit"
|
||||||
|
boxActiveColor="#D8D8D8"
|
||||||
|
v-model="code"
|
||||||
|
isFocus
|
||||||
|
boxNormalColor="#D8D8D8"
|
||||||
|
cursorColor="#D8D8D8"
|
||||||
|
/>
|
||||||
|
|
||||||
<div class="fetch-btn">
|
<div class="fetch-btn">
|
||||||
<u-verification-code change-text="验证码已发送(x)" end-text="重新获取验证码" unique-key="page-login"
|
<u-verification-code
|
||||||
:seconds="seconds" @end="end" @start="start" ref="uCode" @change="codeChange"></u-verification-code>
|
change-text="验证码已发送(x)"
|
||||||
|
end-text="重新获取验证码"
|
||||||
|
unique-key="page-login"
|
||||||
|
:seconds="seconds"
|
||||||
|
@end="end"
|
||||||
|
@start="start"
|
||||||
|
ref="uCode"
|
||||||
|
@change="codeChange"
|
||||||
|
></u-verification-code>
|
||||||
<span @tap="fetchCode" :style="{ color: codeColor }"> {{ tips }}</span>
|
<span @tap="fetchCode" :style="{ color: codeColor }"> {{ tips }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 循环出当前可使用的第三方登录模式 -->
|
<!-- 循环出当前可使用的第三方登录模式 -->
|
||||||
<div class="flex login-list">
|
<div class="flex login-list">
|
||||||
<div v-if="item.code" :style="{background:item.color}" class="login-item" v-for="(item,index) in loginList" :key="index">
|
<div
|
||||||
<u-icon v-if="item.title!='APPLE'" color="#fff" size="42" :name="item.icon" @click="navigateLogin(item)">
|
v-if="item.code"
|
||||||
|
:style="{ background: item.color }"
|
||||||
|
class="login-item"
|
||||||
|
v-for="(item, index) in loginList"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
|
<u-icon
|
||||||
|
v-if="item.title != 'APPLE'"
|
||||||
|
color="#fff"
|
||||||
|
size="42"
|
||||||
|
:name="item.icon"
|
||||||
|
@click="navigateLogin(item)"
|
||||||
|
>
|
||||||
</u-icon>
|
</u-icon>
|
||||||
<u-image v-else src="/static/appleidButton@2x.png" :lazy-load="false" @click="navigateLogin(item)" width="80"
|
<u-image
|
||||||
height="80" />
|
v-else
|
||||||
|
src="/static/appleidButton@2x.png"
|
||||||
|
:lazy-load="false"
|
||||||
|
@click="navigateLogin(item)"
|
||||||
|
width="80"
|
||||||
|
height="80"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<myVerification v-if="codeFlag" @send="verification" class="verification" ref="verification" business="LOGIN" />
|
<myVerification
|
||||||
|
v-if="codeFlag"
|
||||||
|
@send="verification"
|
||||||
|
class="verification"
|
||||||
|
ref="verification"
|
||||||
|
business="LOGIN"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<view v-else>
|
<view v-else>
|
||||||
<wechatH5Login />
|
<wechatH5Login />
|
||||||
|
@ -137,7 +199,6 @@ export default {
|
||||||
//#endif
|
//#endif
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
// #ifndef APP-PLUS
|
// #ifndef APP-PLUS
|
||||||
//判断是否微信浏览器
|
//判断是否微信浏览器
|
||||||
|
@ -423,7 +484,7 @@ export default {
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
let code = connectLogin.code;
|
let code = connectLogin.code;
|
||||||
let buyer = api.buyer;
|
let buyer = api.buyer;
|
||||||
window.open(buyer + `/connect/login/web/` + code, "_self");
|
window.open(buyer + `/passport/connect/login/web/` + code, "_self");
|
||||||
// #endif
|
// #endif
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
this.nonH5OpenId(connectLogin);
|
this.nonH5OpenId(connectLogin);
|
||||||
|
@ -442,8 +503,7 @@ export default {
|
||||||
/**
|
/**
|
||||||
* 执行登录
|
* 执行登录
|
||||||
*/
|
*/
|
||||||
smsLogin({ mobile: this.mobile, code: this.code }, this.clientType).then(
|
smsLogin({ mobile: this.mobile, code: this.code }, this.clientType).then((res) => {
|
||||||
(res) => {
|
|
||||||
if (res.data.success) {
|
if (res.data.success) {
|
||||||
storage.setAccessToken(res.data.result.accessToken);
|
storage.setAccessToken(res.data.result.accessToken);
|
||||||
storage.setRefreshToken(res.data.result.refreshToken);
|
storage.setRefreshToken(res.data.result.refreshToken);
|
||||||
|
@ -477,8 +537,7 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
);
|
|
||||||
},
|
},
|
||||||
// 验证码验证
|
// 验证码验证
|
||||||
verification(val) {
|
verification(val) {
|
||||||
|
@ -636,7 +695,6 @@ page {
|
||||||
bottom: 20px;
|
bottom: 20px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-item {
|
.login-item {
|
||||||
|
@ -649,6 +707,5 @@ page {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
margin: 0 20rpx;
|
margin: 0 20rpx;
|
||||||
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
|
@ -43,7 +43,7 @@ export default {
|
||||||
getUserProfile() {
|
getUserProfile() {
|
||||||
let code = "WECHAT";
|
let code = "WECHAT";
|
||||||
let buyer = api.buyer;
|
let buyer = api.buyer;
|
||||||
window.open(buyer + `/connect/login/web/` + code, "_self");
|
window.open(buyer + `/passport/connect/login/web/` + code, "_self");
|
||||||
},
|
},
|
||||||
backToHome() {
|
backToHome() {
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
|
@ -55,8 +55,6 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
|
||||||
.wx-auth-container {
|
.wx-auth-container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue