|
@@ -196,11 +196,11 @@
|
|
<van-field label="性别" name="sex" :rules="[{ required: true, message: '请选择性别' }]">
|
|
<van-field label="性别" name="sex" :rules="[{ required: true, message: '请选择性别' }]">
|
|
<template #input>
|
|
<template #input>
|
|
<van-radio-group v-model="stu.sex" checked-color="#9A64FF" direction="horizontal">
|
|
<van-radio-group v-model="stu.sex" checked-color="#9A64FF" direction="horizontal">
|
|
- <van-tag size="large" type="primary" :color="!(stu.sex === 1) ? '#EAEAEA' : '#64A9FF'"
|
|
|
|
|
|
+ <van-tag size="large" type="primary" :color="!(stu.sex === 1) ? '#EAEAEA' : '#9A64FF'"
|
|
:text-color="!(stu.sex === 1) ? '#AAA' : '#FFF'" class="radioSection" round>
|
|
:text-color="!(stu.sex === 1) ? '#AAA' : '#FFF'" class="radioSection" round>
|
|
<van-radio class="radioItem" :name="1"></van-radio>男生
|
|
<van-radio class="radioItem" :name="1"></van-radio>男生
|
|
</van-tag>
|
|
</van-tag>
|
|
- <van-tag size="large" type="primary" :color="!(stu.sex === 0) ? '#EAEAEA' : '#64A9FF'"
|
|
|
|
|
|
+ <van-tag size="large" type="primary" :color="!(stu.sex === 0) ? '#EAEAEA' : '#9A64FF'"
|
|
:text-color="!(stu.sex === 0) ? '#AAA' : '#FFF'" class="radioSection" round>
|
|
:text-color="!(stu.sex === 0) ? '#AAA' : '#FFF'" class="radioSection" round>
|
|
<van-radio class="radioItem" :name="0"></van-radio>女生
|
|
<van-radio class="radioItem" :name="0"></van-radio>女生
|
|
</van-tag>
|
|
</van-tag>
|
|
@@ -211,14 +211,14 @@
|
|
:rules="[{ required: true, message: '请选择在读年级', trigger: 'onChange' }]" @click="pickerChange"
|
|
:rules="[{ required: true, message: '请选择在读年级', trigger: 'onChange' }]" @click="pickerChange"
|
|
placeholder="请选择在读年级">
|
|
placeholder="请选择在读年级">
|
|
<template #right-icon>
|
|
<template #right-icon>
|
|
- <van-icon name="arrow" :color="checkPhone ? '#aaa' : '#323233'" size="16"></van-icon>
|
|
|
|
|
|
+ <van-icon name="arrow" :color="'#323233'" size="16"></van-icon>
|
|
</template>
|
|
</template>
|
|
</van-field>
|
|
</van-field>
|
|
<van-field label="所在班级" v-model="stu.currentClass" readonly name="currentClass"
|
|
<van-field label="所在班级" v-model="stu.currentClass" readonly name="currentClass"
|
|
:rules="[{ required: true, message: '请选择所在班级', trigger: 'onChange' }]" @click="pickerChange1"
|
|
:rules="[{ required: true, message: '请选择所在班级', trigger: 'onChange' }]" @click="pickerChange1"
|
|
placeholder="请选择所在班级">
|
|
placeholder="请选择所在班级">
|
|
<template #right-icon>
|
|
<template #right-icon>
|
|
- <van-icon name="arrow" :color="checkPhone ? '#aaa' : '#323233'" size="16"></van-icon>
|
|
|
|
|
|
+ <van-icon name="arrow" :color="'#323233'" size="16"></van-icon>
|
|
</template>
|
|
</template>
|
|
</van-field>
|
|
</van-field>
|
|
</van-cell-group>
|
|
</van-cell-group>
|
|
@@ -228,7 +228,7 @@
|
|
:rules="[{ required: true, message: '请选择选报声部', trigger: 'onChange' }]" @click="pickerChange2"
|
|
:rules="[{ required: true, message: '请选择选报声部', trigger: 'onChange' }]" @click="pickerChange2"
|
|
placeholder="请选择选报声部">
|
|
placeholder="请选择选报声部">
|
|
<template #right-icon>
|
|
<template #right-icon>
|
|
- <van-icon name="arrow" :color="checkPhone ? '#aaa' : '#323233'" size="16"></van-icon>
|
|
|
|
|
|
+ <van-icon name="arrow" :color="'#323233'" size="16"></van-icon>
|
|
</template>
|
|
</template>
|
|
</van-field>
|
|
</van-field>
|
|
|
|
|
|
@@ -236,13 +236,13 @@
|
|
<template #input>
|
|
<template #input>
|
|
<van-radio-group v-model="stu.instrumentsPrepareMode" checked-color="#9A64FF" direction="horizontal">
|
|
<van-radio-group v-model="stu.instrumentsPrepareMode" checked-color="#9A64FF" direction="horizontal">
|
|
<van-tag size="large" type="primary"
|
|
<van-tag size="large" type="primary"
|
|
- :color="!(stu.instrumentsPrepareMode === 'GROUP_PURCHASE') ? '#EAEAEA' : '#64A9FF'"
|
|
|
|
|
|
+ :color="!(stu.instrumentsPrepareMode === 'GROUP_PURCHASE') ? '#EAEAEA' : '#9A64FF'"
|
|
:text-color="!(stu.instrumentsPrepareMode === 'GROUP_PURCHASE') ? '#AAA' : '#FFF'" class="radioSection"
|
|
:text-color="!(stu.instrumentsPrepareMode === 'GROUP_PURCHASE') ? '#AAA' : '#FFF'" class="radioSection"
|
|
round>
|
|
round>
|
|
<van-radio class="radioItem" name="GROUP_PURCHASE"></van-radio>团购
|
|
<van-radio class="radioItem" name="GROUP_PURCHASE"></van-radio>团购
|
|
</van-tag>
|
|
</van-tag>
|
|
<van-tag size="large" type="primary"
|
|
<van-tag size="large" type="primary"
|
|
- :color="!(stu.instrumentsPrepareMode === 'ONESELF') ? '#EAEAEA' : '#64A9FF'"
|
|
|
|
|
|
+ :color="!(stu.instrumentsPrepareMode === 'ONESELF') ? '#EAEAEA' : '#9A64FF'"
|
|
:text-color="!(stu.instrumentsPrepareMode === 'ONESELF') ? '#AAA' : '#FFF'" class="radioSection" round>
|
|
:text-color="!(stu.instrumentsPrepareMode === 'ONESELF') ? '#AAA' : '#FFF'" class="radioSection" round>
|
|
<van-radio class="radioItem" name="ONESELF"></van-radio>自备
|
|
<van-radio class="radioItem" name="ONESELF"></van-radio>自备
|
|
</van-tag>
|
|
</van-tag>
|
|
@@ -254,17 +254,16 @@
|
|
:rules="[{ required: true, message: '请选择乐团学习系统准备方式' }]">
|
|
:rules="[{ required: true, message: '请选择乐团学习系统准备方式' }]">
|
|
<template #input>
|
|
<template #input>
|
|
<van-radio-group v-model="stu.learningSystemPrepareMode" checked-color="#9A64FF" direction="horizontal">
|
|
<van-radio-group v-model="stu.learningSystemPrepareMode" checked-color="#9A64FF" direction="horizontal">
|
|
- <!-- :color="checkPhone ? '#ccc': '#9A64FF'" -->
|
|
|
|
<van-tag size="large" type="primary"
|
|
<van-tag size="large" type="primary"
|
|
- :color="!(stu.learningSystemPrepareMode === 'GROUP_PURCHASE') ? '#EAEAEA' : '#64A9FF'"
|
|
|
|
|
|
+ :color="!(stu.learningSystemPrepareMode === 'GROUP_PURCHASE') ? '#EAEAEA' : '#9A64FF'"
|
|
:text-color="!(stu.learningSystemPrepareMode === 'GROUP_PURCHASE') ? '#AAA' : '#FFF'"
|
|
:text-color="!(stu.learningSystemPrepareMode === 'GROUP_PURCHASE') ? '#AAA' : '#FFF'"
|
|
class="radioSection" round>
|
|
class="radioSection" round>
|
|
<van-radio class="radioItem" name="GROUP_PURCHASE"></van-radio>团购
|
|
<van-radio class="radioItem" name="GROUP_PURCHASE"></van-radio>团购
|
|
</van-tag>
|
|
</van-tag>
|
|
<van-tag size="large" type="primary"
|
|
<van-tag size="large" type="primary"
|
|
- :color="!(stu.learningSystemPrepareMode === 'ONESELF') ? '#EAEAEA' : '#64A9FF'"
|
|
|
|
- :text-color="!(stu.learningSystemPrepareMode === 'ONESELF') ? '#AAA' : '#FFF'"
|
|
|
|
- :color="checkPhone ? '#ccc': '#9A64FF'" class="radioSection" round>
|
|
|
|
|
|
+ :color="!(stu.learningSystemPrepareMode === 'ONESELF') ? '#EAEAEA' : '#9A64FF'"
|
|
|
|
+ :text-color="!(stu.learningSystemPrepareMode === 'ONESELF') ? '#AAA' : '#FFF'" :color="'#9A64FF'"
|
|
|
|
+ class="radioSection" round>
|
|
<van-radio class="radioItem" name="ONESELF"></van-radio>自备
|
|
<van-radio class="radioItem" name="ONESELF"></van-radio>自备
|
|
</van-tag>
|
|
</van-tag>
|
|
</van-radio-group>
|
|
</van-radio-group>
|
|
@@ -296,6 +295,13 @@
|
|
<div @click="onLinkUrl" class="submit-btn"></div>
|
|
<div @click="onLinkUrl" class="submit-btn"></div>
|
|
</div>
|
|
</div>
|
|
</van-popup>
|
|
</van-popup>
|
|
|
|
+
|
|
|
|
+ <van-popup v-model:show="showPopup" round style="width: 88%" :close-on-click-overlay="false" class="wxPopupDialog">
|
|
|
|
+ <div class="popupContainer">
|
|
|
|
+ <p class="title1">温馨提示</p>
|
|
|
|
+ <p class="popupTips">请使用微信打开</p>
|
|
|
|
+ </div>
|
|
|
|
+ </van-popup>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!-- 引入 Vue 和 Vant 的 JS 文件 -->
|
|
<!-- 引入 Vue 和 Vant 的 JS 文件 -->
|
|
@@ -347,13 +353,31 @@
|
|
learningSystemPrepareMode: null,
|
|
learningSystemPrepareMode: null,
|
|
},
|
|
},
|
|
btnLoading: false,
|
|
btnLoading: false,
|
|
- checkPhone: true
|
|
|
|
|
|
+ checkPhone: true,
|
|
|
|
+ showPopup: false
|
|
}
|
|
}
|
|
},
|
|
},
|
|
async mounted() {
|
|
async mounted() {
|
|
if (document.querySelector('#m_loading')) {
|
|
if (document.querySelector('#m_loading')) {
|
|
document.querySelector('#m_loading').remove()
|
|
document.querySelector('#m_loading').remove()
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ // 判断是否是微信,只能微信中打开
|
|
|
|
+ // if (!browser().weixin) {
|
|
|
|
+ // this.showPopup = true
|
|
|
|
+ // return
|
|
|
|
+ // } else {
|
|
|
|
+ // //授权
|
|
|
|
+ // const code = getUrlCode()
|
|
|
|
+ // console.log(code)
|
|
|
|
+ // if (!code) {
|
|
|
|
+ // this.getAppIdAndCode(window.location.href)
|
|
|
|
+ // return
|
|
|
|
+ // } else {
|
|
|
|
+ // state.code = code
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+
|
|
if (!this.orchestraId) {
|
|
if (!this.orchestraId) {
|
|
vant.showToast('信息获取失败,请联系老师')
|
|
vant.showToast('信息获取失败,请联系老师')
|
|
}
|
|
}
|
|
@@ -383,7 +407,6 @@
|
|
})
|
|
})
|
|
if (subjects.data.code === 200) {
|
|
if (subjects.data.code === 200) {
|
|
var rows = subjects.data.data.rows || []
|
|
var rows = subjects.data.data.rows || []
|
|
- // console.log(rows, 'rows')
|
|
|
|
rows.forEach(item => {
|
|
rows.forEach(item => {
|
|
this.subjectList.push({
|
|
this.subjectList.push({
|
|
text: item.name,
|
|
text: item.name,
|
|
@@ -401,6 +424,28 @@
|
|
this.setLoading(false)
|
|
this.setLoading(false)
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ async getAppIdAndCode(url) {
|
|
|
|
+ try {
|
|
|
|
+ var res = await axios.get('/api-school/open/paramConfig/wechatAppId')
|
|
|
|
+ // 判断是否有微信appId
|
|
|
|
+ if (res.data.code === 200 && res.data.data) {
|
|
|
|
+ vant.closeToast()
|
|
|
|
+ this.goAuth(res.data.data, url)
|
|
|
|
+ }
|
|
|
|
+ } catch {
|
|
|
|
+ //
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ goAuth(wxAppId, urlString) {
|
|
|
|
+ // 用户授权
|
|
|
|
+ console.log(urlString || window.location.href, 'urlString || window.location.href')
|
|
|
|
+ const urlNow = encodeURIComponent(urlString || window.location.href)
|
|
|
|
+ console.log(urlNow, 'urlNow')
|
|
|
|
+ const scope = 'snsapi_base' //snsapi_userinfo //静默授权 用户无感知
|
|
|
|
+ const appid = wxAppId || 'wx8654c671631cfade'
|
|
|
|
+ const url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${urlNow}&response_type=code&scope=${scope}&state=STATE&connect_redirect=1#wechat_redirect`
|
|
|
|
+ window.location.replace(url)
|
|
|
|
+ },
|
|
onLinkUrl() {
|
|
onLinkUrl() {
|
|
this.submitStatus = false
|
|
this.submitStatus = false
|
|
window.location.href = window.location.origin + '/orchestra-student/#/download'
|
|
window.location.href = window.location.origin + '/orchestra-student/#/download'
|
|
@@ -515,15 +560,12 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
pickerChange(type) {
|
|
pickerChange(type) {
|
|
- if (this.checkPhone) return
|
|
|
|
this.showPicker = true
|
|
this.showPicker = true
|
|
},
|
|
},
|
|
pickerChange1(type) {
|
|
pickerChange1(type) {
|
|
- if (this.checkPhone) return
|
|
|
|
this.classPicker = true
|
|
this.classPicker = true
|
|
},
|
|
},
|
|
pickerChange2(type) {
|
|
pickerChange2(type) {
|
|
- if (this.checkPhone) return
|
|
|
|
this.subjectPicker = true
|
|
this.subjectPicker = true
|
|
},
|
|
},
|
|
onConfirm(options) {
|
|
onConfirm(options) {
|