From 2a408b270689242d6ecb3831ae11bc93461f57c6 Mon Sep 17 00:00:00 2001
From: "Mr.jiang" <714156421@qq.com>
Date: Thu, 29 Aug 2024 14:33:43 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8A=80=E5=B8=88=E7=AD=89=E7=BA=A7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/h-timePicker/h-timePicker.vue | 220 +++++++++++++++++++
components/h-timePicker/h-timePickerEnd.vue | 228 ++++++++++++++++++++
components/h-timePicker/readme.md | 69 ++++++
pages/index/technicianLevel.vue | 79 +++++--
pages/my/mangshi2.vue | 222 ++++++++++++++-----
5 files changed, 755 insertions(+), 63 deletions(-)
create mode 100644 components/h-timePicker/h-timePicker.vue
create mode 100644 components/h-timePicker/h-timePickerEnd.vue
create mode 100644 components/h-timePicker/readme.md
diff --git a/components/h-timePicker/h-timePicker.vue b/components/h-timePicker/h-timePicker.vue
new file mode 100644
index 0000000..4d7a2f1
--- /dev/null
+++ b/components/h-timePicker/h-timePicker.vue
@@ -0,0 +1,220 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/components/h-timePicker/h-timePickerEnd.vue b/components/h-timePicker/h-timePickerEnd.vue
new file mode 100644
index 0000000..a713648
--- /dev/null
+++ b/components/h-timePicker/h-timePickerEnd.vue
@@ -0,0 +1,228 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/components/h-timePicker/readme.md b/components/h-timePicker/readme.md
new file mode 100644
index 0000000..ca2de01
--- /dev/null
+++ b/components/h-timePicker/readme.md
@@ -0,0 +1,69 @@
+
+
+### hTimePicker
+
+预约时间的选择,支持营业时间的判断
+
+**使用方式:**
+
+在 `script` 中引用组件
+
+```javascript
+import hTimePicker from "@/components/h-timePicker/h-timePicker.vue";
+export default {
+ components: { hTimePicker }
+};
+```
+
+在 `template` 中使用组件
+
+```html
+
+
+ 点击选择时间
+
+
+```
+
+**属性说明:**
+
+|属性名|类型|默认值 |说明|
+|---|----|---|---|
+|sTime|String|0|小时开始|
+|cTime|String|23|小时结束|
+|timeNum|String|1|当天预约时的延迟小时|
+|interval|String|1|分钟的间隔|
+|sDay|String|0|预约日期从几天后开始,0就是今天,1就是明天|
+|dayNum|String|7|可以预约的天数|
+
+**事件说明:**
+
+|事件称名|说明|返回参数|
+|---|----|---|
+|changeTime|改变时间的事件|第一个参数是格式化时间,第二个是时间戳|
+
+
+### 更新日志
+
+**1.0.0**
+
+- 初始项目
+
+**1.0.1**
+
+- 修复H5下不滚动,确定无效问题
+
+
+**1.0.2**
+
+- 修复选择时间后再次打开显示不正确的问题
+**1.0.3**
+
+- 可延迟预约时间的选择
diff --git a/pages/index/technicianLevel.vue b/pages/index/technicianLevel.vue
index 3b7da19..1702614 100644
--- a/pages/index/technicianLevel.vue
+++ b/pages/index/technicianLevel.vue
@@ -41,17 +41,18 @@
备注: 本期等级是根据技师上个周期的业绩最终计算得出
-->
-
- 上周期等级
-
-
-
-
- 备注: 本期等级是根据技师上个周期的业绩最终计算得出
+
+ 本周期到达等级:【{{grade}}】
+
+
+
+
+ 还差{{ longUpgradeDescriptionSet.differenceDurationOnline }}小时,{{ longUpgradeDescriptionSet.differenceOutstandingAchievement }}业绩,{{ longUpgradeDescriptionSet.differenceIntegral }}积分;可以升级{{ longUpgradeDescriptionSet.differenceGrade }}
+
+
+
+ 您已达到最高等级
@@ -112,25 +113,75 @@
ultimately: "",
lastGrade: "",
grade: "",
- maxStatus: "",
+ // maxStatus: "",
differenceDurationOnline: "",
differenceOutstandingAchievement: "",
differenceIntegral: "",
differenceGrade: "",
+ currentWholeIncome: null, //App首页当期总收益
+ totalIncomeRange: null, //App首页当前阶段收益总数
+ currentRealIncome: null, //App首页当期实际收益(已扣除各项)
+ currentIntegral: null, //App首页当期积分
+ currentOrdersNum: null, //App首页当期订单数量
+ currentRenewalNum: null, //App首页当期加钟率
+ currentRechargeNum: null, //App首页当期充值率
+ upgradeDescriptionStatus: false, // App首页升级描述
+ currentGrade: null, //App首页当前等级
+ lineProgressData: 0,
+ maxStatus: null,
+ longUpgradeDescriptionSet:{}
}
},
onLoad(e) {
this.ultimately = e.ultimately;
this.lastGrade = e.lastGrade;
this.grade = e.grade;
- this.maxStatus = e.maxStatus;
+ // this.maxStatus = e.maxStatus;
this.differenceDurationOnline = e.differenceDurationOnline;
this.differenceOutstandingAchievement = e.differenceOutstandingAchievement;
this.differenceIntegral = e.differenceIntegral;
this.differenceGrade = e.differenceGrade;
this.getArtificerLevels();
+ this.getHomeListData();
},
methods: {
+ //获取App首页数据
+ getHomeListData() {
+ let artificerId = uni.getStorageSync("artificerId");
+
+ console.log('artificerId------->',artificerId);
+ if (artificerId) {
+ this.$Request.getXZX("/app/artificer/integral/home/?artificerId=" + artificerId,).then((res) => {
+ if (res && res.data) {
+ this.longUpgradeDescriptionSet = {
+ differenceOutstandingAchievement: res?.data?.differenceOutstandingAchievement,
+ differenceIntegral: res?.data?.differenceIntegral,
+ differenceClockRate: res?.data?.differenceClockRate + "%",
+ differenceDurationOnline: res?.data?.differenceDurationOnline,
+ currentLevel: res?.data?.currentLevel,
+ differenceGrade: res?.data?.differenceGrade,
+ };
+ this.upgradeDescriptionStatus = res?.data?.ultimately;
+ this.currentGrade = res?.data?.lastGrade;
+ uni.setStorageSync("currentRealIncome", res?.data?.earnings);
+ this.totalIncomeRange = res?.data?.suffix;
+ if (this.currentWholeIncome < 4000) {
+ this.totalIncomeRange = 4000;
+ } else if (this.currentWholeIncome < 6000 && this.currentWholeIncome > 4000) {
+ this.totalIncomeRange = 6000;
+ } else if (this.currentWholeIncome < 8000 && this.currentWholeIncome > 6000) {
+ this.totalIncomeRange = 8000;
+ } else if (this.currentWholeIncome < 10000 && this.currentWholeIncome > 8000) {
+ this.totalIncomeRange = 10000;
+ } else {
+ this.totalIncomeRange = 4000;
+ }
+ this.currentWholeIncome = 2000;
+ this.lineProgressData = this.currentWholeIncome / this.totalIncomeRange * 100;
+ }
+ })
+ }
+ },
fanhui(){
uni.switchTab({
url:'/pages/index/index'
@@ -274,7 +325,7 @@
margin-right: 6px;
}
.header-right-text{
- margin-top: 10px;
+ margin-top: 25px;
font-size: 26rpx;
color: #FFFFFF;
}
diff --git a/pages/my/mangshi2.vue b/pages/my/mangshi2.vue
index 00d5da4..4c5470f 100644
--- a/pages/my/mangshi2.vue
+++ b/pages/my/mangshi2.vue
@@ -1,12 +1,33 @@
-
-
-
+
+ 是否接单
+
+
+
+ 选择接单时问
+
+
+ 开始时间
+ {{starTime}}
+
+
+ 结束时间
+
+ 次日
+ {{endTime}}
+
+
+
+
+
+
+
- 忙时时间
+ 不可接单时间
{{item}}
@@ -14,12 +35,18 @@
- 保存选择
+ 保存选择1
+ 保存选择2
-