添加新文件
This commit is contained in:
@@ -0,0 +1,299 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const api_team = require("../../api/team.js");
|
||||
const utils_index = require("../../utils/index.js");
|
||||
const utils_enumUtils = require("../../utils/enumUtils.js");
|
||||
const utils_auth = require("../../utils/auth.js");
|
||||
const api_auth = require("../../api/auth.js");
|
||||
const _sfc_main = {
|
||||
computed: {
|
||||
BALANCE_TYPE() {
|
||||
return utils_enumUtils.BALANCE_TYPE;
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
royaltyForm: {
|
||||
page: 1,
|
||||
pageSize: 15,
|
||||
category: null
|
||||
},
|
||||
royaltyList: [],
|
||||
// 提成来源
|
||||
royaltyLoading: false,
|
||||
currencyShow: false,
|
||||
currencyColumns: [],
|
||||
currencyLoading: false,
|
||||
performanceData: {},
|
||||
selAcctCategory: {},
|
||||
// 选择的账户
|
||||
rewardSummary: {},
|
||||
// 提成统计
|
||||
openTeamShow: false,
|
||||
// 团队业绩的提示
|
||||
openTcShow: false,
|
||||
// 提成统计
|
||||
userData: {}
|
||||
// 当前登录对象
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getUserInfo();
|
||||
this.getPerformance();
|
||||
this.getAcctCategory();
|
||||
},
|
||||
methods: {
|
||||
formatDate: utils_index.formatDate,
|
||||
getValue: utils_enumUtils.getValue,
|
||||
jumpMine() {
|
||||
common_vendor.index.switchTab({
|
||||
// 首页
|
||||
url: "/pages/mine/mine"
|
||||
});
|
||||
},
|
||||
jumpMyTeam() {
|
||||
utils_auth.getStorageFun(utils_auth.USER_DATA);
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/mine_my_team_list/mine_my_team_list"
|
||||
});
|
||||
},
|
||||
// 查询用户信息
|
||||
async getUserInfo() {
|
||||
const result = await api_auth.getUserInfo();
|
||||
if (result && result.bizcode === 100) {
|
||||
result.data;
|
||||
this.userData = result.data || {};
|
||||
}
|
||||
},
|
||||
// 查询团队业绩
|
||||
async getPerformance() {
|
||||
const resp = await api_team.getPerformance();
|
||||
if (resp && resp.bizcode === 100) {
|
||||
this.performanceData = resp.data;
|
||||
}
|
||||
},
|
||||
// 查询账户类型
|
||||
async getAcctCategory() {
|
||||
const resp = await api_team.getAcctCategory();
|
||||
if (resp && resp.bizcode === 100) {
|
||||
const data = resp.data || [];
|
||||
this.currencyColumns = [data];
|
||||
if (data && data.length !== 0) {
|
||||
this.selAcctCategory = data[0];
|
||||
this.royaltyForm.category = data[0].key;
|
||||
this.getRewardSummary();
|
||||
this.loadData();
|
||||
}
|
||||
}
|
||||
},
|
||||
// 选择地址的弹框
|
||||
currencyShowCheck(status) {
|
||||
this.currencyShow = status;
|
||||
},
|
||||
// 提交地址
|
||||
currencyConfirm(e) {
|
||||
const {
|
||||
columnIndex,
|
||||
value,
|
||||
values,
|
||||
index
|
||||
} = e;
|
||||
const data = value[0];
|
||||
this.royaltyList = [];
|
||||
this.royaltyForm.page = 1;
|
||||
this.selAcctCategory = data;
|
||||
this.royaltyForm.category = data.key;
|
||||
this.getRewardSummary();
|
||||
this.loadData();
|
||||
this.currencyShowCheck(false);
|
||||
},
|
||||
// 查询提成概括
|
||||
async getRewardSummary() {
|
||||
const params = {
|
||||
category: this.royaltyForm.category
|
||||
};
|
||||
const resp = await api_team.getRewardSummary(params);
|
||||
if (resp && resp.bizcode === 100) {
|
||||
this.rewardSummary = resp.data || [];
|
||||
}
|
||||
},
|
||||
// 加载数据的方法
|
||||
async loadData() {
|
||||
if (this.royaltyLoading)
|
||||
return;
|
||||
this.royaltyLoading = true;
|
||||
try {
|
||||
const newData = await this.fetchData();
|
||||
if (newData.entitys && newData.entitys.length !== 0) {
|
||||
this.royaltyList = [...this.royaltyList, ...newData.entitys];
|
||||
this.royaltyForm.page++;
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/mine_my_team/mine_my_team.vue:306", "加载数据失败:", error);
|
||||
} finally {
|
||||
this.royaltyLoading = false;
|
||||
}
|
||||
},
|
||||
// 模拟获取数据的方法,实际应用中应该替换为你的数据获取逻辑,例如从服务器获取数据
|
||||
async fetchData() {
|
||||
const params = {
|
||||
...this.royaltyForm
|
||||
};
|
||||
const data = await api_team.getRewardSummaryRecord(params);
|
||||
if (data && data.bizcode === 100 && data.data) {
|
||||
return data.data;
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
// 当滚动到底部时触发的方法
|
||||
loadMore() {
|
||||
this.loadData();
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_up_image2 = common_vendor.resolveComponent("up-image");
|
||||
const _easycom_up_picker2 = common_vendor.resolveComponent("up-picker");
|
||||
const _easycom_up_modal2 = common_vendor.resolveComponent("up-modal");
|
||||
(_easycom_up_image2 + _easycom_up_picker2 + _easycom_up_modal2)();
|
||||
}
|
||||
const _easycom_up_image = () => "../../uni_modules/uview-plus/components/u-image/u-image.js";
|
||||
const _easycom_up_picker = () => "../../uni_modules/uview-plus/components/u-picker/u-picker.js";
|
||||
const _easycom_up_modal = () => "../../uni_modules/uview-plus/components/u-modal/u-modal.js";
|
||||
if (!Math) {
|
||||
(_easycom_up_image + _easycom_up_picker + _easycom_up_modal)();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.o($options.jumpMine),
|
||||
b: common_vendor.p({
|
||||
src: "/static/common/left_b.png",
|
||||
width: "18",
|
||||
height: "20",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
c: common_vendor.p({
|
||||
src: "/static/logo_y.png",
|
||||
width: "50",
|
||||
height: "50",
|
||||
bgColor: "#f1f6ff00",
|
||||
shape: "circle"
|
||||
}),
|
||||
d: common_vendor.t($data.userData.name || "三荣优品用户"),
|
||||
e: common_vendor.t($data.userData.gradeName),
|
||||
f: $data.performanceData && $data.performanceData.seniorId
|
||||
}, $data.performanceData && $data.performanceData.seniorId ? {
|
||||
g: common_vendor.t($data.performanceData.seniorId || 0)
|
||||
} : {}, {
|
||||
h: common_vendor.t($data.performanceData && $data.performanceData.teamCount || 0),
|
||||
i: common_vendor.p({
|
||||
src: "/static/common/right.png",
|
||||
width: "16",
|
||||
height: "16",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
j: common_vendor.o((...args) => $options.jumpMyTeam && $options.jumpMyTeam(...args)),
|
||||
k: common_vendor.o(($event) => {
|
||||
$data.openTeamShow = true;
|
||||
}),
|
||||
l: common_vendor.p({
|
||||
src: "/static/common/tips.png",
|
||||
width: "16",
|
||||
height: "16",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
m: common_vendor.t($data.performanceData && $data.performanceData.teamAmount || 0),
|
||||
n: common_vendor.t($data.performanceData && $data.performanceData.teamNum || 0),
|
||||
o: common_vendor.t($data.performanceData && $data.performanceData.myAmount || 0),
|
||||
p: common_vendor.t($data.performanceData && $data.performanceData.myNum || 0),
|
||||
q: common_vendor.t($data.selAcctCategory && Object.keys($data.selAcctCategory).length !== 0 ? $data.selAcctCategory.value : "请选择"),
|
||||
r: common_vendor.p({
|
||||
src: "/static/common/right.png",
|
||||
width: "16",
|
||||
height: "16",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
s: common_vendor.o(($event) => $options.currencyShowCheck(true)),
|
||||
t: common_vendor.o(($event) => {
|
||||
$data.openTcShow = true;
|
||||
}),
|
||||
v: common_vendor.p({
|
||||
src: "/static/common/tips.png",
|
||||
width: "16",
|
||||
height: "16",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
w: common_vendor.t($data.rewardSummary && $data.rewardSummary.todayAmount || 0),
|
||||
x: common_vendor.t($data.rewardSummary && $data.rewardSummary.unSettleAmount || 0),
|
||||
y: common_vendor.t($data.rewardSummary && $data.rewardSummary.settleAmount || 0),
|
||||
z: $data.royaltyList && $data.royaltyList.length !== 0
|
||||
}, $data.royaltyList && $data.royaltyList.length !== 0 ? {
|
||||
A: common_vendor.f($data.royaltyList, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t($options.getValue($options.BALANCE_TYPE, item.bizType)),
|
||||
b: common_vendor.t($options.formatDate(item.ctdate)),
|
||||
c: common_vendor.t(item.amount),
|
||||
d: common_vendor.t(item.status ? "已结算" : "未结算"),
|
||||
e: index
|
||||
};
|
||||
})
|
||||
} : {
|
||||
B: common_vendor.p({
|
||||
src: "/static/common/not_order.png",
|
||||
width: "80",
|
||||
height: "80",
|
||||
bgColor: "#f1f6ff00"
|
||||
})
|
||||
}, {
|
||||
C: $data.royaltyLoading
|
||||
}, $data.royaltyLoading ? {} : {}, {
|
||||
D: common_vendor.o((...args) => $options.loadMore && $options.loadMore(...args)),
|
||||
E: common_vendor.sr("uPickerRef", "4dcaa8a8-7"),
|
||||
F: common_vendor.o($options.currencyConfirm),
|
||||
G: common_vendor.o(($event) => $data.currencyShow = false),
|
||||
H: common_vendor.o(($event) => $data.currencyShow = false),
|
||||
I: common_vendor.p({
|
||||
show: $data.currencyShow,
|
||||
columns: $data.currencyColumns,
|
||||
loading: $data.currencyLoading,
|
||||
keyName: "value",
|
||||
itemHeight: "34"
|
||||
}),
|
||||
J: common_vendor.p({
|
||||
src: "/static/common/close.png",
|
||||
width: "20",
|
||||
height: "20",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
K: common_vendor.o(($event) => {
|
||||
$data.openTeamShow = false;
|
||||
}),
|
||||
L: common_vendor.o(($event) => {
|
||||
$data.openTeamShow = false;
|
||||
}),
|
||||
M: common_vendor.p({
|
||||
show: $data.openTeamShow,
|
||||
showConfirmButton: false
|
||||
}),
|
||||
N: common_vendor.p({
|
||||
src: "/static/common/close.png",
|
||||
width: "20",
|
||||
height: "20",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
O: common_vendor.o(($event) => {
|
||||
$data.openTcShow = false;
|
||||
}),
|
||||
P: common_vendor.o(($event) => {
|
||||
$data.openTcShow = false;
|
||||
}),
|
||||
Q: common_vendor.p({
|
||||
show: $data.openTcShow,
|
||||
showConfirmButton: false
|
||||
})
|
||||
});
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-4dcaa8a8"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/mine_my_team/mine_my_team.js.map
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"navigationStyle": "custom",
|
||||
"usingComponents": {
|
||||
"up-image": "../../uni_modules/uview-plus/components/u-image/u-image",
|
||||
"up-picker": "../../uni_modules/uview-plus/components/u-picker/u-picker",
|
||||
"up-modal": "../../uni_modules/uview-plus/components/u-modal/u-modal"
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,182 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/* uni.scss */
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
.my_team_warp.data-v-4dcaa8a8 {
|
||||
background-color: #FF7C41;
|
||||
height: calc(100vh - 144rpx);
|
||||
overflow: hidden;
|
||||
padding: 114rpx 30rpx 30rpx;
|
||||
}
|
||||
.my_team_warp .header_.data-v-4dcaa8a8 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.my_team_warp .title_.data-v-4dcaa8a8 {
|
||||
font-weight: bold;
|
||||
font-size: 36rpx;
|
||||
color: #FFFFFF;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.my_team_warp .my_info.data-v-4dcaa8a8 {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
color: #FFFFFF;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
.my_team_warp .my_info .left_.data-v-4dcaa8a8 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.my_team_warp .my_info .left_msg.data-v-4dcaa8a8 {
|
||||
margin-left: 10rpx;
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.my_team_warp .my_info .left_msg_title.data-v-4dcaa8a8 {
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #FFFFFF;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.my_team_warp .my_info .right_.data-v-4dcaa8a8 {
|
||||
font-size: 23rpx;
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
line-height: 33rpx;
|
||||
}
|
||||
.my_team_warp .card_comm.data-v-4dcaa8a8 {
|
||||
background: #FFFFFF;
|
||||
border-radius: 30rpx;
|
||||
padding: 30rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.my_team_warp .card_title_comm.data-v-4dcaa8a8 {
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
color: #111111;
|
||||
}
|
||||
.my_team_warp .card_title_comm2.data-v-4dcaa8a8 {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.my_team_warp .card_fg_comm.data-v-4dcaa8a8 {
|
||||
height: 10rpx;
|
||||
background: #EEEEEE;
|
||||
width: 100%;
|
||||
}
|
||||
.my_team_warp .title_comm.data-v-4dcaa8a8 {
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: #111111;
|
||||
}
|
||||
.my_team_warp .fg_comm.data-v-4dcaa8a8 {
|
||||
width: 1rpx;
|
||||
height: 40rpx;
|
||||
background: #EEEEEE;
|
||||
}
|
||||
.my_team_warp .data_comm.data-v-4dcaa8a8 {
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.my_team_warp .card_item_comm.data-v-4dcaa8a8 {
|
||||
padding: 30rpx;
|
||||
}
|
||||
.my_team_warp .my_team.data-v-4dcaa8a8 {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.my_team_warp .my_team .my_team_count.data-v-4dcaa8a8 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.my_team_warp .performance.data-v-4dcaa8a8 {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.my_team_warp .performance .performance_item.data-v-4dcaa8a8 {
|
||||
width: 24%;
|
||||
text-align: center;
|
||||
}
|
||||
.my_team_warp .royalty_warp.data-v-4dcaa8a8 {
|
||||
border-radius: 30rpx;
|
||||
margin-top: 20rpx;
|
||||
background: #FFFFFF;
|
||||
}
|
||||
.my_team_warp .royalty_warp .amount_item.data-v-4dcaa8a8 {
|
||||
width: 30%;
|
||||
text-align: center;
|
||||
}
|
||||
.my_team_warp .royalty_warp .amount_fg.data-v-4dcaa8a8 {
|
||||
width: 100%;
|
||||
height: 1rpx;
|
||||
background: #EEEEEE;
|
||||
border-radius: 1rpx;
|
||||
margin: 20rpx 0;
|
||||
}
|
||||
.my_team_warp .royalty_list.data-v-4dcaa8a8 {
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.my_team_warp .royalty_list .royalty_item.data-v-4dcaa8a8 {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
background: #F5F5F5;
|
||||
border-radius: 20rpx;
|
||||
padding: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.my_team_warp .royalty_list .royalty_title_.data-v-4dcaa8a8 {
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: #111111;
|
||||
}
|
||||
.my_team_warp .royalty_list .royalty_title_amount.data-v-4dcaa8a8 {
|
||||
color: #FF7C41;
|
||||
}
|
||||
.my_team_warp .royalty_list .royalty_data_.data-v-4dcaa8a8 {
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.my_team_warp .content_1.data-v-4dcaa8a8 {
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
.my_team_warp .content_2.data-v-4dcaa8a8 {
|
||||
text-align: left;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.commission_count.data-v-4dcaa8a8 {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background: rgba(0, 0, 0, 0.06);
|
||||
border-radius: 8rpx;
|
||||
padding: 16rpx 10rpx 16rpx 26rpx;
|
||||
margin-top: 20rpx;
|
||||
font-size: 27rpx;
|
||||
color: rgba(0, 0, 0, 0.4);
|
||||
line-height: 38rpx;
|
||||
}
|
||||
Reference in New Issue
Block a user