69 lines
2.9 KiB
JavaScript
69 lines
2.9 KiB
JavaScript
"use strict";
|
|
var common_vendor = require("../../common/vendor.js");
|
|
var api_modules_suggestion = require("../../api/modules/suggestion.js");
|
|
var uni_modules_wotDesignUni_components_wdToast_index = require("../../uni_modules/wot-design-uni/components/wd-toast/index.js");
|
|
require("../../uni_modules/wot-design-uni/locale/index.js");
|
|
require("../../uni_modules/wot-design-uni/dayjs/index.js");
|
|
require("../../utils/request.js");
|
|
require("../../config/api.config.js");
|
|
require("../../uni_modules/wot-design-uni/components/common/util.js");
|
|
require("../../uni_modules/wot-design-uni/components/common/AbortablePromise.js");
|
|
require("../../uni_modules/wot-design-uni/locale/lang/zh-CN.js");
|
|
require("../../uni_modules/wot-design-uni/dayjs/constant.js");
|
|
require("../../uni_modules/wot-design-uni/dayjs/locale/en.js");
|
|
require("../../uni_modules/wot-design-uni/dayjs/utils.js");
|
|
if (!Array) {
|
|
const _easycom_wd_textarea2 = common_vendor.resolveComponent("wd-textarea");
|
|
const _easycom_wd_button2 = common_vendor.resolveComponent("wd-button");
|
|
const _easycom_wd_toast2 = common_vendor.resolveComponent("wd-toast");
|
|
(_easycom_wd_textarea2 + _easycom_wd_button2 + _easycom_wd_toast2)();
|
|
}
|
|
const _easycom_wd_textarea = () => "../../uni_modules/wot-design-uni/components/wd-textarea/wd-textarea.js";
|
|
const _easycom_wd_button = () => "../../uni_modules/wot-design-uni/components/wd-button/wd-button.js";
|
|
const _easycom_wd_toast = () => "../../uni_modules/wot-design-uni/components/wd-toast/wd-toast.js";
|
|
if (!Math) {
|
|
(NavBar + _easycom_wd_textarea + _easycom_wd_button + _easycom_wd_toast)();
|
|
}
|
|
const NavBar = () => "../../components/NavBar.js";
|
|
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
|
__name: "suggestion",
|
|
setup(__props) {
|
|
const desc = common_vendor.ref("");
|
|
const toast = uni_modules_wotDesignUni_components_wdToast_index.useToast();
|
|
const submit = async () => {
|
|
if (!desc.value) {
|
|
toast.error("\u8BF7\u586B\u5199\u5EFA\u8BAE\u53CD\u9988");
|
|
return;
|
|
}
|
|
await api_modules_suggestion.createSuggestion(
|
|
desc.value
|
|
).then((res) => {
|
|
if (res.data) {
|
|
toast.success("\u63D0\u4EA4\u6210\u529F");
|
|
desc.value = "";
|
|
} else {
|
|
toast.error("\u63D0\u4EA4\u5931\u8D25");
|
|
}
|
|
});
|
|
};
|
|
return (_ctx, _cache) => {
|
|
return {
|
|
a: common_vendor.p({
|
|
title: "\u5EFA\u8BAE\u53CD\u9988"
|
|
}),
|
|
b: common_vendor.o(($event) => desc.value = $event),
|
|
c: common_vendor.p({
|
|
placeholder: "\u8BF7\u586B\u5199\u5EFA\u8BAE\u53CD\u9988",
|
|
modelValue: desc.value
|
|
}),
|
|
d: common_vendor.o(submit),
|
|
e: common_vendor.p({
|
|
block: true
|
|
})
|
|
};
|
|
};
|
|
}
|
|
});
|
|
var MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-c29aa418"], ["__file", "D:/\u7F51\u6291\u4E91Time/\u79C1\u6D3B/2000\u7B97\u5366/src/pages/user/suggestion.vue"]]);
|
|
wx.createPage(MiniProgramPage);
|