Browse Source

feat: 新增医院介绍入口

carver 1 year ago
parent
commit
80d6b97fe7

+ 2 - 1
antbuilder/core/components/industry-container/index.json

@@ -67,6 +67,7 @@
 		"hospital-home":"/antbuilder/industry/hospitalV2/components/hospital-home/index",
 		"scenic-order-list":"/antbuilder/industry/scenicSpotTicket/components/scenic-order-list/index",
 		"hospital-consulting-service-component":"/antbuilder/industry/hospitalV2/components/medical-consultation/medicalConsultation",
-    "patient-guide":"/antbuilder/industry/hospitalV2/components/patient-guide/index"
+    	"patient-guide":"/antbuilder/industry/hospitalV2/components/patient-guide/index",
+    	"hospital-introduce":"/antbuilder/industry/hospitalV2/components/hospital-introduce/index"
 	}
 }

+ 272 - 272
antbuilder/core/utils/request.js

@@ -1,307 +1,307 @@
 import { getIn } from "herculex/dist/utils/manipulate";
 import {
-	host,
-	getTicketUrl,
-	ywtHost,
-	terminal,
-	ywtEnvVersionPrefix,
+  host,
+  getTicketUrl,
+  ywtHost,
+  terminal,
+  ywtEnvVersionPrefix,
 } from "./constants";
 import { getSilentAuthCode, getAppId, getServerTime } from "./jsapi";
 import { joinUrl } from "./format";
 import { getCurrentStore } from "../../../antbuilder/core/utils/index";
 
 function showErrorMessgage({ isShowError, error }) {
-	if (isShowError) {
-		my.showToast({
-			type: "fail",
-			content: error && (error.msg || error.errorMessage),
-			duration: 3000,
-		});
-	}
+  if (isShowError) {
+    my.showToast({
+      type: "fail",
+      content: error && (error.msg || error.errorMessage),
+      duration: 3000,
+    });
+  }
 }
 
 async function checkTimeExpire(time) {
-	if (!time) return false;
-	const [err, res] = await getServerTime();
-	const currentTime = err ? new Date().getTime() : +res.time;
-	return time < currentTime;
+  if (!time) return false;
+  const [err, res] = await getServerTime();
+  const currentTime = err ? new Date().getTime() : +res.time;
+  return time < currentTime;
 }
 
 export function _request({
-	url,
-	method = "post",
-	data = {},
-	headers = {},
-	isShowLoadig = false,
-	isShowError = false,
+  url,
+  method = "post",
+  data = {},
+  headers = {},
+  isShowLoadig = false,
+  isShowError = false,
 } = {}) {
-	return new Promise((resolve) => {
-		if (isShowLoadig) {
-			my.showLoading();
-		}
-		// eslint-disable-next-line no-undef
-		const app = getApp();
-		my.request({
-			url: url.startsWith("http") ? url : joinUrl(host, url),
-			method,
-			data: Object.assign(data, {
-				userId: app.globalData.ywtUserId || "",
-				appId: app.globalData.appId || "",
-				alipayUid: app.globalData.alipayUid,
-				terminal,
-			}),
-			headers: {
-				"content-type": "application/x-www-form-urlencoded",
-				ticket: app.globalData.ticketData.ticket, // todo test
-				appId: app.globalData.appId, // todo test
-				...headers,
-			},
-			dataType: "json",
-			success(res) {
-				const result = res.data || {};
-				const code = +result.code;
-				if (result && code === 200) {
-					resolve([
-						null,
-						{
-							data: result.data,
-							code,
-						},
-					]);
-				} else if (code === 20002 || code === 20001 || code === 20008) {
-					resolve([
-						null,
-						{
-							code,
-							data: null,
-						},
-					]);
-				} else if (code === 401) {
-					resolve([null, result]);
-				} else if (code >= 600) {
-					// 自定义错误
-					showErrorMessgage({
-						isShowError: true,
-						error: { msg: result.msg || "未知错误" },
-					});
-					my.hideLoading();
-					resolve([result, null]);
-				} else {
-					showErrorMessgage({
-						isShowError,
-						error: result,
-					});
-					resolve([result, null]);
-				}
-			},
-			fail(err) {
-				showErrorMessgage({
-					isShowError,
-					error: err,
-				});
-				resolve([err, null]);
-			},
-			complete() {
-				if (isShowLoadig) {
-					my.hideLoading();
-				}
-			},
-		});
-	});
+  return new Promise((resolve) => {
+    if (isShowLoadig) {
+      my.showLoading();
+    }
+    // eslint-disable-next-line no-undef
+    const app = getApp();
+    my.request({
+      url: url.startsWith("http") ? url : joinUrl(host, url),
+      method,
+      data: Object.assign(data, {
+        userId: app.globalData.ywtUserId || "",
+        appId: app.globalData.appId || "",
+        alipayUid: app.globalData.alipayUid,
+        terminal,
+      }),
+      headers: {
+        "content-type": "application/x-www-form-urlencoded",
+        ticket: app.globalData.ticketData.ticket, // todo test
+        appId: app.globalData.appId, // todo test
+        ...headers,
+      },
+      dataType: "json",
+      success(res) {
+        const result = res.data || {};
+        const code = +result.code;
+        if (result && code === 200) {
+          resolve([
+            null,
+            {
+              data: result.data,
+              code,
+            },
+          ]);
+        } else if (code === 20002 || code === 20001 || code === 20008) {
+          resolve([
+            null,
+            {
+              code,
+              data: null,
+            },
+          ]);
+        } else if (code === 401) {
+          resolve([null, result]);
+        } else if (code >= 600) {
+          // 自定义错误
+          showErrorMessgage({
+            isShowError: true,
+            error: { msg: result.msg || "未知错误" },
+          });
+          my.hideLoading();
+          resolve([result, null]);
+        } else {
+          showErrorMessgage({
+            isShowError,
+            error: result,
+          });
+          resolve([result, null]);
+        }
+      },
+      fail(err) {
+        showErrorMessgage({
+          isShowError,
+          error: err,
+        });
+        resolve([err, null]);
+      },
+      complete() {
+        if (isShowLoadig) {
+          my.hideLoading();
+        }
+      },
+    });
+  });
 }
 
 export const ywtEnvUrl = {
-	"3508C5373A7C4BF18BF3F835FA2B5146": "https://api-qa.ywtinfo.com/",
-	"F0C507F7F24C4E1E95924A02B8617DC7": "https://api.ywtinfo.com/",
-	"1374B32A31454A2E90E09FF738866E02": 'https://api.ywtinfo.com/',
-	"A94C3DEE59344D0184C3902418DB6D81": 'https://api-qa.ywtinfo.com/'
+  "3508C5373A7C4BF18BF3F835FA2B5146": "https://api-qa.ywtinfo.com/",
+  F0C507F7F24C4E1E95924A02B8617DC7: "https://api.ywtinfo.com/",
+  "1374B32A31454A2E90E09FF738866E02": "https://api-qa.ywtinfo.com/", // 太和QA
+  A94C3DEE59344D0184C3902418DB6D81: "https://api-qa.ywtinfo.com/",
 };
 
 export function _ywtRequest({
-	url,
-	method = "post",
-	data = {},
-	headers = {},
-	isShowLoadig = false,
-	isShowError = false,
+  url,
+  method = "post",
+  data = {},
+  headers = {},
+  isShowLoadig = false,
+  isShowError = false,
 } = {}) {
-	return new Promise((resolve) => {
-		if (isShowLoadig) {
-			my.showLoading();
-		}
-		const app = getApp();
-		const ywtRequestUrl =
-			ywtEnvUrl[app.globalData.templateUUID] + ywtEnvVersionPrefix;
-		my.request({
-			url: url.startsWith("http") ? url : joinUrl(ywtRequestUrl, url),
-			method,
-			data: Object.assign(data, {
-				userId: app.globalData.ywtUserId || "",
-				appId: app.globalData.appId || "",
-				alipayUid: app.globalData.alipayUid,
-				terminal,
-			}),
-			headers: {
-				...headers,
-			},
-			dataType: "json",
-			success(res) {
-				const result = res.data || {};
-				const code = +result.code;
-				if (result && code === 0) {
-					resolve([
-						null,
-						{
-							data: result.data,
-							code,
-						},
-					]);
-				} else if (code === 20002 || code === 20001 || code === 20008) {
-					resolve([
-						null,
-						{
-							code,
-							data: null,
-						},
-					]);
-				} else if (code >= 600) {
-					// 自定义错误
-					showErrorMessgage({
-						isShowError: true,
-						error: { msg: result.msg || "未知错误" },
-					});
-					my.hideLoading();
-					resolve([result, null]);
-				} else {
-					showErrorMessgage({
-						isShowError,
-						error: result,
-					});
-					resolve([result, null]);
-				}
-			},
-			fail(err) {
-				showErrorMessgage({
-					isShowError,
-					error: err,
-				});
-				resolve([err, null]);
-			},
-			complete() {
-				if (isShowLoadig) {
-					my.hideLoading();
-				}
-			},
-		});
-	});
+  return new Promise((resolve) => {
+    if (isShowLoadig) {
+      my.showLoading();
+    }
+    const app = getApp();
+    const ywtRequestUrl =
+      ywtEnvUrl[app.globalData.templateUUID] + ywtEnvVersionPrefix;
+    my.request({
+      url: url.startsWith("http") ? url : joinUrl(ywtRequestUrl, url),
+      method,
+      data: Object.assign(data, {
+        userId: app.globalData.ywtUserId || "",
+        appId: app.globalData.appId || "",
+        alipayUid: app.globalData.alipayUid,
+        terminal,
+      }),
+      headers: {
+        ...headers,
+      },
+      dataType: "json",
+      success(res) {
+        const result = res.data || {};
+        const code = +result.code;
+        if (result && code === 0) {
+          resolve([
+            null,
+            {
+              data: result.data,
+              code,
+            },
+          ]);
+        } else if (code === 20002 || code === 20001 || code === 20008) {
+          resolve([
+            null,
+            {
+              code,
+              data: null,
+            },
+          ]);
+        } else if (code >= 600) {
+          // 自定义错误
+          showErrorMessgage({
+            isShowError: true,
+            error: { msg: result.msg || "未知错误" },
+          });
+          my.hideLoading();
+          resolve([result, null]);
+        } else {
+          showErrorMessgage({
+            isShowError,
+            error: result,
+          });
+          resolve([result, null]);
+        }
+      },
+      fail(err) {
+        showErrorMessgage({
+          isShowError,
+          error: err,
+        });
+        resolve([err, null]);
+      },
+      complete() {
+        if (isShowLoadig) {
+          my.hideLoading();
+        }
+      },
+    });
+  });
 }
 
 export async function getTicket() {
-	// eslint-disable-next-line no-undef
-	const app = getApp();
-	const { appId } = app.globalData;
-	if (!appId) {
-		app.globalData.appId = getAppId();
-	}
-	const [err, res] = await getSilentAuthCode();
-	if (err) return [err, null];
-	const data = {
-		authCode: res.authCode,
-		appId: app.globalData.appId,
-	};
-	const result = await _request({
-		url: getTicketUrl,
-		data,
-	});
-	return result;
+  // eslint-disable-next-line no-undef
+  const app = getApp();
+  const { appId } = app.globalData;
+  if (!appId) {
+    app.globalData.appId = getAppId();
+  }
+  const [err, res] = await getSilentAuthCode();
+  if (err) return [err, null];
+  const data = {
+    authCode: res.authCode,
+    appId: app.globalData.appId,
+  };
+  const result = await _request({
+    url: getTicketUrl,
+    data,
+  });
+  return result;
 }
 
 export async function setTicket() {
-	const app = getApp();
-	const { expiresTime } = app.globalData.ticketData;
-	console.log("expiresTime", expiresTime);
-	// 如果当前其他请求更新了ticket,则不用重新请求
-	if (expiresTime && (await checkTimeExpire(expiresTime))) {
-		console.log(
-			"checkTimeExpire(expiresTime)",
-			await checkTimeExpire(expiresTime)
-		);
-		return;
-	}
-	// 如果没有ticket正在请求,则在gloabl上增加setTicket
-	if (!app.globalData.getTicketing) {
-		app.globalData.setTicket = (async function () {
-			app.globalData.getTicketing = true;
-			const [err, res] = await getTicket();
-			if (err) {
-				return [err, null];
-			}
-			// eslint-disable-next-line no-undef
-			app.globalData.ticketData.ticket = res.data.ticket;
-			app.globalData.ticketData.expiresTime = res.data.expiresTime;
-			app.globalData.getTicketing = false;
-			return [null, res];
-		})();
-	}
-	// 如果ticket正在请求,则返回正在请求的ticket
-	return app.globalData.setTicket;
+  const app = getApp();
+  const { expiresTime } = app.globalData.ticketData;
+  console.log("expiresTime", expiresTime);
+  // 如果当前其他请求更新了ticket,则不用重新请求
+  if (expiresTime && (await checkTimeExpire(expiresTime))) {
+    console.log(
+      "checkTimeExpire(expiresTime)",
+      await checkTimeExpire(expiresTime)
+    );
+    return;
+  }
+  // 如果没有ticket正在请求,则在gloabl上增加setTicket
+  if (!app.globalData.getTicketing) {
+    app.globalData.setTicket = (async function () {
+      app.globalData.getTicketing = true;
+      const [err, res] = await getTicket();
+      if (err) {
+        return [err, null];
+      }
+      // eslint-disable-next-line no-undef
+      app.globalData.ticketData.ticket = res.data.ticket;
+      app.globalData.ticketData.expiresTime = res.data.expiresTime;
+      app.globalData.getTicketing = false;
+      return [null, res];
+    })();
+  }
+  // 如果ticket正在请求,则返回正在请求的ticket
+  return app.globalData.setTicket;
 }
 
 export default async function request(options) {
-	const app = getApp();
-	// 如果没有ticket直接请求ticket
-	if (!app.globalData.ticketData.ticket && !options.noNeedTicket) {
-		await setTicket();
-	}
-	const [err, res] = await _request(options);
-	if (err) return [err, null];
-	const code = +getIn(res, ["code"], "");
-	if (code === 20001 || code === 20002 || code === 20008) {
-		console.log("code ===>", code);
-		const [error] = await setTicket();
-		if (!error) {
-			const result = await request(options);
-			return result;
-		}
-		return [error, null];
-	} else if (code === 401) {
-		// 手动发起请求
-		const currentStore = getCurrentStore();
-		const { dispatchGlobal } = currentStore;
-		const scopes = "auth_user";
-		/* 这里表示如果不是通过按钮触发的手机号登录,需要打开按钮弹窗 */
-		// if (currentScope !== scopes) {
-		// await dispatch.call(currentStore, "launchPhone");
-		// }
-		const success = await dispatchGlobal("doLogin", { scopes });
-		/* 登录失败 */
-		if (!success) {
-			showErrorMessgage({
-				isShowError: true,
-				error: { msg: "登录失败" },
-			});
-			my.navigateBack();
-			return;
-		}
-		const result = await request(options);
-		return result;
-	}
-	const data = res.data || null;
-	return [null, data];
+  const app = getApp();
+  // 如果没有ticket直接请求ticket
+  if (!app.globalData.ticketData.ticket && !options.noNeedTicket) {
+    await setTicket();
+  }
+  const [err, res] = await _request(options);
+  if (err) return [err, null];
+  const code = +getIn(res, ["code"], "");
+  if (code === 20001 || code === 20002 || code === 20008) {
+    console.log("code ===>", code);
+    const [error] = await setTicket();
+    if (!error) {
+      const result = await request(options);
+      return result;
+    }
+    return [error, null];
+  } else if (code === 401) {
+    // 手动发起请求
+    const currentStore = getCurrentStore();
+    const { dispatchGlobal } = currentStore;
+    const scopes = "auth_user";
+    /* 这里表示如果不是通过按钮触发的手机号登录,需要打开按钮弹窗 */
+    // if (currentScope !== scopes) {
+    // await dispatch.call(currentStore, "launchPhone");
+    // }
+    const success = await dispatchGlobal("doLogin", { scopes });
+    /* 登录失败 */
+    if (!success) {
+      showErrorMessgage({
+        isShowError: true,
+        error: { msg: "登录失败" },
+      });
+      my.navigateBack();
+      return;
+    }
+    const result = await request(options);
+    return result;
+  }
+  const data = res.data || null;
+  return [null, data];
 }
 
 export async function ywtRequest(options) {
-	const [err, res] = await _ywtRequest(options);
-	if (err) return [err, null];
-	const code = +getIn(res, ["code"], "");
-	if (code === 20001 || code === 20002 || code === 20008) {
-		const [error] = await setTicket();
-		if (!error) {
-			const result = await ywtRequest(options);
-			return result;
-		}
-		return [error, null];
-	}
-	const data = res.data || null;
-	return [null, data];
+  const [err, res] = await _ywtRequest(options);
+  if (err) return [err, null];
+  const code = +getIn(res, ["code"], "");
+  if (code === 20001 || code === 20002 || code === 20008) {
+    const [error] = await setTicket();
+    if (!error) {
+      const result = await ywtRequest(options);
+      return result;
+    }
+    return [error, null];
+  }
+  const data = res.data || null;
+  return [null, data];
 }

