lyqu 4 年之前
父节点
当前提交
7166f92729

+ 14 - 5
components/homeViews/activity-view.vue

@@ -138,12 +138,21 @@
 					url = path + "?poster=" + this.activity.poster; 
 				}
 				if (index == 1) { //报名
-					let userId = uni.getStorageSync("userId")
-					if (this.$u.test.isEmpty(userId)) {
-						let param = "pages/activityList/home/home?activityId=" + this.activityId;
-						window.location.href = authUrl(param);
+					let changeTime = new Date() - Date.parse(this.activity.applyEndTime.replace(/-/g, '/'));//时间戳差值
+					if (changeTime > 0) { //检查活动是否已经停止报名
+						uni.showToast({
+							icon: "none",
+							title: "报名已结束"
+						})
+						return;
 					} else {
-						url = path + "?activityId=" + this.activityId;
+						let userId = uni.getStorageSync("userId")
+						if (this.$u.test.isEmpty(userId)) { //是否已经登录
+							let param = "pages/activityList/home/home?activityId=" + this.activityId;
+							window.location.href = authUrl(param);
+						} else {
+							url = path + "?activityId=" + this.activityId;
+						}
 					}
 				}
 				if (index == 2) { //热榜

+ 1 - 1
components/homeViews/mine-view.vue

@@ -137,7 +137,7 @@
 					this.toAuth();
 				} else {
 					uni.navigateTo({
-						url: url 
+						url: url + "?activityId=" + this.activityId
 					})
 				}
 			}

+ 21 - 1
pages/activityList/activity/authorBoost.vue

@@ -38,7 +38,7 @@
 					<view class="text-sm text-gray padding-top-xs">成功邀请一位好友打榜,热力值+5</view>
 				</view>
 			</view>
-			<button style="height: 56upx;" class="cu-btn round theme-bg-color text-white text-sm">去邀请</button>
+			<button style="height: 56upx;" class="cu-btn round theme-bg-color text-white text-sm" @click="invite">去邀请</button>
 		</view>
 		<view class="container">
 			<view class="title">打call助力</view>
@@ -75,6 +75,21 @@
 				<button style="width: 150upx;" class="margin-left cu-btn round theme-bg-color text-white text-sm" @click="dialogShow = true">助力</button>
 			</view>
 		</view>
+		<u-popup v-model="shareShow" mode="bottom" height="460rpx" border-radius="30">
+			<view class="flex align-center justify-around" style="padding: 90upx 60upx 70upx 60upx;"> 
+				<view class="text-center">
+					<image src="/static/wx-share.png" style="width: 125upx;height: 125upx;"></image>
+					<view class="text-sm">分享好友</view>
+				</view>
+				<view class="text-center">
+					<image src="/static/wx-pyq.png" style="width: 129upx;height: 124upx;"></image>
+					<view class="text-sm">分享朋友圈</view>
+				</view>
+			</view>
+			<view class="padding">
+				<button class="cu-btn bg-gray round" style="width: 100%;height: 80upx;" @click="shareShow = false">取消</button>
+			</view>
+		</u-popup>
 		<u-popup v-model="dialogShow" mode="center" width="500rpx" height="600rpx" border-radius="30">
 			<view class="bg-img text-center" style="background-image: url('https://upload-file-data.obs.cn-south-1.myhuaweicloud.com/e914f556be414767aca011a30961560a-dialogBgImg.png');height: 600rpx;">
 				<view style="height: 120upx;"></view>
@@ -100,6 +115,7 @@
 				current: 0,
 				boostDetail: {},
 				dialogShow: false,
+				shareShow: false,
 				count: 1,
 				currentPresentSum: 0,
 				activityId: '',
@@ -184,6 +200,10 @@
 					}
 				}
 			},
+			//邀请
+			invite() {
+				this.shareShow = true;
+			}
 		}
 	}
 </script>

+ 1 - 1
pages/activityList/activity/doAwards.vue

@@ -1,6 +1,6 @@
 <template>
 	<view>
-		<view class="bg-img flex justify-center align-center" style="background-image: url('/static/songRank/awards.png');height: 302upx;">
+		<view class="bg-img flex justify-center align-center" style="background-image: url('https://upload-file-data.obs.cn-south-1.myhuaweicloud.com/97d63ec49f544a33a6a8cc3c0b64b17a-songRankBgImg.png');height: 302upx;">
 			<view class="text-white" >
 				<text class="text-lg">提现金额:</text>
 				<text style="font-size: 60rpx;">¥{{total}}</text>

+ 22 - 1
pages/activityList/activity/musicBoost.vue

@@ -33,7 +33,7 @@
 					<view class="text-sm text-gray padding-top-xs">成功邀请一位好友打榜,热力值+5</view>
 				</view>
 			</view>
-			<button style="height: 56upx;" class="cu-btn round theme-bg-color text-white text-sm">去邀请</button>
+			<button style="height: 56upx;" class="cu-btn round theme-bg-color text-white text-sm" @click="invite">去邀请</button>
 		</view>
 		<view class="container">
 			<view class="title">打call助力</view>
@@ -70,6 +70,21 @@
 				<button style="width: 150upx;" class="margin-left cu-btn round theme-bg-color text-white text-sm" @click="dialogShow = true">助力</button>
 			</view>
 		</view>
+		<u-popup v-model="shareShow" mode="bottom" height="460rpx" border-radius="30">
+			<view class="flex align-center justify-around" style="padding: 90upx 60upx 70upx 60upx;"> 
+				<view class="text-center">
+					<image src="/static/wx-share.png" style="width: 125upx;height: 125upx;"></image>
+					<view class="text-sm">分享好友</view>
+				</view>
+				<view class="text-center">
+					<image src="/static/wx-pyq.png" style="width: 129upx;height: 124upx;"></image>
+					<view class="text-sm">分享朋友圈</view>
+				</view>
+			</view>
+			<view class="padding">
+				<button class="cu-btn bg-gray round" style="width: 100%;height: 80upx;" @click="shareShow = false">取消</button>
+			</view>
+		</u-popup>
 		<u-popup v-model="dialogShow" mode="center" width="500rpx" height="600rpx" border-radius="30">
 			<view class="bg-img text-center" style="background-image: url('https://upload-file-data.obs.cn-south-1.myhuaweicloud.com/e914f556be414767aca011a30961560a-dialogBgImg.png');height: 600rpx;">
 				<view style="height: 120upx;"></view>
@@ -86,6 +101,7 @@
 	</view>
 </template>
 
+<script src="http://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
 <script>
 	import {authUrl} from '@/common/conf/config.js';
 	import {getUrlParams} from '@/common/utils/utils.js';
@@ -95,6 +111,7 @@
 				current: 0,
 				boostDetail: {},
 				dialogShow: false,
+				shareShow: false,
 				count: 1,
 				currentPresentSum: 0,
 				productId: '',
@@ -184,6 +201,10 @@
 					}
 				}
 			},
+			//邀请
+			invite() {
+				this.shareShow = true;
+			}
 		}
 	}
 </script>

+ 1 - 0
pages/activityList/activity/songRank.vue

@@ -136,6 +136,7 @@
 				}
 				this.rankList=[]
 				this.name = name
+				this.pageCurrent = 1;
 				this.getRankList()
 			},
 			getActivityDetail() {

+ 20 - 4
pages/activityList/mine/myMusic.vue

@@ -72,13 +72,15 @@
 		data() {
 			return {
 				userId:'',
+				applyEndTime: '',
 				data:{},
 				list:[],
 				status: 'loadmore',
 				current:1
 			}
 		},
-		onLoad() {
+		onLoad(options) {
+			this.getActivityDetail(options.activityId);
 			this.userId = uni.getStorageSync("userId");
 			this.init()
 		},
@@ -131,11 +133,25 @@
 					})
 				})
 			},
-			onTap() {
-				uni.navigateTo({
-					url: "/pages/activityList/activity/signUp",
+			getActivityDetail(id) {
+				this.$u.api.activity.detail({id: id}).then(res => {
+					this.applyEndTime = res.applyEndTime;
 				})
 			},
+			onTap() {
+				let changeTime = new Date() - Date.parse(this.applyEndTime.replace(/-/g, '/'));//时间戳差值
+				if (changeTime > 0) { //检查活动是否已经停止报名
+					uni.showToast({
+						icon: "none",
+						title: "报名已结束"
+					})
+					return;
+				} else {
+					uni.navigateTo({
+						url: "/pages/activityList/activity/signUp",
+					})
+				}
+			},
 			detail(id) {
 				uni.navigateTo({
 					url: "/pages/activityList/mine/introduction?id=" + id 

二进制
static/wx-pyq.png


二进制
static/wx-share.png