123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- <?php
- namespace app\api\controller;
- /**
- * ============================================================================
- *
- * ============================================================================
- * 版权所有 2014-2028 浙江惠利玛产业互联网有限公司,并保留所有权利。
- * 网站地址: https://www.valimart.net/
- * ----------------------------------------------------------------------------
- *
- * ============================================================================
- * 卖家商品控制器
- */
- 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();
- }
- }
- ?>
|