初始化
This commit is contained in:
@@ -0,0 +1,101 @@
|
||||
const {
|
||||
etmsPost
|
||||
} = require("../../com");
|
||||
const app = getApp();
|
||||
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
tenantId: null,
|
||||
userAccount: {},
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(query) {
|
||||
this.setData({
|
||||
tenantId: query.tenantId
|
||||
});
|
||||
etmsPost(
|
||||
app.globalData,
|
||||
"openParent2/WxMiniUserAccountGet", {
|
||||
tenantId: query.tenantId
|
||||
},
|
||||
(data) => {
|
||||
console.log(data);
|
||||
this.setData({
|
||||
userAccount: data
|
||||
});
|
||||
}
|
||||
);
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
},
|
||||
goEarningsDetails0() {
|
||||
wx.navigateTo({
|
||||
url: `/pages/earningsDetails/index?tenantId=${this.data.tenantId}&type=0`,
|
||||
})
|
||||
},
|
||||
goEarningsDetails1() {
|
||||
wx.navigateTo({
|
||||
url: `/pages/earningsDetails/index?tenantId=${this.data.tenantId}&type=1`,
|
||||
})
|
||||
|
||||
},
|
||||
goEarningsDetails() {
|
||||
wx.navigateTo({
|
||||
url: `/pages/earningsDetails/index?tenantId=${this.data.tenantId}`,
|
||||
})
|
||||
},
|
||||
})
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"navigationBarTitleText": "我的奖励",
|
||||
"usingComponents": {
|
||||
"t-icon": "tdesign-miniprogram/icon/icon"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
<view class="mr-page">
|
||||
<view class="mr-bg">
|
||||
<image src="/image/mr-bg.svg" />
|
||||
</view>
|
||||
<view class="mr-info-card">
|
||||
<view class="mr-portrait-outter">
|
||||
<view class="mr-portrait">
|
||||
<image src="{{userAccount.avatarUrl}}" mode="aspectFill" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="mr-name align-center">{{userAccount.nickName}}</view>
|
||||
<view class="mr-text align-center" style="margin-top: 1em;">我的总收益(元)
|
||||
<text wx:if="{{userAccount.totalDrawsMoney}}" class="mr-money_totalDrawsMoney">已提现¥{{userAccount.totalDrawsMoney}}</text>
|
||||
</view>
|
||||
<view class="mr-money align-center">{{userAccount.totalAmount}}
|
||||
</view>
|
||||
<view class="mr-data-box" style="margin-top: 0.5rem">
|
||||
<view class="mr-data-box__item">
|
||||
<view class="mr-data-box__item-title">我的邀请</view>
|
||||
</view>
|
||||
<view class="mr-data-box__item">
|
||||
<view class="mr-data-box__item-title">{{userAccount.firstBillCount}}</view>
|
||||
<view class="mr-data-box__item-label">成单数</view>
|
||||
</view>
|
||||
<view class="mr-data-box__item">
|
||||
<view class="mr-data-box__item-title">{{userAccount.firstAmount}}</view>
|
||||
<view class="mr-data-box__item-label" bindtap="goEarningsDetails0">收益></view>
|
||||
</view>
|
||||
<view class="mr-data-box__item">
|
||||
<view class="mr-data-box__item-title">下级邀请</view>
|
||||
</view>
|
||||
<view class="mr-data-box__item">
|
||||
<view class="mr-data-box__item-title">{{userAccount.secondBillCount}}</view>
|
||||
<view class="mr-data-box__item-label">成单数</view>
|
||||
</view>
|
||||
<view class="mr-data-box__item">
|
||||
<view class="mr-data-box__item-title">{{userAccount.secondAmount}}</view>
|
||||
<view class="mr-data-box__item-label" bindtap="goEarningsDetails1">收益></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mr-text flex" style="margin-top: 1em;">
|
||||
<t-icon name="error-circle-filled" size="14px" custom-style="line-height: 1.5; margin-right: 0.25em" />
|
||||
由于微信限制,收益暂且只能由商家线下进行转账支付,商家将会主动联系您统一发放收益金额。
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -0,0 +1,107 @@
|
||||
.flex {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.align-center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.mr-page {
|
||||
position: relative;
|
||||
padding: 1rem;
|
||||
background-color: #f6f5f7;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.mr-bg {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 50vw;
|
||||
}
|
||||
|
||||
.mr-bg image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.mr-info-card {
|
||||
position: relative;
|
||||
margin-top: 100px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.mr-portrait-outter {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.mr-portrait {
|
||||
background-color: #fff;
|
||||
margin-top: -50px;
|
||||
border: 4px solid #fff;
|
||||
border-radius: 50%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.mr-portrait>image {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
}
|
||||
|
||||
.mr-name {
|
||||
font-size: 16;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.mr-text {
|
||||
font-size: 14px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.mr-text-icon {
|
||||
line-height: 2;
|
||||
}
|
||||
|
||||
.mr-money {
|
||||
font-size: 28px;
|
||||
color: #dd6150;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.mr-data-box {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
background-color: #d2d0d6;
|
||||
gap: 1px;
|
||||
border-radius: 0.5rem;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.mr-data-box__item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: #f8f7fd;
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
||||
.mr-data-box__item-title {
|
||||
font-weight: bold;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.mr-data-box__item-label {
|
||||
font-size: 14px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.mr-money_totalDrawsMoney {
|
||||
font-size: 14px;
|
||||
color: #E6A23C;
|
||||
}
|
||||
Reference in New Issue
Block a user