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(); } }