Pārlūkot izejas kodu

看课新增appid

XSLu08042 4 dienas atpakaļ
vecāks
revīzija
06b99c70cc

+ 1 - 0
App.vue

@@ -44,6 +44,7 @@ import { checkLogin } from '@/api/user.js'
 export default {
 	globalData: {
 		wsUrl: 'wss://websocket.cdwjyyh.com',
+		appId: 'wx73f85f8d62769119'
 	},
   onLaunch: function () {
 		// this.bindTIMEvent();

+ 3 - 0
api/course.js

@@ -32,6 +32,7 @@ export function courseAnswer(data) {
 
 // 记录看课时间(新)
 export function getFinishCourseVideo(data) {
+	if(!data||JSON.stringify(data)=='{}') return
 	return request('/app/course/updateWatchDuration', data, 'POST', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
 }
 
@@ -42,11 +43,13 @@ export function getIsAddKf(data) {
 
 // 流量(缓冲百分比)
 export function internetTraffic(data) {
+	if(!data||JSON.stringify(data)=='{}') return
 	return request('/app/course/getInternetTraffic', data, 'POST', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
 }
 
 // 每十分钟获得积分
 export function getIntegralByH5Video(data) {
+	if(!data||JSON.stringify(data)=='{}') return
 	return request('/app/course/getIntegralByH5Video', data, 'POST', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
 }
 

+ 2 - 1
pages/auth/login.vue

@@ -189,7 +189,8 @@ export default {
 							   encryptedData: e.detail.encryptedData,
 							   iv: e.detail.iv,
 							   code: code,
-							   tuiUserId:tuiUserId
+							   tuiUserId:tuiUserId,
+							   appId: getApp().globalData.appId
 							})
 							.then( res => {
 								uni.hideLoading();

+ 1 - 5
pages/user/index.vue

@@ -109,11 +109,7 @@
 							<image class="min-image" src="https://cos.his.cdwjyyh.com/fs/20250417/0eeec4b825534bfa8833eaf212cf803c.png"></image>
 							<view class="title">健康管家</view>
 						</view>
-						
-						
-						
-					</view>
-					<view class="menu-box">
+
 						<view class="menu" @click="loginNavTo('/pages_user/myCouponList')">
 							<image class="min-image" src="../../static/images/icon_my_coupon.png"></image>
 							<view class="title">我的优惠卷</view>

+ 1 - 1
pages_course/feedback.vue

@@ -322,7 +322,7 @@
 										title: '处理中...',
 										icon: 'loading'
 								    });
-									loginByMp({code: loginRes.code,encryptedData:infoRes.encryptedData,iv:infoRes.iv}).then(res=>{
+									loginByMp({code: loginRes.code,encryptedData:infoRes.encryptedData,iv:infoRes.iv,appId: getApp().globalData.appId}).then(res=>{
 										 uni.hideLoading();
 										 if (res.code == 200) {
 											uni.setStorageSync('AppTokenmini_RTCourse', res.token);

+ 4 - 3
pages_course/video.vue

@@ -72,7 +72,7 @@
 			@getActiveDanmus="getActiveDanmus"></commentBox>
 		<view id="title-contentnav"> 
 			<template v-show="isLogin&&notice">
-				<u-notice-bar :text="notice" color="red" speed='60'></u-notice-bar>
+				<u-notice-bar :text="notice" color="red" speed='60' fontSize="18"></u-notice-bar>
 			</template>
 			<view class="title-content" v-if="openCommentStatus!=1">
 				<!-- 答题时展示小节课程名,其他展示课程名 -->
@@ -944,7 +944,8 @@
 					const param = {
 						...this.urlOption,
 						rewardType: Number(this.currentReward),
-						source: 2
+						source: 2,
+						appId: getApp().globalData.appId
 					}
 					sendReward(param).then(res => {
 						uni.showToast({
@@ -1129,7 +1130,7 @@
 										title: '处理中...',
 										icon: 'loading'
 								    });
-									loginByMp({code: loginRes.code,encryptedData:infoRes.encryptedData,iv:infoRes.iv}).then(res=>{
+									loginByMp({code: loginRes.code,encryptedData:infoRes.encryptedData,iv:infoRes.iv,appId: getApp().globalData.appId}).then(res=>{
 										 uni.hideLoading();
 										 if (res.code == 200) {
 											uni.setStorageSync('AppTokenmini_RTCourse', res.token);

+ 3 - 2
pages_course/videoOld.vue

@@ -880,7 +880,8 @@
 					const param = {
 						...this.urlOption,
 						rewardType: Number(this.currentReward),
-						source: 2
+						source: 2,
+						appId: getApp().globalData.appId
 					}
 					sendReward(param).then(res => {
 						uni.showToast({
@@ -1074,7 +1075,7 @@
 										title: '处理中...',
 										icon: 'loading'
 								    });
-									loginByMp({code: loginRes.code,encryptedData:infoRes.encryptedData,iv:infoRes.iv}).then(res=>{
+									loginByMp({code: loginRes.code,encryptedData:infoRes.encryptedData,iv:infoRes.iv,appId: getApp().globalData.appId}).then(res=>{
 										 uni.hideLoading();
 										 if (res.code == 200) {
 											uni.setStorageSync('AppTokenmini_RTCourse', res.token);