企获客基础班本接口方法等描述
This commit is contained in:
43
components/loginLayer/loginLayer.js
Normal file
43
components/loginLayer/loginLayer.js
Normal file
@@ -0,0 +1,43 @@
|
||||
|
||||
/**
|
||||
* Web唐明明
|
||||
* 一个梦想做木雕手艺人的程序员
|
||||
* explain: userInfoLayer
|
||||
*/
|
||||
|
||||
Component({
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
showLayer: {
|
||||
type : Boolean,
|
||||
value : false
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
userInfo(info){
|
||||
if(info.detail.errMsg == "getUserInfo:ok"){
|
||||
wx.$api.auth.authInfo({
|
||||
nickname: info.detail.userInfo.nickName,
|
||||
avatar : info.detail.userInfo.avatarUrl
|
||||
}).then(()=>{
|
||||
this.triggerEvent("updateinfo", true)
|
||||
this.setData({
|
||||
showLayer: false
|
||||
})
|
||||
})
|
||||
}else{
|
||||
wx.showToast({
|
||||
title: '拒绝了授权',
|
||||
icon : 'none'
|
||||
})
|
||||
this.triggerEvent("updateinfo", false)
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
4
components/loginLayer/loginLayer.json
Normal file
4
components/loginLayer/loginLayer.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
14
components/loginLayer/loginLayer.wxml
Normal file
14
components/loginLayer/loginLayer.wxml
Normal file
@@ -0,0 +1,14 @@
|
||||
|
||||
<block wx:if="{{showLayer}}">
|
||||
<view class="layer-back active"></view>
|
||||
<view class="layer-content">
|
||||
<view class="layer-content-block">
|
||||
<image class="layer-content-img" src="./userInfoLayer_img.png" mode="widthFix"></image>
|
||||
<view class="layer-content-mian">
|
||||
<view class="layer-content-title">完善信息</view>
|
||||
<view class="layer-content-text">获取您的公开信息(头像,昵称等),完善平台信息</view>
|
||||
<button class="layer-content-btn" size="default" open-type="getUserInfo" bindgetuserinfo="userInfo">授权微信</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
70
components/loginLayer/loginLayer.wxss
Normal file
70
components/loginLayer/loginLayer.wxss
Normal file
@@ -0,0 +1,70 @@
|
||||
|
||||
/**
|
||||
* Web唐明明
|
||||
* 一个梦想做木雕手艺人的程序员
|
||||
*/
|
||||
|
||||
.layer-back,
|
||||
.layer-content{
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.layer-back{
|
||||
z-index: 999;
|
||||
background-color: rgba(0, 0, 0, .3);
|
||||
}
|
||||
|
||||
.layer-content{
|
||||
z-index: 1000;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-pack: center;
|
||||
text-align: center;
|
||||
padding-bottom: 100rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.layer-content-block{
|
||||
background-color: white;
|
||||
width: 500rpx;
|
||||
display: inline-block;
|
||||
border-radius: 8rpx;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.layer-content-img{
|
||||
width: 100%;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.layer-content-mian{
|
||||
padding: 40rpx;
|
||||
}
|
||||
|
||||
.layer-content-title{
|
||||
font-weight: bold;
|
||||
font-size: 38rpx;
|
||||
line-height: 90rpx;
|
||||
}
|
||||
|
||||
.layer-content-btn[size="default"]{
|
||||
background-color: #0c0047;
|
||||
color: white;
|
||||
width: 100%;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
border-radius: 0;
|
||||
font-size: 34rpx;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.layer-content-text{
|
||||
padding-bottom: 40rpx;
|
||||
font-size: 30rpx;
|
||||
color: #afafaf;
|
||||
}
|
||||
BIN
components/loginLayer/userInfoLayer_img.png
Normal file
BIN
components/loginLayer/userInfoLayer_img.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
Reference in New Issue
Block a user