初始化代码

This commit is contained in:
2025-12-22 14:32:54 +08:00
parent e27ab90d9f
commit d02b31a8b9
1459 changed files with 240973 additions and 0 deletions

View File

@@ -0,0 +1,596 @@
<?php
/**
* Created by PhpStorm.
* User: shuixian
* Date: 2019/11/20
* Time: 18:29
*/
$tmp = sassAuth()==1?',{
"name": "PurchaseList",
"url": "/malls/purchase"
}':'';
$malls = <<<MALLS
{
"path": "/malls",
"component": "Layout",
"redirect": "/malls/list",
"meta": {
"menuName": "Malls",
"icon": "icon-gouwudai",
"subNavName": [{
"name": "MallsManage",
"url": [{
"name": "GoodsList",
"url": "/malls/list"
}, {
"name": "GoodsClassify",
"url": "/malls/classify"
}, {
"name": "ParameterManagement",
"url": "/malls/parameter"
} $tmp
]
}, {
"name": "StoreManage",
"url": [{
"name": "StoreList",
"url": "/malls/storeManage"
}]
}, {
"name": "OrderManage",
"url": [{
"name": "OrderManage",
"url": "/malls/orderManage"
}, {
"name": "RefundManage",
"url": "/malls/refundManage"
}]
}, {
"name": "MarketingManage",
"url": [{
"name": "AssembleList",
"url": "/malls/assemble"
}, {
"name": "RedPackit",
"url": "/malls/redPackit"
}]
}, {
"name": "MallsSet",
"url": [{
"name": "DealSet",
"url": "/malls/dealSet"
}, {
"name": "VirtualPaymentSet",
"url": "/malls/virtualPayment"
}, {
"name": "StaffChoiceGoods",
"url": "/malls/staffGoods"
}, {
"name": "MallsBanner",
"url": "/malls/banner"
}]
}, {
"name": "Distributioninfo",
"url": [{
"name": "ProfitInfo",
"url": "/malls/profit"
}, {
"name": "CommissionInfo",
"url": "/malls/commission"
}, {
"name": "TakeCashInfo",
"url": "/malls/cash"
}, {
"name": "DistributionRelation",
"url": "/malls/relation"
}, {
"name": "DistributionSetting",
"url": "/malls/disSet"
}, {
"name": "DistributionCash",
"url": "/malls/disCash"
}, {
"name": "DistributionAudit",
"url": "/malls/disaudit"
}]
}]
},
"children": [{
"path": "list",
"name": "GoodsList",
"component": "/malls/goods/list",
"meta": {
"keepAlive": true,
"refresh": false,
"title": "MallsManage",
"isOnly": false,
"auth": [],
"pagePermission": [{
"title": "GoodsList",
"index": 0,
"auth": ["view", "add", "edit", "del", "outport"]
}]
}
}, {
"path": "edit",
"name": "GoodsEdit",
"component": "/malls/goods/edit",
"meta": {
"title": "MallsManage",
"isOnly": false,
"auth": [],
"pagePermission": [{
"title": "GoodsEdit",
"index": 0,
"auth": ["view", "add", "edit", "del", "outport"]
}]
}
}, {
"path": "classify",
"name": "GoodsClassify",
"component": "/malls/goods/classify",
"meta": {
"keepAlive": true,
"refresh": false,
"title": "MallsManage",
"isOnly": false,
"auth": [],
"pagePermission": [{
"title": "GoodsClassify",
"index": 0,
"auth": ["view", "add", "edit", "del", "outport"]
}]
}
}, {
"path": "addClassify",
"name": "SpecsClassify",
"component": "/malls/goods/addClassify",
"meta": {
"title": "MallsManage",
"isOnly": false,
"auth": [],
"pagePermission": [{
"title": "AddClassify",
"index": 0,
"auth": ["view", "add", "edit", "del", "outport"]
}]
}
}, {
"path": "parameter",
"name": "ParameterManagement",
"component": "/malls/goods/parameter",
"meta": {
"keepAlive": true,
"refresh": false,
"title": "MallsManage",
"isOnly": false,
"auth": [],
"pagePermission": [{
"title": "ParameterManagement",
"index": 0,
"auth": ["view", "add", "edit", "del", "outport"]
}]
}
}, {
"path": "parimary",
"name": "parimar",
"component": "/malls/goods/parimary",
"meta": {
"title": "MallsManage",
"isOnly": false,
"auth": [],
"pagePermission": [{
"title": "parimar",
"index": 0,
"auth": ["view", "add", "edit", "del", "outport"]
}]
}
}, {
"path": "secndparimary",
"name": "secndParimar",
"component": "/malls/goods/secndparimary",
"meta": {
"title": "MallsManage",
"isOnly": false,
"auth": [],
"pagePermission": [{
"title": "secndParimar",
"index": 0,
"auth": ["view", "add", "edit", "del", "outport"]
}]
}
}, {
"path": "purchase",
"name": "PurchaseList",
"component": "/malls/goods/purchase",
"meta": {
"keepAlive": true,
"refresh": false,
"title": "MallsManage",
"isOnly": false,
"auth": [],
"pagePermission": [{
"title": "PurchaseList",
"index": 0,
"auth": ["view", "add", "edit", "del", "outport"]
}]
}
}, {
"path": "editPurchase",
"name": "PurchaseAdd",
"component": "/malls/goods/editPurchase",
"meta": {
"title": "MallsManage",
"isOnly": false,
"auth": [],
"pagePermission": [{
"title": "PurchaseAdd",
"index": 0,
"auth": ["view", "add", "edit", "del", "outport"]
}]
}
},
{
"path": "wholesale",
"name": "WholesaleList",
"component": "/malls/goods/wholesale",
"meta": {
"keepAlive": true,
"refresh": false,
"title": "MallsManage",
"isOnly": false,
"auth": [],
"pagePermission": [{
"title": "WholesaleList",
"index": 0,
"auth": ["view", "add", "edit", "del", "outport"]
}]
}
}, {
"path": "editWholesale",
"name": "WholesaleAdd",
"component": "/malls/goods/editWholesale",
"meta": {
"title": "MallsManage",
"isOnly": false,
"auth": [],
"pagePermission": [{
"title": "WholesaleAdd",
"index": 0,
"auth": ["view", "add", "edit", "del", "outport"]
}]
}
}
,{
"path": "storeManage",
"name": "StoreList",
"component": "/malls/store/list",
"meta": {
"keepAlive": true,
"title": "MallsManage",
"isOnly": false,
"auth": [],
"pagePermission": [{
"title": "StoreList",
"index": 0,
"auth": ["view", "add", "edit", "del", "outport"]
}]
}
}, {
"path": "store",
"name": "StoreAdd",
"component": "/malls/store/edit",
"meta": {
"title": "MallsManage",
"isOnly": false,
"auth": [],
"pagePermission": [{
"title": "StoreAdd",
"index": 0,
"auth": ["view", "add", "edit", "del", "outport"]
}]
}
}, {
"path": "orderManage",
"name": "OrderManage",
"component": "/malls/order/manage",
"meta": {
"keepAlive": true,
"title": "MallsManage",
"isOnly": false,
"auth": [],
"pagePermission": [{
"title": "OrderManage",
"index": 0,
"auth": ["view", "add", "edit", "del", "outport"]
}]
}
}, {
"path": "orderDetail",
"name": "OrderDetail",
"component": "/malls/order/detail",
"meta": {
"title": "MallsManage",
"isOnly": false,
"auth": [],
"pagePermission": [{
"title": "OrderDetail",
"index": 0,
"auth": ["view", "add", "edit", "del", "outport"]
}]
}
}, {
"path": "refundManage",
"name": "RefundManage",
"component": "/malls/order/refund",
"meta": {
"keepAlive": true,
"title": "MallsManage",
"isOnly": false,
"auth": [],
"pagePermission": [{
"title": "RefundManage",
"index": 0,
"auth": ["view", "add", "edit", "del", "outport"]
}]
}
}, {
"path": "newAssemble",
"name": "NewAssemble",
"component": "/malls/marketing/newAssemble",
"meta": {
"keepAlive": true,
"title": "MallsManage",
"isOnly": false,
"auth": [],
"pagePermission": [{
"title": "NewAssemble",
"index": 0,
"auth": ["view", "add", "edit", "del", "outport"]
}]
}
}, {
"path": "assemble",
"name": "AssembleList",
"component": "/malls/marketing/assemble",
"meta": {
"title": "MallsManage",
"isOnly": false,
"auth": [],
"pagePermission": [{
"title": "AssembleList",
"index": 0,
"auth": ["view", "add", "edit", "del", "outport"]
}]
}
}, {
"path": "assembleManage",
"name": "AssembleManage",
"component": "/malls/marketing/assembleManage",
"meta": {
"title": "MallsManage",
"isOnly": false,
"auth": [],
"pagePermission": [{
"title": "AssembleManage",
"index": 0,
"auth": ["view", "add", "edit", "del", "outport"]
}]
}
}, {
"path": "redPackit",
"name": "RedPackit",
"component": "/malls/marketing/redPackit",
"meta": {
"keepAlive": true,
"title": "MallsManage",
"isOnly": false,
"auth": [],
"pagePermission": [{
"title": "RedPackit",
"index": 0,
"auth": ["view", "add", "edit", "del", "outport"]
}]
}
}, {
"path": "addRedPackit",
"name": "EditRedPackit",
"component": "/malls/marketing/addRedPackit",
"meta": {
"title": "MallsManage",
"isOnly": false,
"auth": [],
"pagePermission": [{
"title": "EditRedPackit",
"index": 0,
"auth": ["view", "add", "edit", "del", "outport"]
}]
}
}, {
"path": "dealSet",
"name": "DealSet",
"component": "/malls/set/deal",
"meta": {
"title": "MallsManage",
"isOnly": false,
"auth": [],
"pagePermission": [{
"title": "DealSet",
"index": 0,
"auth": ["view", "add", "edit", "del", "outport"]
}]
}
}, {
"path": "virtualPayment",
"name": "VirtualPaymentSet",
"component": "/malls/set/payment",
"meta": {
"title": "MallsManage",
"isOnly": false,
"auth": [],
"pagePermission": [{
"title": "VirtualPaymentSet",
"index": 0,
"auth": ["view", "add", "edit", "del", "outport"]
}]
}
}, {
"path": "banner",
"name": "MallsBanner",
"component": "/malls/set/banner",
"meta": {
"keepAlive": true,
"title": "MallsManage",
"isOnly": false,
"auth": [],
"pagePermission": [{
"title": "MallsBanner",
"index": 0,
"auth": ["view", "add", "edit", "del", "outport"]
}]
}
}, {
"path": "editBanner",
"name": "EditBanner",
"component": "/malls/set/editBanner",
"meta": {
"title": "MallsManage",
"isOnly": false,
"auth": [],
"pagePermission": [{
"title": "EditBanner",
"index": 0,
"auth": ["view", "add", "edit", "del", "outport"]
}]
}
}, {
"path": "staffGoods",
"name": "StaffChoiceGoods",
"component": "/malls/set/staffGoods",
"meta": {
"title": "MallsManage",
"isOnly": false,
"auth": [],
"pagePermission": [{
"title": "StaffChoiceGoods",
"index": 0,
"auth": ["view", "add", "edit", "del", "outport"]
}]
}
}, {
"path": "profit",
"component": "/malls/distribution/profit",
"name": "ProfitInfo",
"meta": {
"title": "MallsManage",
"auth": [],
"isOnly": false,
"keepAlive": true,
"pagePermission": [{
"title": "ProfitInfo",
"index": 0,
"auth": ["view", "add", "edit", "del", "outport"]
}]
}
}, {
"path": "commission",
"component": "/malls/distribution/commission",
"name": "CommissionInfo",
"meta": {
"title": "MallsManage",
"auth": [],
"isOnly": false,
"keepAlive": true,
"pagePermission": [{
"title": "CommissionInfo",
"index": 0,
"auth": ["view", "add", "edit", "del", "outport"]
}]
}
}, {
"path": "cash",
"component": "/malls/distribution/takeCash",
"name": "TakeCashInfo",
"meta": {
"title": "MallsManage",
"auth": [],
"isOnly": false,
"keepAlive": true,
"pagePermission": [{
"title": "TakeCashInfo",
"index": 0,
"auth": ["view", "add", "edit", "del", "outport"]
}]
}
}, {
"path": "relation",
"component": "/malls/distribution/relation",
"name": "DistributionRelation",
"meta": {
"title": "MallsManage",
"auth": [],
"isOnly": false,
"keepAlive": true,
"pagePermission": [{
"title": "DistributionRelation",
"index": 0,
"auth": ["view", "add", "edit", "del", "outport"]
}]
}
}, {
"path": "disSet",
"component": "/malls/distribution/set",
"name": "DistributionSetting",
"meta": {
"title": "MallsManage",
"auth": [],
"isOnly": false,
"pagePermission": [{
"title": "DistributionSetting",
"index": 0,
"auth": ["view", "add", "edit", "del", "outport"]
}]
}
}, {
"path": "disCash",
"component": "/malls/distribution/cash",
"name": "DistributionCash",
"meta": {
"title": "MallsManage",
"auth": [],
"isOnly": false,
"pagePermission": [{
"title": "DistributionCash",
"index": 0,
"auth": ["view", "add", "edit", "del", "outport"]
}]
}
}, {
"path": "disaudit",
"component": "/malls/distribution/audit",
"name": "DistributionAudit",
"meta": {
"title": "MallsManage",
"auth": [],
"isOnly": false,
"pagePermission": [{
"title": "DistributionAudit",
"index": 0,
"auth": ["view", "add", "edit", "del", "outport"]
}]
}
}]
}
MALLS;
//return json_decode($menu, true) ;
return ["shop" => $malls];

