root пре 3 година
родитељ
комит
2c34656ba2

+ 2 - 1
backendApi/modules/v1/controllers/ShopController.php

@@ -212,6 +212,7 @@ class ShopController extends BaseController {
             'AMOUNT'=> 'DP.AMOUNT',
             'PV'=> 'DP.PV',
             'STATUS'=> 'DP.STATUS',
+            'STORE_NUMS'=>'DP.STORE_NUMS'
         ]);
         $condition = $filter['condition'];
         $params = $filter['params'];
@@ -248,7 +249,7 @@ class ShopController extends BaseController {
             });
         }
         $package = DeclarationPackage::findOneAsArray('ID=:ID', [':ID' => $id]);
-        return static::notice(['id' => $package['ID'], 'packageName' => $package['PACKAGE_NAME'],'packageNo' => $package['PACKAGE_NO'], 'amount' => $package['AMOUNT'], 'amountPv' => $package['PV'], 'levelId' => $package['LEVEL_ID'], 'packageContent' => $package['PACKAGE_CONTENT']]);
+        return static::notice(['id' => $package['ID'], 'packageName' => $package['PACKAGE_NAME'],'packageNo' => $package['PACKAGE_NO'], 'amount' => $package['AMOUNT'], 'amountPv' => $package['PV'], 'levelId' => $package['LEVEL_ID'], 'packageContent' => $package['PACKAGE_CONTENT'],'storenums' => $package['STORE_NUMS']]);
     }
 
     /**

+ 4 - 0
backendApi/modules/v1/models/lists/shop/PackageList.php

@@ -54,6 +54,10 @@ class PackageList extends \common\libs\dataList\DataList implements DataListInte
                     'header' => '所属报单级别',
                     'headerOther' => ['width' => '200'],
                 ],
+                'STORE_NUMS' => [
+                    'header' => '库存',
+                    'headerOther' => ['width' => '200'],
+                ],
                 'AMOUNT' => [
                     'header' => '套餐金额',
                     'headerOther' => [

+ 2 - 3
backendEle/src/utils/config_development_example.js

@@ -1,5 +1,5 @@
 const APP_NAME = '奖金结算系统'
-const SERVER_API_DOMAIN = '127.0.0.1:3030'
+const SERVER_API_DOMAIN = '16.163.228.151:8012'
 const SERVER_API_HTTP_TYPE = 'http://'
 const SERVER_API_PORT = ''  // ':8102'
 const SERVER_API_VERSION = 'v1'
@@ -11,7 +11,7 @@ const ACCESS_TOKEN_PREFIX = 'Bearer '
 const CDN_BASE_URL = 'http://16.163.228.151:8016'
 const CDN_IMG_URL = `${CDN_BASE_URL}/cdn/`
 const PRICE_IS_ROUND = true
-const FRONTEND_SERVER = 'http://127.0.0.1:8086'
+const FRONTEND_SERVER = 'http://16.163.228.151:8015'
 const REGION_URL = `${CDN_BASE_URL}/cdn/jsdata/ar_region_data.js?ver=0.1`
 
 export {
@@ -31,4 +31,3 @@ export {
   FRONTEND_SERVER,
   REGION_URL
 }
-

+ 1 - 1
backendEle/src/utils/config_production_example.js

@@ -11,7 +11,7 @@ const ACCESS_TOKEN_PREFIX = 'Bearer '
 const CDN_BASE_URL = 'http://16.163.228.151:8016'
 const CDN_IMG_URL = `${CDN_BASE_URL}/cdn/`
 const PRICE_IS_ROUND = true
-const FRONTEND_SERVER = 'http://16.163.228.151:8012'
+const FRONTEND_SERVER = 'http://16.163.228.151:8015'
 const REGION_URL = 'http://16.163.228.151:8016/cdn/jsdata/ar_region_data.js?ver=0.1'
 
 export {

+ 7 - 2
backendEle/src/views/shop/package-add.vue

@@ -24,6 +24,9 @@
                 <el-form-item label="套餐内容">
                     <el-input v-model="form.packageContent"></el-input>
                 </el-form-item>
+                <el-form-item label="套餐库存">
+                    <el-input oninput="value=value.replace(/[^\d]/g,'')" v-model="form.storenums"></el-input>
+                </el-form-item>
 
 
                 <el-form-item>
@@ -52,7 +55,8 @@
                     amount:'',
                     amountPv:'',
                     levelId:'',
-                    packageContent:''
+                    packageContent:'',
+                    storenums:''
                 },
                 submitButtonStat: false,
                 allDecLevel: baseInfo.decLevels(),
@@ -70,6 +74,7 @@
                     amountPv: this.form.amountPv,
                     levelId: this.form.levelId,
                     packageContent: this.form.packageContent,
+                    storenums:this.form.storenums,
 
                 }
 
@@ -107,4 +112,4 @@
 
 <style scoped>
 
-</style>
+</style>

+ 6 - 1
backendEle/src/views/shop/package.vue

@@ -70,6 +70,9 @@
                 <el-form-item label="套餐内容">
                     <el-input v-model="form.packageContent"></el-input>
                 </el-form-item>
+                <el-form-item label="套餐库存">
+                    <el-input oninput="value=value.replace(/[^\d]/g,'')" v-model="form.storenums"></el-input>
+                </el-form-item>
             </el-form>
             <div slot="footer" class="dialog-footer">
                 <el-button @click="dialogEditFormVisible = false">取 消</el-button>
@@ -123,6 +126,7 @@
                     statusValue: [],
                     sendType: null,
                     remark: null,
+                  
                 },
             }
         },
@@ -203,7 +207,8 @@
             getData(page, pageSize) {
                 let filterData = this.filterModel
                 network.getPageData(this, 'shop/package', page, pageSize, filterData, response => {
-                    console.log(response)
+                    console.log('response')
+                    console.log(response);
                     this.filterTypes = response.filterTypes
                     this.allData = response
                 })

+ 1 - 0
common/components/ActiveRecord.php

@@ -444,4 +444,5 @@ class ActiveRecord extends \yii\db\ActiveRecord {
         unset($limit, $sql, $affectRow);
         return true;
     }
+
 }

+ 3 - 1
common/models/DeclarationPackage.php

@@ -12,6 +12,7 @@ namespace common\models;
  * @property string $AMOUNT 套餐金额
  * @property string $PV 套餐PV
  * @property string $PACKAGE_CONTENT 套餐内容
+ * @property string $STORE_NUMS 套餐库存
  * @property string $CREATED_AT 创建时间
  * @property string $CREATE_ADMIN 创建人
  * @property string $UPDATE_ADMIN 更新人
@@ -46,7 +47,7 @@ class DeclarationPackage extends \common\components\ActiveRecord
             [['ID','LEVEL_ID','CREATE_ADMIN', 'UPDATE_ADMIN'], 'string', 'max' => 32],
             [['PACKAGE_NAME'], 'string', 'max' => 48],
             [['PACKAGE_NAME'], 'unique'],
-            [['AMOUNT', 'PV'], 'number'],
+            [['AMOUNT', 'PV','STORE_NUMS'], 'number'],
             [['ID'], 'unique'],
         ];
     }
@@ -71,6 +72,7 @@ class DeclarationPackage extends \common\components\ActiveRecord
             'IS_DEL' => '是否删除',
             'STATUS' => '是否上架',
             'DELETED_AT' => '删除时间',
+            'STORE_NUMS' => '套餐库存',
         ];
     }
 

+ 6 - 2
common/models/forms/DecPackageForm.php

@@ -21,6 +21,7 @@ class DecPackageForm extends Model
     public $levelId;
     public $packageContent;
     public $status;
+    public $storenums;
 
     /**
      * @inheritdoc
@@ -34,6 +35,7 @@ class DecPackageForm extends Model
             [['id'], 'exist', 'targetClass'=>DeclarationPackage::class, 'targetAttribute'=>'ID'],
             [['amount','amountPv'], 'price'],
             [['selectedIds'], 'isSelected'],
+            [['storenums'],'number']
         ];
     }
 
@@ -48,6 +50,7 @@ class DecPackageForm extends Model
             'amountPv' => '套餐PV',
             'levelId' => '所属报单级别',
             'packageContent' => '套餐详情',
+            'storenums' => '套餐库存',
         ];
     }
 
@@ -59,8 +62,8 @@ class DecPackageForm extends Model
     {
         $parentScenarios =  parent::scenarios();
         $customScenarios = [
-            'add' => ['packageName','packageNo','amount','amountPv','levelId', 'packageContent'],
-            'edit' => ['id','packageName','packageNo','amount','amountPv', 'levelId', 'packageContent'],
+            'add' => ['packageName','packageNo','amount','amountPv','levelId', 'packageContent','storenums'],
+            'edit' => ['id','packageName','packageNo','amount','amountPv', 'levelId', 'packageContent','storenums'],
             'changeStatus' => ['selectedIds', 'status'],
         ];
         return array_merge($parentScenarios, $customScenarios);
@@ -105,6 +108,7 @@ class DecPackageForm extends Model
         $model->PV = $this->amountPv;
         $model->LEVEL_ID = $this->levelId;
         $model->PACKAGE_CONTENT = $this->packageContent;
+        $model->STORE_NUMS = $this->storenums;
         if($model->save()){
             return $model;
         } else {

+ 83 - 0
common/models/forms/DeclarationLoopForm.php

@@ -6,6 +6,9 @@ use common\helpers\Form;
 use common\models\UserBind;
 use yii\base\Exception;
 use yii\helpers\Json;
+use common\models\DeclarationPackage;
+use common\helpers\Date;
+use common\models\ShopGoods;
 
 /**
  * Login form
@@ -109,9 +112,84 @@ class DeclarationLoopForm extends Model
             $allZcUserIds = [];
             $zcUserIdCard = null;
             $model = new DeclarationForm();
+//            var_dump('$model');
+//            var_dump($model);
+//            var_dump('----------------------------$model--------------------------------');
             $model->scenario = $this->scenario;
+//            var_dump('$model-scenario');
+//            var_dump($model->scenario);
+//            var_dump('----------------------------$model->scenario----------------------');
             $model->allData = $this->data;
+//            var_dump('$model->allData');
+//            var_dump($model->allData);
+//            var_dump('----------------------------$model->allData-----------------------');
             foreach ($this->data as $value){
+//                var_dump('goodsId');
+//                var_dump($value['goodsId']);
+//                var_dump('goodsNum');
+
+
+
+                /**
+                 * 2022-04-29
+                 * York
+                 * 获取商品套餐信息
+                 */
+                if (isset($value['packageId']) && $value['packageId']){
+
+
+                    $packagedata = DeclarationPackage::findOneAsArray('ID=:ID', [':ID' => $value['packageId']]);
+                    //var_dump($packagedata['ID']);
+                    if($packagedata['STORE_NUMS']>0){
+                        $data =  DeclarationPackage::find()->where(['ID'=> $packagedata['ID'] ])->one();
+                        $goods_store_nums = $data->STORE_NUMS - 1;
+                        $data->STORE_NUMS = $goods_store_nums;
+                        $data->update();
+//                        var_dump('输出一下数量');
+//                        var_dump($goods_store_nums);
+                        //库存为0下架套餐
+                        if ($goods_store_nums <= 0){
+                            $data->STATUS = 0;
+                            $data->UPDATED_AT = Date::nowTime();
+//                            var_dump('购买后套餐库存为0 下架拉');
+                        }
+
+                    }else{
+                        throw new Exception($packagedata['PACKAGE_NAME'].'库存不足');
+                    }
+
+
+                }
+
+                if (count($value['goodsId']) > 0 && (count($value['goodsId']) == count($value['goodsNum']))){
+                    for ($i=0;$i<count($value['goodsId']);$i++){
+                        $goods = ShopGoods::findOneAsArray('ID=:ID',[':ID'=> $value['goodsId'][$i]]);
+                        if ($goods['STATUS'] == 1 ){
+                            if($goods['STORE_NUMS'] >= $value['goodsNum'][$i]){
+                                $data = ShopGoods::find()->where(['ID' => $value['goodsId'][$i]])->one();
+                                $goods_store_nums = $data->STORE_NUMS - $value['goodsNum'][$i];
+                                $data->STORE_NUMS = $goods_store_nums;
+                                $data->update();
+                                if($goods_store_nums <= 0){
+                                    $data->STATUS = 0;
+                                    $data->UPDATED_AT = Date::nowTime();
+                                    $data->update();
+                                }
+                            }else{
+                                throw new Exception($goods['GOODS_NAME'].'商品库存不足');
+                            }
+
+                        }else{
+                            throw new Exception($goods['GOODS_NAME'].'商品已下架');
+                        }
+
+                    }
+
+                }
+
+
+
+
                 if(is_array($value)){
                     foreach($value as $key=>$decFormData){
                         $model->$key = $decFormData;
@@ -130,6 +208,11 @@ class DeclarationLoopForm extends Model
                     if(!$model->add($this->data)){
                         throw new Exception(Form::formatErrorsForApi($model->getErrors()));
                     }
+
+
+
+
+
 //                    $model->type = null;
 //                    $model->decSn = null;
 //                    $model->userId = null;

+ 62 - 0
common/models/forms/OrderForm.php

@@ -349,6 +349,36 @@ class OrderForm extends Model
                     throw new Exception('复消积分不足,无法购买商品');
                 }
             }
