Commit cfbe9215 authored by 郭晓清's avatar 郭晓清

详情接口联调

parent 089094d2
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
<view v-if="showCenterBtn" @click="handleBtn" class="button" :class="['center-button-view', btnClass]"> <view v-if="showCenterBtn" @click="handleBtn" class="button" :class="['center-button-view', btnClass]">
<text>{{ centerButtonText }}</text> <text>{{ centerButtonText }}</text>
<view v-if="order.currentOverTime > 0" class="time-view"> <view v-if="order.currentOverTime > 0" class="time-view">
<text>{{order.currentOverTime * 1000 > new Date().getTime()?'剩':'超'}}</text> <text>{{order.currentOverTime > new Date().getTime()?'剩':'超'}}</text>
<u-count-down <u-count-down
:timestamp="timestampDiff(order.currentOverTime)" :timestamp="timestampDiff(order.currentOverTime)"
font-size="20" font-size="20"
...@@ -128,6 +128,8 @@ ...@@ -128,6 +128,8 @@
separator-color="#FFFFFF" separator-color="#FFFFFF"
separator-size="20" separator-size="20"
:ref="'uCountDown'" :ref="'uCountDown'"
show-days
height="20"
@change="timeOutChange(order.currentOverTime)" > @change="timeOutChange(order.currentOverTime)" >
</u-count-down> </u-count-down>
</view> </view>
...@@ -213,7 +215,7 @@ ...@@ -213,7 +215,7 @@
appointmentDatetimeRange:'', appointmentDatetimeRange:'',
appointmentDatetime:'', appointmentDatetime:'',
signDistance:3000, signDistance:3000,
num:0 num:0,
} }
}, },
onLoad(option) { onLoad(option) {
...@@ -313,10 +315,10 @@ ...@@ -313,10 +315,10 @@
console.log("image",img) console.log("image",img)
this.takeStatus = false this.takeStatus = false
// 获取返回的图片 ,如果返回的图片存在则直接异常签约,成功后跳转到去完工页面, // 获取返回的图片 ,如果返回的图片存在则直接异常签约,成功后跳转到去完工页面,
if(img && img.length>0){ // 拍照完成 if(img){ // 拍照完成
this.isErrorSign = true this.isErrorSign = true
this.errorSignUrl = process.uniEnv.qn_base_url +img[img.length-1].key this.errorSignUrl = process.uniEnv.qn_asset_url +img[img.length-1].key
this.handleBtn() this.handleBtn()
}else{ }else{
this.$refs.uToast.show({ this.$refs.uToast.show({
...@@ -608,18 +610,12 @@ ...@@ -608,18 +610,12 @@
if(!currentOverTime){ if(!currentOverTime){
return 0 return 0
} }
var nowTime = new Date(); // 当前时间 return Math.round(Math.abs(this.order.currentOverTime - new Date().getTime()) / 1000);
if(nowTime.getTime() > currentOverTime*1000){
var diff = nowTime.getTime() - (currentOverTime*1000);
}else{
var diff = (currentOverTime*1000) - nowTime.getTime();
}
return diff;
}, },
timeOutChange(currentOverTime){ timeOutChange(currentOverTime){
let self = this let self = this
var nowTime = new Date(); // 当前时间 var nowTime = new Date(); // 当前时间
if(nowTime.getTime() > currentOverTime*1000){ if(nowTime.getTime() > currentOverTime){
this.btnClass='timeOut-btn' this.btnClass='timeOut-btn'
self.$refs['uCountDown'].seconds += 2 self.$refs['uCountDown'].seconds += 2
} }
......
...@@ -240,7 +240,7 @@ ...@@ -240,7 +240,7 @@
// 点击图片 // 点击图片
handleClickImage(item, index) { handleClickImage(item, index) {
uni.previewImage({ uni.previewImage({
urls: item.imageList, urls: item.orderImages,
current: index current: index
}) })
}, },
...@@ -267,7 +267,14 @@ ...@@ -267,7 +267,14 @@
}) })
}, },
take(item,ikey) { take(item,ikey) {
this.currentItemDate = item this.currentItemDate = item
const photo = getApp().globalData.photo
photo.currentItem = item
photo.itemIndex = ikey
const len = item.orderImages.length
photo.currentItemLength = len > 9 ? 10 : len
uni.hideTabBar() uni.hideTabBar()
this.takeStatus = true this.takeStatus = true
}, },
...@@ -275,11 +282,11 @@ ...@@ -275,11 +282,11 @@
console.log(img) console.log(img)
if(img !==undefined ){ if(img !==undefined ){
// step1 添加图片 // step1 添加图片
this.currentItemDate.images.push(img) this.currentItemDate.orderImages.push(process.uniEnv.qn_asset_url+img[img.length-1].key)
// step2 保存图片 // step2 保存图片
var data={ var data={
type : this.currentItemDate.type, type : this.currentItemDate.type,
images : this.currentItemDate.images, images : Array.from(this.currentItemDate.orderImages),
fieldsName:this.currentItemDate.fieldName fieldsName:this.currentItemDate.fieldName
} }
this.$u.api.saveImage(data,this.orderId).then((res) => { this.$u.api.saveImage(data,this.orderId).then((res) => {
...@@ -293,8 +300,8 @@ ...@@ -293,8 +300,8 @@
this.takeStatus = false this.takeStatus = false
}, },
getWatermark(){ getWatermark(){
var data={} var data={partnerCompanyId:this.systemId}
this.$u.api.getWatermark(data,this.orderId).then((res) => { this.$u.api.getWatermark(data).then((res) => {
if (res.code == 200) { if (res.code == 200) {
console.log("===", res.data) console.log("===", res.data)
this.userWatermark = res.data this.userWatermark = res.data
......
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