agreement.js 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. "use strict";
  2. var common_vendor = require("../common/vendor.js");
  3. var api_common = require("../api/common.js");
  4. require("../common/request.js");
  5. const mpHtml = () => "../uni_modules/mp-html/mp-html.js";
  6. const _sfc_main = {
  7. components: {
  8. mpHtml
  9. },
  10. data() {
  11. return {
  12. type: null,
  13. content: ""
  14. };
  15. },
  16. onLoad(options) {
  17. this.type = options.type;
  18. if (this.type == "doctorAgreement") {
  19. common_vendor.index.setNavigationBarTitle({
  20. title: "\u5165\u9A7B\u534F\u8BAE"
  21. });
  22. }
  23. if (this.type == "userRegister") {
  24. common_vendor.index.setNavigationBarTitle({
  25. title: "\u7528\u6237\u534F\u8BAE"
  26. });
  27. }
  28. if (this.type == "userPrivacy") {
  29. common_vendor.index.setNavigationBarTitle({
  30. title: "\u9690\u79C1\u534F\u8BAE"
  31. });
  32. }
  33. this.getConfig();
  34. },
  35. methods: {
  36. getConfig() {
  37. var data = { key: "his.agreementConfig" };
  38. api_common.getConfigByKey(data).then((res) => {
  39. if (res.code == 200) {
  40. if (this.type == "doctorRegister") {
  41. this.content = JSON.parse(res.data).doctorRegister;
  42. } else if (this.type == "doctorFiling") {
  43. this.content = JSON.parse(res.data).doctorFiling;
  44. } else if (this.type == "userRegister") {
  45. this.content = JSON.parse(res.data).userRegister;
  46. } else if (this.type == "userPrivacy") {
  47. this.content = JSON.parse(res.data).userPrivacy;
  48. }
  49. }
  50. }, (rej) => {
  51. });
  52. }
  53. }
  54. };
  55. if (!Array) {
  56. const _component_mp_html = common_vendor.resolveComponent("mp-html");
  57. _component_mp_html();
  58. }
  59. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  60. return {
  61. a: common_vendor.p({
  62. content: $data.content
  63. })
  64. };
  65. }
  66. var MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-6392faa2"], ["__file", "E:/Project/2023/\u95EE\u8BCA\u5E73\u53F0/his_user_miniapp/pages_user/agreement.vue"]]);
  67. wx.createPage(MiniProgramPage);