+
+            /**
+             * 2022-04-28
+             * York
+             * 支付后减少库存
+             */
+            foreach ($this->goodsNum as $k => $v){
+                if ($v){
+                    $goods = ShopGoods::findOneAsArray('ID=:ID AND STATUS=1',[':ID'=> $ids[$k]]);
+                    if ($goods['STORE_NUMS'] >= $this->goodsNum[$k]){
+                        $data = ShopGoods::find()->where(['ID' => $ids[$k]])->one();
+                        $goods_store_nums = $data->STORE_NUMS - $this->goodsNum[$k];
+                        $data->STORE_NUMS = $goods_store_nums;
+                        $data->update();
+                        //下单后库存小于等于0 商品下架
+                        if($goods_store_nums <= 0){
+                            $data->STATUS = 0;
+                            $data->UPDATED_AT = Date::nowTime();
+                            $data->update();
+
+                        }
+                    }else{
+                        throw new Exception($goods['GOODS_NAME'].'库存不足,无法购买商品');
+
+                    }
+
+
+                }
+            }
+//                exit();
             //写入订单
             if (!$orderResult = $this->addOrder()) {
                 throw new Exception(Form::formatErrorsForApi($orderResult->getErrors()));
@@ -504,6 +534,38 @@ class OrderForm extends Model
                     throw new Exception('复消积分不足,无法购买商品');
                 }
             }
