修改
This commit is contained in:
parent
7b765f4c91
commit
39762bc026
@ -6,3 +6,10 @@ export function handCloseOrder() {
|
||||
method: 'GET'
|
||||
})
|
||||
}
|
||||
|
||||
export function getWaitPayTrainingOrderDetails(trainingOrderNo) {
|
||||
return request({
|
||||
url: `/nurseApplet/personLearn/getWaitPayTrainingOrderDetails?trainingOrderNo=${trainingOrderNo}`,
|
||||
method: 'GET'
|
||||
})
|
||||
}
|
||||
|
||||
@ -18,8 +18,7 @@
|
||||
</view>
|
||||
<view class="payinfo">
|
||||
<text class="pay">实付款</text>
|
||||
<text class="price" v-if="list.trainingItemPrice">¥{{list.trainingItemPrice}}</text>
|
||||
<text class="price" v-else>¥0</text>
|
||||
<text class="price">¥{{list.trainingOrderAmount?list.trainingOrderAmount:0}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -44,7 +43,8 @@
|
||||
appletTrainingOrderPay
|
||||
} from '@/api/learning/index.js'
|
||||
import {
|
||||
handCloseOrder
|
||||
handCloseOrder,
|
||||
getWaitPayTrainingOrderDetails
|
||||
} from '@/api/Orderdetails/index.js'
|
||||
import baseurl from '@/api/baseurl.js'
|
||||
export default {
|
||||
@ -71,26 +71,28 @@
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.trainingOrderNo = options.trainingOrderNo
|
||||
this.baseurl = baseurl
|
||||
this.list = JSON.parse(options.list)
|
||||
var ordertimes = this.list.trainingOrderTime.replaceAll(/\-/gi, "/")
|
||||
var time = new Date(this.list.trainingOrderTime).getTime() / 1000 + (60 * 60 * 2)
|
||||
var times = new Date().getTime() / 1000
|
||||
this.timestamp = time - times
|
||||
this.timecount = this.timestamp
|
||||
this.Timer = setInterval(() => {
|
||||
this.timecount--;
|
||||
}, 1000)
|
||||
this.trainingOrderNo = options.trainingOrderNo
|
||||
this.info();
|
||||
},
|
||||
methods: {
|
||||
info() {
|
||||
|
||||
getWaitPayTrainingOrderDetails(this.trainingOrderNo).then(res => {
|
||||
this.list = res.data
|
||||
var ordertimes = this.list.trainingOrderTime.replaceAll(/\-/gi, "/")
|
||||
var time = new Date(this.list.trainingOrderTime).getTime() / 1000 + (60 * 60 * 2)
|
||||
var times = new Date().getTime() / 1000
|
||||
this.timestamp = time - times
|
||||
this.timecount = this.timestamp
|
||||
this.Timer = setInterval(() => {
|
||||
this.timecount--;
|
||||
}, 1000)
|
||||
})
|
||||
},
|
||||
//购买
|
||||
tobuy() {
|
||||
var that = this
|
||||
if (this.list.trainingItemPrice > 0) {
|
||||
if (this.list.trainingOrderAmount > 0) {
|
||||
let objs = {
|
||||
"openid": uni.getStorageSync('openid'),
|
||||
"nurseStationPersonId": this.list.nurseStationPersonId,
|
||||
@ -98,7 +100,7 @@
|
||||
"payType": "WECHAT_PAY",
|
||||
"orderChannel": "WECHAT_APPLET",
|
||||
"buySource": "TRAINING",
|
||||
"paymentPrice": this.list.trainingItemPrice,
|
||||
"paymentPrice": this.list.trainingOrderAmount,
|
||||
}
|
||||
appletTrainingOrderPay(objs).then(response => {
|
||||
if (response.code == 200) {
|
||||
|
||||
@ -59,23 +59,15 @@
|
||||
methods: {
|
||||
//订单详情
|
||||
goOrderdetails(item) {
|
||||
item.trainingItemContent = undefined
|
||||
uni.navigateTo({
|
||||
url: `/pages/Orderdetails/Orderdetails?list=${JSON.stringify(item)}`
|
||||
url: `/pages/Orderdetails/Orderdetails?trainingOrderNo=${item.trainingOrderNo}`
|
||||
})
|
||||
},
|
||||
//我的学习
|
||||
goOrderlearning(item) {
|
||||
item.trainingItemContent = undefined
|
||||
// if (item.trainingOrderStatus == 'WAIT_PAY') {
|
||||
// uni.navigateTo({
|
||||
// url: `/pages/Orderdetails/Orderdetails?list=${JSON.stringify(item)}`
|
||||
// })
|
||||
// } else{
|
||||
uni.navigateTo({
|
||||
url: `/pages/Orderlearning/Orderlearning?trainingOrderStatus=${item.trainingOrderStatus}&trainingParentId=${item.trainingItemId}&trainingOrderNo=${item.trainingOrderNo}`
|
||||
})
|
||||
// }
|
||||
},
|
||||
//列表信息
|
||||
info() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user