소스 검색

upload

product
HolyKnightIX 1 년 전
부모
커밋
504f642470
4개의 변경된 파일39개의 추가작업 그리고 5개의 파일을 삭제
  1. +4
    -0
      package2/pages/appointment/appointment.js
  2. +30
    -1
      pages/order/detail/index.js
  3. +1
    -4
      pages/order/detail/index.ttml
  4. +4
    -0
      utils/util.js

+ 4
- 0
package2/pages/appointment/appointment.js 파일 보기

@@ -38,6 +38,10 @@ Page({

if (this.data.id) {
this.getDetail(this.data.id)
} else {
this.setData({
isShowBtns: true
})
}
},



+ 30
- 1
pages/order/detail/index.js 파일 보기

@@ -243,7 +243,7 @@ Page({
status = 1
} else if (orderStatus == 3 || orderStatus == 4 || orderStatus == 5) {

if (refundOrderStatus == 1) { // 退款中
if (refundOrderStatus == 1 || refundOrderStatus == 11) { // 退款中
status = 2
} else if (refundOrderStatus == 3) { //退款成功
status = 3
@@ -572,6 +572,35 @@ Page({
mask: false
});
})
} else {
Http.get({
url: config.api.getStatus,
data: {
couponOrderId: tempData.couponOrderId,
mallTenantId: this.data.mallTenantId || ''
}
}).then(res => {
console.log(res, 'getStatus');
that.setData({
couponOrderStatus: res.data.CouponOrderStatus
});
if (res.data.CouponOrderStatus == 1 || res.data.CouponOrderStatus == 3) {
/**
* 动态改变上一级页面的核销状态
*/
// that.getStaticGame()
//直接调用上一个页面的setData()方法,把数据存到上一个页面中去
clearInterval(that.data.setInter);
clearInterval(that.data.templTiem);
that.updetail()
that.setData({
mystatus: res.data.CouponOrderStatus
});
}
})
.catch(err => {
console.log(err);
})
}
}, 2000);
that.setData({


+ 1
- 4
pages/order/detail/index.ttml 파일 보기

@@ -48,7 +48,7 @@

<image class="infoArrow" src="{{chevronUrl}}" mode='widthFix'></image>

<view tt:if="{{orderStatus != 'noRefund' && orderStatus != 'orderCancel'}}">
<view tt:if="{{orderStatus != 'noRefund' && orderStatus != 'orderCancel' && couponOrderStatus == 0}}">
<pay-button tt:if="{{orderStatus}}" id='payBtn' class="goRefundPayBtn" order-status="{{orderStatus}}"
order-id="{{outOrderId}}" refund-id="{{outRefundOrderId}}" bind:refund="handleRefund"
bind:applyrefund="applyRefund" bind:error="handleError" />
@@ -97,9 +97,6 @@

</view>




<view class='classif'>
<!--
couponOrderStatus


+ 4
- 0
utils/util.js 파일 보기

@@ -131,13 +131,17 @@ function fmtDate(obj) {
* @version V 1.0, Created by YWQ, 2022.10.20
*/
function timestampToTime(timestamp, format) {
if (!timestamp) return false
//时间戳为10位需*1000,时间戳为13位不需乘1000
const length = timestamp ? timestamp.length : ''

if (length <= 10) {
var date = new Date(timestamp * 1000)
} else {
var date = new Date(timestamp)
}


let Y = String(date.getFullYear())
let M = String(date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1)
let D = String(date.getDate() + 1 < 10 ? '0' + (date.getDate()) : date.getDate())


불러오는 중...
취소
저장