miniQRCodeRoute.js 637 Bytes

import Promise from '../vendors/es6-promise';
import { GET, POST } from './request/request';
import config from '../config';

function getQRCodeSource(code) {
  return new Promise(function (resolve, reject) {
    let param = {
      params: {
        md5Param: code,
        miniapp_type: '63'
      },
      url: config.domains.yohoApi +'/wechat/miniapp/getMiniAppRealParam'
    }
    
    GET(param)
      .then(data => {
        if (data) {
          resolve(JSON.parse(data));
        } else {
          reject(null);
        }
      })
      .catch(error => {
        reject(error);
      });
  })
}

export {
  getQRCodeSource,
}