Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
D
doublescreen-front
Project
Project
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pengguangpu
doublescreen-front
Commits
3c12889d
Commit
3c12889d
authored
Jun 28, 2020
by
gaodapeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
格式化
parent
e8a373c7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
17 deletions
+17
-17
app.js
app.js
+9
-10
scan.js
pages/scan/scan.js
+8
-7
No files found.
app.js
View file @
3c12889d
...
@@ -2,9 +2,9 @@ var fundebug = require('./utils/fundebug.0.2.0.min.js');
...
@@ -2,9 +2,9 @@ var fundebug = require('./utils/fundebug.0.2.0.min.js');
import
monitor
from
'/utils/alipayLogger'
;
import
monitor
from
'/utils/alipayLogger'
;
fundebug
.
init
(
fundebug
.
init
(
{
{
apikey
:
'c0c5937571f82aecab3f7578bea5d8163455cd2407863f94829bee12324f57b4'
apikey
:
'c0c5937571f82aecab3f7578bea5d8163455cd2407863f94829bee12324f57b4'
})
})
App
(
monitor
.
hookApp
({
App
(
monitor
.
hookApp
({
globalData
:
{
globalData
:
{
version
:
"1.0.1.20200311"
,
version
:
"1.0.1.20200311"
,
...
@@ -16,17 +16,17 @@ App(monitor.hookApp({
...
@@ -16,17 +16,17 @@ App(monitor.hookApp({
RELEASE_URL
:
"https://cashier.miyahub.com/"
,
RELEASE_URL
:
"https://cashier.miyahub.com/"
,
BASE_URL
:
"https://cashier.miyahub.com/"
,
BASE_URL
:
"https://cashier.miyahub.com/"
,
appId
:
"2021001107603212"
,
appId
:
"2021001107603212"
,
backScreenAppId
:
"2021001107617164"
,
backScreenAppId
:
"2021001107617164"
,
//小程序容器版本
//小程序容器版本
containerVersionCode
:
null
,
containerVersionCode
:
null
,
localAccountInfo
:
null
,
localAccountInfo
:
null
,
//模拟器上需要sn有值
//模拟器上需要sn有值
sn
:
"xx"
,
sn
:
"xx"
,
//是否登录完成
//是否登录完成
isLoginOk
:
false
isLoginOk
:
false
},
},
onLaunch
(
options
)
{
onLaunch
(
options
)
{
...
@@ -136,9 +136,8 @@ App(monitor.hookApp({
...
@@ -136,9 +136,8 @@ App(monitor.hookApp({
});
});
},
},
onError
(
err
)
onError
(
err
)
{
{
fundebug
.
onError
(
err
);
fundebug
.
onError
(
err
);
},
},
}));
}));
pages/scan/scan.js
View file @
3c12889d
...
@@ -184,7 +184,8 @@ Page({
...
@@ -184,7 +184,8 @@ Page({
var
scanGoodRequest
=
api
.
createCommonRequest
();
var
scanGoodRequest
=
api
.
createCommonRequest
();
scanGoodRequest
.
goodsId
=
barcode
;
scanGoodRequest
.
goodsId
=
barcode
;
//管理员需要额外传一个storeid 但是目前这个设备是没有
//管理员需要额外传一个storeid 但是目前这个设备是没有
console
.
log
(
"扫商品的请求 ==>"
+
JSON
.
stringify
(
scanGoodRequest
));
console
.
log
(
"扫商品的请求url: ==>"
+
getApp
().
globalData
.
BASE_URL
+
API_SCAN
);
console
.
log
(
"扫商品的请求content ==>"
+
JSON
.
stringify
(
scanGoodRequest
));
my
.
request
({
my
.
request
({
url
:
getApp
().
globalData
.
BASE_URL
+
API_SCAN
,
url
:
getApp
().
globalData
.
BASE_URL
+
API_SCAN
,
method
:
'POST'
,
method
:
'POST'
,
...
@@ -201,17 +202,17 @@ Page({
...
@@ -201,17 +202,17 @@ Page({
duration
:
2000
duration
:
2000
});
});
}
else
{
}
else
{
if
(
res
.
data
.
data
==
null
||
res
.
data
.
data
.
barcode
==
null
)
{
if
(
res
.
data
.
data
==
null
||
res
.
data
.
data
.
barcode
==
null
)
{
my
.
showToast
({
my
.
showToast
({
type
:
'fail'
,
type
:
'fail'
,
content
:
"该商品没有对应的活动"
,
content
:
"该商品没有对应的活动"
,
duration
:
2000
duration
:
2000
});
});
}
else
{
}
else
{
//识别商品成功
//识别商品成功
this
.
parseGoodInfo
(
res
.
data
.
data
);
this
.
parseGoodInfo
(
res
.
data
.
data
);
console
.
log
(
"识别商品信息成功"
);
console
.
log
(
"识别商品信息成功"
);
}
}
}
}
},
},
fail
:
(
res
)
=>
{
fail
:
(
res
)
=>
{
...
...
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