调整微信小程序的报错。

This commit is contained in:
cst61
2026-02-01 09:49:48 +08:00
parent cc01c4dc47
commit 802ffbb2f3
454 changed files with 62476 additions and 45 deletions

View File

@@ -0,0 +1,137 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const defaultAvatar = "/static/logo.png";
const _sfc_main = {
data() {
return {
activeTab: "personal",
personalData: {
duration: [
{ id: 1, name: "三多", value: 90, progress: 100, avatar: defaultAvatar },
{ id: 2, name: "雅秋", value: 78, progress: 78 / 90 * 100, avatar: defaultAvatar },
{ id: 3, name: "炫辰", value: 60, progress: 60 / 90 * 100, avatar: defaultAvatar }
],
customers: [
{ id: 1, name: "三多", value: 3, progress: 100, avatar: defaultAvatar },
{ id: 2, name: "曼云", value: 1, progress: 1 / 3 * 100, avatar: defaultAvatar },
{ id: 3, name: "雅秋", value: 1, progress: 1 / 3 * 100, avatar: defaultAvatar }
],
sop: [
{ id: 1, name: "三多", value: 91.5, progress: 100, avatar: defaultAvatar },
{ id: 2, name: "曼云", value: 75, progress: 75 / 91.5 * 100, avatar: defaultAvatar }
]
},
// 团队排行:门店维度数据
teamStoreData: {
serviceTime: [
{ rank: 1, name: "A门店", value: 33, progress: 100, badgeType: "gold", isMine: false },
{ rank: 2, name: "B门店", value: 28, progress: 28 / 33 * 100, badgeType: "silver", isMine: false },
{ rank: 3, name: "C门店", value: 16, progress: 16 / 33 * 100, badgeType: "bronze", isMine: false },
{ rank: 11, name: "我的门店", value: 12, progress: 12 / 33 * 100, badgeType: "normal", isMine: true }
],
badgeUsage: [
{ rank: 1, name: "A门店", used: 9, opened: 10, rate: 90, badgeType: "gold", isMine: false },
{ rank: 2, name: "B门店", used: 8, opened: 10, rate: 80, badgeType: "silver", isMine: false },
{ rank: 3, name: "C门店", used: 7, opened: 10, rate: 70, badgeType: "bronze", isMine: false },
{ rank: 5, name: "我的门店", used: 5, opened: 10, rate: 50, badgeType: "normal", isMine: true }
]
}
};
},
computed: {
currentData() {
return this.personalData;
}
},
methods: {
changeTab(tab) {
if (this.activeTab === tab)
return;
this.activeTab = tab;
},
onBack() {
const pages = getCurrentPages();
if (pages && pages.length > 1) {
common_vendor.index.navigateBack();
} else {
common_vendor.index.navigateTo({
url: "/pages-subpackage/customer/customer"
});
}
},
onMore(type) {
common_vendor.index.__f__("log", "at pages/team/team.vue:333", "点击更多", type, this.activeTab);
}
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: common_vendor.o((...args) => $options.onBack && $options.onBack(...args)),
b: $data.activeTab === "personal" ? 1 : "",
c: common_vendor.o(($event) => $options.changeTab("personal")),
d: $data.activeTab === "team" ? 1 : "",
e: common_vendor.o(($event) => $options.changeTab("team")),
f: $data.activeTab === "personal" ? "translateX(0)" : "translateX(100%)",
g: $data.activeTab === "personal"
}, $data.activeTab === "personal" ? {
h: common_vendor.o(($event) => $options.onMore("duration")),
i: common_vendor.f($options.currentData.duration, (item, k0, i0) => {
return {
a: item.avatar,
b: common_vendor.t(item.name),
c: item.progress + "%",
d: common_vendor.t(item.value),
e: item.id
};
}),
j: common_vendor.o(($event) => $options.onMore("customers")),
k: common_vendor.f($options.currentData.customers, (item, k0, i0) => {
return {
a: item.avatar,
b: common_vendor.t(item.name),
c: item.progress + "%",
d: common_vendor.t(item.value),
e: item.id
};
}),
l: common_vendor.o(($event) => $options.onMore("sop")),
m: common_vendor.f($options.currentData.sop, (item, k0, i0) => {
return {
a: item.avatar,
b: common_vendor.t(item.name),
c: item.progress + "%",
d: common_vendor.t(item.value),
e: item.id
};
})
} : {
n: common_vendor.f($data.teamStoreData.serviceTime, (item, k0, i0) => {
return {
a: common_vendor.t(item.rank),
b: common_vendor.n("rank-badge--" + item.badgeType),
c: common_vendor.t(item.name),
d: item.isMine ? 1 : "",
e: item.progress + "%",
f: common_vendor.t(item.value),
g: item.isMine ? 1 : "",
h: item.rank
};
}),
o: common_vendor.f($data.teamStoreData.badgeUsage, (item, k0, i0) => {
return {
a: common_vendor.t(item.rank),
b: common_vendor.n("rank-badge--" + item.badgeType),
c: common_vendor.t(item.name),
d: item.isMine ? 1 : "",
e: common_vendor.t(item.used),
f: common_vendor.t(item.opened),
g: common_vendor.t(item.rate),
h: item.isMine ? 1 : "",
i: item.rank
};
})
});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/team/team.js.map

