All files / koa/config/env shared.js

100% Statements 1/1
100% Branches 12/12
100% Functions 0/0
100% Lines 1/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40    3x                                                                          
'use strict';
 
exports = module.exports = {
  // 用户角色列表(注意顺序)
  userRoles: [
    'user', // 0(待激活)
    'partner', // 1经销商
    'admin', // 2(管理员)
  ],
  upload: {
    path: 'uploads/',
    tmp: 'uploads/tmp/',
  },
 
  snsLogins: ['qq', 'wechat'],
  qq: {
    clientID: process.env.QQ_CLIENT_ID || 'clientID',
    clientSecret: process.env.QQ_CLIENT_SECRET || 'clientSecret',
    callbackURL: process.env.QQ_CALLBACK_URL || '',
  },
  wechat: {
    clientID: process.env.WECHAT_CLIENT_ID || 'clientID',
    clientSecret: process.env.WECHAT_CLIENT_SECRET || 'clientSecret',
    callbackURL: process.env.WECHAT_CALLBACK_URL || '',
  },
  aliyun: {
    oss: {
      region: 'oss-cn-xx',
      accessKeyId: 'xx',
      accessKeySecret: 'xx',
      timeout: 60 * 60 * 1000,
      bucket: 'xx',
      // host: 'http://oxx.oss-cn-xx.aliyuncs.com/',
    },
    sms: {
      accessKeyId: 'xx',
      accessKeySecret: 'xx',
    },
  },
};