解决了已知问题
This commit is contained in:
78
pages/tuiguangma/tuiguangma.js
Normal file
78
pages/tuiguangma/tuiguangma.js
Normal file
@ -0,0 +1,78 @@
|
||||
// pages/tuiguangma/tuiguangma.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
console.log("页面展示 onShow");
|
||||
try {
|
||||
const userInfo = wx.getStorageSync('usermessage');
|
||||
console.log('用户信息:', userInfo);
|
||||
this.setData({
|
||||
nickName: userInfo.nickName || '',
|
||||
phoneNumber: userInfo.phoneNumber || '',
|
||||
invitationCode: userInfo.invitationCode || '',
|
||||
userAvatar: userInfo.userAvatar || 'https://tse2-mm.cn.bing.net/th/id/OIP-C.jHUH4s7TQ48X_B-1iozuJgHaHa?w=207&h=207&c=7&r=0&o=5&dpr=1.5&pid=1.7'
|
||||
});
|
||||
} catch (e) {
|
||||
console.error('读取缓存失败:', e);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
4
pages/tuiguangma/tuiguangma.json
Normal file
4
pages/tuiguangma/tuiguangma.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"navigationBarTitleText": "我的推广码",
|
||||
"usingComponents": {}
|
||||
}
|
14
pages/tuiguangma/tuiguangma.wxml
Normal file
14
pages/tuiguangma/tuiguangma.wxml
Normal file
@ -0,0 +1,14 @@
|
||||
<view class="box">
|
||||
<view class="shangmian">
|
||||
<view class="zuobox">
|
||||
<image class="touxiangsize" src="{{userAvatar}}" mode="aspectFill"/>
|
||||
</view>
|
||||
<view class="youbox">
|
||||
<text style="font-size:20px;margin-top:20rpx;">{{nickName}}</text>
|
||||
<text style="font-size: 12px;margin-top: 10rpx;color: rgb(175, 170, 170);" >扫一扫下面的二维码,和我一起赚钱</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="minbox">
|
||||
<image class="imagesize" src="/image/1a3b2db58d7a4912e97e11e769fc1dc5.png" mode=""/>
|
||||
</view>
|
||||
</view>
|
42
pages/tuiguangma/tuiguangma.wxss
Normal file
42
pages/tuiguangma/tuiguangma.wxss
Normal file
@ -0,0 +1,42 @@
|
||||
.box{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
padding-bottom: 200rpx;
|
||||
}
|
||||
.shangmian{
|
||||
width: 260px;
|
||||
height: 80px;
|
||||
display: flex;
|
||||
}
|
||||
.imagesize{
|
||||
width: 260px;
|
||||
height: 260px;
|
||||
}
|
||||
.minbox{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
.touxiangsize{
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.zuobox{
|
||||
width: 25%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.youbox{
|
||||
width: 75%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
Reference in New Issue
Block a user