Authored by htoooth

Merge remote-tracking branch 'origin/release/1.0' into release/1.0

{
"presets": [
["env", { "modules": false }],
"stage-2"
"es2015"
],
"plugins": ["transform-runtime"],
"comments": false,
"env": {
"test": {
"presets": ["env", "stage-2"],
"plugins": [ "istanbul" ]
}
},
"ignore": [
"node_modules"
]
"plugins": ["transform-runtime"]
}
... ...
... ... @@ -8,6 +8,12 @@ import './filters';
import './directives';
import 'iview/dist/styles/iview.css';
import 'font-awesome/css/font-awesome.css';
import Promise from 'promise-polyfill';
// To add to window
if (!window.Promise) {
window.Promise = Promise;
}
let router = new Router({
routes: Routers,
... ...
... ... @@ -63,7 +63,6 @@ module.exports = {
{
test: /\.js$/,
loader: 'babel-loader',
include: [util.resolve('/')],
exclude: /node_modules/
},
{
... ...
... ... @@ -34,4 +34,9 @@ const component = function editor(resolve) {
}, 'editor');
};
if (!component.name) {
component.name = 'editor';
}
export default component;
... ...
... ... @@ -287,4 +287,4 @@
.btn-row-space {
margin-top: 10px;
}
</style>
</style>
\ No newline at end of file
... ...
... ... @@ -14,11 +14,16 @@ class Rsa {
decrypt(cipherText, Type) {
let plainText = cryptico.decrypt(cipherText, this.mattsRSAkey).plaintext;
if (Type && Type.name === 'Object') {
if (this.getType(Type) === 'Object') {
return JSON.parse(decodeURIComponent(plainText));
}
return plainText;
}
getType(fn) {
let match = fn && fn.toString().match(/^\s*function (\w+)/);
return match && match[1];
}
}
export default new Rsa();
... ...
... ... @@ -14,6 +14,7 @@
},
"dependencies": {
"axios": "^0.15.3",
"babel-preset-es2015": "^6.24.1",
"babel-runtime": "^6.23.0",
"bluebird": "^3.5.0",
"body-parser": "^1.17.1",
... ...
... ... @@ -73,8 +73,12 @@ class Api extends Context {
logger.info(`api call ${response.statusCode} [${req.method}] ${req.uri.href} ${req.body || ''}`);
return jsonBody;
}).catch(err => {
logger.error(`api call ${err.statusCode} [${err.options.method}]
if (err.statusCode) {
logger.error(`api call ${err.statusCode} [${err.options.method}]
${err.options.url} ${err.response.body || ''}`);
} else {
logger.error(`api call ${err}`);
}
return Promise.reject(API_INTERNAL_ERROR);
});
}
... ...
... ... @@ -58,7 +58,8 @@ if (isTest) {
if (isProd) {
_.merge(config, {
apiDomain: {
platform: 'http://172.31.23.161:8088/platform'
platform: 'http://172.31.23.161:8088/platform',
erp: 'http://192.168.103.82:9098'
}
});
}
... ...