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
a6a24e4a
Commit
a6a24e4a
authored
Aug 11, 2020
by
钟占达
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zyd
parent
3ec7eec8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
73 additions
and
26 deletions
+73
-26
gsb-marketplat/app/base/api/impl/action/templateconfig.js
+3
-3
gsb-marketplat/app/base/service/impl/configmag/forminfoSve.js
+5
-0
gsb-marketplat/app/base/service/impl/configmag/imginfoSve.js
+11
-2
gsb-marketplat/app/front/entry/public/apidoc/customer/template.md
+54
-21
No files found.
gsb-marketplat/app/base/api/impl/action/templateconfig.js
View file @
a6a24e4a
...
...
@@ -41,14 +41,14 @@ class Templateconfig extends APIBase {
opResult
=
await
this
.
imginfoSve
.
getImgList
(
pobj
.
actionBody
);
break
;
case
"createImginfo"
:
// 添加图片
opResult
=
await
this
.
imginfoSve
.
create
(
pobj
.
actionBody
);
opResult
=
await
this
.
imginfoSve
.
create
Imginfo
(
pobj
.
actionBody
);
break
;
case
"getTemplateList"
:
// 获取模板列表
opResult
=
await
this
.
templateinfoSve
.
findAndCountAll
(
pobj
.
actionBody
);
opResult
=
await
this
.
templateinfoSve
.
getTemplateList
(
pobj
.
actionBody
);
// opResult = await this.templateinfoSve.findByCompanyId(pobj.actionBody);
break
;
case
"getFormList"
:
// 获取表单列表
opResult
=
await
this
.
forminfoSve
.
findByCompanyId
(
pobj
.
actionBody
);
opResult
=
await
this
.
forminfoSve
.
getFormList
(
pobj
.
actionBody
);
break
;
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
...
...
gsb-marketplat/app/base/service/impl/configmag/forminfoSve.js
View file @
a6a24e4a
...
...
@@ -53,6 +53,10 @@ class ForminfoService extends ServiceBase {
return
null
;
}
async
getFormList
(
pobj
)
{
let
res
=
await
this
.
dao
.
findAndCountAll
(
pobj
);
return
system
.
getResult
(
res
);
}
}
module
.
exports
=
ForminfoService
;
\ No newline at end of file
gsb-marketplat/app/base/service/impl/configmag/imginfoSve.js
View file @
a6a24e4a
...
...
@@ -5,8 +5,17 @@ class ImginfoService extends ServiceBase {
constructor
()
{
super
(
"configmag"
,
ServiceBase
.
getDaoName
(
ImginfoService
));
}
async
getImgList
(
obj
){
var
res
=
await
this
.
dao
.
findAndCountAll
(
obj
);
async
getImgList
(
pobj
)
{
let
res
=
await
this
.
dao
.
findAndCountAll
(
pobj
);
return
system
.
getResultSuccess
(
res
);
}
async
createImginfo
(
pobj
)
{
let
code
=
await
this
.
getBusUid
(
"img"
);
pobj
.
imginfo
.
code
=
code
;
if
(
pobj
.
imginfo
.
company_id
===
undefined
)
{
pobj
.
imginfo
.
company_id
=
10
;
}
let
res
=
await
this
.
dao
.
create
(
pobj
.
imginfo
);
return
system
.
getResultSuccess
(
res
);
}
async
create
(
pobj
){
...
...
gsb-marketplat/app/front/entry/public/apidoc/customer/template.md
View file @
a6a24e4a
...
...
@@ -339,9 +339,9 @@
"actionType"
:
"createImginfo"
,
"actionBody"
:
{
"imginfo"
:
{
"
url"
:
"https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_1137159702950007820201011182078huluwa.jpg
"
,
"
name"
:
"444
"
,
"size"
:
"200K"
"
name"
:
"hahah
"
,
"
pic_url"
:
"https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_1137159702950007820201011182078huluwa.jpg
"
,
"
pic_
size"
:
"200K"
}
}
}
...
...
@@ -351,14 +351,19 @@
#### 返回结果
```
javascript
{
"version"
:
0
,
"id"
:
55
,
"name"
:
"444"
,
"pic_url"
:
"https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_1137159702950007820201011182078huluwa.jpg"
,
"code"
:
"IMG202008101624l5Vd5"
,
"company_id"
:
10
,
"updated_at"
:
"2020-08-10T08:24:49.672Z"
,
"created_at"
:
"2020-08-10T08:24:49.672Z"
"status"
:
0
,
"msg"
:
"success"
,
"data"
:
{
"version"
:
0
,
"id"
:
93
,
"name"
:
"hahah"
,
"pic_url"
:
"https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_1137159702950007820201011182078huluwa.jpg"
,
"code"
:
"IMG202008111110GcI0b"
,
"company_id"
:
10
,
"updated_at"
:
"2020-08-11T03:10:38.999Z"
,
"created_at"
:
"2020-08-11T03:10:38.999Z"
},
"requestId"
:
"d8507fcc2bb14c49b8a5f3a3fa62f0fc"
}
```
...
...
@@ -377,9 +382,6 @@
"pageInfo"
:{
"pageNo"
:
1
,
"pageSize"
:
10
},
"where"
:
{
"company_id"
:
10
}
}
}
...
...
@@ -393,13 +395,45 @@
"msg"
:
"操作成功"
,
"data"
:
{
"results"
:
{
"count"
:
3
,
"count"
:
5
,
"rows"
:
[
{
"id"
:
5
,
"code"
:
"FM202008111118aCRMw4"
,
"name"
:
"3"
,
"form_items"
:
"手机号、单选按钮"
,
"form_describe"
:
"4"
,
"notes"
:
null
,
"user_id"
:
null
,
"user_name"
:
"jytest6"
,
"company_id"
:
10
,
"record_num"
:
null
,
"created_at"
:
"2020-08-11T03:18:59.000Z"
,
"updated_at"
:
"2020-08-11T03:20:08.000Z"
,
"deleted_at"
:
null
,
"version"
:
0
},
{
"id"
:
4
,
"code"
:
"FM202008111117FRpd3P"
,
"name"
:
"2"
,
"form_items"
:
null
,
"form_describe"
:
"2"
,
"notes"
:
null
,
"user_id"
:
1
,
"user_name"
:
"jytest6"
,
"company_id"
:
11
,
"record_num"
:
null
,
"created_at"
:
"2020-08-11T03:17:42.000Z"
,
"updated_at"
:
"2020-08-11T03:17:42.000Z"
,
"deleted_at"
:
null
,
"version"
:
0
},
{
"id"
:
1
,
"code"
:
"00001"
,
"name"
:
"1"
,
"form_items"
:
"手机号"
,
"form_items"
:
"
单选按钮、
手机号"
,
"form_describe"
:
"1"
,
"notes"
:
"test"
,
"user_id"
:
1
,
...
...
@@ -407,7 +441,7 @@
"company_id"
:
10
,
"record_num"
:
2
,
"created_at"
:
"2020-08-07T15:59:56.000Z"
,
"updated_at"
:
"2020-08-1
0T05:43:03
.000Z"
,
"updated_at"
:
"2020-08-1
1T03:10:50
.000Z"
,
"deleted_at"
:
null
,
"version"
:
null
},
...
...
@@ -431,7 +465,7 @@
"id"
:
2
,
"code"
:
null
,
"name"
:
"sssssss"
,
"form_items"
:
null
,
"form_items"
:
"手机号"
,
"form_describe"
:
"ss"
,
"notes"
:
"tset2"
,
"user_id"
:
null
,
...
...
@@ -439,7 +473,7 @@
"company_id"
:
10
,
"record_num"
:
3
,
"created_at"
:
"2020-08-07T10:42:27.000Z"
,
"updated_at"
:
"2020-08-
07T10:42:27
.000Z"
,
"updated_at"
:
"2020-08-
11T03:10:13
.000Z"
,
"deleted_at"
:
null
,
"version"
:
0
}
...
...
@@ -448,7 +482,6 @@
"aggresult"
:
{}
},
"bizmsg"
:
"empty"
,
"requestId"
:
"
a36fdfff4c2b4ae98b462c54b3cf588d
"
"requestId"
:
"
7029b432952a4463ae99b0f560e0eefb
"
}
```
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