Ver código fonte

积分明细”

git commit -m 积分明细”
liujiaxin 1 dia atrás
pai
commit
e8b329a861

+ 2 - 3
App.vue

@@ -6,13 +6,13 @@
 		globalData: {
 			// wsUrl: 'wss://websocket.cdwjyyh.com',
 			wsUrl: '',
-			appId: 'wxedde588767b358b1',
+			appId: 'wx44beed5640bcb1ba',
 		},
 		onLoad: function (){
 			
 		},
 		onLaunch: function() {
-			this.checkUpdate()
+			this.checkUpdate();
 			// uni.hideTabBar({ animation: true })
 			// uni.$TUIKit = TIM.create({
 			// 	SDKAppID: 1400693126
@@ -67,7 +67,6 @@
 					let menuRight = result.screenWidth - menuButtonInfo.right + 'px'
 					let menuTop = menuButtonInfo.top + 'px'
 					let contentTop = result.statusBarHeight + 44 + 'px'
-			
 					let menuInfo = {
 						statusBarHeight: statusBarHeight,//状态栏高度----用来给自定义导航条页面的顶部导航条设计padding-top使用:目的留出系统的状态栏区域
 						menuWidth: menuWidth,//右侧的胶囊宽度--用来给自定义导航条页面的左侧胶囊设置使用

+ 1 - 0
common/request.js

@@ -96,6 +96,7 @@ export default class Request {
 				httpContentType = contentType;
 			}
 			var routers = router;
+			console.log("---qxj request url:"+`${path}${router}`+" params:"+JSON.stringify(data)+" \n AppToken:"+token);
 			// 请求
 			uni.request({
 				header: {

+ 1 - 1
manifest.json

@@ -52,7 +52,7 @@
     "quickapp" : {},
     /* 小程序特有相关 */
     "mp-weixin" : {
-        "appid" : "wxd791d5933ed42218",
+        "appid" : "wx44beed5640bcb1ba",
         "setting" : {
             "urlCheck" : false
         },

+ 11 - 3
package-lock.json

@@ -6,27 +6,35 @@
   "dependencies": {
     "@vue/devtools-api": {
       "version": "6.6.4",
-      "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.6.4.tgz",
+      "resolved": "https://registry.npmmirror.com/@vue/devtools-api/-/devtools-api-6.6.4.tgz",
       "integrity": "sha512-sGhTPMuXqZ1rVOk32RylztWkfXTRhuS7vgAKv0zjqk8gbsHkJ7xfFf+jbySxt7tWObEJwyKaHMikV/WGDiQm8g=="
     },
     "crypto-js": {
       "version": "4.2.0",
-      "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz",
+      "resolved": "https://registry.npmmirror.com/crypto-js/-/crypto-js-4.2.0.tgz",
       "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q=="
     },
     "dayjs": {
       "version": "1.11.19",
+<<<<<<< HEAD
+      "resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.19.tgz",
+=======
       "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.19.tgz",
+>>>>>>> 8722d06ebbdea27bb060ba30f05e1e37cf4dcfed
       "integrity": "sha512-t5EcLVS6QPBNqM2z8fakk/NKel+Xzshgt8FFKAn+qwlD1pzZWxh0nVCrvFK7ZDb6XucZeF9z8C7CBWTRIVApAw=="
     },
     "uview-ui": {
       "version": "2.0.38",
+<<<<<<< HEAD
+      "resolved": "https://registry.npmmirror.com/uview-ui/-/uview-ui-2.0.38.tgz",
+=======
       "resolved": "https://registry.npmjs.org/uview-ui/-/uview-ui-2.0.38.tgz",
+>>>>>>> 8722d06ebbdea27bb060ba30f05e1e37cf4dcfed
       "integrity": "sha512-6egHDf9lXHKpG3hEjRE0vMx4+VWwKk/ReTf5x18KrIKqdvdPRqO3+B8Unh7vYYwrIxzAWIlmhZ9RJpKI/4UqPQ=="
     },
     "vuex": {
       "version": "4.1.0",
-      "resolved": "https://registry.npmjs.org/vuex/-/vuex-4.1.0.tgz",
+      "resolved": "https://registry.npmmirror.com/vuex/-/vuex-4.1.0.tgz",
       "integrity": "sha512-hmV6UerDrPcgbSy9ORAtNXDr9M4wlNP4pEFKye4ujJF8oqgFFuxDCdOLS3eNoRTtq5O3hoBDh9Doj1bQMYHRbQ==",
       "requires": {
         "@vue/devtools-api": "^6.0.0-beta.11"

+ 0 - 1
pages/user/index.vue

@@ -185,7 +185,6 @@
 								<text class="text">隐私保护</text>
 							</view> -->
 
-
 							<!-- 测试用下面的 -->
 							<view v-if="Version" class="item no-marin-bottom align-top" @click="navgetTo('/pages_course/livingList')">
 								<image

+ 17 - 32
pages_course/living.vue

@@ -169,18 +169,17 @@
 				</view>
 				<!-- v-if="!hasReachedTarget" -->
 				<!-- &&liveItem.completionPointsEnabled -->
-				<view class="progress-countdown end" :class="liveItem.showType==2?' progress-vertical':''"
+				<!-- <view class="progress-countdown end" :class="liveItem.showType==2?' progress-vertical':''"
 					:style="{ 'display':isFocus?'none':''}"
 					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>
 					</view>
-					<!-- 剩余 -->
 					<view class="progress-text">
 						倒计时{{ formattedCountdown.hours||'00' }}:{{ formattedCountdown.minutes||'00' }}:{{ formattedCountdown.seconds||"00" }}
 					</view>
-				</view>
+				</view> -->
 				<view class="slide-group" v-if="!isFocus && !isFullscreen">
 					<view class="action-button-group end">
 						<view :class="[liveItem.showType === 1 ? 'horizontal' : 'vertical','icon-button','ml20']">
@@ -391,13 +390,12 @@
 			<!-- :show="!!integral.status" -->
 			<!-- :show="showPoints"  -->
 			<!-- :show="shouldShowIntegralPopup" -->
-			<u-popup :show="shouldShowIntegralPopup" round="20rpx" mode="center" bgColor="#ffffff" zIndex="10076">
+			<!-- <u-popup :show="shouldShowIntegralPopup" round="20rpx" mode="center" bgColor="#ffffff" zIndex="10076">
 				<view class="integral-popup color9">
 					<view class="integral-header">
 						<view class="integral-title">观看视频领积分</view>
 						<image class="integral-background-image"
-							src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/userapp/images/integral_bg.png"
-							mode="widthFix" />
+							src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/userapp/images/integral_bg.png" mode="widthFix" />
 					</view>
 					<view class="integral-content">
 						<view class="integral-item" v-for="(item,index ) in receiveList" :key="index">
@@ -407,7 +405,7 @@
 						</view>
 					</view>
 				</view>
-			</u-popup>
+			</u-popup> -->
 
 			<!-- 积分弹窗(时长) -->
 			<u-popup :show="!!integral.status" round="20rpx" mode="center" bgColor="#ffffff" zIndex="10076">
@@ -735,6 +733,7 @@
 		remainingTime,
 		updateWatchDuration,
 		receivePoints,
+		
 		integrallogs
 	} from '@/api/integral.js'
 	import dayjs from 'dayjs';
@@ -963,7 +962,8 @@
 				diffTotalTime: '',
 				address: '',
 				commonViewHeight: '',
-				user: {}
+				user: {},
+				watchDuration:0,
 			};
 		},
 		async onLoad(options) {
@@ -1125,7 +1125,7 @@
 		},
 		async onShow() {
 			if (this.isVideoPlaying && this.pointsRemainingTime > 0) {
-				this.startCountdown();
+				//this.startCountdown();
 			}
 			// 检查视频是否在播放状态
 			if (this.videoContext) {
@@ -1264,7 +1264,8 @@
 		},
 		computed: {
 			shouldShowIntegralPopup() {
-				// 只有当 showPoints 为 true 且 receiveList 有数据时才显示
+				//只有当 showPoints 为 true 且 receiveList 有数据时才显示
+				return false;
 				return this.showPoints && this.receiveList && this.receiveList.length > 0;
 			},
 			// 格式化后的倒计时
@@ -1418,7 +1419,7 @@
 		onVideoStateChange(e) {
 			// 这里可以根据视频状态控制倒计时
 			if (e.detail.code === 2004) { // 视频开始播放
-				this.startCountdown();
+				//this.startCountdown();
 			} else if (e.detail.code === 2006) { // 视频播放结束
 				this.stopCountdown();
 			}
@@ -1573,6 +1574,7 @@
 						this.pointsRemainingTime = res.data.remainingTime;
 						this.hasReceived = res.data.hasReceived;
 						this.videoDuration = res.data.videoDuration;
+						this.watchDuration = res.data.watchDuration; //停留时长
 						console.log("查询当前用户当前直播间领取积分的剩余时长", res)
 					}
 				}).catch((error) => {
@@ -1723,12 +1725,8 @@
 				// uni-app 不需要手动移除监听,生命周期自动管理
 				console.log('页面可见性监听已移除');
 			},
-
-
-
 			// 开始倒计时
 			startCountdown() {
-
 				if (this.countdownTimer) {
 					clearInterval(this.countdownTimer);
 				}
@@ -1738,10 +1736,9 @@
 					this.isCountdownActive = false;
 					return;
 				}
-
+			
 				this.isCountdownActive = true;
 				this.lastUpdateTime = Date.now();
-
 				this.countdownTimer = setInterval(() => {
 					console.log("进入倒计时")
 					this.updateCountdown();
@@ -1754,28 +1751,23 @@
 					this.stopCountdown();
 					return;
 				}
-
 				const now = Date.now();
 				// 使用更精确的时间差计算(毫秒)
 				const elapsedMs = now - this.lastUpdateTime;
-
 				// 转换为秒(保留小数位避免累积误差)
 				const elapsedSeconds = elapsedMs / 1000;
-
 				console.log(`时间差: ${elapsedMs}ms, ${elapsedSeconds.toFixed(3)}秒`);
 
 				if (elapsedSeconds > 0) {
 					// 精确减少剩余时间
 					this.pointsRemainingTime = Math.max(0, this.pointsRemainingTime - elapsedSeconds);
+					console.log("qxj pointsRemainingTime",this.pointsRemainingTime);
 					this.lastUpdateTime = now;
-
 					// 更新显示
 					this.updateCountdownDisplay();
-
 					// 倒计时完成(使用小于等于0判断)
 					if (this.pointsRemainingTime <= 0) {
 						
-						
 					}
 				}
 			},
@@ -1859,7 +1851,6 @@
 			formatCountdown(seconds) {
 				// 1. 先校验输入:确保是有效正整数,避免负数/非数字导致计算错误
 				const totalSeconds = Math.max(0, Math.floor(Number(seconds) || 0));
-
 				// 2. 重新梳理计算逻辑(核心修复)
 				const hours = Math.floor(totalSeconds / 3600);
 				const remainingAfterHours = totalSeconds % 3600; // 小时取余后剩余的秒数
@@ -1907,7 +1898,6 @@
 				// 如果需要,可以在这里触发视图更新
 				this.$forceUpdate();
 			},
-
 			// 补零函数
 			padZero(num) {
 				return num < 10 ? `0${num}` : num.toString();
@@ -2615,8 +2605,7 @@
 					// 延迟重新加载
 					setTimeout(() => {
 						// 重新设置视频源,强制清理缓存
-						this.$set(this.liveItem, 'videoUrl', this.liveItem.videoUrl + '&t=' + Date
-							.now());
+						this.$set(this.liveItem, 'videoUrl', this.liveItem.videoUrl + '&t=' + Date.now());
 
 						// 恢复播放位置
 						setTimeout(() => {
@@ -3905,7 +3894,7 @@
 			// 视频播放
 			onVideoPlay(e) {
 				if (this.liveItem.status == 2) {
-					this.startCountdown();
+					//this.startCountdown();
 					// 启动观看时长统计
 					this.startWatchDurationTracking();
 				}
@@ -7610,16 +7599,13 @@
 				z-index: 5;
 				border-radius: 20rpx;
 				width: 320rpx;
-
 				.coupon-container {
 					width: 100%;
 					position: relative;
-
 					.coupon-background {
 						height: 452rpx;
 						width: 100%;
 					}
-
 					.coupon-header {
 						position: absolute;
 						height: 120rpx;
@@ -7628,7 +7614,6 @@
 						width: 100%;
 						z-index: 6;
 					}
-
 					.coupon-close-button {
 						position: absolute;
 						right: 10rpx;

+ 1 - 1
pages_shopping/live/confirmCreateOrder.vue

@@ -816,4 +816,4 @@
 		line-height: 0.44 * 100rpx;
 		background-color: red;
 	}
-</style>
+</style>