| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480 |
- import Vue from 'vue';
- import VueRouter from 'vue-router';
- import { Notify } from 'vant';
- import Home from '../views/Home.vue';
- import Index from '../views/index/index.vue'; //首页
- import trade from '../views/trade/index.vue'; //团队
- import orders from '../views/trade/orders.vue'; //订单页面
- import bulletin from '../views/bulletin/index.vue'; //公告
- import bulletinDetail from '../views/bulletin/details.vue'; //公告详情
- import service from '../views/bulletin/service.vue'; //服务协议
- import mine from '../views/mine/index.vue'; //我的
- import invite from '../views/mine/invite.vue'; //邀请
- import withdraw from '../views/mine/withdraw.vue'; //提现
- // import transfer from '../views/mine/transfer.vue'; //提现
- import withdrawRecord from '../views/mine/withdrawRecord.vue'; //提现记录
- // import seso from '../views/mine/seso.vue'; //seso
- import assets from '../views/mine/assets.vue'; //我的资产
- // import introduce from '../views/introduce/index.vue'; //平台介绍
- // import datainfo from '../views/datainfo/index.vue'; //首页数据页面
- import assetDetails from '../views/mine/assetDetails.vue'; //资产明细页面
- import transfer from '../views/transfer/list.vue'; //寄售
- import typeDetail from '../views/transfer/typeDetail.vue'; //寄售分类详情
- import TransferDetail from '../views/transfer/detail.vue'; //寄售详情
- import TransferOrder from '../views/transfer/order.vue'; //寄售确认订单
- import initiatePurchase from '../views/transfer/initiatePurchase.vue'; //发起求购
- import soldConsignment from '../views/transfer/soldConsignment.vue'; //售出求购
- import waitPay from '../views/mine/waitPay.vue'; //待支付
- import personal from '../views/mine/personal.vue'; //个人中心页面
- import share from '../views/mine/share.vue'; //分享奖励
- import language from '../views/mine/language.vue'; //分享奖励
- import GoodsDetail from '../views/trade/detail.vue'; //详情
- import myTeaFriends from '../views/mine/myTeaFriends.vue'; //我的资产
- import setting from '../views/mine/setting.vue'; //设置
- // import TransferDetail from '../views/mine/TransferDetail.vue'; //寄售详情
- import recharge from '../views/mine/recharge.vue'; //充值
- import rechargeRecord from '../views/mine/rechargeRecord.vue'; //充值记录
- import sendChaBao from '../views/mine/sendChaBao.vue'; //转账茶宝
- import teaRights from '../views/mine/teaRights.vue'; //我的茶权
- import operationLog from '../views/mine/operationLog.vue'; //操作记录
- import welfare from '../views/index/welfare.vue'; //新人福利
- import teaTalk from '../views/mine/teaTalk.vue'; //茶说
- import synthesis from '../views/mine/synthesis.vue'; //合成中心
- import synthesisDetail from '../views/mine/synthesisDetail.vue'; //合成详情
- import rule from '../views/rule/index.vue'; //合成规则
- import storage from '../views/storage/list.vue'; //茶权存储
- import MulStorageDetail from '../views/storage/mulDetail.vue'; //组合茶权存储详情
- import SingleStorageDetail from '../views/storage/singleDetail.vue'; //单个茶权存储详情
- import storing from '../views/storage/storing.vue'; //我的茶矿
- import frozenTransfer from '../views/mine/frozenTransfer.vue'; //转账标记茶宝
- import C2CList from '../views/c2c/list.vue'; //c2c列表
- import teacSell from '../views/c2c/sell.vue'; //c2c出售
- import teacBuy from '../views/c2c/buy.vue'; //c2c求购
- import exchange from '../views/exchange/exchange.vue'; //福利兑换
- import exchangeList from '../views/exchange/index.vue'; //兑换
- import kf from '../views/index/kf.vue'; //客服
- import exList from '../views/teacEx/index.vue'; //Teac兑换
- import exDetail from '../views/teacEx/detail.vue'; //Teac兑换详情
- Vue.use(VueRouter);
- const routes = [
- {
- path: '/',
- redirect: '/',
- component: Home,
- children: [
- {
- path: '/',
- name: 'Index',
- component: Index,
- },
- {
- path: 'trade',
- name: 'trade',
- component: trade,
- meta: {
- requiresAuth: true
- }
- },
- {
- path: 'mine',
- name: 'mine',
- component: mine,
- meta: {
- requiresAuth: true
- }
- },
- {
- path: 'invite',
- name: 'invite',
- component: invite,
- meta: {
- requiresAuth: true
- }
- },
- {
- path: 'withdraw',
- name: 'withdraw',
- component: withdraw,
- meta: {
- requiresAuth: true
- }
- },
- {
- path: 'withdrawRecord',
- name: 'withdrawRecord',
- component: withdrawRecord,
- meta: {
- requiresAuth: true
- }
- },
- {
- path: 'assets',
- name: 'assets',
- component: assets,
- meta: {
- requiresAuth: true
- }
- },
- {
- path: 'bulletin',
- name: 'bulletin',
- component: bulletin,
- meta: {
- requiresAuth: true
- }
- },
- {
- path: 'bulletinDetail',
- name: 'bulletinDetail',
- component: bulletinDetail,
- meta: {
- requiresAuth: true
- }
- },
- {
- path: 'assetDetails',
- name: 'assetDetails',
- component: assetDetails,
- meta: {
- requiresAuth: true
- }
- },
- {
- path: 'transfer',
- name: 'transfer',
- component: transfer,
- meta: {
- requiresAuth: true
- }
- },
- {
- path: 'orders',
- name: 'orders',
- component: orders,
- meta: {
- requiresAuth: true
- }
- },
- {
- path: 'personal',
- name: 'personal',
- component: personal,
- meta: {
- requiresAuth: true
- }
- },
- {
- path: 'share',
- name: 'share',
- component: share,
- meta: {
- requiresAuth: true
- }
- },
- {
- path: 'GoodsDetail',
- name: 'GoodsDetail',
- component: GoodsDetail,
- meta: {
- requiresAuth: true
- }
- },
- {
- path: 'myTeaFriends',
- name: 'myTeaFriends',
- component: myTeaFriends,
- meta: {
- requiresAuth: true
- }
- },
- {
- path: 'setting',
- name: 'setting',
- component: setting,
- meta: {
- requiresAuth: true
- }
- },
- {
- path: 'language',
- name: 'language',
- component: language,
- meta: {
- requiresAuth: true
- }
- },
- {
- path: 'TransferDetail',
- name: 'TransferDetail',
- component: TransferDetail,
- meta: {
- requiresAuth: true
- }
- },
- {
- path: 'recharge',
- name: 'recharge',
- component: recharge,
- meta: {
- requiresAuth: true
- }
- },
- {
- path: 'rechargeRecord',
- name: 'rechargeRecord',
- component: rechargeRecord,
- meta: {
- requiresAuth: true
- }
- },
- {
- path: 'sendChaBao',
- name: 'sendChaBao',
- component: sendChaBao,
- meta: {
- requiresAuth: true
- }
- },
- {
- path: 'teaRights',
- name: 'teaRights',
- component: teaRights,
- meta: {
- requiresAuth: true
- }
- },
- {
- path: 'operationLog',
- name: 'operationLog',
- component: operationLog,
- meta: {
- requiresAuth: true
- }
- },
- {
- path: 'welfare',
- name: 'welfare',
- component: welfare,
- meta: {
- requiresAuth: true
- }
- },
- {
- path: 'teaTalk',
- name: 'teaTalk',
- component: teaTalk,
- meta: {
- requiresAuth: true
- }
- },
- {
- path: 'synthesis',
- name: 'synthesis',
- component: synthesis,
- meta: {
- requiresAuth: true
- }
- },
- {
- path: 'synthesisDetail',
- name: 'synthesisDetail',
- component: synthesisDetail,
- meta: {
- requiresAuth: true
- }
- },
- {
- path: 'rule',
- name: 'rule',
- component: rule,
- meta: {
- requiresAuth: true
- }
- },
- {
- path: 'storage',
- name: 'storage',
- component: storage,
- meta: {
- requiresAuth: true
- }
- },
- {
- path: 'MulStorageDetail',
- name: 'MulStorageDetail',
- component: MulStorageDetail,
- meta: {
- requiresAuth: true
- }
- },
- {
- path: 'SingleStorageDetail',
- name: 'SingleStorageDetail',
- component: SingleStorageDetail,
- meta: {
- requiresAuth: true
- }
- },
- {
- path: 'storing',
- name: 'storing',
- component: storing,
- meta: {
- requiresAuth: true
- }
- },
- {
- path: 'frozenTransfer',
- name: 'frozenTransfer',
- component: frozenTransfer,
- meta: {
- requiresAuth: true
- }
- },
- {
- path: 'typeDetail',
- name: 'typeDetail',
- component: typeDetail,
- meta: {
- requiresAuth: true
- }
- },
- {
- path: 'TransferOrder',
- name: 'TransferOrder',
- component: TransferOrder,
- meta: {
- requiresAuth: true
- }
- },
- {
- path: 'initiatePurchase',
- name: 'initiatePurchase',
- component: initiatePurchase,
- meta: {
- requiresAuth: true
- }
- },
- {
- path: 'soldConsignment',
- name: 'soldConsignment',
- component: soldConsignment,
- meta: {
- requiresAuth: true
- }
- },
- {
- path: 'waitPay',
- name: 'waitPay',
- component: waitPay,
- meta: {
- requiresAuth: true
- }
- },
- {
- path: 'service',
- name: 'service',
- component: service,
- meta: {
- requiresAuth: true
- }
- },
- {
- path: 'C2CList',
- name: 'C2CList',
- component: C2CList,
- meta: {
- requiresAuth: true
- }
- },
- {
- path: 'teacSell',
- name: 'teacSell',
- component: teacSell,
- meta: {
- requiresAuth: true
- }
- },
- {
- path: 'teacBuy',
- name: 'teacBuy',
- component: teacBuy,
- meta: {
- requiresAuth: true
- }
- },
- {
- path: 'exchange',
- name: 'exchange',
- component: exchange,
- meta: {
- requiresAuth: true
- }
- },
- {
- path: 'kf',
- name: 'kf',
- component: kf,
- meta: {
- requiresAuth: true
- }
- },
- {
- path: 'exList',
- name: 'exList',
- component: exList,
- meta: {
- requiresAuth: true
- }
- },
- {
- path: 'exDetail',
- name: 'exDetail',
- component: exDetail,
- meta: {
- requiresAuth: true
- }
- },
- {
- path: 'exchangeList',
- name: 'exchangeList',
- component: exchangeList,
- meta: {
- requiresAuth: true
- }
- },
- ],
- },
- ];
- const router = new VueRouter({
- // mode: 'hash',
- mode: 'history',
- // base: './',
- routes,
- });
- // router.beforeEach((to, from, next) => {
- // let parentId = localStorage.getItem('parentId')
- // if (to.meta.requiresAuth) {
- // if (parentId != 0) {
- // // 判断是否有上级
- // next()
- // } else {
- // next({ path: "/" })
- // }
- // } else {
- // next()
- // };
- // });
- export default router;
|