- 微信扫一扫 -
QQ:181814630
电话:15116362044
| 演示角色 | 演示地址 | 账号 | 密码 |
|---|---|---|---|
| 后台PC端 | 点击进入 | dso2o | 123456 |
| 用户PC端 | 点击进入 | buyer | 123456 |
| 卖家PC端 | 点击进入 | buyer | 123456 |
| 服务机构PC端 | 点击进入 | 后台添加 | |
| 用户手机端 | 点击进入 | buyer | 123456 |
| 商家手机端 | 点击进入 | buyer | 123456 |
| 配送员 | 点击进入 | 测试配送员 | 123456 |
| 服务机构手机端 | 点击进入 | test1 | 123456 |
| 安卓APP下载地址 | http://www.csdeshang.com/document/dso2o/dso2o_uniapp_android.apk | ||
用户端
商家端
配送员管理端
服务机构端
用户端安卓APP
(使用浏览器打开)
商家端安卓APP
(使用浏览器打开)
配送员管理安卓APP
(使用浏览器打开)
服务机构安卓APP
(使用浏览器打开)
| 演示角色 | 演示地址 | 账号 | 密码 |
|---|---|---|---|
| 后台PC端 | 点击进入 | dsmall | 123456 |
| 用户PC端 | 点击进入 | buyer | 123456 |
| 商家PC端 | 点击进入 | buyer | 123456 |
| 用户手机端 | 点击进入 | buyer | 123456 |
| 商家手机端 | 点击进入 | buyer | 123456 |
| 门店手机端 | 点击进入 | seller | 123456 |
| 安卓APP下载地址 | http://www.csdeshang.com/document/dsmall/dsmall_uniapp_android.apk | ||
用户端
商家端
门店端
用户安卓APP(使用浏览器打开)
商家安卓APP(使用浏览器打开)
门店安卓APP(使用浏览器打开)
| 演示角色 | 演示地址 | 账号 | 密码 |
|---|---|---|---|
| 后台PC端 | 点击进入 | test | 123456 |
| 商户PC端(可开多个店铺) | 点击进入 | seller | 123456 |
| 店铺管理PC端 | 点击进入 | seller | 123456 |
| 手机端 | 点击进入 | test | 123456 |
| 骑手端 | 点击进入 | test | 123456 |
| 师傅端 | 点击进入 | test | 123456 |
| 短视频 | 点击进入 | test | 123456 |
用户端
安卓APP下载地址
商品由商家发布,可以根据实际情况设置多种属性,多个规格。商品模块所涉及的表有:
goods、goodscommon、goodsimages。他们的关系如下图
卖家添加商品时,所用到的控制器是Sellergoodsadd,第一步add_step_one操作显示卖家绑定的分类
// 实例化商品分类模型
$goodsclass_model = model('goodsclass');
// 商品分类
$goods_class = $goodsclass_model->getGoodsclass(session('store_id'));第二步add_step_two操作如果不是自营店铺或者没有绑定全部分类则检查所选商品分类是否在卖家绑定的分类中
// 如果不是自营店铺或者自营店铺未绑定全部商品类目,读取绑定分类
if (!check_platform_store_bindingall_goodsclass()) {
//商品分类 支持批量显示分类
$storebindclass_model = model('storebindclass');
$goods_class = model('goodsclass')->getGoodsclassForCacheModel();
$where['store_id'] = session('store_id');
$class_2 = isset($goods_class[$gc_id]['gc_parent_id'])?$goods_class[$gc_id]['gc_parent_id']:0;
$class_1 = isset($goods_class[$class_2]['gc_parent_id'])?$goods_class[$class_2]['gc_parent_id']:0;
$where['class_1'] = ($class_1>0)?$class_1:(($class_2>0)?$class_2:$gc_id);
$where['class_2'] = ($class_1>0)?$class_2:(($class_2>0)?$gc_id:0);
$where['class_3'] = ($class_1>0 && $class_2>0)?$gc_id:0;
$bind_info = $storebindclass_model->getStorebindclassInfo($where);
if (empty($bind_info)) {
$where['class_3'] = 0;
$bind_info = $storebindclass_model->getStorebindclassInfo($where);
if (empty($bind_info)) {
$where['class_2'] = 0;
$where['class_3'] = 0;
$bind_info = $storebindclass_model->getStorebindclassInfo($where);
if (empty($bind_info)) {
$where['class_1'] = 0;
$where['class_2'] = 0;
$where['class_3'] = 0;
$bind_info = model('storebindclass')->getStorebindclassInfo($where);
if (empty($bind_info)) {
$this->error(lang('store_goods_index_again_choose_category2'));
}
}
}
}
}
获取所选分类下所关联的商品属性与规格
// 获取类型相关数据
$typeinfo = model('type')->getAttribute($goods_class['type_id'], session('store_id'), $gc_id);
list($spec_json, $spec_list, $attr_list, $brand_list) = $typeinfo;
商品图片上传时,通过ajax异步上传图片到Sellergoodsadd/image_upload
检查是否超过可上传的图片数量
// 判断图片数量是否超限
$album_model = model('album');
$album_limit = $this->store_grade['storegrade_album_limit'];
if ($album_limit > 0) {
$album_count = $album_model->getCount(array('store_id' => session('store_id')));
if ($album_count >= $album_limit) {
$error = lang('store_goods_album_climit');
exit(json_encode(array('error' => $error)));
}
}用公共方法upload_albumpic上传图片文件,如果是本地存储则用公共方法create_albumpic_thumb同时生成240、480、1280规格的压缩图
//本地图片保存
$file_object = request()->file($file_name);
$upload_path = BASE_UPLOAD_PATH . DS . $upload_path;
$info = $file_object->rule('uniqid')->validate(['ext' => ALLOW_IMG_EXT])->move($upload_path, $save_name);
if ($info) {
$img_path = $upload_path . '/' . $info->getFilename();
create_albumpic_thumb($upload_path,$info->getFilename());
return array('code' => '10000', 'message' => '', 'result' => $img_path);
}
else {
$error = $file_object->getError();
$data['code'] = '10001';
$data['message'] = $error;
$data['result'] = $_FILES[$file_name]['name'];
return $data;
}
第三步save_goods操作保存商品数据
将商品公共信息保存在goodscommon表,将商品属性serialize序列化存储在goods_attr列中,商品规格信息保存在goods表
- 关注官方公众号 -