first commit

This commit is contained in:
PC-202306242200\Administrator
2026-03-28 23:09:02 +08:00
commit dac42e3b0c
3512 changed files with 181637 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
.xkl_cur {
border: 1px solid #26418a;
color: #26418a;
}
.xkl_no {
border: 1px solid #999999;
color: #999999;
}

View File

@@ -0,0 +1 @@
<view class="xkl-com-bg"><view style="height:20rpx"></view><view style="background-color:#ffffff;border-radius:10rpx;padding:30rpx;font-size:30rpx"><view class="u-flex u-flex-y-center"><up-image u-i="2046de50-0" onVI="__l" u-p="{{a}}"></up-image><view style="width:20rpx"></view><view><view>{{b}}</view><view style="height:10rpx"></view><view>{{c}}</view></view></view><up-divider u-i="2046de50-1" onVI="__l"></up-divider><view class="u-flex u-flex-between"><view><view>手机号:{{d}}</view><view style="height:10rpx"></view><view>等级:{{e}}</view></view><view style="width:20rpx"></view><view><view>7KW{{f}}</view><view>20KW{{g}}</view><view>30KW{{h}}</view></view></view><view style="height:16rpx"></view><view>注册时间:{{i}}</view></view><view style="height:20rpx"></view><view class="p30" style="background-color:#ffffff;padding:30rpx"><view style="font-size:32rpx;margin-bottom:20rpx">个人统计</view><view style="font-size:28rpx;display:flex"><view style="margin-right:50rpx">7KW{{j}}</view><view style="margin-right:50rpx">20KW{{k}}</view><view>30KW{{l}}</view></view></view><view style="height:20rpx"></view><view class="p30" style="background-color:#ffffff;padding:30rpx"><view style="font-size:32rpx;margin-bottom:20rpx">团队统计</view><view style="font-size:28rpx;display:flex"><view style="margin-right:50rpx">7KW{{m}}</view><view style="margin-right:50rpx">20KW{{n}}</view><view>30KW{{o}}</view></view></view><view style="height:20rpx"></view><view style="background-color:#ffffff;border-radius:10rpx;padding:30rpx;font-size:30rpx"><view class="u-flex u-flex-y-center"><view style="background-color:#ffffff;border-radius:12rpx;padding:10rpx" class="{{p}}" onTap="{{q}}">本周</view><view style="width:30rpx"></view><view style="background-color:#ffffff;border-radius:12rpx;padding:10rpx" class="{{r}}" onTap="{{s}}">上周</view><view style="width:30rpx"></view><view><uni-datetime-picker u-s="{{['d']}}" onChange="{{y}}" u-i="2046de50-2" onVI="__l" onUpdateModelValue="{{z}}" u-p="{{A}}"><view style="background-color:#ffffff;border-radius:12rpx;padding:10rpx" class="{{x}}"><text a:if="{{t}}">{{v}} - {{w}}</text><text a:else>自定义时间</text></view></uni-datetime-picker></view></view><view class="u-flex u-flex-y-center" style="margin-top:30rpx"><view a:for="{{B}}" a:for-item="item" a:key="b" style="background-color:#ffffff;border-radius:12rpx;padding:10rpx;margin-right:30rpx" class="{{item.c}}" onTap="{{item.d}}">{{item.a}}</view></view><up-divider u-i="2046de50-3" onVI="__l"></up-divider><view style="height:20rpx"></view><qiun-data-charts u-i="2046de50-4" onVI="__l" u-p="{{C}}"/></view><view style="height:100rpx"></view></view>

View File

