Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
K
kouling-admin
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
刘松
kouling-admin
Commits
da77cd5a
Commit
da77cd5a
authored
Dec 04, 2017
by
刘松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
c23a91d3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
14 additions
and
9 deletions
+14
-9
app.js
app.js
+1
-1
app.bundle.js
app/built/app.bundle.js
+0
-0
main.jsx
app/jsx/main.jsx
+6
-1
dashboard.jsx
app/jsx/statistics/dashboard.jsx
+1
-1
config.default.js
config/config.default.js
+1
-1
tao-kouling.js
db/mongo/tao-kouling.js
+1
-1
controller.js
lib/controller.js
+4
-4
No files found.
app.js
View file @
da77cd5a
...
...
@@ -52,5 +52,5 @@ app.use(routes);
app
.
listen
(
config
.
port
);
console
.
log
(
'server started on port '
+
config
.
port
);
cron
.
start
();
//
cron.start();
//cron_gather.start();
app/built/app.bundle.js
View file @
da77cd5a
This diff is collapsed.
Click to expand it.
app/jsx/main.jsx
View file @
da77cd5a
...
...
@@ -17,7 +17,8 @@ class Main extends React.Component{
this
.
state
=
{
current
:
'0'
,
openKeys
:
[],
theme
:
'dark'
theme
:
'dark'
,
username
:
null
}
}
...
...
@@ -34,6 +35,9 @@ class Main extends React.Component{
if
(
this
.
props
.
login
&&
this
.
props
.
login
.
status
==
'logout'
)
location
.
href
=
'/'
const
{
dispatch
}
=
this
.
props
;
if
(
document
.
cookie
.
match
(
'username=[a-zA-Z0-9]+'
)[
0
]
&&
document
.
cookie
.
match
(
'username=[a-zA-Z0-9]+'
)[
0
].
split
(
'='
)[
1
]){
this
.
setState
({
username
:
document
.
cookie
.
match
(
'username=[a-zA-Z0-9]+'
)[
0
].
split
(
'='
)[
1
]});
}
}
render
(){
...
...
@@ -58,6 +62,7 @@ class Main extends React.Component{
<
Menu
.
Item
key=
"2"
>
推广页管理
</
Menu
.
Item
>
<
Menu
.
Item
key=
"3"
>
淘口令
</
Menu
.
Item
>
<
Menu
.
Item
key=
"4"
>
推广计划
</
Menu
.
Item
>
<
Menu
.
Item
key=
"5"
style
={{
float
:'
right
'}}
><
Icon
type=
"user"
/>
{
this
.
state
.
username
}
</
Menu
.
Item
>
</
Menu
>
</
Header
>
<
Content
style=
{
{
padding
:
'0 50px'
}
}
>
...
...
app/jsx/statistics/dashboard.jsx
View file @
da77cd5a
...
...
@@ -115,7 +115,7 @@ class DashBoard extends React.Component{
date
:
logs
[
i
].
date
,
info
:
logs
[
i
].
key
,
times
:
logs
[
i
].
times
,
status
:
logs
[
i
].
status
==
'disable'
?
'已归档'
:
'
--
'
,
status
:
logs
[
i
].
status
==
'disable'
?
'已归档'
:
'
正常
'
,
schedule
:(
logs
[
i
].
schedule
&&
logs
[
i
].
schedule
[
'_id'
])
||
'--'
,
qd
:(
logs
[
i
].
schedule
&&
logs
[
i
].
schedule
[
'qd'
]
&&
logs
[
i
].
schedule
[
'qd'
][
'user'
])
||
'--'
,
update
:
logs
[
i
].
updatedAt
...
...
config/config.default.js
View file @
da77cd5a
...
...
@@ -2,7 +2,7 @@ module.exports = {
host
:
'0.0.0.0'
,
port
:
process
.
env
.
PORT
?
process
.
env
.
PORT
:
9401
,
//mongo:'mongodb://user:password@10.11.3.100:1302/taoarticle',
mongo
:
'mongodb://
127.0.0.1:27017
/taoarticle'
,
mongo
:
'mongodb://
user:password@10.11.3.100:1302
/taoarticle'
,
taobao
:
{
host
:
"http://gw.api.taobao.com/router/rest"
,
appKey
:
"24594025"
,
//"23580470",//"23390725",
...
...
db/mongo/tao-kouling.js
View file @
da77cd5a
...
...
@@ -8,7 +8,7 @@ const schema = mongoose.Schema({
},
creater
:{
type
:
ObjectId
,
required
:
fals
e
,
required
:
tru
e
,
ref
:
'tao-agent'
},
schedule
:{
...
...
lib/controller.js
View file @
da77cd5a
...
...
@@ -155,16 +155,16 @@ exports.createSchedule = async (req, res, next) => {
arr
=
arr
.
map
(
x
=>
x
.
toJSON
());
//获取所有推广页id
ids
=
arr
.
map
(
x
=>
x
.
_id
);
if
(
agent
&&
ids
.
length
){
let
qd
=
agent
.
toJSON
()[
'_id'
];
let
links
=
ids
;
let
tkl_Tasks
=
[];
var
qd
=
agent
.
toJSON
()[
'_id'
];
var
links
=
ids
;
var
tkl_Tasks
=
[];
tao
.
saveSchedule
({
qd
,
links
,
status
,
times
},
function
(
e
,
result
){
if
(
e
||
!
result
.
_id
)
throw
(
e
||
result
);
var
schedule
=
result
.
_id
;
arr
.
forEach
(
async
item
=>
{
item
[
'link'
]
=
item
.
_id
;
item
[
'schedule'
]
=
schedule
;
item
[
'qd'
]
=
item
.
qd
;
item
[
'qd'
]
=
qd
;
for
(
let
i
=
0
;
i
<
5
;
i
++
){
tkl_Tasks
.
push
(
createTbkl
(
item
));
}
...
...
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