View File

@@ -0,0 +1,4 @@
{
"navigationStyle": "custom",
"usingComponents": {}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,365 @@
page {
display: flex;
flex-direction: column;
box-sizing: border-box;
background-color: #f4f6fb;
min-height: 100%;
height: auto;
}
.page-wrap {
flex: 1;
min-height: 100vh;
background-color: #f4f6fb;
}
.page-container {
padding: 0 24rpx 32rpx;
position: relative;
min-height: 100vh;
}
.filter-row {
flex-direction: row;
display: flex;
align-items: center;
justify-content: flex-start;
padding: 16rpx 0 8rpx;
}
.filter-row__label {
font-size: 24rpx;
color: #6b7280;
margin-right: 16rpx;
}
.filter-row__value {
flex-direction: row;
display: flex;
align-items: center;
background-color: #eef2ff;
border-radius: 20rpx;
padding: 6rpx 14rpx;
}
.filter-row__value-text {
font-size: 24rpx;
color: #1d4ed8;
margin-right: 4rpx;
}
.filter-row__value-icon {
font-size: 20rpx;
color: #6b7280;
}
.page-header {
height: 88rpx;
padding: 0 24rpx;
background-color: #ffffff;
flex-direction: row;
display: flex;
align-items: center;
justify-content: space-between;
box-shadow: 0 1rpx 0 rgba(229, 231, 235, 0.9);
}
.page-header__back {
width: 80rpx;
justify-content: flex-start;
display: flex;
align-items: center;
}
.page-header__back-icon {
font-size: 40rpx;
color: #4b5563;
}
.page-header__title {
font-size: 32rpx;
font-weight: 600;
color: #111827;
}
.page-header__right {
width: 80rpx;
}
.tab-switch {
height: 80rpx;
border-radius: 40rpx;
background-color: #e5edf8;
padding: 6rpx;
display: flex;
position: relative;
margin-bottom: 24rpx;
}
.tab-item {
flex: 1;
align-items: center;
justify-content: center;
display: flex;
z-index: 2;
}
.tab-item--active .tab-text {
color: #1b68ff;
font-weight: 600;
}
.tab-text {
font-size: 26rpx;
color: #7a8aa5;
}
.tab-slider {
position: absolute;
top: 4rpx;
left: 4rpx;
width: 50%;
height: 72rpx;
border-radius: 36rpx;
background-color: #ffffff;
box-shadow: 0 10rpx 20rpx rgba(59, 120, 255, 0.15);
transition: transform 0.25s ease-out;
}
.scroll-area {
/* 高度计算100vh - 导航栏(88rpx) - filter-row和tab-switch(约120rpx) - 底部导航栏(96rpx) - container padding(32rpx) */
/* 使用绝对定位从tab-switch底部开始到底部导航栏结束 */
position: absolute;
top: 208rpx; /* 导航栏(88rpx) + filter-row(约40rpx) + tab-switch(80rpx) = 208rpx */
left: 24rpx;
right: 24rpx;
bottom: 96rpx; /* 底部导航栏高度 */
box-sizing: border-box;
}
.card-list {
display: flex;
flex-direction: column;
gap: 20rpx;
}
.rank-card {
background-color: #ffffff;
border-radius: 24rpx;
padding: 24rpx 24rpx 18rpx;
box-shadow: 0 10rpx 30rpx rgba(7, 34, 85, 0.04);
}
.rank-card__header {
flex-direction: row;
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 18rpx;
}
.rank-card__header--with-sub {
margin-bottom: 10rpx;
}
.rank-card__title {
font-size: 28rpx;
font-weight: 600;
color: #111827;
}
.rank-card__sub-right {
font-size: 22rpx;
color: #9ca3af;
}
.rank-card__more {
flex-direction: row;
display: flex;
align-items: center;
}
.rank-card__more-text {
font-size: 24rpx;
color: #9ca3af;
margin-right: 4rpx;
}
.rank-card__more-arrow {
font-size: 26rpx;
color: #d1d5db;
}
.rank-card__tabs {
flex-direction: row;
display: flex;
margin-bottom: 10rpx;
}
.rank-card__tab {
font-size: 24rpx;
color: #9ca3af;
margin-right: 24rpx;
}
.rank-card__tab--active {
color: #2563eb;
font-weight: 600;
}
.rank-row {
flex-direction: row;
display: flex;
align-items: center;
margin-bottom: 18rpx;
}
.rank-row:last-child {
margin-bottom: 0;
}
.rank-row__avatar {
width: 64rpx;
height: 64rpx;
border-radius: 32rpx;
margin-right: 16rpx;
}
.rank-row__main {
flex: 1;
}
.rank-row__name {
font-size: 26rpx;
color: #111827;
margin-bottom: 8rpx;
}
.rank-row__progress {
height: 16rpx;
border-radius: 8rpx;
background-color: #e5edf8;
overflow: hidden;
position: relative;
}
.rank-row__progress-inner {
height: 100%;
border-radius: 8rpx;
}
.rank-row__progress-inner--blue {
background-image: linear-gradient(90deg, #36d1ff, #246bff);
}
.rank-row__value {
font-size: 26rpx;
color: #111827;
margin-left: 16rpx;
}
/* 门店排行行 */
.store-row {
flex-direction: row;
display: flex;
align-items: center;
padding: 10rpx 0;
}
.store-row__left {
flex-direction: row;
display: flex;
align-items: center;
width: 220rpx;
}
.store-row__name {
font-size: 26rpx;
color: #111827;
margin-left: 16rpx;
}
.store-row__name--me {
color: #2563eb;
}
.store-row__middle {
flex: 1;
margin: 0 16rpx;
}
.store-row__value {
font-size: 26rpx;
color: #111827;
width: 140rpx;
text-align: right;
}
.store-row__value--highlight {
color: #2563eb;
font-weight: 600;
}
/* 排名圆圈 */
.rank-badge {
width: 40rpx;
height: 40rpx;
border-radius: 20rpx;
align-items: center;
justify-content: center;
display: flex;
background-color: #e5e7eb;
}
.rank-badge__text {
font-size: 22rpx;
color: #ffffff;
}
.rank-badge--gold {
background-image: linear-gradient(135deg, #fbbf24, #f59e0b);
box-shadow: 0 6rpx 12rpx rgba(245, 158, 11, 0.35);
}
.rank-badge--silver {
background-image: linear-gradient(135deg, #d1d5db, #9ca3af);
box-shadow: 0 6rpx 12rpx rgba(156, 163, 175, 0.35);
}
.rank-badge--bronze {
background-image: linear-gradient(135deg, #fb923c, #f97316);
box-shadow: 0 6rpx 12rpx rgba(248, 113, 22, 0.35);
}
.rank-badge--normal {
background-image: linear-gradient(135deg, #2563eb, #1d4ed8);
box-shadow: 0 6rpx 12rpx rgba(37, 99, 235, 0.35);
}
/* 表格:门店工牌使用率 */
.table-header {
flex-direction: row;
display: flex;
align-items: center;
padding: 10rpx 0;
border-bottom-width: 1rpx;
border-bottom-style: solid;
border-bottom-color: #e5e7eb;
margin-top: 4rpx;
}
.table-header__cell {
font-size: 22rpx;
color: #9ca3af;
flex: 1;
text-align: center;
}
.table-header__cell--rank {
width: 120rpx;
flex: 0 0 120rpx;
}
.table-header__cell--store {
text-align: left;
flex: 0 0 180rpx;
}
.table-header__cell--rate {
text-align: right;
}
.table-row {
flex-direction: row;
display: flex;
align-items: center;
padding: 14rpx 0;
}
.table-row__cell {
flex: 1;
font-size: 24rpx;
color: #111827;
text-align: center;
}
.table-row__cell--rank {
width: 120rpx;
flex: 0 0 120rpx;
}
.table-row__cell--store {
text-align: left;
flex: 0 0 180rpx;
}
.table-row__cell--rate {
text-align: right;
}
.table-row__cell--highlight {
color: #2563eb;
font-weight: 600;
}
.table-row__store {
font-size: 24rpx;
color: #111827;
}
.table-row__store--me {
color: #2563eb;
}
/* SOP 卡片的虚线分割线样式 */
.rank-row__progress--dashed {
position: relative;
}
.rank-row__divider {
position: absolute;
left: 50%;
top: -10rpx;
bottom: -10rpx;
border-left-width: 2rpx;
border-left-style: dashed;
border-left-color: rgba(156, 163, 175, 0.6);
}