diff --git a/webapp/controller/BaseController.class.php b/webapp/controller/BaseController.class.php index 8a211f92..2c0d476f 100644 --- a/webapp/controller/BaseController.class.php +++ b/webapp/controller/BaseController.class.php @@ -51,6 +51,13 @@ class BaseController { return phpcommon\getMondaySeconds($this->_getNowTime(), $this->timeZone); } + public function _getZid() + { + $net = getReqVal('_net', ''); + $zid = $net && count($net) > 3 ? $net[2] : 3; + return $zid < 1 || $zid > 4 ? 3 : $zid; + } + public function _rspErr($errcode, $errmsg) { echo json_encode(array( diff --git a/webapp/controller/TeamController.class.php b/webapp/controller/TeamController.class.php index 58fc2476..b5e28aeb 100644 --- a/webapp/controller/TeamController.class.php +++ b/webapp/controller/TeamController.class.php @@ -10,7 +10,10 @@ class TeamController extends BaseAuthedController { public function createTeam() { $nodeId = getReqVal('node_id', 1); - $teamUuid = $nodeId . '_' . md5($this->_getAccountId() . $this->_getNowTime()); + $zid = myself()->_getZid(); + $teamUuid = $nodeId . '_' . + $zid . '_' . + md5($this->_getAccountId() . $this->_getNowTime()); $userDb = $this->_getOrmUserInfo(); $userDto = User::info($userDb);