miniQRCodeRoute.js
710 Bytes
import Promise from '../vendors/es6-promise';
import config from './config';
import api from './api';
import Yas from './yas';
export function getQRCodeSource(code) {
let param = {
md5Param: code,
miniapp_type: 4
};
return api.get({
url: '/wechat/miniapp/getMiniAppRealParam',
data: param
}).then(data => {
if (data.code === 200) {
if (data.data) {
let resultJson = JSON.parse(data.data);
if (resultJson) {
let app = getApp();
let yas = new Yas(app);
yas.report('YB_SHARE_UNION_TYPE', resultJson);
}
return resultJson;
}
} else {
return {};
}
}).catch(error => {
return error;
});
}