|
@@ -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 {
|
|
|
// 获取支付类型
|
|
@@ -1404,7 +1426,7 @@ export default defineComponent({
|
|
|
await getRegisterGoods();
|
|
|
nextTick(() => {
|
|
|
// 一页展示(必买)才显示团购提示弹窗
|
|
|
- if (forms.registerType === 'MUST_BUY_GOODS' && browser().weixin) {
|
|
|
+ if (forms.registerType === 'MUST_BUY_GOODS' && !browser().weixin) {
|
|
|
state.tipBoxPop = true
|
|
|
tipCountdown(3)
|
|
|
}
|
|
@@ -2205,13 +2227,13 @@ export default defineComponent({
|
|
|
</MPopup>
|
|
|
|
|
|
{/* 是否在微信中打开 */}
|
|
|
- <OWxTip
|
|
|
+ {/* <OWxTip
|
|
|
show={forms.showTips}
|
|
|
message={forms.showMessage}
|
|
|
showButton={forms.showButton}
|
|
|
buttonText="刷新"
|
|
|
onConfirm={() => window.location.reload()}
|
|
|
- />
|
|
|
+ /> */}
|
|
|
|
|
|
<MMessageTip
|
|
|
show={otherParams.showOtherSchool}
|
|
@@ -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>
|