diff --git a/addons/alisms/config.php b/addons/alisms/config.php index 7288fea..578c9b9 100644 --- a/addons/alisms/config.php +++ b/addons/alisms/config.php @@ -30,7 +30,7 @@ return [ 'title' => '签名', 'type' => 'string', 'content' => [], - 'value' => 'your sign', + 'value' => '建邺禾蕙健康产业中心', 'rule' => 'required', 'msg' => '', 'tip' => '', @@ -43,14 +43,14 @@ return [ 'type' => 'array', 'content' => [], 'value' => [ - 'register' => 'SMS_114000000', - 'resetpwd' => 'SMS_114000000', - 'changepwd' => 'SMS_114000000', - 'changemobile' => 'SMS_114000000', - 'profile' => 'SMS_114000000', - 'notice' => 'SMS_114000000', + 'register' => 'SMS_295700968', + 'resetpwd' => 'SMS_295700968', + 'changepwd' => 'SMS_295700968', + 'changemobile' => 'SMS_295700968', + 'profile' => 'SMS_295700968', + 'notice' => 'SMS_295700968', 'mobilelogin' => 'SMS_295700968', - 'bind' => 'SMS_114000000', + 'bind' => 'SMS_295700968', ], 'rule' => 'required', 'msg' => '', diff --git a/application/admin/controller/content/Notice.php b/application/admin/controller/content/Notice.php new file mode 100644 index 0000000..f2c3f9e --- /dev/null +++ b/application/admin/controller/content/Notice.php @@ -0,0 +1,62 @@ +model = new \app\admin\model\content\Notice; + $this->view->assign("statusList", $this->model->getStatusList()); + } + + + + /** + * 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法 + * 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑 + * 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改 + */ + + public function index() + { + //设置过滤方法 + $this->request->filter(['strip_tags', 'trim']); + if ($this->request->isAjax()) { + //如果发送的来源是Selectpage,则转发到Selectpage + if ($this->request->request('keyField')) { + return $this->selectpage(); + } + list($where, $sort, $order, $offset, $limit) = $this->buildparams(); + $list = $this->model +// ->with('group') + ->where($where) + ->order($sort, $order) + ->paginate($limit); +// foreach ($list as $k => $v) { +// $v->avatar = $v->avatar ? cdnurl($v->avatar, true) : letter_avatar($v->nickname); +// $v->hidden(['password', 'salt']); +// } + $result = array("total" => $list->total(), "rows" => $list->items()); + + return json($result); + } + return $this->view->fetch(); + } + +} diff --git a/application/admin/lang/zh-cn/content/notice.php b/application/admin/lang/zh-cn/content/notice.php new file mode 100644 index 0000000..cde8895 --- /dev/null +++ b/application/admin/lang/zh-cn/content/notice.php @@ -0,0 +1,15 @@ + 'ID', + 'Title' => '公告标题', + 'Image' => '公告主图', + 'Content' => '公告详情', + 'Status' => '公告状态', + 'Status 0' => '隐藏', + 'Set status to 0'=> '设为隐藏', + 'Status 1' => '正常', + 'Set status to 1'=> '设为正常', + 'Createtime' => '创建时间', + 'Updatetime' => '更新时间' +]; diff --git a/application/admin/lang/zh-cn/notice.php b/application/admin/lang/zh-cn/notice.php new file mode 100644 index 0000000..cde8895 --- /dev/null +++ b/application/admin/lang/zh-cn/notice.php @@ -0,0 +1,15 @@ + 'ID', + 'Title' => '公告标题', + 'Image' => '公告主图', + 'Content' => '公告详情', + 'Status' => '公告状态', + 'Status 0' => '隐藏', + 'Set status to 0'=> '设为隐藏', + 'Status 1' => '正常', + 'Set status to 1'=> '设为正常', + 'Createtime' => '创建时间', + 'Updatetime' => '更新时间' +]; diff --git a/application/admin/model/content/Notice.php b/application/admin/model/content/Notice.php new file mode 100644 index 0000000..4ddf318 --- /dev/null +++ b/application/admin/model/content/Notice.php @@ -0,0 +1,53 @@ + __('Status 0'), '1' => __('Status 1')]; + } + + + public function getStatusTextAttr($value, $data) + { + $value = $value ? $value : (isset($data['status']) ? $data['status'] : ''); + $list = $this->getStatusList(); + return isset($list[$value]) ? $list[$value] : ''; + } + + public function getImageAttr($value) { + if(!empty($value)) return Request::instance()->domain().$value; + } + + + +} diff --git a/application/admin/model/shopro/goods/Goods.php b/application/admin/model/shopro/goods/Goods.php index 601334a..8fdf7c5 100644 --- a/application/admin/model/shopro/goods/Goods.php +++ b/application/admin/model/shopro/goods/Goods.php @@ -79,7 +79,8 @@ class Goods extends Common return [ 'express' => '快递物流', 'autosend' => '自动发货', - 'custom' => '商家发货' + 'custom' => '商家发货', + 'shopZt' => '到店自提' ]; } diff --git a/application/admin/validate/Notice.php b/application/admin/validate/Notice.php new file mode 100644 index 0000000..87d41ec --- /dev/null +++ b/application/admin/validate/Notice.php @@ -0,0 +1,27 @@ + [], + 'edit' => [], + ]; + +} diff --git a/application/admin/validate/content/Notice.php b/application/admin/validate/content/Notice.php new file mode 100644 index 0000000..c1ff8a7 --- /dev/null +++ b/application/admin/validate/content/Notice.php @@ -0,0 +1,27 @@ + [], + 'edit' => [], + ]; + +} diff --git a/application/admin/view/content/notice/add.html b/application/admin/view/content/notice/add.html new file mode 100644 index 0000000..e8108b1 --- /dev/null +++ b/application/admin/view/content/notice/add.html @@ -0,0 +1,47 @@ +
+ +
+ +
+ +
+
+
+ +
+
+ +
+ + +
+ +
+
    +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    + {foreach name="statusList" item="vo"} + + {/foreach} +
    + +
    +
    + +
    diff --git a/application/admin/view/content/notice/edit.html b/application/admin/view/content/notice/edit.html new file mode 100644 index 0000000..4ea54f7 --- /dev/null +++ b/application/admin/view/content/notice/edit.html @@ -0,0 +1,47 @@ +
    + +
    + +
    + +
    +
    +
    + +
    +
    + +
    + + +
    + +
    +
      +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      + {foreach name="statusList" item="vo"} + + {/foreach} +
      + +
      +
      + +
      diff --git a/application/admin/view/content/notice/index.html b/application/admin/view/content/notice/index.html new file mode 100644 index 0000000..65ab380 --- /dev/null +++ b/application/admin/view/content/notice/index.html @@ -0,0 +1,46 @@ +
      + +
      + {:build_heading(null,FALSE)} + +
      + + +
      +
      +
      +
      +
      + + {:__('Add')} + {:__('Edit')} + {:__('Delete')} + + + + + +
      + +
      +
      +
      + +
      +
      +
      diff --git a/application/admin/view/notice/add.html b/application/admin/view/notice/add.html new file mode 100644 index 0000000..e8108b1 --- /dev/null +++ b/application/admin/view/notice/add.html @@ -0,0 +1,47 @@ +
      + +
      + +
      + +
      +
      +
      + +
      +
      + +
      + + +
      + +
      +
        +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        + {foreach name="statusList" item="vo"} + + {/foreach} +
        + +
        +
        + +
        diff --git a/application/admin/view/notice/edit.html b/application/admin/view/notice/edit.html new file mode 100644 index 0000000..4ea54f7 --- /dev/null +++ b/application/admin/view/notice/edit.html @@ -0,0 +1,47 @@ +
        + +
        + +
        + +
        +
        +
        + +
        +
        + +
        + + +
        + +
        +
          +
          +
          +
          + +
          + +
          +
          +
          + +
          + +
          + {foreach name="statusList" item="vo"} + + {/foreach} +
          + +
          +
          + +
          diff --git a/application/admin/view/notice/index.html b/application/admin/view/notice/index.html new file mode 100644 index 0000000..0617e7c --- /dev/null +++ b/application/admin/view/notice/index.html @@ -0,0 +1,46 @@ +
          + +
          + {:build_heading(null,FALSE)} + +
          + + +
          +
          +
          +
          +
          + + {:__('Add')} + {:__('Edit')} + {:__('Delete')} + + + + + +
          + +
          +
          +
          + +
          +
          +
          diff --git a/application/admin/view/shopro/goods/goods/add.html b/application/admin/view/shopro/goods/goods/add.html index 62bc0d2..3d4db5b 100644 --- a/application/admin/view/shopro/goods/goods/add.html +++ b/application/admin/view/shopro/goods/goods/add.html @@ -770,9 +770,10 @@ 物流快递 + 到店自提 - +
          + +
          + + + 南京仓 + + + 江宁仓 + + + 南站仓 + + + 雨花仓 + + +
          +
          diff --git a/application/api/controller/Notice.php b/application/api/controller/Notice.php new file mode 100644 index 0000000..e98800e --- /dev/null +++ b/application/api/controller/Notice.php @@ -0,0 +1,16 @@ +paginate(10); + + $this->success('公告列表', $list); + } +} \ No newline at end of file diff --git a/public/assets/js/backend/content/notice.js b/public/assets/js/backend/content/notice.js new file mode 100644 index 0000000..97ece39 --- /dev/null +++ b/public/assets/js/backend/content/notice.js @@ -0,0 +1,55 @@ +define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) { + + var Controller = { + index: function () { + // 初始化表格参数配置 + Table.api.init({ + extend: { + index_url: 'content/notice/index' + location.search, + add_url: 'content/notice/add', + edit_url: 'content/notice/edit', + del_url: 'content/notice/del', + multi_url: 'content/notice/multi', + import_url: 'content/notice/import', + table: 'notice', + } + }); + + var table = $("#table"); + + // 初始化表格 + table.bootstrapTable({ + url: $.fn.bootstrapTable.defaults.extend.index_url, + pk: 'id', + sortName: 'id', + columns: [ + [ + {checkbox: true}, + {field: 'id', title: __('Id')}, + {field: 'title', title: __('Title'), operate: 'LIKE'}, + {field: 'image', title: __('Image'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image}, + {field: 'status', title: __('Status'), searchList: {"0":__('Status 0'),"1":__('Status 1')}, formatter: Table.api.formatter.status}, + {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, + {field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, + {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} + ] + ] + }); + + // 为表格绑定事件 + Table.api.bindevent(table); + }, + add: function () { + Controller.api.bindevent(); + }, + edit: function () { + Controller.api.bindevent(); + }, + api: { + bindevent: function () { + Form.api.bindevent($("form[role=form]")); + } + } + }; + return Controller; +}); diff --git a/public/assets/js/backend/notice.js b/public/assets/js/backend/notice.js new file mode 100644 index 0000000..18bb0f2 --- /dev/null +++ b/public/assets/js/backend/notice.js @@ -0,0 +1,55 @@ +define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) { + + var Controller = { + index: function () { + // 初始化表格参数配置 + Table.api.init({ + extend: { + index_url: 'notice/index' + location.search, + add_url: 'notice/add', + edit_url: 'notice/edit', + del_url: 'notice/del', + multi_url: 'notice/multi', + import_url: 'notice/import', + table: 'notice', + } + }); + + var table = $("#table"); + + // 初始化表格 + table.bootstrapTable({ + url: $.fn.bootstrapTable.defaults.extend.index_url, + pk: 'id', + sortName: 'id', + columns: [ + [ + {checkbox: true}, + {field: 'id', title: __('Id')}, + {field: 'title', title: __('Title'), operate: 'LIKE'}, + {field: 'image', title: __('Image'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image}, + {field: 'status', title: __('Status'), searchList: {"0":__('Status 0'),"1":__('Status 1')}, formatter: Table.api.formatter.status}, + {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, + {field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, + {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} + ] + ] + }); + + // 为表格绑定事件 + Table.api.bindevent(table); + }, + add: function () { + Controller.api.bindevent(); + }, + edit: function () { + Controller.api.bindevent(); + }, + api: { + bindevent: function () { + Form.api.bindevent($("form[role=form]")); + } + } + }; + return Controller; +}); diff --git a/public/assets/js/backend/shopro/goods/goods.js b/public/assets/js/backend/shopro/goods/goods.js index c68ea4e..8edf628 100644 --- a/public/assets/js/backend/shopro/goods/goods.js +++ b/public/assets/js/backend/shopro/goods/goods.js @@ -442,6 +442,14 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin service_ids: [], params: [], content: '', + shop_name_arr: [ + { + 1:'南京仓', + 2:'南京仓', + 3:'南京仓', + 4:'南京仓', + } + ] }, rules: { image: [{ required: true, message: '请选择商品主图', trigger: 'blur' }],