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