1
0

3 Commits cc1f30470d ... e8b329a861

Autor SHA1 Nachricht Datum
  liujiaxin e8b329a861 积分明细” vor 2 Wochen
  liujiaxin 5c4724a6d5 Signed-off-by: liujiaxin <2289135621@qq.com> vor 2 Wochen
  liujiaxin bd2642e4f9 字段 vor 2 Wochen

+ 4 - 4
common/request.js

@@ -10,15 +10,15 @@ export default class Request {
 		// let path = 'https://test.userapp.store.cdwjyyh.com';
 		// let path = 'https://user.test.ylrztop.com/api';
 
-		// let path = 'https://userapp.klbycp.com/store'; //百域承品
-		// let path2 = 'https://userapp.klbycp.com'; //百域承品
+		let path = 'https://userapp.klbycp.com/store'; //百域承品
+		let path2 = 'https://userapp.klbycp.com'; //百域承品
 
 
 		// let path = 'http://j26df4a4.natappfree.cc/store'; //百域承品 夏伟
 		// let path2 = 'http://j26df4a4.natappfree.cc'; //百域承品 夏伟
 
-		let path = 'http://d499966b.natappfree.cc/store'; //本地
-		let path2 = 'http://d499966b.natappfree.cc'; //本地
+		// let path = 'http://d499966b.natappfree.cc/store'; //本地
+		// let path2 = 'http://d499966b.natappfree.cc'; //本地
 
 
 		let type = 0

+ 2 - 1
pages/shopping/productDetails.vue

@@ -86,7 +86,8 @@
 			</view>
 		</view>
 		<!-- 底部按钮 -->
-		<view class="btn-foot" v-if="userinfo.isShow==1&&isuser==false">
+		<!-- v-if="userinfo.isShow==1&&isuser==false" -->
+		<view class="btn-foot" >
 			<view class="menu-box">
 				<view class="item" @click="goHome">
 					<image src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/back_home.png"

+ 6 - 6
pages_course/living.vue

@@ -171,7 +171,7 @@
 				<!-- &&liveItem.completionPointsEnabled -->
 				<!-- <view class="progress-countdown end" :class="liveItem.showType==2?' progress-vertical':''"
 					:style="{ 'display':isFocus?'none':''}"
-					v-if="countdownPercentage!=100&&liveItem.completionPointsEnabled&&!receiveStatus&&liveItem.status==2&&!hasReceived">
+					v-if="countdownPercentage!=100&&!receiveStatus&&liveItem.status==2&&!hasReceived">
 					<image class="title" src="/static/images/points_title.png"></image>
 					<view class="progress-bar-bg">
 						<view class="progress-bar-fill" :style="{ width: countdownPercentage + '%' }"></view>
@@ -1880,15 +1880,15 @@
 				}
 				// remainingTime = 剩余需要观看的时间
 				// 已观看时间 = 总目标时间 - 剩余时间
-				const watchedTime = this.videoDuration - this.pointsRemainingTime;
+				// const watchedTime = this.videoDuration - this.pointsRemainingTime;
 
 				// 5. 确保数值有效
-				if (watchedTime <= 0) {
-					return 0;
-				}
+				// if (watchedTime <= 0) {
+				// 	return 0;
+				// }
 
 				// 6. 计算百分比(已观看时间 / 目标时间)
-				const percentage = (watchedTime / this.videoDuration) * 100;
+				const percentage = (this.watchedTime / this.videoDuration) * 100;
 
 				// 7. 限制在 0-100 范围内
 				return Math.min(100, Math.max(0, percentage));

+ 113 - 152
pages_shopping/live/integral.vue

@@ -24,75 +24,24 @@
 					<text class="num">{{integral}}</text>
 				</view>
 
-				<!-- 签到 -->
-				<!-- <view class="singn-content">
-					<view class="sign-in-box">
-						<view class="inner">
-							<view class="title-box">已连续签到<text class="num">{{totalDays}}</text>天</view>
-							<view class="sign-list">
-								<view v-for="(item,index) in records" :key="index"
-									:class="totalDays >= index+ 1?'item active':'item'">
-									<view class="line"></view>
-									<view class="right">
-										<image v-if="totalDays >= index+ 1"
-											src="https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/f3bdd5d388854e9a8f365904840c3b32.png"
-											mode=""></image>
-										<image v-else
-											src="https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/c593e551e4b246b981aaa58deb1fe725.png"
-											mode=""></image>
-										<text class="text">第{{ item.continuousDays}}天</text>
-									</view>
-								</view>
-							</view>
-						</view>
-						<view class="sign-btn-box">
-							<view class="btn" v-if="isDaySign==false" @click="doSign()">
-								<image
-									src="https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/295aa046433d4feb95b467c83f8b4096.png"
-									mode=""></image>
-								<text class="text">签到</text>
-							</view>
-							<view class="btn" v-else>
-								<image
-									src="https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/295aa046433d4feb95b467c83f8b4096.png"
-									mode=""></image>
-								<text class="text">签到</text>
-							</view>
-						</view>
-					</view>
-				</view> -->
+			
 				<view class="content">
 					<!-- 积分列表 -->
 					<view class="points-cont">
