import { createRouter, createWebHashHistory, createWebHistory } from "vue-router"
import Home from '@/view/iframe/buy-nft/buy/home.vue'
import Pay from '@/view/iframe/buy-nft/buy/pay.vue'
import OpenBox from '@/view/iframe/buy-nft/buy/open-box.vue'

let routes = [
    {
        path: '/',
        name: 'Home',
        component: Home,
    },
    {
        path: "/pay",
        name: 'Pay',
        component: Pay
    }, {
        path: "/open_box",
        name: 'OpenBox',
        component: OpenBox
    }
]
// 3. 创建路由实例
const router = createRouter({

    // 4. 采用hash 模式
    history: createWebHashHistory('buy-nft.html'),
    // 采用 history 模式
    // history: createWebHistory('popup.html'),
    routes, // short for `routes: routes`
});

export default router

