Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-enterprise
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
base_platform_enterprise
gic-platform-enterprise
Commits
63e8b574
Commit
63e8b574
authored
Jul 16, 2020
by
陶光胜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
小程序二维码修改
parent
48965292
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
QrcodeController.java
...a/com/gic/enterprise/web/controller/QrcodeController.java
+7
-7
No files found.
gic-platform-enterprise-web/src/main/java/com/gic/enterprise/web/controller/QrcodeController.java
View file @
63e8b574
...
...
@@ -233,15 +233,15 @@ public class QrcodeController {
}
@RequestMapping
(
"take-applet-qrcode"
)
public
RestResponse
takeAppletQrcode
(
String
appkey
,
Integer
pa
th
Id
){
public
RestResponse
takeAppletQrcode
(
String
appkey
,
Integer
pa
ge
Id
){
String
path
=
"pages/customView/customView"
;
byte
[]
appletQrcode
=
this
.
createAppletQrcode
(
appkey
,
path
);
byte
[]
appletQrcode
=
this
.
createAppletQrcode
(
appkey
,
path
,
pageId
+
""
);
UploadResult
uploadResult
=
QQCloudPicUtils
.
uploadLocalPicStream
(
"pic01"
,
""
,
appletQrcode
);
Map
<
String
,
Object
>
pic
=
new
HashMap
<>();
pic
.
put
(
"fileId"
,
uploadResult
.
getFileId
());
pic
.
put
(
"url"
,
uploadResult
.
getUrl
());
pic
.
put
(
"downloadUrl"
,
uploadResult
.
getDownloadUrl
());
pic
.
put
(
"path"
,
path
+
"?pageId="
+
pa
th
Id
);
pic
.
put
(
"path"
,
path
+
"?pageId="
+
pa
ge
Id
);
return
RestResponse
.
success
(
pic
);
}
...
...
@@ -249,7 +249,7 @@ public class QrcodeController {
@IgnoreLogin
public
RestResponse
takeStoreQrcode
(
String
appkey
,
Integer
id
,
Integer
qrcodeType
){
String
path
=
"pages/index/index?qrcodeParam="
+
id
+
"&qrcodeType="
+
qrcodeType
;
byte
[]
appletQrcode
=
this
.
createAppletQrcode
(
appkey
,
path
);
byte
[]
appletQrcode
=
this
.
createAppletQrcode
(
appkey
,
path
,
id
+
""
);
UploadResult
uploadResult
=
QQCloudPicUtils
.
uploadLocalPicStream
(
"pic01"
,
""
,
appletQrcode
);
Map
<
String
,
Object
>
pic
=
new
HashMap
<>();
pic
.
put
(
"fileId"
,
uploadResult
.
getFileId
());
...
...
@@ -313,7 +313,7 @@ public class QrcodeController {
appletPath
+=
"?qrcodeParam="
+
qrcodeId
;
String
[]
appletArr
=
dto
.
getAppletIds
().
split
(
","
);
for
(
String
s
:
appletArr
)
{
byte
[]
appletQrcode
=
createAppletQrcode
(
s
,
appletPath
);
byte
[]
appletQrcode
=
createAppletQrcode
(
s
,
appletPath
,
""
);
if
(
appletQrcode
!=
null
){
ZipEntry
e
=
new
ZipEntry
(
content
.
getTitle
()
+
File
.
separator
+
s
+
File
.
separator
+
content
.
getTitle
()
+
".jpg"
);
zipOutputStream
.
putNextEntry
(
e
);
...
...
@@ -356,8 +356,8 @@ public class QrcodeController {
return
null
;
}
private
byte
[]
createAppletQrcode
(
String
appkey
,
String
path
){
ServiceResponse
<
Map
<
String
,
Object
>>
wxaQrcode
=
this
.
weixinWxaFunService
.
getWxaCodeUnlimit
(
appkey
,
path
,
"31"
);
private
byte
[]
createAppletQrcode
(
String
appkey
,
String
path
,
String
scene
){
ServiceResponse
<
Map
<
String
,
Object
>>
wxaQrcode
=
this
.
weixinWxaFunService
.
getWxaCodeUnlimit
(
appkey
,
path
,
scene
);
if
(
wxaQrcode
.
isSuccess
()){
Map
<
String
,
Object
>
result
=
wxaQrcode
.
getResult
();
return
(
byte
[])
result
.
get
(
"content"
);
...
...
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