Commit 7b5a7635 by wangyalan-git

分佣

parent 0a1bbdd9
......@@ -18,7 +18,6 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
......
......@@ -97,6 +97,7 @@ page {
.offList{
font-size: 30rpx;
color: #999999;
margin-top: 20rpx;
}
.li-head{
......
......@@ -12,7 +12,8 @@ Page({
getTabs: 0,
list: [],
pageNum: 1,
total: 0
total: 0,
userId: null
},
// 选项卡切换
......@@ -20,7 +21,12 @@ Page({
this.setData({ getTabs: data.currentTarget.dataset.index, list: [] })
this.userMyTeam(data.currentTarget.dataset.index)
},
goPage(e) {
let url = e.currentTarget.dataset.url
wx.navigateTo({
url: url,
})
},
// 列表内容
getList() {
var that = this
......@@ -28,7 +34,7 @@ Page({
url: "/commission/getOrderPageList",
method: "GET",
data: {
userId: app.globalData.userInfo.userId,
userId: this.data.userId,
pageNum: this.data.pageNum,
pageSize: 10
},
......@@ -41,7 +47,7 @@ Page({
list: list,
total: res.result.total
})
console.log('list',that.data.list)
console.log('list', that.data.list)
}
};
http.request(params);
......@@ -51,7 +57,7 @@ Page({
url: "/commission/getParentName",
method: "GET",
data: {
userId: app.globalData.userInfo.userId
userId: this.data.userId
},
callBack: (res) => {
this.setData({
......@@ -65,7 +71,6 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.getParentName()
},
/**
......@@ -79,13 +84,15 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
console.log("options", this.options.userId)
this.setData({
userId: this.options.userId ? this.options.userId : app.globalData.userInfo.userId,
list: [],
pageNum: 1,
total: 0
})
this.getParentName()
this.getList();
},
/**
......
......@@ -2,12 +2,12 @@
<view class="page">
<!-- 选项卡 -->
<view class="user-info-show">
<image class="user-portrait" src="{{pageInfo.pic}}"></image>
<view class="user-name">
<view>{{pageInfo.nickName}}</view>
<view>推荐人:您是由{{pageInfo.parentNickName}}推荐</view>
</view>
<image class="user-portrait" src="{{pageInfo.pic}}"></image>
<view class="user-name">
<view>{{pageInfo.nickName}}</view>
<view>我的推荐人:您是由{{pageInfo.parentNickName}}推荐</view>
</view>
</view>
<!-- <view class="tabs">
<view wx:for="{{tabs}}" wx:key="index" bindtap="tabsGet" data-index="{{index}}"
class="{{getTabs == index ? 'tabsTrue' : 'tabsFalse'}}">{{item.name}}</view>
......@@ -16,11 +16,11 @@
<!-- 列表展示 -->
<view class="list-box">
<!-- 列表展示 -->
<view class="li-box" wx:for="{{list}}" wx:key="index">
<view class="li-box" wx:for="{{list}}" wx:key="index" bindtap="goPage" data-url="/pages/userAccount/myTeam/index?userId={{item.userId}}">
<image src="{{item.pic}}"></image>
<view class="li-user">
<text>会员名称:{{item.nickName}}</text>
<text>成为会员:{{itme.userRegtime}}</text>
<view>{{item.nickName}}</view>
<text>{{item.userRegtime}}</text>
</view>
<view class="li-num">
<text>¥{{item.orderAmount}}</text>
......
......@@ -99,7 +99,7 @@ page {
.li-user{
flex: 1;
display: flex;
align-items: center;
/* align-items: center; */
flex-direction: column;
font-size: 30rpx;
}
......@@ -110,6 +110,8 @@ page {
.li-user text:nth-child(2){
color: #999999;
font-size: 26rpx;
margin-top: 10rpx;
}
.li-num{
......@@ -133,6 +135,7 @@ page {
}
.offList{
font-size: 30rpx;
font-size: 28rpx;
color: #999999;
margin-top: 20rpx;
}
\ No newline at end of file
......@@ -86,8 +86,9 @@ page {
}
.offList{
font-size: 30rpx;
font-size: 28rpx;
color: #999999;
margin-top: 20rpx;
}
.li-head{
......
var domain = "http://192.168.31.132:8086/capi"; //统一接口域名,测试环境
var domain = "http://192.168.31.118:8086/capi"; //统一接口域名,测试环境
exports.domain = domain;
......@@ -22,11 +22,19 @@ function request(params, isGetTonken) {
responseType: params.responseType == undefined ? 'text' : params.responseType,
success: function (res) {
if (res.statusCode == 200) {
console.log(res.data.code)
//如果有定义了params.callBack,则调用 params.callBack(res.data)
if (params.callBack) {
params.callBack(res.data);
}
if (res.data.code == undefined || res.data.code == 1) {
if (params.callBack) {
params.callBack(res.data);
}
} else {
wx.showToast({
title: res.data.note,
icon: "none"
});
}
} else if (res.statusCode == 500) {
wx.showToast({
title: "服务器出了点小差",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment