123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- "use strict";
- var common_vendor = require("../common/vendor.js");
- var api_common = require("../api/common.js");
- require("../common/request.js");
- const _sfc_main = {
- data() {
- return {
- isShare: null,
- companyId: null,
- companyUserId: null,
- inquiryType: null,
- price1: null,
- price2: null
- };
- },
- onLoad(options) {
- if (!this.$isEmpty(options.isShare)) {
- this.isShare = options.isShare;
- } else {
- common_vendor.index.hideShareMenu();
- }
- this.inquiryType = options.inquiryType;
- if (this.inquiryType == 3) {
- common_vendor.index.setNavigationBarTitle({
- title: "\u836F\u5E08\u54A8\u8BE2"
- });
- this.typeText = "\u836F\u5E08";
- }
- this.companyId = options.companyId;
- this.companyUserId = options.companyUserId;
- },
- onShow() {
- this.getConfigByKey();
- },
- onShareAppMessage(res) {
- common_vendor.index.showShareMenu({
- withShareTicket: true
- });
- wx.updateShareMenu({
- isPrivateMessage: true,
- withShareTicket: false,
- success(res2) {
- console.log("updateShareMenu: ", res2);
- },
- fail() {
- }
- });
- return {
- title: "\u5FA1\u541B\u65B9\u4E92\u8054\u7F51\u533B\u9662--\u5065\u5EB7\u4F1A\u8BCA",
- path: "/pages_order/inquirySelect?inquiryType=3&companyId=" + this.companyId + "&companyUserId=" + this.companyUserId
- };
- },
- methods: {
- getConfigByKey() {
- let data = { key: "his.inquiryConfig" };
- api_common.getConfigByKey(data).then((res) => {
- if (res.code == 200) {
- var data2 = JSON.parse(res.data);
- this.price1 = data2.prices.find((item, index) => item.type === 1);
- this.price2 = data2.prices.find((item, index) => item.type === 2);
- } else {
- common_vendor.index.showToast({
- icon: "none",
- title: "\u8BF7\u6C42\u5931\u8D25"
- });
- }
- }, (rej) => {
- });
- },
- doInquiryForm(price) {
- this.$isLogin().then((res) => {
- console.log(res);
- if (res) {
- if (this.inquiryType == 1) {
- common_vendor.index.navigateTo({
- url: "/pages_order/inquiryForm1?inquiryType=" + this.inquiryType + "&orderType=" + price.type
- });
- } else if (this.inquiryType == 3) {
- common_vendor.index.navigateTo({
- url: "/pages_order/inquiryForm3?inquiryType=" + this.inquiryType + "&orderType=" + price.type + "&companyId=" + this.companyId + "&companyUserId=" + this.companyUserId
- });
- }
- } else {
- common_vendor.index.navigateTo({
- url: "/pages/auth/login"
- });
- }
- });
- }
- }
- };
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
- return common_vendor.e({
- a: common_vendor.t($data.inquiryType == 1 ? "\u4E13\u5BB6\u533B\u751F" : "\u6267\u4E1A\u836F\u5E08"),
- b: $data.price1 != null
- }, $data.price1 != null ? common_vendor.e({
- c: $data.inquiryType == 1
- }, $data.inquiryType == 1 ? {
- d: common_vendor.t($data.price1.price)
- } : {}, {
- e: $data.inquiryType == 3
- }, $data.inquiryType == 3 ? {
- f: common_vendor.t($data.price1.price)
- } : {}, {
- g: common_vendor.o(($event) => $options.doInquiryForm($data.price1))
- }) : {}, {
- h: $data.price2 != null && $data.inquiryType == 1
- }, $data.price2 != null && $data.inquiryType == 1 ? common_vendor.e({
- i: $data.inquiryType == 1
- }, $data.inquiryType == 1 ? {
- j: common_vendor.t($data.price2.price)
- } : {}, {
- k: $data.inquiryType == 3
- }, $data.inquiryType == 3 ? {
- l: common_vendor.t($data.price2.price)
- } : {}, {
- m: common_vendor.o(($event) => $options.doInquiryForm($data.price2))
- }) : {});
- }
- 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"]]);
- _sfc_main.__runtimeHooks = 2;
- wx.createPage(MiniProgramPage);
|