goeasy + login
This commit is contained in:
@@ -47,10 +47,6 @@ Page({
|
||||
// map: wx.createMapContext('map')
|
||||
// })
|
||||
// console.log(this.data.map)
|
||||
wx.login({
|
||||
success(res){
|
||||
console.log(res.code)
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
@@ -6,7 +6,7 @@ page{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
.map{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
width: 750rpx;
|
||||
height: 100vh;
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,6 @@ page {
|
||||
}
|
||||
|
||||
.container .map {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
width: 750rpx;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,18 @@
|
||||
import {login} from "../../utils/api"
|
||||
Page({
|
||||
data:{
|
||||
show: true
|
||||
},
|
||||
denglu(a){
|
||||
console.log(a,123)
|
||||
wx.login({
|
||||
success(code){
|
||||
login({code: code.code}).then((res)=>{
|
||||
console.log(res)
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
tiaozhuan(){
|
||||
wx.navigateTo({
|
||||
url:"/pages/ltjm/ltjm"
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"usingComponents": {
|
||||
"van-popup": "../../miniprogram_npm/@vant/weapp/popup/index"
|
||||
},
|
||||
"navigationBarTitleText": "聊天"
|
||||
}
|
||||
@@ -33,4 +33,39 @@ page{
|
||||
}
|
||||
}
|
||||
}
|
||||
.showquan{
|
||||
width: 500rpx;
|
||||
height: 338rpx;
|
||||
border-radius: 5rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 14rpx;
|
||||
.title{
|
||||
width: 100%;
|
||||
font-size: 34rpx;
|
||||
color: #000;
|
||||
border-bottom: 2rpx solid #dadada;
|
||||
line-height: 80rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.text{
|
||||
font-size: 29rpx;
|
||||
color: #999;
|
||||
line-height: 56rpx;
|
||||
width: 362rpx;
|
||||
text-align: center;
|
||||
margin-top: 25rpx;
|
||||
}
|
||||
.button{
|
||||
width: 424rpx;
|
||||
height: 65rpx;
|
||||
border-radius: 5rpx;
|
||||
background-color: #3399CC;
|
||||
color: #fff;
|
||||
line-height: 65rpx;
|
||||
font-size: 30rpx;
|
||||
margin-top: 35rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,4 +6,12 @@
|
||||
<text class="text">texttexttext</text>
|
||||
</view>
|
||||
</view>
|
||||
<van-popup show="{{ show }}" bind:close="onClose">
|
||||
<view class="showquan">
|
||||
<view class="title">授权登录</view>
|
||||
<view class="text">您尚未授权您的基本信息,
|
||||
是否立即授权?</view>
|
||||
<button type="primary" class="button" open-type="getUserInfo" bindgetuserinfo="denglu">立即授权</button>
|
||||
</view>
|
||||
</van-popup>
|
||||
</view>
|
||||
@@ -36,3 +36,42 @@
|
||||
font-size: 20rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.box .showquan {
|
||||
width: 500rpx;
|
||||
height: 338rpx;
|
||||
border-radius: 5rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 14rpx;
|
||||
}
|
||||
|
||||
.box .showquan .title {
|
||||
width: 100%;
|
||||
font-size: 34rpx;
|
||||
color: #000;
|
||||
border-bottom: 2rpx solid #dadada;
|
||||
line-height: 80rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.box .showquan .text {
|
||||
font-size: 29rpx;
|
||||
color: #999;
|
||||
line-height: 56rpx;
|
||||
width: 362rpx;
|
||||
text-align: center;
|
||||
margin-top: 25rpx;
|
||||
}
|
||||
|
||||
.box .showquan .button {
|
||||
width: 424rpx;
|
||||
height: 65rpx;
|
||||
border-radius: 5rpx;
|
||||
background-color: #3399CC;
|
||||
color: #fff;
|
||||
line-height: 65rpx;
|
||||
font-size: 30rpx;
|
||||
margin-top: 35rpx;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user