diff --git a/pages/index/newindex.vue b/pages/index/newindex.vue
index b7ea0ce..1297511 100644
--- a/pages/index/newindex.vue
+++ b/pages/index/newindex.vue
@@ -198,6 +198,7 @@ export default {
ping: [],
dateStr: '',
week: '',
+ time:'',
is_mandatory: false,
url: 'http://159.75.168.143:88/apk/lanan.apk',
title: '版本升级',
@@ -230,22 +231,26 @@ export default {
this.getWarnCount()
this.getAppointAndPickNum()
- // // 初始化时间
- // this.timeWeekFormat();
let that = this
- that.timeWeekFormat();
this.timer = setInterval(function () {
that.getappointment()
}, 10000);
+ this.setTime = setInterval(() => {
+ this.timeWeekFormat();
+ }, 1000);
},
onHide() {
clearInterval(this.timer);
this.timer = null
+ clearInterval(this.setTime);
+ this.setTime = null
},
onUnload() {
clearInterval(this.timer);
this.timer = null;
+ clearInterval(this.setTime);
+ this.setTime = null;
},
onLoad() {
this.partnerId = uni.getStorageSync('partnerId')
@@ -260,8 +265,6 @@ export default {
this.getappointment()
}, 1000)
// this.getappointment()
- // 初始化时间
- this.timeWeekFormat();
},
onPullDownRefresh() {
@@ -563,30 +566,25 @@ export default {
}
},
timeWeekFormat() {
- let dateTime = new Date();
- let year = dateTime.getFullYear();
- let month = dateTime.getMonth() + 1;
- let day = dateTime.getDate();
- let hours = dateTime.getHours();
- let minutes = dateTime.getMinutes();
- let second = dateTime.getSeconds();
- let dayCycleArray = ["日", "一", "二", "三", "四", "五", "六"];
- let dayCycle = dayCycleArray[dateTime.getDay()];
+ const now = new Date();
+ const year = now.getFullYear();
+ const month = String(now.getMonth() + 1).padStart(2, "0");
+ const day = String(now.getDate()).padStart(2, "0");
+ const hours = String(now.getHours()).padStart(2, "0");
+ const minutes = String(now.getMinutes()).padStart(2, "0");
+ const seconds = String(now.getSeconds()).padStart(2, "0");
+ const dayCycleArray = ["日", "一", "二", "三", "四", "五", "六"];
+ const dayCycle = dayCycleArray[now.getDay()];
- // 补零
- month = month < 10 ? "0" + month : month;
- day = day < 10 ? "0" + day : day;
- hours = hours < 10 ? "0" + hours : hours;
- minutes = minutes < 10 ? "0" + minutes : minutes;
- second = second < 10 ? "0" + second : second;
-
- this.$nextTick(() => {
- this.dateStr = `${year}-${month}-${day}`;
- this.week = `星期${dayCycle}`;
- this.time = `${hours}:${minutes}:${second}`;
- });
+ const dateStr = `${year}-${month}-${day}`;
+ const week = `星期${dayCycle}`;
+ const time = `${hours}:${minutes}:${seconds}`;
+ this.dateStr = dateStr;
+ this.week = week;
+ this.time = time;
}
+
}
}
diff --git a/pages/index/orderdetails.vue b/pages/index/orderdetails.vue
index 483b620..dd81e28 100644
--- a/pages/index/orderdetails.vue
+++ b/pages/index/orderdetails.vue
@@ -194,14 +194,13 @@
-->
-
-
+
+
@@ -157,6 +157,7 @@ import request from '../../utils/request';
import tabBar from '../../components/staffTabBer/tabBar.vue'
import {type} from "../../uni_modules/uni-forms/components/uni-forms/utils";
import upload from "@/utils/upload";
+import USearch from "@/uni_modules/uview-ui/components/u-search/u-search.vue";
export default {
data() {
@@ -271,6 +272,7 @@ export default {
}
},
components: {
+ USearch,
tabBar,
},
methods: {
@@ -607,14 +609,14 @@ export default {
}
.t-input {
- width: 75%;
- height: 36px;
- background: #F0F0F0;
- border-radius: 50px;
- box-sizing: border-box;
+ width: 85%;
+ //height: 36px;
+ //background: #F0F0F0;
+ //border-radius: 50px;
+ //box-sizing: border-box;
padding: 0 15px;
- display: flex;
- align-items: center;
+ //display: flex;
+ //align-items: center;
}
@@ -776,7 +778,7 @@ export default {
justify-content: space-between; /* 控制子元素之间的间距,可以改为 center/space-around */
transform: translate(-50%);
left: 50%;
- z-index: 999998;
+ z-index: 10074;
}
.lanniu-container2 {