+ 76 - 65
antbuilder/core/utils/ywtService.js

@@ -4,93 +4,104 @@ import { terminal } from "./constants";
 
 // 进行授权
 export async function ywtAuth(data) {
-	const [err, res] = await ywtRequest({
-		url: "/auth/bind",
-		method: "post",
-		data,
-	});
-	if (err || !res) return [err, null];
-	return [null, res];
+  const [err, res] = await ywtRequest({
+    url: "/auth/bind",
+    method: "post",
+    data,
+  });
+  if (err || !res) return [err, null];
+  return [null, res];
 }
 
 // 获取挂号时段
 export async function doctorSchedule(data) {
-	const [err, res] = await ywtRequest({
-		url: "/register/doctorSchedule",
-		method: "post",
-		data,
-	});
-	if (err || !res) return [err, null];
-	return [null, res];
+  const [err, res] = await ywtRequest({
+    url: "/register/doctorSchedule",
+    method: "post",
+    data,
+  });
+  if (err || !res) return [err, null];
+  return [null, res];
 }
 
 // 获取就医须知
 export async function getRegisteredAnnouncement(data) {
-	const [err, res] = await ywtRequest({
-		url: "/register/getRegisteredAnnouncement",
-		method: "post",
-		data,
-	});
-	if (err || !res) return [err, null];
-	return [null, res];
+  const [err, res] = await ywtRequest({
+    url: "/register/getRegisteredAnnouncement",
+    method: "post",
+    data,
+  });
+  if (err || !res) return [err, null];
+  return [null, res];
 }
 
 // 获取就诊指南
 export async function getGuideList(data) {
-	const [err, res] = await ywtRequest({
-		url: "/commonAnnouncement/getGuideList",
-		method: "post",
-		data,
-	});
-	if (err || !res) return [err, null];
-	return [null, res];
+  const [err, res] = await ywtRequest({
+    url: "/commonAnnouncement/getGuideList",
+    method: "post",
+    data,
+  });
+  if (err || !res) return [err, null];
+  return [null, res];
+}
+
+// 获取医院介绍
+export async function getIntroduce(data) {
+  const [err, res] = await ywtRequest({
+    url: "/introduce/getIntroduce",
+    method: "post",
+    data,
+  });
+  if (err || !res) return [err, null];
+  return [null, res];
 }
 
 // 支付完成后提交 authCode
 export async function submitAuthCode(data) {
-	const [err, res] = await ywtRequest({
-		url: "/auth/submitAuthCode",
-		method: "post",
-		data,
-	});
-	if (err || !res) return [err, null];
-	return [null, res];
+  const [err, res] = await ywtRequest({
+    url: "/auth/submitAuthCode",
+    method: "post",
+    data,
+  });
+  if (err || !res) return [err, null];
+  return [null, res];
 }
 
 // 消息推送授权
 export async function getSubscribeAuth() {
-	const [err, authResult] = await getAuthUser(["hospital_order"]);
-	if (err) {
-		my.showToast({
-			type: "fail",
-			content: "智能消息推送授权失败",
-		});
-		return [err, null];
-	} else {
-		const [error, result] = await submitAuthCode({
-			authCode: authResult.authCode,
-		});
-		if (error) {
-			my.showToast({
-				type: "fail",
-				content: "消息订阅失败",
-			});
-		}
-		return [error, result];
-	}
+  const [err, authResult] = await getAuthUser(["hospital_order"]);
+  if (err) {
+    my.showToast({
+      type: "fail",
+      content: "智能消息推送授权失败",
+    });
+    return [err, null];
+  } else {
+    const [error, result] = await submitAuthCode({
+      authCode: authResult.authCode,
+    });
+    if (error) {
+      my.showToast({
+        type: "fail",
+        content: "消息订阅失败",
+      });
+    }
+    return [error, result];
+  }
 }
 
 // 数据埋点记录
 export async function recordOpLog({ type }) {
-	const [err, res] = await ywtRequest({
-		url: "/dev/opLog",
-		method: "post",
-		data: {
-			type,
-			terminal: terminal,
-			userType: 1,
-		},
-	});
-	if (err || !res) return [err, null];
-	return [null, res];
+  const [err, res] = await ywtRequest({
+    url: "/dev/opLog",
+    method: "post",
+    data: {
+      type,
+      terminal: terminal,
+      userType: 1,
+    },
+  });
+  if (err || !res) return [err, null];
+  return [null, res];
 }

