Authored by cailing

RPC换接口

@@ -224,10 +224,10 @@ class BrandData @@ -224,10 +224,10 @@ class BrandData
224 * @modify sefon 2016-4-29 01:59:23 224 * @modify sefon 2016-4-29 01:59:23
225 * @return array 225 * @return array
226 */ 226 */
227 - public static function getBrandLogoByDomain($domain)  
228 - {  
229 - return Yohobuy::yarClient(Yohobuy::SERVICE_URL . '/shops/service/v1/brand', 'getBrandByDomain', array($domain));  
230 - } 227 +// public static function getBrandLogoByDomain($domain)
  228 +// {
  229 +// return Yohobuy::yarClient(Yohobuy::SERVICE_URL . '/shops/service/v1/brand', 'getBrandByDomain', array($domain));
  230 +// }
231 231
232 /** 232 /**
233 * 根据品牌域名获取品牌店铺信息 233 * 根据品牌域名获取品牌店铺信息
@@ -123,12 +123,27 @@ class ActivityData @@ -123,12 +123,27 @@ class ActivityData
123 * @param string $call_back 123 * @param string $call_back
124 * @return array 124 * @return array
125 */ 125 */
  126 +// public static function message($uid, $title, $content, $type = 1, $verify_key = '', $send_uid = 0, $call_back = '')
  127 +// {
  128 +// //调用接口发送站内信
  129 +// return Yohobuy::yarClient(Yohobuy::SERVICE_URL . self::URI_SEND_MESSAGE, 'setSingleMessage', array(
  130 +// $uid, $title, $content, $type, $verify_key, $send_uid, $call_back
  131 +// ));
  132 +// }
126 public static function message($uid, $title, $content, $type = 1, $verify_key = '', $send_uid = 0, $call_back = '') 133 public static function message($uid, $title, $content, $type = 1, $verify_key = '', $send_uid = 0, $call_back = '')
127 { 134 {
128 - //调用接口发送站内信  
129 - return Yohobuy::yarClient(Yohobuy::SERVICE_URL . self::URI_SEND_MESSAGE, 'setSingleMessage', array(  
130 - $uid, $title, $content, $type, $verify_key, $send_uid, $call_back  
131 - )); 135 + $param = array();
  136 + $param = Yohobuy::param();
  137 + $param['method'] = 'web.inbox.setSingleMessage';
  138 + $param['uid'] = $uid;
  139 + $param['send_uid'] = $send_uid;
  140 + $param['verify_key'] = $verify_key;
  141 + $param['content'] = $content;
  142 + $param['title'] = $title;
  143 + $param['type'] = $type;
  144 + $param['client_secret'] = Sign::getSign($param);
  145 +
  146 + return Yohobuy::post(Yohobuy::API_URL, $param);
132 } 147 }
133 148
134 /** 149 /**