|
|
@@ -271,6 +271,7 @@ TRUNCATE xhUserByDay;";
|
|
|
|
|
|
/**
|
|
|
* 初始化 花卉宝 的行政区划
|
|
|
+ * ./yii init/district
|
|
|
*/
|
|
|
public function actionDistrict()
|
|
|
{
|
|
|
@@ -292,7 +293,7 @@ TRUNCATE xhUserByDay;";
|
|
|
$fullname = $oneVal['fullname'];
|
|
|
$lat = (string)$oneVal['location']['lat'];
|
|
|
$lng = (string)$oneVal['location']['lng'];
|
|
|
- $oneData = ['districtId' => $topId, 'shortName' => $name, 'fullName' => $fullname, 'locationLat' => $lat, 'locationLng' => $lng, 'parentId' => 0];
|
|
|
+ $oneData = ['districtId' => $topId, 'name' => $name, 'fullName' => $fullname, 'locationLat' => $lat, 'locationLng' => $lng, 'parentId' => 0];
|
|
|
echo "<p>1级菜单:</p>\n";
|
|
|
print_r($oneData);
|
|
|
echo "\n";
|
|
|
@@ -308,7 +309,7 @@ TRUNCATE xhUserByDay;";
|
|
|
$fullname = $twoVal['fullname'];
|
|
|
$lat = (string)$twoVal['location']['lat'];
|
|
|
$lng = (string)$twoVal['location']['lng'];
|
|
|
- $twoData = ['districtId' => $id, 'shortName' => $name, 'fullName' => $fullname, 'locationLat' => $lat, 'locationLng' => $lng, 'parentId' => $oneObj['id']];
|
|
|
+ $twoData = ['districtId' => $id, 'name' => $name, 'fullName' => $fullname, 'locationLat' => $lat, 'locationLng' => $lng, 'parentId' => $oneObj['id']];
|
|
|
echo $xx;
|
|
|
print_r($twoData);
|
|
|
echo "\n";
|
|
|
@@ -324,7 +325,7 @@ TRUNCATE xhUserByDay;";
|
|
|
$fullname = $threeVal['fullname'];
|
|
|
$lat = (string)$threeVal['location']['lat'];
|
|
|
$lng = (string)$threeVal['location']['lng'];
|
|
|
- $threeData = ['districtId' => $id, 'shortName' => $name, 'fullName' => $fullname, 'locationLat' => $lat, 'locationLng' => $lng, 'parentId' => $twoObj['id']];
|
|
|
+ $threeData = ['districtId' => $id, 'name' => $name, 'fullName' => $fullname, 'locationLat' => $lat, 'locationLng' => $lng, 'parentId' => $twoObj['id']];
|
|
|
$threeObj = xhDistrict::add($threeData);
|
|
|
echo $incr;
|
|
|
print_r($threeData);
|