From 7cbda90b02e31447122f1d22c9797b423d7bd9fc Mon Sep 17 00:00:00 2001
From: Liuyi <candymxq888@outlook.com>
Date: 星期三, 16 十月 2024 17:26:06 +0800
Subject: [PATCH] 添加扫码成功操作页,修改主页面样式,更换主页图标

---
 unpackage/dist/dev/mp-weixin/pages/index/index.js |  112 +++++++++++++++++++++++++++++++++++---------------------
 1 files changed, 70 insertions(+), 42 deletions(-)

diff --git a/unpackage/dist/dev/mp-weixin/pages/index/index.js b/unpackage/dist/dev/mp-weixin/pages/index/index.js
index 7e671ae..648355d 100644
--- a/unpackage/dist/dev/mp-weixin/pages/index/index.js
+++ b/unpackage/dist/dev/mp-weixin/pages/index/index.js
@@ -69,14 +69,14 @@
       });
     }
     const functionList = common_vendor.ref([
-      { text: "余额记录", icon: "../../static/images/index/icon31.png", url: "/pages/functionList/balanceRecord/index", isUrl: 1 },
-      { text: "消费记录", icon: "../../static/images/index/icon32.png", url: "/pages/functionList/paymentRecord/index", isUrl: 1 },
-      { text: "充值记录", icon: "../../static/images/index/icon33.png", url: "/pages/functionList/rechargeRecord/index", isUrl: 1 },
-      { text: "账户共享", icon: "../../static/images/index/icon34.png", url: "", isUrl: 1 },
-      { text: "故障上报", icon: "../../static/images/index/icon35.png", url: "/pages/infoBreakdown/index", isUrl: 1 },
-      { text: "电子发票", icon: "../../static/images/index/icon36.png", url: "", isUrl: 1 },
-      { text: "会员卡挂失", icon: "../../static/images/index/icon37.png", url: "", isUrl: 2 },
-      { text: "会员卡注销", icon: "../../static/images/index/icon38.png", url: "", isUrl: 3 }
+      { text: "余额记录", icon: "../../static/images/index/icon31.png", bgColor: "#16b387", bgColor: "", url: "/pages/functionList/balanceRecord/index", isUrl: 1 },
+      { text: "消费记录", icon: "../../static/images/index/icon32.png", bgColor: "#329ae8", url: "/pages/functionList/paymentRecord/index", isUrl: 1 },
+      { text: "充值记录", icon: "../../static/images/index/icon33.png", bgColor: "#faaf0f", url: "/pages/functionList/rechargeRecord/index", isUrl: 1 },
+      { text: "账户共享", icon: "../../static/images/index/icon34.png", bgColor: "#faaf0f", url: "", isUrl: 4 },
+      { text: "故障上报", icon: "../../static/images/index/icon35.png", bgColor: "#a88ff1", url: "/pages/infoBreakdown/index", isUrl: 1 },
+      { text: "优惠卷", icon: "../../static/images/index/icon36.png", bgColor: "#18bfc4", url: "", isUrl: 4 },
+      { text: "会员卡挂失", icon: "../../static/images/index/icon37.png", bgColor: "#4875f0", url: "", isUrl: 2 },
+      { text: "会员卡注销", icon: "../../static/images/index/icon38.png", bgColor: "#f45088", url: "", isUrl: 3 }
     ]);
     function navTo(itemUrl) {
       if (itemUrl) {
@@ -124,7 +124,8 @@
                 if (res2.code == 200) {
                   common_vendor.index.showToast({
                     title: "已注销",
-                    duration: 2e3
+                    duration: 2e3,
+                    icon: "none"
                   });
                   await api_index.getVipInfoApi().then((res3) => {
                     if (res3.code == 200) {
@@ -144,7 +145,20 @@
             }
           }
         });
+      } else {
+        common_vendor.index.showToast({
+          title: "该功能正在升级中!",
+          duration: 2e3,
+          icon: "none"
+        });
       }
+    }
+    function upGrade() {
+      common_vendor.index.showToast({
+        title: "该功能正在升级中!",
+        duration: 2e3,
+        icon: "none"
+      });
     }
     common_vendor.onMounted(async () => {
       getTopHeight();
@@ -152,58 +166,72 @@
     common_vendor.onShow(async () => {
       await getInfo();
     });
+    common_vendor.index.showShareMenu({
+      withShareTicket: true,
+      menus: ["shareAppMessage", "shareTimeline"],
+      success: function() {
+        console.log("分享菜单显示成功");
+      },
+      fail: function(err) {
+        console.error("分享菜单显示失败", err);
+      }
+    });
     return (_ctx, _cache) => {
       return common_vendor.e({
         a: common_assets._imports_0$1,
         b: common_vendor.t(cardInfo.value.userName),
-        c: common_assets._imports_1$1,
-        d: common_assets._imports_2,
-        e: common_vendor.o(($event) => navTo("/pages/addCard/index")),
-        f: common_vendor.o(($event) => navTo("/pages/userInfo/index")),
-        g: common_assets._imports_3,
-        h: isVip.value
+        c: common_vendor.o(($event) => navTo("/pages/userInfo/index")),
+        d: common_vendor.o(($event) => navTo("/pages/userInfo/index")),
+        e: common_assets._imports_1$1,
+        f: common_assets._imports_2,
+        g: common_vendor.o(($event) => navTo("/pages/addCard/index")),
+        h: common_assets._imports_3,
+        i: isVip.value
       }, isVip.value ? {
-        i: common_assets._imports_4
+        j: common_assets._imports_4
       } : {}, {
-        j: isLoss.value && isVip.value
+        k: isLoss.value && isVip.value
       }, isLoss.value && isVip.value ? {} : {}, {
-        k: isVip.value
+        l: isVip.value
       }, isVip.value ? {
-        l: common_vendor.t(cardInfo.value.waterCardNumber)
+        m: common_vendor.t(cardInfo.value.waterCardNumber)
       } : {}, {
-        m: isVip.value
+        n: isVip.value
       }, isVip.value ? {} : {}, {
-        n: !isVip.value
+        o: !isVip.value
       }, !isVip.value ? {} : {}, {
-        o: isVip.value
+        p: isVip.value
       }, isVip.value ? {
-        p: common_vendor.t(cardInfo.value.balance)
+        q: common_vendor.t(cardInfo.value.balance)
       } : {}, {
-        q: isVip.value
+        r: isVip.value
       }, isVip.value ? {
-        r: common_vendor.o(($event) => navTo("/pages/recharge/index"))
+        s: common_vendor.o(($event) => navTo("/pages/recharge/index"))
       } : {}, {
-        s: topHeight.value + "rpx",
-        t: common_assets._imports_5,
-        v: common_vendor.o(($event) => navTo("/pages/sendWater/index")),
-        w: common_assets._imports_1,
-        x: common_vendor.o(($event) => navTo("/pages/facilityList/index")),
-        y: common_assets._imports_7,
-        z: common_vendor.o(($event) => toScan()),
-        A: common_vendor.f(functionList.value, (item, index, i0) => {
+        t: topHeight.value + "rpx",
+        v: common_assets._imports_5,
+        w: common_vendor.o(($event) => upGrade()),
+        x: common_assets._imports_1,
+        y: common_vendor.o(($event) => navTo("/pages/facilityList/index")),
+        z: common_assets._imports_7,
+        A: common_vendor.o(($event) => toScan()),
+        B: common_vendor.f(functionList.value, (item, index, i0) => {
           return {
             a: item.icon,
-            b: common_vendor.t(item.text),
-            c: common_vendor.o(($event) => setEvent(item.isUrl, item.url), index),
-            d: index
+            b: item.bgColor,
+            c: common_vendor.t(item.text),
+            d: common_vendor.o(($event) => setEvent(item.isUrl, item.url), index),
+            e: index
           };
         }),
-        B: common_assets._imports_8,
-        C: common_assets._imports_9,
-        D: common_assets._imports_10,
-        E: common_vendor.o(($event) => navTo("/pages/station/index")),
-        F: common_assets._imports_11,
-        G: common_assets._imports_10
+        C: common_assets._imports_8,
+        D: common_vendor.o(upGrade),
+        E: common_assets._imports_9,
+        F: common_assets._imports_10,
+        G: common_vendor.o(($event) => navTo("/pages/station/index")),
+        H: common_assets._imports_11,
+        I: common_assets._imports_10,
+        J: common_vendor.o(upGrade)
       });
     };
   }

--
Gitblit v1.9.3