活动核销

master
lion 3 years ago
parent 980854ee6b
commit 3caaa3ced3

BIN
.DS_Store vendored

Binary file not shown.

@ -4,10 +4,10 @@ export const appConfig = {
//baseUrl: 'http://yunyubang.localhost.com',
baseUrl:'https://yunyubang.ali251.langye.net',// 'https://yunyubang2021.langye.net', //孕育邦
//baseUrl: 'https://yybtest.ali251.langye.net',
// baseUrl: 'https://yybtest.ali251.langye.net',
newBaseUrl: 'https://yunyubang.ali251.langye.net',
//newBaseUrl: 'http://yybtest.ali251.langye.net',
// newBaseUrl: 'http://yybtest.ali251.langye.net',
//baseUrl:'https://yybtest2021.langye.net',//孕育咨询
openidInfoKey: 'openid_info_yunyubang'

@ -23,6 +23,10 @@
</view>
</view>
</view>
</view>
<view>
<image @click="goto(1)" class="careBanner" src="../../static/carecenter.png"></image>
<image @click="goto(2)" class="careBanner" src="../../static/commoncenter.png"></image>
</view>
<view class="careBox">
<view class="careTabs flex_start">
@ -193,7 +197,13 @@
strategies: [], //
}
},
methods: {
methods: {
goto(type){
let url = type==1?"/packages/packageCarecenter/pages/careCenter/careCenter":"/packages/packageCarecenter/pages/commonService/commonCenter?type=maternity";
uni.redirectTo({
url:url
})
},
changeSearchArea(e) {
this.search.areaName = (e === "" ? "全部区域" : e);
if (this.tabIndex === 1) {
@ -428,11 +438,12 @@
justify-content: center;
}
.careBanner {
display: block;
width: 690rpx;
height: 220rpx;
margin: 20rpx auto;
.careBanner {
display: inline-block;
width: 357rpx;
height: 182rpx;
margin: 20rpx auto;
margin-bottom:0
}
.strategyBox {

@ -26,7 +26,7 @@
<view class="infoCol">
<view class="date">
<image mode="heightFix" src="../../static/icon_shijian@2x.png"></image>
{{timeFormat(item.created_at, 'yyyy年mm月dd日')}}
{{$u.timeFormat(item.created_at, 'yyyy年mm月dd日')}}
</view>
<view class="price"><text>¥</text>{{item.total}}</view>
</view>

@ -52,22 +52,40 @@
<view class="activeinfo">
<view class="active">
<u-row gutter="16">
<u-col span="3">
<view>活动时间</view>
<u-col span="4">
<view>
<image mode="heightFix" src="../../static/icon_shijian@2x.png"></image>
开始时间
</view>
</u-col>
<u-col span="8" v-if="info.start_date">
<view>{{info.start_date}} {{info.start_time}}</view>
</u-col>
<u-col span="4">
<view>
<image mode="heightFix" src="../../static/icon_shijian@2x.png"></image>
结束时间
</view>
</u-col>
<u-col span="12" v-if="info.start_date">
<view>{{info.start_date}} {{info.start_time}} ~ {{info.end_date}} {{info.end_time}}</view>
<u-col span="8" v-if="info.start_date">
<view>{{info.end_date}} {{info.end_time}}</view>
</u-col>
<u-col span="3">
活动地点:
<u-col span="4">
<view>
<image mode="heightFix" src="../../static/icon_dizhi.png"></image>
活动地点:
</view>
</u-col>
<u-col span="9" v-if="info.address">
<u-col span="8" v-if="info.address">
{{info.address}}
</u-col>
<u-col span="3">
参与人数:
<u-col span="4">
<view>
<image mode="heightFix" src="../../static/icon_xingming@2x.png"></image>
参与人数:
</view>
</u-col>
<u-col span="9" v-if="info.member_sum">
<u-col span="8" v-if="info.member_sum">
{{info.member_sum}}
</u-col>
</u-row>
@ -1368,8 +1386,13 @@
width: 100%;
box-sizing: border-box;
ul-col:nth-of-type(2n){
color:red
u-col{
image{
width: 26rpx;
height: 26rpx;
display: inline-block;
margin-right: 12rpx;
}
}
}
.details {

@ -8,41 +8,83 @@
</view>
<view class="end-cont" :class="{dis:btnnum == 0}">
<view class="statusBox">
<text v-for="(item,index) in statusLabels" :key="index" @click="changeStatus(item.state)"
<text v-for="(item,index) in statusLabels" :key="index" @click="changeStatus(item.state,item.is_used)"
:class="{cur: item.state == status}">{{item.txt}}</text>
</view>
<view style="height:120rpx;"></view>
<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">
<!-- <view class="orderNo">
<text>订单编号</text><text>{{item.serial}}</text>
</view>
</view> -->
<view class="title">
<view>{{item.order_name || '暂无'}}<!-- <text class="free">免费</text> -->
<view>{{item.active_name || '暂无'}}<!-- <text class="free">免费</text> -->
</view>
<view class="status">{{item.statusName}}</view>
</view>
<view class="infoList">
<view class="infoCol">
<view class="date">
<image mode="heightFix" src="../../static/icon_shijian@2x.png"></image>
{{timeFormat(item.created_at, 'yyyy年mm月dd日')}}
</view>
<view class="price"><text>¥</text>{{item.total}}</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>{{item.start_date}} {{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.start_date">
<view>{{item.end_date}} {{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">
<view class="btn">
<text v-if="item.statusName=='待参加'" @click.stop="showCode(item.apply)"> </text>
<text @click.stop="goDetail(item.id)"> 查看 </text>
<text v-if="item.state=='unpaid'" class="pay" @click.stop="goPay(item.id)"> </text>
</view>
<!-- <text v-if="item.state=='unpaid'" class="pay" @click.stop="goPay(item.id)"> </text> -->
</view>
</view>
</view>
<view v-else>
<view class="info-none"> {{list.length>0?"":"暂无数据"}} </view>
</view>
</view>
</view>
<u-popup class="codepop" v-model="showCodes" mode="center" closeable="true">
<view class="userBox" style="padding:0 120rpx 60rpx 120rpx;">
<view class="userInfoContent" style="padding: 40rpx;font-size: 28rpx;">
<text class="">核销码{{codetext}}</text>
</view>
<view class="qrcode">
<canvas canvas-id='qrcode' style="width: 170px;height:170px;margin: 0 auto;">
</canvas>
</view>
</view>
</u-popup>
<view class="end-cont" :class="{dis:btnnum == 1}">
<view class="statusBox">
<text>待付款</text>
@ -77,7 +119,8 @@
<script>
import {
weixin
} from '../../utils/weixin.js';
} from '../../utils/weixin.js';
import uQRCode from "@/utils/qrcode.js"
//{"0":"","10":"","20":"","100":""}
export default {
data() {
@ -91,10 +134,15 @@
token: '',
page: 1,
list: [],
status: "",
status: "",
is_used:"",
showview:false,
showCodes:false,
codetext:"",
statusLabels: [{
state: "",
txt: "全部"
txt: "全部",
is_used:""
},
// {
// state: "unpaid",
@ -102,10 +150,12 @@
// },
{
state: "ongoing",
txt: "待参加"
txt: "待参加",
is_used:0
}, {
state: "finished",
txt: "已参加"
txt: "已参加",
is_used:1
}],
user_info: {},
openid: ""
@ -117,7 +167,12 @@
this.token = userInfo.access_token;
var that = this;
if (!weixin.isNull(options.status))
this.status = options.status
this.status = options.status
for(var k of this.statusLabels){
if(k.state==options.status){
this.is_used = k.is_used
}
}
weixin.getOpenidInfo(info => {
that.user_info = info.user_info
}, false)
@ -130,12 +185,10 @@
onReachBottom() {
this.getOrderList(this.page + 1)
},
methods: {
timeFormat(time,format){
//this.util.
},
changeStatus(status) {
this.status = status
methods: {
changeStatus(status,used) {
this.status = status
this.is_used = used
this.list = []
this.getOrderList(1)
},
@ -146,8 +199,47 @@
},
goDetail(id) {
uni.navigateTo({
url: "../orderPackageDetail/orderPackageDetail?id=" + id
url: "/pages/active/detail?id=" + id
})
},
showCode(apply){
if(apply.length<1){
return
}
let text = "1234"
for(var k of apply){
text = k.code
}
if(!text){
uni.showModal({
title: '',
content: "暂无核销码",
showCancel: false
});
return
}
this.codetext = text
console.log("text",text)
var id = "qrcode";
// if (qrcode) {
// id = qrcode
// }
this.showCodes = true
uQRCode.make({
canvasId: id,
componentInstance: this,
text: text,
size: 170,
// margin: 10,
backgroundColor: '#ffffff',
foregroundColor: '#000000',
fileType: 'jpg',
errorCorrectLevel: uQRCode.errorCorrectLevel.H,
success: res => {
}
})
},
goPay(id) {
var that = this;
@ -200,7 +292,9 @@
var data = {
page: page,
page_size: 6,
token: userInfo.access_token
token: userInfo.access_token,
myself:1,
is_used:this.is_used,
}
if (this.status != "") {
data = {
@ -210,7 +304,7 @@
}
var that = this;
uni.request({
url: this.baseUrl + '/api/member/get-orders',
url: this.baseUrl + '/api/member/active-list',
method: 'GET',
data: data,
success: r => {
@ -227,13 +321,12 @@
});
return;
}
for (var m of r.data.data) {
var mod = this.statusLabels.filter((p) => {
return p.state == m.state;
})[0];
if (mod)
m.statusName = mod.txt;
if(m.apply){
m.statusName = m.apply[0]['used_time']?'已参加':"待参加"
}
}
this.list = this.list.concat(r.data.data);
this.page = page;

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save