瀏覽代碼

学生不分润

skyblued 2 年之前
父節點
當前提交
f8fa6379dd

+ 2 - 2
src/student/live-class/live-detail.tsx

@@ -109,9 +109,9 @@ export default defineComponent({
   async mounted() {
     await this._init()
     if (/(localhost|192)/g.test(location.origin)) {
-      this.shareUrl = `https://dev.colexiu.com/teacher/#/shareLive?recomUserId=${state.user.data?.userId}&groupId=${this.groupId}`
+      this.shareUrl = `https://dev.colexiu.com/teacher/#/shareLive?recomUserId=${state.user.data?.userId}&groupId=${this.groupId}&userType=${state.platformType}`
     } else {
-      this.shareUrl = `${location.origin}/teacher/#/shareLive?recomUserId=${state.user.data?.userId}&groupId=${this.groupId}`
+      this.shareUrl = `${location.origin}/teacher/#/shareLive?recomUserId=${state.user.data?.userId}&groupId=${this.groupId}&userType=${state.platformType}`
     }
   },
   methods: {

+ 2 - 2
src/student/video-class/video-detail.tsx

@@ -31,9 +31,9 @@ export default defineComponent({
   async mounted() {
     await this._init()
     if (/(localhost|192)/g.test(location.origin)) {
-      this.shareUrl = `https://dev.colexiu.com/teacher#/shareVideo?recomUserId=${state.user.data?.userId}&groupId=${this.params.groupId}`
+      this.shareUrl = `https://dev.colexiu.com/teacher#/shareVideo?recomUserId=${state.user.data?.userId}&groupId=${this.params.groupId}&userType=${state.platformType}`
     } else {
-      this.shareUrl = `${location.origin}/teacher#/shareVideo?recomUserId=${state.user.data?.userId}&groupId=${this.params.groupId}`
+      this.shareUrl = `${location.origin}/teacher#/shareVideo?recomUserId=${state.user.data?.userId}&groupId=${this.params.groupId}&userType=${state.platformType}`
     }
   },
   methods: {

+ 1 - 1
src/teacher/share-page/share-live/index.tsx

@@ -142,7 +142,7 @@ export default defineComponent({
       const { origin } = location
       let str = origin + '/student/#/liveDetail'
       const params = this.$route.query
-      str += `?recomUserId=${this.recomUserId}&groupId=${params.groupId}`
+      str += `?recomUserId=${params.userType && params.userType == 'STUDENT' ? '' : this.recomUserId}&groupId=${params.groupId}`
       shareCall(str, {})
     },
     onShare() {

+ 1 - 1
src/teacher/share-page/share-mall/index.tsx

@@ -97,7 +97,7 @@ export default defineComponent({
       const query = this.$route.query
       const str =
         origin +
-        `/student/#/goodsDetail?id=${query.bizId}&promoterId=${query.userId}`
+        `/student/#/goodsDetail?id=${query.bizId}&promoterId=${query.userType && query.userType == 'STUDENT' ? '' : query.userId}`
       shareCall(str, {})
     }
   },

+ 1 - 1
src/teacher/share-page/share-video/index.tsx

@@ -128,7 +128,7 @@ export default defineComponent({
       const { origin } = location
       let str = origin + '/student/#/videoDetail'
       const params = this.$route.query
-      str += `?recomUserId=${this.recomUserId}&groupId=${params.groupId}`
+      str += `?recomUserId=${params.userType && params.userType == 'STUDENT' ? '' : this.recomUserId}&groupId=${params.groupId}`
       console.log(str)
       shareCall(str, {})
     },

+ 1 - 0
src/teacher/share-page/share-vip/index.tsx

@@ -21,6 +21,7 @@ export default defineComponent({
   name: 'MemberCenter',
   data() {
     const query = this.$route.query
+    query.recomUserId = query.userType && query.userType == 'STUDENT' ? '' : query.recomUserId
     const tmpUrl = `${location.origin}/student/#/memberCenter?${qs.stringify(
       query
     )}`

+ 1 - 2
src/views/member-center/index.tsx

@@ -132,8 +132,7 @@ export default defineComponent({
           }
         })
 
-        // 只有老师端才会有分享功能
-        this.shareUrl = `${location.origin}/teacher#/shareVip?recomUserId=${this.userInfo.id}&activityId=${res.data.activityId}`
+        this.shareUrl = `${location.origin}/teacher#/shareVip?recomUserId=${this.userInfo.id}&activityId=${res.data.activityId}&userType=${state.platformType}`
         this.shareStatus = true
         this.shareDiscount = res.data.discount || 0
         // let url =

+ 1 - 1
src/views/music/component/song/index.tsx

@@ -75,7 +75,7 @@ export default defineComponent({
         })
         let url =
           location.origin +
-          `/accompany/colexiu-share.html?id=${moreData.value.id}&recomUserId=${state.user.data?.userId}`
+          `/accompany/colexiu-share.html?id=${moreData.value.id}&recomUserId=${state.user.data?.userId}&userType=${state.platformType}`
         // 判断是否有活动
         if (res.data.discount === 1) {
           url += `&activityId=${res.data.activityId}`

+ 2 - 2
src/views/shop-mall/goods-detail/index.tsx

@@ -99,9 +99,9 @@ export default defineComponent({
       // 分享链接
       const productId = this.product.id as any
       if (browser().isApp) {
-        return `${location.origin}/teacher/#/shareMall?bizId=${productId}&userId=${state.user.data.userId}`
+        return `${location.origin}/teacher/#/shareMall?bizId=${productId}&userId=${state.user.data.userId}&userType=${state.platformType}`
       } else {
-        return `${location.origin}/teacher.html#/shareMall?bizId=${productId}&userId=${state.user.data.userId}`
+        return `${location.origin}/teacher.html#/shareMall?bizId=${productId}&userId=${state.user.data.userId}&userType=${state.platformType}`
       }
     }
   },