View File

@@ -0,0 +1,51 @@
<?php
/**
* Created by PhpStorm.
* User: shuixian
* Date: 2019/11/20
* Time: 18:29
*/
$goods = <<<GOODS
{
"title":"商品列表",
"type":"goodsList",
"icon":"iconGoodsList",
"isDelete":true,
"addNumber":1,
"attr":[
],
"data":{
"title":"商品列表",
"isShowPush":false,
"limit":""
},
"dataList":[
]
}
GOODS;
$search = <<<SEARCH
{"title":"搜索栏","type":"search","iconPath":"iconsousuo","isDelete":true,"addNumber":1,"attr":[{"title":"是否显示分类","type":"Switch","name":"isShowCateAll"}],"data":{"placeholder":"请输入搜索内容","isShowCateAll":true}}
SEARCH;
//模块组件 后台DIY页面的左侧
return [
[
"title" => "业务组件",
'type' => 'shopCompoent',
'data' =>[
json_decode($search, true),
json_decode($goods, true),
]
],
];

View File

@@ -0,0 +1,276 @@
<?php
/**
* Created by PhpStorm.
* User: shuixian
* Date: 2019/11/20
* Time: 18:29
*/
$defaultPage=<<<DEFAULT
{
"key": 2,
"list": [{
"title": "搜索栏",
"type": "search",
"iconPath": "iconsousuo",
"isDelete": true,
"addNumber": 1,
"attr": [{
"title": "是否显示全部分类",
"type": "Switch",
"name": "isShowCateAll"
}],
"data": {
"placeholder": "请输入搜索内容",
"isShowCateAll": true
}
},
{
"title": "轮播图",
"type": "banner",
"icon": "iconlunbo",
"isDelete": true,
"addNumber": 9999,
"attr": [{
"title": "选择模板",
"type": "ChooseModule",
"name": "bannerName",
"data": [{
"title": "通屏轮播",
"name": "banner-tongping",
"img": "http://longbingcdn.xiaochengxucms.com/admin/diy/banner-tongping.png"
}]
},
{
"title": "图片列表",
"type": "ImageLink",
"name": "bannerList",
"isDraggable": true,
"isDelete": true,
"data": [{
"title": "图片",
"type": "UploadImage",
"name": "img",
"desc": "750*350"
},
{
"title": "链接类型",
"type": "Select",
"name": "linkType",
"data": [{
"label": "小程序内部页面",
"value": 4
},
{
"label": "其他小程序",
"value": 2
},
{
"label": "跳转网页",
"value": 3
},
{
"label": "拨打电话",
"value": 1
}
]
},
{
"title": "链接地址",
"type": "Tag",
"name": "link"
}
]
},
{
"title": "添加模板",
"type": "Add",
"name": "addMouduleName",
"addNumber": 10,
"data": [{
"link": [{
"title": ""
}],
"linkType": 4,
"img": [{
"url": "http://longbingcdn.xiaochengxucms.com/admin/diy/default.png"
}]
}]
}
],
"data": {
"style": {
"height": 350,
"whiteSpace": 0,
"wingBlank": 0
},
"bannerName": "banner-tongping",
"addMouduleName": "bannerList",
"bannerList": []
},
"id": 1591856492396,
"compontents": "base"
},
{
"title": "导航",
"type": "column",
"icon": "icondaohang1",
"isDelete": true,
"addNumber": 9999,
"attr": [{
"title": "多少行",
"type": "InputNumber",
"name": "row"
},
{
"title": "每行多少列",
"type": "InputNumber",
"name": "col"
},
{
"title": "图片列表",
"type": "ImageLink",
"name": "columnList",
"isDraggable": true,
"isDelete": true,
"data": [{
"title": "按钮文字",
"type": "Input",
"name": "title"
},
{
"title": "图片",
"type": "UploadImage",
"name": "img",
"desc": "100*100"
},
{
"title": "链接类型",
"type": "Select",
"name": "linkType",
"data": [{
"label": "小程序内部页面",
"value": 4
},
{
"label": "其他小程序",
"value": 2
},
{
"label": "跳转网页",
"value": 3
},
{
"label": "拨打电话",
"value": 1
}
]
},
{
"title": "链接地址",
"type": "Tag",
"name": "link"
}
]
},
{
"title": "添加模板",
"type": "Add",
"name": "addMouduleName",
"addNumber": 16,
"data": [{
"link": [{
"title": ""
}],
"linkType": 4,
"img": [{
"url": "http://longbingcdn.xiaochengxucms.com/admin/diy/default.png"
}]
}]
}
],
"data": {
"row": {
"number": 2,
"min": 1,
"max": 2
},
"col": {
"number": 4,
"min": 4,
"max": 5
},
"style": {
"fontColor": "#666",
"background": "#ffffff",
"whiteSpace": 30,
"wingBlank": 0
},
"addMouduleName": "columnList",
"columnList": []
},
"id": 1591856495749,
"compontents": "base"
},
{
"title": "卡券",
"type": "couponList",
"icon": "iconCouponList",
"isDelete": true,
"addNumber": 1,
"attr": [{
"title": "模板名称",
"type": "Input",
"name": "title",
"maxLength": 10
},
{
"title": "卡券样式",
"type": "Radio",
"name": "type",
"data": [{
"label": 1,
"title": "弹窗样式"
},
{
"label": 2,
"title": "列表样式"
}
]
}
],
"data": {
"title": "领取卡券",
"type": 2,
"dataList": []
},
"id": 1591856498485,
"compontents": "operate"
},
{
"title": "商品列表",
"type": "goodsList",
"icon": "iconGoodsList",
"isDelete": true,
"addNumber": 1,
"attr": [],
"data": {
"title": "商品列表",
"limit": "",
"dataList": []
},
"id": 1591856499273,
"compontents": "shopCompoent"
}
]
}
DEFAULT;
$pages = json_decode( $defaultPage , true);
return $pages;

