Browse Source

新增倒计时、修改部分页面样式、修复部分bug

master
longjieli 8 months ago
parent
commit
feaad049a1
27 changed files with 836 additions and 509 deletions
  1. +1
    -1
      service-uniapp-client/components/payOrder/selectTime.vue
  2. +0
    -1
      service-uniapp-client/components/review/reviewList/reviewList.vue
  3. +221
    -180
      service-uniapp-client/components/selectTechnicianCompoents.vue
  4. +1
    -1
      service-uniapp-client/components/technicianList.vue
  5. +2
    -2
      service-uniapp-client/mixins/order.js
  6. +1
    -0
      service-uniapp-client/pages/index/index.vue
  7. +1
    -1
      service-uniapp-client/pages/index/order.vue
  8. +2
    -1
      service-uniapp-client/pages/order/evaluate.vue
  9. +4
    -2
      service-uniapp-client/pages/order/orderDetail.vue
  10. +2
    -101
      service-uniapp-client/pages/technician/subscribeService.vue
  11. +203
    -82
      service-uniapp-client/pages/technician/technicianDetail.vue
  12. +1
    -1
      service-uniapp-client/utils/Share.js
  13. +10
    -3
      service-uniapp-technician/mixins/order.js
  14. +6
    -0
      service-uniapp-technician/pages.json
  15. +4
    -3
      service-uniapp-technician/pages/index/index.vue
  16. +75
    -28
      service-uniapp-technician/pages/index/order.vue
  17. +0
    -1
      service-uniapp-technician/pages/login/login.vue
  18. +6
    -6
      service-uniapp-technician/pages/mine/authentication.vue
  19. +145
    -0
      service-uniapp-technician/pages/mine/countdown.vue
  20. +91
    -90
      service-uniapp-technician/pages/mine/serverTime.vue
  21. +2
    -0
      service-uniapp-technician/pages/mine/settled.vue
  22. +2
    -0
      service-uniapp-technician/pages/mine/upload.vue
  23. +2
    -1
      service-uniapp-technician/pages/order/evaluate.vue
  24. +43
    -4
      service-uniapp-technician/pages/order/orderDetail.vue
  25. +2
    -0
      service-uniapp-technician/plugins/confirm.js
  26. BIN
      service-uniapp-technician/static/music/server-time.mp3
  27. +9
    -0
      service-uniapp-technician/static/work.js

+ 1
- 1
service-uniapp-client/components/payOrder/selectTime.vue View File