+ 21 - 3
antbuilder/industry/hospitalV2/components/general-services/generalServices.axml

@@ -2,8 +2,7 @@
 <wrapper>
   <view class="{{ utils.getAllPageClass(componentData) }}">
     <view class="general-services style-{{ utils.getMode(componentData) }}">
-      <!-- <view> -->
-        
+      <!-- 就医指南 -->
       <button
         formClass="service-item"
         class="service-item-contentjiuyi"
@@ -22,7 +21,26 @@
         </view>
 
       </button>
-    <!-- </view> -->
+
+      <!-- 医院介绍 -->
+      <button
+        formClass="service-item"
+        class="service-item-contentjiuyi"
+        onTap="gotoHospitalIntroduce"
+      >
+        <view class="icon-container icon-container-jiuyi">
+          <image
+            class="icon"
+            src="{{ utils.getUrl('BDD5DBC4A4CF42FA97F28CB4158DEC99',imgSrcPrefix) }}"
+          />
+        </view>
+        <view class="title jiutu-title">
+          <text number-of-lines="1">
+            医院介绍
+          </text>
+        </view>
+
+      </button>
 
       <button-auth
         item="{{ item }}"

+ 24 - 22
antbuilder/industry/hospitalV2/components/general-services/generalServices.js

@@ -1,37 +1,39 @@
-import history from '../../utils/history';
+import history from "../../utils/history";
 const app = getApp();
 Component({
   props: {
-    componentData: {}
+    componentData: {},
   },
   data: {
-    imgSrcPrefix: app.globalData.imgSrcPrefix
+    imgSrcPrefix: app.globalData.imgSrcPrefix,
   },
   methods: {
     async gotoJiuyi(e) {
       history.push({
-        title: '就医指南',
-        pageType: 'patient-guide'
-      })
+        title: "就医指南",
+        pageType: "patient-guide",
+      });
+    },
+    async gotoHospitalIntroduce(e) {
+      history.push({
+        title: "医院介绍",
+        pageType: "hospital-introduce",
+      });
     },
     toMorePage() {
-      const {
-        componentData
-      } = this.props;
-      const {
-        componentExtInfo = {}
-      } = componentData;
+      const { componentData } = this.props;
+      const { componentExtInfo = {} } = componentData;
       history.push({
-        title: '全部功能',
-        pageType: 'all-general-services',
-        componentData: { ...componentData,
+        title: "全部功能",
+        pageType: "all-general-services",
+        componentData: {
+          ...componentData,
           componentExtInfo: {
             allPage: true,
-            ...componentExtInfo
-          }
-        }
+            ...componentExtInfo,
+          },
+        },
       });
-    }
-
-  }
-});
+    },
+  },
+});

