|
|
|
@ -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>
|