爱简收旧衣按件回收前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

106 lines
3.5 KiB

  1. "use strict";
  2. const common_vendor = require("../../common/vendor.js");
  3. const pages_mixins_pullRefreshMixin = require("../mixins/pullRefreshMixin.js");
  4. const emailPopup = () => "../../wxcomponents/email-popup/email-popup.js";
  5. const _sfc_main = {
  6. mixins: [pages_mixins_pullRefreshMixin.pullRefreshMixin],
  7. components: {
  8. emailPopup
  9. },
  10. data() {
  11. return {
  12. greeting: "下午好",
  13. showPhonePopup: false,
  14. showEmailPopup: false
  15. };
  16. },
  17. created() {
  18. this.updateGreeting();
  19. },
  20. methods: {
  21. async onRefresh() {
  22. await new Promise((resolve) => setTimeout(resolve, 1e3));
  23. common_vendor.index.stopPullRefresh()()();
  24. },
  25. // 显示弹窗
  26. openEmailPopup() {
  27. this.showEmailPopup = true;
  28. },
  29. // 关闭弹窗
  30. handleCloseEmailPopup() {
  31. this.showEmailPopup = false;
  32. },
  33. navigateBack() {
  34. common_vendor.index.navigateBack();
  35. },
  36. updateGreeting() {
  37. const hour = (/* @__PURE__ */ new Date()).getHours();
  38. if (hour < 12) {
  39. this.greeting = "上午好";
  40. } else if (hour < 18) {
  41. this.greeting = "下午好";
  42. } else {
  43. this.greeting = "晚上好";
  44. }
  45. },
  46. navigateToFAQ() {
  47. common_vendor.index.navigateTo({
  48. url: "/pages/customer-service/faq"
  49. });
  50. },
  51. handleOnlineService() {
  52. common_vendor.index.__f__("log", "at pages/subcomponent/admin_customer.vue:148", "打开在线客服");
  53. },
  54. handlePhoneService() {
  55. this.showPhonePopup = true;
  56. },
  57. hidePhonePopup() {
  58. this.showPhonePopup = false;
  59. },
  60. makePhoneCall() {
  61. common_vendor.index.makePhoneCall({
  62. phoneNumber: "0731-599327-8899"
  63. });
  64. }
  65. }
  66. };
  67. if (!Array) {
  68. const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
  69. const _component_email_popup = common_vendor.resolveComponent("email-popup");
  70. (_easycom_uni_icons2 + _component_email_popup)();
  71. }
  72. const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
  73. if (!Math) {
  74. _easycom_uni_icons();
  75. }
  76. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  77. return common_vendor.e({
  78. a: common_vendor.p({
  79. type: "left",
  80. size: "20"
  81. }),
  82. b: common_vendor.o((...args) => $options.navigateBack && $options.navigateBack(...args)),
  83. c: common_vendor.t($data.greeting),
  84. d: common_vendor.o((...args) => $options.handleOnlineService && $options.handleOnlineService(...args)),
  85. e: common_vendor.o((...args) => $options.handlePhoneService && $options.handlePhoneService(...args)),
  86. f: common_vendor.o((...args) => $options.navigateToFAQ && $options.navigateToFAQ(...args)),
  87. g: common_vendor.o((...args) => $options.handlePhoneService && $options.handlePhoneService(...args)),
  88. h: $data.showPhonePopup
  89. }, $data.showPhonePopup ? {
  90. i: common_vendor.o((...args) => $options.hidePhonePopup && $options.hidePhonePopup(...args)),
  91. j: common_vendor.o((...args) => $options.hidePhonePopup && $options.hidePhonePopup(...args)),
  92. k: common_vendor.p({
  93. type: "phone-filled",
  94. size: "23"
  95. }),
  96. l: common_vendor.o((...args) => $options.makePhoneCall && $options.makePhoneCall(...args))
  97. } : {}, {
  98. m: common_vendor.o($options.handleCloseEmailPopup),
  99. n: common_vendor.p({
  100. show: $data.showEmailPopup
  101. })
  102. });
  103. }
  104. const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-56c2ae06"]]);
  105. wx.createPage(MiniProgramPage);
  106. //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/subcomponent/admin_customer.js.map