You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.1 KiB
JavaScript
36 lines
1.1 KiB
JavaScript
"use strict";
|
|
const common_vendor = require("../common/vendor.js");
|
|
const api_index = require("../api/index.js");
|
|
const _sfc_main = {
|
|
__name: "contact",
|
|
setup(__props) {
|
|
const message = common_vendor.ref("");
|
|
const submitMessage = () => {
|
|
if (!message.value.trim()) {
|
|
common_vendor.index.showToast({
|
|
title: "请输入留言内容",
|
|
icon: "none"
|
|
});
|
|
return;
|
|
}
|
|
api_index.LiuYan({ info: { content: message.value, openid: common_vendor.index.getStorageSync("openid") } }).then((res) => {
|
|
common_vendor.index.showToast({
|
|
title: "留言成功",
|
|
icon: "success"
|
|
});
|
|
});
|
|
message.value = "";
|
|
};
|
|
return (_ctx, _cache) => {
|
|
return {
|
|
a: message.value,
|
|
b: common_vendor.o(($event) => message.value = $event.detail.value),
|
|
c: common_vendor.o(submitMessage)
|
|
};
|
|
};
|
|
}
|
|
};
|
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-10b9b775"]]);
|
|
wx.createPage(MiniProgramPage);
|
|
//# sourceMappingURL=../../.sourcemap/mp-weixin/pages/contact.js.map
|