View File

@@ -0,0 +1,46 @@
<?php
/**
* Created by PhpStorm.
* User: shuixian
* Date: 2019/11/20
* Time: 18:29
*/
//模块组件 后台DIY页面的左侧
return [
//链接类型
[
'key' => 2,
"title" => "商城",
"type" => "shop",
"data" => [
[
//接口请求路径 api_path 不为空, 返回 page + '?' 数据参数
"api_path" => "/diy/admin/Module/functionPage",
//已经取消了
//"params"=>"{"page" : "PAGE", "page_count" : "PAGE_COUNT"}",
"title" => "功能页面",
//小程序路径
"page" => "common_page"
],[
//接口请求路径 api_path 不为空, 返回 page + '?' 数据参数
"api_path" => "/shop/admin/AdminShopType/cateInfoPage",
//已经取消了
//"params"=>"{"page" : "PAGE", "page_count" : "PAGE_COUNT"}",
"title" => "商品分类页面",
//小程序路径
"page" => "/shop/pages/filter"
],[
//接口请求路径 api_path 不为空, 返回 page + '?' 数据参数
"api_path" => "/shop/admin/AdminShopGoods/goodsInfoPage",
//已经取消了
//"params"=>"{"page" : "PAGE", "page_count" : "PAGE_COUNT"}",
"title" => "商品详情页面",
//小程序路径
"page" => "/pages/shop/detail"
],
]
],
];

