刘翔宇-旅管家 3 years ago
parent 4939986be7
commit 5515c7290b

@ -10,6 +10,7 @@
var that = this; var that = this;
util.getOpenidInfo(function(res) { util.getOpenidInfo(function(res) {
console.log(res); console.log(res);
}, true); }, true);
const updateManager = uni.getUpdateManager(); const updateManager = uni.getUpdateManager();
updateManager.onCheckForUpdate(function(res) { updateManager.onCheckForUpdate(function(res) {

@ -1,4 +1,4 @@
<template> git<template>
<view> <view>
<view class="content"> <view class="content">
<view class="box-card"> <view class="box-card">
@ -15,7 +15,8 @@
<view class="activityBox-row"> <view class="activityBox-row">
<text class="icon-shijian iconfont"></text> <text class="icon-shijian iconfont"></text>
<text>活动时间{{timeFormat(numberlist.start_time,"yyyy年MM月DD日")}} {{getHm(numberlist.start_time)}}-{{getHm(numberlist.end_time)}}</text> <text>活动时间{{timeFormat(numberlist.start_time,"yyyy年MM月DD日")}}
{{getHm(numberlist.start_time)}}-{{getHm(numberlist.end_time)}}</text>
</view> </view>
<!-- <view class="activityBox-row"> <!-- <view class="activityBox-row">
@ -225,6 +226,17 @@
</view> </view>
</u-popup> </u-popup>
<u-popup :show="showAuthorization" closeable mode="bottom" @close="closePhone" :round="10">
<view class="box">
<view class="box-title" style="text-align: center;padding: 20rpx 0;font-size: 32rpx;">
请授权您的手机号
</view>
<view class="box-content" style="padding: 20px;">
<u-button type="primary" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
</u-button>
</view>
</view>
</u-popup>
<u-popup :show="successshow" customStyle="width:600rpx;height:300rpx;text-align:center" :round="10" <u-popup :show="successshow" customStyle="width:600rpx;height:300rpx;text-align:center" :round="10"
mode="center" width="600rpx" height="150rpx"> mode="center" width="600rpx" height="150rpx">
@ -246,6 +258,7 @@
data() { data() {
return { return {
successshow: false, successshow: false,
showAuthorization: false,
time: 3, time: 3,
showAdd: false, showAdd: false,
isEdit: false, isEdit: false,
@ -354,11 +367,21 @@
} }
}) })
//
that.util.getOpenidInfo(function(res) {
//
that.util.getUserInfo(function(r) { that.util.getUserInfo(function(r) {
//
if (that.util.isNull(r.mobile)) {
that.showAuthorization = true;
} else {
that.showAuthorization = false;
that.form.mobile = r.mobile; that.form.mobile = r.mobile;
}
}, true); }, true);
that.loadCommonUser() that.loadCommonUser()
}, true);
}, },
onHide() { onHide() {
clearInterval(this.t) clearInterval(this.t)
@ -370,6 +393,26 @@
clearTimeout(this.timer) clearTimeout(this.timer)
}, },
methods: { methods: {
closePhone() {
this.showAuthorization = false
},
getPhoneNumber(e) {
var that = this;
this.util.request({
api: '/api/mobile/user/mobile',
data: {
code: e.detail.code
},
utilSuccess: function(res) {
that.form.mobile = res.mobile;
that.showAuthorization = false
},
utilFail: function(res) {
}
})
},
getHm(val) { getHm(val) {
if (val) { if (val) {
return this.$moment(val).format("HH:mm") return this.$moment(val).format("HH:mm")

@ -165,7 +165,15 @@
}, },
tobook(type) { tobook(type) {
// this.showNumbers = true // this.showNumbers = true
this.teamType = type this.teamType = type;
if(this.util.isNull(this.activity_number_id)){
uni.showToast({
icon: "none",
title: "请选择活动场次"
})
return false;
}
uni.navigateTo({ uni.navigateTo({
url: "book?type=" + this.teamType + "&activity_id=" + this.id + "&activity_number_id="+this.activity_number_id url: "book?type=" + this.teamType + "&activity_id=" + this.id + "&activity_number_id="+this.activity_number_id
}) })

@ -23,8 +23,9 @@
<view class="orderBoxInfoRow flex-row" style="margin-top: 20rpx;"> <view class="orderBoxInfoRow flex-row" style="margin-top: 20rpx;">
<text class="iconfont icon-youkexuzhi"></text> <text class="iconfont icon-youkexuzhi"></text>
<text class="orderBoxInfoRowTxt"> <text class="orderBoxInfoRowTxt">
订单信息{{timeFormat(item.activity.created_at, 'MM月DD日')}}{{getHm(item.activity.start_time)}}-{{getHm(item.activity.end_time)}}{{item.total}}位观众</text>
订单信息{{timeFormat(item.start_time, 'MM月DD日')}}{{getHm(item.start_time)}}-{{getHm(item.end_time)}}{{item.total}}位观众
</text>
</view> </view>
<view class="orderBoxInfoRow flex-row" v-if="item.type==1" style="margin-top: 20rpx;"> <view class="orderBoxInfoRow flex-row" v-if="item.type==1" style="margin-top: 20rpx;">
<text class="iconfont icon-iconfontgerenzhongxin"></text> <text class="iconfont icon-iconfontgerenzhongxin"></text>
@ -130,6 +131,10 @@
}, },
utilSuccess: function(res) { utilSuccess: function(res) {
that.listOrder = res; that.listOrder = res;
for(var m of that.listOrder){
m.start_time=(m.number[0]!=null?m.number[0].start_time:'')
m.end_time=(m.number[0]!=null?m.number[0].end_time:'')
}
this.isloading = false; this.isloading = false;
}, },
utilFail: function(res) { utilFail: function(res) {
@ -146,7 +151,10 @@
} else return ""; } else return "";
}, },
timeFormat(val, format) { timeFormat(val, format) {
console.log(val)
if (val) {
return this.$moment(val).format(format) return this.$moment(val).format(format)
}else return "";
} }
} }
} }

