|
|
@@ -107,7 +107,7 @@
|
|
|
}
|
|
|
},
|
|
|
onBackPress(options) {
|
|
|
- console.log(options)
|
|
|
+
|
|
|
if (options.from == 'backbutton') {
|
|
|
this.$u.route({
|
|
|
type: 'switchTab',
|
|
|
@@ -119,14 +119,14 @@
|
|
|
onLaunch() {
|
|
|
uni.$on('update', data => {
|
|
|
this.lisi = data.lisi
|
|
|
- console.log(this.lisi)
|
|
|
+
|
|
|
})
|
|
|
},
|
|
|
created() {
|
|
|
uni.getNetworkType({
|
|
|
success: function(res) {
|
|
|
let none = res.networkType
|
|
|
- console.log(res.networkType);
|
|
|
+
|
|
|
if (none == 'none') {
|
|
|
uni.showToast({
|
|
|
icon: 'none',
|
|
|
@@ -138,18 +138,18 @@
|
|
|
});
|
|
|
uni.$on('data', res => {
|
|
|
this.lisi = res.lisi
|
|
|
- console.log(res.lisi)
|
|
|
+
|
|
|
})
|
|
|
//开始扫码
|
|
|
const innerAudioContext = uni.createInnerAudioContext();
|
|
|
innerAudioContext.autoplay = true;
|
|
|
innerAudioContext.src = '../../../static/mp3/start.mp3';
|
|
|
innerAudioContext.onPlay(() => {
|
|
|
- console.log('开始播放');
|
|
|
+
|
|
|
});
|
|
|
innerAudioContext.onError((res) => {
|
|
|
- console.log(res.errMsg);
|
|
|
- console.log(res.errCode);
|
|
|
+
|
|
|
+
|
|
|
});
|
|
|
this.coord = ''
|
|
|
},
|
|
|
@@ -163,7 +163,7 @@
|
|
|
type: 'gcj02', // 返回国测局坐标
|
|
|
geocode: true,
|
|
|
success: function(res) {
|
|
|
- console.log(res)
|
|
|
+
|
|
|
that.tishi(res)
|
|
|
},
|
|
|
fail: function(e) {
|
|
|
@@ -175,7 +175,7 @@
|
|
|
})
|
|
|
},
|
|
|
async tishi(res) {
|
|
|
- console.log(res)
|
|
|
+
|
|
|
let this_ = this
|
|
|
this_.baidu = res
|
|
|
qqmapsdk.reverseGeocoder({
|
|
|
@@ -196,8 +196,8 @@
|
|
|
latitude: this_.baidu.latitude
|
|
|
}
|
|
|
}).then(res => {
|
|
|
- console.log(res.data.data.result)
|
|
|
- console.log(res.data)
|
|
|
+
|
|
|
+
|
|
|
if (res.data.code != 0) {
|
|
|
uni.showToast({
|
|
|
icon: 'none',
|
|
|
@@ -208,7 +208,7 @@
|
|
|
this_.addreev(this_.baidu, aress)
|
|
|
}
|
|
|
}).catch(err => {
|
|
|
- console.log(err)
|
|
|
+
|
|
|
uni.showToast({
|
|
|
icon: 'none',
|
|
|
title: '网络繁忙请稍后再试~'
|
|
|
@@ -222,13 +222,13 @@
|
|
|
async addreev(res, x) {
|
|
|
this.address = x
|
|
|
this.degree = res
|
|
|
- console.log(res)
|
|
|
- console.log(x)
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
//手动录入调用
|
|
|
manualentry() {
|
|
|
if (this.number_a.length != 0) {
|
|
|
- console.log(this.degree)
|
|
|
+
|
|
|
if (this.degree == undefined) {
|
|
|
uni.showToast({
|
|
|
icon: 'none',
|
|
|
@@ -251,62 +251,62 @@
|
|
|
scanAddress: this.address
|
|
|
}
|
|
|
}).then(res => {
|
|
|
- console.log(res)
|
|
|
+
|
|
|
if (res.data.code == 513) {
|
|
|
- console.log(res.data.msg)
|
|
|
+
|
|
|
let name = 'regular'
|
|
|
this.tipss(res, name)
|
|
|
return
|
|
|
}
|
|
|
if (res.data.code == 514) {
|
|
|
- console.log(res.data.msg)
|
|
|
+
|
|
|
let name = 'nonoperating'
|
|
|
this.tipss(res, name)
|
|
|
return
|
|
|
}
|
|
|
if (res.data.code == 515) {
|
|
|
- console.log(res.data.msg)
|
|
|
+
|
|
|
let name = 'warehousing'
|
|
|
this.tipss(res, name)
|
|
|
return
|
|
|
}
|
|
|
if (res.data.code == 517) {
|
|
|
- console.log(res.data.msg)
|
|
|
+
|
|
|
let name = 'atypism'
|
|
|
this.tipss(res, name)
|
|
|
return
|
|
|
}
|
|
|
if (res.data.code == 518) {
|
|
|
- console.log(res.data.msg)
|
|
|
+
|
|
|
let name = 'gobeyond'
|
|
|
this.tipss(res, name)
|
|
|
return
|
|
|
}
|
|
|
if (res.data.code == 519) {
|
|
|
- console.log(res.data.msg)
|
|
|
+
|
|
|
let name = 'notallow'
|
|
|
this.tipss(res, name)
|
|
|
return
|
|
|
}
|
|
|
if (res.data.code == 500) {
|
|
|
- console.log(res.data.msg)
|
|
|
+
|
|
|
let name = 'error'
|
|
|
this.tipss(res, name)
|
|
|
return
|
|
|
}
|
|
|
if (res.data.code == 0) {
|
|
|
- console.log(res)
|
|
|
+
|
|
|
this.res = res
|
|
|
- console.log(res.data.data[0].isRegular)
|
|
|
+
|
|
|
for (let i = 0; i < this.lisi.length; i++) {
|
|
|
if (this.lisi[i].tireNumber == res.data.data[0].tirenumber) {
|
|
|
- console.log(res)
|
|
|
+
|
|
|
let err = {
|
|
|
"data": {
|
|
|
"msg": "请勿重复录入",
|
|
|
}
|
|
|
}
|
|
|
- console.log(err.data.msg)
|
|
|
+
|
|
|
let name = 'duplicateentry'
|
|
|
this.tipss(err, name)
|
|
|
return
|
|
|
@@ -314,14 +314,14 @@
|
|
|
}
|
|
|
this.container()
|
|
|
}
|
|
|
- console.log(this.lisi)
|
|
|
+
|
|
|
}).catch(err => {
|
|
|
// this.$refs.repeat.show({
|
|
|
// title: "网络繁忙,请稍后再试",
|
|
|
// type: 'default',
|
|
|
// position: 'bottom'
|
|
|
// })
|
|
|
- console.log(err)
|
|
|
+
|
|
|
})
|
|
|
.finally(() => {
|
|
|
// Loading.close()
|
|
|
@@ -346,11 +346,11 @@
|
|
|
innerAudioContext.autoplay = true;
|
|
|
innerAudioContext.src = '../../../static/mp3/' + name + '.mp3';
|
|
|
innerAudioContext.onPlay(() => {
|
|
|
- console.log('开始播放');
|
|
|
+
|
|
|
});
|
|
|
innerAudioContext.onError((res) => {
|
|
|
- console.log(res.errMsg);
|
|
|
- console.log(res.errCode);
|
|
|
+
|
|
|
+
|
|
|
});
|
|
|
},
|
|
|
container() {
|
|
|
@@ -364,17 +364,17 @@
|
|
|
innerAudioContext.autoplay = true;
|
|
|
innerAudioContext.src = '../../../static/mp3/entered.mp3';
|
|
|
innerAudioContext.onPlay(() => {
|
|
|
- console.log('开始播放');
|
|
|
+
|
|
|
});
|
|
|
innerAudioContext.onError((res) => {
|
|
|
- console.log(res.errMsg);
|
|
|
- console.log(res.errCode);
|
|
|
+
|
|
|
+
|
|
|
});
|
|
|
- console.log(this.res.data.data[0].specs)
|
|
|
+
|
|
|
this.show_s = false
|
|
|
- console.log(this.show_s)
|
|
|
+
|
|
|
this.number_a = ''
|
|
|
- console.log("我成功啦.")
|
|
|
+
|
|
|
this.lisi.push({
|
|
|
specs: this.res.data.data[0].specs,
|
|
|
flagRegular: this.res.data.data[0].isRegular,
|
|
|
@@ -389,7 +389,7 @@
|
|
|
plyRating: this.res.data.data[0].plyRating,
|
|
|
scanWay: '0'
|
|
|
})
|
|
|
- console.log(this.lisi)
|
|
|
+
|
|
|
},
|
|
|
|
|
|
//获取扫码控件
|
|
|
@@ -397,7 +397,7 @@
|
|
|
uni.getNetworkType({
|
|
|
success: function(res) {
|
|
|
let none = res.networkType
|
|
|
- console.log(res.networkType);
|
|
|
+
|
|
|
if (none == 'none') {
|
|
|
uni.showToast({
|
|
|
icon: 'none',
|
|
|
@@ -408,16 +408,16 @@
|
|
|
innerAudioContext.autoplay = true;
|
|
|
innerAudioContext.src = '../../../static/mp3/failure.mp3';
|
|
|
innerAudioContext.onPlay(() => {
|
|
|
- console.log('开始播放');
|
|
|
+
|
|
|
});
|
|
|
innerAudioContext.onError((res) => {
|
|
|
- console.log(res.errMsg);
|
|
|
- console.log(res.errCode);
|
|
|
+
|
|
|
+
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
- console.log(val)
|
|
|
+
|
|
|
this.number = val
|
|
|
this.number_s = val
|
|
|
if (this.degree == undefined) {
|
|
|
@@ -445,60 +445,60 @@
|
|
|
this.res_s = res
|
|
|
this.tips = "胎号"
|
|
|
if (res.data.code == 513) {
|
|
|
- console.log(res.data.msg)
|
|
|
+
|
|
|
let name = 'regular'
|
|
|
this.tipss(res, name)
|
|
|
return
|
|
|
}
|
|
|
if (res.data.code == 514) {
|
|
|
- console.log(res.data.msg)
|
|
|
+
|
|
|
let name = 'nonoperating'
|
|
|
this.tipss(res, name)
|
|
|
return
|
|
|
}
|
|
|
if (res.data.code == 515) {
|
|
|
- console.log(res.data.msg)
|
|
|
+
|
|
|
let name = 'warehousing'
|
|
|
this.tipss(res, name)
|
|
|
return
|
|
|
}
|
|
|
if (res.data.code == 517) {
|
|
|
- console.log(res.data.msg)
|
|
|
+
|
|
|
let name = 'atypism'
|
|
|
this.tipss(res, name)
|
|
|
return
|
|
|
}
|
|
|
if (res.data.code == 518) {
|
|
|
- console.log(res.data.msg)
|
|
|
+
|
|
|
let name = 'gobeyond'
|
|
|
this.tipss(res, name)
|
|
|
return
|
|
|
}
|
|
|
if (res.data.code == 519) {
|
|
|
- console.log(res.data.msg)
|
|
|
+
|
|
|
let name = 'notallow'
|
|
|
this.tipss(res, name)
|
|
|
return
|
|
|
}
|
|
|
if (res.data.code == 500) {
|
|
|
- console.log(res.data.msg)
|
|
|
+
|
|
|
let name = 'error'
|
|
|
this.tipss(res, name)
|
|
|
return
|
|
|
}
|
|
|
if (res.data.code == 0) {
|
|
|
- console.log(res)
|
|
|
+
|
|
|
this.res = res
|
|
|
- console.log(res.data.data[0].isRegular)
|
|
|
+
|
|
|
for (let i = 0; i < this.lisi.length; i++) {
|
|
|
if (this.lisi[i].tireNumber == res.data.data[0].tirenumber) {
|
|
|
- console.log(res)
|
|
|
+
|
|
|
let err = {
|
|
|
"data": {
|
|
|
"msg": "请勿重复扫码",
|
|
|
}
|
|
|
}
|
|
|
- console.log(err.data.msg)
|
|
|
+
|
|
|
let name = 'repeatcode'
|
|
|
this.tipss(err, name)
|
|
|
return
|
|
|
@@ -506,7 +506,7 @@
|
|
|
}
|
|
|
this.container_s()
|
|
|
}
|
|
|
- // console.log(this.lisi)
|
|
|
+ //
|
|
|
}).catch(err => {
|
|
|
if (err.code == 400) { //谁给我删了......
|
|
|
this.$refs.repeat.show({
|
|
|
@@ -522,7 +522,7 @@
|
|
|
})
|
|
|
this.repeated()
|
|
|
}
|
|
|
- console.log(err)
|
|
|
+
|
|
|
})
|
|
|
.finally(() => {
|
|
|
// Loading.close()
|
|
|
@@ -531,11 +531,11 @@
|
|
|
},
|
|
|
container_s() {
|
|
|
this.show_d = false
|
|
|
- console.log(this.show_s)
|
|
|
- console.log("什么????")
|
|
|
+
|
|
|
+
|
|
|
this.number_s = ''
|
|
|
- console.log("我成功啦")
|
|
|
- console.log(this.res_s)
|
|
|
+
|
|
|
+
|
|
|
|
|
|
this.lisi.push({
|
|
|
specs: this.res_s.data.data[0].specs,
|
|
|
@@ -551,16 +551,16 @@
|
|
|
plyRating: this.res_s.data.data[0].plyRating,
|
|
|
scanWay: '1'
|
|
|
})
|
|
|
- console.log(this.lisi)
|
|
|
+
|
|
|
const innerAudioContext = uni.createInnerAudioContext();
|
|
|
innerAudioContext.autoplay = true;
|
|
|
innerAudioContext.src = '../../../static/mp3/scansuccess.mp3';
|
|
|
innerAudioContext.onPlay(() => {
|
|
|
- console.log('开始播放');
|
|
|
+
|
|
|
});
|
|
|
innerAudioContext.onError((res) => {
|
|
|
- console.log(res.errMsg);
|
|
|
- console.log(res.errCode);
|
|
|
+
|
|
|
+
|
|
|
});
|
|
|
this.$refs.repeat.show({
|
|
|
title: '扫码成功',
|
|
|
@@ -569,11 +569,11 @@
|
|
|
})
|
|
|
},
|
|
|
confirm(index) {
|
|
|
- console.log(index + "什么情况")
|
|
|
+
|
|
|
this.lisi.splice(index, 1)
|
|
|
},
|
|
|
scancodein() {
|
|
|
- console.log("1111")
|
|
|
+
|
|
|
if (this.lisi == '') {
|
|
|
this.$refs.repeat.show({
|
|
|
title: '请扫码或录入后再点击!',
|
|
|
@@ -581,7 +581,7 @@
|
|
|
position: 'bottom'
|
|
|
})
|
|
|
} else {
|
|
|
- console.log("1111")
|
|
|
+
|
|
|
this.$u.route({
|
|
|
type: 'redirectTo',
|
|
|
url: 'pages/home/Scan-code-out/index'
|
|
|
@@ -596,11 +596,11 @@
|
|
|
innerAudioContext.autoplay = true;
|
|
|
innerAudioContext.src = '../../../static/mp3/rescan.mp3';
|
|
|
innerAudioContext.onPlay(() => {
|
|
|
- console.log('开始播放');
|
|
|
+
|
|
|
});
|
|
|
innerAudioContext.onError((res) => {
|
|
|
- console.log(res.errMsg);
|
|
|
- console.log(res.errCode);
|
|
|
+
|
|
|
+
|
|
|
});
|
|
|
}
|
|
|
}
|