Commit 3c12889d authored by gaodapeng's avatar gaodapeng

格式化

parent e8a373c7
......@@ -2,9 +2,9 @@ var fundebug = require('./utils/fundebug.0.2.0.min.js');
import monitor from '/utils/alipayLogger';
fundebug.init(
{
apikey : 'c0c5937571f82aecab3f7578bea5d8163455cd2407863f94829bee12324f57b4'
})
{
apikey: 'c0c5937571f82aecab3f7578bea5d8163455cd2407863f94829bee12324f57b4'
})
App(monitor.hookApp({
globalData: {
version: "1.0.1.20200311",
......@@ -16,17 +16,17 @@ App(monitor.hookApp({
RELEASE_URL: "https://cashier.miyahub.com/",
BASE_URL: "https://cashier.miyahub.com/",
appId: "2021001107603212",
backScreenAppId:"2021001107617164",
backScreenAppId: "2021001107617164",
//小程序容器版本
containerVersionCode: null,
localAccountInfo: null,
//模拟器上需要sn有值
sn: "xx",
//是否登录完成
isLoginOk : false
isLoginOk: false
},
onLaunch(options) {
......@@ -136,9 +136,8 @@ App(monitor.hookApp({
});
},
onError(err)
{
fundebug.onError(err);
},
onError(err) {
fundebug.onError(err);
},
}));
......@@ -184,7 +184,8 @@ Page({
var scanGoodRequest = api.createCommonRequest();
scanGoodRequest.goodsId = barcode;
//管理员需要额外传一个storeid 但是目前这个设备是没有
console.log("扫商品的请求 ==>" + JSON.stringify(scanGoodRequest));
console.log("扫商品的请求url: ==>" + getApp().globalData.BASE_URL + API_SCAN);
console.log("扫商品的请求content ==>" + JSON.stringify(scanGoodRequest));
my.request({
url: getApp().globalData.BASE_URL + API_SCAN,
method: 'POST',
......@@ -201,17 +202,17 @@ Page({
duration: 2000
});
} else {
if(res.data.data == null || res.data.data.barcode == null){
my.showToast({
if (res.data.data == null || res.data.data.barcode == null) {
my.showToast({
type: 'fail',
content: "该商品没有对应的活动",
duration: 2000
});
}else{
//识别商品成功
});
} else {
//识别商品成功
this.parseGoodInfo(res.data.data);
console.log("识别商品信息成功");
}
}
}
},
fail: (res) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment