小程序分銷接口使用說(shuō)明

小程序分銷接口使用說(shuō)明


請(qǐng)先在config.js文件中找到config設(shè)置,查看是否已定義接口路徑

1.png

如未定義,請(qǐng)先定義接口路徑保存文件:dealerActionUrl: getApiUrl('dealer_action', 'Users'),


接口名稱:App.globalData.config.dealerActionUrl


接口必要參數(shù):action

action: 'getApply'                     獲取分銷商申請(qǐng)頁(yè)面數(shù)據(jù)

action: 'addApply'                    添加分銷商申請(qǐng)

action: 'getDealer'                    獲取分銷商信息

action: 'getPoster'                    獲取分銷商推廣海報(bào)

action: 'bindUsers'                   綁定成為分銷商下級(jí)

action: 'getCustomerList'         獲取分銷商客戶列表

action: 'getSubordinateList'     獲取分銷商下級(jí)分銷商列表

action: 'getOrderList'               獲取分銷商參與分傭的訂單列表

action: 'getMoneyList'             獲取分銷商傭金明細(xì)列表

action: 'getWithdrawApply'     獲取分銷商提現(xiàn)申請(qǐng)頁(yè)面數(shù)據(jù)

action: 'addWithdrawApply'    添加分銷商提現(xiàn)申請(qǐng)

action: 'getWithdrawList'         獲取分銷商提現(xiàn)申請(qǐng)列表


接口其他參數(shù):根據(jù)action參數(shù)變化,請(qǐng)參考指定接口


必要方法說(shuō)明:App.dealerOpenHandle(res);

檢測(cè)分銷功能是否開啟,當(dāng)前登錄者的分銷商狀態(tài),如有異常則提示并跳轉(zhuǎn)到會(huì)員中心。


基礎(chǔ)代碼示例:

    getDealerxxxxx() {
        let _this = this;
        let postData = {
            action: 'xxxxx',
        };
        App._requestApi(_this, App.globalData.config.dealerActionUrl, postData, function (res) {
            // 分銷功能是否開啟,未開啟則跳轉(zhuǎn)到指定頁(yè)面
            App.dealerOpenHandle(res);
            // 接口數(shù)據(jù)
            let xxxxx = res.data;
        });
    },
文檔最后更新時(shí)間:2023-03-16 11:23:30

文檔
目錄

深色
模式

切換
寬度