|
@@ -176,6 +176,12 @@ Page({
|
|
|
success: (res) => {
|
|
|
if (res.data.errcode === 0) {
|
|
|
const { data } = res.data
|
|
|
+ if (!data) {
|
|
|
+ this.setData({
|
|
|
+ thrList: [],
|
|
|
+ })
|
|
|
+ return;
|
|
|
+ }
|
|
|
this.initQrCode(data.data._id)
|
|
|
this.setData({
|
|
|
thrList: data.data.list || [],
|
|
@@ -190,7 +196,6 @@ Page({
|
|
|
},
|
|
|
initQrCode(id) {
|
|
|
const url = `${app.globalData.publicUrl}/api/st/dining/order/useMeal/${id}?_tenant=${app.globalData.tenant}`;
|
|
|
- console.log(url);
|
|
|
var qrcode = new QRCode(`myQrcode`, {
|
|
|
text: url,
|
|
|
width: 130,
|