@ -42,7 +42,7 @@
{{ item.timeName }}
</view>
<view class="status">
{{ item.isDelete != 'Y' ? '约满' :
{{ item.isDelete != 'Y' ? '未开启' :
isDelete({time : item, date : dateList[i]}) ? '过时' : '空闲'}}
</view>
</view>


+ 0
- 1
service-uniapp-client/components/review/reviewList/reviewList.vue View File

@ -60,7 +60,6 @@
methods: {
//
getSatisfaction(num){
console.log(num);
let satisfaction = ['不满意','不满意','较满意','满意','非常满意']
return satisfaction[num - 1]


+ 221
- 180
service-uniapp-client/components/selectTechnicianCompoents.vue View File

@ -1,242 +1,283 @@
<template>
<view v-if="technicianList.length > 0" v-for="item in technicianList" :key="item.id" class="technician-item"
@click="select(item)">
<view class="technician-img-and-status">
<view class="img-box">
<image :src="item.image" mode="widthFix"></image>
</view>
<view v-if="item.bookable == 'Y'" class="technician-status">
可服务
</view>
</view>
<view class="technician-server-info">
<view class="technician-server-top">
<view class="technician-name">
<text class="name">{{ item.title }}</text>
<text class="btn">更多照片</text>
<van-list v-if="technicianList.length > 0" v-model:loading="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
<view v-for="item in list" :key="item.id" class="technician-item"
@click="select(item)">
<view class="technician-img-and-status">
<view class="img-box">
<image :src="item.image" mode="widthFix"></image>
</view>
<view class="appointed-time">
<view class="capsule">
<view class="earliest-reducible">最早可约</view>
<view class="today">今天{{ item.useTime}}</view>
</view>
<view v-if="item.bookable == 'Y'" class="technician-status">
可服务
</view>
</view>
<view class="technician-server-center">
<view class="server-num">
已服务{{ item.isFw }}
</view>
<view class="position">
<view class="position-icon">
<image src="@/static/technician/position.png" mode="aspectFill"></image>
<view class="technician-server-info">
<view class="technician-server-top">
<view class="technician-name">
<text class="name">{{ item.title }}</text>
<text class="btn">更多照片</text>
</view>
<view class="distance">
{{ item.setKmOpen ? item.setKm : item.km || 0 }}km
<view class="appointed-time">
<view class="capsule">
<view class="earliest-reducible">最早可约</view>
<view class="today">今天{{ item.useTime}}</view>
</view>
</view>
</view>
</view>
<view class="technician-server-bottom">
<view class="evaluate">
<view class="evaluate-icon">
<image src="@/static/technician/evaluate-icon.png"></image>
<view class="technician-server-center">
<view class="server-num">
已服务{{ item.isFw }}
</view>
<view class="evaluate-title">
评价
<view class="position">
<view class="position-icon">
<image src="@/static/technician/position.png" mode="aspectFill"></image>
</view>
<view class="distance">
{{ item.setKmOpen ? item.setKm || 0 : item.km || 0 }}km
</view>
</view>
</view>
<view class="book-now" :class="{ notAvailable : item.bookable != 'Y'}">
{{ item.bookable != 'Y' ? '不可预约' : '立即预约' }}
<view class="technician-server-bottom">
<view class="evaluate">
<view class="evaluate-icon">
<image src="@/static/technician/evaluate-icon.png"></image>
</view>
<view class="evaluate-title">
评价
</view>
</view>
<view class="book-now" :class="{ notAvailable : item.bookable != 'Y'}">
{{ item.bookable != 'Y' ? '不可预约' : '立即预约' }}
</view>
</view>
</view>
</view>
</view>
<van-empty v-else image="/static/empty/data.png" image-size="400rpx" description="此项目暂无技师服务"/>
</van-list>
<van-empty v-else image="/static/empty/data.png" image-size="400rpx" description="此项目暂无技师服务" />
</template>
<script>
import Position from '@/utils/position.js'
export default {
name:"selectTechnicianCompoents",
props : ['technicianList', "select"],
name: "selectTechnicianCompoents",
props: ['technicianList', "select"],
data() {
return {
loading : false,
finished : false,
list : [],
queryParams : {
pageNo : 0,
pageSize : 10
},
position : null
}
},
created(){
this.calculatedDistance()
created() {
this.paging()
},
methods : {
calculatedDistance(){ //
Position.getLocation(result => {
this.technicianList.forEach(item => {
let distance = Position.calculateDistance(result.latitude,result.longitude,item.latitude,item.longitude)
item.km = distance;
methods: {
catch(index) { //
if(this.position,index){
this.calculatedDistance(this.position,index)
}else{
Position.getLocation(result => {
this.position = result
this.calculatedDistance(result,index)
})
})
}
},
//
calculatedDistance(result,index){
console.log(index);
for(let i = index || 0 ; i < this.list.length ; i++){
let distance = Position.calculateDistance(result.latitude, result.longitude, this.list[i]
.latitude, this.list[i].longitude)
this.list[i].km = distance;
}
},
//
onLoad(){
this.queryParams.pageNo += 1
this.paging()
},
//
paging(){
this.loading = true
let { pageNo , pageSize } = this.queryParams
let startPostion = pageNo * pageSize
this.list.push(...this.technicianList.slice( startPostion , startPostion + pageSize))
this.catch(startPostion)
if(this.list.length >= this.technicianList.length){
this.finished = true
}
this.loading = false
}
}
}
</script>
<style scoped lang="scss">
.technician-item {
display: flex;
background: white;
padding: 20rpx;
margin-bottom: 20rpx;
.technician-img-and-status {
position: relative;
height: 150rpx;
.technician-item {
display: flex;
flex-direction: column;
justify-content: space-between;
background: white;
padding: 20rpx;
margin-bottom: 20rpx;
.img-box {
width: 150rpx;
.technician-img-and-status {
position: relative;
height: 150rpx;
background: #ccc;
border-radius: 10rpx;
overflow: hidden;
image{
display: flex;
flex-direction: column;
justify-content: space-between;
.img-box {
width: 150rpx;
height: 150rpx;
background: #ccc;
border-radius: 10rpx;
overflow: hidden;
image {
width: 150rpx;
}
}
}
.technician-status {
display: flex;
justify-content: center;
align-items: center;
position: absolute;
left: 10%;
bottom: -15rpx;
background: #55CCA7;
width: 80%;
color: white;
font-size: 22rpx;
height: 35rpx;
border-radius: 5rpx;
.technician-status {
display: flex;
justify-content: center;
align-items: center;
position: absolute;
left: 10%;
bottom: -15rpx;
background: #55CCA7;
width: 80%;
color: white;
font-size: 22rpx;
height: 35rpx;
border-radius: 5rpx;
}
}
}
.technician-server-info {
display: flex;
width: calc(100% - 150rpx);
padding: 0rpx 20rpx;
flex-direction: column;
justify-content: space-between;
.technician-server-top {
.technician-server-info {
display: flex;
width: calc(100% - 150rpx);
padding: 0rpx 20rpx;
flex-direction: column;
justify-content: space-between;
align-items: center;
font-size: 26rpx;
.technician-name {
.name {
font-weight: 600;
margin-right: 10rpx;
.technician-server-top {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 26rpx;
.technician-name {
.name {
font-weight: 600;
margin-right: 10rpx;
}
.btn {
border: 1px solid #55CCA7;
color: #55CCA7;
font-size: 20rpx;
padding: 5rpx;
border-radius: 5rpx;
}
}
.btn {
border: 1px solid #55CCA7;
color: #55CCA7;
.appointed-time {
width: 40%;
background: #E7FDF7;
height: 40rpx;
border-radius: 22.5rpx;
font-size: 20rpx;
padding: 5rpx;
border-radius: 5rpx;
}
}
color: #5DB9A3;
.appointed-time {
width: 40%;
background: #E7FDF7;
height: 40rpx;
border-radius: 22.5rpx;
font-size: 20rpx;
color: #5DB9A3;
.capsule {
display: flex;
height: 100%;
align-items: center;
.earliest-reducible {
.capsule {
display: flex;
align-items: center;
justify-content: center;
width: 50%;
height: 100%;
color: white;
border-radius: 20rpx;
background: #52CFB0;
}
.today {
width: 50%;
text-align: center;
align-items: center;
.earliest-reducible {
display: flex;
align-items: center;
justify-content: center;
width: 50%;
height: 100%;
color: white;
border-radius: 20rpx;
background: #52CFB0;
}
.today {
width: 50%;
text-align: center;
}
}
}
}
}
.technician-server-center {
display: flex;
align-items: center;
font-size: 26rpx;
color: #888;
.position {
.technician-server-center {
display: flex;
margin-left: 10rpx;
}
align-items: center;
font-size: 26rpx;
color: #888;
.position {
display: flex;
margin-left: 10rpx;
}
image {
width: 25rpx;
height: 25rpx;
}
}
.technician-server-bottom {
display: flex;
justify-content: space-between;
.evaluate{
display: flex;
align-items: center;
color: #333;
font-size: 20rpx;
.evaluate-icon{
margin-right: 10rpx;
image {
width: 25rpx;
height: 25rpx;
}
}
.book-now{
.technician-server-bottom {
display: flex;
align-items: center;
justify-content: center;
height: 50rpx;
width: 160rpx;
border-radius: 40rpx;
color: white;
background: linear-gradient(170deg, #53CEAC, #5AC796);
font-size: 24rpx;
}
.notAvailable{
background: #ccc;
}
image{
width: 25rpx;
height: 25rpx;
justify-content: space-between;
.evaluate {
display: flex;
align-items: center;
color: #333;
font-size: 20rpx;
.evaluate-icon {
margin-right: 10rpx;
}
}
.book-now {
display: flex;
align-items: center;
justify-content: center;
height: 50rpx;
width: 160rpx;
border-radius: 40rpx;
color: white;
background: linear-gradient(170deg, #53CEAC, #5AC796);
font-size: 24rpx;
}
.notAvailable {
background: #ccc;
}
image {
width: 25rpx;
height: 25rpx;
}
}
}
}
}
</style>

+ 1
- 1
service-uniapp-client/components/technicianList.vue View File

@ -26,7 +26,7 @@
<view class="alert-collect">
<image src="@/static/technician/address.png" mode="aspectFit"></image>
<text class="alert-add-collect">
{{ item.setKmOpen == 'Y' ? item.setKm : item.km || 0 }}km
{{ item.setKmOpen ? item.setKm || 0 : item.km || 0 }}km
</text>
</view>
</view>


+ 2
- 2
service-uniapp-client/mixins/order.js View File

@ -15,9 +15,9 @@ export default {
},
//立即评价
toEvaluate(id,projectId) {
toEvaluate(id,projectId,terId) {
uni.navigateTo({
url: '/pages/order/evaluate?id=' + id + '&projectId=' + projectId
url: `/pages/order/evaluate?id=${id}&projectId=${projectId}&terId=${terId}`
})
},


+ 1
- 0
service-uniapp-client/pages/index/index.vue View File

@ -359,6 +359,7 @@
width: 100%;
margin: 0px auto;
border-radius: 20rpx;
height: 334rpx;
overflow: hidden;
.van-swipe-item {


+ 1
- 1
service-uniapp-client/pages/index/order.vue View File

@ -66,7 +66,7 @@
<view class="b1" @click.stop="moreOrder(item.projectId,toPlaceorder)" v-if="item.state == 3">
再来一单
</view>
<view class="b2" @click.stop="toEvaluate(item.id,item.projectId)" v-if="item.state == 3">
<view class="b2" @click.stop="toEvaluate(item.id,item.projectId,item.technicianId)" v-if="item.state == 3">
立即评价
</view>
<view class="b2" @click.stop="moreOrder(item.projectId,toPlaceorder)" v-if="item.state == 4">


+ 2
- 1
service-uniapp-client/pages/order/evaluate.vue View File

@ -146,7 +146,8 @@ import mNavbar from '@/components/base/m-navbar.vue'
labelText : this.select.join(','),
type : 0,
orderId : this.$route.query.id,
shopId : this.$route.query.projectId
shopId : this.$route.query.projectId,
terId : this.$route.query.terId
}, res => {
if(res.code == 200){
uni.showToast({


+ 4
- 2
service-uniapp-client/pages/order/orderDetail.vue View File

@ -179,7 +179,7 @@
优惠券
</view>
<view class="">
-0.00
-{{ coupon.money || 0 }}
</view>
</view>
</view>
@ -248,7 +248,8 @@
msgOrder: [],
msgShop: [],
msgTechnician: [],
phone: ''
phone: '',
coupon : {}
}
},
onShow() {
@ -266,6 +267,7 @@
this.msgOrder = res.result.msgOrder;
this.msgShop = res.result.msgShop;
this.msgTechnician = res.result.msgTechnician;
this.coupon = res.result.coupon
this.changeSetup()
}
})


+ 2
- 101
service-uniapp-client/pages/technician/subscribeService.vue View File

@ -78,37 +78,6 @@
</view>
</view>
<view class="review bg-white mar-10 box-s">
<view class="review-title">用户评论({{ countReviewNum }}+)</view>
<view class="review-classify">
<view @click="selectReview(0)" class="review-classify-item" :class="{'select-classify' : queryParams.fraction == 0}">
好评
<text class="num">{{ goodReputationNum }}</text>
</view>
<view @click="selectReview(1)" class="review-classify-item" :class="{'select-classify' : queryParams.fraction == 1}">
中评
<text class="num">{{ mediumReviewNum }}</text>
</view>
<view @click="selectReview(2)" class="review-classify-item" :class="{'select-classify' : queryParams.fraction == 2}">
差评
<text class="num">{{ negativeComment }}</text>
</view>
</view>
<van-list
v-if="reviewList.length > 0"
v-model:loading="loading"
:finished="finished"
finished-text="没有更多了"
@load="onLoad"
>
<reviewListVue :list="reviewList"></reviewListVue>
</van-list>
<van-empty v-else image="/static/empty/record.png" image-size="400rpx" description="暂无评论"/>
</view>
<view class="select-button bg-white">
<view @click="selectTechnician" class="btn">
下单选择技师
@ -119,12 +88,10 @@
<script>
import mNavbar from '@/components/base/m-navbar.vue'
import reviewListVue from '@/components/review/reviewList/reviewList.vue'
export default {
components: {
mNavbar,
reviewListVue
mNavbar
},
data() {
return {
@ -140,16 +107,11 @@
fraction : 0
},
loading : false,
finished : false,
goodReputationNum : 0, //
mediumReviewNum : 0, //
negativeComment : 0, //
countReviewNum : 0, //
finished : false
}
},
onShow() {
this.getProjectDetail()
this.getReview()
this.getConfig()
},
methods: {
@ -166,27 +128,6 @@
})
},
//
getReview(index) {
this.loading = true
this.$api('getCommentList', this.queryParams, res => {
if (res.code == 200) {
this.reviewList = res.result;
// if(res.result.total > this.queryParams.pageSize){
// this.finished = true;
// }
this.finished = true;
this.loading = false;
if(index > -1){
let list = [ 'goodReputationNum' , 'mediumReviewNum' , 'negativeComment' ]
let a = list[index];
// this[a] =
}
}
})
},
//
back() {
if (this.$route.query.r == '1') {
@ -226,18 +167,6 @@
})
},
//
selectReview(index){
this.queryParams.fraction = index;
this.queryParams.pageSize + 10;
this.getReview(index)
},
//
onLoad(){
this.queryParams.pageSize += 10;
this.getReview()
}
}
}
</script>
@ -420,34 +349,6 @@
}
}
.review {
padding: 0rpx 20rpx 40rpx 20rpx;
.review-title {
padding: 25rpx 20rpx;
font-size: 32rpx;
font-weight: 500;
}
.review-classify {
display: flex;
padding: 0rpx 0rpx 30rpx 0rpx;
.review-classify-item {
background: #EEEDED;
padding: 5rpx 15rpx;
border-radius: 5rpx;
margin-right: 15rpx;
color: #666;
}
.select-classify {
background: #ECFCF1;
color: #55B16E;
}
}
}
.select-button {
position: fixed;
display: flex;


+ 203
- 82
service-uniapp-client/pages/technician/technicianDetail.vue View File

@ -4,12 +4,12 @@
<view class="technician-Detail-img">
<van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
<van-swipe-item v-for="(item,index) in technicianImages" :key="index">
<image :src="item" style="width: 100%;" mode="widthFix"></image>
</van-swipe-item>
<template #indicator="{ active, total }">
<!-- <div class="custom-indicator">{{ active + 1 }}/{{ total }}</div> -->
</template>
<van-swipe-item v-for="(item,index) in technicianImages" :key="index">
<image :src="item" style="width: 100%;" mode="widthFix"></image>
</van-swipe-item>
<template #indicator="{ active, total }">
<!-- <div class="custom-indicator">{{ active + 1 }}/{{ total }}</div> -->
</template>
</van-swipe>
<view class="technician-Detail-img-text">下单付款后商家会在10分钟内联系你哦~</view>
</view>
@ -17,7 +17,8 @@
<view class="techni-content">
<view class="userInfo">
<view class="img-box">
<image @click="showImage(technicianDetail.image)" :src="technicianDetail.image" mode="aspectFill"></image>
<image @click="showImage(technicianDetail.image)" :src="technicianDetail.image" mode="aspectFill">
</image>
</view>
<view class="base-info">
<view class="username-tag">
@ -45,7 +46,7 @@
<view class="desc">实名</view>
</view>
</view>
<view class="service-experience">
<view class="experience">
{{ technicianDetail.experience }}年经验
@ -56,7 +57,7 @@
</view>
</view>
</view>
<view class="view">
<view class="service-description">
<div v-for="item in serviceDescList" class="sesc-item">
@ -87,10 +88,11 @@
<!-- <view class="ServicesAvailable">
<view>服务项目</view>
</view> -->
<van-tabs class="tabs" v-model:active="activeTag">
<van-tab title="服务项目">
<van-empty v-if="projectList.length <= 0" image="/static/empty/message-list.png" image-size="400rpx" description="暂无服务"/>
<van-empty v-if="projectList.length <= 0" image="/static/empty/message-list.png" image-size="400rpx"
description="暂无服务" />
<view v-else class="server-list">
<view v-for="item in projectList" class="server-item" @click="toPayOrder(item)">
<view class="img-box">
@ -117,41 +119,81 @@
</view>
</view>
<view class="selective-technician">
<view @click.stop="toPayOrder(item)" :class="{ notAvailable : technicianDetail.bookable != 'Y' }" class="btn">
<view @click.stop="toPayOrder(item)"
:class="{ notAvailable : technicianDetail.bookable != 'Y' }" class="btn">
{{ technicianDetail.bookable == 'Y' ? '立即预约' : '不可预约' }}
</view>
</view>
</view>
</view>
</van-tab>
<van-tab title="健康证">
<view class="health-certificate">
<van-empty v-if="false" image="/static/empty/order.png" image-size="400rpx" description="技师暂未上传健康证"/>
<van-empty v-if="!technicianDetail.healthCertificate" image="/static/empty/order.png" image-size="400rpx"
description="技师暂未上传健康证" />
<view v-else class="health-certificate-main">
<image @click="showImage('../../static/ms/w.png')" src="../../static/ms/w.png" mode="widthFix" style="width: 100%;"></image>
<image @click="showImage(technicianDetail.healthCertificate)"
:src="technicianDetail.healthCertificate" mode="widthFix" style="width: 100%;"></image>
</view>
</view>
</van-tab>
<van-tab title="营业证">
<view class="health-certificate">
<van-empty v-if="false" image="/static/empty/order.png" image-size="400rpx" description="技师暂未上传健康证"/>
<van-empty v-if="!technicianDetail.businessLicense" image="/static/empty/order.png" image-size="400rpx"
description="技师暂未上传健康证" />
<view v-else class="health-certificate-main">
<image @click="showImage('../../static/ms/w.png')" src="../../static/ms/w.png" mode="widthFix" style="width: 100%;"></image>
<image @click="showImage(technicianDetail.businessLicense)"
:src="technicianDetail.businessLicense" mode="widthFix" style="width: 100%;"></image>
</view>
</view>
</van-tab>
<van-tab title="用户评论">
<view class="review bg-white mar-10 box-s">
<!-- <view class="review-title">用户评论({{ countReviewNum }}+)</view> -->
<view class="review-classify">
<view @click="selectReview(0)" class="review-classify-item"
:class="{'select-classify' : reviewQueryParams.fraction == 0}">
好评
<text class="num">{{ goodReputationNum }}</text>
</view>
<view @click="selectReview(1)" class="review-classify-item"
:class="{'select-classify' : reviewQueryParams.fraction == 1}">
中评
<text class="num">{{ mediumReviewNum }}</text>
</view>
<view @click="selectReview(2)" class="review-classify-item"
:class="{'select-classify' : reviewQueryParams.fraction == 2}">
差评
<text class="num">{{ negativeComment }}</text>
</view>
</view>
<van-list v-if="reviewList.length > 0" v-model:loading="loading" :finished="finished"
finished-text="没有更多了" @load="onLoad">
<reviewListVue :list="reviewList"></reviewListVue>
</van-list>
<van-empty v-else image="/static/empty/record.png" image-size="400rpx" description="暂无评论" />
</view>
</van-tab>
</van-tabs>
</view>
</view>
</template>
<script>
import { showImagePreview } from 'vant';
import {
showImagePreview
} from 'vant';
import reviewListVue from '@/components/review/reviewList/reviewList.vue'
export default {
components : { reviewListVue },
data() {
return {
searchKeyword: '',
@ -159,19 +201,32 @@
projectList: [],
queryParams: {
pageNo: 1,
pageSize: 100
pageSize: 100,
fraction: 0
},
loading: false,
finished: false,
serviceDescList : ['实名认证','头像认证','健康证','按摩师证'],
collect : 0,
technicianImages : [],
activeTag : 0
serviceDescList: ['实名认证', '头像认证', '健康证', '按摩师证'],
collect: 0,
technicianImages: [],
activeTag: 0,
goodReputationNum: 0, //
mediumReviewNum: 0, //
negativeComment: 0, //
countReviewNum: 0, //
reviewList: [],
reviewQueryParams: {
pageNo: 1,
pageSize: 10,
fraction: 0,
tenantId : '',
projectId : '1797549059400646658',
type : 0
},
}
},
onShow() {
this.getTechnicianDetail()
},
methods: {
//
@ -182,9 +237,12 @@
if (res.code == 200) {
this.collect = res.result.collect
this.technicianDetail = res.result.msgTechnician
if(res.result.msgTechnician.images == ''){ //
this.reviewQueryParams.tenantId = this.technicianDetail.id
this.getReview(this.reviewQueryParams.fraction)
if (res.result.msgTechnician.images == '') { //
this.technicianImages = ['/static/technician/album.png']
}else{
} else {
this.technicianImages = res.result.msgTechnician.images.split(',')
}
this.projectList = res.result.list
@ -214,7 +272,7 @@
id,
setKmOpen
} = this.$route.query
uni.navigateTo({ //setKmOpen distance
uni.navigateTo({ //setKmOpen distance
url: `/pages/order/payOrder?orderId=${res.result.id}&distance=${distance}&id=${id}&current=technicianDetail&setKmOpen=${setKmOpen}`
})
}
@ -235,11 +293,45 @@
})
},
//
showImage(imgUrl){
showImagePreview({
images: [imgUrl],
closeable: true,
});
showImage(imgUrl) {
if(imgUrl){
showImagePreview({
images: [imgUrl],
closeable: true,
});
}
},
//
selectReview(index) {
this.reviewQueryParams.fraction = index;
this.reviewQueryParams.pageSize + 10;
this.getReview(index)
},
//
getReview(index) {
this.loading = true
this.$api('getCommentList', this.reviewQueryParams, res => {
if (res.code == 200) {
this.reviewList = res.result;
// if(res.result.total > this.queryParams.pageSize){
// this.finished = true;
// }
this.finished = true;
this.loading = false;
if (index > -1) {
let list = ['goodReputationNum', 'mediumReviewNum', 'negativeComment']
let a = list[index];
this[a] = res.result.length
}
}
})
},
//
onLoad(){
console.log('触发');
this.queryParams.pageSize += 10;
this.getReview()
}
}
}
@ -267,22 +359,22 @@
position: relative;
max-height: 900rpx;
overflow: hidden;
.my-swipe .van-swipe-item {
color: #fff;
font-size: 20px;
line-height: 150px;
text-align: center;
}
.custom-indicator {
position: absolute;
right: 15rpx;
bottom: 80rpx;
padding: 5rpx 10rpx;
font-size: 20rpx;
background: rgba(0, 0, 0, 0.1);
}
.my-swipe .van-swipe-item {
color: #fff;
font-size: 20px;
line-height: 150px;
text-align: center;
}
.custom-indicator {
position: absolute;
right: 15rpx;
bottom: 80rpx;
padding: 5rpx 10rpx;
font-size: 20rpx;
background: rgba(0, 0, 0, 0.1);
}
.technician-Detail-img-text {
display: flex;
@ -315,8 +407,8 @@
height: 120rpx;
overflow: hidden;
border-radius: 50%;
&::v-deep div{
&::v-deep div {
background-position: center top !important;
background-size: 100% !important;
}
@ -387,72 +479,101 @@
border: 1px solid #3484E8;
color: #3484E8;
font-size: 22rpx;
image {
width: 18rpx;
height: 18rpx;
}
}
> view{
>view {
border-right: 1px solid #ccc;
padding: 0rpx 8rpx;
&:nth-child(1){
&:nth-child(1) {
padding-left: 0;
}
&:nth-last-child(2){
&:nth-last-child(2) {
border-right: none;
}
}
}
.service-experience{
.service-experience {
display: flex;
.experience{
.experience {
color: #ED9044;
margin-right: 20rpx;
}
.service-num{
}
.service-num {}
}
}
}
.service-description {
display: flex;
background: white;
justify-content: space-between;
padding: 30rpx 10rpx;
.sesc-item {
display: flex;
color: #FFD777;
image {
width: 30rpx;
height: 30rpx;
}
}
}
.line{
.line {
padding: 0rpx 10rpx;
background: white;
view{
view {
border-bottom: 2px dashed #EBE7E7;
}
}
.text{
.text {
background: white;
box-sizing: border-box;
padding: 10rpx 10rpx 30rpx 10rpx;
border-bottom-left-radius: 10rpx;
border-bottom-right-radius: 10rpx;
}
.review {
padding: 0rpx 20rpx 40rpx 20rpx;
.review-title {
padding: 25rpx 20rpx;
font-size: 32rpx;
font-weight: 500;
}
.review-classify {
display: flex;
padding: 30rpx 0rpx 30rpx 0rpx;
.review-classify-item {
background: #EEEDED;
padding: 5rpx 15rpx;
border-radius: 5rpx;
margin-right: 15rpx;
color: #666;
}
.select-classify {
background: #ECFCF1;
color: #55B16E;
}
}
}
}
.ServicesAvailable {
@ -468,11 +589,11 @@
padding-left: 10px;
}
}
.tabs {
margin-top: 20rpx;
&::v-deep .van-tabs__wrap{
&::v-deep .van-tabs__wrap {
border-radius: 10rpx;
}
}
@ -593,19 +714,19 @@
color: white;
background: linear-gradient(170deg, #53CEAC, #5AC796);
}
.notAvailable {
background: #ccc;
}
}
}
}
.health-certificate{
.health-certificate {
padding-bottom: 80rpx;
.health-certificate-main{
.health-certificate-main {
margin: 15rpx 0rpx 30rpx 0rpx;
background: white;
min-height: 30vh;


+ 1
- 1
service-uniapp-client/utils/Share.js View File

@ -51,7 +51,7 @@ function share() { //微信分享
window.jWeixin.onMenuShareWeibo(shareData);
});
window.jWeixin.error(function(res){
window.jWeixin.error(function(err){
console.error(err);
// config信息验证失败会执行error函数,如签名过期导致验证失败,具体错误信息可以打开config的debug模式查看,也可以在返回的res参数中查看,对于SPA可以在这里更新签名。
})


+ 10
- 3
service-uniapp-technician/mixins/order.js View File

@ -81,24 +81,31 @@ export default {
// 开始服务
startVipService(order, callback, ...args) {
this.$comfirm('开始服务?', () => {
this.$api('startVipService', {
orderId: order.id
}, res => {
if (res.code == 200) {
uni.showToast({
mask: true,
duration: 1000,
title: res.message,
});
callback && callback(...args)
callback && callback(order,...args)
}
}, true)
})
},
// 结束服务
endVipService(order, callback, ...args) {
let self = this
let { useTime , startServiceTime } = order
let isTimeout = new Date(startServiceTime).valueOf() + useTime * 1000 * 60
if(Date.now() < isTimeout){
return uni.showToast({
title : '服务未结束',
icon : 'none'
})
}
this.$comfirm('确认结束服务?', () => {
uni.chooseImage({


+ 6
- 0
service-uniapp-technician/pages.json View File

@ -112,6 +112,12 @@
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/mine/countdown",
"style": {
"navigationBarTitleText": ""
}
}
],
"globalStyle": {


+ 4
- 3
service-uniapp-technician/pages/index/index.vue View File

@ -25,7 +25,7 @@
<view class="banner-button">立即联系我们>></view> -->
<van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
<van-swipe-item v-for="item in bannerList" :key="item.id">
<image class="banner-image" :src="item.image" mode="aspectFill"></image>
<image class="banner-image" :src="item.image" mode="widthFix"></image>
</van-swipe-item>
</van-swipe>
</view>
@ -211,6 +211,8 @@
uni.showModal({
content: is ? '确认上线吗?你将开始接单!' : '确认下线吗?',
confirmText : '确认',
cancelText : '取消',
success: function(res) {
if (res.confirm) {
uni.showLoading({
@ -326,14 +328,13 @@
.my-swipe {
width: 100%;
height: 500rpx;
height: 334rpx;
margin: 0px auto;
border-radius: 15rpx;
overflow: hidden;
.banner-image {
width: 100%;
height: 100%;
vertical-align: middle;
}
}


+ 75
- 28
service-uniapp-technician/pages/index/order.vue View File

@ -56,9 +56,9 @@
<view class="mt20">
<van-list v-if="orderList.length > 0" v-model:loading="loading" :finished="finished" @load="onLoad">
<van-list v-if="orderList.length > 0" v-model:loading="loading" :finished="finished" @load="onLoad">
<view v-show="item.state" class="item" v-for="(item, index) in orderList"
<view class="item" v-for="(item, index) in orderList"
@click="toOrderDetail(item.id)">
<view class="top">
<view class="service">
@ -107,18 +107,22 @@
到达打卡
</view>
<view class="b2" v-if="item.tenState == 3"
@click.stop="startVipService(item, getOrderList)">
@click.stop="startVipService(item, startServiceCallback)">
开始服务
</view>
<view class="b1" v-if="item.tenState == 4 && !item.isTimeout"
@click.stop="toCountdown(item)">
服务时间
</view>
<view class="b2" v-if="item.tenState == 4"
@click.stop="endVipService(item, toEvaluate, item.id, item.projectId)">
@click.stop="endVipService(item, toEvaluate, item.id, item.projectId,item.technicianId)">
结束服务
</view>
<view class="b1" @click.stop="toEvaluate()" v-if="item.tenState == 5">
<!-- <view class="b1" @click.stop="toEvaluate()" v-if="item.tenState == 5">
投诉举报
</view>
<view class="b2" @click.stop="toEvaluate(item.id,item.projectId)"
v-if="item.tenState == 5 && item.evaluated == 0">
</view> -->
<view class="b2" @click.stop="toEvaluate(item.id,item.projectId,item.technicianId)"
v-if="item.tenState == 5">
立即评价
</view>
</view>
@ -130,13 +134,13 @@
</view>
</van-list>
<van-empty v-else image="/static/empty/order.png" image-size="400rpx" :description="getStatus()"/>
<van-empty v-else image="/static/empty/order.png" image-size="400rpx" :description="getStatus()" />
</view>
</view>
</view>
</template>
@ -160,13 +164,15 @@
selectDate: null,
config: [],
notice: '',
completedQuantity : 0,
confirmedQuantity : 0,
numberOfVisits : 0
completedQuantity: 0,
confirmedQuantity: 0,
numberOfVisits: 0,
countdownOrder: uni.getStorageSync('countdownOrder') ? JSON.parse(uni.getStorageSync('countdownOrder')) :
{}
}
},
onShow() {
this.getOrderList()
this.getOrderList(this.queryParams.state)
this.getConfig()
this.dateList = []
@ -186,7 +192,7 @@
this.getOrderList()
},
//
getOrderList(state) {
getOrderList(state, order) {
let params = {
...this.queryParams,
@ -198,19 +204,39 @@
this.$api('getTenOrderPageList', params, res => {
if (res.code == 200) {
if (res.code == 200) {
this.orderList = res.result.records;
let titles = ['completedQuantity','confirmedQuantity','numberOfVisits']
let current = titles[state]
this[current] = this.orderList.length
} else {
this.finished = true
res.result.records.forEach(item => {
item.isTimeout = true; //
if (item && item.startServiceTime) { //
let isTimeout = new Date(item.startServiceTime).valueOf() + item.useTime *
1000 * 60
if (Date.now() <= isTimeout) {
item.isTimeout = false
}
}
})
this.orderList = res.result.records;
//
let titles = ['completedQuantity', 'confirmedQuantity', 'numberOfVisits']
let current = titles[state]
this[current] = res.result.total
//
if (order && order.id) {
this.orderList.forEach(item => {
if (item.id == order.id) {
this.toCountdown(item)
}
})
}
if (this.queryParams.pageSize > this.orderList.length) {
this.finished = true
}
this.loading = false
} else {
this.finished = true
}
this.loading = false
})
},
selectTenState(state) {
@ -228,9 +254,9 @@
this.queryParams.serviceTime = this.dayjs(selectDate).format('YYYY-MM-DD')
this.getOrderList(this.queryParams.state)
},
toEvaluate(id, projectId) {
toEvaluate(id, projectId, terId) {
uni.navigateTo({
url: '/pages/order/evaluate?id=' + id + '&projectId=' + projectId
url : `/pages/order/evaluate?id=${id}&projectId=${projectId}&terId=${terId}`
})
},
toOrderDetail(id) {
@ -252,9 +278,30 @@
})
},
//
getStatus(){
let titles = ['暂无已完成订单','暂无待确认订单','暂无待上门']
getStatus() {
let titles = ['暂无已完成订单', '暂无待确认订单', '暂无待上门']
return titles[this.queryParams.state]
},
//
toCountdown(order) {
let {
useTime,
startServiceTime
} = order
let isTimeout = new Date(startServiceTime).valueOf() + useTime * 1000 * 60
if (Date.now() >= isTimeout) {
return uni.showToast({
title: '服务时间已过',
icon: 'none'
})
}
uni.navigateTo({
url: `/pages/mine/countdown?time=${useTime}&startTime=${startServiceTime}`
})
},
//
startServiceCallback(order) {
this.getOrderList(this.queryParams.state, order)
}
}
}


+ 0
- 1
service-uniapp-technician/pages/login/login.vue View File

@ -82,7 +82,6 @@
this.$httpGet("/wxma/getMobile", {
encryptedData: encryptData
}, (res) => {
console.log(res);
uni.setStorageSync("userid", "1")
})
},


+ 6
- 6
service-uniapp-technician/pages/mine/authentication.vue View File

@ -60,9 +60,9 @@
<view class="head-line"/>
<view class="tt">营业证上传</view>
</view>
<view :class="{ii : !form.idImage}" style="width: 172rpx;
margin-top: 40rpx;" @click="selectImage('shopCard')">
<image :src="form.businessPicture" mode="aspectFill" class="ii-image"></image>
<view :class="{ii : !form.idImage2}" style="width: 172rpx;
margin-top: 40rpx;" @click="selectImage('idImage2')">
<image :src="form.idImage2" mode="aspectFill" class="ii-image"></image>
</view>
</view>
@ -87,7 +87,7 @@ export default {
idImg2 : '',
idCard : '',
name : '',
businessPicture : ''
idImage2 : ''
}
}
},
@ -116,7 +116,7 @@ export default {
});
},
parameterVerification(){ //
let { name , idCard , idImage , idImg , idImg2 } = this.form
let { name , idCard , idImage , idImg , idImg2 , idImage2 } = this.form
if(name && name.trim() == ''){
return { title : '请填写用户名' , auth : false }
}else if(idCard && idCard.trim() == ''){
@ -127,7 +127,7 @@ export default {
return { title : '请上传身份证反面' , auth : false }
}else if(!idImage || idImage.trim() == ''){
return { title : '请上传健康证' , auth : false }
}else if(!businessPicture || businessPicture.trim() == ''){
}else if(!idImage2 || idImage2.trim() == ''){
return { title : '请上传营业证' , auth : false }
}
return { title : '验证通过' , auth : true }


+ 145
- 0
service-uniapp-technician/pages/mine/countdown.vue View File

@ -0,0 +1,145 @@
<template>
<view class="countdown">
<van-circle v-model:current-rate="currentRate" :rate="rate" :speed="100" :color="gradientColor" size="600rpx">
<template #default>
<view class="countdown-main">
<van-count-down :time="countTime" @change="calculateCountdownPercentage(countTime,startTime)">
<template #default="timeData">
<view class="countdown-title">剩余服务时间</view>
<view class="a1">
<span class="block">{{ addZero(timeData.hours) }}</span>
<span class="colon">:</span>
<span class="block">{{ addZero(timeData.minutes) }}</span>
<span class="colon">:</span>
<span class="block">{{ addZero(timeData.seconds) }}</span>
</view>
</template>
</van-count-down>
</view>
</template>
</van-circle>
</view>
</template>
<script>
export default {
data() {
return {
currentRate: 0,
rate : 0,
gradientColor: {
'0%': '#4899a6',
'100%': '#6fc6ad',
},
startTime : 0,
endTime: 0,
countTime : 0,
audio: new Audio(),
worker: null
}
},
onShow() {
//
this.startTime = new Date(this.$route.query.startTime).valueOf();
this.endTime = this.startTime + (this.$route.query.time ? this.$route.query.time * 1000 * 60 : 0)
this.countTime = this.endTime - Date.now() //()
let self = this;
this.audio.src = '/static/music/server-time.mp3'
this.worker = new Worker('/static/work.js')
this.worker.postMessage({
startTime : this.startTime,
endTime : this.endTime
});
this.worker.onmessage = function(event) {
self.play()
}
},
onUnload(){
this.worker.terminate()
this.audio.pause()
this.audio = null
},
methods: {
//
play() {
this.audio.play()
this.worker.terminate()
},
//
calculateCountdownPercentage() {
let totalTime = this.endTime - this.startTime;
let elapsedTime = Date.now() - this.startTime;
//
let percentage = (elapsedTime / totalTime) * 100;
// 100%100%
this.rate = Math.min(percentage, 100);
},
//0
addZero(time){
if(time < 10){
return '0' + time
}
return time
}
}
}
</script>
<style lang="scss" scoped>
.countdown {
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background: #f7f7f7;
width: 750rpx;
margin: 0rpx auto;
.countdown-main {
display: flex;
width: 600rpx;
height: 600rpx;
justify-content: center;
align-items: center;
.countdown-title {
text-align: center;
margin-bottom: 30rpx;
font-size: 35rpx;
color: #8f8f8f;
}
.a1 {
display: flex;
align-items: center;
height: 80rpx;
.colon {
margin: 0 8rpx;
color: black;
}
.block {
display: flex;
align-items: center;
justify-content: center;
width: 80rpx;
height: 80rpx;
color: #fff;
font-size: 28rpx;
font-weight: bold;
background-color: #4899a6;
border-radius: 10rpx;
margin: 0rpx 15rpx;
}
}
}
}
</style>

+ 91
- 90
service-uniapp-technician/pages/mine/serverTime.vue View File

@ -1,7 +1,7 @@
<template>
<mNavbar title="服务时间" :leftClick="leftClick">
</mNavbar>
<view class="box">
<van-dropdown-menu>
<van-dropdown-item @change='changeServer' v-model="serviceTitle" :options="techniService" />
@ -30,8 +30,9 @@
<view class="time-list" v-else-if="timeList.length">
<view :class="{'time-item' : true , no : !item.timeOut && item.isDelete == 'Y' , timeOut : item.timeout }" v-for="(item, index) in timeList"
@click="selectTime({time : item, date : dateList[i]})">
<view
:class="{'time-item' : true , no : !item.timeOut && item.isDelete == 'Y' , timeOut : item.timeout }"
v-for="(item, index) in timeList" @click="selectTime({time : item, date : dateList[i]})">
<van-checkbox-group v-model="checked">
<view v-if="multipleChoice" class="checked">
<van-checkbox :name="item.id" :disabled="item.timeout"></van-checkbox>
@ -45,53 +46,50 @@
</van-checkbox-group>
</view>
</view>
<van-empty v-else image="/static/empty/data.png" image-size="400rpx" description="无数据请上线初始化"/>
<van-empty v-else image="/static/empty/data.png" image-size="400rpx" description="无数据请上线初始化" />
</view>
<view v-show="serviceTitle == 1" class="project">
<view v-if="projectList.length > 0" class="server-list">
<van-list v-model:loading="loading" :finished="finished" finished-text="没有更多了" ref="list"
@load="onLoad">
<van-checkbox-group v-model="checked">
<view v-for="item in projectList" class="server-item">
<view v-if="multipleChoice" class="checked">
<van-checkbox :name="item.shopObject.id"></van-checkbox>
</view>
<view class="img-box">
<image :src="item.shopObject.image" mode="aspectFill"></image>
<van-checkbox-group v-model="checked">
<view v-for="item in projectList" class="server-item">
<view v-if="multipleChoice" class="checked">
<van-checkbox :name="item.id"></van-checkbox>
</view>
<view class="img-box">
<image :src="item.shopObject.image" mode="aspectFill"></image>
</view>
<view class="server-info">
<view class="server-title">{{ item.shopObject.title }}</view>
<view class="time-coupon">
<image src="@/static/home/time-icon.png"></image>
<view class="time">{{ item.shopObject.times }}分钟</view>
</view>
<view class="server-info">
<view class="server-title">{{ item.shopObject.title }}</view>
<view class="time-coupon">
<image src="@/static/home/time-icon.png"></image>
<view class="time">{{ item.shopObject.times }}分钟</view>
</view>
<view class="price">
<view class="current-price">
<text class="unit"></text>{{ item.shopObject.price }}
</view>
<view class="original-price">
<text class="unit"></text>{{ item.shopObject.oldPrice }}
</view>
<view class="price">
<view class="current-price">
<text class="unit"></text>{{ item.shopObject.price }}
</view>
<view class="sales-volume">
<image src="@/static/icons/icon1.png"></image>
<view class="desc">已售出{{ item.shopObject.payNum }}+</view>
<view class="original-price">
<text class="unit"></text>{{ item.shopObject.oldPrice }}
</view>
</view>
<view class="selective-technician">
<view @click.stop="selectProject(item)" class="btn">
{{ item.isDelete == 'Y' ? '取消项目' : '选择项目'}}
</view>
<view class="sales-volume">
<image src="@/static/icons/icon1.png"></image>
<view class="desc">已售出{{ item.shopObject.payNum }}+</view>
</view>
</view>
</van-checkbox-group>
</van-list>
<view class="selective-technician">
<view @click.stop="selectProject(item)" class="btn">
{{ item.isDelete == 'Y' ? '取消项目' : '选择项目'}}
</view>
</view>
</view>
</van-checkbox-group>
</view>
<van-empty v-else image="/static/empty/data.png" image-size="400rpx" description="无数据请上线初始化"/>
<van-empty v-else image="/static/empty/data.png" image-size="400rpx" description="无数据请上线初始化" />
</view>
</view>
@ -140,23 +138,23 @@
value: 3
}
],
today : null,
selDate : null,
isInit : false
today: null,
selDate: null,
isInit: false
};
},
onShow() {
if(this.dateList.length >= 7) return; //,onShow
if (this.dateList.length >= 7) return; //,onShow
this.today = this.dayjs()
this.dateList.push(this.today)
for (let i = 1; i < 7; i++) {
this.dateList.push(this.today.add(i, 'day'))
}
this.selectDate(this.today,0)
this.selectDate(this.today, 0)
this.getProjectList()
},
methods: {
//
selectDate(item, index) {
this.i = index
@ -167,9 +165,12 @@
}, res => {
if (res.code == 200) {
res.result.forEach(time => {
if(this.isFormerly({ time, date : this.dateList[this.i] })){ //
if (this.isFormerly({
time,
date: this.dateList[this.i]
})) { //
time.timeout = true
}else{
} else {
time.timeout = false
}
})
@ -179,16 +180,13 @@
this.loading = false
})
},
//
selectTime(item) {
if(item.time.timeout){ //
return uni.showToast({
title: '选择时间已过时',
duration: 2000
});
if (item.time.timeout) { //
return uni.showToast({title: '选择时间已过时',icon:'none'});
}
if (this.multipleChoice) {
if (this.checked.includes(item.time.id)) {
this.checked = this.checked.filter(id => id !== item.time.id);
@ -199,16 +197,16 @@
}
this.updateTerTime([item.time.id], item.time.isDelete == 'Y' ? 'N' : 'Y');
},
//
leftClick() {
uni.switchTab({
url: '/pages/index/center'
})
},
//
updateTerTime(selectTimeArr, isDelete) {
updateTerTime(selectTimeArr, isDelete) {
let data = {
ids: selectTimeArr.toString(),
isDelete
@ -216,51 +214,54 @@
this.$api('updateTerTime', data, res => {
if (res.code == 200) {
this.selectDate(this.selDate, this.i)
uni.showToast({title : '操作成功',con : 'none'})
}
})
},
//
getProjectList() {
getProjectList() {
this.$api('queryTerProject', this.queryParams, res => {
if (res.code == 200) {
this.projectList = res.result;
}
})
},
//
updateTerProject(selectTimeArr, isDelete) {
updateTerProject(selectTimeArr, isDelete) {
let data = {
ids: selectTimeArr.toString(),
isDelete
}
this.$api('updateTerProject', data, res => {
if(res.code == 200){
if (res.code == 200) {
this.getProjectList()
uni.showToast({title : '操作成功',con : 'none'})
}
})
},
//
changeServer() {
this.checked = []; //idid
changeServer() {
this.checked = []; //idid
},
//
operationItem(isOpen) {
if (this.serviceTitle == 0) { // isOpen (Y N)
this.updateTerTime(this.checked, isOpen)
} else { //
operationItem(isOpen) { //
if (this.serviceTitle) {
this.updateTerProject(this.checked, isOpen)
} else { // isOpen (Y N)
this.updateTerTime(this.checked, isOpen)
}
},
//
selectProject(item) {
selectProject(item) {
if (this.multipleChoice) {
if (this.checked.includes(item.id)) {
this.checked = this.checked.filter( id => id !== item.id);
this.checked = this.checked.filter(id => id !== item.id);
} else {
this.checked.push(item.id);
}
@ -268,7 +269,7 @@
}
this.updateTerProject([item.id], item.isDelete == 'Y' ? 'N' : 'Y')
},
//()
change(value) {
if (value == 0) {
@ -279,7 +280,7 @@
this.multipleChoice = !this.multipleChoice
this.operationList[2].text = this.multipleChoice ? '取消多选' : '开启多选'
this.checked = []
if (this.operationList[3].text == '取消全选') { //
this.operationList[3].text = '全选'
}
@ -290,46 +291,46 @@
icon: 'none'
})
}
if (this.operationList[3].text == '取消全选') { //
this.operationList[3].text = '全选'
return this.checked = []
}
let arr = []
if (this.serviceTitle == 0) { //
if (this.serviceTitle == 0) { //
this.timeList.forEach(time => {
if(!time.timeout){ //
if (!time.timeout) { //
arr.push(time.id)
}
})
} else {
this.projectList.forEach(project => {
arr.push(project.shopObject.id)
arr.push(project.id)
})
}
this.checked = arr
this.operationList[3].text = '取消全选'
}
},
//
onLoad(){},
onLoad() {},
//
isFormerly(e){
isFormerly(e) {
let day = e.date.format('YYYY-MM-DD')
let selectTime = this.dayjs(`${day} ${e.time.timeName}`)
let nowTime = this.dayjs()
if(selectTime.isBefore(nowTime)){
if (selectTime.isBefore(nowTime)) {
return true
}
return false
}
}
}
</script>
@ -398,12 +399,12 @@
color: #fff;
}
}
&.timeOut {
background: #ccc;
color: #FFFFFF;
.status{
.status {
color: #FFFFFF;
}
}


+ 2
- 0
service-uniapp-technician/pages/mine/settled.vue View File

@ -119,6 +119,8 @@
uni.showModal({
title: '技师入驻',
content: '技师入驻提交成功',
confirmText : '确认',
cancelText : '取消',
showCancel: false,//
success: function (res) {
if (res.confirm) {


+ 2
- 0
service-uniapp-technician/pages/mine/upload.vue View File

@ -106,6 +106,8 @@ export default {
deleteImage(index){
uni.showModal({
title: '确认删除这张照片吗',
confirmText : '确认',
cancelText : '取消',
success: function (res) {
if (res.confirm) {
this.list.splice(index, 1)


+ 2
- 1
service-uniapp-technician/pages/order/evaluate.vue View File

@ -146,7 +146,8 @@ import mNavbar from '@/components/base/m-navbar.vue'
labelText : this.select.join(','),
type : 1,
orderId : this.$route.query.id,
shopId : this.$route.query.projectId
shopId : this.$route.query.projectId,
terId : this.$route.query.terId
}, res => {
if(res.code == 200){
uni.showToast({


+ 43
- 4
service-uniapp-technician/pages/order/orderDetail.vue View File

@ -57,9 +57,13 @@
@click.stop="endVipService(msgOrder, toEvaluate, msgOrder.id, msgShop.id)">
结束服务
</view>
<view class="btn" @click.stop="toEvaluate()" v-if="msgOrder.tenState == 5">
投诉举报
<view class="btn" v-if="msgOrder.tenState == 4 && !isTimeout"
@click.stop="toCountdown(msgOrder)">
服务时间
</view>
<!-- <view class="btn" @click.stop="toEvaluate()" v-if="msgOrder.tenState == 5">
投诉举报
</view> -->
<view class="btn" @click.stop="toEvaluate(msgOrder.id,msgOrder.projectId)"
v-if="msgOrder.tenState == 5 && msgOrder.evaluated == 0">
立即评价
@ -174,7 +178,7 @@
</view>
<view class="min_tips">
<view class="">
</view>
<view class="">
{{ msgOrder.temp}}
@ -213,6 +217,22 @@
{{msgOrder.createTime}}
</view>
</view>
<view class="min_tips">
<view class="">
平台金额
</view>
<view class="">
{{msgOrder.shopMoney}}
</view>
</view>
<view class="min_tips">
<view class="">
技师金额
</view>
<view class="">
{{msgOrder.tenPrice}}
</view>
</view>
</view>
@ -263,7 +283,8 @@
msgShop: [],
msgTechnician: [],
phone : '',
coupon : {}
coupon : {},
isTimeout : null, //()
}
},
onShow() {
@ -281,6 +302,9 @@
this.msgShop = res.result.shop;
this.msgTechnician = res.result.technician;
this.coupon = res.result.coupon
let { useTime , startServiceTime } = res.result.order
this.isTimeout = !(Date.now() < new Date(res.result.order.startServiceTime).valueOf() + useTime * 1000 * 60)
this.changeSetup()
}
})
@ -362,6 +386,21 @@
deleteTag(html) { //html
return html.replace(/<[^>]*>/g, '');
},
//
toCountdown(order){
let { useTime , startServiceTime } = order
let isTimeout = new Date(startServiceTime).valueOf() + useTime * 1000 * 60
if(Date.now() >= isTimeout){
return uni.showToast({
title : '服务时间已过',
icon : 'none'
})
}
uni.navigateTo({
url: `/pages/mine/countdown?time=${useTime}&startTime=${startServiceTime}`
})
},
}
}
</script>


+ 2
- 0
service-uniapp-technician/plugins/confirm.js View File

@ -2,6 +2,8 @@
function showConfirm(title, callback) {
uni.showModal({
title,
cancelText : '取消',
confirmText : '确认',
success: function(res) {
if (res.confirm) {
callback && callback()


BIN
service-uniapp-technician/static/music/server-time.mp3 View File


+ 9
- 0
service-uniapp-technician/static/work.js View File

@ -0,0 +1,9 @@
// worker.js
this.onmessage = function(e) {
setInterval(() => {
let { startTime , endTime } = e.data
if(Date.now() >= endTime){
this.postMessage('倒计时结束')
}
},1000)
};

Loading…
Cancel
Save