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

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

@ -1,4 +1,4 @@
<template>
git<template>
<view>
<view class="content">
<view class="box-card">
@ -15,7 +15,8 @@
<view class="activityBox-row">
<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 class="activityBox-row">
@ -225,6 +226,17 @@
</view>
</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"
mode="center" width="600rpx" height="150rpx">
@ -246,13 +258,14 @@
data() {
return {
successshow: false,
showAuthorization: false,
time: 3,
showAdd: false,
isEdit: false,
isEditIndex: 0,
showInfo: false,
list: {},
numberlist:{},
list: {},
numberlist: {},
common_user: [],
form: {
unit: "",
@ -332,19 +345,19 @@
onLoad(options) {
this.type = options.type;
this.form.type = (options.type == 'user' ? 2 : 1);
this.form.activity_id = parseInt(options.activity_id);
this.form.activity_id = parseInt(options.activity_id);
this.form.activity_number_id = parseInt(options.activity_number_id);
var that = this;
wx.getStorage({
key: 'activityinfo',
success(res) {
that.list = res.data;
console.log(that.list)
for(var m of that.list.numbers){
if(that.form.activity_number_id==m.id){
that.numberlist = m
}
}
that.list = res.data;
console.log(that.list)
for (var m of that.list.numbers) {
if (that.form.activity_number_id == m.id) {
that.numberlist = m
}
}
console.log(that.numberlist)
if (that.form.type == 2) {
that.form.total = 1
@ -354,11 +367,21 @@
}
})
//
that.util.getOpenidInfo(function(res) {
//
that.util.getUserInfo(function(r) {
//
if (that.util.isNull(r.mobile)) {
that.showAuthorization = true;
} else {
that.showAuthorization = false;
that.form.mobile = r.mobile;
}
}, true);
that.loadCommonUser()
that.util.getUserInfo(function(r) {
that.form.mobile = r.mobile;
}, true);
that.loadCommonUser()
},
onHide() {
clearInterval(this.t)
@ -370,6 +393,26 @@
clearTimeout(this.timer)
},
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) {
if (val) {
return this.$moment(val).format("HH:mm")
@ -816,4 +859,4 @@
margin-bottom: 10rpx;
margin-right: 10rpx
}
</style>
</style>

@ -165,7 +165,15 @@
},
tobook(type) {
// 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({
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;">
<text class="iconfont icon-youkexuzhi"></text>
<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 class="orderBoxInfoRow flex-row" v-if="item.type==1" style="margin-top: 20rpx;">
<text class="iconfont icon-iconfontgerenzhongxin"></text>
@ -129,7 +130,11 @@
status: this.list[this.current].idx
},
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;
},
utilFail: function(res) {
@ -145,8 +150,11 @@
return this.$moment(val).format("HH:mm")
} else return "";
},
timeFormat(val, format) {
return this.$moment(val).format(format)
timeFormat(val, format) {
console.log(val)
if (val) {
return this.$moment(val).format(format)
}else return "";
}
}
}

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

@ -304,7 +304,23 @@
</view>
<view class="pinkBtn" @click="goHome"></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"
color="#EF9525" round="20" defaultDate="2022-02-15" @confirm="handleSelectDate" @close="closecalendar">
@ -322,6 +338,7 @@
month = month < 10 ? `0${month}` : month
const date = d.getDate()
return {
showAuthorization: false,
successshow: false,
time: 3,
showInfo: false,
@ -464,12 +481,25 @@
//this.maxCount = (type == 'user' ? 5 : 50);
var that = this;
that.util.getUserInfo(function(r) {
that.user = r;
that.form.mobile = r.mobile;
//
that.util.getOpenidInfo(function(res) {
//
that.util.getUserInfo(function(r) {
that.user = r;
//
if (that.util.isNull(r.mobile)) {
that.showAuthorization = true;
} else {
that.showAuthorization = false;
that.form.mobile = r.mobile;
}
}, true);
that.loadCommonUser()
}, true);
that.loadCommonUser();
that.maxheight = wx.getSystemInfoSync().windowHeight * 0.6 + "px"
that.scrollheight = wx.getSystemInfoSync().windowHeight * 0.6 * 0.7 + "px"
},
@ -482,7 +512,26 @@
clearInterval(this.t)
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) {
this.card_type_names = e.value[0].label
this.form.card_type = e.value[0].value

Loading…
Cancel
Save