|
@@ -3,16 +3,47 @@ const {post, config, getUrlArgObject, openNewWin, titleConfig} = require('./prom
|
|
|
const targetUrl = 'http://114.55.109.16:81/lantone/index';
|
|
|
|
|
|
$(function () {
|
|
|
+ let mrId = getUrlArgObject('mrId')
|
|
|
$(".knowledge .a-link").click(function () {
|
|
|
const code = $(this).attr("code");
|
|
|
openNewWin(targetUrl + '?page=' + code);
|
|
|
})
|
|
|
+ $("#goPush").click(function () {
|
|
|
+ openNewWin(targetUrl + '?page=bztd');
|
|
|
+ });
|
|
|
});
|
|
|
|
|
|
-function renderTcm(data) {
|
|
|
+//获取参数
|
|
|
+function getTcmData(param) {
|
|
|
+ $('#jibing').text(param.tcmDiag);
|
|
|
+ $('#zhenghou').text(param.tcmSyndrome);
|
|
|
+ post('/lantone/private/zycftj?jibing=' + param.tcmDiag + "&zhengxing=" + param.tcmSyndrome).then((res) => {
|
|
|
+ console.log(res)
|
|
|
+ let data = res.data.data || {}
|
|
|
+ if (res.data.status) {
|
|
|
+ renderTcm(data)
|
|
|
+ } else {
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+function renderTcm(data) {
|
|
|
+ let str = ``;
|
|
|
+ $('#bingming').text(data.name);
|
|
|
+ data.map((it, i) => {
|
|
|
+ if (i === 0) {
|
|
|
+ str += `<span class="val active">${it.name}</span>`;
|
|
|
+ } else {
|
|
|
+ str += `<span class="val">${it.name}</span>`;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ $('#zhifa').html(str);
|
|
|
}
|
|
|
|
|
|
+function
|
|
|
module.exports = {
|
|
|
- renderTcm
|
|
|
+ renderTcm,
|
|
|
+ getTcmData
|
|
|
}
|