|
@@ -31,9 +31,11 @@ class Agent extends BaseController
|
|
|
$id = input('id/d, 0');
|
|
|
$agent = AgentModel::with(['muser'])->findOrEmpty($id);
|
|
|
$workerlist = WorkerModel::order(['id' => 'desc'])->select();
|
|
|
+ $brokerlist = BrokerModel::where('agentid', $id)->select();
|
|
|
return view('agent/agentform', [
|
|
|
'workerlist' => $workerlist,
|
|
|
'agent' => $agent,
|
|
|
+ 'brokerlist' => $brokerlist,
|
|
|
]);
|
|
|
}
|
|
|
|
|
@@ -61,28 +63,29 @@ class Agent extends BaseController
|
|
|
]));
|
|
|
}
|
|
|
$data = [
|
|
|
- 'userid' => $muser->id,
|
|
|
- 'workerid' => input('workerid/d', 0),
|
|
|
- 'loginname' => input('loginname/s', ""),
|
|
|
- 'idnumber' => input('idnumber/s', ""),
|
|
|
- 'title' => input('title/s', ""),
|
|
|
- 'tilpic' => input('tilpic/s', ""),
|
|
|
- 'picall' => input('picall/a', []),
|
|
|
- 'realname' => input('realname/s', ""),
|
|
|
- 'mobile' => input('mobile/s', ""),
|
|
|
- 'telephone' => input('telephone/s', ""),
|
|
|
- 'latitude' => input('latitude/f', 0.00),
|
|
|
- 'longitude' => input('longitude/f', 0.00),
|
|
|
- 'province' => input('province/s', ""),
|
|
|
- 'city' => input('city/s', ""),
|
|
|
- 'district' => input('district/s', ""),
|
|
|
- 'address' => input('address/s', ""),
|
|
|
- 'details' => input('details/s', ""),
|
|
|
- 'priority' => input('priority/d', 0),
|
|
|
- 'remark' => input('remark/s', ""),
|
|
|
- 'status' => input('status/d', 1),
|
|
|
- 'is_settle' => input('is_settle/d', 1),
|
|
|
- 'type' => input('type/d', 1),
|
|
|
+ 'userid' => $muser->id,
|
|
|
+ 'workerid' => input('workerid/d', 0),
|
|
|
+ 'loginname' => input('loginname/s', ""),
|
|
|
+ 'idnumber' => input('idnumber/s', ""),
|
|
|
+ 'title' => input('title/s', ""),
|
|
|
+ 'tilpic' => input('tilpic/s', ""),
|
|
|
+ 'picall' => input('picall/a', []),
|
|
|
+ 'realname' => input('realname/s', ""),
|
|
|
+ 'mobile' => input('mobile/s', ""),
|
|
|
+ 'telephone' => input('telephone/s', ""),
|
|
|
+ 'latitude' => input('latitude/f', 0.00),
|
|
|
+ 'longitude' => input('longitude/f', 0.00),
|
|
|
+ 'province' => input('province/s', ""),
|
|
|
+ 'city' => input('city/s', ""),
|
|
|
+ 'district' => input('district/s', ""),
|
|
|
+ 'address' => input('address/s', ""),
|
|
|
+ 'details' => input('details/s', ""),
|
|
|
+ 'priority' => input('priority/d', 0),
|
|
|
+ 'remark' => input('remark/s', ""),
|
|
|
+ 'status' => input('status/d', 1),
|
|
|
+ 'is_settle' => input('is_settle/d', 1),
|
|
|
+ 'type' => input('type/d', 1),
|
|
|
+ 'default_broker_id' => input('default_broker_id/d', 0),
|
|
|
];
|
|
|
$password = input('password/s', "");
|
|
|
if (empty($id)) {
|
|
@@ -357,4 +360,20 @@ class Agent extends BaseController
|
|
|
'data' => $list,
|
|
|
]));
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 推广码
|
|
|
+ */
|
|
|
+ public function shengwaiqrcode()
|
|
|
+ {
|
|
|
+ $id = input('id/d', 0);
|
|
|
+ error_reporting(E_ERROR);
|
|
|
+ $url = request()->domain(true) . '/mobile/worker/recruit?id=' . $id;
|
|
|
+ header('Content-Type: image/png');
|
|
|
+ ob_clean();
|
|
|
+ $errorCorrectionLevel = "L"; // 纠错级别:L、M、Q、H
|
|
|
+ $matrixPointSize = "4"; //生成图片大小 :1到10
|
|
|
+ \phpqrcode\QRcode::png($url, false, $errorCorrectionLevel, $matrixPointSize);
|
|
|
+ exit();
|
|
|
+ }
|
|
|
}
|