🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
#### 1.视图展示 文件路径:\shop\views\default\Seller\IndexCtl\index.php ~~~ <div class="m white-panel"> <div class="pannel_div"> <div class="mt"> <h3 class="bbc_seller_border"><?=__('店铺运营推广')?></h3> <h5><?=__('合理参加促销活动可以有效提升商品销量')?></h5> </div> <div class="mc"> <div class="content"> <?php if($data['promotion_items']['groupbuy_allow_flag']){ ?> <dl class="tghd"> <dt class="p-name"><a href="<?=Yf_Registry::get('url')?>?ctl=Seller_Promotion_GroupBuy&met=index&typ=e"><?=__('团购')?></a></dt> <dd class="p-ico"></dd> <dd class="p-hint"> <i class="icon-ok-sign"></i><?php if($data['promotion_items']['groupbuy_combo_flag']){ ?><?=__('已开通')?><?php }else{ ?><?=__('未开通')?><?php } ?> </dd> <dd class="p-info"><?=__('参与平台发起的团购活动提高商品成交量及店铺浏览量')?></dd> </dl> <?php } ?> <?php if($data['promotion_items']['promotion_allow_flag']){ ?> <dl class="zhxs"> <dt class="p-name"><a href="<?=Yf_Registry::get('url')?>?ctl=Seller_Promotion_Increase&met=index&typ=e&op=list"><?=__('加价购')?></a></dt> <dd class="p-ico"></dd> <dd class="p-hint"> <span><i class="icon-ok-sign"></i><?php if($data['promotion_items']['promotion_increase_combo_flag']){ ?><?=__('已开通')?><?php }else{ ?><?=__('未开通')?><?php } ?></span> </dd> <dd class="p-info"><?=__('商品优惠套餐、多重搭配更多实惠、商家必备营销方式')?></dd> </dl> <dl class="xszk"> <dt class="p-name"><a href="<?=Yf_Registry::get('url')?>?ctl=Seller_Promotion_Discount&met=index&typ=e"><?=__('限时折扣')?></a></dt> <dd class="p-ico"></dd> <dd class="p-hint"><span> <i class="icon-ok-sign"></i><?php if($data['promotion_items']['promotion_discount_combo_flag']){ ?><?=__('已开通')?><?php }else{ ?><?=__('未开通')?> <?php } ?> </span></dd> <dd class="p-info"><?=__('在规定时间段内对店铺中所选商品进行打折促销活动')?></dd> </dl> <dl class="mjs"> <dt class="p-name"><a href="<?=Yf_Registry::get('url')?>?ctl=Seller_Promotion_MeetConditionGift&met=index&typ=e"><?=__('满即送')?></a></dt> <dd class="p-ico"></dd> <dd class="p-hint"><span> <i class="icon-ok-sign"></i><?php if($data['promotion_items']['promotion_mansong_combo_flag']){ ?><?=__('已开通')?><?php }else{ ?><?=__('未开通')?> <?php } ?> </span></dd> <dd class="p-info"><?=__('商家自定义满即送标准与规则,促进购买转化率')?></dd> </dl> <?php } ?> <?php if($data['promotion_items']['voucher_allow_flag']){ ?> <dl class="djq"> <dt class="p-name"><a href="<?=Yf_Registry::get('url')?>?ctl=Seller_Promotion_Voucher&met=index&typ=e"><?=__('代金券')?></a></dt> <dd class="p-ico"></dd> <dd class="p-hint"><span> <i class="icon-ok-sign"></i><?php if($data['promotion_items']['voucher_combo_flag']){ ?><?=__('已开通')?><?php }else{ ?><?=__('未开通')?> <?php } ?> </span> </dd> <dd class="p-info"><?=__('自定义代金券使用规则并由平台统一展示供买家领取')?></dd> </dl> <?php } ?> <?php if(Web_ConfigModel::value('Plugin_Directseller')&&(@$this->shopBase['shop_type'] != 2)){ ?> <dl class="xsy"> <dt class="p-name"> <a href="<?=Yf_Registry::get('url')?>?ctl=Distribution_Seller_Setting&met=index&typ=e"><?=__('销售员')?></a> </dt> <dd class="p-ico"></dd> <dd class="p-hint"> <span> <i class="icon-ok-sign"></i> <?=__('已开通')?> </span> </dd> <dd class="p-info"><?=__('让客户来推广店铺,获得佣金')?></dd> </dl> <?php } ?> </div> </div> </div> </div> ~~~ #### 2.数据获取 接口地址:index.php?ctl=Seller_Index&met=index&typ=e 接口文件:\shop\controllers\Seller\IndexCtl.php 控制器:Seller_IndexCtl 方法:index() ~~~ //自营店铺 if($shop_base['shop_self_support'] == 'true') { //管理员后台团购功能开启 if(Web_ConfigModel::value('groupbuy_allow')) { $data['promotion_items']['groupbuy_allow_flag'] = true; $data['promotion_items']['groupbuy_combo_flag'] = true; } else { $data['promotion_items']['groupbuy_allow_flag'] = false; } //管理员后台促销功能开启 if(Web_ConfigModel::value('promotion_allow')) { $data['promotion_items']['promotion_allow_flag'] = true; $data['promotion_items']['promotion_increase_combo_flag'] = true; $data['promotion_items']['promotion_discount_combo_flag'] = true; $data['promotion_items']['promotion_mansong_combo_flag'] = true; } else { $data['promotion_items']['promotion_allow_flag'] = false; } //积分中心、积分兑换、代金券 同时开启,代金券功能才可用 if(Web_ConfigModel::value('pointshop_isuse') && Web_ConfigModel::value('pointprod_isuse') && Web_ConfigModel::value('voucher_allow')) { $data['promotion_items']['voucher_allow_flag'] = true; $data['promotion_items']['voucher_combo_flag'] = true; } else { $data['promotion_items']['voucher_allow_flag'] = false; } } else //非自营店铺 { //管理员后台团购功能开启 if(Web_ConfigModel::value('groupbuy_allow')) { $data['promotion_items']['groupbuy_allow_flag'] = true; //套餐状态是否可用 $groupbuyComboModel = new GroupBuy_QuotaModel(); $data['promotion_items']['groupbuy_combo_flag'] = $groupbuyComboModel->checkQuotaStateByShopId(Perm::$shopId); } else { $data['promotion_items']['groupbuy_allow_flag'] = false; } //管理员后台促销功能开启 if(Web_ConfigModel::value('promotion_allow')) { $data['promotion_items']['promotion_allow_flag'] = true; //加价购套餐状态 $increaseComboModel = new Increase_ComboModel(); $data['promotion_items']['promotion_increase_combo_flag'] = $increaseComboModel->checkQuotaStateByShopId(Perm::$shopId); //限时折扣套餐状态 $discountQuotaModel = new Discount_QuotaModel(); $data['promotion_items']['promotion_discount_combo_flag'] = $discountQuotaModel->checkQuotaStateByShopId(Perm::$shopId); //满级送套餐状态 $manSongQuotaModel = new ManSong_QuotaModel(); $data['promotion_items']['promotion_mansong_combo_flag'] = $manSongQuotaModel->checkQuotaStateByShopId(Perm::$shopId); } else { $data['promotion_items']['promotion_allow_flag'] = false; } //积分中心、积分兑换、代金券 同时开启,代金券功能才可用 if(Web_ConfigModel::value('pointshop_isuse') && Web_ConfigModel::value('pointprod_isuse') && Web_ConfigModel::value('voucher_allow')) { $data['promotion_items']['voucher_allow_flag'] = true; //代金券套餐状态 $voucherQuotaModel = new Voucher_quotaModel(); $data['promotion_items']['voucher_combo_flag'] = $voucherQuotaModel->checkQuotaStateByShopId(Perm::$shopId); } else { $data['promotion_items']['voucher_allow_flag'] = false; } } ~~~