|
@@ -48,7 +48,8 @@
|
|
uni.scanCode({
|
|
uni.scanCode({
|
|
success: (res) => {
|
|
success: (res) => {
|
|
try{
|
|
try{
|
|
- let d = JSON.parse(res.result);
|
|
|
|
|
|
+ let r = res.result.replace(/^\uFEFF/, '');
|
|
|
|
+ let d = JSON.parse(r);
|
|
if(!d.hasOwnProperty('skuId')||!d){
|
|
if(!d.hasOwnProperty('skuId')||!d){
|
|
this.$showToast('请扫描正确的商品二维码');
|
|
this.$showToast('请扫描正确的商品二维码');
|
|
return
|
|
return
|