12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- "use strict";
- const common_vendor = require("../../common/vendor.js");
- const common_assets = require("../../common/assets.js");
- const _sfc_main = {
- data() {
- return {
- content: "",
- typeList: ["功能建议", "内容问题", "BUG反馈", "其他"],
- typeIdx: 0,
- history: []
- };
- },
- methods: {
- onTypeChange(e) {
- this.typeIdx = e.detail.value;
- },
- submit() {
- if (!this.content) {
- common_vendor.index.showToast({ title: "请填写反馈内容", icon: "none" });
- return;
- }
- this.history.unshift({
- id: Date.now(),
- type: this.typeList[this.typeIdx],
- content: this.content
- });
- this.content = "";
- common_vendor.index.showToast({ title: "反馈已提交", icon: "success" });
- }
- }
- };
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
- return common_vendor.e({
- a: common_assets._imports_0$3,
- b: $data.content,
- c: common_vendor.o(($event) => $data.content = $event.detail.value),
- d: common_vendor.t($data.typeList[$data.typeIdx]),
- e: $data.typeList,
- f: $data.typeIdx,
- g: common_vendor.o((...args) => $options.onTypeChange && $options.onTypeChange(...args)),
- h: common_vendor.o((...args) => $options.submit && $options.submit(...args)),
- i: $data.history.length === 0
- }, $data.history.length === 0 ? {} : {
- j: common_vendor.f($data.history, (item, k0, i0) => {
- return {
- a: common_vendor.t(item.type),
- b: common_vendor.t(item.content),
- c: item.id
- };
- })
- });
- }
- const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
- wx.createPage(MiniProgramPage);
- //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/mine/feedback.js.map
|