php 实现店铺装修5
/**
* @title 选中蜂店装修模板样式
* @param plate_id 是 int 商品(平台或特色)装修样式ID
* @param type_id 是 int 要装修商品的类型(1-平台、2-特色)
* @example FlagShipShopDecorate.selectShopDecorate? 调试参数:{"username":"17721355485","check_code":"123456","method":"FlagShipShopDecorate.selectShopDecorate","plate_id":"71","type_id":"1"}
* @return {"status":"0","errorCode":"0","msg":"成功","result":[]}
* @method POST
* @author 邹柯
*/
public function selectShopDecorate($res){
$user_id=session("user.user_id");
$plate_id=$res['plate_id'];
if(empty($plate_id)){
E('');
}
$type_id=$res['type_id'];
if($type_id != && $type_id !=){
E('');
}
$user_shop_decorate=M('user_shop_decorate');
$usd_where['create_id']=$user_id;
$usd_where['flagship_shop']=;
$count=$this->getDecorate($user_shop_decorate,$usd_where);
$plate_content=$this->getDefaultStyleByPlateId($plate_id,$type_id);
$plate_content_draft=json_encode($plate_content);
$time=date("Y-m-d H:i:s",time());
if($type_id==){
$field1="plate_content_draft";
$field2="plate_id";
$field3="select_status";
}else{
$field1="plate_content_draft_features";
$field2="plate_id_features";
$field3="select_status_features";
}
if(empty($count)){
$data=array(
$field2=>$plate_id,
$field1=>$plate_content_draft,
'status'=>,
'create_time'=>$time,
'create_id'=>$user_id,
'update_time'=>$time,
'update_id'=>$user_id,
'use_status'=>,
$field3=>,
'flagship_shop'=>
);
$res=$user_shop_decorate->data($data)->add();
if(!$res && $res !=){
E('');
}
}else{
if($count['use_status']==){
$use_status=;
}else{
$use_status=;
}
if($type_id==){
if($count['plate_id']==$plate_id){
return true;
}
}else{
if($count['plate_id_features']==$plate_id){
return true;
}
} $data=array(
$field2=>$plate_id,
$field1=>$plate_content_draft,
'status'=>,
'create_time'=>$time,
'create_id'=>$user_id,
'update_time'=>$time,
'update_id'=>$user_id,
'use_status'=>$use_status,
$field3=>
);
$res=$user_shop_decorate->data($data)->where(['id'=>$count['id']])->save();
if(!$res && $res !=){
E('');
}
}
return true;
}
//获取店铺装修信息
public function getDecorate($user_shop_decorate,$usds_where){
$res_info=$user_shop_decorate->field('id,plate_id,plate_id_features,use_status,plate_content_draft,plate_content_draft_features')
->where($usds_where)
->order('create_time desc')
->find();
return $res_info;
}
php 实现店铺装修5的更多相关文章
- 关于淘宝店铺装修弹出层popup的记录
小龙最近做了一下下淘宝的店铺装修,里面封装的widget深不见底,刚刚整明白popup,也就是弹出层的使用方法,大神勿喷: <div class="area001">触 ...
- Adobe Photoshop CC2018最新教程+某宝店铺装修教程
PS免费教程,ps淘宝店铺装修教程.该资源为本人从某商网站重金买来,现免费分享给大家,下载地址:百度网盘,https://pan.baidu.com/s/127PjFbGwVVUVce1litHFsw
- php 实现店铺装修6
/** * @title 获取预览或发布的蜂店模板样式 * @param store_id 是 string 店铺id * @param type 是 int 装修模板的状态:1-预览蜂店装修模板样式 ...
- php 实现店铺装修7
type_id=0的情况 type_id=1的情况 type_id=2的情况 /** * @title 店铺装修--商品分类 * @param type ...
- php 实现店铺装修8
/** * @title 店铺装修--根据分类获取商品列表 * @param source 是 int 来源(1--h5.2--app) * @param type 是 string 店铺类型--首页 ...
- php 实现店铺装修3
/** * @title 装修店铺 * @param plate_id 是 int 店铺装修样式ID * @param type 是 int 模板样式子板块类型(4-海景.6-二宫格.8-三宫格.9- ...
- php 实现店铺装修2
<?php namespace Webapp\Model; use Common\Model\DataModel\FlagShopCategoryModel; use Common\Model\ ...
- php 实现店铺装修1
一.原型分析 1.店铺未装修的情况下,使用默认样式,哪个是默认样式由后台告知: 2.所有的样式由后台进行维护(但后台始终有一个默认样式,不可删除不可编辑),所有样式,只要用户未编辑过,则默认按照商品的 ...
- php 实现店铺装修4
/** * @title 发布装修的店铺 * @example FlagShipShopDecorate.fabu? 调试参数:{"username":"17721355 ...
随机推荐
- Spring Boot Ftp Client 客户端示例支持断点续传
本章介绍 Spring Boot 整合 Ftpclient 的示例,支持断点续传 本项目源码下载 1 新建 Spring Boot Maven 示例工程项目 注意:是用来 IDEA 开发工具 File ...
- cf 76 div2
传送门 题意 t组样例 n个学生, x最多交换次数 a交换的第一个位置 b交换的第二个位置 最多是交换n-1次,不懂的话可以找个数列自己模拟一下: 然后其他的就是abs(a-b)+x;两个位置之间的距 ...
- 树莓派 Ubuntu mate 16.04 下开启vncserver(自动启动+改分辨率)
树莓派 Ubuntu mate 16.04 下开启vncserver(自动启动+改分辨率) 参考博文:https://blog.csdn.net/Mr_dhy/article/details/8282 ...
- 吴裕雄 python 神经网络——TensorFlow 数据集基本使用方法
import tempfile import tensorflow as tf input_data = [1, 2, 3, 5, 8] dataset = tf.data.Dataset.from_ ...
- Cisco AP-格式化AP
故障情况:APC11-AP04#sho capwap ip config LWAPP Static IP ConfigurationIP Address 172.17.239.204I ...
- nyoj 82
题目:http://acm.nyist.edu.cn/JudgeOnline/problem.php?pid=82 2018-06-23 23:44:05 p.s.自己省错题了: 描述 一个叫ACM的 ...
- base64,base32bit加密解密
import base64 str='admin' str=str.encode('utf-8') #加密 bs64=base64.b64encode(str) #解密 debs64=base64.b ...
- JavaScript - 包装类型
1. 概念 基本类型是没有方法的 包装类型作用是为了方便操作基本数据类型 // 下面代码的问题? // s1是基本类型,基本类型是没有方法的 var s1 = 'zhangsan'; var s2 = ...
- HTML5中新增的主体结构元素
article元素 article元素代表文档.页面或应用程序中独立的.完整的.可以独自被外部引用的内容. 它可以使一篇博客或者报刊中的文章,一篇论坛帖子.一段用户评论或独立的插件,或其他任何独立的内 ...
- SpringMvc 初步配置
spring-aop.jarspring-bean.jarspring-context.jarspring-core.jarspring-web.jarspring-webmvc.jarcommons ...