Commit bd23b168 authored by 罗超's avatar 罗超

2

parent 775a7691
......@@ -26,6 +26,15 @@
.Order_Number {
color: #111111;
font-size: 26rpx;
}
.Order_Name {
font-size: 28rpx;
margin-bottom: 20rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.Order_Complete {
......@@ -44,9 +53,8 @@
display: flex;
justify-content: space-between;
margin-top: 32rpx;
}
.text_tree {
white-space: normal;
color: #111111;
......@@ -59,49 +67,54 @@
margin-bottom: 17rpx;
color: #111111;
font-size: 24rpx;
}
.Order_tips {
margin-right: 30rpx;
display: inline-block;
width: 120rpx;
text-align-last: justify;
color: #999999;
}
.Order_Status{
.Order_Status {
font-size: 36rpx;
}
</style>
<template>
<view class="orderList">
<view class="Order_List" v-for="(item,index) in orderList" :key="index" >
<view class="Order_Top">
<view class="Order_Number">订单号:{{item.OrderId}}</view>
<view class="Order_Status">
<text class="Order_Complete" v-if="item.OrderState==1">正常</text>
<text class="Order_Cancel" v-if="item.OrderState==2">退学</text>
<text class="Order_Cancel" v-if="item.OrderState==3">取消</text>
<text class="Order_noPay" v-if="item.OrderState==4">待付款</text>
</view>
</view>
<view class="Order_Bottom">
<view style="width:100%;">
<view class="Order_Name">{{item.CourseName}}</view>
<view class="text_tree">{{item.ClassName}}</view>
<view class="Order_TipList">
<view class="Order_tips">下单客户:</view>
<text>{{item.GuestName}}</text>
<van-empty description="暂无数据" v-if="orderList.length === 0" />
<view v-if="orderList.length > 0">
<view class="Order_List" v-for="(item,index) in orderList" :key="index">
<view class="Order_Top">
<view class="Order_Number">订单号:{{item.OrderId}}</view>
<view class="Order_Status">
<text class="Order_Complete" v-if="item.OrderState==1">正常</text>
<text class="Order_Cancel" v-if="item.OrderState==2">退学</text>
<text class="Order_Cancel" v-if="item.OrderState==3">取消</text>
<text class="Order_noPay" v-if="item.OrderState==4">待付款</text>
</view>
<view class="Order_TipList">
<view class="Order_tips">完成课时:</view>
<text>{{item.CompleteHours}}</text>
</view>
<view class="Order_TipList">
<view class="Order_tips">总课时:</view>
<text>{{item.TotalHours}}</text>
</view>
<view class="Order_Bottom">
<view style="width:100%;">
<view class="Order_Name">{{item.CourseName}}</view>
<view class="text_tree">{{item.ClassName}}</view>
<view class="Order_TipList">
<view class="Order_tips">客户</view>
<text>{{item.GuestName}}</text>
</view>
<view class="Order_TipList">
<view class="Order_tips">完成课时</view>
<text>{{item.CompleteHours}}</text>
</view>
<view class="Order_TipList">
<view class="Order_tips">总课时</view>
<text>{{item.TotalHours}}</text>
</view>
</view>
</view>
</view>
<Loadmore :state="pageState" />
</view>
</view>
</template>
......@@ -118,24 +131,28 @@
onMounted,
inject,
} from "vue";
import Loadmore from "../../components/loadmore.vue";
import bottom from "../../components/bottom";
export default {
components: {
bottom,
Loadmore,
},
setup(props, context) {
let {
proxy
} = getCurrentInstance();
let data = reactive({
pageTitle:"合同列表",
pageTitle: "合同列表",
msg: {
pageIndex: 1,
pageSize: 10,
OrderType:1
OrderType: 1
},
pageCount:0,
orderList: []
pageCount: 0,
orderList: [],
pageState: "more",
timer: null, //防抖
});
const methods = {
jumpPage(url) {
......@@ -145,8 +162,18 @@
},
getData() {
proxy.$request("/AppletIndex/GetOrderPage", data.msg).then((res) => {
console.log(res)
data.orderList = res.Data.PageData;
if (data.timer) data.timer = null;
if (data.msg.pageIndex === 1) {
data.orderList = res.Data.PageData;
} else {
data.orderList = [...data.orderList, ...res.Data.PageData];
}
data.pageCount = res.Data.PageCount
if (data.msg.pageIndex >= res.Data.PageCount) {
data.pageState = "none";
} else {
data.pageState = "more";
}
});
},
......@@ -158,20 +185,28 @@
};
},
onLoad(options) {
this.msg.OrderType=options.type
this.msg.OrderType = options.type
this.getData();
if(options.type==1){
this.pageTitle='语培订单'
}else if(options.type==2){
this.pageTitle='留学订单'
if (options.type == 1) {
this.pageTitle = '语培订单'
} else if (options.type == 2) {
this.pageTitle = '留学订单'
}
uni.setNavigationBarTitle({
title: this.pageTitle
title: this.pageTitle
});
},
onReachBottom() {
console.log(this.msg)
if (this.msg.pageIndex < this.pageCount) {
data.pageState = "loading";
if (this.timer) clearTimeout(this.timer);
this.timer = setTimeout(() => {
this.msg.pageIndex++;
that.getList();
}, 1000);
} else {
this.pageState = "none";
}
}
};
</script>
......@@ -29,9 +29,6 @@
import {
getLearningGardenList
} from "../../api/index";
import {
debounce
} from "../../utils/index";
import Loadmore from "../../components/loadmore.vue";
export default {
components: {
......
......@@ -32,6 +32,7 @@ let request = (param) => {
duration: 2000,
icon: "none",
});
uni.clearStorageSync();
reject()
}else{
uni.showToast({
......
//请求电商接口
let host = ''
if (process.env.NODE_ENV === "development") {
host = 'http://192.168.10.65:8088/api'
// host = 'http://192.168.10.65:8088/api'
host = "https://mallapi.oytour.com/api"
} else {
host = "https://mallapi.oytour.com/api"
}
import Toast from '../wxcomponents/vant/toast/toast';
let request = (param) => {
//网络请求
return new Promise((resolve, reject) => {
......@@ -29,27 +29,18 @@ let request = (param) => {
token: JHdata.MallToken
},
success: res => {
if (res.data.resultCode === 1) {
resolve(res.data)
} else {
Toast({
type: 'fail',
message: res.data.message,
onClose: () => {
// if (res.data.resultCode === 10001 || res.data.resultCode === 10000 || res.data.resultCode === 10002 || res.data.resultCode === 10003) {
// uni.reLaunch({
// url: '/pages/login/login'
// });
// } else {
// if (res.data.message.indexOf('用户凭证为空') != -1 || res.data.message.indexOf('用户凭证失效') != -1) {
// uni.reLaunch({
// url: '/pages/login/login'
// });
// }
// }
},
});
if (res.data.Message.indexOf('用户凭证为空') != -1 || res.data
.Message.indexOf('用户凭证失效') != -1) {
uni.showToast({
title: "用户凭证失效,请重新授权",
duration: 2000,
icon: "none",
});
uni.clearStorageSync();
}
}
},
fail: (err) => {
......
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