You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
<template>
|
|
|
|
<view class="record">
|
|
|
|
<view class="item" v-for="(item,index) in preList" :key="index">
|
|
|
|
<view class="hd">
|
|
|
|
<image src="@/static/home/phone.jpg"></image>
|
|
|
|
<view class="info">
|
|
|
|
<view class="a">{{item.goods_name}}</view>
|
|
|
|
<view class="b"><text>倒计时</text><u-count-down :timestamp="item.p_time" ></u-count-down></view>
|
|
|
|
<view class="c">预约价:¥<text>{{item.goods_price_min}}</text></view>
|
|
|
|
</view>
|
|
|
|
<view class="status">已预约</view>
|
|
|
|
</view>
|
|
|
|
<view class="bd">
|
|
|
|
<view class="btn" @click="cancelPre(item.id)">取消</view>
|
|
|
|
<view class="btn btn-01" @click="goDetail(item.id)">详情</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="content" v-if="preList.length==0">
|
|
|
|
暂无预约记录
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import * as preInfo from '@/api/preList/index.js'
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
timestamp: 24*3600*1000,
|
|
|
|
preList:[]
|
|
|
|
};
|
|
|
|
},
|
|
|
|
onShow(){
|
|
|
|
this.getPreList()
|
|
|
|
},
|
|
|
|
methods:{
|
|
|
|
getPreList(){
|
|
|
|
preInfo.list({page:1}).then(res=>{
|
|
|
|
if(res.status==200){
|
|
|
|
this.preList = res.data.list.data
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
},
|
|
|
|
cancelPre(val){
|
|
|
|
preInfo.list({id:pre}).then(res=>{
|
|
|
|
if(res.status==200){
|
|
|
|
this.$toast(res.message)
|
|
|
|
this.getPreList()
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
},
|
|
|
|
goDetail(val){
|
|
|
|
uni.navigateTo({
|
|
|
|
url:'/pages/goods/detail?isPre=true&goodsId='+val
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.record{
|
|
|
|
padding: 0 16rpx 20rpx;
|
|
|
|
overflow: hidden;
|
|
|
|
.item{
|
|
|
|
width: 100%;
|
|
|
|
padding: 0 30rpx;
|
|
|
|
box-sizing: border-box;
|
|
|
|
background-color: #fff;
|
|
|
|
margin-top: 20rpx;
|
|
|
|
.hd{
|
|
|
|
display: flex;
|
|
|
|
align-items: flex-start;
|
|
|
|
overflow: hidden;
|
|
|
|
padding: 15rpx 0;
|
|
|
|
overflow: hidden;
|
|
|
|
border-bottom: 1px solid #F2F2F2;
|
|
|
|
image{
|
|
|
|
width: 190rpx;
|
|
|
|
height: 190rpx;
|
|
|
|
margin-right: 20rpx;
|
|
|
|
}
|
|
|
|
.info{
|
|
|
|
flex: 1;
|
|
|
|
max-width: 320rpx;
|
|
|
|
.a{
|
|
|
|
white-space: nowrap;
|
|
|
|
font-size: 32rpx;
|
|
|
|
font-weight: 400;
|
|
|
|
color: #1E1E1E;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
overflow: hidden;
|
|
|
|
margin-top: 30rpx;
|
|
|
|
}
|
|
|
|
.b{
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
margin-top: 10rpx;
|
|
|
|
text{
|
|
|
|
color: #949494;
|
|
|
|
margin-right: 20rpx;
|
|
|
|
}
|
|
|
|
font-size: 28rpx;
|
|
|
|
font-weight: 400;
|
|
|
|
color: #FF0E0E;
|
|
|
|
}
|
|
|
|
.c{
|
|
|
|
margin-top: 10rpx;
|
|
|
|
text{
|
|
|
|
font-size: 36rpx;
|
|
|
|
font-weight: 600;
|
|
|
|
color: #F21A1C;
|
|
|
|
}
|
|
|
|
font-size: 28rpx;
|
|
|
|
font-weight: 400;
|
|
|
|
color: #FF0E0E;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.status{
|
|
|
|
flex: 1;
|
|
|
|
text-align: right;
|
|
|
|
font-size: 32rpx;
|
|
|
|
font-weight: 400;
|
|
|
|
color: #529C30;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.bd{
|
|
|
|
padding: 30rpx 0;
|
|
|
|
overflow: hidden;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: flex-end;
|
|
|
|
.btn{
|
|
|
|
width: 158rpx;
|
|
|
|
line-height: 62rpx;
|
|
|
|
background: #FFFFFF;
|
|
|
|
border-radius: 62rpx;
|
|
|
|
text-align: center;
|
|
|
|
border: 1px solid #C6C6C6;
|
|
|
|
font-size: 28rpx;
|
|
|
|
font-weight: 400;
|
|
|
|
color: #3D3D3D;
|
|
|
|
margin-left: 20rpx;
|
|
|
|
&-01{
|
|
|
|
background: #F19592;
|
|
|
|
border-color: #F19592;
|
|
|
|
color: #fff;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.content{
|
|
|
|
padding-top: 50%;
|
|
|
|
text-align: center;
|
|
|
|
width: 100%;
|
|
|
|
color: gray;
|
|
|
|
font-size: 28rpx;
|
|
|
|
line-height: 30rpx;
|
|
|
|
}
|
|
|
|
</style>
|