import { webAppPageUrl } from '@/common/webapp.js';
let home = ["pages/hegui/hegui",
    "pages/shouye/index",
    "pages/mall/index",
    "pages/infinite/index",
    "pages/user/index"
];
const ydsMixin = {
    onShow() {
        //#ifdef H5
        try {
            var pages = getCurrentPages();
            if (pages && pages.length > 0) {
                let tempPage = pages[pages.length - 1];
                // tempPage.route
                let isHome = home.includes(tempPage.route);
                console.log('当前页面位置', tempPage.route, isHome);
                webAppPageUrl(tempPage.route, isHome);
            }
        } catch (e) {
            console.log('ydsMixin-onShow-error', e);
        }

        //#endif
    },
    methods: {

    }
}

export default ydsMixin;