Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
463c7d8c
Commit
463c7d8c
authored
Mar 19, 2021
by
王昆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'恒昌小程序更新'
parent
027e538b
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
119 additions
and
119 deletions
+119
-119
xgg-web/app/base/controller/impl/bmuserbizCtl.js
+45
-1
xgg-web/app/base/wxapplet/impl/xggApplet.js
+0
-44
xgg-web/app/config/routes/applet.js
+0
-2
xgg-web/app/config/routes/web.js
+73
-71
xgg-web/app/front/entry/public/js/audit_page.js
+1
-1
No files found.
xgg-web/app/base/controller/impl/bmuserbizCtl.js
View file @
463c7d8c
var
system
=
require
(
"../../system"
)
var
system
=
require
(
"../../system"
)
var
settings
=
require
(
"../../../config/settings"
);
var
settings
=
require
(
"../../../config/settings"
);
const
CtlBase
=
require
(
"../ctl.base"
);
const
CtlBase
=
require
(
"../ctl.base"
);
const
uuidv4
=
require
(
'uuid/v4'
);
const
fs
=
require
(
"fs"
);
const
moment
=
require
(
"moment"
);
class
BmuserbizCtl
extends
CtlBase
{
class
BmuserbizCtl
extends
CtlBase
{
constructor
(){
constructor
(){
super
(
CtlBase
.
getServiceName
(
BmuserbizCtl
));
super
(
CtlBase
.
getServiceName
(
BmuserbizCtl
));
//this.appS=system.getObject("service.appSve");
//this.appS=system.getObject("service.appSve");
this
.
excelClient
=
system
.
getObject
(
"util.excelClient"
);
}
async
exportAll
(
query
,
req
,
res
){
try
{
let
list
=
await
this
.
service
.
findExportAll
();
let
csvobj
=
{
fileName
:
"恒昌小程序数据"
+
moment
().
format
(
"YYYYMMDDHHmmss"
)
+
".csv"
,
rows
:
list
,
opts
:
{
fields
:
[
'id'
,
'legal_name'
,
'legal_mobile'
,
'idcard'
,
'idcard_front'
,
'idcard_back'
,
'names'
,
'bank'
,
'bankno'
,
'bank_front'
,
'bank_back'
,
'bankMobile'
,
'front_half_img'
,
'declaration_file'
,
'submit_time'
,
'audit_status_name'
,
'reject_reason'
],
unwind
:
[],
unwindBlank
:
true
,
excelStrings
:
true
,
},
headers
:
{
'id'
:
'编号'
,
'legal_name'
:
'姓名'
,
'legal_mobile'
:
'手机号'
,
'idcard'
:
'身份证'
,
'idcard_front'
:
'身份证正面'
,
'idcard_back'
:
'身份证反面'
,
'names'
:
'注册名称'
,
'bank'
:
'开户行'
,
'bankno'
:
'银行卡号'
,
'bank_front'
:
'银行卡正面'
,
'bank_back'
:
'银行卡背面'
,
'bankMobile'
:
'预留手机号'
,
'front_half_img'
:
'半身照'
,
'declaration_file'
:
'声明书'
,
'submit_time'
:
'提交时间'
,
'audit_status_name'
:
'审核状态'
,
'reject_reason'
:
'不通过原因'
,
},
};
await
this
.
excelClient
.
exportCsv
(
req
,
res
,
csvobj
);
}
catch
(
e
)
{
console
.
log
(
e
);
return
system
.
getErrResult2
(
"您的网络不稳, 请稍后重试"
);
}
}
}
}
}
module
.
exports
=
BmuserbizCtl
;
module
.
exports
=
BmuserbizCtl
;
xgg-web/app/base/wxapplet/impl/xggApplet.js
View file @
463c7d8c
...
@@ -570,48 +570,5 @@ class xggApplet extends AppletBase {
...
@@ -570,48 +570,5 @@ class xggApplet extends AppletBase {
return
{
code
:
500
};
return
{
code
:
500
};
}
}
}
}
async
exportAll
(
gobj
,
req
,
res
){
try
{
let
list
=
await
this
.
bmuserbizSve
.
findExportAll
();
let
csvobj
=
{
fileName
:
"恒昌小程序数据"
+
moment
().
format
(
"YYYYMMDDHHmmss"
)
+
".csv"
,
rows
:
list
,
opts
:
{
fields
:
[
'id'
,
'legal_name'
,
'legal_mobile'
,
'idcard'
,
'idcard_front'
,
'idcard_back'
,
'names'
,
'bank'
,
'bankno'
,
'bank_front'
,
'bank_back'
,
'bankMobile'
,
'front_half_img'
,
'declaration_file'
,
'submit_time'
,
'audit_status_name'
,
'reject_reason'
],
unwind
:
[],
unwindBlank
:
true
,
excelStrings
:
true
,
},
headers
:
{
'id'
:
'编号'
,
'legal_name'
:
'姓名'
,
'legal_mobile'
:
'手机号'
,
'idcard'
:
'身份证'
,
'idcard_front'
:
'身份证正面'
,
'idcard_back'
:
'身份证反面'
,
'names'
:
'注册名称'
,
'bank'
:
'开户行'
,
'bankno'
:
'银行卡号'
,
'bank_front'
:
'银行卡正面'
,
'bank_back'
:
'银行卡背面'
,
'bankMobile'
:
'预留手机号'
,
'front_half_img'
:
'半身照'
,
'declaration_file'
:
'声明书'
,
'submit_time'
:
'提交时间'
,
'audit_status_name'
:
'审核状态'
,
'reject_reason'
:
'不通过原因'
,
},
};
await
this
.
excelClient
.
exportCsv
(
req
,
res
,
csvobj
);
}
catch
(
e
)
{
console
.
log
(
e
);
return
system
.
getErrResult2
(
"您的网络不稳, 请稍后重试"
);
}
}
}
}
module
.
exports
=
xggApplet
;
module
.
exports
=
xggApplet
;
\ No newline at end of file
xgg-web/app/config/routes/applet.js
View file @
463c7d8c
...
@@ -27,7 +27,6 @@ module.exports = function (app) {
...
@@ -27,7 +27,6 @@ module.exports = function (app) {
}
}
}
}
params
.
push
(
req
);
params
.
push
(
req
);
params
.
push
(
res
);
var
p
=
null
;
var
p
=
null
;
var
invokeObj
=
System
.
getObject
(
"applet."
+
classPath
);
var
invokeObj
=
System
.
getObject
(
"applet."
+
classPath
);
if
(
invokeObj
[
methodName
])
{
if
(
invokeObj
[
methodName
])
{
...
@@ -66,7 +65,6 @@ module.exports = function (app) {
...
@@ -66,7 +65,6 @@ module.exports = function (app) {
var
cacheManager
=
System
.
getObject
(
"db.cacheManager"
);
var
cacheManager
=
System
.
getObject
(
"db.cacheManager"
);
params
.
push
(
req
);
params
.
push
(
req
);
params
.
push
(
res
);
var
key
=
req
.
body
.
key
;
var
key
=
req
.
body
.
key
;
if
(
key
)
{
if
(
key
)
{
//如果是 创富 merchantId=3 key = merchant_openId
//如果是 创富 merchantId=3 key = merchant_openId
...
...
xgg-web/app/config/routes/web.js
View file @
463c7d8c
var
url
=
require
(
"url"
);
var
url
=
require
(
"url"
);
var
System
=
require
(
"../../base/system"
);
var
System
=
require
(
"../../base/system"
);
const
settings
=
require
(
"../settings"
);
const
settings
=
require
(
"../settings"
);
const
logCtl
=
System
.
getObject
(
"web.oplogCtl"
);
const
logCtl
=
System
.
getObject
(
"web.oplogCtl"
);
module
.
exports
=
function
(
app
)
{
module
.
exports
=
function
(
app
)
{
app
.
get
(
'/'
,
function
(
req
,
res
)
{
app
.
get
(
'/'
,
function
(
req
,
res
)
{
//转到首页
//转到首页
res
.
render
(
"main"
,
{});
res
.
render
(
"main"
,
{});
});
});
// app.get('/p', function (req, res) {
// app.get('/p', function (req, res) {
// res.render("patentyc", {});
// res.render("patentyc", {});
// });
// });
app
.
all
(
"/web/*"
,
function
(
req
,
res
,
next
){
app
.
all
(
"/web/*"
,
function
(
req
,
res
,
next
)
{
if
(
req
.
url
.
indexOf
(
"getRouteConfigWithoutProduct"
)
>
0
||
if
(
req
.
url
.
indexOf
(
"getRouteConfigWithoutProduct"
)
>
0
||
req
.
url
.
indexOf
(
"getRsConfig"
)
>
0
||
req
.
url
.
indexOf
(
"getRsConfig"
)
>
0
||
req
.
url
.
indexOf
(
"getDicConfig"
)
>
0
||
req
.
url
.
indexOf
(
"getDicConfig"
)
>
0
||
req
.
url
.
indexOf
(
"fetchVcode"
)
>
0
||
req
.
url
.
indexOf
(
"fetchVcode"
)
>
0
||
req
.
url
.
indexOf
(
"register"
)
>
0
||
req
.
url
.
indexOf
(
"register"
)
>
0
||
req
.
url
.
indexOf
(
"login"
)
>
0
||
req
.
url
.
indexOf
(
"login"
)
>
0
||
req
.
url
.
indexOf
(
"loopplay"
)
>
0
||
req
.
url
.
indexOf
(
"loopplay"
)
>
0
||
req
.
url
.
indexOf
(
"newschannel"
)
>
0
||
req
.
url
.
indexOf
(
"newschannel"
)
>
0
||
req
.
url
.
indexOf
(
"article"
)
>
0
||
req
.
url
.
indexOf
(
"article"
)
>
0
||
req
.
url
.
indexOf
(
"channelquery"
)
>
0
||
req
.
url
.
indexOf
(
"channelquery"
)
>
0
||
req
.
url
.
indexOf
(
"metaCtl"
)
>
0
||
req
.
url
.
indexOf
(
"metaCtl"
)
>
0
||
req
.
url
.
indexOf
(
"patentycCtl"
)
>
0
||
req
.
url
.
indexOf
(
"patentycCtl"
)
>
0
||
req
.
url
.
indexOf
(
"regionalpatentmonitoringCtl"
)
>
0
||
req
.
url
.
indexOf
(
"regionalpatentmonitoringCtl"
)
>
0
||
req
.
url
.
indexOf
(
"getOssConfig"
)
>
0
){
req
.
url
.
indexOf
(
"bmuserbizCtl/exportAll"
)
>
0
||
req
.
url
.
indexOf
(
"getOssConfig"
)
>
0
)
{
return
next
();
return
next
();
}
}
if
(
!
req
.
session
.
user
)
{
if
(
!
req
.
session
.
user
)
{
var
x
=
{
var
x
=
{
status
:
-
99
,
status
:
-
99
,
msg
:
"no login"
msg
:
"no login"
};
};
res
.
end
(
JSON
.
stringify
(
x
));
res
.
end
(
JSON
.
stringify
(
x
));
}
else
{
}
else
{
//console.log(req.headers);
//console.log(req.headers);
next
();
next
();
}
}
});
});
app
.
get
(
'/web/:qname/:method'
,
function
(
req
,
res
)
{
app
.
get
(
'/web/:qname/:method'
,
function
(
req
,
res
)
{
console
.
log
(
req
.
headers
);
console
.
log
(
req
.
headers
);
req
.
codepath
=
req
.
headers
[
"codepath"
];
req
.
codepath
=
req
.
headers
[
"codepath"
];
var
classPath
=
req
.
params
[
"qname"
];
var
classPath
=
req
.
params
[
"qname"
];
var
methodName
=
req
.
params
[
"method"
];
var
methodName
=
req
.
params
[
"method"
];
var
params
=
[];
var
params
=
[];
params
.
push
(
req
.
query
);
params
.
push
(
req
.
query
);
params
.
push
(
req
);
params
.
push
(
req
);
var
p
=
null
;
params
.
push
(
res
);
var
invokeObj
=
System
.
getObject
(
"web."
+
classPath
);
var
p
=
null
;
if
(
invokeObj
[
methodName
]){
var
invokeObj
=
System
.
getObject
(
"web."
+
classPath
);
p
=
invokeObj
[
methodName
].
apply
(
invokeObj
,
params
);
if
(
invokeObj
[
methodName
])
{
p
=
invokeObj
[
methodName
].
apply
(
invokeObj
,
params
);
}
}
p
.
then
(
r
=>
{
p
.
then
(
r
=>
{
res
.
end
(
JSON
.
stringify
(
r
));
res
.
end
(
JSON
.
stringify
(
r
));
}).
then
(()
=>
{
}).
then
(()
=>
{
params
.
pop
();
params
.
pop
();
logCtl
.
info
({
logCtl
.
info
({
optitle
:
"web get接口调用info:"
,
optitle
:
"web get接口调用info:"
,
op
:
classPath
+
"/"
+
methodName
,
op
:
classPath
+
"/"
+
methodName
,
content
:
params
.
length
==
0
?
""
:
"参数:"
+
JSON
.
stringify
(
params
),
content
:
params
.
length
==
0
?
""
:
"参数:"
+
JSON
.
stringify
(
req
.
query
),
clientIp
:
System
.
get_client_ip
(
req
),
clientIp
:
System
.
get_client_ip
(
req
),
agent
:
req
.
headers
[
"user-agent"
],
agent
:
req
.
headers
[
"user-agent"
],
});
});
}).
catch
(
e
=>
{
}).
catch
(
e
=>
{
console
.
log
(
e
);
console
.
log
(
e
);
logCtl
.
error
({
logCtl
.
error
({
optitle
:
"web get接口调用异常error:"
,
optitle
:
"web get接口调用异常error:"
,
op
:
classPath
+
"/"
+
methodName
,
op
:
classPath
+
"/"
+
methodName
,
content
:
e
.
stack
,
content
:
e
.
stack
,
clientIp
:
System
.
get_client_ip
(
req
),
clientIp
:
System
.
get_client_ip
(
req
),
agent
:
req
.
headers
[
"user-agent"
],
agent
:
req
.
headers
[
"user-agent"
],
});
});
});
});
});
});
app
.
post
(
'/web/:qname/:method'
,
function
(
req
,
res
)
{
app
.
post
(
'/web/:qname/:method'
,
function
(
req
,
res
)
{
req
.
codepath
=
req
.
headers
[
"codepath"
];
req
.
codepath
=
req
.
headers
[
"codepath"
];
var
classPath
=
req
.
params
[
"qname"
];
var
classPath
=
req
.
params
[
"qname"
];
var
methodName
=
req
.
params
[
"method"
];
var
methodName
=
req
.
params
[
"method"
];
var
params
=
[];
var
params
=
[];
params
.
push
(
req
.
query
);
params
.
push
(
req
.
query
);
params
.
push
(
req
.
body
);
params
.
push
(
req
.
body
);
params
.
push
(
req
);
params
.
push
(
req
);
var
p
=
null
;
var
p
=
null
;
var
invokeObj
=
System
.
getObject
(
"web."
+
classPath
);
var
invokeObj
=
System
.
getObject
(
"web."
+
classPath
);
if
(
invokeObj
[
methodName
])
{
if
(
invokeObj
[
methodName
])
{
p
=
invokeObj
[
methodName
].
apply
(
invokeObj
,
params
);
p
=
invokeObj
[
methodName
].
apply
(
invokeObj
,
params
);
}
}
p
.
then
(
r
=>
{
p
.
then
(
r
=>
{
res
.
end
(
JSON
.
stringify
(
r
));
res
.
end
(
JSON
.
stringify
(
r
));
}).
then
(()
=>
{
}).
then
(()
=>
{
params
.
pop
();
params
.
pop
();
logCtl
.
info
({
logCtl
.
info
({
optitle
:
"web post接口调用info:"
,
optitle
:
"web post接口调用info:"
,
op
:
classPath
+
"/"
+
methodName
,
op
:
classPath
+
"/"
+
methodName
,
content
:
params
.
length
==
0
?
""
:
"参数:"
+
JSON
.
stringify
(
params
),
content
:
params
.
length
==
0
?
""
:
"参数:"
+
JSON
.
stringify
(
params
),
clientIp
:
System
.
get_client_ip
(
req
),
clientIp
:
System
.
get_client_ip
(
req
),
agent
:
req
.
headers
[
"user-agent"
],
agent
:
req
.
headers
[
"user-agent"
],
});
});
}).
catch
(
e
=>
{
}).
catch
(
e
=>
{
var
s
=
System
.
getResult2
(
null
,
null
,
null
,
e
.
message
);
var
s
=
System
.
getResult2
(
null
,
null
,
null
,
e
.
message
);
logCtl
.
error
({
logCtl
.
error
({
optitle
:
"web post接口调用异常error:"
,
optitle
:
"web post接口调用异常error:"
,
op
:
classPath
+
"/"
+
methodName
,
op
:
classPath
+
"/"
+
methodName
,
content
:
e
.
stack
,
content
:
e
.
stack
,
clientIp
:
System
.
get_client_ip
(
req
),
clientIp
:
System
.
get_client_ip
(
req
),
agent
:
req
.
headers
[
"user-agent"
],
agent
:
req
.
headers
[
"user-agent"
],
});
});
res
.
end
(
JSON
.
stringify
(
s
));
res
.
end
(
JSON
.
stringify
(
s
));
});
});
...
...
xgg-web/app/front/entry/public/js/audit_page.js
View file @
463c7d8c
...
@@ -137,7 +137,7 @@ var app = new Vue({
...
@@ -137,7 +137,7 @@ var app = new Vue({
},
},
exportAll
(){
exportAll
(){
console
.
log
(
'export all'
);
console
.
log
(
'export all'
);
window
.
open
(
"/
applet/xggApplet
/exportAll"
);
window
.
open
(
"/
web/bmuserbizCtl
/exportAll"
);
},
},
topic_preview
(
filed
)
{
topic_preview
(
filed
)
{
...
...
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