فهرست منبع

fix:直播/回放分享进去

xuqiaoying 3 سال پیش
والد
کامیت
34488430d4
2فایلهای تغییر یافته به همراه18 افزوده شده و 17 حذف شده
  1. 2 2
      common/request.js
  2. 16 15
      pages/webview/index.vue

+ 2 - 2
common/request.js

@@ -5,8 +5,8 @@ import api from './api.js'
 var num = 1
 //接口api   
 // export const BASE_URL = 'https://api.xyyxt.net'   //release
-export const BASE_URL = 'https://test.xyyxt.net'   //预发布
-// export const BASE_URL = 'http://120.79.166.78:19012' // 测试环境
+// export const BASE_URL = 'https://test.xyyxt.net'   //预发布
+export const BASE_URL = 'http://120.79.166.78:19012' // 测试环境
 // export const BASE_URL = 'http://42.192.164.187:19005'    //test(后端本地)
 // export const BASE_URL = 'http://192.168.1.222:5055'    //后端本地更新到222
 // export const BASE_URL = 'http://192.168.1.24:5055'    //后端本地

+ 16 - 15
pages/webview/index.vue

@@ -42,21 +42,21 @@ export default {
       vid: '', // 回放id
     };
   },
-  onShareAppMessage() {
-    let item = this.paramObj
-    let moduleId = item.moduleId || 0
-    let chapterId = item.chapterId || 0
-    let sectionId = item.sectionId
-    let uuid = new Date().valueOf() + ""
-    // buyCourse 是否购买课程:1是 0否
-    let encode = encodeURIComponent(WEBVIEW_URL+'pages/live/index?token='+uni.getStorageSync('token')+'&userInfo='+JSON.stringify(this.userInfo)+'&channelId='
-    +item.liveUrl+'&gradeId='+0+'&courseId='+item.courseId+'&goodsId='+item.goodsId+'&orderGoodsId='+item.orderGoodsId+'&sectionId='+sectionId+'&chapterId='
-    +chapterId+'&moduleId='+moduleId+'&buyCourse='+item.buyCourse+'&ident='+uuid+'&sectionType='+this.sectionType+'&vid='+this.vid)
-		return {
-			title: '直播',
-			path: `/pages/webview/index?url=` + encode
-		};
-	},
+  // onShareAppMessage() {
+  //   let item = this.paramObj
+  //   let moduleId = item.moduleId || 0
+  //   let chapterId = item.chapterId || 0
+  //   let sectionId = item.sectionId
+  //   let uuid = new Date().valueOf() + ""
+  //   // buyCourse 是否购买课程:1是 0否
+  //   let encode = encodeURIComponent(WEBVIEW_URL+'pages/live/index?token='+uni.getStorageSync('token')+'&userInfo='+JSON.stringify(this.userInfo)+'&channelId='
+  //   +item.channelId+'&gradeId='+0+'&courseId='+item.courseId+'&goodsId='+item.goodsId+'&orderGoodsId='+item.orderGoodsId+'&sectionId='+sectionId+'&chapterId='
+  //   +chapterId+'&moduleId='+moduleId+'&buyCourse='+item.buyCourse+'&ident='+uuid+'&sectionType='+this.sectionType+'&vid='+this.vid)
+	// 	return {
+	// 		title: '直播',
+	// 		path: `/pages/webview/index?url=` + encode
+	// 	};
+	// },
   onLoad(option) {
     console.log('--option-', option)
     this.options = option
@@ -87,6 +87,7 @@ export default {
       }
       this.paramObj = paramObj
       this.sectionType = this.paramObj.sectionType || 2 // 默认直播,回放的加了sectionType=3
+      this.vid = this.paramObj.vid || ''
       console.log('paramObj', paramObj)
       this.studyLog(paramObj)
     }