Your Name 3 年之前
父节点
当前提交
1db3c0ad18
共有 2 个文件被更改,包括 19 次插入8 次删除
  1. 10 5
      app/act/database/discount.php
  2. 9 3
      app/card/database/info.php

+ 10 - 5
app/act/database/discount.php

@@ -9,6 +9,10 @@ $cate = function()
     $where['project_id'] = 1;
     return Dever::db('category/info')->getTop($where);
 };
+$list_button = false;
+if(Dever::load('manage/auth')->checkFunc('act.discount', 'shopset', '商品设置')){
+    $list_button['location'] = array('商品设置', Dever::url('lib/goods_set.home', 'act'));
+}
 
 return array
 (
@@ -118,11 +122,12 @@ return array
         //'edit' => false,
         //'delete' => false,
         # 列表
-        'list_button' => array
-        (
-            //'edit' => array('预览', str_replace('https://api.', 'http://www.', Dever::url('main/preview.get?type=1'))),
-            'location' => array('商品设置', Dever::url('lib/goods_set.home', 'act')),
-        ),
+        'list_button' => $list_button,
+        // array
+        // (
+        //     //'edit' => array('预览', str_replace('https://api.', 'http://www.', Dever::url('main/preview.get?type=1'))),
+        //     'location' => array('商品设置', Dever::url('lib/goods_set.home', 'act')),
+        // ),
     ),
 
     # request 请求接口定义

+ 9 - 3
app/card/database/info.php

@@ -46,9 +46,15 @@ $list_button = array();
 if($search_auth == 1){
     $insert = true;
     $edit = true;
-    $list_button['fast'] = array('生成卡号', '"add&where_id=1&search_option_card_id={id}"', '{status} == 1');
-    $list_button['list1'] = array('卡号列表', '"code&search_option_card_id={id}&oper_table=info"');
-    $list_button['location1'] = array('可用商品设置', Dever::url('lib/goods_set.home', 'card'));
+    if(Dever::load('manage/auth')->checkFunc('card.info', 'sccard', '生成卡号')){
+        $list_button['fast'] = array('生成卡号', '"add&where_id=1&search_option_card_id={id}"', '{status} == 1');
+    }
+    if(Dever::load('manage/auth')->checkFunc('card.info', 'cardlist', '卡号列表')){
+        $list_button['list1'] = array('卡号列表', '"code&search_option_card_id={id}&oper_table=info"');
+    }
+    if(Dever::load('manage/auth')->checkFunc('card.info', 'kyshop', '可用商品设置')){
+        $list_button['location1'] = array('可用商品设置', Dever::url('lib/goods_set.home', 'card'));
+    }
     
 }
 return array