1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- "use strict";
- var common_vendor = require("../common/vendor.js");
- var api_drugReport = require("../api/drugReport.js");
- require("../common/request.js");
- const _sfc_main = {
- data() {
- return {
- report: null,
- form: {
- reportId: null,
- pingStar: 0,
- pingContent: ""
- }
- };
- },
- onLoad(options) {
- this.form.reportId = options.reportId;
- this.getDrugReportById();
- },
- methods: {
- getDrugReportById() {
- var data = { reportId: this.form.reportId };
- api_drugReport.getDrugReportById(data).then((res) => {
- if (res.code == 200) {
- this.report = res.data;
- }
- }, (err) => {
- });
- },
- submit() {
- common_vendor.index.showLoading({
- title: "\u5904\u7406\u4E2D..."
- });
- api_drugReport.pingReport(this.form).then((res) => {
- common_vendor.index.hideLoading();
- if (res.code == 200) {
- common_vendor.index.showToast({
- icon: "success",
- title: "\u8BC4\u4EF7\u6210\u529F"
- });
- common_vendor.index.$emit("refreshDrugReportList");
- setTimeout(function() {
- common_vendor.index.navigateBack({
- delta: 1
- });
- }, 2e3);
- } else {
- common_vendor.index.showToast({
- icon: "none",
- title: res.msg
- });
- }
- }, (rej) => {
- });
- }
- }
- };
- if (!Array) {
- const _easycom_u_rate2 = common_vendor.resolveComponent("u-rate");
- _easycom_u_rate2();
- }
- const _easycom_u_rate = () => "../uni_modules/uview-plus/components/u-rate/u-rate.js";
- if (!Math) {
- _easycom_u_rate();
- }
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
- return common_vendor.e({
- a: $data.report != null
- }, $data.report != null ? {
- b: $data.report.avatar,
- c: common_vendor.t($data.report.doctorName)
- } : {}, {
- d: common_vendor.o(($event) => $data.form.pingStar = $event),
- e: common_vendor.p({
- size: "24",
- ["active-color"]: "#fcab36",
- modelValue: $data.form.pingStar
- }),
- f: $data.form.pingContent,
- g: common_vendor.o(($event) => $data.form.pingContent = $event.detail.value),
- h: common_vendor.t($data.form.pingContent.length),
- i: common_vendor.o(($event) => $options.submit())
- });
- }
- var MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-449be131"], ["__file", "E:/Project/2023/\u95EE\u8BCA\u5E73\u53F0/his_user_miniapp/pages_user/drugReportPing.vue"]]);
- wx.createPage(MiniProgramPage);
|