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

详情接口联调

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