|
@@ -185,7 +185,7 @@
|
|
|
</modal>
|
|
</modal>
|
|
|
|
|
|
|
|
<!-- 报名表单弹窗 -->
|
|
<!-- 报名表单弹窗 -->
|
|
|
- <modal v-if="showRegModal" class="reg-modal-overlay" :show="showRegModal" @close="showRegModal = false">
|
|
|
|
|
|
|
+ <view v-if="showRegModal" class="reg-modal-overlay" @click.self="closeRegModal">
|
|
|
<view class="reg-modal">
|
|
<view class="reg-modal">
|
|
|
<text class="reg-modal-title">活动报名</text>
|
|
<text class="reg-modal-title">活动报名</text>
|
|
|
|
|
|
|
@@ -234,7 +234,7 @@
|
|
|
</button>
|
|
</button>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- </modal>
|
|
|
|
|
|
|
+ </view>
|
|
|
</scroll-view>
|
|
</scroll-view>
|
|
|
|
|
|
|
|
<!-- 空状态 -->
|
|
<!-- 空状态 -->
|
|
@@ -378,6 +378,12 @@ export default {
|
|
|
var self = this
|
|
var self = this
|
|
|
if (self.checkinLoading || self.checkinDone) return
|
|
if (self.checkinLoading || self.checkinDone) return
|
|
|
|
|
|
|
|
|
|
+ // 未登录则跳转登录
|
|
|
|
|
+ if (!uni.getStorageSync('token')) {
|
|
|
|
|
+ uni.navigateTo({ url: '/pages/login/login' })
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
var childId = uni.getStorageSync('currentChildId') || self.registrationChildId
|
|
var childId = uni.getStorageSync('currentChildId') || self.registrationChildId
|
|
|
if (!childId) {
|
|
if (!childId) {
|
|
|
uni.showToast({ title: '请选择孩子身份', icon: 'none' })
|
|
uni.showToast({ title: '请选择孩子身份', icon: 'none' })
|
|
@@ -423,6 +429,11 @@ export default {
|
|
|
},
|
|
},
|
|
|
onRegister: function() {
|
|
onRegister: function() {
|
|
|
var self = this
|
|
var self = this
|
|
|
|
|
+ // 未登录则跳转登录
|
|
|
|
|
+ if (!uni.getStorageSync('token')) {
|
|
|
|
|
+ uni.navigateTo({ url: '/pages/login/login' })
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
// Open registration form modal
|
|
// Open registration form modal
|
|
|
self.showRegModal = true
|
|
self.showRegModal = true
|
|
|
self.registrants = []
|
|
self.registrants = []
|
|
@@ -430,6 +441,11 @@ export default {
|
|
|
},
|
|
},
|
|
|
onCancelRegistration: function() {
|
|
onCancelRegistration: function() {
|
|
|
var self = this
|
|
var self = this
|
|
|
|
|
+ // 未登录则跳转登录
|
|
|
|
|
+ if (!uni.getStorageSync('token')) {
|
|
|
|
|
+ uni.navigateTo({ url: '/pages/login/login' })
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
uni.showModal({
|
|
uni.showModal({
|
|
|
title: '提示',
|
|
title: '提示',
|
|
|
content: '确定要取消报名吗?',
|
|
content: '确定要取消报名吗?',
|
|
@@ -599,6 +615,11 @@ export default {
|
|
|
// ===== 分享海报 =====
|
|
// ===== 分享海报 =====
|
|
|
async generatePoster() {
|
|
async generatePoster() {
|
|
|
if (!this.activity || !this.activity.id) return
|
|
if (!this.activity || !this.activity.id) return
|
|
|
|
|
+ // 未登录则跳转登录
|
|
|
|
|
+ if (!uni.getStorageSync('token')) {
|
|
|
|
|
+ uni.navigateTo({ url: '/pages/login/login' })
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
uni.showLoading({ title: '生成海报中...' })
|
|
uni.showLoading({ title: '生成海报中...' })
|
|
|
try {
|
|
try {
|
|
|
var res = await getShareQrCode('pages/activity/activity-detail/activity-detail', 'id=' + this.activity.id)
|
|
var res = await getShareQrCode('pages/activity/activity-detail/activity-detail', 'id=' + this.activity.id)
|