@@ -0,0 +1,257 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_api = require("../../api/api.js");
const _sfc_main = {
data() {
const currentDate = this.getDate({
format: true
});
return {
screen: {
showcalendar: false
},
shopinfo: {
nickname: "",
username: "",
money: "",
mobile: "",
vip: "",
device_num: "",
id: ""
},
team_device_num: 0,
chartData: {},
opts: {
padding: [15, 10, 0, 15],
enableScroll: false,
legend: {},
xAxis: {
disableGrid: true,
showTitle: false
},
yAxis: {
disabled: true,
gridType: "dash",
dashLength: 2
},
extra: {
line: {
type: "curve",
width: 2,
activeType: "none"
}
}
},
search: {
id: "",
start_time: "",
end_time: "",
weekType: 1
},
dateTime: currentDate,
single: "",
team: {}
};
},
onLoad(option) {
console.log(option.id, "option.id");
if (option && option.id) {
this.search.id = option.id;
}
},
onReady() {
this.getServerData();
},
async onPullDownRefresh() {
this.search.weekType = 1;
this.getServerData();
common_vendor.index.stopPullDownRefresh();
},
methods: {
getDate(type) {
const date = /* @__PURE__ */ new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
date.getDate();
if (type === "start") {
year = year - 60;
} else if (type === "end") {
year = year + 2;
}
month = month > 9 ? month : "0" + month;
return `${year}-${month}`;
},
bindDateChange(e) {
this.dateTime = e.detail.value;
},
getDateRanges() {
const now = /* @__PURE__ */ new Date();
const year = now.getFullYear();
const month = now.getMonth();
const ranges = {
firstRange: {
name: "1号-10号",
start: new Date(year, month, 1),
// 1号
end: new Date(year, month, 10)
// 10号
},
secondRange: {
name: "11号-20号",
start: new Date(year, month, 11),
// 11号
end: new Date(year, month, 20)
// 20号
},
thirdRange: {
name: "21号-月底",
start: new Date(year, month, 21)
// 21号
}
};
const lastDayOfMonth = new Date(year, month + 1, 0);
ranges.thirdRange.end = lastDayOfMonth;
function formatDate(date) {
const yyyy = date.getFullYear();
const mm = String(date.getMonth() + 1).padStart(2, "0");
const dd = String(date.getDate()).padStart(2, "0");
return `${yyyy}-${mm}-${dd}`;
}
return [
{
name: ranges.firstRange.name,
start: formatDate(ranges.firstRange.start),
end: formatDate(ranges.firstRange.end)
},
{
name: ranges.secondRange.name,
start: formatDate(ranges.secondRange.start),
end: formatDate(ranges.secondRange.end)
},
{
name: ranges.thirdRange.name,
start: formatDate(ranges.thirdRange.start),
end: formatDate(ranges.thirdRange.end)
}
];
},
checkTime(e) {
this.search.startTime = e.start;
this.search.endTime = e.end;
this.screen.showcalendar = false;
this.search.weekType = "";
this.getServerData();
},
checkweek(week) {
this.search.weekType = week;
this.search.startTime = "";
this.search.endTime = "";
this.getServerData();
},
maskClick(e) {
this.search.startTime = e[0];
this.search.endTime = e[e.length - 1];
this.search.weekType = "";
this.getServerData();
},
getServerData() {
api_api.shareUserInfo({ id: this.search.id }).then((res) => {
this.shopinfo = res;
});
api_api.shareUserInfoStats(this.search).then((res) => {
this.team = res;
let _list = [
{
name: "7KW",
data: res.stats7.map((item) => {
return item.num;
})
},
{
name: "20KW",
data: res.stats20.map((item) => {
return item.num;
})
},
{
name: "30KW",
data: res.stats30.map((item) => {
return item.num;
})
}
];
this.chartData.categories = res.dayStr;
this.chartData.series = _list;
});
}
}
};
if (!Array) {
const _easycom_up_image2 = common_vendor.resolveComponent("up-image");
const _easycom_up_divider2 = common_vendor.resolveComponent("up-divider");
const _easycom_uni_datetime_picker2 = common_vendor.resolveComponent("uni-datetime-picker");
const _easycom_qiun_data_charts2 = common_vendor.resolveComponent("qiun-data-charts");
(_easycom_up_image2 + _easycom_up_divider2 + _easycom_uni_datetime_picker2 + _easycom_qiun_data_charts2)();
}
const _easycom_up_image = () => "../../uni_modules/uview-plus/components/u-image/u-image.js";
const _easycom_up_divider = () => "../../uni_modules/uview-plus/components/u-divider/u-divider.js";
const _easycom_uni_datetime_picker = () => "../../uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.js";
const _easycom_qiun_data_charts = () => "../../uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.js";
if (!Math) {
(_easycom_up_image + _easycom_up_divider + _easycom_uni_datetime_picker + _easycom_qiun_data_charts)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: common_vendor.p({
width: "100rpx",
height: "100rpx",
src: $data.shopinfo.avatar,
shape: "circle"
}),
b: common_vendor.t($data.shopinfo.nickName),
c: common_vendor.t($data.shopinfo.userName),
d: common_vendor.t($data.shopinfo.phone),
e: common_vendor.t($data.shopinfo.level),
f: common_vendor.t($data.shopinfo.deviceNum7),
g: common_vendor.t($data.shopinfo.deviceNum20),
h: common_vendor.t($data.shopinfo.deviceNum30),
i: common_vendor.t($data.shopinfo.createTime),
j: common_vendor.t($data.team.myDeviceNum7),
k: common_vendor.t($data.team.myDeviceNum20),
l: common_vendor.t($data.team.myDeviceNum30),
m: common_vendor.t($data.team.deviceNum7),
n: common_vendor.t($data.team.deviceNum20),
o: common_vendor.t($data.team.deviceNum30),
p: common_vendor.n($data.search.weekType === 1 ? "xkl_cur" : "xkl_no"),
q: common_vendor.o(($event) => $options.checkweek(1)),
r: common_vendor.n($data.search.weekType == 2 ? "xkl_cur" : "xkl_no"),
s: common_vendor.o(($event) => $options.checkweek(2)),
t: $data.search.startTime
}, $data.search.startTime ? {
v: common_vendor.t($data.search.startTime),
w: common_vendor.t($data.search.endTime)
} : {}, {
x: common_vendor.n($data.search.weekType === "" ? "xkl_cur" : "xkl_no"),
y: common_vendor.o($options.maskClick),
z: common_vendor.o(($event) => $data.single = $event),
A: common_vendor.p({
type: "daterange",
modelValue: $data.single
}),
B: common_vendor.f($options.getDateRanges(), (item, index, i0) => {
return {
a: common_vendor.t(item.name),
b: index,
c: common_vendor.n($data.search.week === item.name ? "xkl_cur" : "xkl_no"),
d: common_vendor.o(($event) => $options.checkTime(item))
};
}),
C: common_vendor.p({
type: "line",
opts: $data.opts,
chartData: $data.chartData
})
});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
my.createPage(MiniProgramPage);

