|
@@ -2,6 +2,7 @@ import { browser } from '@/helpers/utils'
|
|
|
import { Button, Toast } from 'vant'
|
|
|
import { defineComponent } from 'vue'
|
|
|
import styles from './index.module.less'
|
|
|
+import request from '@/helpers/request'
|
|
|
|
|
|
export const getAssetsHomeFile = (fileName: string) => {
|
|
|
const path = `./images/${fileName}`
|
|
@@ -15,15 +16,34 @@ export default defineComponent({
|
|
|
const query = this.$route.query
|
|
|
return {
|
|
|
type: query.type || 'student',
|
|
|
+ androidUrl: '',
|
|
|
wxStatus: false
|
|
|
}
|
|
|
},
|
|
|
- mounted() {
|
|
|
+ async mounted() {
|
|
|
+ let platform = 'android-student'
|
|
|
if (this.type === 'student') {
|
|
|
+ platform = 'android-student'
|
|
|
document.title = '酷乐秀下载'
|
|
|
} else if (this.type === 'teacher') {
|
|
|
+ platform = 'android-teacher'
|
|
|
document.title = '酷乐秀学院下载'
|
|
|
}
|
|
|
+
|
|
|
+ try {
|
|
|
+ const { data } = await request.get(
|
|
|
+ '/api-student/open/appVersionInfo/queryLatestByPlatform',
|
|
|
+ {
|
|
|
+ params: {
|
|
|
+ platform,
|
|
|
+ status: 'history'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ )
|
|
|
+ this.androidUrl = data.downloadUrl
|
|
|
+ } catch {
|
|
|
+ //
|
|
|
+ }
|
|
|
},
|
|
|
methods: {
|
|
|
downLoadApp() {
|
|
@@ -47,18 +67,18 @@ export default defineComponent({
|
|
|
if (location.origin.indexOf('online.colexiu.com') > -1) {
|
|
|
if (this.type === 'student') {
|
|
|
urlIos = 'https://itunes.apple.com/cn/app/id1626971695?mt=8'
|
|
|
- urlAndroid = 'https://oss.dayaedu.com/appstore/clx-student-domain.apk'
|
|
|
+ urlAndroid = this.androidUrl // 'https://oss.dayaedu.com/appstore/clx-student-domain.apk'
|
|
|
} else if (this.type === 'teacher') {
|
|
|
urlIos = 'https://itunes.apple.com/cn/app/id1626971149?mt=8'
|
|
|
- urlAndroid = 'https://oss.dayaedu.com/appstore/clx-teacher-domain.apk'
|
|
|
+ urlAndroid = this.androidUrl // 'https://oss.dayaedu.com/appstore/clx-teacher-domain.apk'
|
|
|
}
|
|
|
} else {
|
|
|
if (this.type === 'student') {
|
|
|
urlIos = 'https://www.pgyer.com/powy'
|
|
|
- urlAndroid = 'https://www.pgyer.com/70e7'
|
|
|
+ urlAndroid = this.androidUrl // 'https://www.pgyer.com/70e7'
|
|
|
} else {
|
|
|
urlIos = 'https://www.pgyer.com/iO0m'
|
|
|
- urlAndroid = 'https://www.pgyer.com/N2U3'
|
|
|
+ urlAndroid = this.androidUrl // 'https://www.pgyer.com/N2U3'
|
|
|
}
|
|
|
}
|
|
|
|