Commit 65b0bf30 authored by qipeng's avatar qipeng

详情退单地址修改

parent 38280e93
......@@ -318,8 +318,8 @@
</template>
<script>
import uQRCode from '@/common/js/uqrcode.js'
export default {
import uQRCode from '@/common/js/uqrcode.js'
export default {
filters:{
orderStatus1(i){//景区订单状态
switch(i){
......@@ -535,7 +535,7 @@
},
onLoad(option) {
console.log(option.orderId)
console.log("-----------------------")
console.log('-----------------------')
if(option.orderId!=undefined){
this.id = option.orderId
this.orderDataType = true
......@@ -547,9 +547,9 @@
this.ifyukuaiCode = option.ifyukuaiCode||''
//this.id = "z00167956572219584dc15634b62cf75"
this.openId = uni.getStorageSync("openid") //openid oroHZ5FaUQ_SOOC_uQQP92fJpBRE oh2UV1lyYABHMZ1rMlgjhVHyyYDQ
this.openId = uni.getStorageSync('openid') //openid oroHZ5FaUQ_SOOC_uQQP92fJpBRE oh2UV1lyYABHMZ1rMlgjhVHyyYDQ
//this.openId = "oh2UV1lyYABHMZ1rMlgjhVHyyYDQ"
this.getDetail();
this.getDetail()
},
onUnload() {
......@@ -578,7 +578,7 @@
}
},
getDetail(){//*-----------------加载订单
var postHttpUrl = '';
var postHttpUrl = ''
let data = {}
if(this.orderDataType == true){//为小程序
data={
......@@ -594,7 +594,7 @@
}
this.$request(postHttpUrl,data).then((res)=>{
if(res.code=="00"){
if(res.code=='00'){
this.orderInfo = res.data
this.orderExtendList = res.data.orderExtendList
if(this.orderInfo.orderType==1){
......@@ -639,9 +639,9 @@
})
.catch((err) => {
this.timer3 = setTimeout(() => {
this.getDetail();
}, 2000);
});
this.getDetail()
}, 2000)
})
},
getSortInfo(){//-------------------------排号信息加载
var areaCode = this.orderInfo.areaCode
......@@ -651,11 +651,11 @@
var verifyCode = this.ticketCode
let data={areaCode,orderNum,userId,orderId,verifyCode,'againNumber':0}
this.$request('distribution/distribution/getNewFetchInfo',data).then((res)=>{
if(res.code=="00"){
if(res.code=='00'){
if(res.data.length>0){
this.sortsInfo = res.data[0]
this.companyId = this.sortsInfo.pays[0].companyId
var sortArr = [];
var sortArr = []
sortArr.push(this.sortsInfo.sorts[0])
this.sortsAll = this.sortsInfo.sorts
var northArr = null
......@@ -689,13 +689,13 @@
this.sortData = arr
//时间判断,当前时间是否大于可领号时间
var presentTimer = this.dateFormat()
var takeNumberTimer = this.getAfterDate(this.sortsInfo.sorts[0].createDate,this.sortsInfo.sorts[0].config.paReturnTripTime);
var takeNumberTimer = this.getAfterDate(this.sortsInfo.sorts[0].createDate,this.sortsInfo.sorts[0].config.paReturnTripTime)
if(this.sortsInfo.sorts[0].sortFair==4||this.sortsInfo.sorts[0].sortFair==5){
clearTimeout(this.timerType)
if(presentTimer<takeNumberTimer){
this.countTime(takeNumberTimer)
}else{
this.returnTripType =true;
this.returnTripType =true
}
}
}
......@@ -723,7 +723,7 @@
merchantCode:this.companyId,
}
this.$request('distribution/distribution/newFetchNumber',data).then((res)=>{
if(res.code=="00"){
if(res.code=='00'){
this.getSortInfo()
this.maskType = false
}else{
......@@ -741,9 +741,9 @@
// height: 180,
// text:this.verifyCode
// })
let verifyCode=""
if(this.visitorIndex!=""&&typeof this.visitorIndex!=undefined){
verifyCode=this.verifyCode+":"+this.visitorIndex
let verifyCode=''
if(this.visitorIndex!=''&&typeof this.visitorIndex!=undefined){
verifyCode=this.verifyCode+':'+this.visitorIndex
}else{
verifyCode=this.verifyCode
}
......@@ -761,12 +761,12 @@
}
},
signOverFun(item){//过号遮罩显示
this.overSignedData = {};
this.overSignedData = {}
this.overSignedData = item
if(item.config.paPassedNumTakeType==1){
this.maskType = true;
this.maskType = true
}else{
this.sortAgain(item);
this.sortAgain(item)
}
},
dynamicCodeRefresh(){
......@@ -821,9 +821,9 @@
orderId:this.id,//订单号
userId:this.openId//openid
}
let verifyCode=""
if(this.visitorIndex!=""&&this.visitorIndex!=undefined){
data.codeNo=this.ticketCode+":"+this.visitorIndex
let verifyCode=''
if(this.visitorIndex!=''&&this.visitorIndex!=undefined){
data.codeNo=this.ticketCode+':'+this.visitorIndex
}else{
data.codeNo=this.ticketCode
}
......@@ -858,53 +858,53 @@
data:value,
success:function(){
uni.showToast({
title: "复制成功",
title: '复制成功',
icon: 'none'
})
}
})
},
dateFormat() {//时间格式化函数,此处仅针对yyyy-MM-dd hh:mm:ss 的格式进行格式化
var date=new Date();
var year=date.getFullYear();
var date=new Date()
var year=date.getFullYear()
/* 在日期格式中,月份是从0开始的,因此要加0
* 使用三元表达式在小于10的前面加0,以达到格式统一 如 09:11:05
* */
var month= date.getMonth()+1<10 ? "0"+(date.getMonth()+1) : date.getMonth()+1;
var day=date.getDate()<10 ? "0"+date.getDate() : date.getDate();
var hours=date.getHours()<10 ? "0"+date.getHours() : date.getHours();
var minutes=date.getMinutes()<10 ? "0"+date.getMinutes() : date.getMinutes();
var seconds=date.getSeconds()<10 ? "0"+date.getSeconds() : date.getSeconds();
var month= date.getMonth()+1<10 ? '0'+(date.getMonth()+1) : date.getMonth()+1
var day=date.getDate()<10 ? '0'+date.getDate() : date.getDate()
var hours=date.getHours()<10 ? '0'+date.getHours() : date.getHours()
var minutes=date.getMinutes()<10 ? '0'+date.getMinutes() : date.getMinutes()
var seconds=date.getSeconds()<10 ? '0'+date.getSeconds() : date.getSeconds()
// 拼接
return year+"-"+month+"-"+day+" "+hours+":"+minutes+":"+seconds;
return year+'-'+month+'-'+day+' '+hours+':'+minutes+':'+seconds
},
getAfterDate(timer,n) {//当前时间后几分钟
var curTime = new Date(timer);
var d = new Date(curTime.setMinutes(curTime.getMinutes() + n)); //n是分钟,根据自己需求定义
var year = d.getFullYear();
var mon = d.getMonth() + 1;
var day = d.getDate();
var hour = d.getHours();
var minute = d.getMinutes();
var second = d.getSeconds();
var s = year + "-" + (mon < 10 ? ('0' + mon) : mon) + "-" + (day < 10 ? ('0' + day) : day) + ' ' + (hour < 10 ? ('0' + hour) : hour) + ':' + (minute < 10 ? ('0' + minute) : minute) + ':' + (second < 10 ? ('0' + second) : second);
return s;
var curTime = new Date(timer)
var d = new Date(curTime.setMinutes(curTime.getMinutes() + n)) //n是分钟,根据自己需求定义
var year = d.getFullYear()
var mon = d.getMonth() + 1
var day = d.getDate()
var hour = d.getHours()
var minute = d.getMinutes()
var second = d.getSeconds()
var s = year + '-' + (mon < 10 ? ('0' + mon) : mon) + '-' + (day < 10 ? ('0' + day) : day) + ' ' + (hour < 10 ? ('0' + hour) : hour) + ':' + (minute < 10 ? ('0' + minute) : minute) + ':' + (second < 10 ? ('0' + second) : second)
return s
},
countTime (timer) {//倒计时
// 获取当前时间
var date = new Date();
var now = date.getTime();
var date = new Date()
var now = date.getTime()
//设置截止时间
var endDate = new Date(timer);
var end = endDate.getTime();
var endDate = new Date(timer)
var end = endDate.getTime()
//时间差
var leftTime = end - now;
var leftTime = end - now
//定义变量 d,h,m,s保存倒计时的时间
if (leftTime >= 0) {
this.d = Math.floor(leftTime / 1000 / 60 / 60 / 24);
this.h = Math.floor(leftTime / 1000 / 60 / 60 % 24);
this.m = Math.floor(leftTime / 1000 / 60 % 60);
this.s = Math.floor(leftTime / 1000 % 60);
this.d = Math.floor(leftTime / 1000 / 60 / 60 / 24)
this.h = Math.floor(leftTime / 1000 / 60 / 60 % 24)
this.m = Math.floor(leftTime / 1000 / 60 % 60)
this.s = Math.floor(leftTime / 1000 % 60)
this.sum_h = this.d * 24 + this.h
}
if(this.d==0&&this.h==0&&this.m==0&&this.s==0){
......@@ -917,7 +917,7 @@
},
refundJump(id){//-------------------景区跳转
uni.reLaunch({
url: '/pages/my/order/applyAfterSales/applyAfterSales?orderId='+id+'&ifyukuaiCode='+this.ifyukuaiCode
url: '/pages/my/order/afterSale/applyAfterSale/applyAfterSale?orderId='+id+'&ifyukuaiCode='+this.ifyukuaiCode
})
},
returnMini(){
......@@ -928,8 +928,8 @@
},
fail(res){
uni.showToast({
title:"获取失败,请退出后重新进入渝快码小程序获取验证码",
icon:"none",
title:'获取失败,请退出后重新进入渝快码小程序获取验证码',
icon:'none',
duration:3000
})
}
......@@ -943,8 +943,8 @@
},
fail: (res) => {
uni.showToast({
title:"获取失败,请退出后重新进入渝快码小程序获取验证码",
icon:"none",
title:'获取失败,请退出后重新进入渝快码小程序获取验证码',
icon:'none',
duration:3000
})
}
......@@ -952,7 +952,7 @@
//#endif
},
}
}
}
</script>
<style scoped="scoped">
......
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