inquirySelect.js 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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 _sfc_main = {
  6. data() {
  7. return {
  8. isShare: null,
  9. companyId: null,
  10. companyUserId: null,
  11. inquiryType: null,
  12. price1: null,
  13. price2: null
  14. };
  15. },
  16. onLoad(options) {
  17. if (!this.$isEmpty(options.isShare)) {
  18. this.isShare = options.isShare;
  19. } else {
  20. common_vendor.index.hideShareMenu();
  21. }
  22. this.inquiryType = options.inquiryType;
  23. if (this.inquiryType == 3) {
  24. common_vendor.index.setNavigationBarTitle({
  25. title: "\u836F\u5E08\u54A8\u8BE2"
  26. });
  27. this.typeText = "\u836F\u5E08";
  28. }
  29. this.companyId = options.companyId;
  30. this.companyUserId = options.companyUserId;
  31. },
  32. onShow() {
  33. this.getConfigByKey();
  34. },
  35. onShareAppMessage(res) {
  36. common_vendor.index.showShareMenu({
  37. withShareTicket: true
  38. });
  39. wx.updateShareMenu({
  40. isPrivateMessage: true,
  41. withShareTicket: false,
  42. success(res2) {
  43. console.log("updateShareMenu: ", res2);
  44. },
  45. fail() {
  46. }
  47. });
  48. return {
  49. title: "\u5FA1\u541B\u65B9\u4E92\u8054\u7F51\u533B\u9662--\u5065\u5EB7\u4F1A\u8BCA",
  50. path: "/pages_order/inquirySelect?inquiryType=3&companyId=" + this.companyId + "&companyUserId=" + this.companyUserId
  51. };
  52. },
  53. methods: {
  54. getConfigByKey() {
  55. let data = { key: "his.inquiryConfig" };
  56. api_common.getConfigByKey(data).then((res) => {
  57. if (res.code == 200) {
  58. var data2 = JSON.parse(res.data);
  59. this.price1 = data2.prices.find((item, index) => item.type === 1);
  60. this.price2 = data2.prices.find((item, index) => item.type === 2);
  61. } else {
  62. common_vendor.index.showToast({
  63. icon: "none",
  64. title: "\u8BF7\u6C42\u5931\u8D25"
  65. });
  66. }
  67. }, (rej) => {
  68. });
  69. },
  70. doInquiryForm(price) {
  71. this.$isLogin().then((res) => {
  72. console.log(res);
  73. if (res) {
  74. if (this.inquiryType == 1) {
  75. common_vendor.index.navigateTo({
  76. url: "/pages_order/inquiryForm1?inquiryType=" + this.inquiryType + "&orderType=" + price.type
  77. });
  78. } else if (this.inquiryType == 3) {
  79. common_vendor.index.navigateTo({
  80. url: "/pages_order/inquiryForm3?inquiryType=" + this.inquiryType + "&orderType=" + price.type + "&companyId=" + this.companyId + "&companyUserId=" + this.companyUserId
  81. });
  82. }
  83. } else {
  84. common_vendor.index.navigateTo({
  85. url: "/pages/auth/login"
  86. });
  87. }
  88. });
  89. }
  90. }
  91. };
  92. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  93. return common_vendor.e({
  94. a: common_vendor.t($data.inquiryType == 1 ? "\u4E13\u5BB6\u533B\u751F" : "\u6267\u4E1A\u836F\u5E08"),
  95. b: $data.price1 != null
  96. }, $data.price1 != null ? common_vendor.e({
  97. c: $data.inquiryType == 1
  98. }, $data.inquiryType == 1 ? {
  99. d: common_vendor.t($data.price1.price)
  100. } : {}, {
  101. e: $data.inquiryType == 3
  102. }, $data.inquiryType == 3 ? {
  103. f: common_vendor.t($data.price1.price)
  104. } : {}, {
  105. g: common_vendor.o(($event) => $options.doInquiryForm($data.price1))
  106. }) : {}, {
  107. h: $data.price2 != null && $data.inquiryType == 1
  108. }, $data.price2 != null && $data.inquiryType == 1 ? common_vendor.e({
  109. i: $data.inquiryType == 1
  110. }, $data.inquiryType == 1 ? {
  111. j: common_vendor.t($data.price2.price)
  112. } : {}, {
  113. k: $data.inquiryType == 3
  114. }, $data.inquiryType == 3 ? {
  115. l: common_vendor.t($data.price2.price)
  116. } : {}, {
  117. m: common_vendor.o(($event) => $options.doInquiryForm($data.price2))
  118. }) : {});
  119. }
  120. var MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-fc4142ee"], ["__file", "E:/Project/2023/\u95EE\u8BCA\u5E73\u53F0/his_user_miniapp/pages_order/inquirySelect.vue"]]);
  121. _sfc_main.__runtimeHooks = 2;
  122. wx.createPage(MiniProgramPage);