Commit e3c3d707 authored by 李超鹏's avatar 李超鹏

Merge remote-tracking branch 'origin/master'

parents 007b6544 cc8f6f40
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
:class="{'time-item':true,'active': item.pkey===appointRange}" v-for="(item,index) in timeList" :class="{'time-item':true,'active': item.pkey===appointRange}" v-for="(item,index) in timeList"
:key="item.pkey"> :key="item.pkey">
<button class="time" :plain="true" <button class="time" :plain="true"
:disabled="item.disabled" :hair-line="false" :disabled="item.disabled || (currentDayIndex == 0 && item.pkey <= currentPkey)" :hair-line="false"
@click="timeChange(item,index,timeList)"> @click="timeChange(item,index,timeList)">
{{item.name}} {{item.name}}
</button> </button>
...@@ -101,7 +101,9 @@ ...@@ -101,7 +101,9 @@
appointRange: null, appointRange: null,
appointRangeText: '', appointRangeText: '',
num: 0, num: 0,
hasLast: false hasLast: false,
currentPkey: 'appointment_range_' + new Date().getHours(),
currentDayIndex: -1,
} }
}, },
watch: { watch: {
...@@ -125,6 +127,7 @@ ...@@ -125,6 +127,7 @@
this.appointTime = item.day this.appointTime = item.day
this.appointRange = null this.appointRange = null
this.appointRangeText = '' this.appointRangeText = ''
this.currentDayIndex = index
this.$emit('date-change', data) this.$emit('date-change', data)
}, },
timeChange(item, index, list) { timeChange(item, index, list) {
......
...@@ -125,14 +125,16 @@ ...@@ -125,14 +125,16 @@
setValue() { setValue() {
const dataValue = [] const dataValue = []
this.imgList.map(item=>{ this.imgList.map(item=>{
dataValue.push(item.path) dataValue.push(item.src)
}) })
console.log("dataValue", dataValue)
this.valueChange(dataValue) this.valueChange(dataValue)
}, },
closeTake(val) { closeTake(val) {
if(val && val.length > 0){ if(val && val.length > 0){
val.forEach((item,index,array)=>{ val.forEach((item,index,array)=>{
item.path = item.key item.path = item.key
item.src = item.key
this.imgList.push(item) this.imgList.push(item)
}) })
this.setValue() this.setValue()
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<image class="address-image" :src="dizhiImage" mode="widthFix"></image> <image class="address-image" :src="dizhiImage" mode="widthFix"></image>
<text>{{ formatAddress(orderData) }}</text> <text>{{ formatAddress(orderData) }}</text>
</view> </view>
<view v-if="showDistance"> <view v-if="showDistance" class="address-right-view">
{{orderDistance}}km {{orderDistance}}km
</view> </view>
</view> </view>
...@@ -216,6 +216,7 @@ ...@@ -216,6 +216,7 @@
} }
}, },
created() { created() {
console.log('+++++++++++')
/* /*
orderStatus: orderStatus:
待接单 orderStatus<31 工单状态小于31 待接单 orderStatus<31 工单状态小于31
...@@ -249,9 +250,9 @@ ...@@ -249,9 +250,9 @@
} else { } else {
this.orderType = this.types[this.type] this.orderType = this.types[this.type]
} }
this.timeout = this.orderData.currentOverTime < new Date().getTime() this.timeout = this.orderData.currentOverTime < new Date().getTime()
this.timestamp = Math.round(Math.abs(this.orderData.currentOverTime - new Date().getTime()) / 1000) this.timestamp = Math.round(Math.abs(this.orderData.currentOverTime - new Date().getTime()) / 1000)
console.log('++++++', this.timestamp)
}, },
methods: { methods: {
handleClick() { handleClick() {
...@@ -382,17 +383,19 @@ ...@@ -382,17 +383,19 @@
align-items: center; align-items: center;
align-items: flex-start; align-items: flex-start;
text-align: left; text-align: left;
margin-right: 30rpx;
.address-image { .address-image {
width: 26rpx; width: 26rpx;
height: 28rpx; height: 28rpx;
margin-right: 8rpx; margin-right: 8rpx;
flex-shrink: 0; flex-shrink: 0;
margin-top: 4rpx; margin-top: 4rpx;
} }
} }
.address-right-view {} .address-right-view {
margin-left: 30rpx;
}
} }
} }
......
...@@ -113,12 +113,22 @@ ...@@ -113,12 +113,22 @@
photo.currentItemLength = 0 photo.currentItemLength = 0
// this.ctx = uni.createCameraContext(); // this.ctx = uni.createCameraContext();
this.updateTime() this.updateTime()
this.getLocation()
const locationData = uni.getStorageSync('locationData')
const validityTime = 60000
if (Date.now() - locationData.locationTime < validityTime) { // 1分钟内不重复请求位置信息
this.waterInfo.latitude = locationData.waterInfo.latitude
this.waterInfo.longitude = locationData.waterInfo.longitude
this.baiduLocation()
} else {
this.getLocation()
}
this.getMarkPath() this.getMarkPath()
this.initData() this.initData()
photo.currentItem = this.currentItem photo.currentItem = this.currentItem
if (this.currentItem.images.length > 0) { if (this.currentItem.images && this.currentItem.images.length > 0) {
this.shadowInitShow = true this.shadowInitShow = true
this.standardShow = true this.standardShow = true
this.standardStatus = true this.standardStatus = true
...@@ -266,6 +276,17 @@ ...@@ -266,6 +276,17 @@
success: function(res) { success: function(res) {
waterInfo.longitude = parseFloat(res.longitude).toFixed(4) waterInfo.longitude = parseFloat(res.longitude).toFixed(4)
waterInfo.latitude = parseFloat(res.latitude).toFixed(3) waterInfo.latitude = parseFloat(res.latitude).toFixed(3)
const data = {
waterInfo: {
latitude: waterInfo.latitude,
longitude: waterInfo.longitude
},
locationTime: Date.now()
}
uni.setStorage({
key: 'locationData',
data: data,
})
that.baiduLocation() that.baiduLocation()
}, },
fail(err) { fail(err) {
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<!-- 入驻前--> <!-- 入驻前-->
<view v-if="needSettled" class="tip-view"> <view v-if="needSettled" class="tip-view">
<image :src="weiruzhuImage" class="tip-view-image"></image> <image :src="weiruzhuImage" class="tip-view-image"></image>
<view class="tip-other">入驻通过后平台将向您推荐订单</view> <view class="tip-other">入驻后平台将向您分配或推荐订单</view>
<u-button class="settle-button" type="primary" shape="circle" @click="immediatelyIn" <u-button class="settle-button" type="primary" shape="circle" @click="immediatelyIn"
:custom-style="buttonStyle"> :custom-style="buttonStyle">
立即入驻 立即入驻
...@@ -269,7 +269,8 @@ ...@@ -269,7 +269,8 @@
if (self.search.pageNumber == 1) { if (self.search.pageNumber == 1) {
self.orderList = [] self.orderList = []
} }
self.orderList.push(...res.data.list); self.orderList.push(...res.data.list);
console.log('this.orderlist;', this.orderList)
self.currentLoadStatus = res.data.total > self.orderList.length && res.data.list.length == self.search.pageSize ? 'loadmore' : 'nomore' self.currentLoadStatus = res.data.total > self.orderList.length && res.data.list.length == self.search.pageSize ? 'loadmore' : 'nomore'
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class="com-content"> <view class="com-content">
<complete-check :show="completeCheckStatus" :list-data="completeCheckResult" :pass="pass" @close="closeCheckResult" @handle="handerProgrom" @change="confirm"></complete-check> <complete-check :show="completeCheckStatus" :list-data="completeCheckResult" :pass="pass" @close="closeCheckResult" @handle="handerProgrom" @change="confirm"></complete-check>
<view class="u-wrap"> <view class="u-wrap">
<u-navbar :background="{background: '#2272FF'}" back-icon-color="#fff" :title-size="32" title-color="#fff" :border-bottom="false" title="完工信息"></u-navbar> <u-navbar :background="{background: '#2272FF'}" back-icon-color="#fff" :title-size="32" title-color="#fff" :border-bottom="false" title="完工信息" back-text=" " ></u-navbar>
<u-tabs-swiper class="order-tabs" ref="tabs" :current="tabIndex" name="panelName" :list="list" @change="tabsChange" :is-scroll="false" bg-color="#2272FF" inactive-color="#a6c6ff" active-color="#fff" height="80" font-size="32"></u-tabs-swiper> <u-tabs-swiper class="order-tabs" ref="tabs" :current="tabIndex" name="panelName" :list="list" @change="tabsChange" :is-scroll="false" bg-color="#2272FF" inactive-color="#a6c6ff" active-color="#fff" height="80" font-size="32"></u-tabs-swiper>
<view class="u-menu-wrap"> <view class="u-menu-wrap">
<scroll-view scroll-y scroll-with-animation class="u-tab-view menu-scroll-view" :scroll-top="scrollTop" :scroll-into-view="itemId" v-if="list[tabIndex].items.length > 1"> <scroll-view scroll-y scroll-with-animation class="u-tab-view menu-scroll-view" :scroll-top="scrollTop" :scroll-into-view="itemId" v-if="list[tabIndex].items.length > 1">
......
<template> <template>
<view class="order-wrap"> <view class="order-wrap">
<u-navbar back-icon-color="#FFFFFF" :background="background" :border-bottom="false"></u-navbar> <u-navbar back-icon-color="#FFFFFF" back-text=" " :background="background" :border-bottom="false"></u-navbar>
<view class="header"> <view class="header">
<view class="title">订单信息</view> <view class="title">订单信息</view>
<view v-show="allowRejection" class="button" @click="rejectOrder">拒单</view> <view v-show="allowRejection" class="button" @click="rejectOrder">拒单</view>
...@@ -126,7 +126,7 @@ ...@@ -126,7 +126,7 @@
<view> <view>
<u-toast ref="uToast" /> <u-toast ref="uToast" />
</view> </view>
<view v-if="showCenterBtn" @click="handleBtn" class="button" :class="['center-button-view', btnClass]"> <view v-if="showCenterBtn" @click="$u.throttle(handleBtn, 500)" class="button" :class="['center-button-view', btnClass]">
<text>{{ centerButtonText }}</text> <text>{{ centerButtonText }}</text>
<view v-if="order.currentOverTime && showTimeOut" class="time-view"> <view v-if="order.currentOverTime && showTimeOut" class="time-view">
<text style="padding-right: 8rpx;">{{order.currentOverTime > new Date().getTime()?'剩':'超'}}</text> <text style="padding-right: 8rpx;">{{order.currentOverTime > new Date().getTime()?'剩':'超'}}</text>
...@@ -151,7 +151,7 @@ ...@@ -151,7 +151,7 @@
</view> </view>
<!-- 异常预约 ,现场拍照 这里是调用拍照的两个组件--> <!-- 异常预约 ,现场拍照 这里是调用拍照的两个组件-->
<view class="right"> <view class="right">
<view v-if="errorSignIn || scenePhoto" @click="$u.debounce(handleClickRight, 500)" :class="['button', {'active': scenePhoto}]"> <view v-if="errorSignIn || scenePhoto" @click="$u.throttle(handleClickRight, 500)" :class="['button', {'active': scenePhoto}]">
<text>{{errorSignIn ? '异常' : '拍照'}}</text> <text>{{errorSignIn ? '异常' : '拍照'}}</text>
</view> </view>
...@@ -233,7 +233,8 @@ ...@@ -233,7 +233,8 @@
contactAddressLongitud:0, contactAddressLongitud:0,
contactAddressLatitud:0, contactAddressLatitud:0,
num:0, num:0,
showTimeOut:true showTimeOut:true,
clicking: false,
} }
}, },
onLoad(option) { onLoad(option) {
...@@ -610,8 +611,13 @@ ...@@ -610,8 +611,13 @@
} }
return return
} }
if (this.clicking) {
return
}
this.clicking = true
this.$u.api[this.submitType](data, this.order.orderId).then(res => { this.$u.api[this.submitType](data, this.order.orderId).then(res => {
let self = this let self = this
this.clicking = false
if ((res.data.code!==undefined && res.data.code === 200) if ((res.data.code!==undefined && res.data.code === 200)
|| (res.code!==undefined && res.code === 200) ) { || (res.code!==undefined && res.code === 200) ) {
this.$refs.uToast.show({ this.$refs.uToast.show({
...@@ -732,6 +738,7 @@ ...@@ -732,6 +738,7 @@
if(!currentOverTime){ if(!currentOverTime){
return 0 return 0
} }
console.log('--------', Math.round(Math.abs(this.order.currentOverTime - new Date().getTime()) / 1000))
return Math.round(Math.abs(this.order.currentOverTime - new Date().getTime()) / 1000); return Math.round(Math.abs(this.order.currentOverTime - new Date().getTime()) / 1000);
}, },
timeOutChange(currentOverTime){ timeOutChange(currentOverTime){
...@@ -858,7 +865,6 @@ ...@@ -858,7 +865,6 @@
} }
.address-cell { .address-cell {
height: 24rpx;
font-size: 24rpx; font-size: 24rpx;
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment