index.tsx 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806
  1. import {
  2. computed,
  3. defineComponent,
  4. nextTick,
  5. onMounted,
  6. onUnmounted,
  7. reactive,
  8. ref,
  9. Teleport,
  10. toRefs,
  11. watch
  12. } from 'vue';
  13. import styles from './index.module.less';
  14. import { browser, vaildMusicScoreUrl } from '@/helpers/utils';
  15. import MSticky from '@/components/m-sticky';
  16. import MHeader from '@/components/m-header';
  17. import { useRoute, useRouter } from 'vue-router';
  18. import MSearch from '@/components/m-search';
  19. import { Cell, Icon, Image, List, Popup, Tab, Tabs } from 'vant';
  20. import iconPlayer from './images/icon-player.png';
  21. import iconFire from './images/icon-fire.png';
  22. import iconTitleArrow from './images/icon-title-arrow.png';
  23. import { api_musicSheetPage } from '../co-ai/api';
  24. import { state as baseState } from '@/state';
  25. import request from '@/helpers/request';
  26. import MEmpty from '@/components/m-empty';
  27. import { listenerMessage, postMessage } from '@/helpers/native-message';
  28. import { audioPlayType } from '@/helpers/constant';
  29. import MusicDetail from './music-detail';
  30. import TheVip from '@/components/the-vip';
  31. import { useEventListener } from '@vueuse/core';
  32. const ChildNodeSearch = defineComponent({
  33. name: 'ChildNodeSearch',
  34. props: {
  35. activeRow: {
  36. type: Object,
  37. default: () => ({})
  38. },
  39. list: {
  40. type: Array,
  41. default: () => []
  42. }
  43. },
  44. emits: ['selectChildTag'],
  45. setup(props, { emit }) {
  46. const { activeRow } = toRefs(props);
  47. const selectItem = ref({});
  48. watch(
  49. () => props.activeRow,
  50. () => {
  51. activeRow.value = props.activeRow;
  52. selectItem.value = {};
  53. }
  54. );
  55. return () => (
  56. <>
  57. {activeRow.value?.id && (
  58. <>
  59. <div class={styles.title}>{activeRow.value.columnName}</div>
  60. <div class={[styles.subjectContainer]}>
  61. {activeRow.value?.children.map((subject: any) => (
  62. <div
  63. class={[
  64. styles.subjectItem,
  65. styles.subjectItem4,
  66. (activeRow.value.activeIndex || '') == subject.id &&
  67. styles.active
  68. ]}
  69. onClick={() => {
  70. activeRow.value.activeIndex = subject.id;
  71. let children: any;
  72. let columnName = '';
  73. if (subject.children) {
  74. children = [
  75. {
  76. columnName: subject.children[0].columnName,
  77. name: '全部',
  78. id: ''
  79. },
  80. ...subject.children
  81. ];
  82. columnName = subject.children[0].columnName;
  83. selectItem.value = {
  84. ...subject,
  85. columnName,
  86. activeIndex: '',
  87. children
  88. };
  89. } else {
  90. selectItem.value = {};
  91. }
  92. emit('selectChildTag', activeRow.value.activeIndex);
  93. }}>
  94. {subject.name}
  95. </div>
  96. ))}
  97. </div>
  98. <ChildNodeSearch
  99. activeRow={selectItem.value}
  100. onSelectChildTag={(item: any) => {
  101. emit('selectChildTag', item || activeRow.value.activeIndex);
  102. }}
  103. />
  104. </>
  105. )}
  106. </>
  107. );
  108. }
  109. });
  110. export default defineComponent({
  111. name: 'hot-music-more',
  112. setup() {
  113. const router = useRouter();
  114. const route = useRoute();
  115. const state = reactive({
  116. background: 'transparent',
  117. loading: false,
  118. finished: false,
  119. isAllStatus: true, // 当前是否已经为全部了
  120. searchPopup: false,
  121. musicDetailPopup: false,
  122. showVip: false,
  123. vipMember: baseState.user.data.vipMember,
  124. tabActive: '' as any,
  125. newTags: [] as any,
  126. isTagExpand: false,
  127. musics: [] as any,
  128. types: [] as any,
  129. subjectList: [] as any,
  130. audioPlayTypeList: [] as any, // 场景
  131. sNt: '' as any, // 标签
  132. sAPT: '', // 场景
  133. item: {} as any,
  134. allSearch: {
  135. name: '',
  136. musicTagIds: '' as any,
  137. audioPlayTypes: [] as any,
  138. bookVersionId: null as any,
  139. musicalInstrumentId: ''
  140. },
  141. hotSearch: {
  142. name: ''
  143. },
  144. newSearch: {
  145. name: ''
  146. },
  147. recommendSearch: {
  148. name: ''
  149. }
  150. });
  151. const tabsRef = ref();
  152. const musicForms = reactive({
  153. page: 1,
  154. rows: 20,
  155. status: 1,
  156. sortType: 2, // 默认热度排序
  157. keyword: '' // 关键词
  158. });
  159. const data = reactive({
  160. selectParents: {}, // 选中的数据
  161. tags: [] as any[],
  162. tagActiveId: '' as any,
  163. tagActive: {} as any,
  164. childSelectId: null as any
  165. });
  166. const contentRef = ref()
  167. const searchValue = computed(() => {
  168. if (state.tabActive === 'RECOMMEND') {
  169. return state.recommendSearch.name;
  170. } else if (state.tabActive === 'HOT') {
  171. return state.hotSearch.name;
  172. } else if (state.tabActive === 'NEW') {
  173. return state.newSearch.name;
  174. } else {
  175. return state.allSearch.name;
  176. }
  177. });
  178. const mSearchRef = ref()
  179. let isClick = false;
  180. const getMusicList = async () => {
  181. if (isClick) return;
  182. isClick = true;
  183. state.loading = true;
  184. try {
  185. const { ...result } = musicForms;
  186. let params = {
  187. ...result,
  188. searchType: state.tabActive
  189. } as any;
  190. if (state.tabActive === 'RECOMMEND') {
  191. params = Object.assign(params, state.recommendSearch);
  192. params.page = 1
  193. params.rows = 60
  194. } else if (state.tabActive === 'HOT') {
  195. params = Object.assign(params, state.hotSearch);
  196. params.page = 1
  197. params.rows = 60
  198. } else if (state.tabActive === 'NEW') {
  199. params = Object.assign(params, state.newSearch);
  200. params.page = 1
  201. params.rows = 60
  202. } else {
  203. params.name = state.allSearch.name;
  204. params = Object.assign(params, state.allSearch);
  205. }
  206. const res = await api_musicSheetPage(params);
  207. if (res.code === 200 && Array.isArray(res?.data?.rows)) {
  208. const result = res.data.rows || [];
  209. result.forEach((item: any) => {
  210. item.audioPlayTypeArray = item.audioPlayTypes
  211. ? item.audioPlayTypes.split(',')
  212. : [];
  213. });
  214. state.musics = [...state.musics, ...res.data.rows];
  215. state.finished = !res.data.next;
  216. musicForms.page = res.data.current + 1;
  217. // state.listState.dataShow = state.list.length > 0;
  218. } else {
  219. state.finished = true;
  220. }
  221. } catch (error) {
  222. // console.log('🚀 ~ error:', error);
  223. state.finished = true;
  224. }
  225. state.loading = false;
  226. isClick = false;
  227. };
  228. const getTags = async () => {
  229. try {
  230. const res = await request.get('/edu-app/musicSheetTag/queryList');
  231. const result = res.data || [];
  232. state.newTags = [
  233. {
  234. name: '全部',
  235. id: ''
  236. },
  237. ...result.map((item: any) => {
  238. return {
  239. name: item.name,
  240. id: item.id
  241. };
  242. })
  243. ];
  244. } catch {
  245. //
  246. }
  247. };
  248. const formatParentId = (id: any, list: any, ids = [] as any) => {
  249. for (const item of list) {
  250. if (item.children && item.children.length > 0) {
  251. const cIds: any = formatParentId(id, item.children, [
  252. ...ids,
  253. item.id
  254. ]);
  255. if (cIds.includes(id)) {
  256. return cIds;
  257. }
  258. }
  259. if (item.id === id) {
  260. return [...ids, id];
  261. }
  262. }
  263. return ids;
  264. };
  265. const onSearch = () => {
  266. musicForms.page = 1;
  267. state.musics = [];
  268. state.finished = false;
  269. getMusicList();
  270. };
  271. const onReset = () => {
  272. state.sNt = '';
  273. state.sAPT = '';
  274. data.tagActiveId = '';
  275. data.childSelectId = null;
  276. data.selectParents = {}
  277. // state.allSearch.bookVersionId = data.childSelectId || data.tagActiveId;
  278. // state.allSearch.audioPlayTypes = state.sAPT
  279. // ? state.sAPT === 'PLAY_SING'
  280. // ? ['SING', 'PLAY']
  281. // : [state.sAPT]
  282. // : [];
  283. // state.allSearch.musicTagIds = state.sNt;
  284. // state.searchPopup = false;
  285. // onSearch();
  286. };
  287. const onDetail = (item: any) => {
  288. state.item = item;
  289. state.musicDetailPopup = true;
  290. };
  291. const getMusicTagTree = async () => {
  292. try {
  293. const res = await request.get('/edu-app/musicTag/tree');
  294. const result = res.data || [];
  295. data.tags = [
  296. {
  297. columnName: result[0].columnName,
  298. name: '全部',
  299. id: ''
  300. },
  301. ...result
  302. ];
  303. data.tagActiveId = data.tags[0].id;
  304. } catch {
  305. //
  306. }
  307. };
  308. const changeTag = (item: any, activeIndex?: any) => {
  309. data.tagActiveId = item.id;
  310. data.childSelectId = null;
  311. let children: any;
  312. let columnName = '';
  313. if (item.children) {
  314. children = [
  315. {
  316. columnName: item.children[0].columnName,
  317. name: '全部',
  318. id: ''
  319. },
  320. ...item.children
  321. ];
  322. columnName = item.children[0].columnName;
  323. data.selectParents = {
  324. ...item,
  325. columnName,
  326. activeIndex: activeIndex || '',
  327. children
  328. };
  329. } else {
  330. data.selectParents = {};
  331. }
  332. };
  333. const formatUsedNum = (num: number) => {
  334. if (num < 10000) {
  335. return num;
  336. } else {
  337. const n = num / 10000;
  338. return Number(n.toFixed(1)) + '万';
  339. }
  340. };
  341. // 判断是否有数据
  342. // const isSearch = computed(() => {
  343. // return data.tags.length > 0 ? true : false;
  344. // });
  345. const handleGoto = (
  346. item: any,
  347. showMusicImg: string,
  348. selectMusicInstrumentIndex: number
  349. ) => {
  350. if (!state.vipMember && item?.paymentType === 'VIP') {
  351. state.showVip = true;
  352. return;
  353. }
  354. // 默认进页面显示对应的曲谱
  355. let lineType = 'staff';
  356. if (showMusicImg === 'first') {
  357. lineType = 'firstTone';
  358. } else if (showMusicImg === 'fixed') {
  359. lineType = 'fixedTone';
  360. } else if (showMusicImg === 'staff') {
  361. lineType = 'staff';
  362. }
  363. let src = `${vaildMusicScoreUrl()}/instrument/?id=${
  364. item?.id
  365. }&musicRenderType=${lineType}&showGuide=true&part-index=${selectMusicInstrumentIndex}`;
  366. postMessage({
  367. api: 'openAccompanyWebView',
  368. content: {
  369. url: src,
  370. orientation: 0,
  371. isHideTitle: true,
  372. statusBarTextColor: false,
  373. isOpenLight: true,
  374. c_orientation: 0 // 0 横屏 1 竖屏
  375. }
  376. });
  377. };
  378. const getUserInfo = async () => {
  379. const res = await request.get('/edu-app/user/getUserInfo', {
  380. initRequest: true, // 初始化接口
  381. requestType: 'form',
  382. hideLoading: true
  383. });
  384. if (res?.code === 200) {
  385. state.vipMember = res.data.vipMember;
  386. }
  387. };
  388. const tabResize = () => {
  389. tabsRef.value?.resize();
  390. };
  391. onMounted(async () => {
  392. if (route.query.type) {
  393. state.tabActive = route.query.type;
  394. state.isAllStatus = false;
  395. }
  396. // tabsRef
  397. // 场景
  398. const tempAudio = Object.keys(audioPlayType).map(key => {
  399. return {
  400. id: key,
  401. name: audioPlayType[key]
  402. };
  403. });
  404. state.audioPlayTypeList = [{ name: '全部', id: '' }, ...tempAudio];
  405. state.loading = true;
  406. getUserInfo();
  407. await getTags();
  408. await getMusicTagTree();
  409. getMusicList();
  410. window.addEventListener('resize', tabResize);
  411. useEventListener(document, 'scroll', () => {
  412. mSearchRef.value?.searchBlur()
  413. });
  414. listenerMessage('webViewOnResume', () => {
  415. tabResize();
  416. });
  417. });
  418. onUnmounted(() => {
  419. window.removeEventListener('resize', tabResize);
  420. });
  421. return () => (
  422. <div
  423. class={[
  424. styles.hotMusicMore,
  425. browser().isTablet ? styles.hotMusicMoreTablet : ''
  426. ]}>
  427. <MSticky position="top">
  428. <MHeader border={false} background={'transparent'}>
  429. {{
  430. content: () => (
  431. <div class={styles.woringHeader}>
  432. <i
  433. onClick={() => {
  434. if (browser().isApp) {
  435. postMessage({
  436. api: 'back'
  437. });
  438. } else {
  439. router.back();
  440. }
  441. }}
  442. class={[
  443. 'van-badge__wrapper van-icon van-icon-arrow-left van-nav-bar__arrow',
  444. styles.leftArrow
  445. ]}></i>
  446. <Tabs
  447. ref={tabsRef}
  448. class={styles.tabSection}
  449. v-model:active={state.tabActive}
  450. shrink
  451. onClickTab={() => {
  452. if (state.tabActive === '') {
  453. if (state.isAllStatus) {
  454. state.searchPopup = !state.searchPopup;
  455. if (state.searchPopup) {
  456. const allSearch = state.allSearch
  457. if(allSearch.audioPlayTypes.length > 0) {
  458. if(allSearch.audioPlayTypes.length == 1) {
  459. state.sAPT = allSearch.audioPlayTypes.join(',')
  460. } else {
  461. state.sAPT = 'PLAY_SING'
  462. }
  463. } else {
  464. state.sAPT = ''
  465. }
  466. state.sNt = allSearch.musicTagIds
  467. if(allSearch.bookVersionId) {
  468. const ids = formatParentId(allSearch.bookVersionId,data.tags)
  469. console.log(ids)
  470. data.tagActiveId = ids[0]
  471. if(data.tagActiveId && ids[1]) {
  472. const item = data.tags.find((item) => item.id === ids[0])
  473. console.log(item, 'item')
  474. if(item) changeTag(item, ids[1])
  475. }
  476. }
  477. }
  478. } else {
  479. state.isAllStatus = true;
  480. onSearch();
  481. }
  482. } else {
  483. state.searchPopup = false;
  484. state.isAllStatus = false;
  485. onSearch();
  486. }
  487. }}>
  488. <Tab name="">
  489. {{
  490. title: () => (
  491. <div class={styles.moreIcon}>
  492. <span>全部</span>
  493. <img
  494. src={iconTitleArrow}
  495. class={[
  496. styles.iconArrow,
  497. state.searchPopup && styles.iconArrowActive
  498. ]}
  499. />
  500. </div>
  501. )
  502. }}
  503. </Tab>
  504. <Tab name="RECOMMEND" title="推荐"></Tab>
  505. <Tab name="HOT" title="热门"></Tab>
  506. <Tab name="NEW" title="最新"></Tab>
  507. </Tabs>
  508. </div>
  509. )
  510. }}
  511. </MHeader>
  512. <MSearch
  513. v-model:modelValue={searchValue.value}
  514. ref={mSearchRef}
  515. background={'transparent'}
  516. inputBackground="transparent"
  517. class={styles.mSearch11}
  518. onFocus={() => {
  519. state.searchPopup = false;
  520. }}
  521. onSearch={(val: any) => {
  522. if (state.tabActive === 'RECOMMEND') {
  523. state.recommendSearch.name = val;
  524. } else if (state.tabActive === 'HOT') {
  525. state.hotSearch.name = val;
  526. } else if (state.tabActive === 'NEW') {
  527. state.newSearch.name = val;
  528. } else {
  529. state.allSearch.name = val;
  530. }
  531. state.searchPopup = false;
  532. onSearch();
  533. }}></MSearch>
  534. </MSticky>
  535. <List
  536. loading={state.loading}
  537. finished={state.finished}
  538. finishedText=" "
  539. onLoad={() => {
  540. if(!state.tabActive) {
  541. getMusicList()
  542. }
  543. }}
  544. immediateCheck={false}>
  545. {state.musics.length > 0 && (
  546. <div class={styles.musicListSection}>
  547. <div class={styles.musicList}>
  548. {state.musics.map((item: any) => (
  549. <Cell
  550. class={styles.musicItem}
  551. border={false}
  552. center
  553. onClick={() => onDetail(item)}>
  554. {{
  555. icon: () => (
  556. <div class={styles.musicImg}>
  557. <i
  558. class={[
  559. styles.iconType,
  560. styles[item.paymentType]
  561. ]}></i>
  562. <Image class={styles.musicImg} src={item.titleImg} />
  563. </div>
  564. ),
  565. title: () => (
  566. <div class={styles.musicContnet}>
  567. <h2>{item.musicSheetName}</h2>
  568. <div class={styles.allStatus}>
  569. <span class={styles.hotNum}>
  570. <img src={iconFire} class={styles.iconFire} />
  571. {formatUsedNum(item.usedNum)}
  572. </span>
  573. {item.audioPlayTypes?.includes('SING') && (
  574. <span
  575. class={[styles.iconPlayType, styles.iconSing]}>
  576. 演唱
  577. </span>
  578. )}
  579. {item.audioPlayTypes?.includes('PLAY') && (
  580. <span
  581. class={[styles.iconPlayType, styles.iconPlay]}>
  582. 演奏
  583. </span>
  584. )}
  585. {item.composer && (
  586. <p>
  587. {item.composer}
  588. </p>
  589. )}
  590. </div>
  591. </div>
  592. ),
  593. 'right-icon': () => (
  594. <Image class={styles.musicPlayIcon} src={iconPlayer} />
  595. )
  596. }}
  597. </Cell>
  598. ))}
  599. </div>
  600. </div>
  601. )}
  602. </List>
  603. {!state.loading && state.musics.length === 0 && (
  604. <div class={styles.emptyGroup}>
  605. <MEmpty description="暂无曲谱" />
  606. </div>
  607. )}
  608. <Teleport to={'body'}>
  609. <div class={[styles.searchBodySection]}>
  610. <Popup position="top" round v-model:show={state.searchPopup}>
  611. <div class={styles.searchContainer}>
  612. <div class={styles.changeSubjectContainer}>
  613. {state.newTags.length > 0 && (
  614. <>
  615. <div class={styles.title}>标签</div>
  616. <div class={styles.subjectContainer}>
  617. {state.newTags.map((subject: any) => (
  618. <div
  619. class={[
  620. styles.subjectItem,
  621. subject.id === state.sNt && styles.active
  622. ]}
  623. onClick={() => {
  624. state.sNt = subject.id;
  625. }}>
  626. {subject.name}
  627. </div>
  628. ))}
  629. </div>
  630. </>
  631. )}
  632. {state.audioPlayTypeList.length > 0 && (
  633. <>
  634. <div class={styles.title}>场景</div>
  635. <div class={styles.subjectContainer}>
  636. {state.audioPlayTypeList.map((subject: any) => (
  637. <div
  638. class={[
  639. styles.subjectItem,
  640. styles.subjectItem4,
  641. subject.id === state.sAPT && styles.active
  642. ]}
  643. onClick={() => {
  644. state.sAPT = subject.id;
  645. }}>
  646. {subject.name}
  647. </div>
  648. ))}
  649. </div>
  650. </>
  651. )}
  652. {data.tags.length > 0 && (
  653. <>
  654. <div class={styles.title} ref={contentRef}>
  655. {data.tags[0]?.columnName}
  656. {state.isTagExpand && (
  657. <span onClick={() => (state.isTagExpand = false)}>
  658. 收起
  659. <Icon name="arrow-up" />
  660. </span>
  661. )}
  662. </div>
  663. <div
  664. class={[
  665. styles.subjectContainer,
  666. styles.subjectContainerTwo
  667. ]}>
  668. {data.tags.map(
  669. (subject: any, index: number) =>
  670. ((!state.isTagExpand && index <= 4) ||
  671. state.isTagExpand) && (
  672. <div
  673. class={[
  674. styles.subjectItem,
  675. (subject.id || '') ===
  676. (data.tagActiveId || '') && styles.active
  677. ]}
  678. onClick={() => {
  679. changeTag(subject);
  680. }}>
  681. {subject.name}
  682. </div>
  683. )
  684. )}
  685. {!state.isTagExpand && data.tags.length > 5 && (
  686. <div
  687. class={[styles.subjectItem]}
  688. onClick={() => {
  689. state.isTagExpand = true;
  690. nextTick(() => {
  691. contentRef.value?.scrollIntoView({ behavior: 'smooth', block: 'start' })
  692. })
  693. }}>
  694. 更多 <Icon name="arrow-down" />
  695. </div>
  696. )}
  697. </div>
  698. <ChildNodeSearch
  699. activeRow={data.selectParents}
  700. onSelectChildTag={(val: any) => {
  701. data.childSelectId = val;
  702. // onSearch();
  703. }}
  704. />
  705. </>
  706. )}
  707. </div>
  708. <div class={styles.searchHead}>
  709. <span class={styles.cancel} onClick={() => onReset()}>
  710. 重置
  711. </span>
  712. {/* <span>筛选</span> */}
  713. <span
  714. class={styles.confirm}
  715. onClick={() => {
  716. state.allSearch.bookVersionId =
  717. data.childSelectId || data.tagActiveId;
  718. state.allSearch.audioPlayTypes = state.sAPT
  719. ? state.sAPT === 'PLAY_SING'
  720. ? ['SING', 'PLAY']
  721. : [state.sAPT]
  722. : [];
  723. state.allSearch.musicTagIds = state.sNt;
  724. state.searchPopup = false;
  725. onSearch();
  726. }}>
  727. 确定
  728. </span>
  729. </div>
  730. </div>
  731. </Popup>
  732. </div>
  733. </Teleport>
  734. <Popup
  735. position="bottom"
  736. class={styles.popupMusicDetail}
  737. closeable
  738. round
  739. v-model:show={state.musicDetailPopup}>
  740. <MusicDetail item={state.item} onHandleGoto={handleGoto} />
  741. </Popup>
  742. <Popup
  743. class="popup-custom van-scale"
  744. transition="van-scale"
  745. closeOnClickOverlay={false}
  746. v-model:show={state.showVip}>
  747. <TheVip
  748. onClose={val => {
  749. if (val) {
  750. // postMessage({
  751. // api: 'openWebView',
  752. // content: {
  753. // url: `${location.origin}${location.pathname}#/member-center`,
  754. // orientation: 1
  755. // }
  756. // });
  757. router.push('/member-center');
  758. }
  759. state.showVip = false;
  760. }}
  761. />
  762. </Popup>
  763. </div>
  764. );
  765. }
  766. });