public function getGiftboxCategory() { return $this->hasOne(GiftboxCategory::className(), ['id' => 'category_id']); }
</li> <?php } ?> </ul> </div> </div> <script type="text/javascript"> var SHAKE_THRESHOLD = 800; var last_update = 0; var giftbox_categories = [<?php echo implode(',', \app\models\GiftboxCategory::getRemainingList()); ?> ]; var select_giftbox = 0; var x = y = z = last_x = last_y = last_z = 0; function yaoyiyao() { if (window.DeviceMotionEvent) { window.addEventListener('devicemotion', deviceMotionHandler, false); } else { alert('not support mobile event'); } } function deviceMotionHandler(eventData) { var acceleration = eventData.accelerationIncludingGravity;