dever 3 年之前
父节点
当前提交
6fb626113f
共有 2 个文件被更改,包括 20 次插入1 次删除
  1. 19 0
      app/shop/src/Main.php
  2. 1 1
      app/shop/src/My.php

+ 19 - 0
app/shop/src/Main.php

@@ -85,6 +85,25 @@ class Main extends Core
         return $this->data;
     }
 
+    # 获取店铺单个信息
+    public function getShopOne()
+    {
+        $city = Dever::input('city');
+        $lng = Dever::input('lng');
+        $lat = Dever::input('lat');
+        $name = Dever::input('name');
+        $shop_id = Dever::input('shop_id');
+        $address = Dever::input('address');
+
+        # 获取门店
+        $this->data['shop'] = array();
+        if ($city) {
+            $this->data['shop'] = Dever::load('shop/lib/info')->get($city, $lng, $lat, $name, 'fetch', $shop_id, $address);
+        }
+
+        return $this->data;
+    }
+
     # 根据店铺获取商品列表
     public function getGoods()
     {

+ 1 - 1
app/shop/src/My.php

@@ -18,7 +18,7 @@ class My extends Core
 		$this->data['user'] = $this->user;
 
 		# 获取拥有的优惠券数量
-		$this->data['coupon_num'] = Dever::db('shop/user_coupon')->total(array('uid' => $this->uid));
+		$this->data['coupon_num'] = Dever::db('shop/user_coupon')->total(array('uid' => $this->uid, 'status' => 1));
 
 		$this->data['card_num'] = Dever::db('goods/card_code')->total(array('uid' => $this->uid));