|
|
@@ -70,6 +70,17 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</van-form>
|
|
|
+ <div class="third-login">
|
|
|
+ <div class="title">Login with</div>
|
|
|
+ <div class="logos">
|
|
|
+ <ion-icon
|
|
|
+ class="facebook"
|
|
|
+ style="color: #0080fb"
|
|
|
+ :icon="logoFacebook"
|
|
|
+ @click="Facebook.login()"
|
|
|
+ ></ion-icon>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</ion-content>
|
|
|
</ion-page>
|
|
|
</template>
|
|
|
@@ -84,6 +95,8 @@ import inactiveIcon from '../assets/icon_gouxuan_huise.png'
|
|
|
import zhanghao from '../assets/login_icon_zhanghao.svg'
|
|
|
import mima from '../assets/login_icon_mima.svg'
|
|
|
import { Browser } from '@capacitor/browser'
|
|
|
+import { Facebook } from 'capacitor-facebook'
|
|
|
+import { logoFacebook } from 'ionicons/icons'
|
|
|
|
|
|
let fromRoute = null
|
|
|
export default {
|
|
|
@@ -100,7 +113,6 @@ export default {
|
|
|
const agreeTerm = useStorage('agreeTerm', false, localStorage)
|
|
|
|
|
|
const userStore = useUserStore()
|
|
|
-
|
|
|
return {
|
|
|
router,
|
|
|
formData,
|
|
|
@@ -110,11 +122,12 @@ export default {
|
|
|
mima,
|
|
|
login: userStore.login,
|
|
|
activeIcon,
|
|
|
- inactiveIcon
|
|
|
+ inactiveIcon,
|
|
|
+ Facebook,
|
|
|
+ logoFacebook
|
|
|
}
|
|
|
},
|
|
|
beforeRouteEnter(to, from) {
|
|
|
- console.log(from)
|
|
|
fromRoute = from
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -139,10 +152,8 @@ export default {
|
|
|
fromRoute.name === 'login' ||
|
|
|
fromRoute.name === 'loginPhone'
|
|
|
) {
|
|
|
- console.log('navigate')
|
|
|
this.router.navigate('/home', 'back', 'pop')
|
|
|
} else {
|
|
|
- console.log('back')
|
|
|
this.router.back()
|
|
|
}
|
|
|
})
|
|
|
@@ -274,4 +285,17 @@ export default {
|
|
|
width: 24px;
|
|
|
height: 24px;
|
|
|
}
|
|
|
+.third-login {
|
|
|
+ margin-top: 30px;
|
|
|
+ .title {
|
|
|
+ text-align: center;
|
|
|
+ font-size: 12px;
|
|
|
+ color: rgba(255, 255, 255, 0.6);
|
|
|
+ }
|
|
|
+ .logos {
|
|
|
+ text-align: center;
|
|
|
+ font-size: 32px;
|
|
|
+ margin-top: 10px;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|