|
@@ -1359,6 +1359,28 @@ export default defineComponent({
|
|
|
}, 1000); // 每秒执行一次
|
|
|
}
|
|
|
|
|
|
+ // 切换学生,匹配赠送的乐器信息
|
|
|
+ const matchSwitchInstrument = (val: any) => {
|
|
|
+ if (forms.registerType === 'MUST_BUY_GOODS') {
|
|
|
+ // 学校
|
|
|
+ // if (forms.schoolInstrumentSetType === 'SCHOOL') {
|
|
|
+ // state.currentIntrument = state.intrumentList.find((item: any) => item.schoolId === val.schoolId)
|
|
|
+ // }
|
|
|
+ // if (!state.intrumentList.find((item: any) => item.schoolId === val.schoolId)) {
|
|
|
+ // state.currentIntrument = null;
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // 年级
|
|
|
+ if (forms.schoolInstrumentSetType === 'GRADE') {
|
|
|
+ state.currentIntrument = state.intrumentList.find((item: any) => item.gradeNum === val.currentGradeNum)
|
|
|
+ }
|
|
|
+ // 班级
|
|
|
+ if (forms.schoolInstrumentSetType === 'CLASS') {
|
|
|
+ state.currentIntrument = state.intrumentList.find((item: any) => (item.classNum === val.currentClass && item.gradeNum === val.currentGradeNum) )
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
onMounted(async () => {
|
|
|
try {
|
|
|
// 获取支付类型
|
|
@@ -1823,7 +1845,7 @@ export default defineComponent({
|
|
|
{
|
|
|
forms.detailVip.giftFlag &&
|
|
|
<div class={styles.extItem}>
|
|
|
- <img class={styles.toolImg} src={giftCard2Icon} />
|
|
|
+ <img class={styles.toolImg} src={forms.detailVip.giftGoodsUrl} />
|
|
|
<div class={styles.toolRight}>
|
|
|
<p>乐器AI学练工具{forms.detailVip.giftPeriod === 'YEAR' ? convertToChineseNumber(forms.detailVip.giftVipDay) : forms.detailVip.giftVipDay}{forms.detailVip.zsUnit}卡</p>
|
|
|
<div class={styles.trBottom}>
|
|
@@ -2279,6 +2301,7 @@ export default defineComponent({
|
|
|
list={forms.studentList}
|
|
|
onClose={() => (forms.showSelectStudent = false)}
|
|
|
onConfirm={(val: any) => {
|
|
|
+ console.log('测试111')
|
|
|
if (val.userId) {
|
|
|
forms.studentItem = val;
|
|
|
const firstStudent = val;
|
|
@@ -2341,6 +2364,8 @@ export default defineComponent({
|
|
|
forms.showSelectStudent = false;
|
|
|
}
|
|
|
}
|
|
|
+ // 切换学生,需要更换显示的乐器
|
|
|
+ matchSwitchInstrument(val)
|
|
|
}}
|
|
|
/>
|
|
|
</Popup>
|
|
@@ -2348,7 +2373,7 @@ export default defineComponent({
|
|
|
{
|
|
|
state.tipBoxPop &&
|
|
|
<div class={styles.tipBoxPop}>
|
|
|
- <div class={styles.tipBox}>
|
|
|
+ <div class={[styles.tipBox, !state.giftDesc && styles.tipBox2]}>
|
|
|
<img class={styles.tipTitle} src={tipTitleIcon} />
|
|
|
<ul>
|
|
|
<li class={styles.tipItem}>
|