刘翔宇-旅管家 4 years ago
parent c2b8e37ea9
commit d572a79338

@ -53,7 +53,12 @@
<style>
@import '@/static/css/common.css';
@import "@/static/css/iconfont.css";
/*每个页面公共css */
.flex_end {
display: flex;
justify-content: flex-end;
}
.mpopup {
margin-top: 60rpx;

@ -5,7 +5,8 @@
<view class="activityBox-top">
<!-- <image src="../../static/img/img_activity.jpg" style="width: 100%;height: 333rpx;"></image> -->
<swiper autoplay="true" :interval="4000" :duration="1000" :indicator-dots="true"
indicator-active-color="rgba(255, 255, 255, 0.7)" indicator-color="rgba(239, 149, 37, 1)" :current="topSwiperIndex" @change="topSwiperTab">
indicator-active-color="rgba(255, 255, 255, 0.7)" indicator-color="rgba(239, 149, 37, 1)"
:current="topSwiperIndex" @change="topSwiperTab">
<swiper-item v-for="(item,index) in list.banners" :key="index">
<view class="swiper-item">
<image :src="item.upload.url" mode="aspectFill"></image>
@ -23,7 +24,7 @@
<view class="activityBox-row">
<text class="icon-shijian iconfont"></text>
<text>活动时间{{list.start_time}}-{{list.end_time.substring(11,list.end_time.length)}}</text>
<text>活动时间{{list.start_time||""}}-{{list.end_time.substring(11,list.end_time.length)}}</text>
</view>
<view class="activityBox-row">
@ -171,9 +172,11 @@
padding: 22rpx 25rpx;
box-sizing: border-box;
}
swiper {
height: 333rpx
}
swiper image {
width: 100%;
height: 333rpx;

@ -113,6 +113,7 @@
var that = this;
this.util.getOpenidInfo(function(res) {
that.util.getUserInfo(function(r) {
that.info = r;
cb(r);
}, true)
}, true);

@ -4,36 +4,39 @@
<u-tabs lineWidth="50" lineHeight="2" :scrollable="false" :list="list" lineColor="#EF9525"
:is-scroll="false" :current="current" @change="handleChange"></u-tabs>
</view>
<view class="orderBoxList">
<u-empty mode="list" :marginTop="100" v-if="isloading&&listOrder.length==0" />
<view class="orderBoxList" v-else>
<block v-for="(item,index) in listOrder" :key="index">
<view class="orderBox">
<view class="orderBox" @click="toinfo(item.id)">
<view class="orderBoxTitle flex-row">
<text class="orderBoxTitleTxt">{{item.isteam?"团队预约":"个人预约"}}</text>
<view class="orderBoxStatus">待参观</view>
<text class="orderBoxTitleTxt">{{item.type==1?"团队预约":"个人预约"}}</text>
<view class="orderBoxStatus" :class="{'cancel':item.status==0}">{{item.status_name}}</view>
</view>
<view class="orderBoxInfo flex-col">
<view class="orderBoxInfoRow flex-row" style="margin-bottom: 20rpx;">
<text class="iconfont icon-youkexuzhi"></text>
<text class="orderBoxInfoRowTxt">订单信息5月06日 09:00-10:00  3位观众</text>
<text class="orderBoxInfoRowTxt">
订单信息{{$u.timeFormat(new Date(item.date), 'mm月dd日')}}
{{item.time}}{{item.details_count}}位观众</text>
</view>
<view class="orderBoxInfoRow flex-row">
<text class="iconfont icon-iconfontgerenzhongxin"></text>
<text class="orderBoxInfoRowTxt">联系人王小华 13355634563</text>
<text class="orderBoxInfoRowTxt">联系人{{item.leader}} {{item.mobile}}</text>
</view>
<view class="orderBoxInfoRow flex-row" v-if="item.isteam" style="margin-top: 20rpx;">
<view class="orderBoxInfoRow flex-row" v-if="item.type==1" style="margin-top: 20rpx;">
<text class="iconfont icon-danwei"></text>
<text class="orderBoxInfoRowTxt">单位名称王小华 13355634563</text>
<text class="orderBoxInfoRowTxt">单位名称{{item.unit}}</text>
</view>
</view>
<view class="orderBoxTime">
<text>下单时间5月03日 09:30</text>
<text>下单时间{{item.created_at}}</text>
</view>
<view class="orderBoxFooter flex-row flex_end">
<view class="fbtn" @click="tobook()" style="margin-right: 23rpx;">查看详情</view>
<view class="fbtn cancel">取消</view>
<view class="fbtn" @click.stop="toinfo(item.id)" style="margin-right: 23rpx;">查看详情</view>
<view class="fbtn cancel" @click.stop="tocancel(item.id)">取消</view>
</view>
</view>
</block>
@ -50,30 +53,78 @@
flex: 1
},
list: [{
name: '全部'
name: '全部',
idx: ""
}, {
name: '待参观'
name: '待参观',
idx: "1"
}, {
name: '已参观'
name: '已参观',
idx: "2"
}],
current: 0,
listOrder: [{
isteam: true
},
{
isteam: false
}
]
isloading: true,
listOrder: []
}
},
onShow() {
this.loadOrder();
},
methods: {
handleChange() {
handleChange(e) {
this.current = e.index;
this.loadOrder();
},
tobook(){
toinfo(id) {
uni.navigateTo({
url: "/pages/order/visitorderinfo"
url: "/pages/order/visitorderinfo?id=" + id
})
},
tocancel(id) {
var that = this;
uni.showModal({
title: '确认要取消预约?',
success: function(res) {
if (res.confirm) {
that.util.request({
api: '/api/mobile/visit/cancel-order',
data: {
id: id
},
utilSuccess: function(res) {
that.loadOrder()
},
utilFail: function(res) {
uni.showToast({
icon: "none",
title: res
})
}
})
console.log('用户点击确定');
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
loadOrder() {
var that = this;
this.util.request({
api: '/api/mobile/user/my-visit-order',
data: {
status: this.list[this.current].idx
},
utilSuccess: function(res) {
that.listOrder = res;
this.isloading = false;
},
utilFail: function(res) {
uni.showToast({
icon: "none",
title: res
})
}
})
}
}
@ -142,6 +193,10 @@
color: #351C1B;
}
.cancelstatus {
background: #828282;
}
.orderBoxStatus {
background: #EF9525;
border-top-right-radius: 16rpx;

@ -445,7 +445,7 @@
filePath: tempFilePaths, //data
name: 'file', //
formData: { //formData
"token": uni.getStorageSync("userInfo").token
"token": uni.getStorageSync("userInfo_token").token
},
success(res) {
var jsonlist = JSON.parse(res.data)

Loading…
Cancel
Save