lrf402788946 3 лет назад
Родитель
Сommit
945133bf74
1 измененных файлов с 6 добавлено и 1 удалено
  1. 6 1
      pages/home/index.js

+ 6 - 1
pages/home/index.js

@@ -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,