<template>
|
<view class="activity-user-verify" v-if="!loading">
|
<view class="top-status p30">
|
<view class="status-text" v-if="detail.is_verify == 0">
|
<view class="f40 fb"><text class="iconfont icon-daojishi f40 mr10"></text>待核销</view>
|
<view class="f26 gray3 pt10">请核对活动和报名信息后进行核销</view>
|
</view>
|
<view class="status-text" v-else-if="detail.is_verify == 1">
|
<view class="f40 fb">已核销</view>
|
<view class="f26 gray3 pt10">该核销码已核销,无需重复核销</view>
|
</view>
|
<view class="status-text" v-else>
|
<view class="f40 fb">已缺席</view>
|
<view class="f26 gray3 pt10">该核销码已过期,无法核销</view>
|
</view>
|
</view>
|
<view class="verify-section radius24">
|
<view class="bg-white detail-info-box">
|
<view class="activity-image">
|
<image :src="detail.activity.image.file_path" mode="aspectFill"></image>
|
</view>
|
<view class="detail-info p20">
|
<view class="gray3 f30 fb text-ellipsis-2">{{detail.activity.name}}</view>
|
<view class="gray6 f28 pt10">活动开始时间:{{detail.activity.status_text.act_start_time}}</view>
|
<view class="gray6 f28 pt10">活动结束时间:{{detail.activity.status_text.act_end_time}}</view>
|
</view>
|
</view>
|
</view>
|
<!-- 报名信息 -->
|
<view class="verify-section radius24 bg-white f26 p20">
|
<view class="f28 fb">报名信息</view>
|
<view class="d-b-c pt30">
|
<view class="gray6">报名编号</view>
|
<view>{{detail.order_no}}</view>
|
</view>
|
<view class="d-b-c pt30">
|
<view class="gray6">姓名</view>
|
<view>{{detail.user.real_name}}</view>
|
</view>
|
<view class="d-b-c pt30">
|
<view class="gray6">联系电话</view>
|
<view>{{detail.user.mobile}}</view>
|
</view>
|
<view class="d-b-c pt30">
|
<view class="gray6">报名时间</view>
|
<view>{{detail.create_time}}</view>
|
</view>
|
</view>
|
<view class="verify-footer bg-white p-0-30 pt20 pb20" v-if="detail.is_verify == 0">
|
<view @click="onSubmitExtract(detail.order_id)" class="btn-submit">确认核销</view>
|
</view>
|
</view>
|
</template>
|
|
<script>
|
import Popup from '@/components/uni-popup.vue'
|
import utils from '@/common/utils.js'
|
export default {
|
data() {
|
return {
|
loading: true,
|
detail: {},
|
};
|
},
|
components: {},
|
props: ['order_id'],
|
onLoad(e) {
|
},
|
mounted() {
|
/*获取订单详情*/
|
this.getData();
|
},
|
methods: {
|
|
/*获取数据*/
|
getData() {
|
let self = this;
|
uni.showLoading({
|
title: '加载中'
|
});
|
self._get(
|
'branch.activityUser/verify', {
|
order_id: self.order_id
|
},
|
function(res) {
|
self.detail = res.data.detail;
|
uni.hideLoading();
|
self.loading = false;
|
},
|
function(res) {
|
// uni.switchTab({
|
// url:'/pages/index/index'
|
// })
|
uni.navigateBack();
|
}
|
);
|
},
|
|
|
/*核销*/
|
onSubmitExtract(order_id) {
|
let self = this;
|
wx.showModal({
|
title: "提示",
|
content: "确定要核销吗?",
|
success: function(o) {
|
o.confirm && self._post(
|
'branch.activityUser/verify', {
|
order_id: order_id
|
},
|
function(res) {
|
uni.showToast({
|
title: res.msg,
|
duration: 2000,
|
icon: 'success',
|
});
|
setTimeout(function () {
|
self.getData();
|
}, 2000);
|
}
|
);
|
}
|
});
|
},
|
}
|
};
|
</script>
|
|
<style lang="scss" scoped>
|
.activity-user-verify {
|
.top-status {
|
.status-text {
|
.iconfont {
|
color: #333333;
|
}
|
}
|
}
|
|
.verify-section {
|
margin: 0 30rpx;
|
overflow: hidden;
|
|
+ .verify-section {
|
margin-top: 30rpx;
|
}
|
}
|
|
.detail-info-box {
|
|
image {
|
width: 690rpx;
|
height: 322rpx;
|
}
|
|
.detail-info {
|
|
}
|
}
|
|
.verify-footer {
|
background: #ffffff;
|
width: 750rpx;
|
height: 126rpx;
|
height: calc(126rpx + constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
|
height: calc(126rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
position: fixed;
|
left: 0;
|
bottom: 0;
|
border-top: 1rpx solid #eeeeee;
|
box-sizing: border-box;
|
}
|
.verify-footer .btn-submit {
|
font-size: 28rpx;
|
color: #ffffff;
|
@include background_color('background_color');
|
width: 690rpx;
|
height: 90rpx;
|
border-radius: 200rpx;
|
text-align: center;
|
line-height: 90rpx;
|
font-weight: bold;
|
}
|
}
|
</style>
|