reg-service.js 679 Bytes
/**
 * 注册 model
 */
'use strict';
const passportHelper = require('./passport-helper');
const Api = require('./reg-api');

const REGISTER_LEFT_BANNER_CODE = 'c479ec90120cae7f96e52922b4917064'; // 注册左边的banner


module.exports = class extends global.yoho.BaseModel {
    constructor(ctx) {
        super(ctx);
        this.api = new Api(ctx);

        this.sendCodeToMobile = this.api.sendCodeToMobile.bind(this.api);
        this.validMobileCode = this.api.validMobileCode.bind(this.api);
        this.regMobileAes = this.api.regMobileAes.bind(this.api);
    }

    getRegData() {
        return passportHelper.getLeftBannerAsync(REGISTER_LEFT_BANNER_CODE);
    }
};