|
@@ -41,6 +41,7 @@ import requestOrigin from 'umi-request'
|
|
|
import UploadIcon from './upload.svg'
|
|
|
import ColUpload from '@/components/col-upload'
|
|
|
import { verifyNumberIntegerAndFloat } from '@/helpers/toolsValidate'
|
|
|
+import { state } from '@/state'
|
|
|
|
|
|
export type BackgroundMp3 = {
|
|
|
url?: string
|
|
@@ -103,7 +104,8 @@ export default defineComponent({
|
|
|
url: '',
|
|
|
track: ''
|
|
|
}
|
|
|
- ] as BackgroundMp3[]
|
|
|
+ ] as BackgroundMp3[],
|
|
|
+ checked: false
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -168,6 +170,18 @@ export default defineComponent({
|
|
|
this.setDetail(this.$route.params.id as string)
|
|
|
}
|
|
|
|
|
|
+ const resVersion = await request.post('/api-teacher/open/appVersion', {
|
|
|
+ data: {
|
|
|
+ platfrom:
|
|
|
+ state.platformType === 'STUDENT' ? 'ios-student' : 'ios-teacher',
|
|
|
+ version: state.version
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.checked = resVersion.data.check ? true : false
|
|
|
+ // 审核版本金额默认为0
|
|
|
+ if (this.checked) {
|
|
|
+ this.chargeType = 0
|
|
|
+ }
|
|
|
// }
|
|
|
},
|
|
|
methods: {
|
|
@@ -860,27 +874,32 @@ export default defineComponent({
|
|
|
})}
|
|
|
</RadioGroup>
|
|
|
</ColField> */}
|
|
|
- <ColField required title="是否收费" border={false}>
|
|
|
- <RadioGroup
|
|
|
- class={styles['radio-group']}
|
|
|
- modelValue={this.chargeType}
|
|
|
- onUpdate:modelValue={val => {
|
|
|
- this.chargeType = Number(val)
|
|
|
- }}
|
|
|
- >
|
|
|
- {Object.keys(teacherChargeType).map((item: string) => {
|
|
|
- const isActive = item === String(this.chargeType)
|
|
|
- const type = isActive ? 'primary' : 'default'
|
|
|
- return (
|
|
|
- <Radio class={styles.radio} name={item}>
|
|
|
- <Tag size="large" plain={isActive} type={type}>
|
|
|
- {teacherChargeType[item]}
|
|
|
- </Tag>
|
|
|
- </Radio>
|
|
|
- )
|
|
|
- })}
|
|
|
- </RadioGroup>
|
|
|
- </ColField>
|
|
|
+
|
|
|
+ {/* 判断是否是审核版本 */}
|
|
|
+ {!this.checked && (
|
|
|
+ <ColField required title="是否收费" border={false}>
|
|
|
+ <RadioGroup
|
|
|
+ class={styles['radio-group']}
|
|
|
+ modelValue={this.chargeType}
|
|
|
+ onUpdate:modelValue={val => {
|
|
|
+ this.chargeType = Number(val)
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ {Object.keys(teacherChargeType).map((item: string) => {
|
|
|
+ const isActive = item === String(this.chargeType)
|
|
|
+ const type = isActive ? 'primary' : 'default'
|
|
|
+ return (
|
|
|
+ <Radio class={styles.radio} name={item}>
|
|
|
+ <Tag size="large" plain={isActive} type={type}>
|
|
|
+ {teacherChargeType[item]}
|
|
|
+ </Tag>
|
|
|
+ </Radio>
|
|
|
+ )
|
|
|
+ })}
|
|
|
+ </RadioGroup>
|
|
|
+ </ColField>
|
|
|
+ )}
|
|
|
+
|
|
|
{this.chargeType === 2 && (
|
|
|
<ColField required title="收费价格">
|
|
|
<Field
|