├── .babelrc ├── .editorconfig ├── .eslintignore ├── .eslintrc.js ├── .gitignore ├── .npmrc ├── .postcssrc.js ├── README.md ├── README0.md ├── build ├── build.js ├── check-versions.js ├── dev-client.js ├── dev-server.js ├── utils.js ├── vue-loader.conf.js ├── webpack.base.conf.js ├── webpack.dev.conf.js └── webpack.prod.conf.js ├── config ├── dev.env.js ├── index.js └── prod.env.js ├── index.html ├── mp_data ├── MQR.jpg ├── QR.jpg ├── avatar.png ├── avatar0.png ├── c1.png ├── c2.png ├── c3.png ├── c4.png ├── c5.png ├── c6.png ├── c7.png ├── csand_avatar.jpg ├── csand_qr.jpg ├── highrail.jpg ├── history.gif ├── metro_icon │ ├── bangkok.png │ ├── beijing.png │ ├── canton.png │ ├── changchun.png │ ├── changsha.gif │ ├── changzhou.gif │ ├── chengdu.png │ ├── chicago.gif │ ├── chongqing.png │ ├── dalian.png │ ├── dongguan.gif │ ├── dubai.png │ ├── foshan.gif │ ├── fuzhou.gif │ ├── guiyang.gif │ ├── hangzhou.png │ ├── harbin.gif │ ├── hefei.png │ ├── hongkong.png │ ├── houston.gif │ ├── istanbul.png │ ├── jinan.gif │ ├── kaohsiung.gif │ ├── kuala-lumpur.png │ ├── kunming.gif │ ├── lanzhou.gif │ ├── london.png │ ├── los-angeles.gif │ ├── moscow.png │ ├── mumbai-metro.gif │ ├── nanchang.png │ ├── nanjing.png │ ├── nanning.gif │ ├── newyork.png │ ├── ningbo.gif │ ├── osaka.png │ ├── paris.png │ ├── qingdao.png │ ├── seoul.png │ ├── shanghai.png │ ├── shenyang.gif │ ├── shenzhen.png │ ├── shijiazhuang.png │ ├── singapore.png │ ├── suzhou.png │ ├── taipei.png │ ├── taiyuan.png │ ├── taoyuan.gif │ ├── tianjin.png │ ├── tokyo-toei.gif │ ├── tokyo.png │ ├── urumqi.gif │ ├── washington.gif │ ├── wenzhou.gif │ ├── wuhan.png │ ├── wuxi.gif │ ├── xiamen.png │ ├── xian.png │ ├── xuzhou.gif │ └── zhengzhou.png ├── metro_net │ ├── bangkok.jpeg │ ├── beijing.jpg │ ├── canton.jpg │ ├── changchun.jpg │ ├── changsha.jpg │ ├── chengdu.jpg │ ├── chongqing.jpg │ ├── dalian.png │ ├── dubai.jpg │ ├── gaoxiong.jpeg │ ├── hangzhou.jpg │ ├── hangzhou1.png │ ├── hefei.jpg │ ├── hongkong.jpg │ ├── istanbul.png │ ├── kuala_lumpur.png │ ├── kunming.jpg │ ├── london.gif │ ├── moscow.jpg │ ├── nanchang.jpg │ ├── nanjing.jpg │ ├── new_york.gif │ ├── osaka.gif │ ├── paris.gif │ ├── qingdao.png │ ├── seoul.jpg │ ├── shanghai.jpg │ ├── shenzhen.jpg │ ├── singapore.jpg │ ├── suzhou.png │ ├── taipei.jpg │ ├── tianjin.jpg │ ├── tokyo.jpg │ ├── wuhan.jpg │ ├── xiamen.png │ ├── xian.jpg │ └── zhengzhou.jpg ├── railfan_avatar.jpg ├── railfan_qr.jpg └── 地铁图来源 ├── package-lock.json ├── package.json ├── package.swan.json ├── packages ├── README.md ├── components │ └── .gitkeep └── lib │ ├── service │ ├── README.md │ ├── index.js │ └── package.json │ └── wx-promise │ ├── README.md │ ├── index.js │ └── package.json ├── project.config.json ├── scripts ├── fetchWikipediaData.js ├── fetchWikivoyageData.js └── findoutChinese.js ├── src ├── App.vue ├── app.json ├── assets │ ├── images │ │ ├── gotop.png │ │ ├── heart-active.png │ │ ├── heart.png │ │ ├── icon_computer.png │ │ ├── icon_copy.png │ │ ├── icon_email.png │ │ ├── icon_exchange.png │ │ ├── icon_file.png │ │ ├── icon_link.png │ │ ├── icon_movie.png │ │ ├── icon_travel.png │ │ ├── location.png │ │ ├── logo │ │ │ ├── bangkok.png │ │ │ ├── beijing.png │ │ │ ├── canton.png │ │ │ ├── changchun.png │ │ │ ├── changsha.png │ │ │ ├── changzhou.gif │ │ │ ├── chengdu.png │ │ │ ├── chongqing.png │ │ │ ├── dalian.png │ │ │ ├── dongguan.gif │ │ │ ├── dubai.png │ │ │ ├── foshan.gif │ │ │ ├── fuzhou.png │ │ │ ├── guiyang.png │ │ │ ├── hangzhou.png │ │ │ ├── harbin.gif │ │ │ ├── harbin.png │ │ │ ├── hefei.png │ │ │ ├── hohhot.gif │ │ │ ├── hongkong.png │ │ │ ├── istanbul.png │ │ │ ├── jinan.gif │ │ │ ├── kaohsiung.png │ │ │ ├── kuala-lumpur.png │ │ │ ├── kunming.png │ │ │ ├── lanzhou.gif │ │ │ ├── london.png │ │ │ ├── moscow.png │ │ │ ├── nanchang.png │ │ │ ├── nanjing.png │ │ │ ├── nanning.gif │ │ │ ├── nanning.png │ │ │ ├── newyork.png │ │ │ ├── ningbo.gif │ │ │ ├── osaka.png │ │ │ ├── paris.png │ │ │ ├── qingdao.png │ │ │ ├── seoul.png │ │ │ ├── shanghai.png │ │ │ ├── shenyang.gif │ │ │ ├── shenyang.png │ │ │ ├── shenzhen.png │ │ │ ├── shijiazhuang.png │ │ │ ├── singapore.png │ │ │ ├── suzhou.png │ │ │ ├── taipei.png │ │ │ ├── taiyuan.gif │ │ │ ├── taoyuan.png │ │ │ ├── tianjin.png │ │ │ ├── tokyo.png │ │ │ ├── urumqi.gif │ │ │ ├── wenzhou.gif │ │ │ ├── wuhan.png │ │ │ ├── wuxi.gif │ │ │ ├── xiamen.png │ │ │ ├── xian.png │ │ │ ├── xuzhou.gif │ │ │ └── zhengzhou.png │ │ ├── more.png │ │ └── share.jpeg │ ├── lib │ │ └── qqmap-wx-jssdk.js │ └── styles │ │ ├── common.less │ │ └── variable.less ├── components │ ├── AppMenuBar.vue │ ├── CityCard.vue │ └── RoutineQuery.vue ├── config │ ├── cities.js │ └── index.js ├── main.js ├── mixins │ ├── commonMixin.js │ └── remoteConfigMixin.js ├── pages │ ├── citydetail │ │ ├── citydetail.vue │ │ └── main.js │ ├── citylist │ │ ├── citylist.vue │ │ └── main.js │ ├── citymap │ │ ├── citymap.vue │ │ └── main.js │ ├── cityroutine │ │ ├── cityroutine.vue │ │ └── main.js │ ├── citywiki │ │ ├── citywiki.vue │ │ └── main.js │ ├── morefeature │ │ ├── main.js │ │ └── morefeature.vue │ ├── standard.vue │ └── userguide │ │ ├── main.js │ │ └── userguide.vue ├── store │ ├── index.js │ └── modules │ │ ├── map.js │ │ ├── system.js │ │ └── user.js └── utils │ └── index.js └── static ├── .gitkeep ├── data ├── wiki │ ├── 上海.html │ ├── 伊斯坦布尔.html │ ├── 伦敦.html │ ├── 佛山.html │ ├── 兰州.html │ ├── 北京.html │ ├── 南京.html │ ├── 南昌.html │ ├── 南阳.html │ ├── 厦门.html │ ├── 合肥.html │ ├── 吉隆坡.html │ ├── 呼和浩特.html │ ├── 哈尔滨.html │ ├── 大连.html │ ├── 大阪.html │ ├── 天津.html │ ├── 宁波.html │ ├── 巴黎.html │ ├── 常州.html │ ├── 广州.html │ ├── 开封.html │ ├── 成都.html │ ├── 新加坡.html │ ├── 昆明.html │ ├── 曼谷.html │ ├── 杭州.html │ ├── 東京.html │ ├── 武汉.html │ ├── 洛阳.html │ ├── 济南.html │ ├── 深圳.html │ ├── 澳門.html │ ├── 珠海.html │ ├── 紐約.html │ ├── 臺北.html │ ├── 苏州.html │ ├── 莫斯科.html │ ├── 西安.html │ ├── 迪拜.html │ ├── 郑州.html │ ├── 重庆.html │ ├── 长春.html │ ├── 长沙.html │ ├── 青岛.html │ ├── 首爾.html │ ├── 香港.html │ └── 高雄.html └── wiki_original │ ├── 上海.html │ ├── 伊斯坦布尔.html │ ├── 伦敦.html │ ├── 佛山.html │ ├── 兰州.html │ ├── 北京.html │ ├── 南京.html │ ├── 南昌.html │ ├── 南阳.html │ ├── 厦门.html │ ├── 合肥.html │ ├── 吉隆坡.html │ ├── 呼和浩特.html │ ├── 哈尔滨.html │ ├── 大连.html │ ├── 大阪.html │ ├── 天津.html │ ├── 宁波.html │ ├── 巴黎.html │ ├── 常州.html │ ├── 广州.html │ ├── 开封.html │ ├── 成都.html │ ├── 新加坡.html │ ├── 昆明.html │ ├── 曼谷.html │ ├── 杭州.html │ ├── 東京.html │ ├── 武汉.html │ ├── 洛阳.html │ ├── 济南.html │ ├── 深圳.html │ ├── 澳門.html │ ├── 珠海.html │ ├── 紐約.html │ ├── 臺北.html │ ├── 苏州.html │ ├── 莫斯科.html │ ├── 西安.html │ ├── 迪拜.html │ ├── 郑州.html │ ├── 重庆.html │ ├── 长春.html │ ├── 长沙.html │ ├── 青岛.html │ ├── 首爾.html │ ├── 香港.html │ └── 高雄.html ├── end.png └── start.png /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["env", { 4 | "modules": false, 5 | "targets": { 6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"] 7 | } 8 | }], 9 | "stage-2" 10 | ], 11 | "plugins": ["transform-runtime"], 12 | "env": { 13 | "test": { 14 | "presets": ["env", "stage-2"], 15 | "plugins": ["istanbul"] 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | build/*.js 2 | config/*.js 3 | src/* -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | // http://eslint.org/docs/user-guide/configuring 2 | 3 | module.exports = { 4 | root: true, 5 | parser: 'babel-eslint', 6 | parserOptions: { 7 | sourceType: 'module' 8 | }, 9 | env: { 10 | browser: false, 11 | node: true, 12 | es6: true 13 | }, 14 | // https://github.com/standard/standard/blob/master/docs/RULES-en.md 15 | extends: 'standard', 16 | // required to lint *.vue files 17 | plugins: [ 18 | 'html' 19 | ], 20 | // add your custom rules here 21 | 'rules': { 22 | // allow paren-less arrow functions 23 | 'arrow-parens': 0, 24 | // allow async-await 25 | 'generator-star-spacing': 0, 26 | // allow debugger during development 27 | 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0 28 | }, 29 | globals: { 30 | App: true, 31 | Page: true, 32 | wx: true, 33 | getApp: true, 34 | getPage: true, 35 | requirePlugin: true 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | dist/ 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Editor directories and files 9 | .idea 10 | *.suo 11 | *.ntvs* 12 | *.njsproj 13 | *.sln 14 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | registry = http://registry.npm.taobao.org -------------------------------------------------------------------------------- /.postcssrc.js: -------------------------------------------------------------------------------- 1 | // https://github.com/michael-ciniawsky/postcss-load-config 2 | 3 | module.exports = { 4 | "plugins": { 5 | "postcss-mpvue-wxss": {} 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # subway-routine-mini-program 2 | 3 | ![小程序码](https://i.loli.net/2019/02/14/5c654bbce124c.jpg) 4 | 5 | 名称: 6 | 7 | 自由城市 自由旅行 8 | 9 | 简介: 10 | 11 | 提供主要城市地铁线路图及导游信息,包括北京上海广州深圳香港台北武汉天津重庆成都杭州大连青岛苏州南京新加坡东京首尔曼谷巴黎伦敦纽约等等。 -------------------------------------------------------------------------------- /README0.md: -------------------------------------------------------------------------------- 1 | # subway-routine-mini-program 2 | 3 | 名称: 4 | 自由城市 自由旅行 5 | 6 | 简介: 7 | 提供主要城市地铁线路图及导游信息,包括北京上海广州深圳香港台北武汉天津重庆成都杭州大连青岛苏州南京新加坡东京首尔曼谷巴黎伦敦纽约等等。 8 | 9 | 介绍: 10 | 本程序提供全球主要城市的地铁线路图,地铁线路图支持全屏预览和双指缩放。国内地铁支持路线规划和地图查看,国外暂不支持。 11 | 12 | 目前支持的国内城市有:北京、上海、深圳、广州、武汉、成都、重庆、天津、青岛、大连、南京、苏州、杭州、郑州、香港、台北等。 13 | 支持的国外城市有:东京、伦敦、纽约、首尔、新加坡、曼谷、大阪、莫斯科、迪拜、伊斯坦布尔等。 14 | 15 | 标签: 16 | 地铁 旅游 交通 工具 生活 出行 信息 查询 便民 17 | 18 | 交通#旅游#工具#信息查询#地铁#地铁线路图#生活 19 | 20 | 交通,旅游,工具,信息查询,地铁,地铁线路图,生活 21 | 22 | ![小程序码](https://i.loli.net/2019/02/14/5c654bbce124c.jpg) 23 | 24 | 25 | ## 运行截图 26 | 27 | ![](https://i.loli.net/2019/03/21/5c93747056a3c.png)![](https://i.loli.net/2019/03/21/5c93747133201.png)![](https://i.loli.net/2019/03/21/5c9374781aab1.png)![](https://i.loli.net/2019/03/21/5c93747578e8c.png)![](https://i.loli.net/2019/03/21/5c937472bc14f.png) 28 | 29 | 30 | ## 已发布商店 31 | 32 | - https://minapp.com/miniapp/10731/ 知晓 33 | - https://www.91ud.com/app/40531.html 91ud 34 | - https://www.damengxiang.me/app/f059514d.html 大梦想 35 | - https://www.xcx.la/xiaochengxu/3728.html 小程序啦 36 | - http://www.qingyy.net/app/4164 轻应用商店 37 | - http://www.awxin.com/xiaochengxu/gongju/2019/0220/20459.html 小程序网 38 | 39 | ## 技术架构 40 | 41 | mpvue + vuex + es6 + 小程序API + 腾讯地图SDK 42 | 43 | ## 开发与构建 44 | 45 | ``` bash 46 | # install dependencies 47 | npm install 48 | 49 | # serve with hot reload at localhost:8080 50 | npm run dev 51 | 52 | # build for production with minification 53 | npm run build 54 | 55 | # build for production and view the bundle analyzer report 56 | npm run build --report 57 | ``` 58 | 59 | For detailed explanation on how things work, checkout the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader). 60 | -------------------------------------------------------------------------------- /build/build.js: -------------------------------------------------------------------------------- 1 | require('./check-versions')() 2 | 3 | process.env.NODE_ENV = 'production' 4 | process.env.PLATFORM = process.argv[process.argv.length - 1] || 'wx' 5 | 6 | var ora = require('ora') 7 | var rm = require('rimraf') 8 | var path = require('path') 9 | var chalk = require('chalk') 10 | var webpack = require('webpack') 11 | var config = require('../config') 12 | var webpackConfig = require('./webpack.prod.conf') 13 | var utils = require('./utils') 14 | 15 | var spinner = ora('building for production...') 16 | spinner.start() 17 | 18 | rm(path.join(config.build.assetsRoot, '*'), err => { 19 | if (err) throw err 20 | webpack(webpackConfig, function (err, stats) { 21 | spinner.stop() 22 | if (err) throw err 23 | if (process.env.PLATFORM === 'swan') { 24 | utils.writeFrameworkinfo() 25 | } 26 | process.stdout.write(stats.toString({ 27 | colors: true, 28 | modules: false, 29 | children: false, 30 | chunks: false, 31 | chunkModules: false 32 | }) + '\n\n') 33 | 34 | if (stats.hasErrors()) { 35 | console.log(chalk.red(' Build failed with errors.\n')) 36 | process.exit(1) 37 | } 38 | 39 | console.log(chalk.cyan(' Build complete.\n')) 40 | console.log(chalk.yellow( 41 | ' Tip: built files are meant to be served over an HTTP server.\n' + 42 | ' Opening index.html over file:// won\'t work.\n' 43 | )) 44 | }) 45 | }) 46 | -------------------------------------------------------------------------------- /build/check-versions.js: -------------------------------------------------------------------------------- 1 | var chalk = require('chalk') 2 | var semver = require('semver') 3 | var packageConfig = require('../package.json') 4 | var shell = require('shelljs') 5 | function exec (cmd) { 6 | return require('child_process').execSync(cmd).toString().trim() 7 | } 8 | 9 | var versionRequirements = [ 10 | { 11 | name: 'node', 12 | currentVersion: semver.clean(process.version), 13 | versionRequirement: packageConfig.engines.node 14 | } 15 | ] 16 | 17 | if (shell.which('npm')) { 18 | versionRequirements.push({ 19 | name: 'npm', 20 | currentVersion: exec('npm --version'), 21 | versionRequirement: packageConfig.engines.npm 22 | }) 23 | } 24 | 25 | module.exports = function () { 26 | var warnings = [] 27 | for (var i = 0; i < versionRequirements.length; i++) { 28 | var mod = versionRequirements[i] 29 | if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) { 30 | warnings.push(mod.name + ': ' + 31 | chalk.red(mod.currentVersion) + ' should be ' + 32 | chalk.green(mod.versionRequirement) 33 | ) 34 | } 35 | } 36 | 37 | if (warnings.length) { 38 | console.log('') 39 | console.log(chalk.yellow('To use this template, you must update following to modules:')) 40 | console.log() 41 | for (var i = 0; i < warnings.length; i++) { 42 | var warning = warnings[i] 43 | console.log(' ' + warning) 44 | } 45 | console.log() 46 | process.exit(1) 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /build/dev-client.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | require('eventsource-polyfill') 3 | var hotClient = require('webpack-hot-middleware/client?noInfo=true&reload=true') 4 | 5 | hotClient.subscribe(function (event) { 6 | if (event.action === 'reload') { 7 | window.location.reload() 8 | } 9 | }) 10 | -------------------------------------------------------------------------------- /build/dev-server.js: -------------------------------------------------------------------------------- 1 | require('./check-versions')() 2 | 3 | process.env.PLATFORM = process.argv[process.argv.length - 1] || 'wx' 4 | var config = require('../config') 5 | if (!process.env.NODE_ENV) { 6 | process.env.NODE_ENV = JSON.parse(config.dev.env.NODE_ENV) 7 | } 8 | 9 | // var opn = require('opn') 10 | var path = require('path') 11 | var express = require('express') 12 | var webpack = require('webpack') 13 | var proxyMiddleware = require('http-proxy-middleware') 14 | var portfinder = require('portfinder') 15 | var webpackConfig = require('./webpack.dev.conf') 16 | var utils = require('./utils') 17 | 18 | // default port where dev server listens for incoming traffic 19 | var port = process.env.PORT || config.dev.port 20 | // automatically open browser, if not set will be false 21 | var autoOpenBrowser = !!config.dev.autoOpenBrowser 22 | // Define HTTP proxies to your custom API backend 23 | // https://github.com/chimurai/http-proxy-middleware 24 | var proxyTable = config.dev.proxyTable 25 | 26 | var app = express() 27 | var compiler = webpack(webpackConfig, function (err, stats) { 28 | if (err) throw err 29 | if (process.env.PLATFORM === 'swan') { 30 | utils.writeFrameworkinfo() 31 | } 32 | }) 33 | 34 | // var devMiddleware = require('webpack-dev-middleware')(compiler, { 35 | // publicPath: webpackConfig.output.publicPath, 36 | // quiet: true 37 | // }) 38 | 39 | // var hotMiddleware = require('webpack-hot-middleware')(compiler, { 40 | // log: false, 41 | // heartbeat: 2000 42 | // }) 43 | // force page reload when html-webpack-plugin template changes 44 | // compiler.plugin('compilation', function (compilation) { 45 | // compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) { 46 | // hotMiddleware.publish({ action: 'reload' }) 47 | // cb() 48 | // }) 49 | // }) 50 | 51 | // proxy api requests 52 | Object.keys(proxyTable).forEach(function (context) { 53 | var options = proxyTable[context] 54 | if (typeof options === 'string') { 55 | options = { target: options } 56 | } 57 | app.use(proxyMiddleware(options.filter || context, options)) 58 | }) 59 | 60 | // handle fallback for HTML5 history API 61 | app.use(require('connect-history-api-fallback')()) 62 | 63 | // serve webpack bundle output 64 | // app.use(devMiddleware) 65 | 66 | // enable hot-reload and state-preserving 67 | // compilation error display 68 | // app.use(hotMiddleware) 69 | 70 | // serve pure static assets 71 | var staticPath = path.posix.join(config.dev.assetsPublicPath, config.dev.assetsSubDirectory) 72 | app.use(staticPath, express.static('./static')) 73 | 74 | // var uri = 'http://localhost:' + port 75 | 76 | var _resolve 77 | var readyPromise = new Promise(resolve => { 78 | _resolve = resolve 79 | }) 80 | 81 | // console.log('> Starting dev server...') 82 | // devMiddleware.waitUntilValid(() => { 83 | // console.log('> Listening at ' + uri + '\n') 84 | // // when env is testing, don't need open it 85 | // if (autoOpenBrowser && process.env.NODE_ENV !== 'testing') { 86 | // opn(uri) 87 | // } 88 | // _resolve() 89 | // }) 90 | 91 | module.exports = new Promise((resolve, reject) => { 92 | portfinder.basePort = port 93 | portfinder.getPortPromise() 94 | .then(newPort => { 95 | if (port !== newPort) { 96 | console.log(`${port}端口被占用,开启新端口${newPort}`) 97 | } 98 | var server = app.listen(newPort, 'localhost') 99 | // for 小程序的文件保存机制 100 | require('webpack-dev-middleware-hard-disk')(compiler, { 101 | publicPath: webpackConfig.output.publicPath, 102 | quiet: true 103 | }) 104 | resolve({ 105 | ready: readyPromise, 106 | close: () => { 107 | server.close() 108 | } 109 | }) 110 | }).catch(error => { 111 | console.log('没有找到空闲端口,请打开任务管理器杀死进程端口再试', error) 112 | }) 113 | }) 114 | -------------------------------------------------------------------------------- /build/utils.js: -------------------------------------------------------------------------------- 1 | var path = require('path') 2 | var fs = require('fs') 3 | var config = require('../config') 4 | var ExtractTextPlugin = require('extract-text-webpack-plugin') 5 | var mpvueInfo = require('../node_modules/mpvue/package.json') 6 | var packageInfo = require('../package.json') 7 | 8 | exports.assetsPath = function (_path) { 9 | var assetsSubDirectory = process.env.NODE_ENV === 'production' 10 | ? config.build.assetsSubDirectory 11 | : config.dev.assetsSubDirectory 12 | return path.posix.join(assetsSubDirectory, _path) 13 | } 14 | 15 | exports.cssLoaders = function (options) { 16 | options = options || {} 17 | 18 | var cssLoader = { 19 | loader: 'css-loader', 20 | options: { 21 | minimize: process.env.NODE_ENV === 'production', 22 | sourceMap: options.sourceMap 23 | } 24 | } 25 | 26 | var postcssLoader = { 27 | loader: 'postcss-loader', 28 | options: { 29 | sourceMap: true 30 | } 31 | } 32 | 33 | var px2rpxLoader = { 34 | loader: 'px2rpx-loader', 35 | options: { 36 | baseDpr: 1, 37 | rpxUnit: 0.5 38 | } 39 | } 40 | 41 | // generate loader string to be used with extract text plugin 42 | function generateLoaders (loader, loaderOptions) { 43 | var loaders = [cssLoader, px2rpxLoader, postcssLoader] 44 | if (loader) { 45 | loaders.push({ 46 | loader: loader + '-loader', 47 | options: Object.assign({}, loaderOptions, { 48 | sourceMap: options.sourceMap 49 | }) 50 | }) 51 | } 52 | 53 | // Extract CSS when that option is specified 54 | // (which is the case during production build) 55 | if (options.extract) { 56 | return ExtractTextPlugin.extract({ 57 | use: loaders, 58 | fallback: 'vue-style-loader' 59 | }) 60 | } else { 61 | return ['vue-style-loader'].concat(loaders) 62 | } 63 | } 64 | 65 | // https://vue-loader.vuejs.org/en/configurations/extract-css.html 66 | return { 67 | css: generateLoaders(), 68 | wxss: generateLoaders(), 69 | postcss: generateLoaders(), 70 | less: generateLoaders('less'), 71 | sass: generateLoaders('sass', { indentedSyntax: true }), 72 | scss: generateLoaders('sass'), 73 | stylus: generateLoaders('stylus'), 74 | styl: generateLoaders('stylus') 75 | } 76 | } 77 | 78 | // Generate loaders for standalone style files (outside of .vue) 79 | exports.styleLoaders = function (options) { 80 | var output = [] 81 | var loaders = exports.cssLoaders(options) 82 | for (var extension in loaders) { 83 | var loader = loaders[extension] 84 | output.push({ 85 | test: new RegExp('\\.' + extension + '$'), 86 | use: loader 87 | }) 88 | } 89 | return output 90 | } 91 | 92 | exports.writeFrameworkinfo = function () { 93 | var buildInfo = { 94 | toolName: mpvueInfo.name, 95 | toolFrameWorkVersion: mpvueInfo.version, 96 | toolCliVersion: packageInfo.mpvueTemplateProjectVersion || '', 97 | createTime: Date.now() 98 | } 99 | 100 | var content = JSON.stringify(buildInfo) 101 | var fileName = '.frameworkinfo' 102 | var rootDir = path.resolve(__dirname, `.././${fileName}`) 103 | var distDir = path.resolve(config.build.assetsRoot, `./${fileName}`) 104 | 105 | fs.writeFile(rootDir, content, 'utf8', function (err) { 106 | if (err) throw err 107 | }) 108 | fs.writeFile(distDir, content, 'utf8', function (err) { 109 | if (err) throw err 110 | }) 111 | } 112 | -------------------------------------------------------------------------------- /build/vue-loader.conf.js: -------------------------------------------------------------------------------- 1 | var utils = require('./utils') 2 | var config = require('../config') 3 | // var isProduction = process.env.NODE_ENV === 'production' 4 | // for mp 5 | var isProduction = true 6 | 7 | module.exports = { 8 | loaders: utils.cssLoaders({ 9 | sourceMap: isProduction 10 | ? config.build.productionSourceMap 11 | : config.dev.cssSourceMap, 12 | extract: isProduction 13 | }), 14 | transformToRequire: { 15 | video: 'src', 16 | source: 'src', 17 | img: 'src', 18 | image: 'xlink:href' 19 | }, 20 | fileExt: config.build.fileExt 21 | } 22 | -------------------------------------------------------------------------------- /build/webpack.base.conf.js: -------------------------------------------------------------------------------- 1 | var path = require('path') 2 | var fs = require('fs') 3 | var utils = require('./utils') 4 | var config = require('../config') 5 | var webpack = require('webpack') 6 | var merge = require('webpack-merge') 7 | var vueLoaderConfig = require('./vue-loader.conf') 8 | var MpvuePlugin = require('webpack-mpvue-asset-plugin') 9 | var glob = require('glob') 10 | var CopyWebpackPlugin = require('copy-webpack-plugin') 11 | var relative = require('relative') 12 | 13 | function resolve (dir) { 14 | return path.join(__dirname, '..', dir) 15 | } 16 | 17 | function getEntry (rootSrc) { 18 | var map = {}; 19 | glob.sync(rootSrc + '/pages/**/main.js') 20 | .forEach(file => { 21 | var key = relative(rootSrc, file).replace('.js', ''); 22 | map[key] = file; 23 | }) 24 | return map; 25 | } 26 | 27 | const appEntry = { app: resolve('./src/main.js') } 28 | const pagesEntry = getEntry(resolve('./src'), 'pages/**/main.js') 29 | const entry = Object.assign({}, appEntry, pagesEntry) 30 | 31 | let baseWebpackConfig = { 32 | // 如果要自定义生成的 dist 目录里面的文件路径, 33 | // 可以将 entry 写成 {'toPath': 'fromPath'} 的形式, 34 | // toPath 为相对于 dist 的路径, 例:index/demo,则生成的文件地址为 dist/index/demo.js 35 | entry, 36 | target: require('mpvue-webpack-target'), 37 | output: { 38 | path: config.build.assetsRoot, 39 | jsonpFunction: 'webpackJsonpMpvue', 40 | filename: '[name].js', 41 | publicPath: process.env.NODE_ENV === 'production' 42 | ? config.build.assetsPublicPath 43 | : config.dev.assetsPublicPath 44 | }, 45 | resolve: { 46 | extensions: ['.js', '.vue', '.json'], 47 | alias: { 48 | 'vue': 'mpvue', 49 | '@': resolve('src') 50 | }, 51 | symlinks: false, 52 | aliasFields: ['mpvue', 'weapp', 'browser'], 53 | mainFields: ['browser', 'module', 'main'] 54 | }, 55 | module: { 56 | rules: [ 57 | { 58 | test: /\.(js|vue)$/, 59 | loader: 'eslint-loader', 60 | enforce: 'pre', 61 | include: [resolve('src'), resolve('test')], 62 | options: { 63 | formatter: require('eslint-friendly-formatter') 64 | } 65 | }, 66 | { 67 | test: /\.vue$/, 68 | loader: 'mpvue-loader', 69 | options: vueLoaderConfig 70 | }, 71 | { 72 | test: /\.js$/, 73 | include: [resolve('src'), resolve('test')], 74 | use: [ 75 | 'babel-loader', 76 | { 77 | loader: 'mpvue-loader', 78 | options: Object.assign({checkMPEntry: true}, vueLoaderConfig) 79 | }, 80 | ] 81 | }, 82 | { 83 | test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, 84 | loader: 'url-loader', 85 | options: { 86 | limit: 10000, 87 | name: utils.assetsPath('img/[name].[ext]') 88 | } 89 | }, 90 | { 91 | test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/, 92 | loader: 'url-loader', 93 | options: { 94 | limit: 10000, 95 | name: utils.assetsPath('media/[name].[ext]') 96 | } 97 | }, 98 | { 99 | test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, 100 | loader: 'url-loader', 101 | options: { 102 | limit: 10000, 103 | name: utils.assetsPath('fonts/[name].[ext]') 104 | } 105 | } 106 | ] 107 | }, 108 | plugins: [ 109 | // api 统一桥协议方案 110 | new webpack.DefinePlugin({ 111 | 'mpvue': 'global.mpvue', 112 | 'mpvuePlatform': 'global.mpvuePlatform' 113 | }), 114 | new MpvuePlugin(), 115 | new CopyWebpackPlugin([{ 116 | from: '**/*.json', 117 | to: '' 118 | }], { 119 | context: 'src/' 120 | }), 121 | new CopyWebpackPlugin([ 122 | { 123 | from: path.resolve(__dirname, '../static'), 124 | to: path.resolve(config.build.assetsRoot, './static'), 125 | ignore: ['.*'] 126 | } 127 | ]) 128 | ] 129 | } 130 | 131 | // 针对百度小程序,由于不支持通过 miniprogramRoot 进行自定义构建完的文件的根路径 132 | // 所以需要将项目根路径下面的 project.swan.json 拷贝到 dist/swan 下 133 | // 然后百度开发者工具将 dist/swan 作为项目根目录打开进行调试 134 | if (process.env.PLATFORM === 'swan') { 135 | baseWebpackConfig = merge(baseWebpackConfig, { 136 | plugins: [ 137 | new CopyWebpackPlugin([{ 138 | from: path.resolve(__dirname, '../project.swan.json'), 139 | to: path.resolve(config.build.assetsRoot) 140 | }]) 141 | ] 142 | }) 143 | } 144 | 145 | module.exports = baseWebpackConfig 146 | 147 | -------------------------------------------------------------------------------- /build/webpack.dev.conf.js: -------------------------------------------------------------------------------- 1 | var utils = require('./utils') 2 | var webpack = require('webpack') 3 | var config = require('../config') 4 | var merge = require('webpack-merge') 5 | var baseWebpackConfig = require('./webpack.base.conf') 6 | // var HtmlWebpackPlugin = require('html-webpack-plugin') 7 | var FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin') 8 | var MpvueVendorPlugin = require('webpack-mpvue-vendor-plugin') 9 | 10 | // copy from ./webpack.prod.conf.js 11 | var path = require('path') 12 | var ExtractTextPlugin = require('extract-text-webpack-plugin') 13 | var CopyWebpackPlugin = require('copy-webpack-plugin') 14 | var OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin') 15 | 16 | // add hot-reload related code to entry chunks 17 | // Object.keys(baseWebpackConfig.entry).forEach(function (name) { 18 | // baseWebpackConfig.entry[name] = ['./build/dev-client'].concat(baseWebpackConfig.entry[name]) 19 | // }) 20 | 21 | module.exports = merge(baseWebpackConfig, { 22 | module: { 23 | rules: utils.styleLoaders({ 24 | sourceMap: config.dev.cssSourceMap, 25 | extract: true 26 | }) 27 | }, 28 | // cheap-module-eval-source-map is faster for development 29 | // devtool: '#cheap-module-eval-source-map', 30 | devtool: '#source-map', 31 | output: { 32 | path: config.build.assetsRoot, 33 | // filename: utils.assetsPath('[name].[chunkhash].js'), 34 | // chunkFilename: utils.assetsPath('[id].[chunkhash].js') 35 | filename: utils.assetsPath('[name].js'), 36 | chunkFilename: utils.assetsPath('[id].js') 37 | }, 38 | plugins: [ 39 | new webpack.DefinePlugin({ 40 | 'process.env': config.dev.env 41 | }), 42 | 43 | // copy from ./webpack.prod.conf.js 44 | // extract css into its own file 45 | new ExtractTextPlugin({ 46 | // filename: utils.assetsPath('[name].[contenthash].css') 47 | filename: utils.assetsPath(`[name].${config.dev.fileExt.style}`) 48 | }), 49 | // Compress extracted CSS. We are using this plugin so that possible 50 | // duplicated CSS from different components can be deduped. 51 | new OptimizeCSSPlugin({ 52 | cssProcessorOptions: { 53 | safe: true 54 | } 55 | }), 56 | new webpack.optimize.CommonsChunkPlugin({ 57 | name: 'common/vendor', 58 | minChunks: function (module, count) { 59 | // any required modules inside node_modules are extracted to vendor 60 | return ( 61 | module.resource && 62 | /\.js$/.test(module.resource) && 63 | module.resource.indexOf('node_modules') >= 0 64 | ) || count > 1 65 | } 66 | }), 67 | new webpack.optimize.CommonsChunkPlugin({ 68 | name: 'common/manifest', 69 | chunks: ['common/vendor'] 70 | }), 71 | new MpvueVendorPlugin(), 72 | // https://github.com/glenjamin/webpack-hot-middleware#installation--usage 73 | // new webpack.HotModuleReplacementPlugin(), 74 | new webpack.NoEmitOnErrorsPlugin(), 75 | // https://github.com/ampedandwired/html-webpack-plugin 76 | // new HtmlWebpackPlugin({ 77 | // filename: 'index.html', 78 | // template: 'index.html', 79 | // inject: true 80 | // }), 81 | new FriendlyErrorsPlugin() 82 | ] 83 | }) 84 | -------------------------------------------------------------------------------- /build/webpack.prod.conf.js: -------------------------------------------------------------------------------- 1 | var path = require('path') 2 | var utils = require('./utils') 3 | var webpack = require('webpack') 4 | var config = require('../config') 5 | var merge = require('webpack-merge') 6 | var baseWebpackConfig = require('./webpack.base.conf') 7 | var UglifyJsPlugin = require('uglifyjs-webpack-plugin') 8 | var CopyWebpackPlugin = require('copy-webpack-plugin') 9 | // var HtmlWebpackPlugin = require('html-webpack-plugin') 10 | var ExtractTextPlugin = require('extract-text-webpack-plugin') 11 | var OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin') 12 | var MpvueVendorPlugin = require('webpack-mpvue-vendor-plugin') 13 | 14 | var env = config.build.env 15 | 16 | var webpackConfig = merge(baseWebpackConfig, { 17 | module: { 18 | rules: utils.styleLoaders({ 19 | sourceMap: config.build.productionSourceMap, 20 | extract: true 21 | }) 22 | }, 23 | devtool: config.build.productionSourceMap ? '#source-map' : false, 24 | output: { 25 | path: config.build.assetsRoot, 26 | // filename: utils.assetsPath('[name].[chunkhash].js'), 27 | // chunkFilename: utils.assetsPath('[id].[chunkhash].js') 28 | filename: utils.assetsPath('[name].js'), 29 | chunkFilename: utils.assetsPath('[id].js') 30 | }, 31 | plugins: [ 32 | // http://vuejs.github.io/vue-loader/en/workflow/production.html 33 | new webpack.DefinePlugin({ 34 | 'process.env': env 35 | }), 36 | // extract css into its own file 37 | new ExtractTextPlugin({ 38 | // filename: utils.assetsPath('[name].[contenthash].css') 39 | filename: utils.assetsPath(`[name].${config.build.fileExt.style}`) 40 | }), 41 | // Compress extracted CSS. We are using this plugin so that possible 42 | // duplicated CSS from different components can be deduped. 43 | new OptimizeCSSPlugin({ 44 | cssProcessorOptions: { 45 | safe: true 46 | } 47 | }), 48 | // generate dist index.html with correct asset hash for caching. 49 | // you can customize output by editing /index.html 50 | // see https://github.com/ampedandwired/html-webpack-plugin 51 | // new HtmlWebpackPlugin({ 52 | // filename: config.build.index, 53 | // template: 'index.html', 54 | // inject: true, 55 | // minify: { 56 | // removeComments: true, 57 | // collapseWhitespace: true, 58 | // removeAttributeQuotes: true 59 | // // more options: 60 | // // https://github.com/kangax/html-minifier#options-quick-reference 61 | // }, 62 | // // necessary to consistently work with multiple chunks via CommonsChunkPlugin 63 | // chunksSortMode: 'dependency' 64 | // }), 65 | // keep module.id stable when vender modules does not change 66 | new webpack.HashedModuleIdsPlugin(), 67 | // split vendor js into its own file 68 | new webpack.optimize.CommonsChunkPlugin({ 69 | name: 'common/vendor', 70 | minChunks: function (module, count) { 71 | // any required modules inside node_modules are extracted to vendor 72 | return ( 73 | module.resource && 74 | /\.js$/.test(module.resource) && 75 | module.resource.indexOf('node_modules') >= 0 76 | ) || count > 1 77 | } 78 | }), 79 | // extract webpack runtime and module manifest to its own file in order to 80 | // prevent vendor hash from being updated whenever app bundle is updated 81 | new webpack.optimize.CommonsChunkPlugin({ 82 | name: 'common/manifest', 83 | chunks: ['common/vendor'] 84 | }), 85 | new MpvueVendorPlugin() 86 | ] 87 | }) 88 | 89 | // if (config.build.productionGzip) { 90 | // var CompressionWebpackPlugin = require('compression-webpack-plugin') 91 | 92 | // webpackConfig.plugins.push( 93 | // new CompressionWebpackPlugin({ 94 | // asset: '[path].gz[query]', 95 | // algorithm: 'gzip', 96 | // test: new RegExp( 97 | // '\\.(' + 98 | // config.build.productionGzipExtensions.join('|') + 99 | // ')$' 100 | // ), 101 | // threshold: 10240, 102 | // minRatio: 0.8 103 | // }) 104 | // ) 105 | // } 106 | 107 | if (config.build.bundleAnalyzerReport) { 108 | var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin 109 | webpackConfig.plugins.push(new BundleAnalyzerPlugin()) 110 | } 111 | 112 | var useUglifyJs = process.env.PLATFORM !== 'swan' 113 | if (useUglifyJs) { 114 | webpackConfig.plugins.push(new UglifyJsPlugin({ 115 | sourceMap: true 116 | })) 117 | } 118 | 119 | module.exports = webpackConfig 120 | -------------------------------------------------------------------------------- /config/dev.env.js: -------------------------------------------------------------------------------- 1 | var merge = require('webpack-merge') 2 | var prodEnv = require('./prod.env') 3 | 4 | module.exports = merge(prodEnv, { 5 | NODE_ENV: '"development"' 6 | }) 7 | -------------------------------------------------------------------------------- /config/index.js: -------------------------------------------------------------------------------- 1 | // see http://vuejs-templates.github.io/webpack for documentation. 2 | var path = require('path') 3 | var fileExtConfig = { 4 | swan: { 5 | template: 'swan', 6 | script: 'js', 7 | style: 'css', 8 | platform: 'swan' 9 | }, 10 | wx: { 11 | template: 'wxml', 12 | script: 'js', 13 | style: 'wxss', 14 | platform: 'wx' 15 | } 16 | } 17 | var fileExt = fileExtConfig[process.env.PLATFORM] 18 | 19 | module.exports = { 20 | build: { 21 | env: require('./prod.env'), 22 | index: path.resolve(__dirname, `../dist/${fileExt.platform}/index.html`), 23 | assetsRoot: path.resolve(__dirname, `../dist/${fileExt.platform}`), 24 | assetsSubDirectory: '', 25 | assetsPublicPath: '/', 26 | productionSourceMap: false, 27 | // Gzip off by default as many popular static hosts such as 28 | // Surge or Netlify already gzip all static assets for you. 29 | // Before setting to `true`, make sure to: 30 | // npm install --save-dev compression-webpack-plugin 31 | productionGzip: false, 32 | productionGzipExtensions: ['js', 'css'], 33 | // Run the build command with an extra argument to 34 | // View the bundle analyzer report after build finishes: 35 | // `npm run build --report` 36 | // Set to `true` or `false` to always turn it on or off 37 | bundleAnalyzerReport: process.env.npm_config_report, 38 | fileExt: fileExt 39 | }, 40 | dev: { 41 | env: require('./dev.env'), 42 | port: 8080, 43 | // 在小程序开发者工具中不需要自动打开浏览器 44 | autoOpenBrowser: false, 45 | assetsSubDirectory: '', 46 | assetsPublicPath: '/', 47 | proxyTable: {}, 48 | // CSS Sourcemaps off by default because relative paths are "buggy" 49 | // with this option, according to the CSS-Loader README 50 | // (https://github.com/webpack/css-loader#sourcemaps) 51 | // In our experience, they generally work as expected, 52 | // just be aware of this issue when enabling this option. 53 | cssSourceMap: false, 54 | fileExt: fileExt 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /config/prod.env.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | NODE_ENV: '"production"' 3 | } 4 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | subway-routine 6 | 7 | 8 |
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /mp_data/MQR.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/MQR.jpg -------------------------------------------------------------------------------- /mp_data/QR.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/QR.jpg -------------------------------------------------------------------------------- /mp_data/avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/avatar.png -------------------------------------------------------------------------------- /mp_data/avatar0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/avatar0.png -------------------------------------------------------------------------------- /mp_data/c1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/c1.png -------------------------------------------------------------------------------- /mp_data/c2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/c2.png -------------------------------------------------------------------------------- /mp_data/c3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/c3.png -------------------------------------------------------------------------------- /mp_data/c4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/c4.png -------------------------------------------------------------------------------- /mp_data/c5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/c5.png -------------------------------------------------------------------------------- /mp_data/c6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/c6.png -------------------------------------------------------------------------------- /mp_data/c7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/c7.png -------------------------------------------------------------------------------- /mp_data/csand_avatar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/csand_avatar.jpg -------------------------------------------------------------------------------- /mp_data/csand_qr.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/csand_qr.jpg -------------------------------------------------------------------------------- /mp_data/highrail.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/highrail.jpg -------------------------------------------------------------------------------- /mp_data/history.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/history.gif -------------------------------------------------------------------------------- /mp_data/metro_icon/bangkok.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/bangkok.png -------------------------------------------------------------------------------- /mp_data/metro_icon/beijing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/beijing.png -------------------------------------------------------------------------------- /mp_data/metro_icon/canton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/canton.png -------------------------------------------------------------------------------- /mp_data/metro_icon/changchun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/changchun.png -------------------------------------------------------------------------------- /mp_data/metro_icon/changsha.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/changsha.gif -------------------------------------------------------------------------------- /mp_data/metro_icon/changzhou.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/changzhou.gif -------------------------------------------------------------------------------- /mp_data/metro_icon/chengdu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/chengdu.png -------------------------------------------------------------------------------- /mp_data/metro_icon/chicago.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/chicago.gif -------------------------------------------------------------------------------- /mp_data/metro_icon/chongqing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/chongqing.png -------------------------------------------------------------------------------- /mp_data/metro_icon/dalian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/dalian.png -------------------------------------------------------------------------------- /mp_data/metro_icon/dongguan.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/dongguan.gif -------------------------------------------------------------------------------- /mp_data/metro_icon/dubai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/dubai.png -------------------------------------------------------------------------------- /mp_data/metro_icon/foshan.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/foshan.gif -------------------------------------------------------------------------------- /mp_data/metro_icon/fuzhou.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/fuzhou.gif -------------------------------------------------------------------------------- /mp_data/metro_icon/guiyang.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/guiyang.gif -------------------------------------------------------------------------------- /mp_data/metro_icon/hangzhou.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/hangzhou.png -------------------------------------------------------------------------------- /mp_data/metro_icon/harbin.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/harbin.gif -------------------------------------------------------------------------------- /mp_data/metro_icon/hefei.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/hefei.png -------------------------------------------------------------------------------- /mp_data/metro_icon/hongkong.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/hongkong.png -------------------------------------------------------------------------------- /mp_data/metro_icon/houston.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/houston.gif -------------------------------------------------------------------------------- /mp_data/metro_icon/istanbul.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/istanbul.png -------------------------------------------------------------------------------- /mp_data/metro_icon/jinan.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/jinan.gif -------------------------------------------------------------------------------- /mp_data/metro_icon/kaohsiung.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/kaohsiung.gif -------------------------------------------------------------------------------- /mp_data/metro_icon/kuala-lumpur.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/kuala-lumpur.png -------------------------------------------------------------------------------- /mp_data/metro_icon/kunming.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/kunming.gif -------------------------------------------------------------------------------- /mp_data/metro_icon/lanzhou.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/lanzhou.gif -------------------------------------------------------------------------------- /mp_data/metro_icon/london.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/london.png -------------------------------------------------------------------------------- /mp_data/metro_icon/los-angeles.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/los-angeles.gif -------------------------------------------------------------------------------- /mp_data/metro_icon/moscow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/moscow.png -------------------------------------------------------------------------------- /mp_data/metro_icon/mumbai-metro.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/mumbai-metro.gif -------------------------------------------------------------------------------- /mp_data/metro_icon/nanchang.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/nanchang.png -------------------------------------------------------------------------------- /mp_data/metro_icon/nanjing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/nanjing.png -------------------------------------------------------------------------------- /mp_data/metro_icon/nanning.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/nanning.gif -------------------------------------------------------------------------------- /mp_data/metro_icon/newyork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/newyork.png -------------------------------------------------------------------------------- /mp_data/metro_icon/ningbo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/ningbo.gif -------------------------------------------------------------------------------- /mp_data/metro_icon/osaka.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/osaka.png -------------------------------------------------------------------------------- /mp_data/metro_icon/paris.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/paris.png -------------------------------------------------------------------------------- /mp_data/metro_icon/qingdao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/qingdao.png -------------------------------------------------------------------------------- /mp_data/metro_icon/seoul.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/seoul.png -------------------------------------------------------------------------------- /mp_data/metro_icon/shanghai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/shanghai.png -------------------------------------------------------------------------------- /mp_data/metro_icon/shenyang.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/shenyang.gif -------------------------------------------------------------------------------- /mp_data/metro_icon/shenzhen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/shenzhen.png -------------------------------------------------------------------------------- /mp_data/metro_icon/shijiazhuang.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/shijiazhuang.png -------------------------------------------------------------------------------- /mp_data/metro_icon/singapore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/singapore.png -------------------------------------------------------------------------------- /mp_data/metro_icon/suzhou.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/suzhou.png -------------------------------------------------------------------------------- /mp_data/metro_icon/taipei.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/taipei.png -------------------------------------------------------------------------------- /mp_data/metro_icon/taiyuan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/taiyuan.png -------------------------------------------------------------------------------- /mp_data/metro_icon/taoyuan.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/taoyuan.gif -------------------------------------------------------------------------------- /mp_data/metro_icon/tianjin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/tianjin.png -------------------------------------------------------------------------------- /mp_data/metro_icon/tokyo-toei.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/tokyo-toei.gif -------------------------------------------------------------------------------- /mp_data/metro_icon/tokyo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/tokyo.png -------------------------------------------------------------------------------- /mp_data/metro_icon/urumqi.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/urumqi.gif -------------------------------------------------------------------------------- /mp_data/metro_icon/washington.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/washington.gif -------------------------------------------------------------------------------- /mp_data/metro_icon/wenzhou.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/wenzhou.gif -------------------------------------------------------------------------------- /mp_data/metro_icon/wuhan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/wuhan.png -------------------------------------------------------------------------------- /mp_data/metro_icon/wuxi.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/wuxi.gif -------------------------------------------------------------------------------- /mp_data/metro_icon/xiamen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/xiamen.png -------------------------------------------------------------------------------- /mp_data/metro_icon/xian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/xian.png -------------------------------------------------------------------------------- /mp_data/metro_icon/xuzhou.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/xuzhou.gif -------------------------------------------------------------------------------- /mp_data/metro_icon/zhengzhou.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_icon/zhengzhou.png -------------------------------------------------------------------------------- /mp_data/metro_net/bangkok.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_net/bangkok.jpeg -------------------------------------------------------------------------------- /mp_data/metro_net/beijing.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_net/beijing.jpg -------------------------------------------------------------------------------- /mp_data/metro_net/canton.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_net/canton.jpg -------------------------------------------------------------------------------- /mp_data/metro_net/changchun.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_net/changchun.jpg -------------------------------------------------------------------------------- /mp_data/metro_net/changsha.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_net/changsha.jpg -------------------------------------------------------------------------------- /mp_data/metro_net/chengdu.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_net/chengdu.jpg -------------------------------------------------------------------------------- /mp_data/metro_net/chongqing.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_net/chongqing.jpg -------------------------------------------------------------------------------- /mp_data/metro_net/dalian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_net/dalian.png -------------------------------------------------------------------------------- /mp_data/metro_net/dubai.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_net/dubai.jpg -------------------------------------------------------------------------------- /mp_data/metro_net/gaoxiong.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_net/gaoxiong.jpeg -------------------------------------------------------------------------------- /mp_data/metro_net/hangzhou.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_net/hangzhou.jpg -------------------------------------------------------------------------------- /mp_data/metro_net/hangzhou1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_net/hangzhou1.png -------------------------------------------------------------------------------- /mp_data/metro_net/hefei.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_net/hefei.jpg -------------------------------------------------------------------------------- /mp_data/metro_net/hongkong.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_net/hongkong.jpg -------------------------------------------------------------------------------- /mp_data/metro_net/istanbul.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_net/istanbul.png -------------------------------------------------------------------------------- /mp_data/metro_net/kuala_lumpur.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_net/kuala_lumpur.png -------------------------------------------------------------------------------- /mp_data/metro_net/kunming.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_net/kunming.jpg -------------------------------------------------------------------------------- /mp_data/metro_net/london.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_net/london.gif -------------------------------------------------------------------------------- /mp_data/metro_net/moscow.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_net/moscow.jpg -------------------------------------------------------------------------------- /mp_data/metro_net/nanchang.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_net/nanchang.jpg -------------------------------------------------------------------------------- /mp_data/metro_net/nanjing.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_net/nanjing.jpg -------------------------------------------------------------------------------- /mp_data/metro_net/new_york.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_net/new_york.gif -------------------------------------------------------------------------------- /mp_data/metro_net/osaka.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_net/osaka.gif -------------------------------------------------------------------------------- /mp_data/metro_net/paris.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_net/paris.gif -------------------------------------------------------------------------------- /mp_data/metro_net/qingdao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_net/qingdao.png -------------------------------------------------------------------------------- /mp_data/metro_net/seoul.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_net/seoul.jpg -------------------------------------------------------------------------------- /mp_data/metro_net/shanghai.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_net/shanghai.jpg -------------------------------------------------------------------------------- /mp_data/metro_net/shenzhen.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_net/shenzhen.jpg -------------------------------------------------------------------------------- /mp_data/metro_net/singapore.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_net/singapore.jpg -------------------------------------------------------------------------------- /mp_data/metro_net/suzhou.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_net/suzhou.png -------------------------------------------------------------------------------- /mp_data/metro_net/taipei.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_net/taipei.jpg -------------------------------------------------------------------------------- /mp_data/metro_net/tianjin.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_net/tianjin.jpg -------------------------------------------------------------------------------- /mp_data/metro_net/tokyo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_net/tokyo.jpg -------------------------------------------------------------------------------- /mp_data/metro_net/wuhan.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_net/wuhan.jpg -------------------------------------------------------------------------------- /mp_data/metro_net/xiamen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_net/xiamen.png -------------------------------------------------------------------------------- /mp_data/metro_net/xian.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_net/xian.jpg -------------------------------------------------------------------------------- /mp_data/metro_net/zhengzhou.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/metro_net/zhengzhou.jpg -------------------------------------------------------------------------------- /mp_data/railfan_avatar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/railfan_avatar.jpg -------------------------------------------------------------------------------- /mp_data/railfan_qr.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/mp_data/railfan_qr.jpg -------------------------------------------------------------------------------- /mp_data/地铁图来源: -------------------------------------------------------------------------------- 1 | https://www.dir126.com 2 | 3 | 地铁logo 4 | http://mic-ro.com/metro/metrologos.html?metrolike=yes&clones=yes&size=lg&sort=country 5 | 6 | 7 | 武汉 8 | http://www.wuhanrt.com/public_forward.aspx??url=operation.aspx?dtag=menu_motion_1 9 | 郑州 10 | http://www.izuoche.com/ditie/ 11 | 长沙 12 | http://www.hncsmtr.com/ 13 | 厦门 14 | http://www.xmgdjt.net/Modules/ControlHtml/Line.aspx 15 | https://www.huoche.net/xiamenditieditu/ 16 | 昆明 17 | http://www.kmgdgs.com/yyxlt/ 18 | 高雄 19 | http://www.krtco.com.tw/train_info/service-1.aspx 20 | 新加坡 21 | https://www.visitsingapore.com.cn/travel-guide-tips/getting-around/tourist-guide-maps-apps/ 22 | 莫斯科 23 | https://www.russia-online.cn/CityGuide/cmetro_1.shtml 24 | 迪拜 25 | https://www.dubaitourism.cn/ 26 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "subway-routine", 3 | "version": "1.0.0", 4 | "mpvueTemplateProjectVersion": "0.0.1", 5 | "description": "subway routine helper", 6 | "author": "ZhouJihao ", 7 | "private": true, 8 | "scripts": { 9 | "dev:wx": "node build/dev-server.js wx", 10 | "start:wx": "npm run dev:wx", 11 | "build:wx": "node build/build.js wx", 12 | "dev:swan": "node build/dev-server.js swan", 13 | "start:swan": "npm run dev:swan", 14 | "build:swan": "node build/build.js swan", 15 | "dev": "node build/dev-server.js wx", 16 | "start": "npm run dev", 17 | "build": "node build/build.js wx", 18 | "lint": "eslint --ext .js,.vue src" 19 | }, 20 | "dependencies": { 21 | "mpvue": "^1.0.11", 22 | "vuex": "^3.0.1" 23 | }, 24 | "devDependencies": { 25 | "axios": "^0.18.0", 26 | "babel-core": "^6.22.1", 27 | "babel-eslint": "^8.2.3", 28 | "babel-loader": "^7.1.1", 29 | "babel-plugin-transform-runtime": "^6.22.0", 30 | "babel-preset-env": "^1.3.2", 31 | "babel-preset-stage-2": "^6.22.0", 32 | "babel-register": "^6.22.0", 33 | "chalk": "^2.4.0", 34 | "cheerio": "^1.0.0-rc.10", 35 | "connect-history-api-fallback": "^1.3.0", 36 | "copy-webpack-plugin": "^4.5.1", 37 | "css-loader": "^0.28.11", 38 | "cssnano": "^3.10.0", 39 | "eslint": "^4.19.1", 40 | "eslint-config-standard": "^11.0.0", 41 | "eslint-friendly-formatter": "^4.0.1", 42 | "eslint-loader": "^2.0.0", 43 | "eslint-plugin-html": "^4.0.3", 44 | "eslint-plugin-import": "^2.11.0", 45 | "eslint-plugin-node": "^6.0.1", 46 | "eslint-plugin-promise": "^3.4.0", 47 | "eslint-plugin-standard": "^3.0.1", 48 | "eventsource-polyfill": "^0.9.6", 49 | "express": "^4.16.3", 50 | "extract-text-webpack-plugin": "^3.0.2", 51 | "file-loader": "^1.1.11", 52 | "friendly-errors-webpack-plugin": "^1.7.0", 53 | "glob": "^7.1.2", 54 | "html-webpack-plugin": "^3.2.0", 55 | "http-proxy-middleware": "^0.18.0", 56 | "less": "^3.9.0", 57 | "less-loader": "^4.1.0", 58 | "mpvue-loader": "^1.1.2", 59 | "mpvue-template-compiler": "^1.0.11", 60 | "mpvue-webpack-target": "^1.0.3", 61 | "optimize-css-assets-webpack-plugin": "^3.2.0", 62 | "ora": "^2.0.0", 63 | "portfinder": "^1.0.13", 64 | "postcss-loader": "^2.1.4", 65 | "postcss-mpvue-wxss": "^1.0.0", 66 | "prettier": "~1.12.1", 67 | "px2rpx-loader": "^0.1.10", 68 | "relative": "^3.0.2", 69 | "rimraf": "^2.6.0", 70 | "semver": "^5.3.0", 71 | "shelljs": "^0.8.1", 72 | "uglifyjs-webpack-plugin": "^1.2.5", 73 | "url-loader": "^1.0.1", 74 | "vue-style-loader": "^4.1.0", 75 | "webpack": "^3.11.0", 76 | "webpack-bundle-analyzer": "^2.2.1", 77 | "webpack-dev-middleware-hard-disk": "^1.12.0", 78 | "webpack-merge": "^4.1.0", 79 | "webpack-mpvue-asset-plugin": "^0.1.2", 80 | "webpack-mpvue-vendor-plugin": "^0.0.1" 81 | }, 82 | "engines": { 83 | "node": ">= 4.0.0", 84 | "npm": ">= 3.0.0" 85 | }, 86 | "browserslist": [ 87 | "> 1%", 88 | "last 2 versions", 89 | "not ie <= 8" 90 | ] 91 | } 92 | -------------------------------------------------------------------------------- /package.swan.json: -------------------------------------------------------------------------------- 1 | { 2 | "appid": "wxad716b9e75e773b5", 3 | "setting": { 4 | "urlCheck": false 5 | }, 6 | "condition": { 7 | "swan": { 8 | "current": -1, 9 | "list": [] 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /packages/README.md: -------------------------------------------------------------------------------- 1 | # 公共模块 2 | 3 | ## 结构 4 | 5 | - ```components```: 组件 6 | 7 | - ```lib```: Javascript库 8 | 9 | ## 注意 10 | 11 | - 封装模块时,应尽可能避免不同模块间的耦合,保证单独抽离后还能正常使用 12 | 13 | - 设计模块时应写好对外的 API 文档,便于查看 14 | 15 | -------------------------------------------------------------------------------- /packages/components/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WarpPrism/SubwayRoutineMP/09b3b96f53c7ad75c5172e83c4f80e3e80f8aeaa/packages/components/.gitkeep -------------------------------------------------------------------------------- /packages/lib/service/README.md: -------------------------------------------------------------------------------- 1 | # 微信小程序服务模块 2 | 3 | ## 使用说明 4 | 5 | ``` step 01 ``` 6 | 7 | 在package.json中添加字段 8 | 9 | ``` json 10 | "dependencies": { 11 | "service": "packages/lib/service" 12 | } 13 | ``` 14 | 15 | ``` step 02 ``` 16 | 17 | 安装依赖包 18 | 19 | ```bash 20 | npm install 21 | ``` 22 | 23 | ## 构造参数 24 | 25 | 与原生小程序api中wx.request参数相同,在此基础上,新增 ``` baseURL ``` 字段 26 | 27 | 可参考如下示例: 28 | 29 | > 先创建一个service实例 30 | 31 | 32 | ```javascript 33 | // api/index.js 34 | import service from 'service' 35 | 36 | const Docer = service.create({ 37 | baseURL: 'https://www.docer.com/', 38 | headers: { 39 | 'X-Requested-With': 'XMLHttpRequest' 40 | } 41 | }) 42 | 43 | ``` 44 | 45 | > 暴露具体的请求接口,service实例支持和原生小程序同样的请求方式,如:post、get、put、delete等 46 | 47 | ```javascript 48 | export const getA = ({ a, b } = {}) => Docer.post('/actionA', { 49 | data: { a, b } 50 | }) 51 | ``` 52 | 53 | > 调用接口 54 | 55 | ```javascript 56 | import * as Api from '@/api' 57 | 58 | Api.getA({ 59 | a: 1, 60 | b: 2 61 | }).then(res => { 62 | console.log(res) 63 | }) 64 | ``` 65 | -------------------------------------------------------------------------------- /packages/lib/service/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 微信小程序服务模块 3 | */ 4 | 5 | import merge from 'lodash/merge' 6 | 7 | const __WX__ = !!wx // 环境常量,判断是否处于小程序 8 | 9 | export default class Service { 10 | constructor (props = {}) { 11 | this.props = merge({ 12 | baseURL: '' 13 | }, props) 14 | } 15 | 16 | static create (props = {}) { 17 | return new Service(props) 18 | } 19 | 20 | // request 21 | fetch (params = {}) { 22 | if (__WX__) { 23 | return this._wxFetch(params) 24 | } else { 25 | return Promise.reject(new Error('暂只支持小程序环境')) 26 | } 27 | } 28 | 29 | // wx request 30 | _wxFetch (params = {}) { 31 | return new Promise((resolve, reject) => { 32 | try { 33 | wx.request(merge({}, this.props, params, { 34 | success: resolve, 35 | fail: reject 36 | })) 37 | } catch (e) { 38 | reject(e) 39 | } 40 | }) 41 | } 42 | 43 | /** 44 | * 拼接完整请求地址 45 | * 46 | * @param {any} baseUrl 47 | * @param {any} relativeUrl 48 | * @returns 49 | * @memberof DataService 50 | */ 51 | combineURLs (baseURL, relativeURL) { 52 | return relativeURL 53 | ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') 54 | : baseURL 55 | } 56 | 57 | // method 58 | 59 | option (url, params) { 60 | return this.fetch(merge({}, params, { 61 | url: this.combineURLs(this.props.baseURL, url), 62 | method: 'OPTIONS' 63 | })) 64 | } 65 | 66 | get (url, params) { 67 | return this.fetch(merge({}, params, { 68 | url: this.combineURLs(this.props.baseURL, url), 69 | method: 'GET' 70 | })) 71 | } 72 | 73 | post (url, params) { 74 | return this.fetch(merge({}, params, { 75 | url: this.combineURLs(this.props.baseURL, url), 76 | method: 'POST' 77 | })) 78 | } 79 | 80 | put (url, params) { 81 | return this.fetch(merge({}, params, { 82 | url: this.combineURLs(this.props.baseURL, url), 83 | method: 'PUT' 84 | })) 85 | } 86 | 87 | delete (url, params) { 88 | return this.fetch(merge({}, params, { 89 | url: this.combineURLs(this.props.baseURL, url), 90 | method: 'DELETE' 91 | })) 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /packages/lib/service/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "service", 3 | "version": "1.0.0", 4 | "author": "duanlian ", 5 | "main": "index.js", 6 | "private": true, 7 | "engines": { 8 | "node": ">= 4.0.0", 9 | "npm": ">= 3.0.0" 10 | }, 11 | "browserslist": [ 12 | "> 1%", 13 | "last 2 versions", 14 | "not ie <= 8" 15 | ], 16 | "dependencies": { 17 | "lodash": "^4.17.10" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /packages/lib/wx-promise/README.md: -------------------------------------------------------------------------------- 1 | # wx-promise 2 | 3 | 将微信 API ```promise``` 处理 4 | 5 | ## Usage 6 | 7 | ```javascript 8 | import _wx from 'wx-promise' 9 | 10 | // use then 11 | _wx 12 | .login() 13 | .then(res => { 14 | console.log('login success: ', res) 15 | }) 16 | .catch(err => { 17 | // do something 18 | }) 19 | 20 | // or use async/await 21 | 22 | async function () { 23 | try { 24 | const res = await _wx.login() 25 | console.log('login success: ', res)console.log() 26 | } catch (e) { 27 | // do something 28 | } 29 | } 30 | ``` -------------------------------------------------------------------------------- /packages/lib/wx-promise/index.js: -------------------------------------------------------------------------------- 1 | const promise = {} 2 | promise.default = promise 3 | 4 | /** 5 | * promise.app ==> getApp() 6 | */ 7 | Object.defineProperty(promise, 'app', { 8 | get: function () { 9 | return getApp() 10 | } 11 | }) 12 | 13 | /** 14 | * 没有 success fail 回调 15 | */ 16 | const noPromiseMethods = { 17 | stopRecord: true, 18 | pauseVoice: true, 19 | stopVoice: true, 20 | pauseBackgroundAudio: true, 21 | stopBackgroundAudio: true, 22 | showNavigationBarLoading: true, 23 | hideNavigationBarLoading: true, 24 | createAnimation: true, 25 | createContext: true, 26 | hideKeyboard: true, 27 | stopPullDownRefresh: true 28 | } 29 | 30 | function forEach(key) { 31 | 32 | if (noPromiseMethods[key] || key.substr(0, 2) === 'on' || /\w+Sync$/.test(key)) { // 没有 success fail 回调,以 on 开头,或以 Sync 结尾的用原始的方法 33 | 34 | promise[key] = function () { 35 | return wx[key].apply(wx, arguments) 36 | } 37 | return 38 | } 39 | 40 | // 转成 promise 41 | promise[key] = function (obj) { 42 | obj = obj || {} 43 | 44 | //++ 给Promise加入finally方法 45 | Promise.prototype.finally = function(callback) { 46 | let P = this.constructor 47 | return this.then( 48 | value => P.resolve(callback()).then(()=>value), 49 | reason => P.resolve(callback()).then(()=>{throw reason}) 50 | ) 51 | } 52 | 53 | return new Promise(function (resolve, reject) { 54 | obj.success = resolve 55 | obj.fail = function (res) { 56 | if (res && res.errMsg) { 57 | reject(new Error(res.errMsg)) 58 | } else { 59 | reject(res) 60 | } 61 | } 62 | wx[key](obj) 63 | }) 64 | } 65 | } 66 | 67 | Object.keys(wx).forEach(forEach) 68 | 69 | export default promise 70 | -------------------------------------------------------------------------------- /packages/lib/wx-promise/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "wx-promise", 3 | "version": "1.0.0", 4 | "author": "duanlian ", 5 | "main": "index.js", 6 | "private": true, 7 | "engines": { 8 | "node": ">= 4.0.0", 9 | "npm": ">= 3.0.0" 10 | }, 11 | "browserslist": [ 12 | "> 1%", 13 | "last 2 versions", 14 | "not ie <= 8" 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /project.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "项目配置文件。", 3 | "setting": { 4 | "urlCheck": true, 5 | "es6": true, 6 | "postcss": true, 7 | "minified": true, 8 | "newFeature": true, 9 | "nodeModules": true, 10 | "autoAudits": true, 11 | "uglifyFileName": true, 12 | "checkInvalidKey": true, 13 | "checkSiteMap": true, 14 | "uploadWithSourceMap": true, 15 | "babelSetting": { 16 | "ignore": [], 17 | "disablePlugins": [], 18 | "outputPath": "" 19 | }, 20 | "enhance": false 21 | }, 22 | "miniprogramRoot": "dist/wx/", 23 | "compileType": "miniprogram", 24 | "appid": "wxad716b9e75e773b5", 25 | "projectname": "subway-routine", 26 | "libVersion": "2.10.3", 27 | "simulatorType": "wechat", 28 | "simulatorPluginLibVersion": {}, 29 | "condition": { 30 | "search": { 31 | "current": -1, 32 | "list": [] 33 | }, 34 | "conversation": { 35 | "current": -1, 36 | "list": [] 37 | }, 38 | "plugin": { 39 | "current": -1, 40 | "list": [] 41 | }, 42 | "game": { 43 | "currentL": -1, 44 | "list": [] 45 | }, 46 | "miniprogram": { 47 | "current": 5, 48 | "list": [ 49 | { 50 | "id": -1, 51 | "name": "guide", 52 | "pathName": "pages/userguide/main", 53 | "query": "", 54 | "scene": null 55 | }, 56 | { 57 | "id": 1, 58 | "name": "citydetail", 59 | "pathName": "pages/citydetail/main", 60 | "query": "id=3&name=广州", 61 | "scene": null 62 | }, 63 | { 64 | "id": 2, 65 | "name": "citywiki", 66 | "pathName": "pages/citywiki/main", 67 | "query": "id=3001&name=东京", 68 | "scene": null 69 | }, 70 | { 71 | "id": 3, 72 | "name": "citymap", 73 | "pathName": "pages/citymap/main", 74 | "query": "id=6&name=南京", 75 | "scene": null 76 | }, 77 | { 78 | "id": 4, 79 | "name": "morefeature", 80 | "pathName": "pages/morefeature/main", 81 | "query": "", 82 | "scene": 1001 83 | }, 84 | { 85 | "id": -1, 86 | "name": "cityroutine", 87 | "pathName": "pages/cityroutine/main", 88 | "query": "id=3&name=广州&from=23.119327,113.321219&to=23.058092,113.385614", 89 | "scene": null 90 | } 91 | ] 92 | } 93 | } 94 | } -------------------------------------------------------------------------------- /scripts/fetchWikipediaData.js: -------------------------------------------------------------------------------- 1 | // 掘金 wiki api 简单说明 2 | // https://juejin.im/post/5a311f0151882531e944cf41 3 | /* eslint-disable */ 4 | const fs = require('fs') 5 | const path = require('path') 6 | const axios = require('axios') 7 | 8 | // const WikipediaMobile = 'https://zh.m.wikipedia.org/w/api.php' 9 | const WikipediaPC = 'https://zh.wikipedia.org/w/api.php' 10 | 11 | let WikipediaContentUrl = `${WikipediaPC}?action=query&format=json&formatversion=2&prop=revisions&rvprop=content&rvslots=*&titles=` 12 | 13 | WikipediaContentUrl = `${WikipediaPC}?action=parse&format=json&mobileformat=true&page=` 14 | 15 | const WikiNameMap = { 16 | '东京': '東京', 17 | '纽约': '紐約', 18 | '首尔': '首爾', 19 | '台北': '臺北', 20 | '澳门': '澳門' 21 | } 22 | let china_cities = [ 23 | '北京市', '上海市', '广州市', '深圳市', '香港市', '澳门市', '南京市', '重庆市', '武汉市', '成都市', '天津市', '青岛市', '大连市', '苏州市', 24 | '杭州市', '郑州市', '西安市', '长春市', '合肥市', '南昌市', '长沙市', '昆明市', '厦门市', '常州市', '呼和浩特市', '哈尔滨市', '兰州市', 25 | '宁波市', '济南市', '珠海市', '佛山市', '洛阳市', '开封市', '南阳市', '台北市', '高雄市' 26 | ] 27 | 28 | let world_cities = [ 29 | '东京市', '伦敦市', '巴黎市', '纽约市', '首尔市', '新加坡市', '曼谷市', '吉隆坡市', '莫斯科市', '迪拜市', '伊斯坦布尔市', '大阪市', 30 | ] 31 | 32 | let cities = china_cities.concat(world_cities) 33 | 34 | let total = cities.length 35 | let done = 0 36 | 37 | cities.forEach((cityName, index) => { 38 | cityName = WikiNameMap[cityName] || cityName 39 | let reqUrl = WikipediaContentUrl + encodeURIComponent(cityName) 40 | // console.log(reqUrl) 41 | let dir0 = path.resolve(__dirname, `../static/data/wikipedia_original/${cityName}.html`) 42 | // let dir1 = path.resolve(__dirname, `../static/data/wiki/${cityName}.html`) 43 | if (fsExistsSync(dir0)) { 44 | done++ 45 | console.log(`${cityName} 成功,进度 ${done}/${total}`) 46 | return 47 | } 48 | console.log(`${index + 1} ${cityName} 开始请求wiki旅游数据...`) 49 | axios.get(reqUrl, { 50 | timeout: 30e3 51 | }).then(res => { 52 | if (res && res.status === 200 && res.data) { 53 | let data = res.data 54 | let htmlContent = data.parse.text['*'] 55 | fs.writeFileSync(dir0, htmlContent) 56 | 57 | // htmlContent = fixWikiHtml(htmlContent) 58 | // fs.writeFileSync(dir1, htmlContent) 59 | done++ 60 | console.log(`${cityName} 成功,进度 ${done}/${total}`) 61 | } 62 | }).catch(e => { 63 | console.log(`${cityName} 请求失败`, e.code) 64 | }) 65 | }) 66 | 67 | function fixWikiHtml (html) { 68 | html = html.replace(/[\r\n]/gi, '') 69 | 70 | html = html.replace(/

/gi, '/div>') 79 | // 表格样式修复 80 | html = html.replace(/margin:1em; padding:0\.5em;/gi, 'margin:15px 0; padding:0.2em;') 81 | html = html.replace(/border-radius:3px; float:right; background:#f3f3ff; white-space:nowrap;/gi, 82 | 'border-radius:3px; float:none; background:#f3f3ff; white-space:nowrap; overflow: scroll; width: 100% !important;') 83 | // 气候表格 84 | html = html.replace(/>日间最高最高<') 85 | html = html.replace(/>夜间最低最低<') 86 | html = html.replace(/>日照(小时/天)/gi, '>日照') 87 | // 去掉编辑 88 | html = html.replace(//gi, '