Преглед на файлове

wesmiler 报恩寺项目

wesmiler преди 4 години
родител
ревизия
688c726b86
променени са 1 файла, в които са добавени 3 реда и са изтрити 0 реда
  1. 3 0
      app/Models/GongdengFoxiangModel.php

+ 3 - 0
app/Models/GongdengFoxiangModel.php

@@ -38,6 +38,9 @@ class GongdengFoxiangModel extends BaseModel
             if ($info['thumb']) {
                 $info['thumb'] = get_image_url($info['thumb']);
             }
+            if($info['price']){
+                $info['price'] = intval($info['price']) == $info['price']? intval($info['price']) : $info['price'];
+            }
         }
         return $info;
     }