Ver código fonte

修改:会费缴交文字修改和首页课程轮播修改

littleblue55 23 horas atrás
pai
commit
4a8f94be2a

+ 2 - 2
api/report.js

@@ -71,7 +71,7 @@ export function reportFavi(id){
 // 取消收藏
 export function cancelReportFavi(id){
 	return request({
-		url: '/report/favi',
+		url: '/report/cancelFavi',
 		headers: {
 			isToken: true
 		},
@@ -83,7 +83,7 @@ export function cancelReportFavi(id){
 }
 
 // 点赞
-export function reportApplaud(){
+export function reportApplaud(id){
 	return request({
 		url: `/applaud/report`,
 		headers: {

+ 22 - 11
components/lgSwiper.vue

@@ -1,23 +1,23 @@
 <template>
 	<view class="container">
 		<swiper class="swiper" :circular="true" :autoplay="false" :duration="500" :previous-margin="'200rpx'"
-			:next-margin="'200rpx'" :style="{ height: '300rpx' }" :current="currentIndex"
+			:next-margin="'200rpx'" :style="{ height: '320rpx' }" :current="currentIndex"
 			:easing-function="easeInOutCubic"
 			@change="changeCurrent">
 			<swiper-item v-for="(slide, index) in processedSildeItems" :key="index" style="overflow: initial;"
 				:class="index==currentIndex? 'swiper-item-active':'swiper-item-normal'" @click="swiperClick(slide)">
-				<!-- <view :class="index==currentIndex? 'swiper-item active':'swiper-item'">
+				<view :class="index==currentIndex? 'swiper-item active':'swiper-item'">
 					<view style="width: 100%;height: 90%;">
 						<image style="width: 100%;height: 100%;" mode="aspectFit" :src="slide[image]"></image>
 					</view>
-					<view style="width: 100%;overflow: hidden;white-space: nowrap;">
+					<view class="swiper-text-box">
 						<text class="swiper-text">{{ slide[title] }}</text>
 					</view>
-				</view> -->
-				<view :class="index==currentIndex? 'swiper-item active':'swiper-item'" >
-					<image style="width: 100%;height: 90%;" mode="aspectFill" :src="slide[image]" ></image>
-					<text class="swiper-text">{{ slide[title] }}</text>
 				</view>
+				<!-- <view :class="index==currentIndex? 'swiper-item active':'swiper-item'" >
+					<image style="width: 100%;height: 90%;" mode="aspectFit" :src="slide[image]" ></image>
+					<text class="swiper-text">{{ slide[title] }}</text>
+				</view> -->
 			</swiper-item>
 		</swiper>
 	</view>
@@ -92,7 +92,7 @@
 	}
 	@keyframes marquee {
 	  0% {
-	    transform: translateX(20%);
+	    transform: translateX(15%);
 	  }
 	  100% {
 	    transform: translateX(-100%);
@@ -107,7 +107,7 @@
 
 	.swiper-item {
 		display: flex;
-		height: 80%;
+		height: 70%;
 		width: 85%;
 		margin: 0 auto;
 		justify-content: flex-end;
@@ -120,8 +120,13 @@
 			white-space: nowrap;
 			overflow: hidden;
 			text-overflow: ellipsis;
-			margin-top: 10rpx;
-			
+			// margin-top: 10rpx;
+			margin-top: 7rpx;
+		}
+		.swiper-text-box{
+			width: 100%;
+			display: flex;
+			justify-content: center;
 		}
 	}
 
@@ -136,6 +141,12 @@
 			white-space: nowrap;
 			overflow: hidden;
 			text-overflow: ellipsis;
+			margin-top: 5rpx;
+		}
+		.swiper-text-box{
+			width: auto;
+			display: flex;
+			justify-content: center;
 		}
 	}
 </style>

+ 1 - 1
pages/huiFeiJiaoJiao/huiFeiJiaoJiao.vue

@@ -29,7 +29,7 @@
 				</view>
 				<view class="list-item">
 					<view class="button" :class="[item.payed ? 'primary' : 'error']" @click="onJiaoFei(item)">
-						{{item.payed ? '已缴费' : '未缴费,点击缴费'}}
+						{{item.payed ? '正常' : '失效,点击缴费'}}
 					</view>
 				</view>
 			</view>

+ 15 - 10
pages/reportDetail/reportDetail.vue

@@ -17,12 +17,12 @@
 				<button class="menu-item" open-type="share">
 					<i class="iconfont icon-zhuanfa"></i>
 				</button>
-				<button class="menu-item">
+				<!-- <button class="menu-item">
 					<i class="iconfont icon-pengyouquan"></i>
-				</button>
-				<button class="menu-item">
+				</button> -->
+				<!-- <button class="menu-item">
 					<i class="iconfont icon-xiaoxi"></i>
-				</button>
+				</button> -->
 			</view>
 		</view>
 		<u-popup v-model="buyShow" 
@@ -102,7 +102,7 @@
 	const id = ref()
 	const title = ref()
 	const hasPermission = ref(false);
-	const imgurl = '/static/images/avator-img/1.png'
+	const imgurl = ref(null)
 	const report = ref({
 		id: '01',
 		title: '2025年2月从化区二手住宅市场交易简报',
@@ -172,6 +172,7 @@
 	}
 
 	function changeFavi() {
+		console.log(report.value.hasFavi)
 		if (report.value.hasFavi) {
 			cancelReportFavi(id.value).then(res => {
 				if (res?.code == 0) {
@@ -188,6 +189,7 @@
 	}
 
 	function changeApplaud() {
+		console.log(report.value.hasApplaud)
 		if (report.value.hasApplaud) {
 			cancelReportApplaud(id.value).then(res => {
 				if (res?.code == 0) {
@@ -274,6 +276,7 @@
 				}else{
 					report.value.content = ''
 				}
+				imgurl.value = report.value.cover
 			}
 		})
 	}
@@ -300,19 +303,21 @@
 
 
 	onShareAppMessage((res) => {
-		if (res.from === 'button') {
-			console.log('来自按钮分享');
-		}
+		// if (res.from === 'button') {
+		// 	console.log('来自按钮分享');
+		// }
+		// console.log(imgurl.value)
 		return {
-			title: '研究报告',
+			title: title.value,
 			path: `/pages/reportDetail/reportDetail?id=${id.value}&title=${title.value}`,
 			imageUrl: imgurl.value
 		};
 	})
 
 	onShareTimeline(() => {
+		// console.log(imgurl.value)
 		return {
-			title: '朋友圈标题-研究报告',
+			title: title.value,
 			query: `id=${id.value}&title=${title.value}`,
 			imageUrl: imgurl.value
 		};