Initial Commit
This commit is contained in:
87
pages/my/ourteam/ourteam.js
Normal file
87
pages/my/ourteam/ourteam.js
Normal file
@ -0,0 +1,87 @@
|
||||
// pages/ourteam/ourteam.js
|
||||
const app = getApp();
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
bgImg: app.globalData.bgImg,
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
wx.showLoading({
|
||||
title: '加载中..',
|
||||
})
|
||||
wx.request({
|
||||
url: app.globalData.ip + '/wisdommining/api/user/getTeam',
|
||||
method: 'GET',
|
||||
header: {
|
||||
"content-type": "application/x-www-form-urlencoded",
|
||||
},
|
||||
data: {
|
||||
userId: app.globalData.userId
|
||||
},
|
||||
success: res => {
|
||||
wx.hideLoading()
|
||||
console.log(res)
|
||||
if (res.data.code == 1) {
|
||||
this.setData({
|
||||
dataList: res.data.value,
|
||||
})
|
||||
} else {
|
||||
wx.showModal({
|
||||
title: '提示!',
|
||||
content: res.data.message,
|
||||
showCancel: false,
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
})
|
4
pages/my/ourteam/ourteam.json
Normal file
4
pages/my/ourteam/ourteam.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "我的团队"
|
||||
}
|
29
pages/my/ourteam/ourteam.wxml
Normal file
29
pages/my/ourteam/ourteam.wxml
Normal file
@ -0,0 +1,29 @@
|
||||
<!--pages/ourteam/ourteam.wxml-->
|
||||
<view class="main">
|
||||
<view class="line"></view>
|
||||
<view class="top display_J_B">
|
||||
<view>一级人数({{dataList.oneLevelNum}}人)</view>
|
||||
<view>二级人数({{dataList.twoLevelNum}}人)</view>
|
||||
</view>
|
||||
<view class="one" wx:if='{{dataList.superiorUser!=null}}'>
|
||||
<view class="one-title">我的上级</view>
|
||||
<view class="one-list display_J_B display_A_C">
|
||||
<view class="one-list-left display_J_S display_A_C">
|
||||
<image src="{{dataList.superiorUser.wxPhoto}}"></image>
|
||||
<view>{{dataList.superiorUser.wxNickname}}</view>
|
||||
</view>
|
||||
<view class="one-list-right">{{dataList.superiorUser.userPhone==''||dataList.superiorUser.userPhone==null?'暂无联系方式':dataList.superiorUser.userPhone}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="one-team">
|
||||
<view class="one-title">直属成员</view>
|
||||
<view class="one-list display_J_B display_A_C" wx:for="{{dataList.underUserList}}" wx:key='index'>
|
||||
<view class="one-list-left display_J_S display_A_C">
|
||||
<image src="{{item.wxPhoto}}"></image>
|
||||
<view style="color: #212320;">{{item.wxNickname}}</view>
|
||||
</view>
|
||||
<view class="one-list-right">{{item.userPhone==null||item.userPhone==''?'暂无联系方式':item.userPhone}}</view>
|
||||
</view>
|
||||
<view class="none-text" wx:if='{{dataList.underUserList.length==0}}'>暂无一级成员快去邀请更多好友~</view>
|
||||
</view>
|
||||
</view>
|
66
pages/my/ourteam/ourteam.wxss
Normal file
66
pages/my/ourteam/ourteam.wxss
Normal file
@ -0,0 +1,66 @@
|
||||
/* pages/ourteam/ourteam.wxss */
|
||||
|
||||
.line {
|
||||
width: 750rpx;
|
||||
height: 30rpx;
|
||||
background: #f5f5f5;
|
||||
}
|
||||
|
||||
.top {
|
||||
width: 650rpx;
|
||||
height: 100rpx;
|
||||
background-color: #f4e2d3;
|
||||
border-radius: 20rpx 20rpx 0rpx 0rpx;
|
||||
font-size: 36rpx;
|
||||
line-height: 100rpx;
|
||||
color: #ee7b1e;
|
||||
text-align: center;
|
||||
padding: 0 50rpx;
|
||||
}
|
||||
|
||||
.one {
|
||||
width: 690rpx;
|
||||
height: 235rpx;
|
||||
margin: 0 auto;
|
||||
border-bottom: 1rpx solid #e5e5e5;
|
||||
}
|
||||
|
||||
.one-title {
|
||||
font-size: 36rpx;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
margin: 40rpx 0rpx 60rpx 0rpx;
|
||||
}
|
||||
|
||||
.one-list {
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
margin-bottom: 36rpx;
|
||||
}
|
||||
|
||||
.one-list-left image {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
background-color: #f5f5f5;
|
||||
border-radius: 100%;
|
||||
}
|
||||
|
||||
.one-list-left view {
|
||||
font-size: 28rpx;
|
||||
color: #ee7b1e;
|
||||
margin-left: 28rpx;
|
||||
}
|
||||
.one-list-right{
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
}
|
||||
.one-team{
|
||||
width: 690rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.none-text{
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
text-align: center;
|
||||
margin-top: 260rpx;
|
||||
}
|
Reference in New Issue
Block a user