|
@@ -43,10 +43,15 @@ class Resp extends Object_ext {
|
|
|
* 实例方法, 将静态变量上累积的数据转移到自己身上
|
|
|
*/
|
|
|
public function AfterProc() {
|
|
|
- $this->tag = arr2obj(array_merge((array) $this->tag, (array) self::$ext_tag)); # 合并附加tag,
|
|
|
+ $this->tag = arr2obj(array_merge((array) $this->tag, (array) self::$ext_tag)); # 合并附加tag,
|
|
|
self::$ext_tag = ObjectInit();
|
|
|
$this->events = self::$ext_events;
|
|
|
self::$ext_events = array();
|
|
|
+ if (count($this->events) > 0) {
|
|
|
+ if (!array_key_exists('store', (array) $this->result)) {
|
|
|
+ $this->result['store'] = req()->userInfo->game->store;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -58,7 +63,7 @@ class Resp extends Object_ext {
|
|
|
public static function ok($ret = null) {
|
|
|
$resp = new Resp();
|
|
|
$resp->err = ErrCode::ok;
|
|
|
- $resp->result = $ret == null ? ObjectInit() : $ret; # 避免出现null
|
|
|
+ $resp->result = $ret == null ? ObjectInit() : $ret; # 避免出现null
|
|
|
$resp->ts = time();
|
|
|
$resp->tag = ObjectInit();
|
|
|
return $resp;
|