skyblued 2 年之前
父節點
當前提交
d9a98860d5
共有 2 個文件被更改,包括 7 次插入1 次删除
  1. 5 1
      src/teacher/music/upload/index.tsx
  2. 2 0
      src/views/article-center/special-detail.tsx

+ 5 - 1
src/teacher/music/upload/index.tsx

@@ -78,6 +78,7 @@ export default defineComponent({
       titleImg: '',
       accompanimentType: 'HOMEMODE',
       chargeType: 0,
+      paymentType: '',
       showFingering: 1,
       canEvaluate: 1,
       notation: 1,
@@ -112,6 +113,7 @@ export default defineComponent({
     chargeType() {
       if (this.chargeType === 0) {
         this.musicPrice = ''
+        this.paymentType = ''
       }
     }
   },
@@ -172,7 +174,8 @@ export default defineComponent({
     async setDetail(id: string) {
       try {
         const res = await request.get('/api-teacher/music/sheet/detail/' + id)
-        this.chargeType = res.data.chargeType === 'FREE' ? 0 : 2
+        this.chargeType = res.data.paymentType === 'FREE' ? 0 : 2
+        this.paymentType = res.data.paymentType
         this.showFingering = res.data.showFingering
         this.canEvaluate = res.data.canEvaluate
         if (this.chargeType) {
@@ -260,6 +263,7 @@ export default defineComponent({
         xmlFileUrl: this.xmlFileUrl,
         canEvaluate: Number(this.canEvaluate),
         chargeType: this.chargeType === 0 ? 'FREE' : 'CHARGE',
+        paymentType: this.paymentType ? this.paymentType : this.chargeType === 0 ? 'FREE' : 'CHARGE',
         exquisiteFlag: this.exquisiteFlag,
         composer: this.composer,
         musicPrice: this.chargeType === 0 ? 0 : this.musicPrice, // 当选择免费时,重置金额为0

+ 2 - 0
src/views/article-center/special-detail.tsx

@@ -1,3 +1,4 @@
+import { useEventTracking } from '@/helpers/hooks'
 import request from '@/helpers/request'
 import dayjs from 'dayjs'
 import { ImagePreview } from 'vant'
@@ -26,6 +27,7 @@ export default defineComponent({
         content
       }
     } catch {}
+    useEventTracking('热门资讯')
   },
   methods: {
     onShowImg(target: any) {