|
@@ -40,39 +40,7 @@ class PublicController
|
|
|
|
|
|
|
|
public function test(Request $request)
|
|
public function test(Request $request)
|
|
|
{
|
|
{
|
|
|
-// BaseModel::beginTrans();
|
|
|
|
|
-// try {
|
|
|
|
|
-// $uid = $request->post('uid');
|
|
|
|
|
-// $res = TreeRecommend::insertTree($uid, User::where('uid', $uid)->value('spread_uid'));
|
|
|
|
|
-// $res = $res && self::pinkIntegral($uid);
|
|
|
|
|
-// $res = $res && self::pinkRecommend($uid);
|
|
|
|
|
-// if ($res) {
|
|
|
|
|
-// BaseModel::commitTrans();
|
|
|
|
|
-// return app('json')->success('成功');
|
|
|
|
|
-// } else {
|
|
|
|
|
-// BaseModel::rollbackTrans();
|
|
|
|
|
-// return app('json')->fail('失败');
|
|
|
|
|
-// }
|
|
|
|
|
-// } catch (Exception $e) {
|
|
|
|
|
-// BaseModel::rollbackTrans();
|
|
|
|
|
-// return app('json')->fail($e->getMessage());
|
|
|
|
|
-// }
|
|
|
|
|
- $province = SystemCity::where('parent_id', 0)->where('level', 0)->select();
|
|
|
|
|
- $res = [];
|
|
|
|
|
- foreach ($province as $v) {
|
|
|
|
|
- $city = SystemCity::where('parent_id', $v['city_id'])->where('level', 1)->select();
|
|
|
|
|
- $citys = [];
|
|
|
|
|
- foreach ($city as $vv) {
|
|
|
|
|
- $children = SystemCity::where('parent_id', $vv['city_id'])->where('level', 2)->select();
|
|
|
|
|
- $dis = [];
|
|
|
|
|
- foreach ($children as $vvv) {
|
|
|
|
|
- $dis[] = ['value' => $vvv['name'], 'label' => $vvv['name']];
|
|
|
|
|
- }
|
|
|
|
|
- $citys[] = ['value' => $vv['name'], 'label' => $vv['name'], 'children' => $dis];
|
|
|
|
|
- }
|
|
|
|
|
- $res[] = ['value' => $v['name'], 'label' => $v['name'], 'children' => $citys];
|
|
|
|
|
- }
|
|
|
|
|
- @file_put_contents('city.js', 'window.province_city_area=' . json_encode($res));
|
|
|
|
|
|
|
+ StoreOrder::monthAward();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public static function pinkIntegral($uid)
|
|
public static function pinkIntegral($uid)
|