+ 24 - 0
antbuilder/industry/hospitalV2/components/hospital-introduce/index.acss

@@ -0,0 +1,24 @@
+.item-content {
+  padding: 14px 16px;
+  font-size: 17px;
+  color: #333;
+  line-height: 24px;
+}
+.content1 {
+  height: 200px;
+}
+.no_guide{
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  margin-top: 30%;
+}
+.image-detail {
+  width: 646rpx;
+  height: 600rpx;
+}
+.nodata-txt {
+  font-size: 40rpx;
+  color: gray;
+  margin: 32rpx 0;
+}

+ 12 - 0
antbuilder/industry/hospitalV2/components/hospital-introduce/index.axml

@@ -0,0 +1,12 @@
+<view>
+  <view class="item-content content2">
+    <mas-adc-rich-pro  content="{{ content }}"></mas-adc-rich-pro>
+  </view>
+  <view
+    class="no_guide"
+    a:if="{{ content === '' }}"
+  >
+  <image class="image-detail" mode="scaleToFill" src="https://gw.alipayobjects.com/mdn/rms_e695cc/afts/img/A*53NkSYyUHVYAAAAAAAAAAAAAARQnAQ" class="nodata-img"/>
+  <view class="nodata-txt">暂无医院介绍</view>
+  </view> 
+</view>