@ -185,8 +185,8 @@
utilSuccess: function(res) { utilSuccess: function(res) {
that.info = res; that.info = res;
that.detailsinfo = res.details; that.detailsinfo = res.details;
that.tstart_time=that.info.activity.start_time; that.tstart_time=that.info.number[0]==null?'':that.info.number[0].start_time;
that.tend_time=that.info.activity.end_time; that.tend_time=that.info.number[0]==null?'':that.info.number[0].end_time;
if (res.status != 1) { if (res.status != 1) {
clearInterval(that.timers) clearInterval(that.timers)
} }

@ -306,6 +306,22 @@
</view> </view>
</u-popup> </u-popup>
<u-popup :show="showAuthorization" closeable mode="bottom" @close="closePhone" :round="10">
<view class="box">
<view class="box-title" style="text-align: center;padding: 20rpx 0;font-size: 32rpx;">
请授权您的手机号
</view>
<view class="box-content" style="padding: 20px;">
<u-button type="primary" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
</u-button>
</view>
</view>
</u-popup>
<u-calendar ref="calendar" :show-confirm="false" :show="showCalendar" :minDate="minDate" :maxDate="maxDate" <u-calendar ref="calendar" :show-confirm="false" :show="showCalendar" :minDate="minDate" :maxDate="maxDate"
color="#EF9525" round="20" defaultDate="2022-02-15" @confirm="handleSelectDate" @close="closecalendar"> color="#EF9525" round="20" defaultDate="2022-02-15" @confirm="handleSelectDate" @close="closecalendar">
</u-calendar> </u-calendar>
@ -322,6 +338,7 @@
month = month < 10 ? `0${month}` : month month = month < 10 ? `0${month}` : month
const date = d.getDate() const date = d.getDate()
return { return {
showAuthorization: false,
successshow: false, successshow: false,
time: 3, time: 3,
showInfo: false, showInfo: false,
@ -464,12 +481,25 @@
//this.maxCount = (type == 'user' ? 5 : 50); //this.maxCount = (type == 'user' ? 5 : 50);
var that = this; var that = this;
//
that.util.getOpenidInfo(function(res) {
//
that.util.getUserInfo(function(r) { that.util.getUserInfo(function(r) {
that.user = r; that.user = r;
//
if (that.util.isNull(r.mobile)) {
that.showAuthorization = true;
} else {
that.showAuthorization = false;
that.form.mobile = r.mobile; that.form.mobile = r.mobile;
}
}, true);
that.loadCommonUser()
}, true); }, true);
that.loadCommonUser();
that.maxheight = wx.getSystemInfoSync().windowHeight * 0.6 + "px" that.maxheight = wx.getSystemInfoSync().windowHeight * 0.6 + "px"
that.scrollheight = wx.getSystemInfoSync().windowHeight * 0.6 * 0.7 + "px" that.scrollheight = wx.getSystemInfoSync().windowHeight * 0.6 * 0.7 + "px"
}, },
@ -483,6 +513,25 @@
clearTimeout(this.timer) clearTimeout(this.timer)
}, },
methods: { methods: {
closePhone() {
this.showAuthorization = false
},
getPhoneNumber(e) {
var that = this;
this.util.request({
api: '/api/mobile/user/mobile',
data: {
code: e.detail.code
},
utilSuccess: function(res) {
that.form.mobile = res.mobile;
that.showAuthorization = false
},
utilFail: function(res) {
}
})
},
confirmCards(e) { confirmCards(e) {
this.card_type_names = e.value[0].label this.card_type_names = e.value[0].label
this.form.card_type = e.value[0].value this.form.card_type = e.value[0].value

Loading…
Cancel
Save