View File

@@ -0,0 +1,42 @@
<?php
/**
* Created by PhpStorm.
* User: shuixian
* Date: 2019/11/20
* Time: 18:29
*/
//底部菜单自定义
return [
[
//底部菜单编号
'key' => 2 ,
//是否显示
'is_show' => 1 ,
//图标
'iconPath' => 'icon-shangcheng1',
//选中图标样式
'selectedIconPath' => 'icon-shangcheng',
//那个页面 英文名称
'pageComponents' => 'shopHome',
//名称
'name' => '商城',
'url' => '',
'url_jump_way' => '0',
'url_out' => '',
'is_delete' => false ,
'bind_compoents'=>[
'base',
'shopCompoent',
'operate'
],
'bind_links' => [
'shop'
],
'page'=> []
],
];

View File

@@ -0,0 +1,86 @@
<?php
/**
* Created by PhpStorm.
* User: shuixian
* Date: 2019/11/20
* Time: 18:29
*/
//模块组件 后台DIY页面的左侧
$tmp = [
//链接类型
[
'id'=>'',
'level'=>1,
'key'=> 2,
//"params"=>"{"page" : "PAGE", "page_count" : "PAGE_COUNT"}",
"title" => "商城页面",
//小程序路径
"path" => "/pages/user/home?key=2&staff_id="
],[
'id'=>'',
'level'=>2,
'key'=> 2,
//"params"=>"{"page" : "PAGE", "page_count" : "PAGE_COUNT"}",
"title" => "商城购物车",
//小程序路径
"path" => "/shop/pages/cart"
],[
'id'=>'',
'level'=>2,
'key'=> 2,
//"params"=>"{"page" : "PAGE", "page_count" : "PAGE_COUNT"}",
"title" => "商城卡券列表",
//小程序路径
"path" => "/shop/pages/coupon/receive?staff_id="
],
[
'id'=>'',
'level'=>2,
'key'=> 2,
//"params"=>"{"page" : "PAGE", "page_count" : "PAGE_COUNT"}",
"title" => "商城全部分类",
//小程序路径
"path" => "/shop/pages/cate"
],
[
'id'=>'',
'level'=>2,
'key'=> 2,
//"params"=>"{"page" : "PAGE", "page_count" : "PAGE_COUNT"}",
"title" => "商城采购模版",
//小程序路径
"path" => "/shop/pages/purchase/list?staff_id="
],
[
'id'=>'',
'level'=>2,
'key'=> 2,
//"params"=>"{"page" : "PAGE", "page_count" : "PAGE_COUNT"}",
"title" => "商城砍价列表页",
//小程序路径
"path" => "/shop/pages/bargain/list?staff_id="
],
];
return $tmp;