+ 29 - 0
antbuilder/industry/hospitalV2/components/hospital-introduce/index.js

@@ -0,0 +1,29 @@
+import { getIntroduce } from "../../../../core/utils/ywtService";
+import { envContext } from "../../../../core/utils/constants";
+Component({
+  props: {},
+  data: {
+    content: "",
+  },
+
+  didMount() {
+    // hospitalId 白云 41,太和12
+    const hospitalId = envContext == "th" ? 12 : 41;
+    this.getIntroduce(hospitalId);
+  },
+
+  methods: {
+    async getIntroduce(hospitalId = 41) {
+      console.log("xxxx000");
+      const [err, result] = await getIntroduce({
+        subHospitalId: hospitalId,
+        type: 3,
+      });
+      if (!err) {
+        this.setData({
+          content: result.content,
+        });
+      }
+    },
+  },
+});

+ 9 - 0
antbuilder/industry/hospitalV2/components/hospital-introduce/index.json

@@ -0,0 +1,9 @@
+{
+  "component": true,
+  "usingComponents": {
+    "wrapper": "../components/wrapper/index",
+    "collapse": "mini-ali-ui/es/collapse/index",
+    "collapse-item": "mini-ali-ui/es/collapse/collapse-item/index",
+    "mas-adc-rich-pro": "@mas.io/adc-rich-pro/es/index"
+  }
+}

+ 2 - 0
antbuilder/industry/hospitalV2/pages/page-no-pull/index.axml

@@ -79,5 +79,7 @@
   <discharge-settlement componentData="{{ componentData }}" a:elif="{{ pageType === 'discharge-settlement' }}" />
   <!-- 就医指南页面 -->
   <patient-guide componentData="{{ componentData }}"  a:elif="{{ pageType === 'patient-guide' }}" />
+  <!-- 医院介绍页面 -->
+  <hospital-introduce componentData="{{ componentData }}"  a:elif="{{ pageType === 'hospital-introduce' }}" />
 
 </block>

+ 2 - 1
antbuilder/industry/hospitalV2/pages/page-no-pull/index.json

@@ -42,7 +42,8 @@
     "discharge-settlement-detail": "../../components/discharge-settlement-detail/index",
     "pre-settlement": "../../components/pre-settlement/index",
     "discharge-settlement": "../../components/discharge-settlement/index",
-    "patient-guide": "../../components/patient-guide/index"
+    "patient-guide": "../../components/patient-guide/index",
+    "hospital-introduce": "../../components/hospital-introduce/index"
   },
   "allowsBounceVertical": "NO",
   "pullRefresh": false