application/index/model/NeedSpace.php
(完整代码) 2KB<?php
//声明当前model的目录位置
namespace app\index\model;
use think\Model;
//use think\Request;
class NeedSpace extends Model
{
public function add() {
$need = new NeedSpace;
//必填
$need->need_name = request()->param('need_name');
$need->shop_id = request()->param('shop_id');
$need->feed_uid = request()->param('feed_uid');
$need->feed_username = request()->param('feed_username');
$need->price = request()->param('price');
$need->price2 = request()->param('price2');
$need->price3 = request()->param('price3');
$need->contact_type = request()->param('contact_type');
$need->advance_payment = request()->param('advance_payment');
$need->contact = request()->param('contact');
//选填
$need->need_type = request()->param('need_type');
$need->need_type2 = request()->param('need_type2');
$need->need_type3 = request()->param('need_type3');
$need->detail = request()->param('detail');
// $need->file= request()->param('file');
$arr_pic=request()->post('pic/a');
if(!empty($arr_pic)){
$pic_string=implode(",", $arr_pic);
}
$need->pic = $pic_string;
$arr_file = request()->post('file/a');
if (!empty($arr_file)) {
$file_string = implode(",", $arr_file);
}
$need->file = $file_string;
$need->update_time =time();
$need->pub_uid = session('uid','', 'index');
$need->pub_username = session('username','','index');
if($need->save()){
// return true;
return $need->id;
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。