12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- <?php
- namespace app\api\controller;
- /**
-
- *
-
- *
- * ----------------------------------------------------------------------------
- *
-
- * 卖家商品控制器
- */
- class Sellergoodsadd extends MobileSeller
- {
- public function initialize()
- {
- parent::initialize(); // TODO: Change the autogenerated stub
- $this->obj = new Sellergoods($this->app);
- }
- /**
- * 三方店铺验证,商品数量,有效期
- */
- private function checkStore()
- {
- $goodsLimit = (int) $this->store_grade['storegrade_goods_limit'];
- if ($goodsLimit > 0) {
- // 是否到达商品数上限
- $goods_num = model('goods')->getGoodsCommonCount(array('store_id' => session('store_id')));
- if ($goods_num >= $goodsLimit) {
- ds_json_encode(10001, lang('store_goods_index_goods_limit') . $goodsLimit . lang('store_goods_index_goods_limit1'));
- }
- }
- }
- public function goods_class()
- {
- $this->obj->goods_class();
- }
- public function get_common_data()
- {
- $this->obj->get_common_data();
- }
- public function save_goods()
- {
- $this->checkStore();
- $this->obj->save_goods();
- }
- public function image_upload()
- {
- $this->obj->image_upload();
- }
- public function video_upload()
- {
- $this->obj->video_upload();
- }
- public function add_spec()
- {
- $this->obj->add_spec();
- }
- public function edit_image()
- {
- $this->obj->edit_image();
- }
- public function save_image()
- {
- $this->obj->save_image();
- }
- }
|