32
app/massage/info/Info.php Normal file
View File

@@ -0,0 +1,32 @@
<?php
/**
* Created by PhpStorm.
* User: shuixian
* Date: 2019/11/20
* Time: 18:30
*/
return [
//模块名称[必填]
'name' => 'massage',
//模块标题[必填]
'title' =>'商城',
//内容简介
'desc' =>'',
//封面图标
'icon' =>'',
//模块类型[必填] model:模块 可以出现在左侧一级 app:应用中心 , 是一个应用中心的应用
'type' => 'model',
// 模块唯一标识[必填],格式:模块名.开发者标识.module
'identifier' => 'shop.longbing.module',
// 版本[必填],格式采用三段式:主版本号.次版本号.修订版本号
'version' => '1.0.82',
// 模块依赖[可选],格式[[模块名, 模块唯一标识, 依赖版本, 对比方式]]
'need_module'=> [],
// 应用依赖[可选],格式[[插件名, 应用唯一标识, 依赖版本, 对比方式]]
'need_app' => [],
//订阅消息
'tmpl_name'=>['pay_order','send_order']
];

View File

@@ -0,0 +1,106 @@
<?php
// +----------------------------------------------------------------------
// | Longbing [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright Chengdu longbing Technology Co., Ltd.
// +----------------------------------------------------------------------
// | Website http://longbing.org/
// +----------------------------------------------------------------------
// | Sales manager: +86-13558882532 / +86-13330887474
// | Technical support: +86-15680635005
// | After-sale service: +86-17361005938
// +----------------------------------------------------------------------
declare(strict_types=1);
namespace app\shop\info;
use longbingcore\permissions\PermissionAbstract;
/**
* 商城模块功能权限
* Class PermissionAppstore
*/
class PermissionShop extends PermissionAbstract {
const tabbarKey = null;
//后台管理菜单对应key[必填] , 当前模块文件夹名称
const adminMenuKey = 'shop';
public $saasKey ;
const apiPaths = [];
public function __construct(int $uniacid,$infoConfigOptions = [])
{
$this->saasKey = longbing_get_auth_prefix('AUTH_SHOP') ;
parent::__construct($uniacid, self::tabbarKey, self::adminMenuKey, $this->saasKey, self::apiPaths , $infoConfigOptions);
}
/**
* 返回saas端授权结果
* @return bool
*/
public function sAuth(): bool
{
if(!$this->getAuthIsSaasCheck()){
return true ;
}
return $this->sassValue == 1 ? true : false;
}
/**
* 返回p端授权结果
* @return bool
*/
public function pAuth(): bool
{
if (!$this->sAuth()) {
return false;
};
//代理管理端可以控制商城是否展示权限 , 这里需要判断权限
$pAuthConfig = $this->getPAuthConfig();
//必须平台授权才能使用
//dump($this->getAuthIsPlatformCheck());exit;
if($this->getAuthIsPlatformCheck()){
//根据授权而定
if ($pAuthConfig ){
// dump($pAuthConfig);exit;
return $pAuthConfig['shop_switch'] ? true : false ;
}
}
return true;
}
/**
* 返回c端授权结果
*
* @param int $user_id
* @return bool
* @author ArtizanZhang
* @DataTime: 2019/12/9 17:13
*/
public function cAuth(int $user_id): bool
{
return true;
}
/**
* 添加商品数量
*
* @author shuixian
* @DataTime: 2019/12/19 19:02
*/
public function getAddGoodsNumber(){
return $this->getAuthVaule( longbing_get_auth_prefix('AUTH_GOODS') , 4);
}
}

