159 lines
6.9 KiB
PHP
159 lines
6.9 KiB
PHP
<?php
|
|
/**
|
|
* Created by PhpStorm.
|
|
* User: shenyang
|
|
* Date: 2018/12/24
|
|
* Time: 3:38 PM
|
|
*/
|
|
|
|
namespace Yunshop\GoodsAssistant;
|
|
|
|
|
|
class PluginApplication extends \app\common\services\PluginApplication
|
|
{
|
|
protected function setConfig()
|
|
{
|
|
}
|
|
protected function setMenuConfig()
|
|
{
|
|
\app\backend\modules\menu\Menu::current()->setPluginMenu('goods-assistant',[
|
|
'name' => '商品助手',
|
|
'type' => 'tool',
|
|
'url' => 'plugin.goods-assistant.admin.import.taobao',// url 可以填写http 也可以直接写路由
|
|
'urlParams' => '',//如果是url填写的是路由则启用参数否则不启用
|
|
'permit' => 1,//如果不设置则不会做权限检测
|
|
'menu' => 1,//如果不设置则不显示菜单,子菜单也将不显示
|
|
'top_show' => 0,
|
|
'left_first_show' => 0,
|
|
'left_second_show' => 1,
|
|
'icon' => 'fa-circle-o-notch',//菜单图标
|
|
'list_icon' => 'goods_assistant',
|
|
'parents'=>[],
|
|
'child' => [
|
|
'yzGoods' => [
|
|
'name' => '商品导入',
|
|
'permit' => 1,
|
|
'menu' => 1,
|
|
'icon' => '',
|
|
'url' => 'plugin.goods-assistant.admin.import-yz.yz-goods',
|
|
'urlParams' => [],
|
|
'parents'=>['goods-assistant'],
|
|
],
|
|
'taobao' => [
|
|
'name' => '淘宝商品导入',
|
|
'permit' => 1,
|
|
'menu' => 1,
|
|
'icon' => '',
|
|
'url' => 'plugin.goods-assistant.admin.import.taobao',
|
|
'urlParams' => [],
|
|
'parents'=>['goods-assistant'],
|
|
],
|
|
/*'jingdong' => [
|
|
'name' => '京东商品导入',
|
|
'permit' => 1,
|
|
'menu' => 1,
|
|
'icon' => '',
|
|
'url' => 'plugin.goods-assistant.admin.import.jingdong',
|
|
'urlParams' => [],
|
|
'parents'=>['goods-assistant'],
|
|
],*/
|
|
'taobaoCSV' => [
|
|
'name' => 'CSV上传',
|
|
'permit' => 1,
|
|
'menu' => 1,
|
|
'icon' => '',
|
|
'url' => 'plugin.goods-assistant.admin.importTaobaoCSV.taobaoCSV',
|
|
'urlParams' => [],
|
|
'parents' => ['goods-assistant'],
|
|
],
|
|
'uniacidImport' => [
|
|
'name' => '公众号商品导入',
|
|
'permit' => 1,
|
|
'menu' => 1,
|
|
'url' => 'plugin.goods-assistant.admin.ImportUniacid.index',
|
|
'parents' => ['goods-assistant'],
|
|
'child' => [
|
|
'uniacidImport.getCategory' => [
|
|
'name' => '获取当前公众号商品分类',
|
|
'url' => 'plugin.goods-assistant.admin.ImportUniacid.getCategory',
|
|
'permit' => 0,
|
|
'parents' => ['goods-assistant','uniacidImport'],
|
|
],
|
|
'uniacidImport.getPublicNumber' => [
|
|
'name' => '获取公众号列表',
|
|
'url' => 'plugin.goods-assistant.admin.ImportUniacid.getPublicNumber',
|
|
'permit' => 0,
|
|
'parents' => ['goods-assistant','uniacidImport'],
|
|
],
|
|
'uniacidImport.getImportCategory' => [
|
|
'name' => '获取导入公众号商品分类',
|
|
'url' => 'plugin.goods-assistant.admin.ImportUniacid.getImportCategory',
|
|
'permit' => 0,
|
|
'parents' => ['goods-assistant','uniacidImport'],
|
|
],
|
|
'uniacidImport.getBrand' => [
|
|
'name' => '获取导入公众号商品品牌',
|
|
'url' => 'plugin.goods-assistant.admin.ImportUniacid.getBrand',
|
|
'permit' => 0,
|
|
'parents' => ['goods-assistant','uniacidImport'],
|
|
],
|
|
'uniacidImport.getGoodsData' => [
|
|
'name' => '获取导入公众号商品列表',
|
|
'url' => 'plugin.goods-assistant.admin.ImportUniacid.getGoodsData',
|
|
'permit' => 0,
|
|
'parents' => ['goods-assistant','uniacidImport'],
|
|
],
|
|
'uniacidImport.isImport' => [
|
|
'name' => '公众号商品导入',
|
|
'url' => 'plugin.goods-assistant.admin.ImportUniacid.isImport',
|
|
'permit' => 0,
|
|
'parents' => ['goods-assistant','uniacidImport'],
|
|
],
|
|
'uniacidImport.screenImport' => [
|
|
'name' => '公众号商品批量导入',
|
|
'url' => 'plugin.goods-assistant.admin.ImportUniacid.screenImport',
|
|
'permit' => 0,
|
|
'parents' => ['goods-assistant','uniacidImport'],
|
|
],
|
|
|
|
],
|
|
],
|
|
// 'undoneGoods' => [
|
|
// 'name' => '公众号导入未完成商品',
|
|
// 'permit' => 1,
|
|
// 'menu' => 1,
|
|
// 'icon' => '',
|
|
// 'url' => 'plugin.goods-assistant.admin.ImportUniacid.undoneGoods',
|
|
// 'urlParams' => [],
|
|
// 'parents' => ['goods-assistant'],
|
|
// ],
|
|
// 'undoneGoodsOne' => [
|
|
// 'name' => '公众号导入未完成商品',
|
|
// 'permit' => 1,
|
|
// 'menu' => 0,
|
|
// 'icon' => '',
|
|
// 'url' => 'plugin.goods-assistant.admin.ImportUniacid.undoneGoodsOne',
|
|
// 'urlParams' => [],
|
|
// 'parents' => ['goods-assistant'],
|
|
// ]
|
|
]
|
|
]);
|
|
|
|
}
|
|
|
|
public function boot()
|
|
{
|
|
|
|
|
|
}
|
|
public function register()
|
|
{
|
|
// define('TAOBAOINFO', "http://hws.m.taobao.com/cache/wdetail/5.0/?id=");
|
|
define('TAOBAOINFO', "https://detail.tmall.com/item.htm?id=");
|
|
define('JDINFO', 'http://item.m.jd.com/ware/view.action?wareId=');
|
|
define('ALIINFO', 'https://detail.1688.com/offer/');
|
|
define('TAOBAODETAIL', 'http://hws.m.taobao.com/cache/wdesc/5.0/?id=');
|
|
define('JDDETAIL', 'http://item.m.jd.com/ware/detail.json?wareId=');
|
|
define('YZINFO', 'https://www.cloudeapi.com/addons/yun_shop/api.php?&route=import-goods.get-goods&goods_id=');
|
|
}
|
|
} |