private function getFwResual($ecid, $fwCode)
 {
     $companyInfo = $this->getCompanyInfo($ecid);
     $options = array('ecid' => $ecid, 'api_user' => $companyInfo['mxt_api'], 'api_psw' => $companyInfo['mxt_psw'], 'fwCode' => $fwCode, 'type' => 'web', 'isJewelryCheck' => false);
     $mxt = new MxtClient($options);
     $result = $mxt->FwCheck($fwCode);
     $fwParams = $mxt->getFwParams();
     $img = "";
     if (substr($companyInfo['company_logo'], 0, 4) != "http") {
         $img = "http://v5.msa12365.com" . $companyInfo['company_logo'];
     }
     $jsonArr = array("status" => 0, "title" => "市场监管防伪验证", "content" => $result["replyContent"], "img" => $img, "link" => "http://www.sz12365.net/mb/?from=weixin&fw=" . $fwCode);
     return $jsonArr;
 }
 /**
  * 防伪验证
  *
  * @return Array
  */
 private function fwCheck($fwCode)
 {
     $options = array('ecid' => $this->companyInfo['ecid'], 'api_user' => $this->companyInfo['mxt_api'], 'api_psw' => $this->companyInfo['mxt_psw'], 'OpenId' => $this->wechatMsg['FromUserName'], 'fwCode' => $fwCode, 'type' => 'wechat', 'isJewelryCheck' => $this->isJewelryCheckCompany());
     $mxt = new MxtClient($options);
     $result = $mxt->FwCheck($fwCode);
     $fwParams = $mxt->getFwParams();
     $addResponse = '';
     if (!$mxt->getJewelryCheck() && $fwParams['CheckCount'] >= 0) {
         $activity = new \Weixin\Activity\ActivityResponse($this->companyInfo, $this->wechatMsg);
         if ($activity->hasActivity()) {
             if ($activity->hasFwLucky($fwParams)) {
                 $addResponse = $activity->getResponse();
             }
             if ($addResponse == '') {
                 if ($activity->hasGeneralActivity()) {
                     $addResponse = $activity->getResponse();
                 }
             }
         }
     }
     if ($addResponse) {
         $result['content'] = array_merge($result['content'], $addResponse);
     }
     //查询是否需要添加产品广告
     return $result;
 }
 /**
  * wlcodeInfo 物流码绑定信息弹窗
  */
 public function wlcodeInfo()
 {
     $code = I('post.code');
     if (strlen($code) == 20) {
         $ecid = session($this->_userCfg['ECID']);
         $companyInfo = $this->getCompanyInfo($ecid);
         $options = array('ecid' => $ecid, 'api_user' => $companyInfo['mxt_api'], 'api_psw' => $companyInfo['mxt_psw'], 'OpenId' => '', 'fwCode' => $code, 'type' => 'web');
         $mxt = new MxtClient($options);
         $mxt->FwCheck($code);
         $code = $mxt->getWlcode();
     }
     $result = M("Company_" . session($this->_userCfg['ECID']) . "_wl_info")->where("wlCode = '" . $code . "'")->find();
     if ($result['productId'] != "") {
         $result['product'] = M("Company_product")->where("id = '" . $result['productId'] . "'")->getField('name');
     }
     if ($result['SellerId'] != "") {
         $result['seller'] = M("Company_dealers")->where("id = '" . $result['SellerId'] . "'")->getField('name');
     }
     //获取操作人名称
     $result['user'] = M("User_info")->where("id = '" . $result['modifyUserId'] . "'")->getField('user_name');
     $this->assign("wlcode", $code);
     $this->assign('info', $result);
     $this->display();
 }