Преглед изворни кода

Merge remote-tracking branch 'origin/master'

hmp пре 4 година
родитељ
комит
bf6753d853

+ 14 - 0
common/css/app.scss

@@ -20,4 +20,18 @@
 		display: -webkit-box;
 		-webkit-line-clamp: 2;
 		-webkit-box-orient: vertical;
+	}
+	.homeBtn {
+		width: 100upx;
+		height: 80upx;
+		border-radius: 50upx 0 0 50upx;
+		position: fixed;
+		bottom: 200upx;
+		right: 0;
+		z-index: 999;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		background: #ffffff;
+		box-shadow: -4upx -4upx 30upx #888888;
 	}

+ 39 - 16
common/utils/mixin.js

@@ -11,24 +11,47 @@ let page = {
     
   },
   onLoad(options) {
-	  let userId=uni.getStorageSync("userId")
-	  console.log(userId,'我是userid===============>');
-	  if (!this.$u.test.isEmpty(userId)) {
-		  let link=window.location.href
-		  if (link.indexOf("?")!=-1) {
-		  	 link=link+"&agenterId="+userId
-		  }else{
-			  link=link+"?agenterId="+userId
+	  if (!this.$u.test.isEmpty(options.activityId)) {
+		  this.$u.api.activity.detail({id: options.activityId}).then(res => {
+		  	let userId=uni.getStorageSync("userId")
+		  	if (!this.$u.test.isEmpty(userId)) {
+		  			  let link=window.location.href
+		  			  if (link.indexOf("?")!=-1) {
+		  			  	 link=link+"&agenterId="+userId
+		  			  }else{
+		  				  link=link+"?agenterId="+userId
+		  			  }
+		  			  let obj={
+		  				  link,
+		  				  title:res.shareTitle,
+		  				  desc:res.shareDesc,
+						  imgUrl: res.shareImg
+		  			  }
+		  			  this.$shareConfig(obj,this)
+		  	}
+		  	if (!this.$u.test.isEmpty(options.agenterId)) {
+		  			  uni.setStorageSync("agenterId",options.agenterId)
+		  	}
+		  })
+	  }else{
+		  let userId=uni.getStorageSync("userId")
+		  if (!this.$u.test.isEmpty(userId)) {
+		  		  let link=window.location.href
+		  		  if (link.indexOf("?")!=-1) {
+		  		  	 link=link+"&agenterId="+userId
+		  		  }else{
+		  			  link=link+"?agenterId="+userId
+		  		  }
+		  		  let obj={
+		  			  link,
+					  title: '',
+					  desc: link,
+		  		  }
+		  		  this.$shareConfig(obj,this)
 		  }
-		  let obj={
-			  link,
-			  title:"",
-			  desc:link
+		  if (!this.$u.test.isEmpty(options.agenterId)) {
+		  		  uni.setStorageSync("agenterId",options.agenterId)
 		  }
-		  this.$shareConfig(obj,this)
-	  }
-	  if (!this.$u.test.isEmpty(options.agenterId)) {
-		  uni.setStorageSync("agenterId",options.agenterId)
 	  }
   }
 }

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

@@ -135,7 +135,7 @@
 			navByIcon(path, index) {
 				let url;
 				if (index == 0) { //图片 和 活动详情
-					url = path + "?poster=" + this.activity.poster; 
+					url = path + "?poster=" + this.activity.poster + "&activityId=" + this.activityId;
 				}
 				if (index == 1) { //报名
 					let changeTime = new Date() - Date.parse(this.activity.applyEndTime.replace(/-/g, '/'));//时间戳差值

+ 10 - 1
pages/activityList/activity/activityDetail.vue

@@ -1,6 +1,9 @@
 <template>
 	<view>
 		<u-image :src="src" mode="widthFix"></u-image>
+		<view class="homeBtn" @click="home">
+			<image src="/static/home.png" style="width: 40upx;height: 40upx;" />
+		</view>
 	</view>
 </template>
 
@@ -9,13 +12,19 @@
 		data() {
 			return {
 				src: '',
+				activityId: '',
 			}
 		},
 		onLoad(options) {
+			this.activityId = options.activityId;
 			this.src = options.poster;
 		},
 		methods: {
-			
+			home() {
+				uni.navigateTo({
+					url: "/pages/activityList/home/home?activityId=" + this.activityId,
+				})
+			},
 		}
 	}
 </script>

+ 14 - 7
pages/activityList/activity/authorBoost.vue

@@ -6,7 +6,9 @@
 				
 			</view>
 		</view>
-		
+		<view class="homeBtn" @click="home">
+			<image src="/static/home.png" style="width: 40upx;height: 40upx;" />
+		</view>
 		<view class="head">
 			<view class="title">为{{boostDetail.nickName}}打榜</view>
 			<view class="flex justify-between align-center padding-lr">
@@ -44,7 +46,7 @@
 			<view class="title">打call助力</view>
 		</view>
 		<view class="bg-white padding-sm">
-			<view class="flex justify-around">
+			<view class="flex justify-around" style="flex-wrap: wrap;">
 				<block v-for="(item,index) in boostDetail.presentList" :key="index">
 					<view class="text-center padding-top-xs" :class="current == index ? 'boder':''" @click="change(item.id,index)">
 						<image :src="item.icon" style="width: 80upx;height: 80upx;"></image>
@@ -58,7 +60,7 @@
 			</view>
 		</view>
 		<view class="bg-white padding-sm">
-			<view class="text-sm text-gray">所有的打call助力均会由本平台发起公益捐赠</view>
+			<view class="text-sm text-gray">打call助力的部分收入由平台发起定向公益捐赠</view>
 		</view>
 		<view style="height: 100upx;"></view>
 		<view class="footer-fixed bg-white padding-sm flex justify-between align-center">
@@ -93,11 +95,11 @@
 		<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>
-				<u-avatar src="/static/avatar.png" size="160"></u-avatar>
+				<u-avatar :src="boostDetail.avatar" size="160"></u-avatar>
 				<view class="margin-top" style="font-size: 24upx;font-family: PingFang SC;font-weight: bold;color: #323035;">你将为{{boostDetail.nickName}}增加{{+boostDetail.presentList[current].hotValue * count}}热力值</view>
 				<view class="text-gray text-sm" v-if="presentDetail.isGiveMedal == 1">公益勋章X {{count}}</view>
 				<view class="text-gray text-sm" v-if="presentDetail.isSendGoods == 1">{{presentDetail.goodsName}} X {{count}}</view>
-				<view class="text-gray text-sm">可得{{+boostDetail.presentList[current].pointsValue * count}}积分,可用于国信商城兑换</view>
+				<view class="text-gray text-sm">可得{{+boostDetail.presentList[current].pointsValue * count}}积分,用于积分商城兑换</view>
 				<view class="padding">
 					<u-button class="custom-style" shape="circle" @click="pay">去支付</u-button>
 				</view>
@@ -106,9 +108,9 @@
 		<u-popup v-model="successShow" 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>
-				<u-avatar src="/static/avatar.png" size="160"></u-avatar>
+				<u-avatar :src="boostDetail.avatar" size="160"></u-avatar>
 				<view class="margin-top" style="font-size: 30upx;font-family: PingFang SC;font-weight: bold;color: #323035;">恭喜您已为{{boostDetail.nickName}}注入{{+boostDetail.presentList[current].hotValue * count}}热力值</view>
-				<view class="margin-tb-xs">{{+boostDetail.presentList[current].pointsValue * count}}已到账,用于商城兑换消费</view>
+				<view class="margin-tb-xs">{{+boostDetail.presentList[current].pointsValue * count}}已到账,用于积分商城兑换</view>
 				<view class="text-gray text-sm">购买成功!快去我的订单兑换或捐赠</view>
 				<view class="padding">
 					<u-button class="custom-style" shape="circle" @click="successShow = false">确定</u-button>
@@ -160,6 +162,11 @@
 			this.authorization();
 		},
 		methods: {
+			home() {
+				uni.navigateTo({
+					url: "/pages/activityList/home/home?activityId=" + this.activityId,
+				})
+			},
 			//打榜助力
 			userBoost() {
 				if (this.$u.test.isEmpty(this.senderId)) {

+ 8 - 0
pages/activityList/activity/hot.vue

@@ -3,6 +3,9 @@
 		<view class="searchBar">
 			<search-bar :disabled="false" @onSearch="onSearch"></search-bar>
 		</view>
+		<view class="homeBtn" @click="home">
+			<image src="/static/home.png" style="width: 40upx;height: 40upx;" />
+		</view>
 		<block v-for="(item, index) in hotList" :key="index">
 			<u-line color="#e8e8e8"></u-line>
 			<view class="padding-sm flex justify-between align-center bg-white"
@@ -62,6 +65,11 @@
 			}
 		},
 		methods: {
+			home() {
+				uni.navigateTo({
+					url: "/pages/activityList/home/home?activityId=" + this.activityId,
+				})
+			},
 			getRankList() {
 				let params = {
 					activityId: this.activityId,

+ 14 - 4
pages/activityList/activity/musicBoost.vue

@@ -1,7 +1,12 @@
 <template>
 	<view>
-		<view v-if="boostDetail.urlsType == 1"  class="bg-img" style="height: 563upx;" :style="{'backgroundImage':'url('+ boostDetail.cover +')'}"></view>
+		<view v-if="boostDetail.urlsType == 1">
+			<video :src="boostDetail.urls" style="width: 100%;height: 400upx;"></video>
+		</view>
 		<view v-else  class="bg-img" style="height: 563upx;" :style="{'backgroundImage':'url('+ boostDetail.urls +')'}"></view>
+		<view class="homeBtn" @click="home">
+			<image src="/static/home.png" style="width: 40upx;height: 40upx;" />
+		</view>
 		<view class="head">
 			<view class="title">为{{boostDetail.title}}打榜</view>
 			<view class="flex justify-between align-center padding-lr">
@@ -53,7 +58,7 @@
 			</view>
 		</view>
 		<view class="bg-white padding-sm">
-			<view class="text-sm text-gray">所有的打call助力均会由本平台发起公益捐赠</view>
+			<view class="text-sm text-gray">打call助力的部分收入由平台发起定向公益捐赠</view>
 		</view>
 		<view style="height: 100upx;"></view>
 		<view class="footer-fixed bg-white padding-sm flex justify-between align-center">
@@ -88,7 +93,7 @@
 		<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>
-				<u-avatar src="/static/avatar.png" size="160"></u-avatar>
+				<u-avatar :src="boostDetail.avatar" size="160"></u-avatar>
 				<view class="margin-top" style="font-size: 24upx;font-family: PingFang SC;font-weight: bold;color: #323035;">你将为{{boostDetail.title}}增加{{+boostDetail.presentList[current].hotValue * count}}热力值</view>
 				<view class="text-gray text-sm" v-if="presentDetail.isGiveMedal == 1">公益勋章X {{count}}</view>
 				<view class="text-gray text-sm" v-if="presentDetail.isSendGoods == 1">{{presentDetail.goodsName}} X {{count}}</view>
@@ -101,7 +106,7 @@
 		<u-popup v-model="successShow" 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>
-				<u-avatar src="/static/avatar.png" size="160"></u-avatar>
+				<u-avatar :src="boostDetail.avatar" size="160"></u-avatar>
 				<view class="margin-top" style="font-size: 30upx;font-family: PingFang SC;font-weight: bold;color: #323035;">恭喜您已为{{boostDetail.title}}注入{{+boostDetail.presentList[current].hotValue * count}}热力值</view>
 				<view class="margin-tb-xs">{{+boostDetail.presentList[current].pointsValue * count}}已到账,可用于商城兑换消费</view>
 				<view class="text-gray text-sm">购买成功!快去我的订单兑换或捐赠</view>
@@ -154,6 +159,11 @@
 			this.authorization();
 		},
 		methods: {
+			home() {
+				uni.navigateTo({
+					url: "/pages/activityList/home/home?activityId=" + this.boostDetail.activityId,
+				})
+			},
 			//打榜助力
 			userBoost() {
 				if (this.$u.test.isEmpty(this.userId)) {

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

@@ -4,6 +4,7 @@
 			<block v-if="$u.test.isEmpty(data.urls)">
 				<view class="cuIcon-roundaddfill theme-color" style="font-size: 80upx;padding: 100upx 0 30upx 0;"></view>
 				<view class="text-black text-bold text-sm">添加图片或视频</view>
+				<view class="text-sm text-gray margin-top-xs">建议上传横排照片或者视频</view>
 			</block>
 			<block v-else>
 				<block v-if="data.urlsType == 0">

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

@@ -9,6 +9,9 @@
 				<u-input confirm-type="search" v-model="keyword" style="margin: 0 20rpx;" placeholder="请输入搜索内容" />
 			</view>
 		</view>
+		<view class="homeBtn" @click="home">
+			<image src="/static/home.png" style="width: 40upx;height: 40upx;" />
+		</view>
 		<u-sticky h5-nav-height="0">
 			<u-tabs :list="list" active-color="#5c40e8" :bold="false" :is-scroll="false" :current="current"
 				@change="change"></u-tabs>
@@ -139,6 +142,11 @@
 				this.pageCurrent = 1;
 				this.getRankList()
 			},
+			home() {
+				uni.navigateTo({
+					url: "/pages/activityList/home/home?activityId=" + this.activityId,
+				})
+			},
 			getActivityDetail() {
 				this.$u.api.activity.detail({
 					id: this.activityId

+ 19 - 0
pages/activityList/mine/introduction.vue

@@ -72,6 +72,25 @@
 			}
 		},
 		onLoad(options) {
+			let userId = uni.getStorageSync("userId");
+			if (!this.$u.test.isEmpty(userId)) {
+				let link = "https://yyzs.nanyue6688.com/vote-h5/index.html#/pages/activityList/activity/musicBoost?id=" + options.id;
+				if (link.indexOf("?") != -1) {
+					link = link + "&agenterId=" + userId
+				} else {
+					link = link + "?agenterId=" + userId
+				}
+				let obj = {
+					link,
+					title: "音乐先锋榜",
+					desc: "广东音乐之声携手29家全国省级电台,带你寻找最棒的华语音乐",
+					imgUrl: 'https://upload-file-data.obs.cn-south-1.myhuaweicloud.com/6fa364aee2d0441d8d01d150eeb63d73-logo.png',
+				}
+				this.$shareConfig(obj, this);
+			}
+			if (!this.$u.test.isEmpty(options.agenterId)) {
+				uni.setStorageSync("agenterId", options.agenterId)
+			}
 			this.productId = options.id;
 			this.getProductInfo();
 			this.getHelpRecord();

+ 3 - 1
pages/activityList/mine/myMusic.vue

@@ -71,6 +71,7 @@
 	export default {
 		data() {
 			return {
+				activityId: '',
 				userId:'',
 				applyEndTime: '',
 				data:{},
@@ -80,6 +81,7 @@
 			}
 		},
 		onLoad(options) {
+			this.activityId = options.activityId
 			this.getActivityDetail(options.activityId);
 			this.userId = uni.getStorageSync("userId");
 			this.init()
@@ -148,7 +150,7 @@
 					return;
 				} else {
 					uni.navigateTo({
-						url: "/pages/activityList/activity/signUp",
+						url: "/pages/activityList/activity/signUp?activityId=" + this.activityId
 					})
 				}
 			},