+
+
+            /**
+             * 2022-04-28
+             * York
+             * 支付后减少库存
+             */
+            foreach ($this->goodsNum as $k => $v){
+                if ($v){
+                    $goods = ShopGoods::findOneAsArray('ID=:ID AND STATUS=1',[':ID'=> $ids[$k]]);
+                    if ($goods['STORE_NUMS'] >= $this->goodsNum[$k]){
+                        $data = ShopGoods::find()->where(['ID' => $ids[$k]])->one();
+                        $goods_store_nums = $data->STORE_NUMS - $this->goodsNum[$k];
+                        $data->STORE_NUMS = $goods_store_nums;
+                        $data->update();
+                        //下单后库存小于等于0 商品下架
+                        if($goods_store_nums <= 0){
+                            $data->STATUS = 0;
+                            $data->UPDATED_AT = Date::nowTime();
+                            $data->update();
+
+                        }
+                    }else{
+                        throw new Exception($goods['GOODS_NAME'].'库存不足,无法购买商品');
+
+                    }
+
+
+                }
+            }
+//                exit();
+
             //写入订单
             if (!$orderResult = $this->addUserOrder()) {
                 throw new Exception(Form::formatErrorsForApi($orderResult->getErrors()));

+ 1 - 1
frontendApi/config/menu.php

@@ -29,7 +29,7 @@ return [
         'child'=>[
             ['name'=>'商品列表', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'index', 'routePath'=>'shop/index', 'show'=>1,],
             ['name'=>'复消商品', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'reconsume', 'routePath'=>'shop/reconsume', 'show'=>1,'allow'=>'studio'],
-            ['name'=>'报单列表', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'dec-order-list', 'routePath'=>'shop/dec-order-list', 'show'=>1,],
+            ['name'=>'报单列表', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'dec-order-list', 'routePath'=>'shop/dec-order-list', 'show'=>1,'allow'=>'declarer',],
             ['name'=>'订单列表', 'class'=>'', 'icon'=>'', 'controller'=>'shop', 'action'=>'order-list', 'routePath'=>'shop/order-list', 'show'=>1,],
         ]
     ],

+ 0 - 0
frontendEle/src/router/index.js


+ 546 - 0
index.js

@@ -0,0 +1,546 @@
+import Vue from 'vue'
+import Router from 'vue-router'
+import layout from '../views/layout/layout'
+
+const _import = require('./_import_' + process.env.NODE_ENV)
+
+if(Router.version >= '3.1.0'){
+  const originalPush = Router.prototype.push
+  Router.prototype.push = function push(location) {
+    return originalPush.call(this, location).catch(err => err)
+  }
+}
+
+Vue.use(Router)
+
+export const constantRouterMap = [
+  {path: '/', redirect: '/login'},
+  {path: '/login', component: _import('login/index'), name: 'login'},
+  {path: '/login-by-backend', component: _import('login/login-by-backend'), name: 'login-by-backend'},
+  {path: '/modify-password/:username', component: _import('login/modify-password'), name: 'modify-password'},
+  // { path: '/authredirect', component: _import('login/authredirect'), hidden: true },
+  // { path: '/404', component: _import('errorPage/404'), hidden: true },
+  // { path: '/401', component: _import('errorPage/401'), hidden: true },
+  {
+    path: '/dashboard/index',
+    component: layout,
+    redirect: '/dashboard/index',
+    children: [{
+      path: '/dashboard/index',
+      component: _import('dashboard/index'),
+      name: 'dashboard_index',
+      meta: {
+        title: '控制台',
+        breadcrumb: [
+          {title: '首页', path: '/dashboard/index'},
+        ],
+      },
+    }]
+  },
+  {
+        path: '/shop',
+        component: layout,
+        redirect: '/shop/dec-order-list',
+        children: [
+            {
+                path: '/shop/dec-order-list',
+                component: _import('shop/dec-order-list'),
+                name: 'shop_dec-order-list',
+                meta: {
+                    title: '报单列表',
+                    breadcrumb: [
+                        {title: '首页', path: '/dashboard/index'},
+                        {title: '商城管理', path: '/shop/dec-order-list'},
+                    ],
+                },
+            },
+            {
+                path: '/shop/order-list',
+                component: _import('shop/order-list'),
+                name: 'shop_order-list',
+                meta: {
+                    title: '订单列表',
+                    breadcrumb: [
+                        {title: '首页', path: '/dashboard/index'},
+                        {title: '商城管理', path: '/shop/dec-order-list'},
+                    ],
+                },
+            },
+            {
+                path: '/shop/index',
+                component: _import('shop/index'),
+                name: 'shop_index',
+                meta: {
+                    title: '商品列表',
+                    breadcrumb: [
+                        {title: '首页', path: '/dashboard/index'},
+                        {title: '商城管理', path: '/shop/dec-order-list'},
+                    ],
+                },
+            },
+            {
+                path: '/shop/order',
+                component: _import('shop/order'),
+                name: 'shop_order',
+                meta: {
+                    title: '商品结算',
+                    breadcrumb: [
+                        {title: '首页', path: '/dashboard/index'},
+                        {title: '商城管理', path: '/shop/dec-order-list'}
+                    ],
+                },
+            },
+            {
+                path: '/shop/goods-detail/:id',
+                component: _import('shop/goods-detail'),
+                name: 'shop_goods-detail',
+                meta: {
+                    title: '商品详情',
+                    breadcrumb: [
+                        {title: '首页', path: '/dashboard/index'},
+                        {title: '商城管理', path: '/shop/dec-order-list'},
+                    ],
+                },
+            },
+            {
+                path: '/shop/reconsume',
+                component: _import('shop/reconsume'),
+                name: 'shop_reconsume',
+                meta: {
+                    title: '复消商品',
+                    breadcrumb: [
+                        {title: '首页', path: '/dashboard/index'},
+                        {title: '商城管理', path: '/shop/dec-order-list'},
+                    ],
+                },
+            },
+            {
+                path: '/shop/reconsume-order',
+                component: _import('shop/reconsume-order'),
+                name: 'reconsume-order',
+                meta: {
+                    title: '复消商品结算',
+                    breadcrumb: [
+                        {title: '首页', path: '/dashboard/index'},
+                        {title: '商城管理', path: '/shop/dec-order-list'}
+                    ],
+                },
+            },
+        ],
+    },
+  {
+    path: '/user',
+    component: layout,
+    redirect: '/user/index',
+    children: [
+      {
+        path: '/user/index',
+        component: _import('user/index'),
+        name: 'user_index',
+        meta: {
+          title: '个人资料',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '会员管理', path: '/user/index'},
+          ],
+        },
+      },
+      {
+          path: '/user/password',
+          component: _import('user/password'),
+          name: 'user_password',
+          meta: {
+              title: '重置密码',
+              breadcrumb: [
+                  {title: '首页', path: '/dashboard/index'},
+                  {title: '会员管理', path: '/user/index'},
+              ],
+          },
+      },
+      {
+        path: '/user/id-card',
+        component: _import('user/id-card'),
+        name: 'user_id-card',
+        meta: {
+          title: '上传身份证',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '会员管理', path: '/user/index'},
+          ],
+        },
+      },
+      {
+        path: '/user/rec-user',
+        component: _import('user/rec-user'),
+        name: 'user_rec-user',
+        meta: {
+          title: '开拓会员列表',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '会员管理', path: '/user/index'},
+          ],
+        },
+      },
+      {
+        path: '/user/bind',
+        component: _import('user/bind'),
+        name: 'user_bind',
+        meta: {
+          title: '点位绑定列表',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '会员管理', path: '/user/index'},
+          ],
+        },
+      },
+      {
+        path: '/user/bind-edit/:id',
+        component: _import('user/bind-edit'),
+        name: 'user_bind-edit',
+        meta: {
+          title: '点位绑定编辑',
+          highLight: '/user/bind',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '会员管理', path: '/user/index'},
+            {title: '点位绑定列表', path: '/user/bind'},
+          ],
+        },
+      },
+      {
+        path: '/user/dec',
+        component: _import('user/dec'),
+        name: 'user_dec',
+        meta: {
+          title: '报单管理',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '会员管理', path: '/user/index'},
+          ],
+        },
+      },
+    ]
+  },
+    {
+        path: '/atlas',
+        component: layout,
+        redirect: '/atlas/network',
+        children: [
+            {
+                path: '/atlas/network',
+                component: _import('atlas/network'),
+                name: 'atlas_network',
+                meta: {
+                    title: '安置网络',
+                    breadcrumb: [
+                        {title: '首页', path: '/dashboard/index'},
+                        {title: '网络图谱', path: '/atlas/network'},
+                    ],
+                },
+            },
+        ]
+    },
+  {
+    path: '/bonus',
+    component: layout,
+    redirect: '/bonus/index',
+    children: [
+      {
+        path: '/bonus/index',
+        component: _import('bonus/index'),
+        name: 'bonus_index',
+        meta: {
+          title: '我的账户',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/index'},
+          ],
+        },
+      },
+      {
+        path: '/bonus/new',
+        component: _import('bonus/new'),
+        name: 'bonus_new',
+        meta: {
+          title: '最新奖金',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/index'},
+          ],
+        },
+      },
+      {
+        path: '/bonus/other',
+        component: _import('bonus/other'),
+        name: 'bonus_other',
+        meta: {
+          title: '往期奖金',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/index'},
+          ],
+        },
+      },
+      {
+        path: '/bonus/real-time-perf',
+        component: _import('bonus/real-time-perf'),
+        name: 'bonus_real-time-perf',
+        meta: {
+          title: '实时业绩',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/index'},
+          ],
+        },
+      },
+      {
+        path: '/bonus/fc-point',
+        component: _import('bonus/fc-point'),
+        name: 'bonus_fc-point',
+        meta: {
+          title: '房产积分',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/index'},
+          ],
+        },
+      },
+      {
+        path: '/bonus/teams',
+        component: _import('bonus/teams'),
+        name: 'bonus_teams',
+        meta: {
+          title: '团队查询',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '奖金管理', path: '/bonus/index'},
+          ],
+        },
+      },
+
+    ]
+  },
+  {
+    path: '/article',
+    component: layout,
+    redirect: '/article/list',
+    children: [
+      {
+        path: '/article/list/:cid',
+        component: _import('article/list'),
+        name: 'article_list',
+        meta: {
+          title: '文章列表',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '文章管理', path: '/article/list'},
+          ],
+        },
+      },
+      {
+        path: '/article/detail/:id',
+        component: _import('article/detail'),
+        name: 'article_detail',
+        meta: {
+          title: '文章详情',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '文章管理', path: '/article/list'},
+          ],
+        },
+      },
+    ]
+  },
+  {
+    path: '/message',
+    component: layout,
+    redirect: '/message/list',
+    children: [
+      {
+        path: '/message/list',
+        component: _import('message/list'),
+        name: 'message_list',
+        meta: {
+          title: '站内信列表',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '站内信', path: '/message/list'},
+          ],
+        },
+      },
+      {
+        path: '/message/detail/:id',
+        component: _import('message/detail'),
+        name: 'message_detail',
+        meta: {
+          title: '站内信详情',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '站内信', path: '/message/list'},
+          ],
+        },
+      },
+    ]
+  },
+  {
+    path: '/finance',
+    component: layout,
+    redirect: '/finance/withdraw',
+    children: [
+      {
+        path: '/finance/reconsume-pool-flow',
+        component: _import('finance/reconsume-pool-flow'),
+        name: 'finance_reconsume-pool-flow',
+        meta: {
+          title: '会员复销池余额流水',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '财务管理', path: '/finance/withdraw'},
+          ],
+        },
+      },
+      {
+        path: '/finance/withdraw',
+        component: _import('finance/withdraw'),
+        name: 'finance_withdraw',
+        meta: {
+          title: '提现明细',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '财务管理', path: '/finance/index'},
+          ],
+        },
+      },
+      {
+        path: '/finance/withdraw-add',
+        component: _import('finance/withdraw-add'),
+        name: 'finance_withdraw-add',
+        meta: {
+          title: '我要提现',
+          highLight: '/finance/withdraw',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '财务管理', path: '/finance/index'},
+            {title: '提现明细', path: '/finance/withdraw'},
+          ],
+        },
+      },
+      {
+        path: '/finance/dec-list',
+        component: _import('finance/dec-list'),
+        name: 'finance_dec-list',
+        meta: {
+          title: '报单订货单列表',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '财务管理', path: '/finance/index'},
+          ],
+        },
+      },
+      {
+        path: '/finance/transfer-list',
+        component: _import('finance/transfer-list'),
+        name: 'finance_transfer-list',
+        meta: {
+          title: '转账记录',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '财务管理', path: '/finance/index'},
+          ],
+        },
+      },
+      {
+        path: '/finance/transfer-add',
+        component: _import('finance/transfer-add'),
+        name: 'finance_transfer-add',
+        meta: {
+          title: '我要转账',
+          highLight: '/finance/transfer-list',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '财务管理', path: '/finance/index'},
+            {title: '转账记录', path: '/finance/transfer-list'},
+          ],
+        },
+      },
+        {
+            path: '/finance/recharge',
+            component: _import('finance/recharge'),
+            name: 'finance_recharge',
+            meta: {
+                title: '充值明细',
+                breadcrumb: [
+                    {title: '首页', path: '/dashboard/index'},
+                    {title: '财务管理', path: '/finance/index'},
+                ],
+            },
+        },
+        {
+            path: '/finance/recharge-add',
+            component: _import('finance/recharge-add'),
+            name: 'finance_recharge-add',
+            meta: {
+                title: '我要充值',
+                highLight: '/finance/recharge',
+                breadcrumb: [
+                    {title: '首页', path: '/dashboard/index'},
+                    {title: '财务管理', path: '/finance/index'},
+                    {title: '提现明细', path: '/finance/withdraw'},
+                ],
+            },
+        },
+    ]
+  },
+  {
+    path: '/config',
+    component: layout,
+    redirect: '/config/base',
+    children: [
+      {
+        path: '/config/receive-address-list',
+        component: _import('config/receive-address-list'),
+        name: 'config_receive-address-list',
+        meta: {
+          title: '收货地址管理',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '设置', path: '/config/base'},
+          ],
+        },
+      },
+      {
+        path: '/config/receive-address-add',
+        component: _import('config/receive-address-edit'),
+        name: 'config_receive-address-add',
+        meta: {
+          title: '添加收货地址',
+          highLight: '/config/receive-address-list',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '设置', path: '/config/base'},
+            {title: '收货地址管理', path: '/config/receive-address-list'},
+          ],
+        },
+      },
+      {
+        path: '/config/receive-address-edit/:id',
+        component: _import('config/receive-address-edit'),
+        name: 'config_receive-address-edit',
+        meta: {
+          title: '编辑收货地址',
+          highLight: '/config/receive-address-list',
+          breadcrumb: [
+            {title: '首页', path: '/dashboard/index'},
+            {title: '设置', path: '/config/base'},
+            {title: '收货地址管理', path: '/config/receive-address-list'},
+          ],
+        },
+      },
+
+    ]
+  },
+]
+
+export default new Router({
+  routes: constantRouterMap
+})