54 lines
1.0 KiB
Vue
54 lines
1.0 KiB
Vue
<template>
|
|
<view class="login">
|
|
<image src="../../static/logo.png"></image>
|
|
<button open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">手机号快捷登录</button>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import {
|
|
getwxPhoneNumber
|
|
} from '@/api/pages/login/index.js'
|
|
export default {
|
|
methods: {
|
|
getPhoneNumber(e) {
|
|
if (e.detail.code) {
|
|
getwxPhoneNumber(e.detail.code).then(res => {
|
|
if (res.code == 200) {
|
|
const phoneNumber = res.data.phone_info.phoneNumber
|
|
uni.navigateTo({
|
|
url: `../register/register?phoneNumber=${phoneNumber}`
|
|
})
|
|
}
|
|
})
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="less" scoped>
|
|
.login {
|
|
text-align: center;
|
|
margin-top: 50%;
|
|
|
|
image {
|
|
width: 196rpx;
|
|
height: 203rpx;
|
|
margin-bottom: 136rpx;
|
|
}
|
|
|
|
button {
|
|
margin-top: 136rpx;
|
|
width: 496rpx;
|
|
height: 61rpx;
|
|
background: #26A888;
|
|
border-radius: 5rpx;
|
|
font-size: 31rpx;
|
|
color: #FFF;
|
|
font-weight: 500;
|
|
line-height: 61rpx;
|
|
margin: 0 auto;
|
|
}
|
|
}
|
|
</style> |