Authored by ccbikai(👎🏻🍜)

add apple-app-site-association

  1 +/**
  2 + * 唤起苹果 app 配置文件
  3 + */
  4 +
  5 +'use strict';
  6 +let configFile = `
  7 +{
  8 + "applinks": {
  9 + "apps": [],
  10 + "details": [
  11 + {
  12 + "appID": "6U82P566A4.com.yoho.buy",
  13 + "paths": [ "/universal_links/"]
  14 + },
  15 + {
  16 + "appID": "EX33S4LRW7.com.yoho.buy",
  17 + "paths": [ "*" ]
  18 + }
  19 + ]
  20 + }
  21 +}
  22 +`;
  23 +
  24 +const appSiteAssociation = (req, res) => {
  25 + res.send(configFile);
  26 +};
  27 +
  28 +module.exports = {
  29 + appSiteAssociation
  30 +};
@@ -13,12 +13,13 @@ var multipart = require('connect-multiparty'); @@ -13,12 +13,13 @@ var multipart = require('connect-multiparty');
13 var multipartMiddleware = multipart(); 13 var multipartMiddleware = multipart();
14 14
15 const uploadApi = require(cRoot + '/upload.js'); 15 const uploadApi = require(cRoot + '/upload.js');
16 -  
17 const hotfix = require(`${cRoot}/hotfix`); 16 const hotfix = require(`${cRoot}/hotfix`);
  17 +const apple = require(`${cRoot}/apple`);
18 18
19 // routers 19 // routers
20 -  
21 router.post('/api/upload/image', multipartMiddleware, uploadApi.uploadImg); 20 router.post('/api/upload/image', multipartMiddleware, uploadApi.uploadImg);
22 router.post('/hf/v1', hotfix.v1); 21 router.post('/hf/v1', hotfix.v1);
23 22
  23 +router.get('/.well-known/apple-app-site-association', apple.appSiteAssociation);
  24 +
24 module.exports = router; 25 module.exports = router;
@@ -76,7 +76,7 @@ module.exports = { @@ -76,7 +76,7 @@ module.exports = {
76 port: '4444' // influxdb port 76 port: '4444' // influxdb port
77 }, 77 },
78 console: { 78 console: {
79 - level: 'info', 79 + level: 'debug',
80 colorize: 'all', 80 colorize: 'all',
81 prettyPrint: true 81 prettyPrint: true
82 } 82 }