Commit 104358db authored by 李文起's avatar 李文起
Browse files

Merge branch 'hotfix/v1.2.4.15' into 'master'

切换热点修复bug

See merge request !40
parents 206d7ce6 a38103cf
Showing with 12 additions and 7 deletions
+12 -7
......@@ -12,12 +12,14 @@ class SwitchHotspot extends HotspotAction
*/
public function actionData(){
$sceneId = $this->getSceneIdByFrontId($this->data['actionData']['sceneId']);
if ($sceneId) {
if (!empty($this->data['actionData']['sceneId'])) {
$this->returnData['action_data'] = json_encode(['scene_id'=>$sceneId]);
}
$sceneId = $this->getSceneIdByFrontId($this->data['actionData']['sceneId']);
if ($sceneId) {
$this->returnData['action_data'] = json_encode(['scene_id'=>$sceneId]);
}
}
}
/**
......@@ -25,10 +27,13 @@ class SwitchHotspot extends HotspotAction
*/
public function onclick(){
$sceneId = $this->getSceneIdByFrontId($this->data['actionData']['sceneId']);
if ($sceneId) {
if (!empty($this->data['actionData']['sceneId'])) {
$sceneId = $this->getSceneIdByFrontId($this->data['actionData']['sceneId']);
if ($sceneId) {
$this->returnData['onclick'] = 'loadscene(scene_' .$sceneId. ');';
$this->returnData['onclick'] = 'loadscene(scene_' . $sceneId . ');';
}
}
return $this;
......
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