wangzhibo
2025-10-23 cad64c1de2c45856b0774933c5801b05b64984e8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
"use strict";
const common_vendor = require("../../common/vendor.js");
const apiservice_apiService = require("../../apiservice/apiService.js");
const stores_user = require("../../stores/user.js");
const _sfc_main = {
  __name: "my-advice",
  setup(__props) {
    const userStore = stores_user.useUserStore();
    const complaints = common_vendor.ref([]);
    async function fetchComplaints() {
      const uuid = userStore.uuid;
      if (!uuid)
        return;
      try {
        common_vendor.index.__f__("log", "at pages/ucenter/my-advice.vue:87", uuid);
        const res = await apiservice_apiService.apiService.advicesListByUuid(uuid);
        if (res.code === 1e3 && Array.isArray(res.data)) {
          common_vendor.index.__f__("log", "at pages/ucenter/my-advice.vue:91", res.data);
          complaints.value = res.data.map((item) => ({
            time: item.createTime || "",
            content: item.question || "",
            reply: item.replytext || "",
            status: item.status || "未处理"
          }));
        } else {
          common_vendor.index.__f__("warn", "at pages/ucenter/my-advice.vue:99", "获取投诉数据失败:", res.message);
          complaints.value = [];
        }
      } catch (err) {
        common_vendor.index.__f__("error", "at pages/ucenter/my-advice.vue:103", "网络或服务器错误:", err);
        complaints.value = [];
      }
    }
    common_vendor.onMounted(() => {
      fetchComplaints();
    });
    return (_ctx, _cache) => {
      return common_vendor.e({
        a: common_vendor.f(complaints.value, (item, index, i0) => {
          return {
            a: common_vendor.t(index + 1),
            b: common_vendor.t(item.time),
            c: common_vendor.t(item.content),
            d: common_vendor.t(item.status || "暂未回复"),
            e: common_vendor.n(item.status === "未处理" ? "text-color-status-0" : item.status === "处理中" ? "text-color-status-1" : item.status === "已处理" ? "text-color-status-2" : ""),
            f: common_vendor.t(item.reply ? item.reply : "暂未回复"),
            g: common_vendor.n(item.status === "未处理" ? "text-color-status-0" : item.status === "处理中" ? "text-color-status-1" : item.status === "已处理" ? "text-color-status-2" : ""),
            h: index
          };
        }),
        b: complaints.value.length === 0
      }, complaints.value.length === 0 ? {} : {});
    };
  }
};
wx.createPage(_sfc_main);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/ucenter/my-advice.js.map