Пример #1
0
 public function show($id)
 {
     $curr['name'] = $this->lists['show']['name'];
     $curr['url'] = $this->lists['show']['url'];
     $result = ['data' => ProductModel::find($id), 'lists' => $this->lists, 'curr' => $curr];
     return view('member.product.show', $result);
 }
Пример #2
0
 public function show($id)
 {
     $curr['name'] = $this->crumb['show']['name'];
     $curr['url'] = $this->crumb['show']['url'];
     $result = ['data' => ProductModel::find($id), 'crumb' => $this->crumb, 'curr' => $curr];
     return view('admin.product.show', $result);
 }
Пример #3
0
 /**
  * 总编辑窗口
  */
 public function edit($productid, $layerid = 0, $con_id = 0, $genre = 1)
 {
     $curr['name'] = $this->crumb['']['name'];
     $curr['url'] = $this->crumb['']['url'];
     $layer = $this->getOneLayer($productid, $layerid);
     $result = ['product' => ProductModel::find($productid), 'layers' => $this->getLayers($productid), 'layer' => $layer, 'layerModel' => $this->layerModel, 'cons' => $this->getCons($productid, $layer->id), 'content' => $this->getOneCon($productid, $layer->id, $con_id), 'attr' => $this->getOneAttr($productid, $layer->id, $genre), 'attrModel' => $this->attrModel, 'layerAttrModel' => $this->layerAttrModel, 'pics' => PicModel::all(), 'crumb' => $this->crumb, 'curr' => $curr, 'currUrl' => 'edit', 'layerid' => $layer->id, 'con_id' => $con_id, 'attrGenre' => $genre];
     return view('admin.proCreation.index', $result);
 }
Пример #4
0
 /**
  * 得到在线模板信息
  */
 public function getProduct()
 {
     $productModel = ProductModel::find($this->productid);
     return $productModel ? $productModel : '';
 }
Пример #5
0
 public function index($productid, $layerid = 0, $con_id = 0, $genre = 1)
 {
     $layer = $this->getOneLayer($productid, $layerid);
     $result = ['product' => ProductModel::find($productid), 'cons' => $this->getCons($productid, $layer->id), 'content' => $this->getOneCon($productid, $layer->id, $con_id), 'attr' => $this->getOneAttr($productid, $layer->id, $genre), 'attrModel' => $this->attrModel, 'layers' => $this->getLayers($productid), 'layer' => $layer, 'layerModel' => $this->layerModel, 'pics' => $this->model->getUserPics($this->userid), 'layerid' => $layer->id, 'con_id' => $con_id, 'genre' => $genre];
     return view('online.frame.index', $result);
 }
Пример #6
0
 /**
  * 动画编辑
  */
 public function play2($productid, $layerid, $con_id, $genre)
 {
     $result = ['data' => ProductModel::find($productid), 'layers' => $this->getLayers($productid), 'cons' => $this->getCons($productid, $layerid), 'attrs' => $this->getAttrs($productid, $layerid), 'attrModel' => $this->attrModel];
     return view('online.frame.basic.index', $result);
 }
Пример #7
0
 /**
  * 获得产品信息
  */
 public function getProduct($pro_id = null)
 {
     $pro_id = $pro_id ? $pro_id : $this->productid;
     $productModel = ProductModel::find($pro_id);
     return $productModel ? $productModel : '';
 }
Пример #8
0
 public function show($id)
 {
     $result = ['data' => ProductModel::find($id), 'orderProModel' => $this->orderProModel, 'layers' => $this->getLayers($id), 'cons' => $this->getCons($id, 0), 'attrs' => $this->getAttrs($id, 0), 'attrModel' => $this->attrModel, 'currUrl' => 'play'];
     return view('online.home.show', $result);
 }
Пример #9
0
 /**
  * 在线创作作品预览
  */
 public function pre($id)
 {
     $data = ProductModel::find($id);
     $result = ['video' => $data->getVideo(), 'videoName' => $data->name];
     return view('layout.videoPre', $result);
 }
Пример #10
0
 /**
  * 获取产品记录
  */
 public function getProduct($id)
 {
     $productModel = ProductModel::find($id);
     $data = ['name' => $productModel->name, 'serial' => $productModel->serial, 'cate' => $productModel->cate, 'gif' => $productModel->gif, 'intro' => $productModel->intro, 'uid' => $this->userid, 'pid' => $id, 'created_at' => time()];
     ProductModel::create($data);
     $productModelNew = ProductModel::where($data)->first();
     return $productModelNew->id;
 }