Commit 721f7d5c authored by Mac's avatar Mac

1

parent db3caa25
......@@ -382,6 +382,10 @@
"path":"components/guidecarDraw"
},{
"path":"guidercarCommentList"
},{
"path":"specialCarReserve"//专车预定
},{
"path":"map"
}]
},
{
......@@ -595,6 +599,8 @@
"path":"jz_LineDetail" //九寨-线路详情
},{
"path":"jz_Reserve" //线路-预定
},{
"path":"allorderList"//统一订单
}]
},
//相亲分包
......
......@@ -430,7 +430,7 @@
<view style='margin-left: 3px;width: calc(100vw - 60px - 80px);'>{{x.Description}}
</view>
</view>
<view class="s-b-box-r" v-if="x.ProductState==1">
<view class="s-b-box-r" v-if="x.ProductState==1" @click="yuding(x)">
预定
</view>
......@@ -545,10 +545,7 @@
topdateList: [],
DepartList: [], //出发点数组
ArriveList: [], //到达点数组
timeList: [], //时间数组
alltime: ['不限', '00:00-03:00', '03:00-06:00', '06:00-09:00', '09:00-12:00',
'12:00-15:00', '15:00-18:00', '18:00-21:00', '21:00-24:00'
],
alltime: [],//时间数组
popuplist: [{
name: '出发地点'
}, {
......@@ -568,7 +565,7 @@
},
onLoad(options) {
console.log(222)
if (options && options.carMsg) {
//对象解码
this.carMsg = JSON.parse(decodeURIComponent(options.carMsg))
......@@ -588,7 +585,12 @@
},
methods: {
yuding(x){
uni.navigateTo({
url: '/pages/guidecar/specialCarReserve?Id='+x.Id +'&Date='+this.msg.Q_Date
})
},
popupchange(e) { //tab事件
this.popupcurrent = e;
},
......@@ -761,7 +763,10 @@
this.DepartList = res.data.DepartList;
this.ArriveList = res.data.ArriveList;
this.DepartList.unshift('不限')
this.ArriveList.unshift('不限')
this.ArriveList.unshift('不限')
this.alltime =['不限', '00:00-03:00', '03:00-06:00', '06:00-09:00', '09:00-12:00',
'12:00-15:00', '15:00-18:00', '18:00-21:00', '21:00-24:00'
]
},
err => {
uni.hideLoading()
......@@ -778,6 +783,10 @@
this.init();
this.screenshow = false;
this.$forceUpdate()
this.DepartList= [], //出发点数组
this.ArriveList= [], //到达点数组
this.alltime= [],//时间数组
this.getSelectCarSiteList()
},
queren(){
this.msg.StartCityName = this.SMsg.depart;
......
......@@ -281,10 +281,11 @@
}
let carDate = new Date();
let carMonth = (carDate.getMonth() + 1)<10?'0'+(carDate.getMonth() + 1):(carDate.getMonth() + 1);
this.carMsg.Q_Date = carDate.getFullYear() +'-'+carMonth+'-'+carDate.getDate();
let carDays = (carDate.getDate() )<10?'0'+(carDate.getDate() ):(carDate.getDate());
this.carMsg.Q_Date = carDate.getFullYear() +'-'+carMonth+'-'+carDays;
let carday = carDate.getDay();
this.startDate = carDate.getFullYear() +'-'+carMonth+'-'+carDate.getDate();//从啥时候开始
this.showcardate = carMonth+'-'+carDate.getDate();
this.startDate = carDate.getFullYear() +'-'+carMonth+'-'+carDays;//从啥时候开始
this.showcardate = carMonth+'-'+carDays;
this.showweek = this.getweek(carday) //得到定制专车的周几
},
......
<template>
<view class="map">
<map id="navmap" style="width: 100%;height: 600px;" :markers="markers" :latitude="src_latitude" :longitude="src_longitude"
:hidden="false">
</map>
<view class="liststyle" v-if="details.type==1">
<view v-for='(x,y) in upcar' :key='y' class="liststyle-item" @click="goback(x)">
<view class="list-item1" :style="{color:details.SelectID == x.Id?mainColor:'#1B1D1E','font-weight':details.SelectID == x.Id?'bold':'400'}">{{x.Name}}</view>
<view class="list-item-t" :style="{color:details.SelectID == x.Id?mainColor:'#1B1D1E'}">{{x.SubName}}</view>
</view>
</view>
<view class="liststyle" v-if="details.type==2">
<view v-for='(x,y) in downcar' :key='y' class="liststyle-item" @click="goback(x)">
<view class="list-item1" :style="{color:details.SelectID == x.Id?mainColor:'#1B1D1E','font-weight':details.SelectID == x.Id?'bold':'400'}">{{x.Name}}</view>
<view class="list-item-t" :style="{color:details.SelectID == x.Id?mainColor:'#1B1D1E'}">{{x.SubName}}</view>
</view>
</view>
</view>
</template>
<script>
export default{
data(){
return{
pageTitle: "选择地点",
src_latitude:'30.628043',
src_longitude:'104.137580',
markers: [],
details:{},
upcar:[],
downcar:[],
mainColor:'',
}
},
onReady(){
let MapContext = wx.createMapContext('navmap', this);
let that = this;
},
onLoad(options) {
this.mainColor = this.$uiConfig.mainColor;
if(options && options.obj){
this.details = JSON.parse(decodeURIComponent(options.obj))
this.getdizhiList()
if(this.details.type==1){
this.pageTitle='选择出发点'
}else{
this.pageTitle='选择到达点'
}
}
uni.setNavigationBarTitle({
title: this.pageTitle,
});
},
methods:{
getdizhiList(){
this.upcar = []
this.downcar = []
this.details.SiteList.forEach(x=>{
if(x.Type == 1){
this.upcar.push(x)
}else{
this.downcar.push(x)
}
})
this.markers = [];
if(this.details.type == 1){
this.src_latitude = this.upcar[0].Lonlat.split(',')[1];
this.src_longitude = this.upcar[0].Lonlat.split(',')[0];
this.upcar.map(x=>{
let obj = {
id: x.Id,
iconPath: 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/dcdtbiaoji.png',
width: 22,
height: 33,
latitude:x.Lonlat.split(',')[1],
longitude:x.Lonlat.split(',')[0],
title:x.Name
}
this.markers.push(obj)
})
}else{
this.src_latitude = this.downcar[0].Lonlat.split(',')[1];
this.src_longitude = this.downcar[0].Lonlat.split(',')[0];
this.downcar.map(x=>{
let obj = {
id: x.Id,
iconPath: 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/dcdtbiaoji.png',
width: 22,
height: 33,
latitude:x.Lonlat.split(',')[1],
longitude:x.Lonlat.split(',')[0],
title:x.Name
}
this.markers.push(obj)
})
}
},
goback(x){
let pages = getCurrentPages(); // 当前页面
let beforePage = pages[pages.length - 2]; // 前一个页面
let that = this
uni.navigateBack({
success: function() {
beforePage.$vm.getbackData(that.details.type,x.Id); // 执行前一个页面的方法
}
});
}
}
}
</script>
<style>
.map{
width: 100%;
height: 100vh;
position: relative;
}
.liststyle{
width: 100%;
max-height: 165px;
position: absolute;
left: 0;
bottom: 0;
background: #FFF;
border-radius: 10px 10px 0px 0px;
padding: 10px 15px;
}
.liststyle-item{
padding: 5px 0;
font-size: 14px;
color: #1B1D1E;
border-bottom: 1px solid #E2E2E2;
}
.list-item{
}
.list-item-t{
font-size: 11px;margin-top: 3px;color: #999999;
}
</style>
<style lang="scss" scoped>
.specialCarReserve{
width: 100%;
height: 100vh;
background: #FFF;
.box-top{
width: 100%;
height: 80px;
display: flex;
align-items: center;
padding: 0 15px;
justify-content: space-between;
font-size: 20px;
font-family: PingFang SC;
font-weight: 800;
color: #111111;
border-radius: 0px 0px 30px 30px;
box-shadow: 0px 1px 8px 0px rgba(76, 76, 76, 0.13);
.onetext{
overflow: hidden;white-space: nowrap;text-overflow: ellipsis;
width: calc((100vw - 30px - 115px)/2);
text-align: center;
}
.box-top-c{
width: 113px;
display: flex;
flex-direction: column;
align-items: center;
.box-top-ct{
width: 113px;
height: 21px;
border-radius: 2px;
background: rgba(223, 190, 110, 0.1);
font-size: 12px;
font-family: PingFang SC;
font-weight: 500;
color: #DFBE6E;
text-align: center;
line-height: 21px;
margin-bottom: 4px;
}
}
}
.addresStyle{
width: 100%;
height: 53px;
padding: 0 20px;
display: flex;
align-items: center;
}
.address-l-h{
width: 13px;
height: 13px;
background: #111111;
border: 3px solid #999999;
border-radius: 50%;
margin-right: 9px;
}
.address-l-h2{
width: 13px;
height: 13px;
background: #DFBE6E;
border: 3px solid #F2DBA3;
border-radius: 50%;
margin-right: 9px;
}
.addresStyle-text{
width: calc(100vw - 40px - 13px - 9px);
height: 100%;
font-size: 14px;
color: #999999;
font-weight: bold;
display: flex;
align-items: center;
border-bottom: 1px solid #E7E7E7;
overflow: hidden;white-space: nowrap;text-overflow: ellipsis;
}
.item-s{
width: 100%;
padding: 0 20px;
.item{
width: 100%;
height: 45px;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 14px;
font-weight: 500;
color: #111111;
.item-row{
display: flex;
align-items: center;
.text-h{
font-size: 12px;
font-weight: 500;
color: #999999;
margin-left: 20px;
}
}
}
}
.posibtn{
width: calc(100vw - 40px);
height: 50px;
border-radius: 8px;
background: #FFFFFF;
box-shadow: 0px 5px 15px 0px rgba(36, 36, 36, 0.2);
display: flex;
align-items: center;
justify-content: space-between;
position: fixed;
left: 20px;
bottom: 30px;
z-index: 20;
.btn-l{
display: flex;
align-items: flex-end;
font-size: 12px;
color: #111111;
margin-left: 19px;
}
.btn-r{
width: 97px;
height: 40px;
background: #111111;
border-radius: 8px;
margin-right: 5px;
display: flex;
align-items: center;
justify-content: center;
font-size: 14px;
font-weight: bold;
color: #FFFFFF;
}
}
}
</style>
<template>
<view class="specialCarReserve">
<view class="box-top">
<div class='onetext'>
{{details.StartCityName}}
</div>
<view class="box-top-c">
<view class="box-top-ct">
{{showtime}}
</view>
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/sanjiao.png" mode="aspectFill" style="width: 55px;height: 4px;"></image>
</view>
<div class='onetext'>
{{details.ArriveCityName}}
</div>
</view>
<view class="addresStyle">
<view class="address-l-h"></view>
<view class="addresStyle-text" @click="shijiup(1)">
<span v-if="addMsg.DepartAddress==''">请选择实际上车点</span>
<span v-else style='color: #111;'>{{addMsg.DepartAddress}}</span>
</view>
</view>
<view class="addresStyle">
<view class="address-l-h2"></view>
<view class="addresStyle-text" @click="shijiup(2)">
<span v-if="addMsg.ArriveAddress==''">请选择实际下车点</span>
<span v-else style='color: #111;'>{{addMsg.ArriveAddress}}</span>
</view>
</view>
<view class="item-s">
<view class="item">
<view class="item-row">
<span>成人</span>
<span class='text-h'>12周岁以上</span>
</view>
<view>
<u-number-box v-model="addMsg.PeopleNumber" @change="valChange"></u-number-box>
</view>
</view>
<view class="item">
<view class="item-row">
<span>儿童</span>
<span class='text-h'>0-12周岁(不含)</span>
</view>
<view>
<u-number-box v-model="addMsg.ChildNumber" @change="valChange2"></u-number-box>
</view>
</view>
<view class="item">
<view class="item-row">
<span>联系人</span><span style='color: #D91818;'>*</span>
</view>
<view>
<input type="text" v-model="addMsg.Consignee" placeholder="请输入联系人" style="text-align: right;width: calc(100vw - 40px - 80px);">
</view>
</view>
<view class="item">
<view class="item-row">
<span>联系电话</span><span style='color: #D91818;'>*</span>
</view>
<view>
<input type="number" v-model="addMsg.ConsigneeMobile" placeholder="请输入联系电话" style="text-align: right;width: calc(100vw - 40px - 80px);">
</view>
</view>
<view class="item" style="border-bottom: 1px solid #E7E7E7;">
<view class="item-row">
<span>留言</span>
</view>
<view>
<input type="text" v-model="addMsg.BuyerMessage" placeholder="请输入留言" style="text-align: right;width: calc(100vw - 40px - 80px);">
</view>
</view>
<view style="line-height: 35px;text-align: right;">明细</view>
<view class="item">
<view class="item-row"></view>
<view class="item-row">
<span style='margin-right: 3px;'>成人</span>
<span v-if='addMsg.PeopleNumber>0'>{{addMsg.PeopleNumber}}*{{addMsg.Unit_Price}}</span>
<span v-else>0</span>
</view>
</view>
<view class="item">
<view class="item-row"></view>
<view class="item-row">
<span style='margin-right: 3px;'>儿童</span>
<span v-if='addMsg.ChildNumber>0'>{{addMsg.ChildNumber}}*{{addMsg.Unit_Price}}</span>
<span v-else>0</span>
</view>
</view>
<view style="width: 100%;height: 100px;"></view>
</view>
<view class="posibtn">
<view class="btn-l">
<span>总价</span>
<span style='margin-left: 5px;color: #D91818;'></span>
<span style='font-size: 20px;color: #D91818;line-height: 21px;'>{{addMsg.Final_Price.toFixed(2)}}</span>
</view>
<view class="btn-r" @click="gopay">去支付</view>
</view>
</view>
</template>
<script>
export default{
data(){
return{
pageTitle: "订单填写",
mainColor: '',
details:{},
showtime:'',
addMsg:{
PlanId:0,
Date:'',
DepartureTime:'',
DepartAddress:'',
ArriveAddress:'',
Unit_Price:0,
PeopleNumber:0,
ChildNumber:0,
Final_Price:0,
BuyerMessage:'',
Consignee:'',
ConsigneeMobile:'',
},
upcar:[],
downcar:[],
upid:0,
downid:0,
orderInfo:{},
showtime2:'',
}
},
onLoad(options) {
if(options && options.Id){
this.addMsg.PlanId = options.Id;
this.getCarPlanInfo()//获取定制包车结算页面
}
if(options && options.Date){
this.addMsg.Date = options.Date;
var time = new Date(options.Date);
let showweek = time.getDay()
let week = this.getweek(showweek)
this.showtime = options.Date.split('-')[1] + '月' + options.Date.split('-')[2] + '日'+' '+week;
this.showtime2 = options.Date.split('-')[1] + '月' + options.Date.split('-')[2] + '日'
}
uni.setNavigationBarTitle({
title: this.pageTitle,
});
this.mainColor = this.$uiConfig.mainColor;
},
methods:{
shijiup(type){
let SelectID = 0
if(type==1){
SelectID = this.upid;
}else{
SelectID = this.downid;
}
let obj = {
type:type,//上车点
SiteList:this.details.SiteList,
SelectID:SelectID
}
obj = encodeURIComponent(JSON.stringify(obj))
uni.navigateTo({
url: '/pages/guidecar/map?obj='+ obj
})
},
getbackData(type,ID){//地图选择返回参数
console.log(type,ID)
if(type==1){
this.upcar.map(x=>{
if(x.Id == ID){
this.addMsg.DepartAddress = x.Name;
this.upid = x.Id;
this.addMsg.DepartureTime = x.AboutTime;//出发时间的赋值
return
}
})
}else{
this.downcar.map(x=>{
if(x.Id == ID){
this.addMsg.ArriveAddress = x.Name;
this.downid = x.Id;
return
}
})
}
},
valChange(val){//数值改变更改总价
let value = val.value;
this.addMsg.PeopleNumber = value
this.addMsg.Final_Price = (this.addMsg.PeopleNumber +this.addMsg.ChildNumber)*this.addMsg.Unit_Price
},
valChange2(val){//数值改变更改总价
let value = val.value
this.addMsg.ChildNumber = value
this.addMsg.Final_Price = (this.addMsg.PeopleNumber+this.addMsg.ChildNumber)*this.addMsg.Unit_Price
},
gopay(){//支付
if(this.addMsg.DepartAddress==''){
uni.showToast({
title:'请选择出发地',
icon:'none'
})
return
}
if(this.addMsg.ArriveAddress==''){
uni.showToast({
title:'请选择到达地',
icon:'none'
})
return
}
if((this.addMsg.PeopleNumber+this.addMsg.ChildNumber)<1){
uni.showToast({
title:'请选择出发人数',
icon:'none'
})
return
}
if(this.addMsg.Consignee==''){
uni.showToast({
title:'请输入联系人',
icon:'none'
})
return
}
if(this.addMsg.ConsigneeMobile==''){
uni.showToast({
title:'请输入联系人电话',
icon:'none'
})
return
}
uni.showLoading({
title: '下单中...'
})
this.request2({
url: '/api/AppletCar/SetAppletCarOrderInfo',
data: this.addMsg
},
res => {
uni.hideLoading()
if (res.resultCode == 1) {
this.queren(res.data)
}
},
err => {
uni.hideLoading()
}
);
},
queren(OrderId){
let url='/api/WeChatPay/GetDmcPayInfo'
let GoodsName = this.showtime2+this.details.StartCityName+'-'+this.details.ArriveCityName
GoodsName = GoodsName.slice(0, 10)
this.request2({
url: url,
data: {
OrderId:OrderId,
GoodsName:GoodsName,
OrderPayType:1,
OpenId:uni.getStorageSync('mall_UserInfo').OpenId,
}
},
res => {
this.orderInfo = JSON.parse(res.data);
console.log(this.orderInfo)
this.Pay()
}
);
},
Pay(){
let that=this;
uni.requestPayment({
provider: 'wxpay',
timeStamp: this.orderInfo.timeStamp,
nonceStr: this.orderInfo.nonceStr,
package: this.orderInfo.package,
signType: this.orderInfo.signType,
paySign: this.orderInfo.sign,
success: function(res) {
console.log('success', res);
uni.showToast({
title: "支付成功"
})
},
fail: function(err) {
console.log('fail:', err);
uni.showToast({
title: "支付失败"
})
}
});
},
getCarPlanInfo(){
uni.showLoading({
title: '加载中...'
})
this.request2({
url: '/api/AppletCar/GetAppletCarPlanSettlementInfo',
data: {PlanId:this.addMsg.PlanId}
},
res => {
uni.hideLoading()
if (res.resultCode == 1) {
this.details = res.data
this.addMsg.DepartureTime = this.details.StartDate;
this.addMsg.Unit_Price = this.details.Price;
this.upcar = [];
this.downcar = []
this.details.SiteList.forEach(x=>{
if(x.Type == 1){
this.upcar.push(x)
}else{
this.downcar.push(x)
}
})
//出发点默认第一个
this.addMsg.DepartAddress = this.upcar[0].Name;
this.upid = this.upcar[0].Id;
}
},
err => {
uni.hideLoading()
}
);
},
getweek(day) { //根据值返回当前时间的星期几
if (day == 1) {
return '周一'
} else if (day == 2) {
return '周二'
} else if (day == 3) {
return '周三'
} else if (day == 4) {
return '周四'
} else if (day == 5) {
return '周五'
} else if (day == 6) {
return '周六'
} else if (day == 0) {
return '周日'
}
},
}
}
</script>
<style lang="scss" scoped>
.allorderList{
width: 100%;
height: 100vh;
background: #ECF1F4;
.orderList{
width: 100%;
border-radius: 10px;
background: #FFF;
padding: 20px;
margin-top: 10px;
}
.orderList-top{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
color: #111111;
}
.order_xu{
width: 100%;
height: 14px;
border-bottom: 1px dashed #E6E6E6;
}
.order_center{
width: 100%;
margin-top: 15px;
.car-o{
width: calc(100vw - 40px);
font-size: 14px;
color: #111111;
font-weight: bold;
display: flex;
align-items: center;
overflow: hidden;white-space: nowrap;text-overflow: ellipsis;
}
.car-w{
width: 100%;
font-size: 12px;
color: #333333;
font-size: 500;
margin-top: 5px;
}
.hotelbox{
display: flex;
.hotelbox-r{
width: calc(100vw - 40px - 60px);
font-size: 12px;
.text-t{
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
}
}
}
.zailaiyidan{
width: 75px;
height: 30px;
background: #111111;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
font-size: 12px;
color: #FFF;
}
}
</style>
<template>
<view class="allorderList">
<u-tabs :list="statusList" :current="current" name="Name" @change="change" :active-color="mainColor" bg-color="#FFF" bar-height='4'
height="100"></u-tabs>
<view style="height: calc(100vh - 50px); background: #fff;" v-if="g.length == 0">
<u-empty text="暂无相关订单" mode="order"></u-empty>
</view>
<view v-if="g.length > 0" style="height: calc(100vh - 50px);width: calc(100vw);overflow: hidden;padding-bottom: 20px;">
<scroll-view :scroll-y="true" :enable-back-to-top="true" :enable-flex="true" @scrolltolower="lower" :style="{ height: '100%' }">
<view class="orderList" v-for="(item, index) in g" :key="index">
<view class="orderList-top">
<span style='font-size: 16px;font-weight: 800;'>{{item.OrderTypeName}} <span style='font-size: 12px;font-weight: normal;'>({{item.OrderNo}})</span></span>
<span style='font-size: 12px;'>{{item.OrderStatusName}}</span>
</view>
<view class="order_xu"></view>
<view class="order_center" v-if="item.OrderType == 1">
<view v-for="(x,y) in item.HotelList" :key='y' >
<view class="hotelbox">
<image :src="x.HotelImage" style="width: 50px;height: 50px;border-radius: 8px;margin-right: 10px;"></image>
<view class="hotelbox-r">
<view class="text-t">{{x.HotelName}}</view>
<view>数量:{{x.RoomNumber}}</view>
<view>单价:¥{{x.Unit_Price}}</view>
</view>
</view>
<view class="order_xu"></view>
</view>
</view>
<view class="order_center" v-if="item.OrderType == 4">
<view v-for="(x,y) in item.CarList" :key='y' >
<view class="car-o" >
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/zhuanghuan.png" mode="aspectFill" style="width: 18px;height: 18px;"></image>
<span style='margin-left: 10px;'>{{x.StartCityName}}</span>
<span style='margin: 0 3px;'>-</span>
<span>{{x.ArriveCityName}}</span>
</view>
<view class="car-w">
上车地点:{{x.DepartAddress}}
</view>
<view class="car-w">
下车地点:{{x.ArriveAddress}}
</view>
<view class="car-w">
出发时间:{{x.Date}} {{x.DepartureTime}}
</view>
<view class="car-w">
总张数:{{x.PeopleNumber+x.ChildNumber}}人 单价:¥{{x.Unit_Price.toFixed(2)}}
</view>
<view class="order_xu"></view>
</view>
</view>
<view style="font-size: 14px;color: #111111;margin-top: 10px;text-align: right;">
应付:¥{{item.PreferPrice}}
</view>
<view style="display: flex;justify-content: flex-end;margin-top: 5px;">
<view class="zailaiyidan">
再来一单
</view>
</view>
</view>
<u-loadmore :status="status" :load-text="loadText" :font-size="24" :margin-top="20" :margin-bottom="20" bg-color="#ECF1F4" />
</scroll-view>
</view>
</view>
</template>
<script>
export default{
data(){
return{
pageTitle: "我的订单",
mainColor: '',
statusList:[],
current:0,
msg:{
pageIndex:1,
pageSize:20,
StartTime:'',
EndTime:'',
OrderId:0,
OrderNo:'',
OrderType:0,
OrderStatus:0,
},
loadText: {
loadmore: "轻轻上拉,加载更多",
loading: "努力加载中",
nomore: "没有更多了",
},
page_count: 1,
status: "loadmore",
g: [],
}
},
onLoad(options){
let currentPages = getCurrentPages();
let u = "/" + currentPages[currentPages.length - 1].route;
let pages = wx.getStorageSync("basedata") ?
wx.getStorageSync("basedata").bar_title : [];
pages.forEach((x) => {
if (x.value == u) {
this.pageTitle = x.new_name ? x.new_name : x.name;
}
});
uni.setNavigationBarTitle({
title: this.pageTitle,
});
this.mainColor = this.$uiConfig.mainColor;
},
created() {
this.getOrderStatusList()
},
methods:{
getOrderStatusList(){//获取订单状态枚举列表
this.request2({
url: '/api/AppletOrder/GetOrderStatusEnumList',
data: {}
},
res => {
if (res.resultCode == 1) {
this.statusList = res.data
this.statusList.unshift({Name:'全部',Id:0})
}
this.init();
},
err => {
}
);
},
change(e){//tab切换等数据
this.current = e;
this.msg.OrderStatus = this.statusList[e].Id;
this.msg.pageIndex = 1;
this.g = [];
this.init();
},
init(){
uni.showLoading({
title: '加载中...'
})
this.request2({
url: '/api/AppletOrder/GetMyDmcOrderCommonPageList',
data: this.msg
},
res => {
uni.hideLoading()
if (res.resultCode == 1) {
this.g = this.g.concat(res.data.pageData);
this.page_count = res.data.pageCount;
if (this.page_count == 1) {
this.status = "nomore";
}
}
},
err => {
uni.hideLoading()
}
);
},
lower(e) {
if (this.msg.pageIndex < this.page_count) {
this.msg.pageIndex++;
this.status = "loading";
this.init();
} else {
this.status = "nomore";
}
},
}
}
</script>
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