login-new.js 633 Bytes
const serviceApi = global.yoho.ServiceAPI;
const resources = {
    yohobuy: 'b7a510c2ece17d205a8f17b06ee8d2af',
    yohomars: '',
    yohocoffee: ''
};

class LoginNewModel extends global.yoho.BaseModel {
    constructor(ctx) {
        super(ctx);
    }

    /**
     * 调用接口获取登录页顶部的 Banner
     */
    getTopBanner(which) {
        let resource = resources.yohobuy;

        if (which) {
            resource = resources[which];
        }

        return serviceApi.get('operations/api/v5/resource/get', {
            content_code: resource
        }, {cache: true});
    }
}

module.exports = LoginNewModel;