View File

@@ -0,0 +1,9 @@
{
"defaultTitle": "",
"usingComponents": {
"up-image": "../../uni_modules/uview-plus/components/u-image/u-image",
"up-divider": "../../uni_modules/uview-plus/components/u-divider/u-divider",
"uni-datetime-picker": "../../uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker",
"qiun-data-charts": "../../uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts"
}
}

View File

@@ -0,0 +1 @@
<view class="order p30"><z-paging u-s="{{['d']}}" ref="__r" u-r="{{e}}" onQuery="{{f}}" u-i="0fb9a866-0" onVI="__l" onUpdateModelValue="{{g}}" u-p="{{h}}"><view style="height:20rpx"></view><up-subsection onChange="{{a}}" u-i="0fb9a866-1,0fb9a866-0" onVI="__l" u-p="{{b}}"></up-subsection><view style="height:20rpx"></view><view style="background-color:#ffffff;padding:20rpx">邀请人数:{{c}}</view><view style="height:20rpx"></view><view><view a:for="{{d}}" a:for-item="item" a:key="i" style="background-color:#ffffff;border-radius:10rpx;padding:30rpx;margin-bottom:20rpx;font-size:30rpx" onTap="{{item.j}}"><view style="display:flex;align-items:center"><u--image u-i="{{item.a}}" onVI="__l" u-p="{{item.b}}"></u--image><view style="width:20rpx"></view><view><view>{{item.c}}</view><view style="height:10rpx"></view><view>{{item.d}}</view></view></view><up-divider u-i="{{item.e}}" onVI="__l"></up-divider><view style="display:flex;justify-content:space-between"><view><view>手机号:{{item.f}}</view><view style="height:10rpx"></view><view>等级v{{item.g}}</view></view><view style="width:20rpx"></view></view><view style="height:16rpx"></view><view>注册时间:{{item.h}}</view></view></view></z-paging></view>

View File

