lyqu 4 лет назад
Родитель
Сommit
88d66c7704

+ 9 - 7
components/homeViews/activity-view.vue

@@ -4,7 +4,8 @@
 			<search-bar :disabled="true" @onNavigator="navByIcon('/pages/activityList/activity/hot', 2)"></search-bar>
 		</view>
 		<view class="padding-tb bg-white">
-			<u-image width="100%" height="350" :src="activity.cover" @click="navByIcon('/pages/activityList/activity/activityDetail', 0)"></u-image>
+			<u-swiper height="350" :list="imgList" bg-color="#fff" interval="5000" @click="preview"></u-swiper>
+			<!-- <u-image width="100%" height="350" :src="activity.cover" @click="navByIcon('/pages/activityList/activity/activityDetail', 0)"></u-image> -->
 		</view>
 		<view class="flex justify-around text-center padding-tb bg-white">
 			<block v-for="(item,index) in icons" :key="index">
@@ -91,12 +92,6 @@
 				type: String,
 				default: ''
 			},
-			imgList: {
-				type: Array,
-				default() {
-					return []
-				}
-			},
 			rankList: {
 				type: Array,
 				default() {
@@ -106,6 +101,7 @@
 		},
 		data() {
 			return {
+				imgList: [],
 				icons: [
 					{image: '/static/song.png', name: '活动介绍', url: '/pages/activityList/activity/activityDetail'},
 					{image: '/static/signUp.png', name: '点击报名', url: '/pages/activityList/activity/signUp'},
@@ -120,8 +116,14 @@
 			this.getActivityDetail();
 		},
 		methods: {
+			preview(index) {
+				uni.previewImage({
+					urls: [this.imgList[index]]
+				})
+			},
 			getActivityDetail() {
 				this.$u.api.activity.detail({id: this.activityId}).then(res => {
+					this.imgList = res.ads.split(",");
 					this.activity = res;
 				})
 			},

+ 17 - 8
pages/activityList/activity/awards.vue

@@ -34,7 +34,9 @@
 						<view class="padding-right-xs">已绑定卡号{{cardNumber}}</view>
 						<button class="cu-btn sm round margin-right-sm" style="background-color: #f75757;color: #ffffff;" @click="changeNum">点击更换</button>
 					</block>
-					<button class="cu-btn sm round margin-right-sm" style="background-color: #f75757;color: #ffffff;" v-else @click="changeNum">点击绑定</button>
+					<block v-else>
+						<button class="cu-btn sm round margin-right-sm" style="background-color: #f75757;color: #ffffff;" @click="changeNum">点击绑定</button>
+					</block>
 				</view>
 			</view>
 		</view>
@@ -112,10 +114,11 @@
 			getCardInfo() {
 				let userId = uni.getStorageSync("userId");
 				this.$u.api.bankCard.cardDetail({userId: userId}).then(res => {
-					console.log(res);
-					this.cardInfo = res.records[0];
-					let cardNo = res.records[0].cardNo;
-					this.cardNumber = "**** " + cardNo.substring(cardNo.length - 4, cardNo.length);
+					if (!this.$u.test.isEmpty(res.records[0])) {
+						this.cardInfo = res.records[0];
+						let cardNo = res.records[0].cardNo;
+						this.cardNumber = "**** " + cardNo.substring(cardNo.length - 4, cardNo.length);
+					}
 				})
 			},
 			init(){
@@ -150,9 +153,15 @@
 				})
 			},
 			changeNum(id) {
-				uni.navigateTo({
-					url: "/pages/activityList/activity/bankCard?cardId=" + this.cardInfo.id
-				})
+				if (this.$u.test.isEmpty(this.cardInfo)) {
+					uni.navigateTo({
+						url: "/pages/activityList/activity/bankCard"
+					})
+				} else {
+					uni.navigateTo({
+						url: "/pages/activityList/activity/bankCard?cardId=" + this.cardInfo.id
+					})
+				}
 			}
 		}
 	}

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

@@ -53,7 +53,7 @@
 				</view>
 				<text class="text-black text-bold text-lg padding-left-sm">{{detail.introductionTitle}}</text>
 				<view style="padding: 30upx 20upx 0 20upx;">
-					<u-input v-model="data.introduce" type="textarea" :clearable="false" height="140" :autoHeight="false" maxlength="60" :placeholder="'请输入' + detail.productionTitle" />
+					<u-input v-model="data.introduce" type="textarea" :clearable="false" height="140" :autoHeight="false" maxlength="60" :placeholder="'请输入' + detail.introductionTitle" />
 				</view>
 				<view class="flex justify-end padding-right-sm padding-bottom-sm text-gray">{{data.introduce.length}} / 60</view>
 				<view style="padding: 0 20upx 40upx 20upx;">

+ 1 - 6
pages/activityList/home/home.vue

@@ -2,7 +2,7 @@
 	<view>
 		<!--活动页面-->
 		<view v-if="current == 0">
-			<activity-view :rankList="rankList" :imgList="imgList" :activityId="activityId"></activity-view>
+			<activity-view :rankList="rankList" :activityId="activityId"></activity-view>
 		</view>
 		<!--花积分-->
 		<view v-if="current == 1">
@@ -39,11 +39,6 @@
 				rankList:[],
 				activityId: '',
 				current: 0,
-				imgList: [
-					{image: '/static/swiper1.png'},
-					{image: '/static/swiper1.png'},
-					{image: '/static/swiper1.png'}
-				],
 			}
 		},
 		onLoad(options) {

+ 6 - 2
pages/activityList/mine/myBoost.vue

@@ -1,6 +1,6 @@
 <template>
 	<view>
-		<view class="bg-img" style="background-image: url('https://upload-file-data.obs.cn-south-1.myhuaweicloud.com/5f263a5a6e7c4f2493e0325f28ab659a-bgimg.png');height: 310upx;"></view>
+		<view class="bg-img" style="background-image: url('https://upload-file-data.obs.cn-south-1.myhuaweicloud.com/97d63ec49f544a33a6a8cc3c0b64b17a-songRankBgImg.png');height: 200upx;"></view>
 		<block v-for="(item, index) in boostList" :key="index">
 			<view class="flex align-center justify-between boder">
 				<view class="flex align-center">
@@ -17,6 +17,9 @@
 				<view class="name padding-right flex justify-end" style="width: 200upx;">{{item.totalHotValue}}热力值</view>
 			</view>
 		</block>
+		<view style="height: 80rpx;" v-if="status">
+			<u-divider bgColor="#f1f1f1;" height="80">到底了</u-divider>
+		</view>
 	</view>
 </template>
 
@@ -26,8 +29,9 @@
 			return {
 				boostList: [],
 				userId: '',
-				current: 0,
+				current: 1,
 				size: 30,
+				status: false,
 			}
 		},
 		onLoad() {