Forráskód Böngészése

保护默认餐馆

maguohua 7 éve
szülő
commit
c217669f13
1 módosított fájl, 7 hozzáadás és 0 törlés
  1. 7 0
      controller/shopping/shop.js

+ 7 - 0
controller/shopping/shop.js

@@ -442,6 +442,13 @@ class Shop extends AddressComponent{
 			})
 			return 
 		}
+		if (restaurant_id == 1) {
+				res.send({
+					status: 0,
+					message: '此店铺用做展示,请不要删除'
+				})
+				return
+			}
 		try{
 			await ShopModel.remove({id: restaurant_id});
 			res.send({