Commit 13aef493 authored by zhuwei's avatar zhuwei

商铺分享 记录

parent 96dee5e7
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
namespace app\index\controller; namespace app\index\controller;
use app\api\controller\WxSdk; use app\api\controller\WxSdk;
use app\api\service\UserLookShopService;
use app\api\untils\WxCallbackUntils; use app\api\untils\WxCallbackUntils;
use app\index\extend\Basic; use app\index\extend\Basic;
use app\index\service\UserService; use app\index\service\UserService;
...@@ -60,9 +61,14 @@ class ShareShop extends Basic ...@@ -60,9 +61,14 @@ class ShareShop extends Basic
$wxInfoObj = $this->wxInfoModel->getWxInfoByOpenId($wx_union_id); $wxInfoObj = $this->wxInfoModel->getWxInfoByOpenId($wx_union_id);
if ($wxInfoObj && count($wxInfoObj) > 0) { if ($wxInfoObj && count($wxInfoObj) > 0) {
$userInfo["id"] = $wxInfoObj[0]["id"]; $userInfo["id"] = $wxInfoObj[0]["id"];
$id = $this->wxInfoModel->updateWxInfo($userInfo); $this->wxInfoModel->updateWxInfo($userInfo);
$s_user_look_shop = new UserLookShopService();
if(isset($params['id']) && $params['id'] > 0){
$s_user_look_shop->saveUserLookShop($wxInfoObj[0]["id"],$params['id'],3,1);
}
} else { } else {
$id = $this->wxInfoModel->addWxInfo($userInfo); $this->wxInfoModel->addWxInfo($userInfo);
} }
$params['is_user'] = $is_user; $params['is_user'] = $is_user;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment