Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yoho-shop-manage
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
htoooth
8 years ago
Commit
8178615f183655c687a8498cfe26bee446a6c11b
2 parents
a2f22e85
480425ab
Merge remote-tracking branch 'origin/release/1.0' into release/1.0
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
28 additions
and
18 deletions
.babelrc
app/app.js
app/build/webpack.base.conf.js
app/components/global/common/editor.js
app/pages/product/offsale/offsale.vue
app/plugins/rsa.js
package.json
server/common/api.js
server/common/config.js
.babelrc
View file @
8178615
{
"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"
]
}
...
...
app/app.js
View file @
8178615
...
...
@@ -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
,
...
...
app/build/webpack.base.conf.js
View file @
8178615
...
...
@@ -63,7 +63,6 @@ module.exports = {
{
test
:
/
\.
js$/
,
loader
:
'babel-loader'
,
include
:
[
util
.
resolve
(
'/'
)],
exclude
:
/node_modules/
},
{
...
...
app/components/global/common/editor.js
View file @
8178615
...
...
@@ -34,4 +34,9 @@ const component = function editor(resolve) {
},
'editor'
);
};
if
(
!
component
.
name
)
{
component
.
name
=
'editor'
;
}
export
default
component
;
...
...
app/pages/product/offsale/offsale.vue
View file @
8178615
...
...
@@ -287,4 +287,4 @@
.btn-row-space {
margin-top: 10px;
}
</style>
</style>
\ No newline at end of file
...
...
app/plugins/rsa.js
View file @
8178615
...
...
@@ -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
();
...
...
package.json
View file @
8178615
...
...
@@ -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"
,
...
...
server/common/api.js
View file @
8178615
...
...
@@ -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
);
});
}
...
...
server/common/config.js
View file @
8178615
...
...
@@ -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'
}
});
}
...
...
Please
register
or
login
to post a comment