|
@@ -76,11 +76,11 @@
|
|
|
innerAudioContext.autoplay = true;
|
|
|
innerAudioContext.src = '../../../static/mp3/startscan.mp3';
|
|
|
innerAudioContext.onPlay(() => {
|
|
|
- console.log('开始播放');
|
|
|
+ console.log('开始播放');
|
|
|
});
|
|
|
innerAudioContext.onError((res) => {
|
|
|
- console.log(res.errMsg);
|
|
|
- console.log(res.errCode);
|
|
|
+ console.log(res.errMsg);
|
|
|
+ console.log(res.errCode);
|
|
|
});
|
|
|
},
|
|
|
methods: {
|
|
@@ -90,8 +90,8 @@
|
|
|
url: '/storeScan/storeScanGetTyre',
|
|
|
method: 'Post',
|
|
|
data: {
|
|
|
- storeId:this.$store.state.storeInfo.storeId,
|
|
|
- userId:this.$store.state.storeInfo.userId,
|
|
|
+ storeId: this.$store.state.storeInfo.storeId,
|
|
|
+ userId: this.$store.state.storeInfo.userId,
|
|
|
tyreNum: this.number_a
|
|
|
}
|
|
|
}).then(res => {
|
|
@@ -113,7 +113,7 @@
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
- if (res.data.code == 500){
|
|
|
+ if (res.data.code == 500) {
|
|
|
this.$refs.repeat.show({
|
|
|
title: res.data.msg,
|
|
|
type: 'default',
|
|
@@ -121,7 +121,7 @@
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
this.$refs.repeat.show({
|
|
|
title: '录入成功',
|
|
|
type: 'success',
|
|
@@ -165,8 +165,8 @@
|
|
|
url: '/storeScan/storeScanGetTyre',
|
|
|
method: 'Post',
|
|
|
data: {
|
|
|
- storeId:this.$store.state.storeInfo.storeId,
|
|
|
- userId:this.$store.state.storeInfo.userId,
|
|
|
+ storeId: this.$store.state.storeInfo.storeId,
|
|
|
+ userId: this.$store.state.storeInfo.userId,
|
|
|
tyreNum: this.number_s
|
|
|
}
|
|
|
}).then(res => {
|
|
@@ -178,20 +178,11 @@
|
|
|
type: 'default',
|
|
|
position: 'bottom'
|
|
|
})
|
|
|
- const innerAudioContext = uni.createInnerAudioContext();
|
|
|
- innerAudioContext.autoplay = true;
|
|
|
- innerAudioContext.src = '../../../static/mp3/rescan.mp3';
|
|
|
- innerAudioContext.onPlay(() => {
|
|
|
- console.log('开始播放');
|
|
|
- });
|
|
|
- innerAudioContext.onError((res) => {
|
|
|
- console.log(res.errMsg);
|
|
|
- console.log(res.errCode);
|
|
|
- });
|
|
|
+ this.repeated()
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
- if (res.data.code == 500){
|
|
|
+ if (res.data.code == 500) {
|
|
|
this.$refs.repeat.show({
|
|
|
title: res.data.msg,
|
|
|
type: 'default',
|
|
@@ -201,18 +192,18 @@
|
|
|
innerAudioContext.autoplay = true;
|
|
|
innerAudioContext.src = '../../../static/mp3/scanfailed.mp3';
|
|
|
innerAudioContext.onPlay(() => {
|
|
|
- console.log('开始播放');
|
|
|
+ console.log('开始播放');
|
|
|
});
|
|
|
innerAudioContext.onError((res) => {
|
|
|
- console.log(res.errMsg);
|
|
|
- console.log(res.errCode);
|
|
|
+ console.log(res.errMsg);
|
|
|
+ console.log(res.errCode);
|
|
|
});
|
|
|
return
|
|
|
}
|
|
|
this.number_s = ""
|
|
|
console.log("我成功啦")
|
|
|
console.log(res)
|
|
|
-
|
|
|
+
|
|
|
this.lisi.push({
|
|
|
specs: res.data.data[0].specs,
|
|
|
flagRegular: res.data.data[0].isRegular,
|
|
@@ -231,11 +222,11 @@
|
|
|
innerAudioContext.autoplay = true;
|
|
|
innerAudioContext.src = '../../../static/mp3/scansuccess.mp3';
|
|
|
innerAudioContext.onPlay(() => {
|
|
|
- console.log('开始播放');
|
|
|
+ console.log('开始播放');
|
|
|
});
|
|
|
innerAudioContext.onError((res) => {
|
|
|
- console.log(res.errMsg);
|
|
|
- console.log(res.errCode);
|
|
|
+ console.log(res.errMsg);
|
|
|
+ console.log(res.errCode);
|
|
|
});
|
|
|
this.$refs.repeat.show({
|
|
|
title: '扫码成功',
|
|
@@ -256,6 +247,7 @@
|
|
|
type: 'default',
|
|
|
position: 'bottom'
|
|
|
})
|
|
|
+ this.repeated()
|
|
|
}
|
|
|
console.log(err)
|
|
|
})
|
|
@@ -276,7 +268,7 @@
|
|
|
})
|
|
|
} else {
|
|
|
this.$u.route({
|
|
|
- type:'redirectTo',
|
|
|
+ type: 'redirectTo',
|
|
|
url: 'pages/home/Scan-code-in/index'
|
|
|
})
|
|
|
uni.$emit('update', {
|
|
@@ -284,6 +276,18 @@
|
|
|
})
|
|
|
this.lisi = []
|
|
|
}
|
|
|
+ },
|
|
|
+ repeated() {
|
|
|
+ const innerAudioContext = uni.createInnerAudioContext();
|
|
|
+ innerAudioContext.autoplay = true;
|
|
|
+ innerAudioContext.src = '../../../static/mp3/rescan.mp3';
|
|
|
+ innerAudioContext.onPlay(() => {
|
|
|
+ console.log('开始播放');
|
|
|
+ });
|
|
|
+ innerAudioContext.onError((res) => {
|
|
|
+ console.log(res.errMsg);
|
|
|
+ console.log(res.errCode);
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
}
|