|
@@ -11,7 +11,7 @@ import {
|
|
|
Toast,
|
|
|
CellGroup
|
|
|
} from 'vant'
|
|
|
-import { state as appState } from '@/state'
|
|
|
+import { state as appState, state } from '@/state'
|
|
|
import { teachershowAudiType, teacherPaymentType } from '@/constant/music'
|
|
|
import { getXmlInfo, FormatXMLInfo } from '@/helpers/music-xml'
|
|
|
import Upload from './upload'
|
|
@@ -111,7 +111,8 @@ export default defineComponent({
|
|
|
fileInfo: {
|
|
|
url: '',
|
|
|
name: '' as any
|
|
|
- }
|
|
|
+ },
|
|
|
+ checked: false
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -171,6 +172,20 @@ export default defineComponent({
|
|
|
})
|
|
|
})
|
|
|
})
|
|
|
+
|
|
|
+ const resVersion = await request.post('/api-teacher/open/appVersion', {
|
|
|
+ data: {
|
|
|
+ platform:
|
|
|
+ state.platformType === 'STUDENT' ? 'ios-student' : 'ios-teacher',
|
|
|
+ version: state.version
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.checked = resVersion.data.check ? true : false
|
|
|
+ // 审核版本金额默认为0
|
|
|
+ if (this.checked) {
|
|
|
+ this.musicPrice = '0'
|
|
|
+ this.paymentType = 'FREE'
|
|
|
+ }
|
|
|
},
|
|
|
methods: {
|
|
|
async setDetail(id: string) {
|
|
@@ -585,9 +600,15 @@ export default defineComponent({
|
|
|
this.naiveMp3File()
|
|
|
}}
|
|
|
>
|
|
|
- {this.mp3Url
|
|
|
- ? <span style='text-decoration-line: underline;color: #14BC9C;'>{this.fileName(this.mp3Url)}</span>
|
|
|
- : <span style='text-decoration-line: underline;color: #14BC9C;'>上传伴奏文件</span>}
|
|
|
+ {this.mp3Url ? (
|
|
|
+ <span style="text-decoration-line: underline;color: #14BC9C;">
|
|
|
+ {this.fileName(this.mp3Url)}
|
|
|
+ </span>
|
|
|
+ ) : (
|
|
|
+ <span style="text-decoration-line: underline;color: #14BC9C;">
|
|
|
+ 上传伴奏文件
|
|
|
+ </span>
|
|
|
+ )}
|
|
|
</Button>
|
|
|
|
|
|
{this.mp3Url && !this.auditDisabled && (
|
|
@@ -655,9 +676,13 @@ export default defineComponent({
|
|
|
this.naiveMidFile()
|
|
|
}}
|
|
|
>
|
|
|
- {this.midiFileUrl
|
|
|
- ? this.fileName(this.midiFileUrl)
|
|
|
- : <span style='text-decoration-line: underline;color: #14BC9C;'>上传MIDI文件</span>}
|
|
|
+ {this.midiFileUrl ? (
|
|
|
+ this.fileName(this.midiFileUrl)
|
|
|
+ ) : (
|
|
|
+ <span style="text-decoration-line: underline;color: #14BC9C;">
|
|
|
+ 上传MIDI文件
|
|
|
+ </span>
|
|
|
+ )}
|
|
|
</Button>
|
|
|
|
|
|
{this.midiFileUrl && !this.auditDisabled && (
|
|
@@ -714,9 +739,13 @@ export default defineComponent({
|
|
|
this.naiveXMLFile()
|
|
|
}}
|
|
|
>
|
|
|
- {this.xmlFileUrl
|
|
|
- ? this.fileName(this.xmlFileUrl)
|
|
|
- : <span style='text-decoration-line: underline;color: #14BC9C;'>上传XML文件</span>}
|
|
|
+ {this.xmlFileUrl ? (
|
|
|
+ this.fileName(this.xmlFileUrl)
|
|
|
+ ) : (
|
|
|
+ <span style="text-decoration-line: underline;color: #14BC9C;">
|
|
|
+ 上传XML文件
|
|
|
+ </span>
|
|
|
+ )}
|
|
|
</Button>
|
|
|
|
|
|
{this.xmlFileUrl && !this.auditDisabled && (
|
|
@@ -805,7 +834,15 @@ export default defineComponent({
|
|
|
this.naiveBGMp3File(index)
|
|
|
}}
|
|
|
>
|
|
|
- {mp3.url ? <span style='text-decoration-line: underline;color: #14BC9C;'>{this.fileName(mp3.url)}</span> : <span style='text-decoration-line: underline;color: #14BC9C;'>上传原声文件</span>}
|
|
|
+ {mp3.url ? (
|
|
|
+ <span style="text-decoration-line: underline;color: #14BC9C;">
|
|
|
+ {this.fileName(mp3.url)}
|
|
|
+ </span>
|
|
|
+ ) : (
|
|
|
+ <span style="text-decoration-line: underline;color: #14BC9C;">
|
|
|
+ 上传原声文件
|
|
|
+ </span>
|
|
|
+ )}
|
|
|
</Button>
|
|
|
|
|
|
{mp3.url && !this.auditDisabled && (
|
|
@@ -824,14 +861,16 @@ export default defineComponent({
|
|
|
accept=".mp3"
|
|
|
disabled={this.auditDisabled}
|
|
|
/>
|
|
|
- <div style={{ marginLeft: '8px' }}
|
|
|
+ <div
|
|
|
+ style={{ marginLeft: '8px' }}
|
|
|
onClick={() => {
|
|
|
this.listenAudioShow = true
|
|
|
this.fileInfo = {
|
|
|
url: mp3.url as any,
|
|
|
name: this.fileName(mp3.url)
|
|
|
}
|
|
|
- }}>
|
|
|
+ }}
|
|
|
+ >
|
|
|
{this.fileName(mp3.url)}
|
|
|
</div>
|
|
|
</>
|
|
@@ -983,66 +1022,68 @@ export default defineComponent({
|
|
|
</Field>
|
|
|
)}
|
|
|
|
|
|
- <Field required label="是否收费" center inputAlign="right">
|
|
|
- {{
|
|
|
- input: () => (
|
|
|
- <RadioGroup
|
|
|
- class={styles['radio-group']}
|
|
|
- modelValue={this.paymentType}
|
|
|
- onUpdate:modelValue={val => {
|
|
|
- this.paymentType = val
|
|
|
- }}
|
|
|
- disabled={this.auditDisabled}
|
|
|
- >
|
|
|
- {Object.keys(teacherPaymentType).map((item: string) => {
|
|
|
- const isActive = item === String(this.paymentType)
|
|
|
- const type = isActive ? 'primary' : 'default'
|
|
|
- return (
|
|
|
- <Radio class={styles.radio} name={item}>
|
|
|
- <Tag size="large" plain={isActive} type={type}>
|
|
|
- {teacherPaymentType[item]}
|
|
|
- </Tag>
|
|
|
- </Radio>
|
|
|
- )
|
|
|
- })}
|
|
|
- </RadioGroup>
|
|
|
- )
|
|
|
- }}
|
|
|
- </Field>
|
|
|
- {this.paymentType === 'CHARGE' && (
|
|
|
+ {!this.checked && (
|
|
|
<>
|
|
|
- <Field
|
|
|
- label="收费价格"
|
|
|
- required
|
|
|
- border={false}
|
|
|
- class={styles.inputControl}
|
|
|
- placeholder=" "
|
|
|
- formatter={this.onFormatter}
|
|
|
- autocomplete="off"
|
|
|
- v-slots={{ button: () => '元' }}
|
|
|
- modelValue={this.musicPrice}
|
|
|
- maxlength={8}
|
|
|
- center
|
|
|
- rules={[
|
|
|
- { required: true, validator, message: '请输入收费价格' }
|
|
|
- ]}
|
|
|
- errorMessageAlign="right"
|
|
|
- onUpdate:modelValue={val => (this.musicPrice = val)}
|
|
|
- />
|
|
|
+ <Field required label="是否收费" center inputAlign="right">
|
|
|
+ {{
|
|
|
+ input: () => (
|
|
|
+ <RadioGroup
|
|
|
+ class={styles['radio-group']}
|
|
|
+ modelValue={this.paymentType}
|
|
|
+ onUpdate:modelValue={val => {
|
|
|
+ this.paymentType = val
|
|
|
+ }}
|
|
|
+ disabled={this.auditDisabled}
|
|
|
+ >
|
|
|
+ {Object.keys(teacherPaymentType).map((item: string) => {
|
|
|
+ const isActive = item === String(this.paymentType)
|
|
|
+ const type = isActive ? 'primary' : 'default'
|
|
|
+ return (
|
|
|
+ <Radio class={styles.radio} name={item}>
|
|
|
+ <Tag size="large" plain={isActive} type={type}>
|
|
|
+ {teacherPaymentType[item]}
|
|
|
+ </Tag>
|
|
|
+ </Radio>
|
|
|
+ )
|
|
|
+ })}
|
|
|
+ </RadioGroup>
|
|
|
+ )
|
|
|
+ }}
|
|
|
+ </Field>
|
|
|
+ {this.paymentType === 'CHARGE' && (
|
|
|
+ <>
|
|
|
+ <Field
|
|
|
+ label="收费价格"
|
|
|
+ required
|
|
|
+ border={false}
|
|
|
+ class={styles.inputControl}
|
|
|
+ placeholder=" "
|
|
|
+ formatter={this.onFormatter}
|
|
|
+ autocomplete="off"
|
|
|
+ v-slots={{ button: () => '元' }}
|
|
|
+ modelValue={this.musicPrice}
|
|
|
+ maxlength={8}
|
|
|
+ center
|
|
|
+ rules={[
|
|
|
+ { required: true, validator, message: '请输入收费价格' }
|
|
|
+ ]}
|
|
|
+ errorMessageAlign="right"
|
|
|
+ onUpdate:modelValue={val => (this.musicPrice = val)}
|
|
|
+ />
|
|
|
|
|
|
- <div class={styles.rule}>
|
|
|
- <p>
|
|
|
- 扣除手续费后该曲目预计收入为:
|
|
|
- <span>
|
|
|
- {(
|
|
|
- ((parseFloat(this.musicPrice || '0') || 0) *
|
|
|
- (100 - this.music_sheet_service_fee)) /
|
|
|
- 100
|
|
|
- ).toFixed(2)}
|
|
|
- <span>元/人</span>
|
|
|
- </span>
|
|
|
- </p>
|
|
|
- {/* <p>
|
|
|
+ <div class={styles.rule}>
|
|
|
+ <p>
|
|
|
+ 扣除手续费后该曲目预计收入为:
|
|
|
+ <span>
|
|
|
+ {(
|
|
|
+ ((parseFloat(this.musicPrice || '0') || 0) *
|
|
|
+ (100 - this.music_sheet_service_fee)) /
|
|
|
+ 100
|
|
|
+ ).toFixed(2)}
|
|
|
+ <span>元/人</span>
|
|
|
+ </span>
|
|
|
+ </p>
|
|
|
+ {/* <p>
|
|
|
每人:
|
|
|
<span>
|
|
|
{(
|
|
@@ -1054,11 +1095,13 @@ export default defineComponent({
|
|
|
元/人
|
|
|
</p> */}
|
|
|
|
|
|
- <p>
|
|
|
- 您的乐谱收入在学员购买后{this.music_account_period}
|
|
|
- 天结算到您的账户中
|
|
|
- </p>
|
|
|
- </div>
|
|
|
+ <p>
|
|
|
+ 您的乐谱收入在学员购买后{this.music_account_period}
|
|
|
+ 天结算到您的账户中
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+ </>
|
|
|
+ )}
|
|
|
</>
|
|
|
)}
|
|
|
</CellGroup>
|