lion 2 years ago
parent b946834611
commit ffd18fbec8

@ -7,9 +7,12 @@
</view>
</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)"
:class="{cur: item.state == status}">{{item.txt}}</text>
<view class="statusBox">
<block v-for="(item,index) in statusLabels" :key="index">
<text v-if="!item.showStatus" @click="changeStatus(item.state)"
:class="{cur: item.state == status}">{{item.txt}}</text>
</block>
</view>
<view style="height:120rpx;"></view>
<view v-if="list.length>0">
@ -26,7 +29,7 @@
<view class="infoCol">
<view class="date">
<image mode="heightFix" src="../../static/icon_shijian@2x.png"></image>
{{$u.timeFormat(item.created_at, 'yyyy年mm月dd日')}}
{{$u.timeFormat(new Date(item.created_at.replace(/-/g,'/')), 'yyyy年mm月dd日')}}
</view>
<view class="price"><text>¥</text>{{item.total}}</view>
</view>
@ -104,6 +107,10 @@
}, {
state: "finished",
txt: "已完成"
}, {
state: "canceled",
txt: "已取消",
showStatus:true
}],
user_info: {},
openid: ""
@ -229,7 +236,8 @@
for (var m of r.data.data) {
var mod = this.statusLabels.filter((p) => {
return p.state == m.state;
})[0];
})[0];
console.log("mod",mod)
if (mod)
m.statusName = mod.txt;
}

