|
|
|
@ -0,0 +1,420 @@
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
|
|
|
<view class="content">
|
|
|
|
|
|
|
|
<view class="end-cont" :class="{dis:btnnum == 0}">
|
|
|
|
|
|
|
|
<view v-if="list.length>0">
|
|
|
|
|
|
|
|
<view class="orderCol" v-for="(item, index) in list" :key="item.id" @click="goDetail(item.id)">
|
|
|
|
|
|
|
|
<!-- <view class="orderNo">
|
|
|
|
|
|
|
|
<text>订单编号:</text><text>{{item.serial}}</text>
|
|
|
|
|
|
|
|
</view> -->
|
|
|
|
|
|
|
|
<view class="title">
|
|
|
|
|
|
|
|
<view>{{item.active_name || '暂无'}}<!-- <text class="free">免费</text> -->
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<view class="status">
|
|
|
|
|
|
|
|
{{item.statusName}}
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<view class="infoList">
|
|
|
|
|
|
|
|
<u-row gutter="16" class="infoCol">
|
|
|
|
|
|
|
|
<u-col span="4">
|
|
|
|
|
|
|
|
<view class="date">
|
|
|
|
|
|
|
|
<image mode="heightFix" src="../../static/icon_shijian@2x.png"></image>
|
|
|
|
|
|
|
|
开始时间:
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
</u-col>
|
|
|
|
|
|
|
|
<u-col span="8" v-if="item.start_date">
|
|
|
|
|
|
|
|
<view>{{$u.timeFormat(new Date(item.start_date.replace(/-/g,'/')), 'yyyy年mm月dd日')}} {{item.start_time}}</view>
|
|
|
|
|
|
|
|
</u-col>
|
|
|
|
|
|
|
|
<u-col span="4">
|
|
|
|
|
|
|
|
<view class="date">
|
|
|
|
|
|
|
|
<image mode="heightFix" src="../../static/icon_shijian@2x.png"></image>
|
|
|
|
|
|
|
|
结束时间:
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
</u-col>
|
|
|
|
|
|
|
|
<u-col span="8" v-if="item.end_date">
|
|
|
|
|
|
|
|
<view>{{$u.timeFormat(new Date(item.end_date), 'yyyy年mm月dd日')}} {{item.end_time}}</view>
|
|
|
|
|
|
|
|
</u-col>
|
|
|
|
|
|
|
|
<u-col span="4">
|
|
|
|
|
|
|
|
<view class="date">
|
|
|
|
|
|
|
|
<image mode="heightFix" src="../../static/icon_dizhi.png"></image>
|
|
|
|
|
|
|
|
活动地点:
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
</u-col>
|
|
|
|
|
|
|
|
<u-col span="8" v-if="item.address">
|
|
|
|
|
|
|
|
{{item.address}}
|
|
|
|
|
|
|
|
</u-col>
|
|
|
|
|
|
|
|
</u-row>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!--<view class="infoCol"><view class="address"><image mode="heightFix" src="../../static/icon_dizhi.png"></image>苏州·园区星海街188号苏州万怡大酒店南栋大酒店南栋</view></view>-->
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<view class="btn">
|
|
|
|
|
|
|
|
<text v-if="statusNames==='待参加'" @click.stop="cancelCode(item.code)"> 核销 </text>
|
|
|
|
|
|
|
|
<text @click.stop="goDetail(item.id)"> 查看 </text>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
|
|
import {
|
|
|
|
|
|
|
|
weixin
|
|
|
|
|
|
|
|
} from '../../utils/weixin.js';
|
|
|
|
|
|
|
|
//{"0":"待确认","10":"待支付","20":"进行中","100":"已完成"}
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
|
|
|
data() {
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
info: {
|
|
|
|
|
|
|
|
token: ''
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
btnnum: 0,
|
|
|
|
|
|
|
|
active_id:'',
|
|
|
|
|
|
|
|
token: '',
|
|
|
|
|
|
|
|
page: 1,
|
|
|
|
|
|
|
|
list: [],
|
|
|
|
|
|
|
|
status: "",
|
|
|
|
|
|
|
|
statusNames:[{
|
|
|
|
|
|
|
|
id:0,
|
|
|
|
|
|
|
|
name:'申请取消'
|
|
|
|
|
|
|
|
},{
|
|
|
|
|
|
|
|
id:1,
|
|
|
|
|
|
|
|
name:'待参加'
|
|
|
|
|
|
|
|
},{
|
|
|
|
|
|
|
|
id:2,
|
|
|
|
|
|
|
|
name:'已取消'
|
|
|
|
|
|
|
|
},{
|
|
|
|
|
|
|
|
id:3,
|
|
|
|
|
|
|
|
name:'已参加'
|
|
|
|
|
|
|
|
}],
|
|
|
|
|
|
|
|
user_info: {},
|
|
|
|
|
|
|
|
openid: ""
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
onLoad(options) {
|
|
|
|
|
|
|
|
this.active_id = options.id
|
|
|
|
|
|
|
|
const userInfo = uni.getStorageSync('userInfo')
|
|
|
|
|
|
|
|
this.info.phone = userInfo.user_info.phone
|
|
|
|
|
|
|
|
this.token = userInfo.access_token;
|
|
|
|
|
|
|
|
var that = this;
|
|
|
|
|
|
|
|
weixin.getOpenidInfo(info => {
|
|
|
|
|
|
|
|
that.user_info = info.user_info
|
|
|
|
|
|
|
|
}, false)
|
|
|
|
|
|
|
|
this.openid = that.user_info.openid;
|
|
|
|
|
|
|
|
this.list = []
|
|
|
|
|
|
|
|
this.getOrderList(1)
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
onShow() {
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
goDetail(id) {
|
|
|
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
|
|
|
url: "/pages/active/detail"
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
cancelCode(code){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
uni.request({
|
|
|
|
|
|
|
|
url: this.baseUrl + '/api/member/code_use',
|
|
|
|
|
|
|
|
method: 'GET',
|
|
|
|
|
|
|
|
data: {
|
|
|
|
|
|
|
|
code:code
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
success: res => {
|
|
|
|
|
|
|
|
console.log("res",res)
|
|
|
|
|
|
|
|
if (res.data.errcode) {
|
|
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
|
|
icon: "none",
|
|
|
|
|
|
|
|
title: res.data.errmsg,
|
|
|
|
|
|
|
|
duration: 4000,
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
|
|
icon: "none",
|
|
|
|
|
|
|
|
title: res.data.errmsg || '核销成功',
|
|
|
|
|
|
|
|
duration: 2000
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
setTimeout(function(){
|
|
|
|
|
|
|
|
uni.switchTab({
|
|
|
|
|
|
|
|
url:'/pages/home/home'
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
},2000)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
getOrderList(page) {
|
|
|
|
|
|
|
|
const userInfo = uni.getStorageSync('userInfo')
|
|
|
|
|
|
|
|
uni.showLoading({
|
|
|
|
|
|
|
|
title: '加载中',
|
|
|
|
|
|
|
|
mask: true
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
var data = {
|
|
|
|
|
|
|
|
page: page,
|
|
|
|
|
|
|
|
page_size: 99,
|
|
|
|
|
|
|
|
token: userInfo.access_token,
|
|
|
|
|
|
|
|
myself:1,
|
|
|
|
|
|
|
|
id:this.active_id
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
var that = this;
|
|
|
|
|
|
|
|
uni.request({
|
|
|
|
|
|
|
|
url: this.baseUrl + '/api/member/active-list',
|
|
|
|
|
|
|
|
method: 'GET',
|
|
|
|
|
|
|
|
data: data,
|
|
|
|
|
|
|
|
success: r => {
|
|
|
|
|
|
|
|
setTimeout(function() {
|
|
|
|
|
|
|
|
uni.hideLoading();
|
|
|
|
|
|
|
|
}, 100);
|
|
|
|
|
|
|
|
if(r.data.data.length==0){
|
|
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
|
|
title:'您还未报名该活动',
|
|
|
|
|
|
|
|
icon:'none',
|
|
|
|
|
|
|
|
duration:2000
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
setTimeout(function(){
|
|
|
|
|
|
|
|
uni.switchTab({
|
|
|
|
|
|
|
|
url:'/pages/home/home'
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
},2000)
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
for (var m of r.data.data) {
|
|
|
|
|
|
|
|
for(var s of that.statusNames){
|
|
|
|
|
|
|
|
if(m['state']==s.id){
|
|
|
|
|
|
|
|
m.statusName = s.name
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
this.list = r.data.data;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
|
|
|
.content {
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.info-none {
|
|
|
|
|
|
|
|
padding: 40rpx;
|
|
|
|
|
|
|
|
color: #6E6E6E;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.end-title {
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
height: 88rpx;
|
|
|
|
|
|
|
|
background: #FFFFFF;
|
|
|
|
|
|
|
|
box-shadow: 0px 2px 12px 0px #DEE4E7;
|
|
|
|
|
|
|
|
line-height: 88rpx;
|
|
|
|
|
|
|
|
font-size: 32rpx;
|
|
|
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
|
|
|
color: #333;
|
|
|
|
|
|
|
|
position: fixed;
|
|
|
|
|
|
|
|
top: 0;
|
|
|
|
|
|
|
|
left: 0;
|
|
|
|
|
|
|
|
z-index: 999;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.end-title view {
|
|
|
|
|
|
|
|
flex-grow: 1;
|
|
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.line {
|
|
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
|
|
width: 128rpx;
|
|
|
|
|
|
|
|
height: 8rpx;
|
|
|
|
|
|
|
|
background: #FF578A;
|
|
|
|
|
|
|
|
border-radius: 4rpx;
|
|
|
|
|
|
|
|
bottom: 0;
|
|
|
|
|
|
|
|
left: 50%;
|
|
|
|
|
|
|
|
margin-left: -64rpx;
|
|
|
|
|
|
|
|
display: none;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.end-cont {
|
|
|
|
|
|
|
|
display: none;
|
|
|
|
|
|
|
|
// padding-top:88rpx;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.orderNo {
|
|
|
|
|
|
|
|
padding: 20rpx 0rpx;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.btna {
|
|
|
|
|
|
|
|
color: #FF578A;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.btna .line {
|
|
|
|
|
|
|
|
display: block !important;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.dis {
|
|
|
|
|
|
|
|
display: block;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.orderCol {
|
|
|
|
|
|
|
|
background: #fff;
|
|
|
|
|
|
|
|
border-radius: 16rpx;
|
|
|
|
|
|
|
|
width: 710rpx;
|
|
|
|
|
|
|
|
margin: 20rpx auto 0 auto;
|
|
|
|
|
|
|
|
padding: 0 30rpx;
|
|
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.title {
|
|
|
|
|
|
|
|
padding: 20rpx 0;
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
|
|
align-content: center;
|
|
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
font-size: 32rpx;
|
|
|
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
|
|
|
color: #333;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.free {
|
|
|
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
|
|
width: 58rpx;
|
|
|
|
|
|
|
|
height: 32rpx;
|
|
|
|
|
|
|
|
background: #FF753E;
|
|
|
|
|
|
|
|
border-radius: 6rpx;
|
|
|
|
|
|
|
|
font-size: 20rpx;
|
|
|
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
|
|
|
color: #FFFFFF;
|
|
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
|
|
line-height: 32rpx;
|
|
|
|
|
|
|
|
margin-left: 10rpx;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.status {
|
|
|
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
|
|
|
color: #666666;
|
|
|
|
|
|
|
|
width: 160rpx;
|
|
|
|
|
|
|
|
text-align: right;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.btn {
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
justify-content: flex-end;
|
|
|
|
|
|
|
|
padding: 30rpx 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
text {
|
|
|
|
|
|
|
|
display: block;
|
|
|
|
|
|
|
|
width: 160rpx;
|
|
|
|
|
|
|
|
height: 64rpx;
|
|
|
|
|
|
|
|
border-radius: 8rpx;
|
|
|
|
|
|
|
|
border: 2rpx solid #DEDEDE;
|
|
|
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
|
|
|
color: #333333;
|
|
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
|
|
line-height: 64rpx;
|
|
|
|
|
|
|
|
margin-left: 20rpx;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
text.pay {
|
|
|
|
|
|
|
|
border: 2rpx solid #FF578A;
|
|
|
|
|
|
|
|
color: #FF578A;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.infoList {
|
|
|
|
|
|
|
|
.infoCol {
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
|
|
color: #666;
|
|
|
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
|
|
|
line-height: 1.8;
|
|
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
align-content: center;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.date image {
|
|
|
|
|
|
|
|
width: 26rpx;
|
|
|
|
|
|
|
|
height: 26rpx;
|
|
|
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
|
|
margin-right: 12rpx;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.bulid {
|
|
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.bulid image {
|
|
|
|
|
|
|
|
width: 25rpx;
|
|
|
|
|
|
|
|
height: 26rpx;
|
|
|
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
|
|
margin-right: 12rpx;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.address {
|
|
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.address image {
|
|
|
|
|
|
|
|
width: 24rpx;
|
|
|
|
|
|
|
|
height: 26rpx;
|
|
|
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
|
|
margin-right: 12rpx;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.price {
|
|
|
|
|
|
|
|
font-size: 36rpx;
|
|
|
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
|
|
|
color: #FF578A;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
text {
|
|
|
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
|
|
|
margin-right: 5rpx;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.statusBox {
|
|
|
|
|
|
|
|
width: 750rpx;
|
|
|
|
|
|
|
|
margin: 2rpx auto;
|
|
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
|
|
height: 120rpx;
|
|
|
|
|
|
|
|
background: #fff;
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
padding: 0 30rpx;
|
|
|
|
|
|
|
|
justify-content: space-around;
|
|
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
align-content: center;
|
|
|
|
|
|
|
|
color: #666;
|
|
|
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
|
|
|
position: fixed;
|
|
|
|
|
|
|
|
left: 0;
|
|
|
|
|
|
|
|
top: -1rpx;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
text {
|
|
|
|
|
|
|
|
display: block;
|
|
|
|
|
|
|
|
width: 156rpx;
|
|
|
|
|
|
|
|
height: 64rpx;
|
|
|
|
|
|
|
|
background: #F0F0F0;
|
|
|
|
|
|
|
|
border-radius: 32rpx;
|
|
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
|
|
line-height: 64rpx;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.cur {
|
|
|
|
|
|
|
|
background: #FF578A;
|
|
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|