Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
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
fbba3f2c
Commit
fbba3f2c
authored
Jan 13, 2020
by
versiondown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
Z: Dot: Login API can use. Example file: src/pages/task/bar/index.vue & src/api/main.js
parent
d8a5c785
Show 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 @
fbba3f2c
...
@@ -8,10 +8,10 @@ module.exports = {
...
@@ -8,10 +8,10 @@ module.exports = {
// '@vue/standard'
// '@vue/standard'
],
],
rules
:
{
rules
:
{
'no-console'
:
process
.
env
.
NODE_ENV
===
'production'
?
'error'
:
'off'
,
//
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger'
:
process
.
env
.
NODE_ENV
===
'production'
?
'error'
:
'off'
,
//
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-unused-vars'
:
'off'
,
//
'no-unused-vars': 'off',
"quotes"
:
[
1
,
"single"
],
//引号类型 `` "" ''
//
"quotes": [1, "single"],//引号类型 `` "" ''
},
},
parserOptions
:
{
parserOptions
:
{
parser
:
'babel-eslint'
parser
:
'babel-eslint'
...
...
ybf_admin/src/api/
task
/main.js
→
ybf_admin/src/api/
login
/main.js
View file @
fbba3f2c
import
request
from
'@/utils/request'
import
request
from
'@/utils/request'
import
qs
from
'qs'
export
function
ApiTestGet
()
{
export
function
ApiTestGet
()
{
return
request
({
return
request
({
...
@@ -6,14 +7,10 @@ export function ApiTestGet() {
...
@@ -6,14 +7,10 @@ export function ApiTestGet() {
method
:
'get'
method
:
'get'
})
})
}
}
export
function
ApiTestPost
(
inData
)
{
export
function
ApiLoginSubmit
(
inData
)
{
let
postData
=
{
appCode
:
"0611"
,
args
:
inData
}
return
request
({
return
request
({
url
:
'/admin/common/
findLoginType
'
,
url
:
'/admin/common/
login
'
,
method
:
'post'
,
method
:
'post'
,
data
:
postData
data
:
qs
.
stringify
(
inData
)
})
})
}
}
ybf_admin/src/pages/task/bar/index.vue
View file @
fbba3f2c
...
@@ -46,8 +46,8 @@
...
@@ -46,8 +46,8 @@
range-separator=
"至"
range-separator=
"至"
start-placeholder=
"开始日期"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
end-placeholder=
"结束日期"
style=
"width:200px;"
>
style=
"width:200px;"
</el-date-picker>
>
</el-date-picker>
</el-form-item>
</el-form-item>
<el-form-item
label=
"状态"
>
<el-form-item
label=
"状态"
>
<el-select
<el-select
...
@@ -74,7 +74,6 @@
...
@@ -74,7 +74,6 @@
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<el-button
type=
"primary"
size=
"small"
@
click=
"searchsSearch"
>
搜 索
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"searchsSearch"
>
搜 索
</el-button>
</div>
</div>
</div>
</div>
...
@@ -101,19 +100,24 @@
...
@@ -101,19 +100,24 @@
<el-table-column
label=
"操作"
align=
"center"
fixed=
"right"
width=
"240"
>
<el-table-column
label=
"操作"
align=
"center"
fixed=
"right"
width=
"240"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
v-if=
"scope.row.taskStatus === 'Top'"
class=
"buttonTextNormal"
type=
"text"
<el-button
@
click=
"listsUntopClick(scope.row.id)"
>
已置顶
v-if=
"scope.row.taskStatus === 'Top'"
</el-button>
class=
"buttonTextNormal"
<el-button
v-if=
"scope.row.taskStatus !== 'Top'"
class=
"buttonTextNormal"
type=
"text"
type=
"text"
@
click=
"listsTopClick(scope.row.id)"
>
置顶
@
click=
"listsUntopClick(scope.row.id)"
</el-button>
>
已置顶
</el-button>
<el-button
v-if=
"scope.row.taskStatus !== 'Top'"
class=
"buttonTextNormal"
type=
"text"
@
click=
"listsTopClick(scope.row.id)"
>
置顶
</el-button>
<el-button
class=
"buttonTextNormal"
type=
"text"
@
click=
"listsSeeClick(scope.row.id)"
>
详情
</el-button>
<el-button
class=
"buttonTextNormal"
type=
"text"
@
click=
"listsSeeClick(scope.row.id)"
>
详情
</el-button>
<el-button
class=
"buttonTextNormal"
type=
"text"
@
click=
"listsEditClick(scope.row.id)"
>
编辑
</el-button>
<el-button
class=
"buttonTextNormal"
type=
"text"
@
click=
"listsEditClick(scope.row.id)"
>
编辑
</el-button>
<el-button
class=
"buttonTextWarning"
type=
"text"
@
click=
"listsDelClick(scope.row)"
>
删除
</el-button>
<el-button
class=
"buttonTextWarning"
type=
"text"
@
click=
"listsDelClick(scope.row)"
>
删除
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
</div>
</div>
<div
class=
"ztask-pages"
>
<div
class=
"ztask-pages"
>
<el-pagination
<el-pagination
...
@@ -193,8 +197,7 @@
...
@@ -193,8 +197,7 @@
start-placeholder=
"开始日期"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
end-placeholder=
"结束日期"
style=
"width:100%;"
style=
"width:100%;"
>
></el-date-picker>
</el-date-picker>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -230,31 +233,48 @@
...
@@ -230,31 +233,48 @@
<el-row>
<el-row>
<el-col
:span=
"24"
>
<el-col
:span=
"24"
>
<el-form-item
label=
"任务名称:"
prop=
"taskName"
>
<el-form-item
label=
"任务名称:"
prop=
"taskName"
>
<el-input
:disabled=
"true"
v-model=
"data.see.taskName"
autocomplete=
"off"
<el-input
placeholder=
"任务名称为空"
></el-input>
:disabled=
"true"
v-model=
"data.see.taskName"
autocomplete=
"off"
placeholder=
"任务名称为空"
></el-input>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row>
<el-row>
<el-col
:span=
"24"
>
<el-col
:span=
"24"
>
<el-form-item
label=
"任务类型:"
prop=
"taskType"
>
<el-form-item
label=
"任务类型:"
prop=
"taskType"
>
<el-input
:disabled=
"true"
v-model=
"data.see.taskType"
autocomplete=
"off"
<el-input
placeholder=
"任务类型为空"
></el-input>
:disabled=
"true"
v-model=
"data.see.taskType"
autocomplete=
"off"
placeholder=
"任务类型为空"
></el-input>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row>
<el-row>
<el-col
:span=
"24"
>
<el-col
:span=
"24"
>
<el-form-item
label=
"柜组:"
prop=
"bar"
>
<el-form-item
label=
"柜组:"
prop=
"bar"
>
<el-input
:disabled=
"true"
v-model=
"data.see.bar"
autocomplete=
"off"
placeholder=
"柜组为空"
></el-input>
<el-input
:disabled=
"true"
v-model=
"data.see.bar"
autocomplete=
"off"
placeholder=
"柜组为空"
></el-input>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row>
<el-row>
<el-col
:span=
"24"
>
<el-col
:span=
"24"
>
<el-form-item
label=
"任务期限:"
prop=
"taskTime"
>
<el-form-item
label=
"任务期限:"
prop=
"taskTime"
>
<el-input
:disabled=
"true"
v-model=
"data.see.taskTime"
autocomplete=
"off"
<el-input
placeholder=
"任务期限为空"
></el-input>
:disabled=
"true"
v-model=
"data.see.taskTime"
autocomplete=
"off"
placeholder=
"任务期限为空"
></el-input>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -282,14 +302,16 @@
...
@@ -282,14 +302,16 @@
</div>
</div>
</template>
</template>
<
script
>
<
script
>
export
default
{
import
{
ApiLoginSubmit
}
from
"@api/login/main"
;
export
default
{
components
:
{},
components
:
{},
data
()
{
data
()
{
return
{
return
{
cache
:
{
cache
:
{
status
:
{
status
:
{
createDialog
:
false
,
createDialog
:
false
,
seeDialog
:
false
,
seeDialog
:
false
},
},
list
:
{
list
:
{
bar
:
[
bar
:
[
...
@@ -321,288 +343,287 @@
...
@@ -321,288 +343,287 @@
id
:
"1"
,
id
:
"1"
,
name
:
"已发布"
name
:
"已发布"
}
}
],
]
}
}
},
},
list
:
{
list
:
{
main
:
[
main
:
[
{
{
id
:
'1001'
,
id
:
"1001"
,
taskName
:
'TaskComAlice'
,
taskName
:
"TaskComAlice"
,
taskType
:
'拉新'
,
taskType
:
"拉新"
,
bar
:
'男装'
,
bar
:
"男装"
,
createTime
:
'2020-01-01'
,
createTime
:
"2020-01-01"
,
taskDate
:
'2020-01-01 至 2020-01-01'
,
taskDate
:
"2020-01-01 至 2020-01-01"
,
taskDetail
:
'TaskComAliceDetail'
,
taskDetail
:
"TaskComAliceDetail"
,
taskStatus
:
'send'
taskStatus
:
"send"
},
},
{
{
id
:
'1002'
,
id
:
"1002"
,
taskName
:
'TaskComBob'
,
taskName
:
"TaskComBob"
,
taskType
:
'拉新'
,
taskType
:
"拉新"
,
bar
:
'男装'
,
bar
:
"男装"
,
createTime
:
'2020-01-01'
,
createTime
:
"2020-01-01"
,
taskDate
:
'2020-01-01 至 2020-01-01'
,
taskDate
:
"2020-01-01 至 2020-01-01"
,
taskDetail
:
'TaskComBobDetail'
,
taskDetail
:
"TaskComBobDetail"
,
taskStatus
:
'nosend'
taskStatus
:
"nosend"
},
},
{
{
id
:
'1003'
,
id
:
"1003"
,
taskName
:
'TaskComClid'
,
taskName
:
"TaskComClid"
,
taskType
:
'拉新'
,
taskType
:
"拉新"
,
bar
:
'男装'
,
bar
:
"男装"
,
createTime
:
'2020-01-01'
,
createTime
:
"2020-01-01"
,
taskDate
:
'2020-01-01 至 2020-01-01'
,
taskDate
:
"2020-01-01 至 2020-01-01"
,
taskDetail
:
'TaskComClidDetail'
,
taskDetail
:
"TaskComClidDetail"
,
taskStatus
:
'nosend'
taskStatus
:
"nosend"
},
},
{
{
id
:
'1004'
,
id
:
"1004"
,
taskName
:
'TaskComDive'
,
taskName
:
"TaskComDive"
,
taskType
:
'拉新'
,
taskType
:
"拉新"
,
bar
:
'男装'
,
bar
:
"男装"
,
createTime
:
'2020-01-01'
,
createTime
:
"2020-01-01"
,
taskDate
:
'2020-01-01 至 2020-01-01'
,
taskDate
:
"2020-01-01 至 2020-01-01"
,
taskDetail
:
'TaskComDiveDetail'
,
taskDetail
:
"TaskComDiveDetail"
,
taskStatus
:
'nosend'
taskStatus
:
"nosend"
},
},
{
{
id
:
'1005'
,
id
:
"1005"
,
taskName
:
'TaskComEmma'
,
taskName
:
"TaskComEmma"
,
taskType
:
'拉新'
,
taskType
:
"拉新"
,
bar
:
'男装'
,
bar
:
"男装"
,
createTime
:
'2020-01-01'
,
createTime
:
"2020-01-01"
,
taskDate
:
'2020-01-01 至 2020-01-01'
,
taskDate
:
"2020-01-01 至 2020-01-01"
,
taskDetail
:
'TaskComEmmaDetail'
,
taskDetail
:
"TaskComEmmaDetail"
,
taskStatus
:
'nosend'
taskStatus
:
"nosend"
},
},
{
{
id
:
'1006'
,
id
:
"1006"
,
taskName
:
'TaskComFaker'
,
taskName
:
"TaskComFaker"
,
taskType
:
'拉新'
,
taskType
:
"拉新"
,
bar
:
'男装'
,
bar
:
"男装"
,
createTime
:
'2020-01-01'
,
createTime
:
"2020-01-01"
,
taskDate
:
'2020-01-01 至 2020-01-01'
,
taskDate
:
"2020-01-01 至 2020-01-01"
,
taskDetail
:
'TaskComFakerDetail'
,
taskDetail
:
"TaskComFakerDetail"
,
taskStatus
:
'nosend'
taskStatus
:
"nosend"
},
},
{
{
id
:
'1007'
,
id
:
"1007"
,
taskName
:
'TaskComGlass'
,
taskName
:
"TaskComGlass"
,
taskType
:
'拉新'
,
taskType
:
"拉新"
,
bar
:
'男装'
,
bar
:
"男装"
,
createTime
:
'2020-01-01'
,
createTime
:
"2020-01-01"
,
taskDate
:
'2020-01-01 至 2020-01-01'
,
taskDate
:
"2020-01-01 至 2020-01-01"
,
taskDetail
:
'TaskComGlassDetail'
,
taskDetail
:
"TaskComGlassDetail"
,
taskStatus
:
'nosend'
taskStatus
:
"nosend"
},
},
{
{
id
:
'1008'
,
id
:
"1008"
,
taskName
:
'TaskComHardy'
,
taskName
:
"TaskComHardy"
,
taskType
:
'拉新'
,
taskType
:
"拉新"
,
bar
:
'男装'
,
bar
:
"男装"
,
createTime
:
'2020-01-01'
,
createTime
:
"2020-01-01"
,
taskDate
:
'2020-01-01 至 2020-01-01'
,
taskDate
:
"2020-01-01 至 2020-01-01"
,
taskDetail
:
'TaskComHardyDetail'
,
taskDetail
:
"TaskComHardyDetail"
,
taskStatus
:
'nosend'
taskStatus
:
"nosend"
},
},
{
{
id
:
'1009'
,
id
:
"1009"
,
taskName
:
'TaskComIda'
,
taskName
:
"TaskComIda"
,
taskType
:
'拉新'
,
taskType
:
"拉新"
,
bar
:
'男装'
,
bar
:
"男装"
,
createTime
:
'2020-01-01'
,
createTime
:
"2020-01-01"
,
taskDate
:
'2020-01-01 至 2020-01-01'
,
taskDate
:
"2020-01-01 至 2020-01-01"
,
taskDetail
:
'TaskComIdaDetail'
,
taskDetail
:
"TaskComIdaDetail"
,
taskStatus
:
'nosend'
taskStatus
:
"nosend"
},
},
{
{
id
:
'1010'
,
id
:
"1010"
,
taskName
:
'TaskComJoke'
,
taskName
:
"TaskComJoke"
,
taskType
:
'拉新'
,
taskType
:
"拉新"
,
bar
:
'男装'
,
bar
:
"男装"
,
createTime
:
'2020-01-01'
,
createTime
:
"2020-01-01"
,
taskDate
:
'2020-01-01 至 2020-01-01'
,
taskDate
:
"2020-01-01 至 2020-01-01"
,
taskDetail
:
'TaskComJokeDetail'
,
taskDetail
:
"TaskComJokeDetail"
,
taskStatus
:
'nosend'
taskStatus
:
"nosend"
},
},
{
{
id
:
'1011'
,
id
:
"1011"
,
taskName
:
'TaskComKey'
,
taskName
:
"TaskComKey"
,
taskType
:
'拉新'
,
taskType
:
"拉新"
,
bar
:
'男装'
,
bar
:
"男装"
,
createTime
:
'2020-01-01'
,
createTime
:
"2020-01-01"
,
taskDate
:
'2020-01-01 至 2020-01-01'
,
taskDate
:
"2020-01-01 至 2020-01-01"
,
taskDetail
:
'TaskComKeyDetail'
,
taskDetail
:
"TaskComKeyDetail"
,
taskStatus
:
'nosend'
taskStatus
:
"nosend"
},
},
{
{
id
:
'1012'
,
id
:
"1012"
,
taskName
:
'TaskComLux'
,
taskName
:
"TaskComLux"
,
taskType
:
'拉新'
,
taskType
:
"拉新"
,
bar
:
'男装'
,
bar
:
"男装"
,
createTime
:
'2020-01-01'
,
createTime
:
"2020-01-01"
,
taskDate
:
'2020-01-01 至 2020-01-01'
,
taskDate
:
"2020-01-01 至 2020-01-01"
,
taskDetail
:
'TaskComLuxDetail'
,
taskDetail
:
"TaskComLuxDetail"
,
taskStatus
:
'nosend'
taskStatus
:
"nosend"
},
}
]
]
},
},
data
:
{
data
:
{
search
:
{
search
:
{
bar
:
''
,
bar
:
""
,
taskType
:
''
,
taskType
:
""
,
taskDate
:
''
,
taskDate
:
""
,
status
:
''
,
status
:
""
,
keys
:
''
,
keys
:
""
},
},
page
:
{
page
:
{
nowPageNum
:
1
,
nowPageNum
:
1
},
},
create
:
{
create
:
{
taskName
:
''
,
taskName
:
""
,
taskType
:
''
,
taskType
:
""
,
bar
:
''
,
bar
:
""
,
taskTime
:
''
,
taskTime
:
""
,
taskDetail
:
''
,
taskDetail
:
""
},
},
createDefault
:
{
createDefault
:
{
taskName
:
''
,
taskName
:
""
,
taskType
:
''
,
taskType
:
""
,
bar
:
''
,
bar
:
""
,
taskTime
:
''
,
taskTime
:
""
,
taskDetail
:
''
,
taskDetail
:
""
},
},
see
:
{
see
:
{
taskName
:
'taskName'
,
taskName
:
"taskName"
,
taskType
:
'taskType'
,
taskType
:
"taskType"
,
bar
:
'bar'
,
bar
:
"bar"
,
taskTime
:
'taskTime'
,
taskTime
:
"taskTime"
,
taskDetail
:
'taskDetail'
,
taskDetail
:
"taskDetail"
},
},
seeDefault
:
{
seeDefault
:
{
taskName
:
''
,
taskName
:
""
,
taskType
:
''
,
taskType
:
""
,
bar
:
''
,
bar
:
""
,
taskTime
:
''
,
taskTime
:
""
,
taskDetail
:
''
,
taskDetail
:
""
},
}
},
},
rule
:
{
rule
:
{
create
:
{
create
:
{
taskName
:
[{
required
:
true
,
message
:
'任务名称不能为空'
,
trigger
:
'change'
}],
taskName
:
[
taskType
:
[{
required
:
true
,
message
:
'任务类型不能为空'
,
trigger
:
'change'
}],
{
required
:
true
,
message
:
"任务名称不能为空"
,
trigger
:
"change"
}
bar
:
[{
required
:
true
,
message
:
'柜组不能为空'
,
trigger
:
'change'
}],
],
taskTime
:
[{
required
:
true
,
message
:
'任务周期不能为空'
,
trigger
:
'change'
}],
taskType
:
[
taskDetail
:
[{
required
:
true
,
message
:
'任务详情不能为空'
,
trigger
:
'change'
}],
{
required
:
true
,
message
:
"任务类型不能为空"
,
trigger
:
"change"
}
],
bar
:
[{
required
:
true
,
message
:
"柜组不能为空"
,
trigger
:
"change"
}],
taskTime
:
[
{
required
:
true
,
message
:
"任务周期不能为空"
,
trigger
:
"change"
}
],
taskDetail
:
[
{
required
:
true
,
message
:
"任务详情不能为空"
,
trigger
:
"change"
}
]
},
},
see
:
{},
see
:
{}
}
}
};
};
},
},
created
()
{
created
()
{},
},
methods
:
{
methods
:
{
searchsCreate
()
{
searchsCreate
()
{
this
.
cache
.
status
.
createDialog
=
true
this
.
cache
.
status
.
createDialog
=
true
;
},
searchsSend
()
{
},
},
searchsSend
()
{},
searchsDels
()
{
searchsDels
()
{
},
let
postData
=
{
searchsSearch
()
{
loginName
:
'Alice'
,
},
loginPwd
:
'AlicePwd'
};
listsSelectChange
()
{
ApiLoginSubmit
(
postData
).
then
(
res
=>
{
},
listsUntopClick
()
{
});
},
listsTopClick
()
{
},
},
listsSeeClick
(
inData
)
{
searchsSearch
()
{},
this
.
cache
.
status
.
seeDialog
=
true
listsSelectChange
()
{},
listsUntopClick
()
{},
listsTopClick
()
{},
listsSeeClick
(
inData
)
{
this
.
cache
.
status
.
seeDialog
=
true
;
},
},
listsEditClick
()
{
listsEditClick
()
{
this
.
cache
.
status
.
createDialog
=
true
this
.
cache
.
status
.
createDialog
=
true
;
this
.
data
.
create
=
{
this
.
data
.
create
=
{
taskName
:
'change'
,
taskName
:
"change"
,
taskType
:
'taskType'
,
taskType
:
"taskType"
,
bar
:
'bar'
,
bar
:
"bar"
,
taskTime
:
''
,
taskTime
:
""
,
taskDetail
:
''
,
taskDetail
:
""
}
};
},
listsDelClick
()
{
},
},
listsDelClick
()
{},
pagesSizeChange
()
{
pagesSizeChange
()
{},
},
pagesNowPageChange
()
{},
pagesNowPageChange
()
{
},
dialogCreateTaskTypeChange
()
{
dialogCreateTaskTypeChange
()
{},
},
dialogCreateBarChange
()
{},
dialogCreateBarChange
()
{
},
dialogCreateBeforeClose
()
{
dialogCreateBeforeClose
()
{
this
.
cache
.
status
.
createDialog
=
false
this
.
cache
.
status
.
createDialog
=
false
;
},
},
dialogCreateCancel
()
{
dialogCreateCancel
()
{
this
.
data
.
create
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
data
.
createDefault
))
this
.
data
.
create
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
data
.
createDefault
));
this
.
cache
.
status
.
createDialog
=
false
this
.
cache
.
status
.
createDialog
=
false
;
},
},
dialogCreateSubmit
(
inForm
)
{
dialogCreateSubmit
(
inForm
)
{
this
.
$refs
[
inForm
].
validate
(
valid
=>
{
this
.
$refs
[
inForm
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
}
else
{
}
else
{
return
false
return
false
;
}
}
})
});
},
},
dialogCreateSubmitSend
()
{
dialogCreateSubmitSend
()
{
this
.
$refs
[
inForm
].
validate
(
valid
=>
{
this
.
$refs
[
inForm
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
}
else
{
}
else
{
return
false
return
false
;
}
}
})
});
},
},
dialogSeeBeforeClose
()
{
dialogSeeBeforeClose
()
{
this
.
cache
.
status
.
seeDialog
=
false
this
.
cache
.
status
.
seeDialog
=
false
;
},
},
dialogSeeCancel
()
{
dialogSeeCancel
()
{
this
.
data
.
see
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
data
.
seeDefault
))
this
.
data
.
see
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
data
.
seeDefault
));
this
.
cache
.
status
.
seeDialog
=
false
this
.
cache
.
status
.
seeDialog
=
false
;
},
dialogSeeSubmitSend
()
{
},
},
dialogSeeSubmitSend
()
{}
}
}
};
};
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.ztask-bars
{
.ztask-bars
{
/*border: 2px solid cyan;*/
/*border: 2px solid cyan;*/
height
:
calc
((
100vh
-
220px
)
*
1
.0
);
height
:
calc
((
100vh
-
220px
)
*
1
);
}
}
.ztask-searchs
{
.ztask-searchs
{
/*border: 2px solid #0ea4c5;*/
/*border: 2px solid #0ea4c5;*/
height
:
70px
;
height
:
70px
;
display
:
flex
;
display
:
flex
;
flex-direction
:
row
;
flex-direction
:
row
;
justify-content
:
space-between
;
justify-content
:
space-between
;
}
}
.ztask-searchs-items
{
.ztask-searchs-items
{
/*border: 2px solid #00c561;*/
/*border: 2px solid #00c561;*/
margin
:
17px
0px
20px
0px
;
margin
:
17px
0px
20px
0px
;
...
@@ -612,23 +633,22 @@
...
@@ -612,23 +633,22 @@
flex-direction
:
row
;
flex-direction
:
row
;
justify-content
:
flex-start
;
justify-content
:
flex-start
;
align-items
:
center
;
align-items
:
center
;
}
}
.ztask-searchs-forms
{
.ztask-searchs-forms
{
/*border: 2px solid #f900ff;*/
/*border: 2px solid #f900ff;*/
height
:
30px
;
height
:
30px
;
margin-bottom
:
10px
;
margin-bottom
:
10px
;
}
}
.ztask-lists
{
.ztask-lists
{
/*border: 2px solid #0dc50e;*/
/*border: 2px solid #0dc50e;*/
height
:
calc
((
100vh
-
338px
)
*
1
.0
);
height
:
calc
((
100vh
-
338px
)
*
1
);
overflow
:
auto
;
overflow
:
auto
;
}
}
.ztask-pages
{
.ztask-pages
{
/*border: 2px solid red;*/
/*border: 2px solid red;*/
/*height: 56px;*/
/*height: 56px;*/
height
:
42px
;
height
:
42px
;
...
@@ -636,19 +656,19 @@
...
@@ -636,19 +656,19 @@
flex-direction
:
row
;
flex-direction
:
row
;
justify-content
:
flex-end
;
justify-content
:
flex-end
;
align-items
:
flex-end
;
align-items
:
flex-end
;
}
}
.ztask-page
{
.ztask-page
{
/*border: 2px solid red;*/
/*border: 2px solid red;*/
position
:
relative
;
position
:
relative
;
margin-right
:
0
;
margin-right
:
0
;
}
}
.buttonTextNormal
{
.buttonTextNormal
{
color
:
#666666
;
color
:
#666666
;
}
}
.buttonTextWarning
{
.buttonTextWarning
{
color
:
#D0021B
;
color
:
#d0021b
;
}
}
</
style
>
</
style
>
ybf_admin/src/pages/task/main/index.vue
View file @
fbba3f2c
...
@@ -43,9 +43,9 @@ export default {
...
@@ -43,9 +43,9 @@ export default {
updateType
:
"dec"
,
updateType
:
"dec"
,
vipId
:
1
vipId
:
1
};
};
ApiTestPost
(
postData
).
then
(
res
=>
{
//
ApiTestPost(postData).then(res => {
log
(
"--->Api: Post: res ="
,
res
);
//
log("--->Api: Post: res =", res);
});
//
});
},
},
methods
:{
methods
:{
ztabsClick
(){},
ztabsClick
(){},
...
...
ybf_admin/src/plugin/error/index.js
View file @
fbba3f2c
...
@@ -16,13 +16,13 @@ export default {
...
@@ -16,13 +16,13 @@ export default {
})
})
// 只在开发模式下打印 log
// 只在开发模式下打印 log
if
(
process
.
env
.
NODE_ENV
===
'development'
)
{
if
(
process
.
env
.
NODE_ENV
===
'development'
)
{
util
.
log
.
capsule
(
'D2Admin'
,
'ErrorHandler'
,
'danger'
)
//
util.log.capsule('D2Admin', 'ErrorHandler', 'danger')
util
.
log
.
danger
(
'>>>>>> 错误信息 >>>>>>'
)
//
util.log.danger('>>>>>> 错误信息 >>>>>>')
console
.
log
(
info
)
//
console.log(info)
util
.
log
.
danger
(
'>>>>>> Vue 实例 >>>>>>'
)
//
util.log.danger('>>>>>> Vue 实例 >>>>>>')
console
.
log
(
instance
)
//
console.log(instance)
util
.
log
.
danger
(
'>>>>>> Error >>>>>>'
)
//
util.log.danger('>>>>>> Error >>>>>>')
console
.
log
(
error
)
//
console.log(error)
}
}
})
})
}
}
...
...
ybf_admin/src/store/modules/d2admin/modules/releases.js
View file @
fbba3f2c
...
@@ -8,11 +8,11 @@ export default {
...
@@ -8,11 +8,11 @@ export default {
* @param {Object} state state
* @param {Object} state state
*/
*/
versionShow
()
{
versionShow
()
{
util
.
log
.
capsule
(
'D2Admin'
,
`v
${
process
.
env
.
VUE_APP_VERSION
}
`
)
//
util.log.capsule('D2Admin', `v${process.env.VUE_APP_VERSION}`)
console
.
log
(
'D2 Admin https://github.com/d2-projects/d2-admin'
)
//
console.log('D2 Admin https://github.com/d2-projects/d2-admin')
console
.
log
(
'D2 Crud https://github.com/d2-projects/d2-crud'
)
//
console.log('D2 Crud https://github.com/d2-projects/d2-crud')
console
.
log
(
'Document https://d2.pub/zh/doc/d2-admin'
)
//
console.log('Document https://d2.pub/zh/doc/d2-admin')
console
.
log
(
'请不要吝啬您的 star,谢谢 ~'
)
//
console.log('请不要吝啬您的 star,谢谢 ~')
}
}
}
}
}
}
ybf_admin/src/utils/request.js
View file @
fbba3f2c
import
axios
from
'axios'
import
axios
from
'axios'
import
md5
from
"js-md5"
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
)
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 实例
// 创建 axios 实例
const
service
=
axios
.
create
({
const
service
=
axios
.
create
({
...
@@ -41,29 +13,8 @@ const service = axios.create({
...
@@ -41,29 +13,8 @@ const service = axios.create({
// request 拦截器
// request 拦截器
service
.
interceptors
.
request
.
use
(
service
.
interceptors
.
request
.
use
(
res
=>
{
request
=>
{
log
(
'--->axios: res.data:'
,
res
.
data
)
return
request
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
},
},
error
=>
{
error
=>
{
Promise
.
reject
(
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