mirror of
https://gitee.com/beecue/fastbee.git
synced 2025-12-18 08:55:53 +08:00
删除无用文件夹
This commit is contained in:
54
wechat/pages/my/my.js
Normal file
54
wechat/pages/my/my.js
Normal file
@@ -0,0 +1,54 @@
|
||||
// pages/my/my.js
|
||||
Page({
|
||||
data: {
|
||||
userInfo:{},
|
||||
isLogin:false
|
||||
},
|
||||
|
||||
getUserInfo(){
|
||||
const that = this;
|
||||
wx.showLoading({
|
||||
title: '正在登录'
|
||||
});
|
||||
wx.getUserProfile({
|
||||
desc:'用以展示您的头像和昵称等信息',
|
||||
success(res){
|
||||
console.log(res);
|
||||
wx.setStorageSync('userInfo',JSON.parse(res.rawData));
|
||||
wx.setStorageSync('isLogin',true);
|
||||
that.setData({
|
||||
userInfo:JSON.parse(res.rawData),
|
||||
isLogin:true
|
||||
})
|
||||
},
|
||||
complete(){
|
||||
wx.hideLoading();
|
||||
},
|
||||
fail(err){
|
||||
if (err.errMsg == 'getUserProfile:fail auth deny') {
|
||||
wx.showToast({
|
||||
title: '授权取消',
|
||||
icon:'error'
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getPhoneNumber(e){
|
||||
console.log('===========');
|
||||
console.log(e);
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
this.setData({
|
||||
userInfo:wx.getStorageSync('userInfo'),
|
||||
isLogin:wx.getStorageSync('isLogin') || false
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
})
|
||||
3
wechat/pages/my/my.json
Normal file
3
wechat/pages/my/my.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
34
wechat/pages/my/my.wxml
Normal file
34
wechat/pages/my/my.wxml
Normal file
@@ -0,0 +1,34 @@
|
||||
<!--pages/my/my.wxml-->
|
||||
<view class="top">
|
||||
<view class="userInfo">
|
||||
<view class="picture">
|
||||
<image wx:if="{{ isLogin === true }}" src="{{ userInfo.avatarUrl }}" />
|
||||
<image wx:if="{{ isLogin === false }}" src="/icons/notlogin.png"></image>
|
||||
</view>
|
||||
<view wx:if="{{ isLogin === true }}" class="other">
|
||||
<view class="username">{{ userInfo.nickName }}</view>
|
||||
<view class="phone">
|
||||
<van-button color="linear-gradient(to right, #4bb0ff, #6149f6)"
|
||||
open-type='getPhoneNumber' bindgetphonenumber='getPhoneNumber'
|
||||
round size="small">
|
||||
绑定手机
|
||||
</van-button>
|
||||
</view>
|
||||
<!-- <view class="phone">
|
||||
<van-tag type="success">手机</van-tag>
|
||||
<text>12345678900</text>
|
||||
</view> -->
|
||||
</view>
|
||||
<view wx:if="{{ isLogin === false }}">
|
||||
<van-button round color="linear-gradient(to right, #4bb0ff, #6149f6)" bindtap="getUserInfo">登录授权</van-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="tips">
|
||||
<van-cell-group inset>
|
||||
<van-cell title="公司简介" size="large" icon='/icons/jianjie.png' is-link/>
|
||||
<van-cell title="关于我们" size="large" icon='/icons/about.png' is-link/>
|
||||
<van-cell title="加入我们" size="large" icon='/icons/join.png' is-link/>
|
||||
</van-cell-group>
|
||||
</view>
|
||||
52
wechat/pages/my/my.wxss
Normal file
52
wechat/pages/my/my.wxss
Normal file
@@ -0,0 +1,52 @@
|
||||
/* pages/my/my.wxss */
|
||||
.top{
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 270rpx;
|
||||
background-image: linear-gradient(120deg,#58bcff ,#2b63ff);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.userInfo{
|
||||
width: 85%;
|
||||
height: 200rpx;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
background-color: #ffffff;
|
||||
border-radius: 15rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
box-shadow: 0 0 10rpx #47b6ff;
|
||||
|
||||
}
|
||||
.picture{
|
||||
width: 150rpx;
|
||||
height: 150rpx;
|
||||
border-radius: 50%;
|
||||
margin: 0 60rpx;
|
||||
box-shadow: 0 0 10rpx #a0a0a0;
|
||||
background-color: #6fc5ff;
|
||||
}
|
||||
.picture>image{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.other{
|
||||
flex: 1;
|
||||
height: 160rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-around;
|
||||
}
|
||||
.username{
|
||||
font-size: 42rpx;
|
||||
}
|
||||
.phone{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.tips{
|
||||
margin: 95rpx 0;
|
||||
}
|
||||
Reference in New Issue
Block a user