|
@@ -17,6 +17,7 @@ import popupClose from './images/popup-close.png'
|
|
|
import { postMessage } from '@/helpers/native-message'
|
|
|
import { browser } from '@/helpers/utils'
|
|
|
import { state } from '@/state'
|
|
|
+import event from './event'
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'home-index',
|
|
@@ -49,6 +50,10 @@ export default defineComponent({
|
|
|
mounted() {
|
|
|
this.headerHeight = (this as any).$refs.header?.getHeadeHeight()
|
|
|
this.init()
|
|
|
+
|
|
|
+ event.on('downloadApp', () => {
|
|
|
+ this.downloadStatus = true
|
|
|
+ })
|
|
|
},
|
|
|
methods: {
|
|
|
async init() {
|
|
@@ -121,18 +126,14 @@ export default defineComponent({
|
|
|
<TheHomeHeader
|
|
|
ref="header"
|
|
|
onCart={() => {
|
|
|
- //
|
|
|
+ this.downloadStatus = true
|
|
|
}}
|
|
|
onSearch={() => {
|
|
|
// 搜索详情
|
|
|
- const url =
|
|
|
- location.origin + location.pathname + '#/music-songbook/search'
|
|
|
- openDefaultWebView(url, () => {
|
|
|
- this.$router.push('/music-songbook/search')
|
|
|
- })
|
|
|
+ this.downloadStatus = true
|
|
|
}}
|
|
|
onMore={() => {
|
|
|
- //
|
|
|
+ this.downloadStatus = true
|
|
|
}}
|
|
|
/>
|
|
|
|
|
@@ -148,11 +149,12 @@ export default defineComponent({
|
|
|
<SwipeItem
|
|
|
onClick={() => {
|
|
|
// 判断url是否正常
|
|
|
- if (verifyUrl(item.linkUrl)) {
|
|
|
- openDefaultWebView(item.linkUrl, () => {
|
|
|
- window.location.href = item.linkUrl
|
|
|
- })
|
|
|
- }
|
|
|
+ // if (verifyUrl(item.linkUrl)) {
|
|
|
+ // openDefaultWebView(item.linkUrl, () => {
|
|
|
+ // window.location.href = item.linkUrl
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ this.downloadStatus = true
|
|
|
}}
|
|
|
>
|
|
|
<Image
|
|
@@ -209,13 +211,23 @@ export default defineComponent({
|
|
|
onConfirm={() => {
|
|
|
const type = browser().orchestraAndroid
|
|
|
? 'com.cooleshow.student'
|
|
|
- : 'ColexiuStudent'
|
|
|
+ : 'ColexiuStudent://'
|
|
|
if (state.orchestraInfo.installStatus) {
|
|
|
postMessage({ api: 'openApp', content: { type: type } })
|
|
|
} else {
|
|
|
+ // const urlIos =
|
|
|
+ // 'https://itunes.apple.com/cn/app/id1626971695?mt=8'
|
|
|
+ // const urlAndroid =
|
|
|
+ // 'https://appstore.ks3-cn-beijing.ksyuncs.com/clx-student-domain.apk'
|
|
|
+
|
|
|
+ const url = browser().orchestraAndroid
|
|
|
+ ? window.location.origin +
|
|
|
+ window.location.pathname +
|
|
|
+ '#/download'
|
|
|
+ : 'https://itunes.apple.com/cn/app/id1626971695?mt=8'
|
|
|
postMessage({
|
|
|
api: 'downloadApp',
|
|
|
- content: { type: type, url: '' }
|
|
|
+ content: { type: type, url: url }
|
|
|
})
|
|
|
}
|
|
|
}}
|