@@ -0,0 +1,127 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
require("../../store/index.js");
const api_api = require("../../api/api.js");
require("../../uni_modules/uview-plus/index.js");
if (!Array) {
const _easycom_up_subsection2 = common_vendor.resolveComponent("up-subsection");
const _easycom_u__image2 = common_vendor.resolveComponent("u--image");
const _easycom_up_divider2 = common_vendor.resolveComponent("up-divider");
const _easycom_z_paging2 = common_vendor.resolveComponent("z-paging");
(_easycom_up_subsection2 + _easycom_u__image2 + _easycom_up_divider2 + _easycom_z_paging2)();
}
const _easycom_up_subsection = () => "../../uni_modules/uview-plus/components/u-subsection/u-subsection.js";
const _easycom_u__image = () => "../../uni_modules/uview-plus/components/u--image/u--image.js";
const _easycom_up_divider = () => "../../uni_modules/uview-plus/components/u-divider/u-divider.js";
const _easycom_z_paging = () => "../../uni_modules/z-paging/components/z-paging/z-paging.js";
if (!Math) {
(_easycom_up_subsection + _easycom_u__image + _easycom_up_divider + _easycom_z_paging)();
}
const _sfc_main = {
__name: "shareList",
setup(__props) {
const paging = common_vendor.ref(null);
let dataList = common_vendor.ref([]);
let total = common_vendor.ref(0);
let dataFrom = common_vendor.reactive({
type: 1
});
const list = common_vendor.ref([
{
name: "直推",
id: 1
},
{
name: "间推",
id: 2
}
]);
let toNav = (e) => {
common_vendor.index.navigateTo({
url: "./detail?id=" + e.id
});
};
let isPagingRefNotFound = () => {
return !paging.value;
};
common_vendor.onPullDownRefresh(() => {
if (isPagingRefNotFound())
return;
paging.value.reload().catch(() => {
});
});
common_vendor.onPageScroll((e) => {
if (isPagingRefNotFound())
return;
paging.value.updatePageScrollTop(e.scrollTop);
e.scrollTop < 10 && paging.value.doChatRecordLoadMore();
});
common_vendor.onReachBottom(() => {
if (isPagingRefNotFound())
return;
paging.value.pageReachBottom();
});
const queryList = (pageNo, pageSize) => {
common_vendor.index.getStorageSync("user");
const params = {
current: pageNo,
pageSize,
...dataFrom
};
api_api.shareList(params).then((res) => {
paging.value.complete(res.records);
total.value = res.total;
}).catch((res) => {
paging.value.complete(false);
});
};
const current = common_vendor.ref(0);
const upChange = (e) => {
current.value = e;
dataFrom.type = list.value[e].id;
paging.value.reload();
};
return (_ctx, _cache) => {
return {
a: common_vendor.o(upChange),
b: common_vendor.p({
list: list.value,
keyName: "name",
current: current.value
}),
c: common_vendor.t(common_vendor.unref(total)),
d: common_vendor.f(common_vendor.unref(dataList), (item, index, i0) => {
return {
a: "0fb9a866-2-" + i0 + ",0fb9a866-0",
b: common_vendor.p({
width: "100rpx",
height: "100rpx",
src: item.avatar,
shape: "circle"
}),
c: common_vendor.t(item.nickName),
d: common_vendor.t(item.userName),
e: "0fb9a866-3-" + i0 + ",0fb9a866-0",
f: common_vendor.t(item.phone),
g: common_vendor.t(item.level),
h: common_vendor.t(item.createTime),
i: index,
j: common_vendor.o(($event) => common_vendor.unref(toNav)(item))
};
}),
e: () => ({
r: paging,
k: "paging"
}),
f: common_vendor.o(queryList),
g: common_vendor.o(($event) => common_vendor.isRef(dataList) ? dataList.value = $event : dataList = $event),
h: common_vendor.p({
["use-page-scroll"]: true,
modelValue: common_vendor.unref(dataList)
})
};
};
}
};
_sfc_main.__runtimeHooks = 1;
my.createPage(_sfc_main);

View File

@@ -0,0 +1,9 @@
{
"defaultTitle": "邀请记录",
"usingComponents": {
"up-subsection": "../../uni_modules/uview-plus/components/u-subsection/u-subsection",
"u--image": "../../uni_modules/uview-plus/components/u--image/u--image",
"up-divider": "../../uni_modules/uview-plus/components/u-divider/u-divider",
"z-paging": "../../uni_modules/z-paging/components/z-paging/z-paging"
}
}