|
@@ -28,6 +28,12 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
{field: 'user_id', title: __('ID'), width: 60},
|
|
|
{field: 'user.nickname', title: __('用户昵称'), operate: 'LIKE'},
|
|
|
{field: 'user.mobile', title: __('手机号'), operate: 'LIKE'},
|
|
|
+ {field: 'level_info.name', title: __('分销等级'), formatter: function(value, row, index) {
|
|
|
+ if (row.level_info) {
|
|
|
+ return row.level_info.name + '(等级' + row.level_info.level + ')';
|
|
|
+ }
|
|
|
+ return row.level || '-';
|
|
|
+ }},
|
|
|
{field: 'status', title: __('状态'), searchList: {
|
|
|
"normal": __('正常'),
|
|
|
"pending": __('审核中'),
|
|
@@ -56,6 +62,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
{field: 'total_income', title: __('总收益'), operate: 'BETWEEN'},
|
|
|
{field: 'child_agent_count_1', title: __('直推分销商'), width: 80},
|
|
|
{field: 'child_agent_count_all', title: __('团队分销商'), width: 80},
|
|
|
+ {field: 'child_user_count_all', title: __('团队人数'), width: 80},
|
|
|
{field: 'pending_reward', title: __('待结算佣金'), width: 80},
|
|
|
{field: 'become_time', title: __('成为分销商时间'), operate: 'RANGE', addclass: 'datetimerange', autocomplete: false, formatter: Table.api.formatter.datetime},
|
|
|
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate,
|
|
@@ -72,6 +79,17 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
+ name: 'team',
|
|
|
+ text: __('团队'),
|
|
|
+ title: __('团队'),
|
|
|
+ classname: 'btn btn-xs btn-info btn-dialog',
|
|
|
+ icon: 'fa fa-users',
|
|
|
+ url: 'commission/agent/team',
|
|
|
+ callback: function (data) {
|
|
|
+ table.bootstrapTable('refresh');
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
name: 'edit_status',
|
|
|
text: __('编辑状态'),
|
|
|
title: __('编辑状态'),
|
|
@@ -105,61 +123,445 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
Table.api.bindevent(table);
|
|
|
},
|
|
|
detail: function () {
|
|
|
+ var agentId = Fast.api.query('id');
|
|
|
+ var agentData = {};
|
|
|
+
|
|
|
+ // 获取分销商详情
|
|
|
+ function getDetail() {
|
|
|
+ Fast.api.ajax({
|
|
|
+ url: 'commission/agent/detail',
|
|
|
+ data: {id: agentId}
|
|
|
+ }, function(data) {
|
|
|
+ agentData = data;
|
|
|
+ updateDetailView(data);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ // 更新详情视图
|
|
|
+ function updateDetailView(data) {
|
|
|
+ if (data.user) {
|
|
|
+ $('#user-avatar').attr('src', data.user.avatar || '/assets/img/avatar.png');
|
|
|
+ $('#user-nickname').text(data.user.nickname || data.user_id);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 状态
|
|
|
+ var statusMap = {
|
|
|
+ 'normal': {text: '正常', class: 'label-success'},
|
|
|
+ 'pending': {text: '审核中', class: 'label-warning'},
|
|
|
+ 'freeze': {text: '冻结', class: 'label-info'},
|
|
|
+ 'forbidden': {text: '禁用', class: 'label-danger'},
|
|
|
+ 'reject': {text: '拒绝', class: 'label-danger'}
|
|
|
+ };
|
|
|
+ var status = statusMap[data.status] || {text: data.status, class: 'label-default'};
|
|
|
+ $('#agent-status').text(status.text).attr('class', 'label ' + status.class);
|
|
|
+
|
|
|
+ // 等级
|
|
|
+ if (data.level_info) {
|
|
|
+ $('#agent-level').text(data.level_info.name + '(等级' + data.level_info.level + ')');
|
|
|
+ if (data.level_info.commission_rules) {
|
|
|
+ $('#commission-1').text(data.level_info.commission_rules.commission_1 || '0.00');
|
|
|
+ $('#commission-2').text(data.level_info.commission_rules.commission_2 || '0.00');
|
|
|
+ $('#commission-3').text(data.level_info.commission_rules.commission_3 || '0.00');
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ $('#agent-level').text(data.level);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 待升级等级
|
|
|
+ if (data.level_status > 0 && data.level_status_info) {
|
|
|
+ $('#upgrade-level-group').show();
|
|
|
+ $('#upgrade-level').text(data.level_status_info.name + '(等级' + data.level_status + ')');
|
|
|
+ } else {
|
|
|
+ $('#upgrade-level-group').hide();
|
|
|
+ }
|
|
|
+
|
|
|
+ // 上级分销商
|
|
|
+ if (data.user && data.user.parent_user) {
|
|
|
+ $('#parent-agent').text(data.user.parent_user.nickname || '用户' + data.user.parent_user_id);
|
|
|
+ } else {
|
|
|
+ $('#parent-agent').text('无');
|
|
|
+ }
|
|
|
+
|
|
|
+ // 允许升级
|
|
|
+ $('#upgrade-lock').prop('checked', data.upgrade_lock == 0);
|
|
|
+
|
|
|
+ // 统计数据
|
|
|
+ $('#child-user-count-all').text(data.child_user_count_all || 0);
|
|
|
+ $('#child-user-count-1').text(data.child_user_count_1 || 0);
|
|
|
+ $('#child-agent-count-all').text(data.child_agent_count_all || 0);
|
|
|
+ $('#child-agent-count-1').text(data.child_agent_count_1 || 0);
|
|
|
+ $('#child-order-money-all').text((data.child_order_money_all || 0) + '元');
|
|
|
+ $('#child-order-count-all').text(data.child_order_count_all || 0);
|
|
|
+ $('#child-order-money-1').text((data.child_order_money_1 || 0) + '元');
|
|
|
+ $('#child-order-count-1').text(data.child_order_count_1 || 0);
|
|
|
+ $('#total-income').text((data.total_income || 0) + '元');
|
|
|
+ $('#pending-reward').text((data.pending_reward || 0) + '元');
|
|
|
+ $('#total-consume').text(((data.user && data.user.total_consume) || 0) + '元');
|
|
|
+
|
|
|
+ // 申请信息
|
|
|
+ if (data.apply_info && data.apply_info.length > 0) {
|
|
|
+ var applyHtml = '<form class="form-horizontal">';
|
|
|
+ data.apply_info.forEach(function(item) {
|
|
|
+ applyHtml += '<div class="form-group">';
|
|
|
+ applyHtml += '<label class="col-sm-3 control-label">' + item.name + ':</label>';
|
|
|
+ applyHtml += '<div class="col-sm-9">';
|
|
|
+ if (item.type === 'image') {
|
|
|
+ applyHtml += '<img src="' + item.value + '" style="max-width: 200px; max-height: 120px;">';
|
|
|
+ } else {
|
|
|
+ applyHtml += '<p class="form-control-static">' + item.value + '</p>';
|
|
|
+ }
|
|
|
+ applyHtml += '</div></div>';
|
|
|
+ });
|
|
|
+ applyHtml += '</form>';
|
|
|
+ $('#apply-info').html(applyHtml);
|
|
|
+ } else {
|
|
|
+ $('#apply-info').html('<p class="text-muted">暂无申请信息</p>');
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 详情页面特有的全局函数
|
|
|
+ window.changeStatus = function(userId, currentStatus) {
|
|
|
+ Layer.prompt({
|
|
|
+ title: '修改状态',
|
|
|
+ formType: 2,
|
|
|
+ value: currentStatus,
|
|
|
+ select: ['normal', 'pending', 'freeze', 'forbidden', 'reject'],
|
|
|
+ selectTips: ['正常', '审核中', '冻结', '禁用', '拒绝']
|
|
|
+ }, function(value, index) {
|
|
|
+ Fast.api.ajax({
|
|
|
+ url: 'commission/agent/edit',
|
|
|
+ data: {ids: userId, status: value}
|
|
|
+ }, function() {
|
|
|
+ Layer.close(index);
|
|
|
+ location.reload();
|
|
|
+ });
|
|
|
+ });
|
|
|
+ };
|
|
|
+
|
|
|
+ window.changeLevel = function(userId) {
|
|
|
+ Toastr.info('等级修改功能待完善');
|
|
|
+ };
|
|
|
+
|
|
|
+ window.changeParentUser = function(userId) {
|
|
|
+ Fast.api.open('commission/agent/select?id=' + userId, '更换上级分销商', {
|
|
|
+ callback: function() {
|
|
|
+ location.reload();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ };
|
|
|
+
|
|
|
+ window.approveLevel = function(userId, levelStatus) {
|
|
|
+ Fast.api.ajax({
|
|
|
+ url: 'commission/agent/edit',
|
|
|
+ data: {ids: userId, level_status: levelStatus}
|
|
|
+ }, function() {
|
|
|
+ location.reload();
|
|
|
+ });
|
|
|
+ };
|
|
|
+
|
|
|
+ window.rejectLevel = function(userId) {
|
|
|
+ Fast.api.ajax({
|
|
|
+ url: 'commission/agent/edit',
|
|
|
+ data: {ids: userId, level_status: 0}
|
|
|
+ }, function() {
|
|
|
+ location.reload();
|
|
|
+ });
|
|
|
+ };
|
|
|
+
|
|
|
+ window.toggleUpgradeLock = function(userId, currentLock) {
|
|
|
+ var newLock = currentLock == 0 ? 1 : 0;
|
|
|
+ Fast.api.ajax({
|
|
|
+ url: 'commission/agent/edit',
|
|
|
+ data: {ids: userId, upgrade_lock: newLock}
|
|
|
+ }, function() {
|
|
|
+ location.reload();
|
|
|
+ });
|
|
|
+ };
|
|
|
+
|
|
|
+ window.viewTeam = function(userId) {
|
|
|
+ Fast.api.open('commission/agent/team?id=' + userId, '查看团队');
|
|
|
+ };
|
|
|
+
|
|
|
+ // 事件绑定
|
|
|
+ $(document).ready(function() {
|
|
|
+ $('.btn-refresh').click(function() {
|
|
|
+ location.reload();
|
|
|
+ });
|
|
|
+
|
|
|
+ $('#refresh-detail').click(function() {
|
|
|
+ getDetail();
|
|
|
+ });
|
|
|
+
|
|
|
+ $('#edit-status').click(function() {
|
|
|
+ Layer.prompt({
|
|
|
+ title: '修改状态',
|
|
|
+ formType: 2,
|
|
|
+ value: agentData.status,
|
|
|
+ select: ['normal', 'pending', 'freeze', 'forbidden', 'reject'],
|
|
|
+ selectTips: ['正常', '审核中', '冻结', '禁用', '拒绝']
|
|
|
+ }, function(value, index) {
|
|
|
+ Fast.api.ajax({
|
|
|
+ url: 'commission/agent/edit',
|
|
|
+ data: {ids: agentId, status: value}
|
|
|
+ }, function() {
|
|
|
+ Layer.close(index);
|
|
|
+ getDetail();
|
|
|
+ });
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ $('#change-parent').click(function() {
|
|
|
+ Fast.api.open('commission/agent/select?id=' + agentId, '更换上级分销商', {
|
|
|
+ callback: function() {
|
|
|
+ getDetail();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ $('#upgrade-lock').change(function() {
|
|
|
+ var value = $(this).is(':checked') ? 0 : 1;
|
|
|
+ Fast.api.ajax({
|
|
|
+ url: 'commission/agent/edit',
|
|
|
+ data: {ids: agentId, upgrade_lock: value}
|
|
|
+ }, function() {
|
|
|
+ getDetail();
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ $('#approve-level').click(function() {
|
|
|
+ Fast.api.ajax({
|
|
|
+ url: 'commission/agent/edit',
|
|
|
+ data: {ids: agentId, level_status: agentData.level_status}
|
|
|
+ }, function() {
|
|
|
+ getDetail();
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ $('#reject-level').click(function() {
|
|
|
+ Fast.api.ajax({
|
|
|
+ url: 'commission/agent/edit',
|
|
|
+ data: {ids: agentId, level_status: 0}
|
|
|
+ }, function() {
|
|
|
+ getDetail();
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ // 初始化
|
|
|
+ if (agentId) {
|
|
|
+ getDetail();
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
Controller.api.bindevent();
|
|
|
},
|
|
|
select: function () {
|
|
|
- // 初始化表格参数
|
|
|
- Table.api.init({
|
|
|
- extend: {
|
|
|
- index_url: 'commission/agent/select' + location.search,
|
|
|
+ var userId = Fast.api.query('id');
|
|
|
+ var selectedParentId = null;
|
|
|
+ var currentPage = 1;
|
|
|
+ var pageSize = 10;
|
|
|
+
|
|
|
+ // 获取当前用户信息
|
|
|
+ function getCurrentUserInfo() {
|
|
|
+ Fast.api.ajax({
|
|
|
+ url: 'commission/agent/detail',
|
|
|
+ data: {id: userId}
|
|
|
+ }, function(data) {
|
|
|
+ var html = '<label>当前推荐人:</label>';
|
|
|
+ if (data.user && data.user.parent_user) {
|
|
|
+ html += '<img src="' + (data.user.parent_user.avatar || '/assets/img/avatar.png') + '" ';
|
|
|
+ html += 'style="width: 20px; height: 20px; border-radius: 50%; margin-right: 5px;">';
|
|
|
+ html += (data.user.parent_user.nickname || '用户' + data.user.parent_user_id);
|
|
|
+ selectedParentId = data.user.parent_user_id;
|
|
|
+ } else {
|
|
|
+ html += '无';
|
|
|
+ selectedParentId = 0;
|
|
|
+ }
|
|
|
+ $('#current-parent').html(html);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ // 获取分销商列表
|
|
|
+ function getAgentList() {
|
|
|
+ var searchType = $('#search-type').val();
|
|
|
+ var searchValue = $('#search-value').val();
|
|
|
+ var searchData = {
|
|
|
+ page: currentPage,
|
|
|
+ limit: pageSize
|
|
|
+ };
|
|
|
+
|
|
|
+ if (searchValue) {
|
|
|
+ searchData[searchType] = searchValue;
|
|
|
}
|
|
|
- });
|
|
|
|
|
|
- var table = $("#table");
|
|
|
+ Fast.api.ajax({
|
|
|
+ url: 'commission/agent/select',
|
|
|
+ data: searchData
|
|
|
+ }, function(ret) {
|
|
|
+ var html = '';
|
|
|
+ if (ret.data.rows && ret.data.rows.length > 0) {
|
|
|
+ ret.data.rows.forEach(function(item) {
|
|
|
+ var statusClass = '';
|
|
|
+ var statusText = '';
|
|
|
+ switch(item.status) {
|
|
|
+ case 'normal':
|
|
|
+ statusClass = 'label-success';
|
|
|
+ statusText = '正常';
|
|
|
+ break;
|
|
|
+ case 'pending':
|
|
|
+ statusClass = 'label-warning';
|
|
|
+ statusText = '审核中';
|
|
|
+ break;
|
|
|
+ case 'freeze':
|
|
|
+ statusClass = 'label-info';
|
|
|
+ statusText = '冻结';
|
|
|
+ break;
|
|
|
+ case 'forbidden':
|
|
|
+ statusClass = 'label-danger';
|
|
|
+ statusText = '禁用';
|
|
|
+ break;
|
|
|
+ case 'reject':
|
|
|
+ statusClass = 'label-danger';
|
|
|
+ statusText = '拒绝';
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ statusClass = 'label-default';
|
|
|
+ statusText = item.status;
|
|
|
+ }
|
|
|
|
|
|
- // 初始化表格
|
|
|
- table.bootstrapTable({
|
|
|
- url: $.fn.bootstrapTable.defaults.extend.index_url,
|
|
|
- pk: 'user_id',
|
|
|
- sortName: 'user_id',
|
|
|
- columns: [
|
|
|
- [
|
|
|
- {checkbox: true},
|
|
|
- {field: 'user_id', title: __('ID'), width: 60},
|
|
|
- {field: 'user.nickname', title: __('用户昵称'), operate: 'LIKE'},
|
|
|
- {field: 'user.mobile', title: __('手机号'), operate: 'LIKE'},
|
|
|
- {field: 'level_info.name', title: __('分销等级')},
|
|
|
- {field: 'status', title: __('状态'), searchList: {
|
|
|
- "normal": __('正常'),
|
|
|
- "pending": __('审核中'),
|
|
|
- "freeze": __('冻结'),
|
|
|
- "forbidden": __('禁用'),
|
|
|
- "reject": __('拒绝')
|
|
|
- }, formatter: Table.api.formatter.status},
|
|
|
- {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate,
|
|
|
- buttons: [
|
|
|
- {
|
|
|
- name: 'choose',
|
|
|
- text: __('选择'),
|
|
|
- title: __('选择'),
|
|
|
- classname: 'btn btn-xs btn-primary btn-choose',
|
|
|
- icon: 'fa fa-check',
|
|
|
- click: function (data) {
|
|
|
- var multiple = Backend.api.query('multiple');
|
|
|
- multiple = multiple == 'true' ? true : false;
|
|
|
- Fast.api.close(data);
|
|
|
- }
|
|
|
- }
|
|
|
- ],
|
|
|
- formatter: Table.api.formatter.operate}
|
|
|
- ]
|
|
|
- ]
|
|
|
- });
|
|
|
+ html += '<tr' + (selectedParentId == item.user_id ? ' class="warning"' : '') + '>';
|
|
|
+ html += '<td><input type="radio" name="parent_agent" value="' + item.user_id + '"' + (selectedParentId == item.user_id ? ' checked' : '') + '></td>';
|
|
|
+ html += '<td>' + item.user_id + '</td>';
|
|
|
+ html += '<td>';
|
|
|
+ html += '<img src="' + (item.user.avatar || '/assets/img/avatar.png') + '" style="width: 32px; height: 32px; border-radius: 50%; margin-right: 5px;">';
|
|
|
+ html += (item.user.nickname || '用户' + item.user_id);
|
|
|
+ html += '</td>';
|
|
|
+ html += '<td>';
|
|
|
+ if (item.level_info) {
|
|
|
+ html += item.level_info.name + '<br><small>等级' + item.level_info.level + '</small>';
|
|
|
+ } else {
|
|
|
+ html += '等级' + item.level;
|
|
|
+ }
|
|
|
+ html += '</td>';
|
|
|
+ html += '<td>' + (item.user.mobile || '-') + '</td>';
|
|
|
+ html += '<td><span class="label ' + statusClass + '">' + statusText + '</span></td>';
|
|
|
+ html += '<td>';
|
|
|
+ if (selectedParentId == item.user_id) {
|
|
|
+ html += '<span class="text-success">已选择</span>';
|
|
|
+ } else {
|
|
|
+ html += '<button type="button" class="btn btn-xs btn-primary" onclick="selectAgent(' + item.user_id + ')">选择</button>';
|
|
|
+ }
|
|
|
+ html += '</td>';
|
|
|
+ html += '</tr>';
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ html = '<tr><td colspan="7" class="text-center">暂无数据</td></tr>';
|
|
|
+ }
|
|
|
+ $('#agent-list').html(html);
|
|
|
|
|
|
- // 为表格绑定事件
|
|
|
- Table.api.bindevent(table);
|
|
|
+ // 更新分页
|
|
|
+ updatePagination(ret.data.total);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ // 更新分页
|
|
|
+ function updatePagination(total) {
|
|
|
+ var totalPages = Math.ceil(total / pageSize);
|
|
|
+ var html = '<ul class="pagination">';
|
|
|
+
|
|
|
+ // 上一页
|
|
|
+ if (currentPage > 1) {
|
|
|
+ html += '<li><a href="javascript:;" onclick="changePage(' + (currentPage - 1) + ')">上一页</a></li>';
|
|
|
+ }
|
|
|
+
|
|
|
+ // 页码
|
|
|
+ for (var i = 1; i <= totalPages; i++) {
|
|
|
+ if (i == currentPage) {
|
|
|
+ html += '<li class="active"><a href="javascript:;">' + i + '</a></li>';
|
|
|
+ } else {
|
|
|
+ html += '<li><a href="javascript:;" onclick="changePage(' + i + ')">' + i + '</a></li>';
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 下一页
|
|
|
+ if (currentPage < totalPages) {
|
|
|
+ html += '<li><a href="javascript:;" onclick="changePage(' + (currentPage + 1) + ')">下一页</a></li>';
|
|
|
+ }
|
|
|
+
|
|
|
+ html += '</ul>';
|
|
|
+ $('#pagination').html(html);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 选择页面特有的全局函数
|
|
|
+ window.searchAgent = function() {
|
|
|
+ currentPage = 1;
|
|
|
+ getAgentList();
|
|
|
+ };
|
|
|
+
|
|
|
+ window.selectAgent = function(agentId) {
|
|
|
+ selectedParentId = agentId;
|
|
|
+ $('input[name="parent_agent"]').prop('checked', false);
|
|
|
+ $('input[value="' + agentId + '"]').prop('checked', true);
|
|
|
+ $('#agent-table tbody tr').removeClass('warning');
|
|
|
+ $('input[value="' + agentId + '"]').closest('tr').addClass('warning');
|
|
|
+ $('#set-platform').prop('checked', false);
|
|
|
+ };
|
|
|
+
|
|
|
+ window.changePage = function(page) {
|
|
|
+ currentPage = page;
|
|
|
+ getAgentList();
|
|
|
+ };
|
|
|
+
|
|
|
+ window.confirmChange = function() {
|
|
|
+ if (selectedParentId === null) {
|
|
|
+ Toastr.error('请选择上级分销商');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ Fast.api.ajax({
|
|
|
+ url: 'commission/agent/changeParentUser',
|
|
|
+ data: {
|
|
|
+ id: userId,
|
|
|
+ parent_user_id: selectedParentId
|
|
|
+ }
|
|
|
+ }, function() {
|
|
|
+ Toastr.success('更换成功');
|
|
|
+ Fast.api.close();
|
|
|
+ });
|
|
|
+ };
|
|
|
+
|
|
|
+ // 事件绑定
|
|
|
+ $(document).ready(function() {
|
|
|
+ // 设为平台直推
|
|
|
+ $('#set-platform').change(function() {
|
|
|
+ if ($(this).is(':checked')) {
|
|
|
+ selectedParentId = 0;
|
|
|
+ $('input[name="parent_agent"]').prop('checked', false);
|
|
|
+ $('#agent-table tbody tr').removeClass('warning');
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ // 搜索框回车事件
|
|
|
+ $('#search-value').keypress(function(e) {
|
|
|
+ if (e.which == 13) {
|
|
|
+ searchAgent();
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ // 初始化
|
|
|
+ getCurrentUserInfo();
|
|
|
+ getAgentList();
|
|
|
+ });
|
|
|
},
|
|
|
team: function () {
|
|
|
+ // 团队页面特有的全局函数
|
|
|
+ window.viewTeam = function(userId) {
|
|
|
+ Fast.api.open('commission/agent/team?id=' + userId, '查看团队');
|
|
|
+ };
|
|
|
+
|
|
|
+ window.viewDetail = function(userId) {
|
|
|
+ Fast.api.open('commission/agent/detail?id=' + userId, '分销商详情');
|
|
|
+ };
|
|
|
+
|
|
|
Controller.api.bindevent();
|
|
|
},
|
|
|
api: {
|