View File

@@ -0,0 +1,204 @@
<?php
$radar_msg = [
[
"sign"=> "copy",
"type"=> 8,
"max"=> 0,
"pid"=> 0,
"msg"=> "请及时留意雷达动态",
"operation"=> "咨询",
"item"=> "产品",
"show_count"=> 1,
"table_name"=> "",
"field"=> "",
"send"=> 1,
"uniacid"=> 2,
"status"=> 1
],
[
"sign"=> "view",
"type"=> 1,
"max"=> 0,
"pid"=> 0,
"msg"=> "请尽快把握商机",
"operation"=> "浏览",
"item"=> "商城列表",
"show_count"=> 1,
"table_name"=> "longbing_card_shop_type",
"field"=> "title",
"send"=> 1,
"uniacid"=> 2,
"status"=> 1
],
[
"sign"=> "view",
"type"=> 2,
"max"=> 0,
"pid"=> 0,
"msg"=> "请尽快把握商机,主动提供细致的商品讲解将大大有利于成交",
"operation"=> "正在查看",
"item"=> "商品",
"show_count"=> 0,
"table_name"=> "longbing_card_goods",
"field"=> "name",
"send"=> 1,
"uniacid"=> 2,
"status"=> 1
],
[
"sign"=> "view",
"type"=> 11,
"max"=> 0,
"pid"=> 0,
"msg"=> "请尽快把握商机",
"operation"=> "浏览",
"item"=> "商品分类列表",
"show_count"=> 1,
"table_name"=> "longbing_card_shop_type",
"field"=> "title",
"send"=> 1,
"uniacid"=> 2,
"status"=> 1
],
[
"sign"=> "view",
"type"=> 19,
"max"=> 0,
"pid"=> 0,
"msg"=> "请前往订单中心查看详情",
"operation"=> "订单商品已发货,系统订单号为:",
"item"=> "",
"show_count"=> 0,
"table_name"=> "longbing_card_shop_order",
"field"=> "out_trade_no",
"send"=> 1,
"uniacid"=> 2,
"status"=> 1
],
[
"sign"=> "view",
"type"=> 20,
"max"=> 0,
"pid"=> 0,
"msg"=> "请前往订单中心查看详情",
"operation"=> "自提商品已提货",
"item"=> "",
"show_count"=> 0,
"table_name"=> "longbing_card_shop_order",
"field"=> "out_trade_no",
"send"=> 1,
"uniacid"=> 2,
"status"=> 1
],
[
"sign"=> "view",
"type"=> 21,
"max"=> 0,
"pid"=> 0,
"msg"=> "请等待管理员审核并注意查收",
"operation"=> "已申请退款",
"item"=> "",
"show_count"=> 0,
"table_name"=> "longbing_card_shop_order",
"field"=> "out_trade_no",
"send"=> 1,
"uniacid"=> 2,
"status"=> 1
],
[
"sign"=> "view",
"type"=> 22,
"max"=> 0,
"pid"=> 0,
"msg"=> "请前往订单中心查看详情",
"operation"=> "已取消申请退款",
"item"=> "",
"show_count"=> 0,
"table_name"=> "longbing_card_shop_order",
"field"=> "out_trade_no",
"send"=> 1,
"uniacid"=> 2,
"status"=> 1
],
[
"sign"=> "view",
"type"=> 23,
"max"=> 0,
"pid"=> 0,
"msg"=> "请前往订单中心查看详情",
"operation"=> "管理员拒绝退款",
"item"=> "",
"show_count"=> 0,
"table_name"=> "longbing_card_shop_order",
"field"=> "out_trade_no",
"send"=> 1,
"uniacid"=> 2,
"status"=> 1
],
[
"sign"=> "view",
"type"=> 24,
"max"=> 0,
"pid"=> 0,
"msg"=> "请注意查收",
"operation"=> "退款成功",
"item"=> "",
"show_count"=> 0,
"table_name"=> "longbing_card_shop_order",
"field"=> "out_trade_no",
"send"=> 1,
"uniacid"=> 2,
"status"=> 1
],
[
"sign"=> "order",
"type"=> 1,
"max"=> 0,
"pid"=> 0,
"msg"=> "请在订单中心查看详情",
"operation"=> "已购买商品",
"item"=> "",
"show_count"=> 0,
"table_name"=> "longbing_card_shop_order",
"field"=> "out_trade_no",
"send"=> 2,
"uniacid"=> 2,
"status"=> 1
],
[
"sign"=> "order",
"type"=> 2,
"max"=> 0,
"pid"=> 0,
"msg"=> "请在订单中心查看详情",
"operation"=> "已参与拼团",
"item"=> "",
"show_count"=> 0,
"table_name"=> "longbing_card_shop_order",
"field"=> "out_trade_no",
"send"=> 2,
"uniacid"=> 2,
"status"=> 1
],
[
"sign"=> "order",
"type"=> 3,
"max"=> 0,
"pid"=> 0,
"msg"=> "请在预约订单中心查看详情",
"operation"=> "预约了",
"item"=> "服务",
"show_count"=> 0,
"table_name"=> "lb_appoint_record",
"field"=> "name,phone,project_id,start_time,remark",
"send"=> 2,
"uniacid"=> 2,
"status"=> 1
],
];
return $radar_msg;

File diff suppressed because it is too large Load Diff