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
c790c493
Commit
c790c493
authored
Feb 27, 2020
by
王昆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
a6eb2b0e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
82 additions
and
8 deletions
+82
-8
bpo-tax/app/base/controller/impl/tax/tuserCtl.js
+1
-1
bpo-tax/app/config/environment.js
+2
-2
bpo-tax/app/config/routes/web.js
+5
-5
bpo-tax/app/front/entry/public/apidoc/tax/tax.md
+74
-0
No files found.
bpo-tax/app/base/controller/impl/tax/tuserCtl.js
View file @
c790c493
...
@@ -37,7 +37,7 @@ class TuserCtl extends CtlBase {
...
@@ -37,7 +37,7 @@ class TuserCtl extends CtlBase {
loginInfo
=
loginInfo
.
data
;
loginInfo
=
loginInfo
.
data
;
let
key
=
await
this
.
setLogin
(
loginInfo
);
let
key
=
await
this
.
setLogin
(
loginInfo
);
return
system
.
getResultSuccess
({
return
system
.
getResultSuccess
({
login
:
key
taxsid
:
key
});
});
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
log
(
error
);
console
.
log
(
error
);
...
...
bpo-tax/app/config/environment.js
View file @
c790c493
...
@@ -27,7 +27,7 @@ module.exports = function (app) {
...
@@ -27,7 +27,7 @@ module.exports = function (app) {
app
.
all
(
'*'
,
function
(
req
,
res
,
next
)
{
app
.
all
(
'*'
,
function
(
req
,
res
,
next
)
{
req
.
objs
=
system
;
req
.
objs
=
system
;
res
.
header
(
'Access-Control-Allow-Origin'
,
'*'
);
res
.
header
(
'Access-Control-Allow-Origin'
,
'*'
);
res
.
header
(
'Access-Control-Allow-Headers'
,
'Content-Type, Content-Length, Authorization, Accept, X-Requested-With , yourHeaderFeild,
xggadmin
sid'
);
res
.
header
(
'Access-Control-Allow-Headers'
,
'Content-Type, Content-Length, Authorization, Accept, X-Requested-With , yourHeaderFeild,
tax
sid'
);
res
.
header
(
'Access-Control-Allow-Methods'
,
'PUT, POST, GET, DELETE, OPTIONS'
);
res
.
header
(
'Access-Control-Allow-Methods'
,
'PUT, POST, GET, DELETE, OPTIONS'
);
// res.header('Access-Control-Allow-Credentials', 'true');
// res.header('Access-Control-Allow-Credentials', 'true');
if
(
req
.
method
==
'OPTIONS'
)
{
if
(
req
.
method
==
'OPTIONS'
)
{
...
@@ -40,7 +40,7 @@ module.exports = function (app) {
...
@@ -40,7 +40,7 @@ module.exports = function (app) {
if
(
settings
.
env
==
"dev"
)
{
if
(
settings
.
env
==
"dev"
)
{
app
.
use
(
session
(
app
.
use
(
session
(
{
{
name
:
'
xggadmin
sid'
,
name
:
'
tax
sid'
,
cookie
:
{
maxAge
:
3600000
},
cookie
:
{
maxAge
:
3600000
},
rolling
:
true
,
rolling
:
true
,
resave
:
false
,
resave
:
false
,
...
...
bpo-tax/app/config/routes/web.js
View file @
c790c493
...
@@ -6,12 +6,12 @@ const redisClient = system.getObject("util.redisClient");
...
@@ -6,12 +6,12 @@ const redisClient = system.getObject("util.redisClient");
module
.
exports
=
function
(
app
)
{
module
.
exports
=
function
(
app
)
{
app
.
all
(
"/web/*"
,
async
function
(
req
,
res
,
next
)
{
app
.
all
(
"/web/*"
,
async
function
(
req
,
res
,
next
)
{
var
xggadminsid
;
var
loginToken
;
var
jsonUser
=
req
.
session
.
user
;
var
jsonUser
=
req
.
session
.
user
;
// var jsonUser = null;
// var jsonUser = null;
if
(
!
jsonUser
)
{
if
(
!
jsonUser
)
{
xggadminsid
=
req
.
headers
[
"xggadmin
sid"
]
||
""
;
loginToken
=
req
.
headers
[
"tax
sid"
]
||
""
;
jsonUser
=
await
redisClient
.
get
(
xggadminsid
);
jsonUser
=
await
redisClient
.
get
(
loginToken
);
if
(
jsonUser
)
{
if
(
jsonUser
)
{
jsonUser
=
JSON
.
parse
(
jsonUser
);
jsonUser
=
JSON
.
parse
(
jsonUser
);
}
}
...
@@ -33,8 +33,8 @@ module.exports = function (app) {
...
@@ -33,8 +33,8 @@ module.exports = function (app) {
return
;
return
;
}
}
if
(
xggadminsid
)
{
if
(
loginToken
)
{
redisClient
.
setWithEx
(
xggadminsid
,
JSON
.
stringify
(
jsonUser
),
60
*
60
*
60
);
redisClient
.
setWithEx
(
loginToken
,
JSON
.
stringify
(
jsonUser
),
60
*
60
*
60
);
}
}
req
.
loginUser
=
jsonUser
;
req
.
loginUser
=
jsonUser
;
next
();
next
();
...
...
bpo-tax/app/front/entry/public/apidoc/tax/tax.md
View file @
c790c493
<a
name=
"menu"
>
目录
</a>
<a
name=
"menu"
>
目录
</a>
1.
[
自动登录
](
#smartLogin
)
1.
[
商户税务
](
#merchantTaxPage
)
1.
[
商户税务
](
#merchantTaxPage
)
1.
[
个人税务
](
#personTaxPage
)
1.
[
个人税务
](
#personTaxPage
)
1.
[
个人税务-完税证明
](
#personTaxPage_taxurl
)
1.
[
个人税务-完税证明
](
#personTaxPage_taxurl
)
## **<a name="smartLogin"> 自动登录 </a>**
[
返回到目录
](
#menu
)
##### URL
[
/web/tax/tuserCtl/smartLogin
]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
```
javascript
{
"data"
:
"AFx9j7LcjO7kte9dSNmFXIteTvWphfA4ZG2oqcOO2SwRVN5U0byxbZPP1w2d1JyHda062Hy3/tAB4ax8oOVswy7vsBBcNKRlOU1THT4pbyFgTVfHvxiNQ2hR5S6mYh4PnrmoJRXVjlTrb/61zZ4itQ=="
}
```
#### 返回结果
```
javascript
{
"status"
:
0
,
"msg"
:
"success"
,
"data"
:
{
"taxsid"
:
"bt_3cb49932-fa02-44f0-90db-9f06fe02e5c7"
}
}
```
## **<a name="merchantTaxPage"> 商户税务 </a>**
[
返回到目录
](
#menu
)
##### URL
[
/web/tax/tcompanytaxCtl/taxPage
]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
```
javascript
{
"currentPage"
:
"1"
,
"pageSize"
:
"10"
,
"month"
:
""
,
// 月份 如:2019-02
}
```
#### 返回结果
```
javascript
{
"status"
:
0
,
"msg"
:
"success"
,
"data"
:
{
"count"
:
1
,
"rows"
:
[
{
"companyName"
:
"杭州淘粉吧网络技术股份有限公司"
,
// 商户名
"mchtId"
:
"1103667243432067073"
// 商户id
"month_date"
:
"2019-02"
,
// 完税月份
"tax_url"
:
"https://g..."
,
// 完税pdf
"tax_amt"
:
"0"
,
// 完税金额
"created_at"
:
"2020-02-27 03:32:22"
,
"updated_at"
:
"2020-02-27 03:32:24"
,
"deleted_at"
:
null
,
"version"
:
0
,
}
]
}
}
```
## **<a name="merchantTaxPage"> 商户税务 </a>**
## **<a name="merchantTaxPage"> 商户税务 </a>**
[
返回到目录
](
#menu
)
[
返回到目录
](
#menu
)
##### URL
##### URL
...
...
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