-						<!-- tab切换 -->
-						<!-- <view class="pub-tab-box">
-							<view class="tab-inner">
-								<view 
-									v-for="(item,index) in tags" 
-									:key="index"
-									:class="tabIndex == item.value?'item active':'item'"
-									@click="tabChange(item)">
-									<view class="text">
-										{{ item.lable }}
-										<image v-show="tabIndex == item.value" class="tab-bg" src="https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/1828ea6b3b124b5f84e3556267a8d9ef.png" mode=""></image>
-									</view>
-								</view>
-							</view>
-						</view> -->
-
 						<!-- 列表 -->
 						<view class="point-list">
 							<view v-for="(item,index) in list" :key="index" class="item">
 								<view class="left">
 									<text class="title">
 										<!-- {{item.logTypeName}} -->
-										直播间完课积分
+										<!-- 直播间完课积分 -->
+										 {{utils.getDictLabel2Name(typeOptions,item.logType)}}
 									</text>
 									<view class="time">{{item.createTime}}</view>
 								</view>
 								<view class="right">
 									<text v-if="item.integral<0" class="less">{{item.integral}}</text>
-									<text v-else class="add">+{{item.pointsAwarded}}</text>
+									<text v-else class="add">+{{item.integral}}</text>
 								</view>
 							</view>
 						</view>
@@ -106,16 +55,16 @@
 </template>
 
 <script>
-	import {
-		getUserIntegralInfo
-	} from '@/api/living.js' // 积分
-	import {
-		completionRecords,
-		completionInfo,doSign
-	} from '@/api/integral.js'
-
+	// import {
+	// 	getUserIntegralInfo
+	// } from '@/api/living.js' // 积分
+	// import {
+	// 	completionRecords,
+	// 	completionInfo,doSign
+	// } from '@/api/integral.js'
+	import {getUserIntegralLogsList,getUserSign} from '@/api/integral';
 
-	// import {getDictByKey} from '@/api/common.js'
+	import {getDictByKey} from '@/api/common.js'
 	// import {getUserSign,getUserIntegralLogsList,doSign} from '@/api/integral';
 	// import {
 	// 	doSign
