UserGoodSendController.php 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653
  1. <?php
  2. namespace App\Http\Controllers;
  3. use App\Events\ReturnGoodLog;
  4. use App\Events\SendGoodLogEvent;
  5. use App\Models\GoodSelect;
  6. use App\Models\ScanStorageLog;
  7. use App\Models\Select;
  8. use App\Models\Sell;
  9. use App\Models\SendGoodLog;
  10. use App\Models\User;
  11. use App\Models\UserStorage;
  12. use Carbon\Carbon;
  13. use Illuminate\Support\Facades\Auth;
  14. use Illuminate\Support\Facades\DB;
  15. use Illuminate\Support\Facades\Log;
  16. use Illuminate\Http\Request;
  17. use Illuminate\Support\Facades\Validator;
  18. class UserGoodSendController extends Controller{
  19. /**代理发货**/
  20. public function user_send_good(Request $request)
  21. {
  22. $code = urldecode($request->code);
  23. // $rule = [
  24. // 'id' => 'required'
  25. // ];
  26. // $message = [
  27. // 'id.required' => '缺少必填项(id)'
  28. // ];
  29. // $va = Validator::make($request->all(), $rule, $message);
  30. // if ($va->fails()) {
  31. // return $this->error(50023, '', $va->errors()->first());
  32. // }
  33. DB::beginTransaction();
  34. try {
  35. $user = Auth::user();
  36. $users = User::find($user->id);
  37. $code=trim($code);
  38. $re = Select::where('code', $code)->first();
  39. if (!$re){
  40. return $this->error(500214,'','暂未找到相应的信息');
  41. }
  42. if ($re->is_true == 1) {
  43. return $this->error(40028, '', '当前货物为假货,不能进行退货处理');
  44. }
  45. if ($re->com_binding == 1) {
  46. return $this->error(40028, '', '当前货物为没有与公司绑定,不能进行发货处理');
  47. }
  48. //先判断当前二维码能否进行发货
  49. if ($re->is_full == 1) {
  50. return $this->error(50021, '', '当前二维码中的部分货物已经发货,不能使用此码进行发货');
  51. }
  52. // if ($request->id == $user->id) {
  53. // return $this->error(50021, '', '不能对自己进行发货操作');
  54. // }
  55. $code_level=0;
  56. $code_num=0;
  57. if ($re->is_lowest != 1) {
  58. //中码或者大码进行发货
  59. if ($re->pid == 0 && is_numeric($re->pid)) {//不能使用大码进行发货
  60. return $this->error(50021, '', '请使用中码或者小码发货'.$re->pid);
  61. }
  62. if ($user->level!=3){
  63. return $this->error(50021, '', '请使用小码进行发货');
  64. }
  65. $code_level=1;
  66. $code_num=$re->child_num;
  67. }
  68. //判断当前二维码的是不是最低级
  69. // if ($re->is_lowest == 1) {
  70. // $re->track_status = 2;
  71. // $re->user_id = $request->id;
  72. // if (!$re->save()) {
  73. // throw new \Exception('1');
  74. // }
  75. // $user_s = User::find($request->id);
  76. // $data = [
  77. // 'op_name' => $users->nickname,
  78. // 'op_phone' => $users->mobile,
  79. // 'op_id' => $users->id,
  80. // 'accept_name' => $user_s->nickname,
  81. // 'accept_phone' => $user_s->mobile,
  82. // 'accept_id' => $user_s->id,
  83. // 'type' => 0,
  84. // 'select_id' => $re->id
  85. // ];
  86. // event(new SendGoodLogEvent($data));
  87. // //修改大码和中码状态
  88. // $num = $this->update_full($re->pid);
  89. // if ($num == 300) {
  90. // return $this->error(50021, '', '子码更改信息失败,请重新尝试发货');
  91. // }
  92. // } else {
  93. // //中码或者大码进行发货
  94. // if ($users->level != 3) {//只有经销商能够进行扫码中码或者大码进行发货
  95. // return $this->error(50021, '', '当前等级只能使用小码进行发货');
  96. // }
  97. // $user_s = User::find($request->id);
  98. // //中码发货
  99. // if ($re->level != 1) {
  100. // $re->user_id = $request->id;
  101. // if (!$re->save()) {
  102. // throw new \Exception('1');
  103. // }
  104. // $num = $this->update_full($re->pid);
  105. // if ($num == 300) {
  106. // throw new \Exception(1);
  107. // }
  108. // $data = [
  109. // 'op_name' => $users->nickname,
  110. // 'op_phone' => $users->mobile,
  111. // 'op_id' => $users->id,
  112. // 'accept_name' => $user_s->nickname,
  113. // 'accept_phone' => $user_s->mobile,
  114. // 'accept_id' => $user_s->id,
  115. // 'type' => 0,
  116. // 'select_id' => $re->id
  117. // ];
  118. // event(new SendGoodLogEvent($data));
  119. // $level_data = Select::where('pid', $re->sort)->get();
  120. // foreach ($level_data as $k => $v) {
  121. // $res = Select::where('code', $v->code)->first();
  122. // $res->user_id = $request->id;
  123. // if (!$res->save()) {
  124. // throw new \Exception(1);
  125. // }
  126. // $data = [
  127. // 'op_name' => $users->nickname,
  128. // 'op_phone' => $users->mobile,
  129. // 'op_id' => $users->id,
  130. // 'accept_name' => $user_s->nickname,
  131. // 'accept_phone' => $user_s->mobile,
  132. // 'accept_id' => $user_s->id,
  133. // 'type' => 0,
  134. // 'select_id' => $v->id
  135. // ];
  136. // event(new SendGoodLogEvent($data));
  137. // }
  138. // } else {
  139. //
  140. // /***大码发货,并记录日志情况*/
  141. // $re->user_id = $request->id;
  142. // if (!$re->save()) {
  143. // throw new \Exception('1');
  144. // }
  145. // $data = [
  146. // 'op_name' => $users->nickname,
  147. // 'op_phone' => $users->mobile,
  148. // 'op_id' => $users->id,
  149. // 'accept_name' => $user_s->nickname,
  150. // 'accept_phone' => $user_s->mobile,
  151. // 'accept_id' => $user_s->id,
  152. // 'type' => 0,
  153. // 'select_id' => $re->id
  154. // ];
  155. // event(new SendGoodLogEvent($data));
  156. //
  157. // /**查询**/
  158. // $level_data = Select::where('pid', $re->sort)->get();
  159. // foreach ($level_data as $k => $v) {
  160. // /***修改所有所属者*/
  161. // $res = Select::where('code', $v->code)->first();
  162. // $res->user_id = $request->id;
  163. // if (!$res->save()) {
  164. // throw new \Exception(1);
  165. // }
  166. // $data = [
  167. // 'op_name' => $users->nickname,
  168. // 'op_phone' => $users->mobile,
  169. // 'op_id' => $users->id,
  170. // 'accept_name' => $user_s->nickname,
  171. // 'accept_phone' => $user_s->mobile,
  172. // 'accept_id' => $user_s->id,
  173. // 'type' => 0,
  174. // 'select_id' => $v->id
  175. // ];
  176. // event(new SendGoodLogEvent($data));
  177. //
  178. //
  179. // /**如果现在的等级不是最低级,则执行下面的内容**/
  180. // if ($v->is_lowest != 1) {
  181. // $ress = Select::where('pid', $v->sort)->get();
  182. // foreach ($ress as $ke => $va) {
  183. // $resss = Select::where('code', $va->code)->first();
  184. // $resss->user_id = $request->id;
  185. // if (!$resss->save()) {
  186. // throw new \Exception(1);
  187. // }
  188. // $data = [
  189. // 'op_name' => $users->nickname,
  190. // 'op_phone' => $users->mobile,
  191. // 'op_id' => $users->id,
  192. // 'accept_name' => $user_s->nickname,
  193. // 'accept_phone' => $user_s->mobile,
  194. // 'accept_id' => $user_s->id,
  195. // 'type' => 0,
  196. // 'select_id' => $va->id
  197. // ];
  198. // event(new SendGoodLogEvent($data));
  199. // }
  200. // }
  201. //
  202. //
  203. // }
  204. // }
  205. // }
  206. // DB::commit();
  207. // return $this->success([]);
  208. $codes=$re->good_select_id;
  209. if ($codes==6){
  210. $codes=11;
  211. }elseif ($codes==9){
  212. $codes=6;
  213. }
  214. if ($codes>6){
  215. return $this->error(50021,'','该商品属于赠品,暂时不能发货');
  216. }
  217. Log::info(json_encode(['code'=>$code,'good'=>$re->good_select_id==9?6:$re->good_select_id,'code_level'=>$code_level,'code_num'=>$code_num]));
  218. return $this->success(['code'=>$code,'good'=>$codes,'code_level'=>$code_level,'code_num'=>$code_num]);
  219. } catch (\Exception $exception) {
  220. DB::rollBack();
  221. return $this->error(50024, '', '发货失败,请重新尝试' . $exception);
  222. }
  223. }
  224. //扫码发货减库存日志
  225. public function getScanLog(Request $request){
  226. $page_size=$request->input('page_size');
  227. $page_index=$request->input('page_index');
  228. $start_time=$request->input('start_time');
  229. $end_time=$request->input('end_time');
  230. $search_name=$request->input('search_name');
  231. $num=$page_size*($page_index-1);
  232. $user_id=Auth::user()->id;
  233. $data=ScanStorageLog::with(['user:id,nickname,mobile','accept:id,nickname,mobile'])
  234. ->where('user_id',$user_id)
  235. ->select('user_id','accept_id','rand_code','created_at');
  236. if($start_time && $end_time){
  237. $data->whereBetween('created_at',[$start_time,$end_time]);
  238. }
  239. if($search_name){
  240. $user_ids=User::where(function($query)use($search_name){
  241. $query->where('nickname','like','%'.$search_name.'%')
  242. ->orWhere('mobile','like','%'.$search_name.'%');
  243. })->pluck('id');
  244. $data->whereIn('accept_id',$user_ids);
  245. }
  246. $total=$data->sum('num');
  247. $count=$data->groupBy('rand_code')->get()->count();
  248. $list=$data->groupBy('rand_code')->orderByDesc('created_at')->skip($num)->take($page_size)->get();
  249. foreach($list as $key=>$val){
  250. $types=ScanStorageLog::where('rand_code',$val->rand_code)->where('created_at',$val->created_at)
  251. ->select('type')->groupBy('type')->pluck('type');
  252. $goods=[];
  253. foreach($types as $k=>$v){
  254. switch($v){
  255. case 0:
  256. $goods[$k]['name']='精装版';
  257. break;
  258. case 1:
  259. $goods[$k]['name']='简约版';
  260. break;
  261. case 2:
  262. $goods[$k]['name']='高腰版';
  263. break;
  264. case 3:
  265. $goods[$k]['name']='纯棉版';
  266. break;
  267. case 4:
  268. $goods[$k]['name']='青春版';
  269. break;
  270. case 5:
  271. $goods[$k]['name']='精装赠';
  272. break;
  273. default:
  274. $goods[$k]['name']='规格错误';
  275. }
  276. $goods[$k]['skus']=ScanStorageLog::where('rand_code',$val->rand_code)->where('created_at',$val->created_at)->where('type',$v)
  277. ->select('sex','size','num')
  278. ->orderBy('sex')->get();
  279. }
  280. $list[$key]['goods']=$goods;
  281. }
  282. $info['num']=$total;
  283. $info['info']=$list;
  284. return $this->success_list($info,'',$count);
  285. }
  286. function get_rand( $length = 6 ) {
  287. // 密码字符集,可任意添加你需要的字符
  288. $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_';
  289. $str ='';
  290. for ( $i = 0; $i < $length; $i++ )
  291. {
  292. // 这里提供两种字符获取方式
  293. // 第一种是使用 substr 截取$chars中的任意一位字符;
  294. // 第二种是取字符数组 $chars 的任意元素
  295. // $str .= substr($chars, mt_rand(0, strlen($chars) – 1), 1);
  296. $str .= $chars[ mt_rand(0, strlen($chars) - 1) ];
  297. }
  298. return $str;
  299. }
  300. function type($attr_main){
  301. switch($attr_main){
  302. case '精装版':
  303. case '精装赠':
  304. return 0;
  305. break;
  306. case '简约版':
  307. return 1;
  308. break;
  309. case '老人版':
  310. case '高腰版':
  311. return 2;
  312. break;
  313. case '纯棉版':
  314. return 3;
  315. break;
  316. case '青春版':
  317. return 4;
  318. break;
  319. default:
  320. return 9;
  321. }
  322. }
  323. /**查询代理**/
  324. public function get_lower_user(Request $request)
  325. {
  326. return $this->success_list([], '', 0);
  327. }
  328. /**代理退货**/
  329. public function user_return_good(Request $request)
  330. {
  331. $user = Auth::user();
  332. $code = urldecode($request->code);
  333. $re = Select::where('code', $code)->first();
  334. $op_user = User::find($re->user_id);
  335. if ($re) {
  336. if ($re->is_true == 1) {
  337. return $this->error(40028, '', '当前货物为假货,不能进行退货处理');
  338. }
  339. $res = $this->check_user_level($user->id, $re->user_id);
  340. if ($res['code'] == 200) {
  341. if ($re->is_lowest == 1) {
  342. $re->user_id = $user->id;
  343. $re->save();
  344. $this->update_full($re->pid);
  345. $data = [
  346. 'op_name' => $op_user->nickname,
  347. 'op_phone' => $op_user->mobile,
  348. 'op_id' => $op_user->id,
  349. 'accept_name' => $user->nickname,
  350. 'accept_phone' => $user->mobile,
  351. 'accept_id' => $user->id,
  352. 'select_id' => $re->id
  353. ];
  354. event(new ReturnGoodLog($data));
  355. } else {
  356. if ($re->level == 1) {
  357. $num = $this->is_full($re->code);
  358. if ($num == 300) {
  359. return $this->error(50024, '', '当前防伪码不能进行退货处理,请使用小码进行操作');
  360. }
  361. $re->user_id = $user->id;
  362. $re->save();
  363. $data = [
  364. 'op_name' => $op_user->nickname,
  365. 'op_phone' => $op_user->mobile,
  366. 'op_id' => $op_user->id,
  367. 'accept_name' => $user->nickname,
  368. 'accept_phone' => $user->mobile,
  369. 'accept_id' => $user->id,
  370. 'select_id' => $re->id
  371. ];
  372. event(new ReturnGoodLog($data));
  373. $lower_code = Select::where('pid', $re->sort)->get();
  374. foreach ($lower_code as $k => $v) {
  375. $ress = Select::where('code', $v->code)->first();
  376. $ress->user_id = $user->id;
  377. $ress->save();
  378. $data = [
  379. 'op_name' => $op_user->nickname,
  380. 'op_phone' => $op_user->mobile,
  381. 'op_id' => $op_user->id,
  382. 'accept_name' => $user->nickname,
  383. 'accept_phone' => $user->mobile,
  384. 'accept_id' => $user->id,
  385. 'select_id' => $v->id
  386. ];
  387. event(new ReturnGoodLog($data));
  388. if ($ress->is_lowest != 1) {
  389. $lower_codes = Select::where('pid', $v->sort)->get();
  390. foreach ($lower_codes as $ke => $va) {
  391. $resss = Select::where('code', $va->code)->first();
  392. $resss->user_id = $user->id;
  393. $resss->save();
  394. $data = [
  395. 'op_name' => $op_user->nickname,
  396. 'op_phone' => $op_user->mobile,
  397. 'op_id' => $op_user->id,
  398. 'accept_name' => $user->nickname,
  399. 'accept_phone' => $user->mobile,
  400. 'accept_id' => $user->id,
  401. 'select_id' => $va->id
  402. ];
  403. event(new ReturnGoodLog($data));
  404. }
  405. }
  406. }
  407. } else {
  408. $num = $this->is_full($re->code);
  409. if ($num == 300) {
  410. return $this->error(50024, '', '当前防伪码不能进行退货处理,请使用小码进行操作');
  411. }
  412. $re->user_id = $user->id;
  413. $re->save();
  414. $data = [
  415. 'op_name' => $op_user->nickname,
  416. 'op_phone' => $op_user->mobile,
  417. 'op_id' => $op_user->id,
  418. 'accept_name' => $user->nickname,
  419. 'accept_phone' => $user->mobile,
  420. 'accept_id' => $user->id,
  421. 'select_id' => $re->id
  422. ];
  423. event(new ReturnGoodLog($data));
  424. $this->update_full($re->pid);
  425. $lower_code = Select::where('pid', $re->sort)->get();
  426. foreach ($lower_code as $k => $v) {
  427. $ress = Select::where('code', $v->code)->first();
  428. $ress->user_id = $user->id;
  429. $ress->save();
  430. $data = [
  431. 'op_name' => $op_user->nickname,
  432. 'op_phone' => $op_user->mobile,
  433. 'op_id' => $op_user->id,
  434. 'accept_name' => $user->nickname,
  435. 'accept_phone' => $user->mobile,
  436. 'accept_id' => $user->id,
  437. 'select_id' => $v->id
  438. ];
  439. event(new ReturnGoodLog($data));
  440. }
  441. }
  442. }
  443. return $this->success([]);
  444. } else {
  445. return $this->error(40028, '', $res['message']);
  446. }
  447. } else {
  448. return $this->error(40029, '', '暂未查询到相应的信息');
  449. }
  450. }
  451. /**小码发货时更改中码和大码**/
  452. public function update_full($pid)
  453. {
  454. DB::beginTransaction();
  455. try {
  456. $re = Select::where('sort', '=', $pid)->first();
  457. $re->is_full = 1;
  458. if (!$re->save()) {
  459. throw new \Exception('1');
  460. }
  461. if ($re->level != 1) {
  462. $this->update_full($re->pid);
  463. }
  464. DB::commit();
  465. return 200;
  466. } catch (\Exception $exception) {
  467. DB::rollBack();
  468. Log::error($exception);
  469. return 300;
  470. }
  471. }
  472. /****/
  473. public function check_user_level($id, $user_id)
  474. {
  475. if ($id == $user_id) {
  476. return ['code' => 50026, 'message' => '你不能对自己的货物进行退货操作'];
  477. }
  478. return ['code' => 200];
  479. }
  480. /**检查是够已经发货**/
  481. public function is_full($code)
  482. {
  483. $re = Select::where('code', $code)->first();
  484. if ($re->is_full == 1) {
  485. return 300;
  486. }
  487. return 200;
  488. }
  489. /**展示发货商品所属信息**/
  490. public function select_send_user(Request $request){
  491. $user=Auth::user();
  492. $input=$request->all();
  493. $re=Select::where('code',$input['code'])->with(['select_user','select_good'])->first();
  494. if (empty($re)){
  495. Log::error(1);
  496. return $this->error(52119,'','暂无信息查询');
  497. }
  498. if (!$re->select_user){
  499. Log::error(2);
  500. return $this->error(52120,'','暂无代理信息');
  501. }
  502. if (!$re->select_good){
  503. Log::error(3);
  504. return $this->error(52121,'','暂无商品信息');
  505. }
  506. if ($re->user_id!=$user->id){
  507. Log::error(4);
  508. return $this->error(50021,'','当前货物不是您的货物,不能使用此码进行发货');
  509. }
  510. $time=SendGoodLog::where('select_id',$re->id)->where('accept_id',$re->user_id)->orderByDesc('created_at')->first();
  511. if ($time){
  512. $times=$time->created_at->toDateString();
  513. }else{
  514. $times=Carbon::now()->toDateString();
  515. }
  516. $data=[
  517. 'style'=>$re->select_good->good_name,
  518. 'nickname'=>$re->select_user->nickname,
  519. 'avatar'=>$re->select_user->headimgurl,
  520. 'level'=>$this->judge_level($re->select_user->level),
  521. 'phone'=>$re->select_user->mobile,
  522. 'time'=>$times
  523. ];
  524. return $this->success($data);
  525. }
  526. /**展示退货商品所属信息**/
  527. public function select_return_user(Request $request){
  528. $re=Select::where('code',$request->code)->with(['select_user','select_good'])->first();
  529. if (empty($re)){
  530. return $this->error(52121,'','暂无信息查询');
  531. }
  532. if (!$re->select_user){
  533. return $this->error(52121,'','暂无代理信息');
  534. }
  535. if (!$re->select_good){
  536. return $this->error(52121,'','暂无商品信息');
  537. }
  538. $res=$this->check_user_level(Auth::user()->id,$re->user_id);
  539. if ($res['code']!=200){
  540. return $this->error($res['code'],'',$res['message']);
  541. }
  542. $time=SendGoodLog::where('select_id',$re->id)->where('accept_id',$re->user_id)->orderByDesc('created_at')->first();
  543. $data=[
  544. 'style'=>$re->select_good->good_name,
  545. 'nickname'=>$re->select_user->nickname,
  546. 'level'=>$this->judge_level($re->select_user->level),
  547. 'phone'=>$re->select_user->mobile,
  548. 'time'=>$time->created_at->toDateString()
  549. ];
  550. return $this->success($data);
  551. }
  552. /**判断等级**/
  553. public function judge_level($status){
  554. switch ($status){
  555. case 2:
  556. $level='经销商';
  557. break;
  558. case 3:
  559. $level='批发商';
  560. break;
  561. default:
  562. $level='经销商';
  563. break;
  564. }
  565. return $level;
  566. }
  567. public function sell(Request $request){
  568. try{
  569. $id=Auth::user()->id;
  570. $code=urldecode($request->code);
  571. DB::beginTransaction();
  572. $re=Select::where('code',$code)->first();
  573. if ($re){
  574. if ($re->is_true==1){
  575. return $this->error(50024,'','当前货物是假货不能进行零售!');
  576. }
  577. if ($re->user_id!=$id){
  578. return $this->error(50024,'','当前货物绑定的代理信息不是你!');
  579. }
  580. if ($re->is_lowest!=1){
  581. return $this->error(50024,'','零售只能使用小码进行零售!');
  582. }
  583. if ($re->is_sell!=0){
  584. return $this->error(50024,'','该商品已经零售!');
  585. }
  586. $re->is_sell=1;
  587. if (!$re->save()){
  588. throw new \Exception('1');
  589. }
  590. $res=Select::where('sort',$re->pid)->first();
  591. $res->is_full=1;
  592. if (!$res->save()){
  593. throw new \Exception('1');
  594. }
  595. if ($res->level!=1){
  596. $ress=Select::where('sort',$re->pid)->first();
  597. $ress->is_full=1;
  598. if (!$ress->save()){
  599. throw new \Exception('1');
  600. }
  601. }
  602. $sell=new Sell();
  603. $sell->select_id=$re->id;
  604. $sell->select_good_id=$re->good_select_id;
  605. $sell->user_id=$re->user_id;
  606. if (!$sell->save()){
  607. throw new \Exception('1');
  608. }
  609. }
  610. DB::commit();
  611. return $this->success([]);
  612. }catch (\Exception $exception){
  613. DB::rollBack();
  614. Log::error('零售失败,原因是'.$exception);
  615. return $this->error(50021,'','操作失败,请重试!');
  616. }
  617. }
  618. public function get_arr(Request $request){
  619. $app=app('wechat.official_account');
  620. $url='http://api.app.cliu.cc/api/gzh';
  621. $app->jssdk->setUrl($url);
  622. $arr=$app->jssdk->buildConfig(array('scanQRCode'), false);
  623. return $this->success(json_decode($arr));
  624. }
  625. }