lex 2 anni fa
parent
commit
5d69e28b30

+ 26 - 5
src/views/user-info/music-operation/index.tsx

@@ -75,19 +75,37 @@ export default defineComponent({
       },
       radioList: [], // 选中的人数
       tagStatus: false,
-      music_sheet_service_fee: 0
+      music_sheet_service_fee: 0,
+      music_account_period: 0
     }
   },
   async mounted() {
     document.title = this.type === 'create' ? '新建曲谱' : '编辑曲谱'
     try {
+      // await request
+      //   .get('/api-website/sysConfig/queryByParamName', {
+      //     params: {
+      //       paramName: 'music_sheet_service_fee'
+      //     }
+      //   })
+      //   .then(res => (this.music_sheet_service_fee = res.data.paramValue))
       await request
-        .get('/api-website/sysConfig/queryByParamName', {
+        .get('/api-website/sysConfig/queryByParamNameList', {
           params: {
-            paramName: 'music_sheet_service_fee'
+            paramNames: 'music_sheet_service_fee,music_account_period'
           }
         })
-        .then(res => (this.music_sheet_service_fee = res.data.paramValue))
+        .then((res: any) => {
+          console.log(res, 'res')
+          const data = res.data || []
+          data.forEach((item: any) => {
+            if (item.paramName === 'music_sheet_service_fee') {
+              this.music_sheet_service_fee = item.paramValue
+            } else if (item.paramName === 'music_account_period') {
+              this.music_account_period = item.paramValue
+            }
+          })
+        })
       await request.get('/api-website/open/subject/subjectSelect').then(res => {
         this.subjectList = res.data || []
       })
@@ -623,7 +641,10 @@ export default defineComponent({
                     </span>
                     元/人
                   </p>
-                  <p>您的乐谱收入将在学员购买后结算到您的账户中</p>
+                  <p>
+                    您的乐谱收入在学员购买后{this.music_account_period}
+                    天结算到您的账户中
+                  </p>
                 </div>
               </ElFormItem>
             </>

+ 4 - 1
src/views/user-info/video-operation/course-info/index.tsx

@@ -203,7 +203,10 @@ export default defineComponent({
               课程组总收入
               <span class="px-1 text-[#FF4E19]">{this.calcRatePrice}</span>元/人
             </p>
-            <p>您的课程收入将在课程结束后结算到您的账户中 </p>
+            <p>
+              您的课程收入将在学员购买{createState.video_account_period}
+              天后结算到您的账户中
+            </p>
           </div>
           {/* <ElFormItem label="课程封面" class="!mb-0" required>
            <ElTabs

+ 1 - 0
src/views/user-info/video-operation/createState.tsx

@@ -7,6 +7,7 @@ const original = () => {
     tabIndex: 1,
     loadingStatus: false,
     rate: 0, // 手续费
+    video_account_period: 0, //平台账期
     subjectList: [], // 声部列表
     templateList: [
       'https://ks3-cn-beijing.ksyuncs.com/video-course/1657853010619green.png',

+ 23 - 7
src/views/user-info/video-operation/index.tsx

@@ -96,15 +96,31 @@ export default defineComponent({
   async mounted() {
     document.title = this.type === 'create' ? '新建视频课' : '编辑视频课'
     try {
-      const sysConfig = await request.get(
-        '/api-website/sysConfig/queryByParamName',
-        {
+      // const sysConfig = await request.get(
+      //   '/api-website/sysConfig/queryByParamName',
+      //   {
+      //     params: {
+      //       paramName: 'video_lesson_service_fee'
+      //     }
+      //   }
+      // )
+      // createState.rate = sysConfig.data.paramValue
+      request
+        .get('/api-website/sysConfig/queryByParamNameList', {
           params: {
-            paramName: 'video_lesson_service_fee'
+            paramNames: 'video_lesson_service_fee,video_account_period'
           }
-        }
-      )
-      createState.rate = sysConfig.data.paramValue
+        })
+        .then((res: any) => {
+          const data = res.data || []
+          data.forEach((item: any) => {
+            if (item.paramName === 'video_lesson_service_fee') {
+              createState.rate = item.paramValue
+            } else if (item.paramName === 'video_account_period') {
+              createState.video_account_period = item.paramValue
+            }
+          })
+        })
     } catch {}
   },
   render() {