@ -7,7 +7,7 @@
<view class="orderBox">
<view class="p">
下单日期<text class="font_red">{{$u.timeFormat(info.created_at, 'yyyy年mm月dd日 hh:MM')}}</text>
下单日期<text class="font_red">{{$u.timeFormat(new Date(info.created_at.replace(/-/g,'/')), 'yyyy年mm月dd日 hh:MM')}}</text>
</view>
<view class="p">
订单编号<text class="font_red">{{info.serial}}</text>
@ -110,6 +110,9 @@
}, {
state: "finished",
txt: "已完成"
},{
state: "canceled",
txt: "已取消"
}],
corderstatusLabels: {
@ -230,20 +233,21 @@
data: {
id: id
},
utilSuccess: res => {
console.log(res)
if (res.status == 1) {
uni.showModal({
title: "订单已经删除!",
success: (res) => {
if (res.confirm) {
uni.navigateTo({
url: "../myOrder/myOrder"
})
}
}
})
}
utilSuccess: r => {
console.log(r)
uni.showModal({
title: "订单已取消!",
success: (re) => {
if (re.confirm) {
uni.navigateTo({
url: "../myOrder/myOrder"
})
}
}
})
// if (res.status == 1) {
// }
},
utilFail: res => {
uni.showToast({

@ -53,7 +53,7 @@
</view>
<view class="subInfo">{{item.address}}</view>
<view class="subInfo">已报名数:{{item.start_member_sum+item.total}}</view>
<view class="menu">{{$u.timeFormat(item.start_date+' 00:00:00', 'yyyy年mm月dd日')}}{{$u.timeFormat(item.end_date+' 00:00:00', 'yyyy年mm月dd日')}}</view>
<view class="menu">{{$u.timeFormat(new Date(item.start_date.replace(/-/g,'/')), 'yyyy年mm月dd日')}}{{$u.timeFormat(new Date(item.end_date.replace(/-/g,'/')), 'yyyy年mm月dd日')}}</view>
</view>
</view>
</block>
@ -172,7 +172,9 @@
data: {
page: page,
page_size: 6,
keyword: that.keyword,
keyword: that.keyword,
sort_name:'sort',
sort_type:"ASC"
},
utilSuccess: function(r) {
var res = r.data;

@ -83,7 +83,7 @@
</view>
</u-col>
<u-col span="8" v-if="info.start_date">
<view>{{$u.timeFormat(info.start_date+' 00:00:00', 'yyyy年mm月dd日')}} {{info.start_time}}</view>
<view>{{$u.timeFormat(new Date(info.start_date.replace(/-/g,'/')), 'yyyy年mm月dd日')}} {{info.start_time}}</view>
</u-col>
<u-col span="4">
<view>
@ -92,7 +92,7 @@
</view>
</u-col>
<u-col span="8" v-if="info.start_date">
<view>{{$u.timeFormat(info.end_date+' 00:00:00', 'yyyy年mm月dd日')}} {{info.end_time}}</view>
<view>{{$u.timeFormat(new Date(info.end_date), 'yyyy年mm月dd日')}} {{info.end_time}}</view>
</u-col>
<u-col span="4">
<view>
@ -133,7 +133,7 @@
</view>
</u-col>
<u-col span="8" v-if="info.apply_start">
<view>{{$u.timeFormat(info.apply_start, 'yyyy年mm月dd日 hh:MM:ss')}}</view>
<view>{{$u.timeFormat(new Date(info.apply_start.replace(/-/g,'/')), 'yyyy年mm月dd日 hh:MM:ss')}}</view>
</u-col>
<u-col span="4">
<view>
@ -142,7 +142,7 @@
</view>
</u-col>
<u-col span="8" v-if="info.apply_end">
<view>{{$u.timeFormat(info.apply_end, 'yyyy年mm月dd日 hh:MM:ss')}}</view>
<view>{{$u.timeFormat(new Date(info.apply_end.replace(/-/g,'/')), 'yyyy年mm月dd日 hh:MM:ss')}}</view>
</u-col>
</u-row>
</view>
@ -657,7 +657,7 @@
let packagesFirst = this.info
ctx.fillText("" + this.info.active_name, 40, (h + 50) * 0.5 + 20 + 30);
ctx.fillText("报名时间:" + this.info.apply_start, 40, (h + 50) * 0.5 + 50 + 50);
ctx.fillText("报名开始:" + this.info.apply_start, 40, (h + 50) * 0.5 + 50 + 50);
ctx.fillText("报名截止:" + this.info.apply_end, 40, (h + 50) * 0.5 + 60 + 60);
let user_info = uni.getStorageSync("user_info_yunyubang");
@ -864,19 +864,27 @@
api: "/api/member/active-apply",
data: this.form,
utilSuccess: res => {
uni.showToast({
icon:'success',
title:res.msg,
duration:2000
})
console.log("res",res)
setTimeout(function(){
uni.showToast({
icon:'success',
title:res.msg,
duration:3000
})
},500)
this.showPop = false
},
utilFail: err => {
console.log(err,'err');
uni.showToast({
icon:'none',
title:err
})
setTimeout(function(){
uni.showToast({
icon:'none',
title:err,
duration:3000
})
},500)
}
})
},

@ -33,7 +33,7 @@
</view>
</u-col>
<u-col span="8" v-if="item.start_date">
<view>{{$u.timeFormat(item.start_date+' 00:00:00', 'yyyy年mm月dd日')}} {{item.start_time}}</view>
<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">
@ -42,7 +42,7 @@
</view>
</u-col>
<u-col span="8" v-if="item.end_date">
<view>{{$u.timeFormat(item.end_date+' 00:00:00', 'yyyy年mm月dd日')}} {{item.end_time}}</view>
<view>{{$u.timeFormat(new Date(item.end_date), 'yyyy年mm月dd日')}} {{item.end_time}}</view>
</u-col>
<u-col span="4">
<view class="date">

@ -132,10 +132,14 @@ const request = options => {
// 拼时间戳
options.data.ts = new Date().getTime();
}
uni.request({
...options,
success: function(res) {
success: function(res) {
// if(!options.hideload){
// console.log("options.hideload")
// uni.hideLoading();
// }
uni.hideLoading();
if (res.statusCode != 200) {
if (options.utilFail != undefined) {

Loading…
Cancel
Save