|
@@ -8,6 +8,7 @@ import OSticky from '@/components/o-sticky'
|
|
|
import student from './images/student-center.png'
|
|
|
import teacher from './images/teacher-center.png'
|
|
|
import manage from './images/manage-center.png'
|
|
|
+import request from '@/helpers/request'
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'download-transfer',
|
|
@@ -15,34 +16,50 @@ export default defineComponent({
|
|
|
return {
|
|
|
wxStatus: false,
|
|
|
type: 'student',
|
|
|
+ androidUrl: '',
|
|
|
buttonText: '下载管乐团学员端'
|
|
|
}
|
|
|
},
|
|
|
- mounted() {
|
|
|
+ async mounted() {
|
|
|
const { pn, url, action, pageTag, ...rest } = this.$route.query
|
|
|
const { origin, pathname } = location
|
|
|
let tempPathname = pathname
|
|
|
let beforeIos = 'BandMusicTeam://linkUrl='
|
|
|
let beforeAndroid = 'orchestrastudent://html:8888/SplashActivity?url='
|
|
|
-
|
|
|
+ let platform = 'android-student'
|
|
|
if (pn === 's') {
|
|
|
this.type = 'student'
|
|
|
this.buttonText = '下载管乐团学员端'
|
|
|
tempPathname = '/orchestra-student/'
|
|
|
beforeIos = 'BandMusicTeam://linkUrl='
|
|
|
beforeAndroid = 'orchestrastudent://html:8888/SplashActivity?url='
|
|
|
+ platform = 'android-student'
|
|
|
} else if (pn === 't') {
|
|
|
this.type = 'teacher'
|
|
|
this.buttonText = '下载管乐团伴学端'
|
|
|
tempPathname = '/orchestra-teacher/'
|
|
|
beforeIos = 'BandMusicTeamTeacher://linkUrl='
|
|
|
beforeAndroid = 'orchestrateacher://html:8888/SplashActivity?url='
|
|
|
+ platform = 'android-student'
|
|
|
} else if (pn === 'm') {
|
|
|
this.type = 'manage'
|
|
|
this.buttonText = '下载管乐团管理端'
|
|
|
tempPathname = '/orchestra-school/'
|
|
|
beforeIos = 'BandMusicTeamManager://linkUrl='
|
|
|
beforeAndroid = 'orchestramanager://html:8888/SplashActivity?url='
|
|
|
+ platform = 'android-school'
|
|
|
+ }
|
|
|
+
|
|
|
+ try {
|
|
|
+ const { data } = await request.get('/api-student/open/appVersionInfo/queryLatestByPlatform', {
|
|
|
+ params: {
|
|
|
+ platform,
|
|
|
+ status: 'history'
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.androidUrl = data.downloadUrl
|
|
|
+ } catch {
|
|
|
+ //
|
|
|
}
|
|
|
|
|
|
document.title = this.buttonText
|
|
@@ -95,26 +112,26 @@ export default defineComponent({
|
|
|
if (location.origin.indexOf('online.lexiaoya.cn') > -1) {
|
|
|
if (this.type === 'student') {
|
|
|
urlIos = 'https://apps.apple.com/cn/app/%E7%AE%A1%E4%B9%90%E5%9B%A2/id1671474346?uo=4 '
|
|
|
- urlAndroid = 'https://oss.dayaedu.com/appstore/gyt-student.apk'
|
|
|
+ urlAndroid = this.androidUrl // 'https://oss.dayaedu.com/appstore/gyt-student.apk'
|
|
|
} else if (this.type === 'teacher') {
|
|
|
urlIos =
|
|
|
'https://apps.apple.com/cn/app/%E7%AE%A1%E4%B9%90%E5%9B%A2%E4%BC%B4%E5%AD%A6%E7%AB%AF/id1670584741?uo=4'
|
|
|
- urlAndroid = 'https://oss.dayaedu.com/appstore/gyt-teacher.apk'
|
|
|
+ urlAndroid = this.androidUrl //'https://oss.dayaedu.com/appstore/gyt-teacher.apk'
|
|
|
} else if (this.type === 'manage') {
|
|
|
urlIos =
|
|
|
'https://apps.apple.com/cn/app/%E7%AE%A1%E4%B9%90%E5%9B%A2%E7%AE%A1%E7%90%86%E7%AB%AF/id1671473981?uo=4'
|
|
|
- urlAndroid = 'https://oss.dayaedu.com/appstore/gyt-manager.apk'
|
|
|
+ urlAndroid = this.androidUrl //'https://oss.dayaedu.com/appstore/gyt-manager.apk'
|
|
|
}
|
|
|
} else {
|
|
|
if (this.type === 'student') {
|
|
|
urlIos = 'https://www.pgyer.com/2Wg2'
|
|
|
- urlAndroid = 'https://www.pgyer.com/9NBz'
|
|
|
+ urlAndroid = this.androidUrl //'https://www.pgyer.com/9NBz'
|
|
|
} else if (this.type === 'teacher') {
|
|
|
urlIos = 'https://www.pgyer.com/v5yB'
|
|
|
- urlAndroid = 'https://www.pgyer.com/BQeE'
|
|
|
+ urlAndroid = this.androidUrl // 'https://www.pgyer.com/BQeE'
|
|
|
} else if (this.type === 'manage') {
|
|
|
urlIos = 'https://www.pgyer.com/DGrR'
|
|
|
- urlAndroid = 'https://www.pgyer.com/TEWv'
|
|
|
+ urlAndroid = this.androidUrl //'https://www.pgyer.com/TEWv'
|
|
|
}
|
|
|
}
|
|
|
|