Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
Y
ybf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xulili
ybf
Commits
200d61da
Commit
200d61da
authored
Jan 13, 2020
by
xd
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://114.67.93.201/xulili/ybf
parents
917e9561
fbba3f2c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
404 additions
and
436 deletions
+404
-436
.eslintrc.js
ybf_admin/.eslintrc.js
+4
-4
main.js
ybf_admin/src/api/login/main.js
+4
-7
index.vue
ybf_admin/src/pages/task/bar/index.vue
+378
-358
index.vue
ybf_admin/src/pages/task/main/index.vue
+3
-3
index.js
ybf_admin/src/plugin/error/index.js
+7
-7
releases.js
ybf_admin/src/store/modules/d2admin/modules/releases.js
+5
-5
request.js
ybf_admin/src/utils/request.js
+3
-52
No files found.
ybf_admin/.eslintrc.js
View file @
200d61da
...
...
@@ -8,10 +8,10 @@ module.exports = {
// '@vue/standard'
],
rules
:
{
'no-console'
:
process
.
env
.
NODE_ENV
===
'production'
?
'error'
:
'off'
,
'no-debugger'
:
process
.
env
.
NODE_ENV
===
'production'
?
'error'
:
'off'
,
'no-unused-vars'
:
'off'
,
"quotes"
:
[
1
,
"single"
],
//引号类型 `` "" ''
//
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
//
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
//
'no-unused-vars': 'off',
//
"quotes": [1, "single"],//引号类型 `` "" ''
},
parserOptions
:
{
parser
:
'babel-eslint'
...
...
ybf_admin/src/api/
task
/main.js
→
ybf_admin/src/api/
login
/main.js
View file @
200d61da
import
request
from
'@/utils/request'
import
qs
from
'qs'
export
function
ApiTestGet
()
{
return
request
({
...
...
@@ -6,14 +7,10 @@ export function ApiTestGet() {
method
:
'get'
})
}
export
function
ApiTestPost
(
inData
)
{
let
postData
=
{
appCode
:
"0611"
,
args
:
inData
}
export
function
ApiLoginSubmit
(
inData
)
{
return
request
({
url
:
'/admin/common/
findLoginType
'
,
url
:
'/admin/common/
login
'
,
method
:
'post'
,
data
:
postData
data
:
qs
.
stringify
(
inData
)
})
}
ybf_admin/src/pages/task/bar/index.vue
View file @
200d61da
This diff is collapsed.
Click to expand it.
ybf_admin/src/pages/task/main/index.vue
View file @
200d61da
...
...
@@ -43,9 +43,9 @@ export default {
updateType
:
"dec"
,
vipId
:
1
};
ApiTestPost
(
postData
).
then
(
res
=>
{
log
(
"--->Api: Post: res ="
,
res
);
});
//
ApiTestPost(postData).then(res => {
//
log("--->Api: Post: res =", res);
//
});
},
methods
:{
ztabsClick
(){},
...
...
ybf_admin/src/plugin/error/index.js
View file @
200d61da
...
...
@@ -16,13 +16,13 @@ export default {
})
// 只在开发模式下打印 log
if
(
process
.
env
.
NODE_ENV
===
'development'
)
{
util
.
log
.
capsule
(
'D2Admin'
,
'ErrorHandler'
,
'danger'
)
util
.
log
.
danger
(
'>>>>>> 错误信息 >>>>>>'
)
console
.
log
(
info
)
util
.
log
.
danger
(
'>>>>>> Vue 实例 >>>>>>'
)
console
.
log
(
instance
)
util
.
log
.
danger
(
'>>>>>> Error >>>>>>'
)
console
.
log
(
error
)
//
util.log.capsule('D2Admin', 'ErrorHandler', 'danger')
//
util.log.danger('>>>>>> 错误信息 >>>>>>')
//
console.log(info)
//
util.log.danger('>>>>>> Vue 实例 >>>>>>')
//
console.log(instance)
//
util.log.danger('>>>>>> Error >>>>>>')
//
console.log(error)
}
})
}
...
...
ybf_admin/src/store/modules/d2admin/modules/releases.js
View file @
200d61da
...
...
@@ -8,11 +8,11 @@ export default {
* @param {Object} state state
*/
versionShow
()
{
util
.
log
.
capsule
(
'D2Admin'
,
`v
${
process
.
env
.
VUE_APP_VERSION
}
`
)
console
.
log
(
'D2 Admin https://github.com/d2-projects/d2-admin'
)
console
.
log
(
'D2 Crud https://github.com/d2-projects/d2-crud'
)
console
.
log
(
'Document https://d2.pub/zh/doc/d2-admin'
)
console
.
log
(
'请不要吝啬您的 star,谢谢 ~'
)
//
util.log.capsule('D2Admin', `v${process.env.VUE_APP_VERSION}`)
//
console.log('D2 Admin https://github.com/d2-projects/d2-admin')
//
console.log('D2 Crud https://github.com/d2-projects/d2-crud')
//
console.log('Document https://d2.pub/zh/doc/d2-admin')
//
console.log('请不要吝啬您的 star,谢谢 ~')
}
}
}
ybf_admin/src/utils/request.js
View file @
200d61da
import
axios
from
'axios'
import
md5
from
"js-md5"
let
BASE_API
=
"http
s://gd.chfatech.com/guangdian
"
let
BASE_API
=
"http
://139.155.48.151:8084
"
const
log
=
console
.
log
.
bind
(
console
)
// URL 编码与拼接
const
createSign
=
(
inPostData
,
inAppSecret
)
=>
{
let
appUser
=
inPostData
.
appUser
let
appCode
=
inPostData
.
appCode
let
ts
=
inPostData
.
ts
let
args
=
JSON
.
parse
(
JSON
.
stringify
(
inPostData
.
args
));
let
appSecret
=
inAppSecret
let
res
=
""
;
// URL 编码
for
(
let
key
in
args
)
{
res
+=
encodeURIComponent
(
key
)
+
"%3d"
+
encodeURIComponent
(
args
[
key
]).
toLowerCase
()
+
"%26"
;
}
res
=
res
.
slice
(
0
,
-
3
);
// URL 拼接
res
+=
`&appUser=
${
appUser
}
&appCode=
${
appCode
}
&
${
ts
}
${
appSecret
}
`
return
res
;
};
// Basic Info
let
basicInfo
=
{
appUser
:
"user001"
,
ver
:
"v1.0"
,
appSecret
:
"JeC0mmE2ZjZmOfdmTGImYzU5Yjg1AYU2M3F="
}
// 创建 axios 实例
const
service
=
axios
.
create
({
...
...
@@ -41,29 +13,8 @@ const service = axios.create({
// request 拦截器
service
.
interceptors
.
request
.
use
(
res
=>
{
log
(
'--->axios: res.data:'
,
res
.
data
)
let
oldPostData
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
data
))
let
newPostData
=
{
appUser
:
basicInfo
.
appUser
,
appCode
:
oldPostData
.
appCode
,
ts
:
String
(
Date
.
parse
(
new
Date
())),
ver
:
basicInfo
.
ver
,
args
:
oldPostData
.
args
}
let
postData
=
{
appUser
:
newPostData
.
appUser
,
appCode
:
newPostData
.
appCode
,
ts
:
newPostData
.
ts
,
sign
:
md5
(
createSign
(
newPostData
,
basicInfo
.
appSecret
)),
ver
:
newPostData
.
ver
,
args
:
newPostData
.
args
}
res
.
data
=
postData
return
res
request
=>
{
return
request
},
error
=>
{
Promise
.
reject
(
error
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment