初始化代码
This commit is contained in:
596
app/shop/info/AdminMenu.php
Normal file
596
app/shop/info/AdminMenu.php
Normal 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];
|
||||
|
||||
|
||||
51
app/shop/info/DiyCompoents.php
Normal file
51
app/shop/info/DiyCompoents.php
Normal 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),
|
||||
|
||||
]
|
||||
],
|
||||
];
|
||||
276
app/shop/info/DiyDefaultCompoents.php
Normal file
276
app/shop/info/DiyDefaultCompoents.php
Normal 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;
|
||||
46
app/shop/info/DiyLink.php
Normal file
46
app/shop/info/DiyLink.php
Normal 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"
|
||||
],
|
||||
]
|
||||
],
|
||||
];
|
||||
42
app/shop/info/DiyTabbar.php
Normal file
42
app/shop/info/DiyTabbar.php
Normal 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'=> []
|
||||
],
|
||||
|
||||
];
|
||||
86
app/shop/info/FunctionPage.php
Normal file
86
app/shop/info/FunctionPage.php
Normal 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/shop/info/Info.php
Normal file
32
app/shop/info/Info.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: shuixian
|
||||
* Date: 2019/11/20
|
||||
* Time: 18:30
|
||||
*/
|
||||
|
||||
return [
|
||||
|
||||
//模块名称[必填]
|
||||
'name' => 'shop',
|
||||
//模块标题[必填]
|
||||
'title' =>'商城',
|
||||
//内容简介
|
||||
'desc' =>'',
|
||||
//封面图标
|
||||
'icon' =>'',
|
||||
//模块类型[必填] model:模块 可以出现在左侧一级 app:应用中心 , 是一个应用中心的应用
|
||||
'type' => 'model',
|
||||
// 模块唯一标识[必填],格式:模块名.开发者标识.module
|
||||
'identifier' => 'shop.longbing.module',
|
||||
// 版本[必填],格式采用三段式:主版本号.次版本号.修订版本号
|
||||
'version' => '1.0.80',
|
||||
// 模块依赖[可选],格式[[模块名, 模块唯一标识, 依赖版本, 对比方式]]
|
||||
'need_module'=> [],
|
||||
// 应用依赖[可选],格式[[插件名, 应用唯一标识, 依赖版本, 对比方式]]
|
||||
'need_app' => [],
|
||||
//订阅消息
|
||||
'tmpl_name'=>['pay_order','send_order','land_order','land_over']
|
||||
|
||||
];
|
||||
106
app/shop/info/PermissionShop.php
Normal file
106
app/shop/info/PermissionShop.php
Normal 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);
|
||||
|
||||
}
|
||||
}
|
||||
204
app/shop/info/RadarMessage.php
Normal file
204
app/shop/info/RadarMessage.php
Normal 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;
|
||||
455
app/shop/info/Subscribe.php
Normal file
455
app/shop/info/Subscribe.php
Normal file
@@ -0,0 +1,455 @@
|
||||
<?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 app\bargain\info\PermissionBargain;
|
||||
use app\card\model\CardExtension;
|
||||
use app\radar\model\RadarOrder;
|
||||
use app\shop\model\IndexShopCollage;
|
||||
use longbingcore\diy\BaseSubscribe;
|
||||
|
||||
/**
|
||||
* @author shuixian
|
||||
* @DataTime: 2019/12/11 16:23
|
||||
* Class Subscribe
|
||||
* @package app\ucenter\info
|
||||
*/
|
||||
class Subscribe extends BaseSubscribe
|
||||
{
|
||||
|
||||
/**
|
||||
* 相应个人中心工具菜单
|
||||
*
|
||||
* @return mixed
|
||||
* @author shuixian
|
||||
* @DataTime: 2019/12/12 11:24
|
||||
*/
|
||||
public function onAddWorkCenterModelMenu()
|
||||
{
|
||||
|
||||
$permissson = new PermissionShop($this->_uniacid);
|
||||
if($permissson->pAuth()) {
|
||||
|
||||
$modelMenu = [
|
||||
"title" => '商品服务',
|
||||
"desc" => '',
|
||||
"show" => true,
|
||||
"row" => 4,
|
||||
"list" => [
|
||||
[
|
||||
"title" => "我的收入",
|
||||
"icon" => "icontixianguanli",
|
||||
"link" => "/shop/pages/partner/income",
|
||||
"linkType" => 4
|
||||
],
|
||||
[
|
||||
"title" => "订单管理",
|
||||
"icon" => "iconwodedingdan",
|
||||
"link" => "/shop/pages/order/list?target=staff",
|
||||
"linkType" => 4
|
||||
],
|
||||
[
|
||||
"title" => "退款管理",
|
||||
"icon" => "iconwodeshouhou",
|
||||
"link" => "/shop/pages/refund/list?target=staff",
|
||||
"linkType" => 4
|
||||
],
|
||||
[
|
||||
"title" => "推荐商品",
|
||||
"icon" => "icontuijianshangpin",
|
||||
"link" => "/shop/pages/staff/goods/push",
|
||||
"linkType" => 4
|
||||
],
|
||||
[
|
||||
"title" => "卡券管理",
|
||||
"icon" => "iconwodekaquan",
|
||||
"link" => "/shop/pages/staff/coupon/list",
|
||||
"linkType" => 4
|
||||
]
|
||||
]
|
||||
];
|
||||
|
||||
return [$modelMenu];
|
||||
}
|
||||
return [];
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 名片展示页获取其他模块数据
|
||||
*
|
||||
* @param $params
|
||||
* @return array
|
||||
* @author shuixian
|
||||
* @DataTime: 2019/12/24 14:24
|
||||
*/
|
||||
public function onCardInfo($params)
|
||||
{
|
||||
|
||||
//获取推荐商品 By.jingshuixian
|
||||
$modelExtension = new CardExtension();
|
||||
$goods_list = $modelExtension->cardExtensionList($params['staff_id'], $this->_uniacid);
|
||||
|
||||
$collage_model = new IndexShopCollage();
|
||||
foreach ($goods_list as $key => $val) {
|
||||
$goods_list[$key]['is_collage'] = 0;
|
||||
$count = $collage_model->getCollage(['goods_id' => $val['id'], 'uniacid' => $this->_uniacid, 'status' => 1]);
|
||||
if (!empty($count)) $goods_list[$key]['is_collage'] = 1;
|
||||
}
|
||||
|
||||
return ['goods_list'=>$goods_list];
|
||||
}
|
||||
|
||||
/**
|
||||
* 客户获取列表查询
|
||||
*
|
||||
* @param $data
|
||||
* @return array
|
||||
* @author shuixian
|
||||
* @DataTime: 2019/12/26 10:30
|
||||
*/
|
||||
public function onStaffCustomerList($data)
|
||||
{
|
||||
// 商城订单
|
||||
$orderCount = RadarOrder::where( [ [ 'pay_status', '=', 1 ],
|
||||
[ 'order_status', '<>', 1 ],
|
||||
[ 'user_id', '=', $data[ 'uid' ] ],
|
||||
[ 'to_uid', '=', $data[ 'to_uid' ]],
|
||||
[ 'refund_status', '=', 0 ] ]
|
||||
)
|
||||
->count();
|
||||
|
||||
$returnData[ 'count' ] = $orderCount;
|
||||
$returnData[ 'title' ] = "订单";
|
||||
|
||||
return [$returnData];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param $data
|
||||
* @功能说明:处理一下数据 主要是权限方面的
|
||||
* @author chenniang
|
||||
* @DataTime: 2020-12-16 16:21
|
||||
*/
|
||||
public function onDiyModuleMenuShop($data){
|
||||
|
||||
|
||||
if(!empty($data['data']['list'])){
|
||||
|
||||
foreach ($data['data']['list'] as $v){
|
||||
|
||||
if($v['icon']!='icontemplate'||$data['shop_auth']==true){
|
||||
|
||||
$arr[] = $v;
|
||||
}
|
||||
|
||||
}
|
||||
$data['data']['list'] = $arr;
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 监听用户中心模块
|
||||
*
|
||||
* @return array
|
||||
* @author shuixian
|
||||
* @DataTime: 2019/12/18 14:04
|
||||
*/
|
||||
public function onAddUcenterCompoent(){
|
||||
$this->getUserId();
|
||||
|
||||
$user = longbingGetUserInfo($this->getUserId() , $this->_uniacid);
|
||||
|
||||
$last_staff_id = !empty($user['last_staff_id'])?$user['last_staff_id']:0;
|
||||
|
||||
$moduleMenuShopOrder = <<<COMPOENT
|
||||
{
|
||||
"title": "商城订单",
|
||||
"type": "moduleMenuShopOrder",
|
||||
"icon": "iconshoporder",
|
||||
"isDelete": true,
|
||||
"addNumber": 1,
|
||||
"attr": [
|
||||
{
|
||||
"title": "模板名称",
|
||||
"type": "Switch",
|
||||
"name": "isShowTitle"
|
||||
},
|
||||
{
|
||||
"title": "选择模板",
|
||||
"type": "ChooseModule",
|
||||
"name": "module",
|
||||
"data": [
|
||||
{
|
||||
"title": "一行多列",
|
||||
"name": "module-menu-row",
|
||||
"img": "http://longbingcdn.xiaochengxucms.com/admin/diy/module-menu-col.jpg"
|
||||
},
|
||||
{
|
||||
"title": "一行一列",
|
||||
"name": "module-menu-col",
|
||||
"img": "http://longbingcdn.xiaochengxucms.com/admin/diy/module-menu-row.jpg"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "一行多少列",
|
||||
"type": "InputNumber",
|
||||
"name": "row"
|
||||
}
|
||||
],
|
||||
"data": {
|
||||
"isShowTitle": false,
|
||||
"module": "module-menu-row",
|
||||
"row": {
|
||||
"number": 4,
|
||||
"min": 2,
|
||||
"max": 5,
|
||||
"label": "请输入"
|
||||
},
|
||||
"list": [
|
||||
{
|
||||
"title": "全部",
|
||||
"icon": "iconwodedingdan",
|
||||
"link": {
|
||||
"type": 2,
|
||||
"url": "/shop/pages/order/list?index=0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"title": "待付款",
|
||||
"icon": "icondingdandaifukuan",
|
||||
"link": {
|
||||
"type": 2,
|
||||
"url": "/shop/pages/order/list?index=1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"title": "待发货",
|
||||
"icon": "icondingdandaifahuo",
|
||||
"link": {
|
||||
"type": 2,
|
||||
"url": "/shop/pages/order/list?index=2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"title": "待收货",
|
||||
"icon": "icondingdandaishouhuo",
|
||||
"link": {
|
||||
"type": 2,
|
||||
"url": "/shop/pages/order/list?index=3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"title": "已完成",
|
||||
"icon": "icondingdanyiwancheng",
|
||||
"link": {
|
||||
"type": 2,
|
||||
"url": "/shop/pages/order/list?index=4"
|
||||
}
|
||||
}
|
||||
|
||||
]
|
||||
}
|
||||
}
|
||||
COMPOENT;
|
||||
|
||||
$tmp = sassAuth()==1?',
|
||||
{
|
||||
|
||||
"title": "我的采购模板",
|
||||
|
||||
"icon": "icontemplate",
|
||||
|
||||
"link": {
|
||||
|
||||
"type": 2,
|
||||
|
||||
"url": "/shop/pages/purchase/list?staff_id='.$last_staff_id.'"'.'
|
||||
}
|
||||
}':'';
|
||||
|
||||
|
||||
|
||||
$bargain_p = new PermissionBargain($this->_uniacid);
|
||||
|
||||
$bargain_auth = $bargain_p->pAuth();
|
||||
|
||||
$bargain = $bargain_auth==true?',
|
||||
{
|
||||
"title": "我的砍价",
|
||||
"icon": "iconkanjiajilu",
|
||||
"link": {
|
||||
"type": 2,
|
||||
"url": "/shop/pages/bargain/record"
|
||||
}
|
||||
}':'';
|
||||
|
||||
$moduleMenuShop = <<<COMPOENT
|
||||
{
|
||||
"title": "商城工具",
|
||||
"type": "moduleMenuShop",
|
||||
"icon": "iconshop",
|
||||
"isDelete": true,
|
||||
"addNumber": 1,
|
||||
"attr": [
|
||||
{
|
||||
"title": "模板名称",
|
||||
"type": "Switch",
|
||||
"name": "isShowTitle"
|
||||
},
|
||||
{
|
||||
"title": "选择模板",
|
||||
"type": "ChooseModule",
|
||||
"name": "module",
|
||||
"data": [
|
||||
{
|
||||
"title": "一行多列",
|
||||
"name": "module-menu-row",
|
||||
"img": "http://longbingcdn.xiaochengxucms.com/admin/diy/module-menu-col.jpg"
|
||||
},
|
||||
{
|
||||
"title": "一行一列",
|
||||
"name": "module-menu-col",
|
||||
"img": "http://longbingcdn.xiaochengxucms.com/admin/diy/module-menu-row.jpg"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "一行多少列",
|
||||
"type": "InputNumber",
|
||||
"name": "row"
|
||||
}
|
||||
],
|
||||
"data": {
|
||||
"isShowTitle": false,
|
||||
"module": "module-menu-row",
|
||||
"row": {
|
||||
"number": 4,
|
||||
"min": 2,
|
||||
"max": 5,
|
||||
"label": "请输入"
|
||||
},
|
||||
"list": [
|
||||
{
|
||||
"title": "我的售后",
|
||||
"icon": "iconwodeshouhou",
|
||||
"link": {
|
||||
"type": 2,
|
||||
"url": "/shop/pages/refund/list"
|
||||
}
|
||||
},
|
||||
{
|
||||
"title": "我的收入",
|
||||
"icon": "icontixianguanli",
|
||||
"link": {
|
||||
"type": 2,
|
||||
"url": "/shop/pages/partner/income"
|
||||
}
|
||||
},
|
||||
{
|
||||
"title": "我的卡券",
|
||||
"icon": "iconwodekaquan",
|
||||
"link": {
|
||||
"type": 2,
|
||||
"url": "/shop/pages/coupon/list"
|
||||
}
|
||||
},
|
||||
{
|
||||
"title": "分销商品",
|
||||
"icon": "iconquanmianfenxiao",
|
||||
"link": {
|
||||
"type": 2,
|
||||
"needStaffId": true,
|
||||
"url": "/shop/pages/partner/distribution?staff_id=$last_staff_id"
|
||||
}
|
||||
},
|
||||
{
|
||||
"title": "我的地址",
|
||||
"icon": "icondizhi2",
|
||||
"link": {
|
||||
"type": 2,
|
||||
"url": "/shop/pages/address/list"
|
||||
}
|
||||
}$bargain
|
||||
$tmp
|
||||
]
|
||||
}
|
||||
|
||||
}
|
||||
COMPOENT;
|
||||
|
||||
|
||||
$permission = new PermissionShop($this->_uniacid);
|
||||
$compoentList = [] ;
|
||||
if($permission->pAuth()){
|
||||
$compoentList = [
|
||||
json_decode($moduleMenuShopOrder, true),
|
||||
json_decode($moduleMenuShop, true)
|
||||
] ;
|
||||
}
|
||||
|
||||
return $compoentList ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 监听代理管理端授权小程序事件
|
||||
*
|
||||
* @param $data
|
||||
* @return array
|
||||
* @author shuixian
|
||||
* @DataTime: 2019/12/27 17:33
|
||||
*/
|
||||
public function onAgentAppAuthEdit($config){
|
||||
|
||||
|
||||
$returnArr = [] ;
|
||||
|
||||
$permission = new PermissionShop(0);
|
||||
$shop_switch = [] ;
|
||||
if($permission->sAuth() && $permission->infoConfig['auth_platform'] ) {
|
||||
|
||||
$shop_switch['formType'] = 'radio';
|
||||
$shop_switch['name'] = 'shop_switch';
|
||||
|
||||
$shop_switch['value'] = $config ? $config[ $shop_switch['name'] ] : 0;
|
||||
$shop_switch['title'] = $permission->info['title'];
|
||||
$returnArr[] = $shop_switch;
|
||||
}
|
||||
|
||||
|
||||
$pay_shop = [] ;
|
||||
if($permission->sAuth() && $permission->infoConfig['auth_platform'] ) {
|
||||
|
||||
$pay_shop['formType'] = 'radio';
|
||||
$pay_shop['name'] = 'pay_shop';
|
||||
|
||||
$pay_shop['value'] = $config ? $config[ $pay_shop['name'] ] : 0;
|
||||
$pay_shop['title'] = $permission->info['title'].'支付';
|
||||
$returnArr[] = $pay_shop;
|
||||
}
|
||||
|
||||
return $returnArr ;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
0
app/shop/info/UpdateSql.php
Normal file
0
app/shop/info/UpdateSql.php
Normal file
Reference in New Issue
Block a user