Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
GeliBusinessPlatform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ljy
GeliBusinessPlatform
Commits
da6b7ae2
Commit
da6b7ae2
authored
May 08, 2021
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sadfsafdsafsadfsdfafd
parent
b5bd873f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
9 deletions
+13
-9
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/ViewController/1.1入库&出库/出库/NewCKVc.swift
...BusinessPlatform/ViewController/1.1入库&出库/出库/NewCKVc.swift
+9
-6
GeliBusinessPlatform/ViewController/蓝牙连接/BtViewController.m
GeliBusinessPlatform/ViewController/蓝牙连接/BtViewController.m
+4
-3
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
da6b7ae2
No preview for this file type
GeliBusinessPlatform/ViewController/1.1入库&出库/出库/NewCKVc.swift
View file @
da6b7ae2
...
...
@@ -206,7 +206,9 @@ class NewCKVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,CKNo
print
(
"页面加载完成..."
)
webView
.
takeScreenshotOfFullContent
{
(
img
)
in
let
imgV
=
UIImageView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
230
,
height
:
230*0.75
))
self
.
view
.
addSubview
(
imgV
)
imgV
.
image
=
img
let
command
=
TscCommand
()
command
.
addSize
(
40
,
30
)
...
...
@@ -215,22 +217,23 @@ class NewCKVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,CKNo
command
.
addTear
(
"ON"
)
command
.
addQueryPrinterStatus
(
Response
(
rawValue
:
1
)
!
)
command
.
addCls
()
command
.
addBitmapwithX
(
0
,
withY
:
0
,
withMode
:
0
,
withWidth
:
400
,
with
:
img
)
command
.
addPrint
(
1
,
1
)
ConnecterManager
.
sharedInstance
()?
.
write
(
command
.
getCommand
())
}
}
@IBAction
func
ck_action
(
_
sender
:
UIButton
)
{
let
urlStr
=
"https://c.gelifood.com/market/src/views/Order/codeDetail.html?order_id=12767"
let
urlStr
=
"http://z.gelifood.com/static/url/label.html?goods_name=破军碎星锤魔女斗篷反甲&spec_str=住宅就拉萨京东破军碎星锤魔女斗篷反甲方开始了大舅父&batch_sn=12312312313123&batch_id=444"
// let urlStr = "https://www.baidu.com"
let
urlString
=
urlStr
.
addingPercentEncoding
(
withAllowedCharacters
:
.
urlQueryAllowed
)
!
let
url
=
URL
(
string
:
urlString
)
let
request
=
URLRequest
.
init
(
url
:
url
!
,
cachePolicy
:
.
reloadRevalidatingCacheData
,
timeoutInterval
:
10
)
wkWebView
.
navigationDelegate
=
self
wkWebView
.
load
(
request
)
wkWebView
.
bounds
=
CGRect
(
x
:
0
,
y
:
0
,
width
:
230
,
height
:
230*0.75
)
return
if
isGm
{
...
...
@@ -756,7 +759,7 @@ extension WKWebView {
public
func
takeScreenshotOfFullContent
(
_
completion
:
@escaping
((
UIImage
?)
->
Void
))
{
self
.
scrollView
.
setContentOffset
(
CGPoint
(
x
:
0
,
y
:
0
),
animated
:
false
)
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
DispatchTime
.
now
()
+
0.3
)
{
let
renderer
=
WebViewPrintPageRenderer
.
init
(
formatter
:
self
.
viewPrintFormatter
(),
contentSize
:
self
.
scrollView
.
contentSize
)
let
renderer
=
WebViewPrintPageRenderer
.
init
(
formatter
:
self
.
viewPrintFormatter
(),
contentSize
:
CGSize
(
width
:
230
,
height
:
230*0.75
)
)
let
image
=
renderer
.
printContentToImage
()
completion
(
image
)
}
...
...
GeliBusinessPlatform/ViewController/蓝牙连接/BtViewController.m
View file @
da6b7ae2
...
...
@@ -118,25 +118,25 @@
-
(
void
)
tableView
:(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:(
NSIndexPath
*
)
indexPath
{
[
Manager
stopScan
];
[
Manager
closePeripheral
:
_selectArray
.
firstObject
];
[
self
.
selectArray
removeAllObjects
];
if
(
indexPath
.
section
==
1
)
{
CBPeripheral
*
peripheral
=
[
self
.
dicts
objectForKey
:[
self
.
dicts
allKeys
][
indexPath
.
row
]];
[
self
connectDevice
:
peripheral
];
}
else
{
[
SVProgressHUD
showErrorWithStatus
:
@"断开连接"
];
[
self
startScane
];
}
[
_tableView
reloadData
];
}
-
(
void
)
connectDevice
:(
CBPeripheral
*
)
peripheral
{
[
Manager
connectPeripheral
:
peripheral
options
:
nil
timeout
:
2
connectBlack
:^
(
ConnectState
state
)
{
if
(
state
==
3
)
{
if
([
_selectArray
count
]
==
0
)
{
[
self
.
selectArray
addObject
:
peripheral
];
[
_tableView
reloadData
];
}
[
SVProgressHUD
showSuccessWithStatus
:
@"连接成功"
];
...
...
@@ -145,6 +145,7 @@
[
SVProgressHUD
showErrorWithStatus
:
@"连接失败"
];
}
[
self
startScane
];
}];
}
...
...
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