123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264 |
- // import px2rem from 'postcss-plugin-px2rem'
- const autoprefixer = require('autoprefixer')
- // ref: https://umijs.org/config/
- export default {
- treeShaking: true,
- routes: [
- {
- path: '/',
- redirect: '/myleval/home'
- },
- {
- path: '/myleval/home',
- name: '我的等级',
- component: '../pages/MyLeval/MyLeval'
- },
- {
- path: '/Levalthat',
- name: '等级说明',
- component: '../pages/Levalthat/Levalthat'
- },
- {
- path: '/closeinstructions',
- name: '亲密关系说明',
- component: '../pages/Closeinstruction/Closeinstruction'
- },
- {
- path: '/nobility',
- name: '贵族',
- component: '../layouts/BasicLayout',
- routes: [
- {
- path: '/nobility/home',
- name: '贵族',
- component: '../pages/MyNobility/MyNobility'
- },
- {
- path: '/nobility/explain',
- name: '贵族说明',
- component: '../pages/MyNobility/MyNobilityExplain'
- }
- ]
- },
- {
- path: '/vipinfo/home',
- name: '会员信息',
- component: '../pages/VipInfo/VipInfo'
- },
- {
- path: '/wallettime/home',
- name: '时间钱包',
- component: '../pages/WalletTime/WalletTime'
- },
- {
- path: '/wshop',
- name: '商城',
- component: '../layouts/BasicLayout',
- routes: [
- {
- path: '/wshop/home',
- name: '商城',
- component: '../pages/WalletShop/WalletShop'
- },
- {
- path: '/wshop/explain',
- name: '商城',
- component: '../pages/WalletShop/WalletShopExplain'
- },
- {
- path: '/wshop/record',
- name: '猫币商城',
- component: '../pages/WalletShop/BuyRecord'
- },
- ]
- },
- {
- path: '/crRanks/home',
- name: '全站榜',
- component: '../pages/Totalstation/Totalstation'
- },
- {
- path: '/crRanks/room',
- name: '房间榜',
- component: '../pages/CRRanksroom/Roomranks'
- },
- {
- path: '/realLoveRank',
- name: '真爱榜',
- component: '../pages/Realloverank'
- },
- {
- path: '/gasranks',
- name: '欧气榜',
- component: '../pages/Gasranks'
- },
- {
- path: '/crRanks/issue',
- name: '往期榜',
- component: '../pages/Issuranks/Issuranks'
- },
- {
- path: '/hlRanks/home',
- name: '热爱榜',
- component: '../pages/HotLoveRanks/CoinRanks'
- },
- {
- path: '/gRanks/home',
- name: '周星榜',
- component: '../pages/Weekstarranks/Weekstarranks'
- },
- {
- path: '/pkring/ranks',
- name: 'PK擂台榜',
- component: '../pages/Pkring'
- },
- {
- path: '/guardian/ranks',
- name: '守护榜',
- component: '../pages/Guardianranks'
- },
- {
- path: '/chatRoom',
- name: '房间流水',
- component: '../layouts/BasicLayout',
- routes: [
- {
- path: '/chatRoom/records',
- name: '房间流水',
- component: '../pages/CRRecords/CoinRecord'
- },
- {
- path: '/chatRoom/hours',
- name: '房间小时流水',
- component: '../pages/CRRecords/CoinRecordHours'
- }
- ]
- },
- {
- path: '/giftWall',
- name: '礼物墙',
- component: '../layouts/BasicLayout',
- routes: [
- {
- path: '/giftWall/home',
- name: '礼物墙',
- component: '../pages/GiftWall/GiftWall'
- },
- {
- path: '/giftWall/week',
- name: '本周礼物',
- component: '../pages/GiftWall/GiftWallWeek'
- }
- ]
- },
- {
- path: '/wallet',
- name: '钱包',
- component: '../layouts/BasicLayout',
- routes: [
- {
- path: '/wallet/transDiamond',
- name: '兑换猫币',
- component: '../pages/TransDiamond/TransDiamond'
- },
- {
- path: '/wallet/transDiamond/records',
- name: '兑换记录',
- component: '../pages/TransDiamond/TransDiamondRecords'
- }
- ]
- },
- {
- path: '/login',
- name: '登录',
- component: '../pages/TestLogin/TestLogin'
- }
- ],
- plugins: [
- // ref: https://umijs.org/plugin/umi-plugin-react.html
- ['umi-plugin-react', {
- antd: true,
- dva: false,
- dynamicImport: false,
- title: '',
- dll: false,
- hd: true,
- routes: {
- exclude: [
- /components\//,
- ],
- },
- //CDN引入
- links: [
- { href: '//sp.qn.timichat.cn/static/antd-mobile/2.3.1/antd-mobile.min.css', rel: 'stylesheet' }
- ],
- headScripts: [
- //react
- '//sp.qn.timichat.cn/static/react/16.9.0/react.production.min.js',
- //react-dom
- '//sp.qn.timichat.cn/static/react/16.9.0/react-dom.production.min.js',
- //antd-mobile
- '//sp.qn.timichat.cn/static/antd-mobile/2.3.1/antd-mobile.min.js',
- //lottie动画
- '//sp.qn.timichat.cn/static/bodymovin/5.6.8/lottie.min.js',
- //moment
- // '//sp.qn.timichat.cn/static/moment/2.24.0/moment.min.js',
- //UAParser
- '//sp.qn.timichat.cn/static/UAParser/0.7.21/ua-parser.min.js'
- ],
- locale: {
- default: 'zh-CN',
- antd: true
- }
- }],
- ],
- extraPostCSSPlugins: [
- autoprefixer({
- flexbox: true
- }),
- // px2rem({
- // rootValue: 75,
- // // propBlackList:['border','border-top','border-left','border-right','border-bottom','border-radius','font-size'], // 这些属性不需要转换
- // selectorBlackList:['t_npx']
- // })
- ],
- hash: true,
- // exportStatic: {
- // htmlSuffix: true
- // },
- extraBabelPlugins: [
- ["import", { libraryName: "antd-mobile", style: true }] // `style: true` 会加载 less 文件
- ],
- proxy: {
- '/api-app': {
- target: 'http://api.dev.hidouyou.com',
- changeOrigin: true,
- //pathRewrite: { '^/server': '' },
- },
- '/api-common': {
- target: 'http://api.dev.hidouyou.com',
- changeOrigin: true,
- //pathRewrite: { '^/server': '' },
- },
- },
- // publicPath: '/themes/default/template/h5-activity/',
- publicPath: '/',
- outputPath: './tianyou-inapp',
- copy: [
- {
- "from": "public",
- "to": ""
- }
- ],
- // publicPath: 'http://sp.qn.timichat.cn/inapp/',
- externals: {
- 'react': 'React',
- 'react-dom': 'ReactDOM',
- 'antd-mobile': 'antd-mobile',
- 'lottie-web': 'lottie',
- // 'moment': 'moment',
- 'ua-parser-js': 'UAParser'
- },
- }
|