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.

297 lines
6.7 KiB

4 years ago
<template>
<view class="content">
<view class="orderBox">
<view class="serviceBtn disabled">已服务</view>
<view class="seeMap">查看地图<text class="iconfont icon-right"></text></view>
<view class="title">时光印记孕妈妈摄影套餐</view>
<view class="p">有效期至2021-02-10 14:00</view>
<view class="p">预约时间<text class="font_red">2021-02-10 12:30</text></view>
4 years ago
<view class="qr_box">
<image mode="widthFix" src="../../static/300_qr.png"></image>
</view>
4 years ago
<view class="ticketNum">票号1234 5678 90</view>
</view>
<view class="orderBox">
<view class="title">订单信息</view>
<view class="hasTwo">
<view class="p_left"><text class="twoWords"></text>:</view>
<view class="p_right">王大宝</view>
</view>
<view class="hasTwo">
<view class="p_left"><text class="halfWords"></text><text class="halfWords"></text>:</view>
<view class="p_right">13844345606</view>
4 years ago
</view>
4 years ago
<view class="hasTwo">
<view class="p_left">预产期/宝宝生日:</view>
<view class="p_right">2020-12-11</view>
4 years ago
</view>
4 years ago
<view class="hasTwo">
<view class="p_left"><text class="twoWords"></text>:</view>
<view class="p_right">江苏省苏州市工业园区湖海小区5栋102</view>
4 years ago
</view>
4 years ago
<view class="hasTwo">
<view class="p_left"><text class="twoWords"></text>:</view>
<view class="p_right">¥100</view>
4 years ago
</view>
4 years ago
<view class="hasTwo">
<view class="p_left">实付金额:</view>
<view class="p_right">¥100</view>
4 years ago
</view>
4 years ago
<view class="hasTwo">
<view class="p_left"><text class="twoWords"></text>:</view>
<view class="p_right"><text class="font_red">已使用</text></view>
</view>
4 years ago
</view>
4 years ago
<view class="orderBox">
<view class="title">订单评价</view>
<view class="discuss">
<view class="dis_l">评分:</view>
<view class="starBox">
<image mode="heightFix" src="../../static/icon_detail_star_pre@2x.png"></image>
<image mode="heightFix" src="../../static/icon_detail_star_pre@2x.png"></image>
<image mode="heightFix" src="../../static/icon_detail_star_pre@2x.png"></image>
<image mode="heightFix" src="../../static/icon_detail_star_nor@2x.png"></image>
<image mode="heightFix" src="../../static/icon_detail_star_nor@2x.png"></image>
</view>
</view>
<view class="discuss">
<view class="dis_l">评价:</view>
<view class="areaOuter">
4 years ago
<textarea placeholder-style="color:#CCCCCC" placeholder="请填写评价" />
4 years ago
</view>
4 years ago
</view>
4 years ago
<view class="subBtn">提交</view>
4 years ago
</view>
4 years ago
</view>
</template>
<script>
export default {
data() {
return {
4 years ago
info: {},
id: "",
statusLabels: [{
state: "",
txt: "全部"
}, {
state: "unpaid",
txt: "待支付"
}, {
state: "ongoing",
txt: "进行中"
}, {
state: "finished",
txt: "已完成"
}],
corderstatusLabels: {
"pending": "待处理",
"assigned": "已分发",
"returned": "已退回",
"accepted": "已接收",
"confirmed": "确认有效",
"canceled_by_user": "用户取消",
"canceled_by_merchant": "商家标注无效单",
"finished": "已取消",
"canceled": "已取消"
3 years ago
},
user_info: {},
openid: ""
4 years ago
}
},
4 years ago
onLoad(options) {
this.id = options.id;
3 years ago
this.getOrder();
weixin.getOpenidInfo(info => {
that.user_info = info.user_info
that.openid = that.user_info.openid;
}, true)
4 years ago
},
onShow: function() {
4 years ago
},
methods: {
4 years ago
getOrder: function() {
var that = this;
weixin.request({
api: '/api/member/get-order-info',
method: 'GET',
data: {
id: this.id
},
utilSuccess: r => {
this.info = r.data;
var mod = this.statusLabels.filter((p) => {
return p.state == this.info.state;
})[0];
if (mod)
this.info.statusName = mod.txt;
4 years ago
4 years ago
if (r.data.items) {
for (var m of r.data.items) {
3 years ago
m.statusName = that.corderstatusLabels[m.state]
4 years ago
}
}
},
utilFail: r => {
console.log(r);
}
})
}
4 years ago
}
}
</script>
<style lang="scss" scoped>
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
4 years ago
padding-top: 20rpx;
4 years ago
}
4 years ago
.orderBox {
width: 710rpx;
margin: 0 auto 20rpx auto;
padding: 30rpx;
4 years ago
box-sizing: border-box;
background: #fff;
border-radius: 16rpx;
position: relative;
4 years ago
.serviceBtn {
4 years ago
width: 160rpx;
height: 56rpx;
background: #FF578A;
4 years ago
border-radius: 28rpx;
color: #fff;
4 years ago
font-size: 28rpx;
font-weight: 500;
text-align: center;
4 years ago
line-height: 56rpx;
4 years ago
position: absolute;
4 years ago
right: 30rpx;
top: 30rpx;
}
.serviceBtn.disabled {
background: #CCCCCC;
4 years ago
}
4 years ago
.subBtn {
4 years ago
width: 160rpx;
height: 56rpx;
background: #FF578A;
4 years ago
border-radius: 28rpx;
color: #fff;
4 years ago
font-size: 28rpx;
font-weight: 500;
text-align: center;
4 years ago
line-height: 56rpx;
margin: 40rpx auto 0 auto;
4 years ago
}
4 years ago
.seeMap {
4 years ago
position: absolute;
4 years ago
right: 30rpx;
top: 116rpx;
4 years ago
font-size: 28rpx;
font-weight: 400;
4 years ago
.iconfont {
color: #BBBBBB;
margin-left: 10rpx;
}
4 years ago
}
4 years ago
.ticketNum {
font-size: 32rpx;
font-weight: 500;
color: #333333;
margin-top: 24rpx;
text-align: center;
}
.qr_box {
width: 300rpx;
height: 300rpx;
margin: 45rpx auto 0 auto;
image {}
4 years ago
}
4 years ago
.title {
4 years ago
font-size: 32rpx;
font-weight: 500;
4 years ago
color: #333333;
4 years ago
}
4 years ago
.p {
4 years ago
font-size: 28rpx;
font-weight: 400;
color: #999999;
4 years ago
margin-top: 5rpx;
4 years ago
}
4 years ago
.hasTwo {
display: flex;
justify-content: flex-start;
font-size: 28rpx;
color: #333;
margin-top: 30rpx;
.p_left {
margin-right: 30rpx;
color: #999;
min-width: 120rpx;
}
4 years ago
}
4 years ago
.discuss {
display: flex;
justify-content: flex-start;
margin-top: 32rpx;
.dis_l {
font-size: 28rpx;
color: #999;
padding-top: 10rpx;
}
.starBox {
4 years ago
display: flex;
justify-content: flex-start;
margin-left: 32rpx;
4 years ago
image {
display: block;
width: 48rpx;
height: 48rpx;
margin-right: 32rpx;
}
4 years ago
}
4 years ago
.areaOuter {
4 years ago
box-sizing: border-box;
border-radius: 7rpx;
4 years ago
border: 1rpx solid #DEDEDE;
width: 530rpx;
margin-left: 32rpx;
textarea {
height: 150rpx;
font-size: 28rpx;
padding: 20rpx;
box-sizing: border-box;
width: 100%;
box-sizing: border-box;
}
}
4 years ago
}
}
4 years ago
</style>