@@ -153,13 +102,17 @@
 			};
 		},
 		onLoad(option) {
+			this.getDictByKey("sys_integral_log_type");
 			if (option.liveId) {
 				this.liveId = option.liveId
 			}
 			console.log("进入积分页面了")
+			// this.integrallogs()
 			// this.getUserIntegralInfo()
-			this.completionRecords()
-			this.completionInfo()
+			// this.completionRecords()
+			// this.completionInfo()
+			this.getUserSign()
+			this.getUserIntegralLogsList();
 		},
 		computed: {
 			// 计算属性的 getter
@@ -168,71 +121,79 @@
 			},
 		},
 		methods: {
+			// integrallogs() {
+			// 	integrallogs(data).then((res) => {
+			// 		if (res.code == 200) {
+			// 			console.log("用户领取看课积分", res)
+			// 			// receiveList
+			// 		}
+			// 	}).catch((error) => {});
+			// },
 			// 查询用户积分领取记录
-			completionRecords() {
-				if (!this.liveId) return;
-				const data = {
-					liveId: this.liveId
-				}
-				completionRecords(data).then((res) => {
-					if (res.code == 200) {
-						this.list = res.data
-						console.log("查询用户积分领取记录", res)
-					}
-				}).catch((error) => {
-
-				});
-			},
+			// completionRecords() {
+			// 	if (!this.liveId) return;
+			// 	const data = {
+			// 		liveId: this.liveId
+			// 	}
+			// 	completionRecords(data).then((res) => {
+			// 		if (res.code == 200) {
+			// 			this.list = res.data
+			// 			console.log("查询用户积分领取记录", res)
+			// 		}
+			// 	}).catch((error) => {
+
+			// 	});
+			// },
 
 			//查询用户积分余额和看直播信息统计
-			completionInfo() {
-				if (!this.liveId) return;
-				const data = {
-					liveId: this.liveId
-				}
-				completionInfo(data).then((res) => {
-					if (res.code == 200) {
-						this.integral = res.data.integral
-						this.records = res.data.records
-						this.totalDays = res.data.totalDays
-						console.log("查询用户积分余额和看直播信息统计", res)
-					}
-				}).catch((error) => {
-
-				});
-			},
-
-
-			doSign() {
-				var data = {};
-				// uni.showLoading({
-				// 	title:"正在加载中..."
-				// })
-				doSign(data).then(
-					res => {
-						// uni.hideLoading()
-						if (res.code == 200) {
-							uni.showToast({
-								icon: 'success',
-								title: res.msg,
-							});
-							this.list = [];
-							this.page.page = 1;
-							this.list = [];
-							this.loaded = false;
-							this.loading = false;
-							this.getUserIntegralLogsList();
-							this.getUserSign();
-						} else {
-							uni.showToast({
-								icon: 'none',
-								title: res.msg,
-							});
-						}
-					},
-					rej => {}
-				);
-			},
+			// completionInfo() {
+			// 	if (!this.liveId) return;
+			// 	const data = {
+			// 		liveId: this.liveId
+			// 	}
+			// 	completionInfo(data).then((res) => {
+			// 		if (res.code == 200) {
+			// 			this.integral = res.data.integral
+			// 			this.records = res.data.records
+			// 			this.totalDays = res.data.totalDays
+			// 			console.log("查询用户积分余额和看直播信息统计", res)
+			// 		}
+			// 	}).catch((error) => {
+
+			// 	});
+			// },
+
+
+			// doSign() {
+			// 	var data = {};
+			// 	// uni.showLoading({
+			// 	// 	title:"正在加载中..."
+			// 	// })
+			// 	doSign(data).then(
+			// 		res => {
+			// 			// uni.hideLoading()
+			// 			if (res.code == 200) {
+			// 				uni.showToast({
+			// 					icon: 'success',
+			// 					title: res.msg,
+			// 				});
+			// 				this.list = [];
+			// 				this.page.page = 1;
+			// 				this.list = [];
+			// 				this.loaded = false;
+			// 				this.loading = false;
+			// 				this.getUserIntegralLogsList();
+			// 				this.getUserSign();
+			// 			} else {
+			// 				uni.showToast({
+			// 					icon: 'none',
+			// 					title: res.msg,
+			// 				});
+			// 			}
+			// 		},
+			// 		rej => {}
+			// 	);
+			// },
 			getUserSign() {
 				getUserSign().then(
 					res => {
@@ -255,30 +216,30 @@
 			},
 
 
-			// 积分
-			getUserIntegralInfo() {
-				uni.showLoading({
-					title: "正在加载中..."
-				})
-				getUserIntegralInfo().then(res => {
-					uni.hideLoading()
-					if (res.code == 200) {
-						console.log("积分>>", res)
-						// 处理列表数据,将"积分"替换为"积分"
-						this.list = res.data.logs.map(item => {
-							return {
-								...item,
-								logTypeName: item.logTypeName ? item.logTypeName.replace(/积分/g, '积分') :
-									item.logTypeName
-							}
-						})
-						this.integral = res.data.integral
-					}
-				}).catch(error => {
-					console.error("获取积分数据失败:", error);
-
-				});
-			},
+			// // 积分
+			// getUserIntegralInfo() {
+			// 	uni.showLoading({
+			// 		title: "正在加载中..."
+			// 	})
+			// 	getUserIntegralInfo().then(res => {
+			// 		uni.hideLoading()
+			// 		if (res.code == 200) {
+			// 			console.log("积分>>", res)
+			// 			// 处理列表数据,将"积分"替换为"积分"
+			// 			this.list = res.data.logs.map(item => {
+			// 				return {
+			// 					...item,
+			// 					logTypeName: item.logTypeName ? item.logTypeName.replace(/积分/g, '积分') :
+			// 						item.logTypeName
+			// 				}
+			// 			})
+			// 			this.integral = res.data.integral
+			// 		}
+			// 	}).catch(error => {
+			// 		console.error("获取积分数据失败:", error);
+
+			// 	});
+			// },
 
 
 

+ 3 - 0
pages_user/user/integralLogsList.vue

@@ -4,6 +4,9 @@
 			<mescroll-body      ref="mescrollRef" @init="mescrollInit" :up="upOption" :down="downOption" @down="downCallback" @up="upCallback">
 			<view class="item" v-for="(item) in dataList">
 				<view class="left">
+					<!-- <text class="title"  >
+						完课积分领取记录
+					</text> -->
 					<text class="title"  >
 						{{utils.getDictLabel2Name(typeOptions,item.logType)}}
 					</text>