CRMEB v4 移動(dòng)端路由

2022-04-09 16:41 更新

路由

API路由配置文件

/app/api/route/v1.php

/app/api/route/v2.php

Route::any('wechat/serve', 'v1.wechat.WechatController/serve');//公眾號(hào)服務(wù)
Route::any('wechat/notify', 'v1.wechat.WechatController/notify');//公眾號(hào)支付回調(diào)
Route::any('routine/notify', 'v1.wechat.AuthController/notify');//小程序支付回調(diào)
Route::group(function () {
    //賬號(hào)密碼登錄
    Route::post('login', 'v1.LoginController/login')->name('login');
    // 獲取發(fā)短信的key
    Route::get('verify_code', 'v1.LoginController/verifyCode')->name('verifyCode');
    //手機(jī)號(hào)登錄
    Route::post('login/mobile', 'v1.LoginController/mobile')->name('loginMobile');
    //圖片驗(yàn)證碼
    Route::get('sms_captcha', 'v1.LoginController/captcha')->name('captcha');
    //驗(yàn)證碼發(fā)送
    Route::post('register/verify', 'v1.LoginController/verify')->name('registerVerify');
    //手機(jī)號(hào)注冊(cè)
    Route::post('register', 'v1.LoginController/register')->name('register');
    //手機(jī)號(hào)修改密碼
    Route::post('register/reset', 'v1.LoginController/reset')->name('registerReset');
    // 綁定手機(jī)號(hào)(靜默授權(quán) 還未有用戶信息)
    Route::post('binding', 'v1.LoginController/binding_phone')->name('bindingPhone');
})->middleware(\app\http\middleware\AllowOriginMiddleware::class);
//管理員訂單操作類(lèi)
Route::group(function () {
    Route::get('admin/order/statistics', 'v1.admin.StoreOrderController/statistics')->name('adminOrderStatistics');//訂單數(shù)據(jù)統(tǒng)計(jì)
    Route::get('admin/order/data', 'v1.admin.StoreOrderController/data')->name('adminOrderData');//訂單每月統(tǒng)計(jì)數(shù)據(jù)
    Route::get('admin/order/list', 'v1.admin.StoreOrderController/lst')->name('adminOrderList');//訂單列表
    Route::get('admin/order/detail/:orderId', 'v1.admin.StoreOrderController/detail')->name('adminOrderDetail');//訂單詳情
    Route::get('admin/order/delivery/gain/:orderId', 'v1.admin.StoreOrderController/delivery_gain')->name('adminOrderDeliveryGain');//訂單發(fā)貨獲取訂單信息
    Route::post('admin/order/delivery/keep', 'v1.admin.StoreOrderController/delivery_keep')->name('adminOrderDeliveryKeep');//訂單發(fā)貨
    Route::post('admin/order/price', 'v1.admin.StoreOrderController/price')->name('adminOrderPrice');//訂單改價(jià)
    Route::post('admin/order/remark', 'v1.admin.StoreOrderController/remark')->name('adminOrderRemark');//訂單備注
    Route::get('admin/order/time', 'v1.admin.StoreOrderController/time')->name('adminOrderTime');//訂單交易額時(shí)間統(tǒng)計(jì)
    Route::post('admin/order/offline', 'v1.admin.StoreOrderController/offline')->name('adminOrderOffline');//訂單支付
    Route::post('admin/order/refund', 'v1.admin.StoreOrderController/refund')->name('adminOrderRefund');//訂單退款
    Route::post('order/order_verific', 'v1.admin.StoreOrderController/order_verific')->name('order');//訂單核銷(xiāo)
})->middleware(\app\http\middleware\AllowOriginMiddleware::class)->middleware(\app\api\middleware\AuthTokenMiddleware::class, true)->middleware(\app\api\middleware\CustomerMiddleware::class);
//會(huì)員授權(quán)接口
Route::group(function () {
    //用戶綁定手機(jī)號(hào)
    Route::post('user/binding', 'v1.LoginController/user_binding_phone')->name('userBindingPhone');
    Route::get('logout', 'v1.LoginController/logout')->name('logout');// 退出登錄
    Route::post('switch_h5', 'v1.LoginController/switch_h5')->name('switch_h5');// 切換賬號(hào)
    //商品類(lèi)
    Route::get('product/code/:id', 'v1.store.StoreProductController/code')->name('productCode');//商品分享二維碼 推廣員
    //公共類(lèi)
    Route::post('upload/image', 'v1.PublicController/upload_image')->name('uploadImage');//圖片上傳
    //用戶類(lèi) 客服聊天記錄
    Route::get('user/service/list', 'v1.user.StoreService/lst')->name('userServiceList');//客服列表
    Route::get('user/service/record', 'v1.user.StoreService/record')->name('userServiceRecord');//客服聊天記錄
    //用戶類(lèi)  用戶coupons/order
    Route::get('user', 'v1.user.UserController/user')->name('user');//個(gè)人中心
    Route::post('user/spread', 'v1.user.UserController/spread')->name('userSpread');//靜默綁定授權(quán)
    Route::post('user/edit', 'v1.user.UserController/edit')->name('userEdit');//用戶修改信息
    Route::get('user/balance', 'v1.user.UserController/balance')->name('userBalance');//用戶資金統(tǒng)計(jì)
    Route::get('userinfo', 'v1.user.UserController/userinfo')->name('userinfo');// 用戶信息
    //用戶類(lèi)  地址
    Route::get('address/detail/:id', 'v1.user.UserAddressController/address')->name('address');//獲取單個(gè)地址
    Route::get('address/list', 'v1.user.UserAddressController/address_list')->name('addressList');//地址列表
    Route::post('address/default/set', 'v1.user.UserAddressController/address_default_set')->name('addressDefaultSet');//設(shè)置默認(rèn)地址
    Route::get('address/default', 'v1.user.UserAddressController/address_default')->name('addressDefault');//獲取默認(rèn)地址
    Route::post('address/edit', 'v1.user.UserAddressController/address_edit')->name('addressEdit');//修改 添加 地址
    Route::post('address/del', 'v1.user.UserAddressController/address_del')->name('addressDel');//刪除地址
    //用戶類(lèi) 收藏
    Route::get('collect/user', 'v1.user.UserCollectController/collect_user')->name('collectUser');//收藏商品列表
    Route::post('collect/add', 'v1.user.UserCollectController/collect_add')->name('collectAdd');//添加收藏
    Route::post('collect/del', 'v1.user.UserCollectController/collect_del')->name('collectDel');//取消收藏
    Route::post('collect/all', 'v1.user.UserCollectController/collect_all')->name('collectAll');//批量添加收藏
    Route::get('brokerage_rank', 'v1.user.UserBillController/brokerage_rank')->name('brokerageRank');//傭金排行
    Route::get('rank', 'v1.user.UserController/rank')->name('rank');//推廣人排行
    //用戶類(lèi) 分享
    Route::post('user/share', 'v1.PublicController/user_share')->name('user_share');//記錄用戶分享
    //用戶類(lèi) 點(diǎn)贊
//    Route::post('like/add', 'user.UserController/like_add')->name('likeAdd');//添加點(diǎn)贊
//    Route::post('like/del', 'user.UserController/like_del')->name('likeDel');//取消點(diǎn)贊
    //用戶類(lèi) 簽到
    Route::get('sign/config', 'v1.user.UserSignController/sign_config')->name('signConfig');//簽到配置
    Route::get('sign/list', 'v1.user.UserSignController/sign_list')->name('signList');//簽到列表
    Route::get('sign/month', 'v1.user.UserSignController/sign_month')->name('signIntegral');//簽到列表(年月)
    Route::post('sign/user', 'v1.user.UserSignController/sign_user')->name('signUser');//簽到用戶信息
    Route::post('sign/integral', 'v1.user.UserSignController/sign_integral')->name('signIntegral');//簽到
    //優(yōu)惠券類(lèi)
    Route::post('coupon/receive', 'v1.store.StoreCouponsController/receive')->name('couponReceive'); //領(lǐng)取優(yōu)惠券
    Route::post('coupon/receive/batch', 'v1.store.StoreCouponsController/receive_batch')->name('couponReceiveBatch'); //批量領(lǐng)取優(yōu)惠券
    Route::get('coupons/user/:types', 'v1.store.StoreCouponsController/user')->name('couponsUser');//用戶已領(lǐng)取優(yōu)惠券
    Route::get('coupons/order/:price', 'v1.store.StoreCouponsController/order')->name('couponsOrder');//優(yōu)惠券 訂單列表
    //購(gòu)物車(chē)類(lèi)
    Route::get('cart/list', 'v1.store.StoreCartController/lst')->name('cartList'); //購(gòu)物車(chē)列表
    Route::post('cart/add', 'v1.store.StoreCartController/add')->name('cartAdd'); //購(gòu)物車(chē)添加
    Route::post('cart/del', 'v1.store.StoreCartController/del')->name('cartDel'); //購(gòu)物車(chē)刪除
    Route::post('order/cancel', 'v1.order.StoreOrderController/cancel')->name('orderCancel'); //訂單取消
    Route::post('cart/num', 'v1.store.StoreCartController/num')->name('cartNum'); //購(gòu)物車(chē) 修改商品數(shù)量
    Route::get('cart/count', 'v1.store.StoreCartController/count')->name('cartCount'); //購(gòu)物車(chē) 獲取數(shù)量
    //訂單類(lèi)
    Route::post('order/confirm', 'v1.order.StoreOrderController/confirm')->name('orderConfirm'); //訂單確認(rèn)
    Route::post('order/computed/:key', 'v1.order.StoreOrderController/computedOrder')->name('computedOrder'); //計(jì)算訂單金額
    Route::post('order/create/:key', 'v1.order.StoreOrderController/create')->name('orderCreate'); //訂單創(chuàng)建
    Route::get('order/data', 'v1.order.StoreOrderController/data')->name('orderData'); //訂單統(tǒng)計(jì)數(shù)據(jù)
    Route::get('order/list', 'v1.order.StoreOrderController/lst')->name('orderList'); //訂單列表
    Route::get('order/detail/:uni', 'v1.order.StoreOrderController/detail')->name('orderDetail'); //訂單詳情
    Route::get('order/refund/reason', 'v1.order.StoreOrderController/refund_reason')->name('orderRefundReason'); //訂單退款理由
    Route::post('order/refund/verify', 'v1.order.StoreOrderController/refund_verify')->name('orderRefundVerify'); //訂單退款審核
    Route::post('order/take', 'v1.order.StoreOrderController/take')->name('orderTake'); //訂單收貨
    Route::get('order/express/:uni', 'v1.order.StoreOrderController/express')->name('orderExpress'); //訂單查看物流
    Route::post('order/del', 'v1.order.StoreOrderController/del')->name('orderDel'); //訂單刪除
    Route::post('order/again', 'v1.order.StoreOrderController/again')->name('orderAgain'); //訂單 再次下單
    Route::post('order/pay', 'v1.order.StoreOrderController/pay')->name('orderPay'); //訂單支付
    Route::post('order/product', 'v1.order.StoreOrderController/product')->name('orderProduct'); //訂單商品信息
    Route::post('order/comment', 'v1.order.StoreOrderController/comment')->name('orderComment'); //訂單評(píng)價(jià)
    //活動(dòng)---砍價(jià)
    Route::get('bargain/detail/:id', 'v1.activity.StoreBargainController/detail')->name('bargainDetail');//砍價(jià)商品詳情
    Route::post('bargain/start', 'v1.activity.StoreBargainController/start')->name('bargainStart');//砍價(jià)開(kāi)啟
    Route::post('bargain/start/user', 'v1.activity.StoreBargainController/start_user')->name('bargainStartUser');//砍價(jià) 開(kāi)啟砍價(jià)用戶信息
    Route::post('bargain/share', 'v1.activity.StoreBargainController/share')->name('bargainShare');//砍價(jià) 觀看/分享/參與次數(shù)
    Route::post('bargain/help', 'v1.activity.StoreBargainController/help')->name('bargainHelp');//砍價(jià) 幫助好友砍價(jià)
    Route::post('bargain/help/price', 'v1.activity.StoreBargainController/help_price')->name('bargainHelpPrice');//砍價(jià) 砍掉金額
    Route::post('bargain/help/count', 'v1.activity.StoreBargainController/help_count')->name('bargainHelpCount');//砍價(jià) 砍價(jià)幫總?cè)藬?shù)、剩余金額、進(jìn)度條、已經(jīng)砍掉的價(jià)格
    Route::post('bargain/help/list', 'v1.activity.StoreBargainController/help_list')->name('bargainHelpList');//砍價(jià) 砍價(jià)幫
    Route::post('bargain/poster', 'v1.activity.StoreBargainController/poster')->name('bargainPoster');//砍價(jià)海報(bào)
    Route::get('bargain/user/list', 'v1.activity.StoreBargainController/user_list')->name('bargainUserList');//砍價(jià)列表(已參與)
    Route::post('bargain/user/cancel', 'v1.activity.StoreBargainController/user_cancel')->name('bargainUserCancel');//砍價(jià)取消
    //活動(dòng)---拼團(tuán)
    Route::get('combination/pink/:id', 'v1.activity.StoreCombinationController/pink')->name('combinationPink');//拼團(tuán)開(kāi)團(tuán)
    Route::post('combination/remove', 'v1.activity.StoreCombinationController/remove')->name('combinationRemove');//拼團(tuán) 取消開(kāi)團(tuán)
    Route::post('combination/poster', 'v1.activity.StoreCombinationController/poster')->name('combinationPoster');//拼團(tuán)海報(bào)
    //賬單類(lèi)
    Route::get('commission', 'v1.user.UserBillController/commission')->name('commission');//推廣數(shù)據(jù) 昨天的傭金 累計(jì)提現(xiàn)金額 當(dāng)前傭金
    Route::post('spread/people', 'v1.user.UserController/spread_people')->name('spreadPeople');//推薦用戶
    Route::post('spread/order', 'v1.user.UserBillController/spread_order')->name('spreadOrder');//推廣訂單
    Route::get('spread/commission/:type', 'v1.user.UserBillController/spread_commission')->name('spreadCommission');//推廣傭金明細(xì)
    Route::get('spread/count/:type', 'v1.user.UserBillController/spread_count')->name('spreadCount');//推廣 傭金 3/提現(xiàn) 4 總和
    Route::get('spread/banner', 'v1.user.UserBillController/spread_banner')->name('spreadBanner');//推廣分銷(xiāo)二維碼海報(bào)生成
    Route::get('integral/list', 'v1.user.UserBillController/integral_list')->name('integralList');//積分記錄
    //提現(xiàn)類(lèi)
    Route::get('extract/bank', 'v1.user.UserExtractController/bank')->name('extractBank');//提現(xiàn)銀行/提現(xiàn)最低金額
    Route::post('extract/cash', 'v1.user.UserExtractController/cash')->name('extractCash');//提現(xiàn)申請(qǐng)
    //充值類(lèi)
    Route::post('recharge/recharge', 'v1.user.UserRechargeController/recharge')->name('rechargeRecharge');//統(tǒng)一充值
    Route::post('recharge/routine', 'v1.user.UserRechargeController/routine')->name('rechargeRoutine');//小程序充值
    Route::post('recharge/wechat', 'v1.user.UserRechargeController/wechat')->name('rechargeWechat');//公眾號(hào)充值
    Route::get('recharge/index', 'v1.user.UserRechargeController/index')->name('rechargeQuota');//充值余額選擇
    //會(huì)員等級(jí)類(lèi)
    Route::get('menu/user', 'v1.PublicController/menu_user')->name('menuUser');//個(gè)人中心菜單
    Route::get('user/level/detection', 'v1.user.UserLevelController/detection')->name('userLevelDetection');//檢測(cè)用戶是否可以成為會(huì)員
    Route::get('user/level/grade', 'v1.user.UserLevelController/grade')->name('userLevelGrade');//會(huì)員等級(jí)列表
    Route::get('user/level/task/:id', 'v1.user.UserLevelController/task')->name('userLevelTask');//獲取等級(jí)任務(wù)
    Route::get('user/level/info', 'v1.user.UserLevelController/userLevelInfo')->name('levelInfo');//獲取等級(jí)任務(wù)
    Route::get('user/level/expList', 'v1.user.UserLevelController/expList')->name('expList');//獲取等級(jí)任務(wù)
    //首頁(yè)獲取未支付訂單
    Route::get('order/nopay', 'v1.order.StoreOrderController/get_noPay')->name('getNoPay');//獲取未支付訂單
    Route::get('seckill/code/:id', 'v1.activity.StoreSeckillController/code')->name('seckillCode');//秒殺商品海報(bào)
    Route::get('combination/code/:id', 'v1.activity.StoreCombinationController/code')->name('combinationCode');//拼團(tuán)商品海報(bào)
})->middleware(\app\http\middleware\AllowOriginMiddleware::class)->middleware(\app\api\middleware\AuthTokenMiddleware::class, true);
//未授權(quán)接口
Route::group(function () {
    //公共類(lèi)
    Route::get('index', 'v1.PublicController/index')->name('index');//首頁(yè)
    Route::get('search/keyword', 'v1.PublicController/search')->name('searchKeyword');//熱門(mén)搜索關(guān)鍵字獲取
    //商品分類(lèi)類(lèi)
    Route::get('category', 'v1.store.CategoryController/category')->name('category');
    //商品類(lèi)
    Route::post('image_base64', 'v1.PublicController/get_image_base64')->name('getImageBase64');// 獲取圖片base64
    Route::get('product/detail/:id/[:type]', 'v1.store.StoreProductController/detail')->name('detail');//商品詳情
    Route::get('groom/list/:type', 'v1.store.StoreProductController/groom_list')->name('groomList');//獲取首頁(yè)推薦不同類(lèi)型商品的輪播圖和商品
    Route::get('products', 'v1.store.StoreProductController/lst')->name('products');//商品列表
    Route::get('product/hot', 'v1.store.StoreProductController/product_hot')->name('productHot');//為你推薦
    Route::get('reply/list/:id', 'v1.store.StoreProductController/reply_list')->name('replyList');//商品評(píng)價(jià)列表
    Route::get('reply/config/:id', 'v1.store.StoreProductController/reply_config')->name('replyConfig');//商品評(píng)價(jià)數(shù)量和好評(píng)度
    //文章分類(lèi)類(lèi)
    Route::get('article/category/list', 'v1.publics.ArticleCategoryController/lst')->name('articleCategoryList');//文章分類(lèi)列表
    //文章類(lèi)
    Route::get('article/list/:cid', 'v1.publics.ArticleController/lst')->name('articleList');//文章列表
    Route::get('article/details/:id', 'v1.publics.ArticleController/details')->name('articleDetails');//文章詳情
    Route::get('article/hot/list', 'v1.publics.ArticleController/hot')->name('articleHotList');//文章 熱門(mén)
    Route::get('article/new/list', 'v1.publics.ArticleController/new')->name('articleNewList');//文章 最新
    Route::get('article/banner/list', 'v1.publics.ArticleController/banner')->name('articleBannerList');//文章 banner
    //活動(dòng)---秒殺
    Route::get('seckill/index', 'v1.activity.StoreSeckillController/index')->name('seckillIndex');//秒殺商品時(shí)間區(qū)間
    Route::get('seckill/list/:time', 'v1.activity.StoreSeckillController/lst')->name('seckillList');//秒殺商品列表
    Route::get('seckill/detail/:id/[:time]', 'v1.activity.StoreSeckillController/detail')->name('seckillDetail');//秒殺商品詳情
    //活動(dòng)---砍價(jià)
    Route::get('bargain/config', 'v1.activity.StoreBargainController/config')->name('bargainConfig');//砍價(jià)商品列表配置
    Route::get('bargain/list', 'v1.activity.StoreBargainController/lst')->name('bargainList');//砍價(jià)商品列表
    //活動(dòng)---拼團(tuán)
    Route::get('combination/list', 'v1.activity.StoreCombinationController/lst')->name('combinationList');//拼團(tuán)商品列表
    Route::get('combination/detail/:id', 'v1.activity.StoreCombinationController/detail')->name('combinationDetail');//拼團(tuán)商品詳情
    //用戶類(lèi)
    Route::get('user/activity', 'v1.user.UserController/activity')->name('userActivity');//活動(dòng)狀態(tài)
    //微信
    Route::get('wechat/config', 'v1.wechat.WechatController/config')->name('wechatConfig');//微信 sdk 配置
    Route::get('wechat/auth', 'v1.wechat.WechatController/auth')->name('wechatAuth');//微信授權(quán)
    //小程序登陸
    Route::post('wechat/mp_auth', 'v1.wechat.AuthController/mp_auth')->name('mpAuth');//小程序登陸
    Route::get('wechat/get_logo', 'v1.wechat.AuthController/get_logo')->name('getLogo');//小程序登陸授權(quán)展示logo
    Route::get('wechat/teml_ids', 'v1.wechat.AuthController/teml_ids')->name('wechatTemlIds');//小程序訂閱消息
    Route::get('wechat/live', 'v1.wechat.AuthController/live')->name('wechatLive');//小程序直播列表
    //物流公司
    Route::get('logistics', 'v1.PublicController/logistics')->name('logistics');//物流公司列表
    //分享配置
    Route::get('share', 'v1.PublicController/share')->name('share');//分享配置
    //優(yōu)惠券
    Route::get('coupons', 'v1.store.StoreCouponsController/lst')->name('couponsList'); //可領(lǐng)取優(yōu)惠券列表
    //短信購(gòu)買(mǎi)異步通知
    Route::post('sms/pay/notify', 'v1.PublicController/sms_pay_notify')->name('smsPayNotify'); //短信購(gòu)買(mǎi)異步通知
    //獲取關(guān)注微信公眾號(hào)海報(bào)
    Route::get('wechat/follow', 'v1.wechat.WechatController/follow')->name('Follow');
    //門(mén)店列表
    Route::get('store_list', 'v1.PublicController/store_list')->name('storeList');
    //獲取城市列表
    Route::get('city_list', 'v1.PublicController/city_list')->name('cityList');
    //拼團(tuán)數(shù)據(jù)
    Route::get('pink', 'v1.PublicController/pink')->name('pinkData');
    //用戶訪問(wèn)
    Route::post('user/set_visit', 'v1.user.UserController/set_visit')->name('setVisit');// 添加用戶訪問(wèn)記錄
    //復(fù)制口令接口
    Route::get('copy_words', 'v1.PublicController/copy_words')->name('copyWords');// 復(fù)制口令接口
})->middleware(\app\http\middleware\AllowOriginMiddleware::class)->middleware(\app\api\middleware\AuthTokenMiddleware::class, false);
Route::miss(function () {
    if (app()->request->isOptions()) {
        $header = Config::get('cookie.header');
        unset($header['Access-Control-Allow-Credentials']);
        return Response::create('ok')->code(200)->header($header);
    } else
        return Response::create()->code(404);
});
~~~
~~~
Route::group('v2', function () {
    //無(wú)需授權(quán)接口
    Route::group(function () {
        //小程序靜默授權(quán)
        Route::get('wechat/silence_auth', 'v2.wechat.AuthController/silenceAuth');
        //公眾號(hào)靜默授權(quán)
        Route::get('wechat/wx_silence_auth', 'v2.wechat.WechatController/silenceAuth');
        //DIY接口
        Route::get('diy/get_diy', 'v2.PublicController/getDiy');
        //是否強(qiáng)制綁定手機(jī)號(hào)
        Route::get('bind_status','v2.PublicController/bindPhoneStatus');
        //小程序授權(quán)綁定手機(jī)號(hào)
        Route::post('auth_bindind_phone','v2.wechat.AuthController/authBindindPhone');
    });
    //需要授權(quán)
    Route::group(function () {
        Route::post('reset_cart','v2.store.StoreCartController/resetCart')->name('resetCart');
        Route::get('new_coupon', 'v2.store.StoreCouponsController/getNewCoupon')->name('getNewCoupon');//獲取新人券
        Route::post('user/user_update','v2.wechat.AuthController/updateInfo');
        Route::post('order/product_coupon/:orderId','v2.store.StoreCouponsController/getOrderProductCoupon');
    })->middleware(\app\api\middleware\AuthTokenMiddleware::class, true);
    //授權(quán)不通過(guò),不會(huì)拋出異常繼續(xù)執(zhí)行
    Route::group(function () {
    })->middleware(\app\api\middleware\AuthTokenMiddleware::class, false);
})->middleware(\app\http\middleware\AllowOriginMiddleware::class);
以上內(nèi)容是否對(duì)您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號(hào)
微信公眾號(hào)

編程獅公眾號(hào)