/** * Finds the Region model based on its primary key value. * If the model is not found, a 404 HTTP exception will be thrown. * @param integer $id * @return Region the loaded model * @throws NotFoundHttpException if the model cannot be found */ protected function findModel($id) { if (($model = Region::findOne($id)) !== null) { return $model; } else { throw new NotFoundHttpException('The requested page does not exist.'); } }
?> </td> </tr> <tr> <td class="tl">收货地址:</td> <td> <?php echo $model->country ? Region::findOne($model->country)->name : ''; ?> <?php echo $model->province ? Region::findOne($model->province)->name : ''; ?> <?php echo $model->city ? Region::findOne($model->city)->name : ''; ?> <?php echo $model->district ? Region::findOne($model->district)->name : ''; ?> <?php echo $model->address; ?> (<?php echo $model->mobile; ?> ) <p><a class="graybtn" target="_blank" href="<?php echo Yii::$app->urlManager->createUrl(['/order']); ?> ">进入我的订单</a></p></td> </tr> </tbody> </table>
"><i class="glyphicon glyphicon-map-marker"></i></a></td> <td><?php echo $item->consignee; ?> </td> <td><?php echo $item->country ? Region::findOne($item->country)->name : ''; ?> <?php echo $item->province ? Region::findOne($item->province)->name : ''; ?> <?php echo $item->city ? Region::findOne($item->city)->name : ''; ?> <?php echo $item->district ? Region::findOne($item->district)->name : ''; ?> </td> <td><?php echo $item->address; ?> </td> <td><?php echo $item->mobile; ?> </td> <td class="setup"><a class="update" href="<?php echo Yii::$app->urlManager->createUrl(['address/update', 'id' => $item->id]); ?> ">修改</a> | <a class="delete" href="<?php echo Yii::$app->urlManager->createUrl(['address/delete', 'id' => $item->id]);