diff --git a/pages.json b/pages.json
index 92a4e5e..9dce92a 100644
--- a/pages.json
+++ b/pages.json
@@ -3,7 +3,8 @@
"^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue",
"^cpn-(.*)": "@/components/cpn-$1.vue"
},
- "pages": [{
+ "pages": [
+ {
"path": "pages/enter/enter",
"style": {
"navigationStyle": "custom"
@@ -64,7 +65,8 @@
"navigationBarTitleText": "头像裁剪",
"navigationBarBackgroundColor": "#000000"
}
- }, {
+ },
+ {
"path": "pages/showimg/showimg",
"style": {
"navigationBarTextStyle": "white",
@@ -73,17 +75,33 @@
"animationDuration": 300
}
}
- }
- ],
- "subPackages": [{
- "root": "package_sub",
- "pages": [{
- "path": "pages/index/index",
+ },
+ {
+ "path": "pages/order/order",
+ "style": {
+ "navigationStyle": "custom"
+ }
+ },
+ {
+ "path": "pages/order/addOrder",
"style": {
- "navigationBarTitleText": "分包页面sub_index"
+ "navigationStyle": "custom"
}
- }]
- }],
+ }
+ ],
+ "subPackages": [
+ {
+ "root": "package_sub",
+ "pages": [
+ {
+ "path": "pages/index/index",
+ "style": {
+ "navigationBarTitleText": "分包页面sub_index"
+ }
+ }
+ ]
+ }
+ ],
"globalStyle": {
"navigationBarTextStyle": "white",
"navigationBarTitleText": "uni-app",
@@ -93,7 +111,8 @@
"tabBar": {
"color": "#ABAEBE",
"selectedColor": "#1479FF",
- "list": [{
+ "list": [
+ {
"iconPath": "/static/tabbar/notification.png",
"selectedIconPath": "/static/tabbar/notification-active.png",
"pagePath": "pages/todayNursing/todayNursing",
@@ -111,13 +130,18 @@
"pagePath": "pages/list/list",
"text": "护理列表"
},
+ {
+ "iconPath": "/static/tabbar/order.png",
+ "selectedIconPath": "/static/tabbar/order-active.png",
+ "pagePath": "pages/order/order",
+ "text": "预约护理"
+ },
{
"iconPath": "/static/tabbar/home.png",
"selectedIconPath": "/static/tabbar/home-active.png",
"pagePath": "pages/home/home",
"text": "我的"
}
-
]
}
-}
+}
diff --git a/pages/detailNursing/detailNursing.vue b/pages/detailNursing/detailNursing.vue
index 86a461c..9f62bc7 100644
--- a/pages/detailNursing/detailNursing.vue
+++ b/pages/detailNursing/detailNursing.vue
@@ -69,21 +69,23 @@
实际时长
-
-
- {{item.info.name}}
-
-
-
-
- 分钟
-
-
+
+
+
+ {{item.info.name}}
+
+
+
+
+ 分钟
+
+
+
@@ -100,7 +102,7 @@
签退
- {{dateFormat(time,'HH:mm:ss')}}
+ {{serviceTime}}
更新定位
@@ -205,6 +207,9 @@
detail: {},
time: new Date(),
timer: null,
+
+ serviceTimer: null,//计时器用来跟新总服务时长
+ serviceTimeFlag: 0,
}
},
methods: {
@@ -249,6 +254,14 @@
}
})
this.form.schedule_list_id = this.id
+ if (res.status === 1) {
+ this.serviceTimer = setInterval(() => {
+ this.serviceTimeFlag++;
+ },1000)
+ }
+ if (res.status === 3) {
+ clearInterval(this.serviceTimer)
+ }
console.log(this.skuList);
},
@@ -395,7 +408,7 @@
this.$refs['imgUpload'].clearList()
this.isShowImg = false
this.getDeatil(this.id)
-
+
if(res1.tip){
this.tips = "用户服务次数已达到次数、总服务时长未满"
this.isShowModal = true
@@ -449,7 +462,7 @@
// })
// return
// }
-
+
// this.saveSku().then(res => {
// this.type = 2
// this.isShowImg = true
@@ -497,9 +510,9 @@
}
}
let totalTime = this.$moment(new Date()).diff(this.$moment(this.detail.sign_in), 'minutes')
- if (useTotalTime <= (totalTime + 10) && useTotalTime > totalTime) {
+ if (useTotalTime <= (totalTime + 10) && useTotalTime > totalTime && this.detail.demand === 2) {
this.signOut()
-
+
uni.showToast({
icon:'none',
title:'请下次补足时间',
@@ -546,6 +559,20 @@
}
}
},
+ serviceTime () {
+ let flag = this.serviceTimeFlag;
+ let totalSec = 0;
+ if (this.detail.sign_out) {
+ totalSec = moment(this.detail.sign_out).diff(moment(this.detail.sign_in),"seconds")
+ } else {
+ totalSec = moment().diff(moment(this.detail.sign_in),"seconds")
+ }
+ let sec = totalSec % 60
+ let min = ((totalSec - sec) / 60) % 60
+ let hour = (totalSec - sec - (min * 60)) / 60 / 60
+
+ return `${hour > 0 ? (hour + '时') : ''}${min > 0 ? (min + '分') : ''}${sec}秒`
+ },
typeFormat() {
return function(type) {
let map = new Map([
@@ -867,6 +894,7 @@
}
.text2 {
+ font-size: 30rpx;
@extend .text-class;
}
}
diff --git a/pages/order/addOrder.vue b/pages/order/addOrder.vue
new file mode 100644
index 0000000..731d896
--- /dev/null
+++ b/pages/order/addOrder.vue
@@ -0,0 +1,213 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/order/order.vue b/pages/order/order.vue
new file mode 100644
index 0000000..30f9382
--- /dev/null
+++ b/pages/order/order.vue
@@ -0,0 +1,218 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.customer.name}}
+
+
+
+
+ {{item.customer.phone || '无'}}
+
+
+
+
+
+ {{item.customer_address.address || '无'}}
+
+
+
+
+ {{item.customer.sex || '无'}}
+
+
+
+
+
+
+
+
+ 立即预约
+
+
+
+
+
+
+
+
+
+
diff --git a/static/tabbar/order-active.png b/static/tabbar/order-active.png
new file mode 100644
index 0000000..fccd1e1
Binary files /dev/null and b/static/tabbar/order-active.png differ
diff --git a/static/tabbar/order.png b/static/tabbar/order.png
new file mode 100644
index 0000000..e5c658f
Binary files /dev/null and b/static/tabbar/order.png differ