|
@@ -46,8 +46,8 @@ function getTcmMr(mrId, config) {
|
|
|
|
|
|
//获取处方推荐
|
|
|
function getTcmData(param, config) {
|
|
|
- const item = config.planDetails.find((it) => it.code === "treatment");
|
|
|
- const num = (item || {}).number || 3;
|
|
|
+ const item = config.planDetails.filter((it) => it.code === "treatment");
|
|
|
+ const num = (item[0] || {}).number || 3;
|
|
|
const {tcmDiag, tcmSyndrome} = param;
|
|
|
if (!tcmDiag) { //没有推送入参时不显示推送模块
|
|
|
$(".recipe").hide();
|
|
@@ -58,8 +58,8 @@ function getTcmData(param, config) {
|
|
|
$('#zhenghou').text(tcmSyndrome);
|
|
|
treatUrl = targetUrl + '?jibing=' + tcmDiag + "&zhengxing=" + tcmSyndrome;
|
|
|
//处方推荐
|
|
|
- get('/lantone/private/zycftj?jibing=' + tcmDiag + "&zhengxing=" + tcmSyndrome).then((res) => {
|
|
|
- //console.log(res)
|
|
|
+ get(window.encodeURI('/lantone/private/zycftj?jibing=' + tcmDiag + "&zhengxing=" + tcmSyndrome)).then((res) => {
|
|
|
+ console.log("窗口地址:", treatUrl)
|
|
|
let data = res.data.data || []
|
|
|
if (!data.length) { //没有处方时不显示推送模块
|
|
|
$(".recipe").hide();
|
|
@@ -86,7 +86,6 @@ function getTcmData(param, config) {
|
|
|
function renderTcm(data, num = 3) {
|
|
|
let str = ``, it;
|
|
|
$("#goTreat").hide();
|
|
|
- console.log(num)
|
|
|
const n = num < data.length ? num : data.length;
|
|
|
for (let i = 0; i < n; i++) {
|
|
|
it = data[i];
|
|
@@ -109,7 +108,7 @@ function renderTcm(data, num = 3) {
|
|
|
$('.detail ul').html(str);
|
|
|
//更多治法
|
|
|
$("#goTreat").on('click', function () {
|
|
|
- openNewWin(treatUrl, true);
|
|
|
+ openNewWin(window.encodeURI(treatUrl), true);
|
|
|
});
|
|
|
}
|
|
|
|