|
@@ -88,7 +88,7 @@
|
|
|
<script setup>
|
|
|
import { ref } from 'vue'
|
|
|
import { onLoad, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app'
|
|
|
- import { query } from '@/api/order.js'
|
|
|
+ import { query, byId } from '@/api/order.js'
|
|
|
import { msgError, msgSuccess } from '@/utils/common'
|
|
|
|
|
|
const searchInputStyle = {
|
|
@@ -133,13 +133,37 @@
|
|
|
},
|
|
|
])
|
|
|
function onItem(order) {
|
|
|
- console.log('点击订单', order)
|
|
|
- if (order.type === '8') {
|
|
|
- // 研究报告
|
|
|
- }
|
|
|
- if (order.type === '9') {
|
|
|
- // 培训课程
|
|
|
+ if (order.status === '2') {
|
|
|
+ uni.showToast({
|
|
|
+ title: '订单已关闭',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ return
|
|
|
}
|
|
|
+ uni.showLoading({
|
|
|
+ title: '加载中...'
|
|
|
+ })
|
|
|
+ byId(order.id).then(res => {
|
|
|
+ if (res && res.message === 'success') {
|
|
|
+ uni.hideLoading()
|
|
|
+ const objId = res.data.objId
|
|
|
+ const title = res.data.title
|
|
|
+ if (res.data.objType === '8') {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pages/reportDetail/reportDetail?id=${objId}&title=${title}`
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (res.data.objType === '9') {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pages/goOnEdu/course/courseDetail/courseDetail?id=${objId}&title=${title}`
|
|
|
+ })
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ uni.hideLoading()
|
|
|
+ }
|
|
|
+ }).catch(e => {
|
|
|
+ uni.hideLoading()
|
|
|
+ })
|
|
|
}
|
|
|
function onPay(order) {
|
|
|
wx.requestPayment({
|