|
@@ -72,15 +72,17 @@ class InfoController extends Controller
|
|
$url[] = array('url'=>U( 'Dream/Info/index'),'title'=>'返回列表');
|
|
$url[] = array('url'=>U( 'Dream/Info/index'),'title'=>'返回列表');
|
|
return $this->showWarning('请添加图片',$url);
|
|
return $this->showWarning('请添加图片',$url);
|
|
}
|
|
}
|
|
|
|
+ $data['created_at'] = date('Y-m-d H:i:s');
|
|
|
|
+ $data['updated_at'] = date('Y-m-d H:i:s');
|
|
$id = DreamInfoModel::insertGetId($data);
|
|
$id = DreamInfoModel::insertGetId($data);
|
|
// 生成二维码
|
|
// 生成二维码
|
|
- $info['transaction_id'] = date('YmdHis') . mt_rand(1000, 9999);
|
|
|
|
|
|
+ /* $info['transaction_id'] = date('YmdHis') . mt_rand(1000, 9999);
|
|
$info['code'] = 'WECHATPAY_' . $info['transaction_id'];
|
|
$info['code'] = 'WECHATPAY_' . $info['transaction_id'];
|
|
$code_url = env('APP_URL').'/user/meet?dream_id='.$id;
|
|
$code_url = env('APP_URL').'/user/meet?dream_id='.$id;
|
|
$code_path = public_path('qrcodes/'.$info['code'].'.png');
|
|
$code_path = public_path('qrcodes/'.$info['code'].'.png');
|
|
\QrCode::format('png')->size(500)->generate($code_url,$code_path);
|
|
\QrCode::format('png')->size(500)->generate($code_url,$code_path);
|
|
$code = env('APP_URL').'/qrcodes/'.$info['code'].'.png';
|
|
$code = env('APP_URL').'/qrcodes/'.$info['code'].'.png';
|
|
- DreamInfoModel::where('id',$id)->update(compact('code'));
|
|
|
|
|
|
+ DreamInfoModel::where('id',$id)->update(compact('code'));*/
|
|
if($id) {
|
|
if($id) {
|
|
$arr = [];
|
|
$arr = [];
|
|
foreach ($pics['url'] as $pic) {
|
|
foreach ($pics['url'] as $pic) {
|