|
@@ -3,12 +3,14 @@ import styles from './musicScore.module.less';
|
|
import qs from 'query-string';
|
|
import qs from 'query-string';
|
|
import iconStart from '../image/icon-start.svg';
|
|
import iconStart from '../image/icon-start.svg';
|
|
import { listenerMessage, postMessage } from '@/helpers/native-message';
|
|
import { listenerMessage, postMessage } from '@/helpers/native-message';
|
|
-import { Loading, Skeleton } from 'vant';
|
|
|
|
|
|
+import { Loading, Popup, Skeleton } from 'vant';
|
|
import { usePageVisibility } from '@vant/use';
|
|
import { usePageVisibility } from '@vant/use';
|
|
import { useRoute } from 'vue-router';
|
|
import { useRoute } from 'vue-router';
|
|
import { browser } from '@/helpers/utils';
|
|
import { browser } from '@/helpers/utils';
|
|
import { storage } from '@/helpers/storage';
|
|
import { storage } from '@/helpers/storage';
|
|
import { ACCESS_TOKEN } from '@/store/mutation-types';
|
|
import { ACCESS_TOKEN } from '@/store/mutation-types';
|
|
|
|
+import TheVip from '@/components/the-vip';
|
|
|
|
+import { state } from '@/state';
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
name: 'musicScore',
|
|
name: 'musicScore',
|
|
@@ -65,6 +67,7 @@ export default defineComponent({
|
|
const isLoaded = ref(false);
|
|
const isLoaded = ref(false);
|
|
const renderError = ref(false);
|
|
const renderError = ref(false);
|
|
const renderSuccess = ref(false);
|
|
const renderSuccess = ref(false);
|
|
|
|
+ const showVip = ref(false);
|
|
const Authorization = storage.get(ACCESS_TOKEN);
|
|
const Authorization = storage.get(ACCESS_TOKEN);
|
|
const origin = /(localhost|192)/.test(location.host)
|
|
const origin = /(localhost|192)/.test(location.host)
|
|
? 'https://test.lexiaoya.cn'
|
|
? 'https://test.lexiaoya.cn'
|
|
@@ -97,6 +100,10 @@ export default defineComponent({
|
|
|
|
|
|
// 去云教练完整版
|
|
// 去云教练完整版
|
|
const gotoAccomany = () => {
|
|
const gotoAccomany = () => {
|
|
|
|
+ if (!state.user.data?.vipMember) {
|
|
|
|
+ showVip.value = true;
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
if (isLoading.value) return;
|
|
if (isLoading.value) return;
|
|
if (!browserInfo.ios) {
|
|
if (!browserInfo.ios) {
|
|
isLoading.value = true;
|
|
isLoading.value = true;
|
|
@@ -162,6 +169,27 @@ export default defineComponent({
|
|
<div class={styles.skeletonWrap}>
|
|
<div class={styles.skeletonWrap}>
|
|
<Skeleton class={styles.skeleton} row={8} />
|
|
<Skeleton class={styles.skeleton} row={8} />
|
|
</div>
|
|
</div>
|
|
|
|
+ <Popup
|
|
|
|
+ teleport="body"
|
|
|
|
+ class="popup-custom van-scale"
|
|
|
|
+ transition="van-scale"
|
|
|
|
+ closeOnClickOverlay={false}
|
|
|
|
+ v-model:show={showVip.value}>
|
|
|
|
+ <TheVip
|
|
|
|
+ onClose={val => {
|
|
|
|
+ if (val) {
|
|
|
|
+ postMessage({
|
|
|
|
+ api: 'openWebView',
|
|
|
|
+ content: {
|
|
|
|
+ url: `${location.origin}${location.pathname}#/member-center`,
|
|
|
|
+ orientation: 1
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ showVip.value = false;
|
|
|
|
+ }}
|
|
|
|
+ />
|
|
|
|
+ </Popup>
|
|
</div>
|
|
</div>
|
|
);
|
|
);
|
|
}
|
|
}
|