import BaseStore from '@src/stores/base'; export default class CommonStore extends BaseStore { /** * 发送短信验证码 * @param {*} area 区域码 * @param {*} mobile 手机号 */ sendSms(area, mobile) { return this.apiPost('/common/sms/valid', { area, mobile }); } /** * 上传至本地服务器 * @param {*} file 图片文件 */ upload(file) { return this.apiForm('/common/upload/image', { file }); } } export const Common = new CommonStore({ key: 'common' });