From dc01187c6ca2cf46fef268e84a7ac7fc171f2ebb Mon Sep 17 00:00:00 2001
From: zuoxiao <470321431@qq.com>
Date: 星期一, 27 五月 2024 16:12:47 +0800
Subject: [PATCH] 开泵相关
---
pages/login/login.json | 10
pages/wxlogin/wxlogin.wxss | 59 +
pages/feedback/feedback.wxml | 9
pages/wxlogin/wxlogin.js | 26
utils/storage.js | 61 +
pages/personCharge/personcharge.js | 66 +
pages/login/login.wxss | 39
pages/wxlogin/wxlogin.json | 3
pages/openCard/openCard.wxss | 94 ++
pages/rechargeMoney/rechargMoney.wxml | 71 +
pages/waterIntake/waterIntake.js | 100 ++
pages/waterIntake/waterIntake.wxml | 51 +
pages/home/home.wxss | 170 ++++
pages/wxbind/wxbind.wxss | 133 +++
pages/my/my.js | 4
images/wifi_no.svg | 1
pages/personCharge/personcharge.wxss | 1
pages/home/home.json | 6
pages/my/my.wxss | 144 +++
pages/recharge/recharge.js | 22
pages/wxbind/wxbind.js | 102 ++
pages/openCard/openCard.js | 117 +++
images/water_intake_blue.png | 0
pages/rechargeMoney/rechargMoney.json | 3
pages/waterIntake/waterIntake.json | 11
images/record_grey.png | 0
images/valva.svg | 1
project.config.json | 2
images/wallet.svg | 1
pages/home/home.js | 101 ++
pages/wallet/wallet.wxml | 2
pages/wxlogin/wxlogin.wxml | 7
pages/login/login.js | 82 +
pages/rechargeMoney/rechargMoney.js | 70 +
pages/feedback/feedback.wxss | 37 +
app.js | 5
pages/personCharge/personcharge.json | 3
pages/login/login.wxml | 14
images/record_blue.png | 0
images/water_intake_grey.png | 0
pages/openCard/openCard.wxml | 23
images/wifi_off.svg | 1
pages/waterIntake/waterIntake.wxss | 146 +++
pages/home/home.wxml | 54
pages/wxbind/wxbind.wxml | 14
pages/rechargeMoney/rechargMoney.wxss | 153 ++++
pages/recharge/recharge.wxml | 2
pages/feedback/feedback.js | 97 ++
pages/personCharge/personcharge.wxml | 2
pages/wallet/wallet.js | 7
images/record.svg | 1
pages/wxbind/wxbind.json | 4
pages/my/my.wxml | 27
images/question.svg | 1
app.json | 44
/dev/null | 4
pages/feedback/feedback.json | 4
images/pipeline.svg | 1
images/balance.svg | 1
pages/openCard/openCard.json | 4
60 files changed, 2,062 insertions(+), 156 deletions(-)
diff --git a/app.js b/app.js
index 1ed57c4..9ff2871 100644
--- a/app.js
+++ b/app.js
@@ -14,6 +14,9 @@
})
},
globalData: {
- userInfo: null
+ userInfo: null,
+ userId:"",
+ userCode:"",
+ token:""
}
})
diff --git a/app.json b/app.json
index 82be6e8..ddc4606 100644
--- a/app.json
+++ b/app.json
@@ -1,45 +1,27 @@
{
"pages": [
+ "pages/home/home",
+ "pages/wxlogin/wxlogin",
+ "pages/login/login",
+ "pages/wxbind/wxbind",
"pages/rechargeList/rechargeList",
"pages/wallet/wallet",
- "pages/home/home",
- "pages/login/login",
"pages/index/index",
"pages/logs/logs",
"pages/my/my",
- "pages/recharge/recharge"
-
+ "pages/recharge/recharge",
+ "pages/waterIntake/waterIntake",
+ "pages/personCharge/personcharge",
+ "pages/feedback/feedback",
+ "pages/openCard/openCard",
+ "pages/rechargeMoney/rechargMoney"
],
"window": {
- "navigationBarTextStyle": "black",
- "navigationBarTitleText": "鐢靛瓙閽卞寘",
+ "navigationBarTextStyle": "white",
+ "navigationBarTitleText": "澶х鑺傛按",
"navigationBarBackgroundColor": "#1890FF"
},
"componentFramework": "glass-easel",
"sitemapLocation": "sitemap.json",
- "lazyCodeLoading": "requiredComponents",
- "tabBar": {
- "color": "#000000",
- "selectedColor": "#2D8BF7",
- "list": [
- {
- "pagePath": "pages/home/home",
- "text": "棣栭〉",
- "iconPath": "/images/home_grey.png",
- "selectedIconPath": "/images/home_blue.png"
- },
- {
- "pagePath": "pages/wallet/wallet",
- "text": "鐢靛瓙閽卞寘",
- "iconPath": "/images/wallet_grey.png",
- "selectedIconPath": "/images/wallet_blue.png"
- },
- {
- "pagePath": "pages/my/my",
- "text": "涓汉涓績",
- "iconPath": "/images/my_grey.png",
- "selectedIconPath": "/images/my_blue.png"
- }
- ]
- }
+ "lazyCodeLoading": "requiredComponents"
}
\ No newline at end of file
diff --git a/images/balance.svg b/images/balance.svg
new file mode 100644
index 0000000..1b336b7
--- /dev/null
+++ b/images/balance.svg
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><svg width="29" height="29" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M19 16L24 22L29 16" stroke="#fff" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M9 13.9999C9 13.9999 16.5 2.49984 29.5 6.99986C42.5 11.4999 42 24.4999 42 24.4999" stroke="#fff" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M39 34C39 34 33 45 19.5 41.5C6 38 6 24 6 24" stroke="#fff" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M42 8V24" stroke="#fff" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M6 24L6 40" stroke="#fff" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M18 28H30" stroke="#fff" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M18 22H30" stroke="#fff" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M24 22V34" stroke="#fff" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/></svg>
\ No newline at end of file
diff --git a/images/pipeline.svg b/images/pipeline.svg
new file mode 100644
index 0000000..3e98905
--- /dev/null
+++ b/images/pipeline.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#1890FF"><g><rect fill="none" height="24" width="24"/></g><g><g><path d="M12,8c-2.21,0-4,1.79-4,4c0,2.21,1.79,4,4,4c2.21,0,4-1.79,4-4C16,9.79,14.21,8,12,8z M12,14c-1.1,0-2-0.9-2-2 c0-1.1,0.9-2,2-2s2,0.9,2,2C14,13.1,13.1,14,12,14z"/><path d="M22,7.47V5.35C20.05,4.77,16.56,4,12,4C9.85,4,7.89,4.86,6.46,6.24C6.59,5.39,6.86,3.84,7.47,2H5.35 C4.77,3.95,4,7.44,4,12c0,2.15,0.86,4.11,2.24,5.54c-0.85-0.14-2.4-0.4-4.24-1.01v2.12C3.95,19.23,7.44,20,12,20 c2.15,0,4.11-0.86,5.54-2.24c-0.14,0.85-0.4,2.4-1.01,4.24h2.12C19.23,20.05,20,16.56,20,12c0-2.15-0.86-4.11-2.24-5.54 C18.61,6.59,20.16,6.86,22,7.47z M12,18c-3.31,0-6-2.69-6-6s2.69-6,6-6s6,2.69,6,6S15.31,18,12,18z"/></g></g></svg>
\ No newline at end of file
diff --git a/images/question.svg b/images/question.svg
new file mode 100644
index 0000000..5567cad
--- /dev/null
+++ b/images/question.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="70.80000305175781" height="75.00926971435547" viewBox="0 0 70.80000305175781 75.00926971435547"><g><path d="M32.3,0.00927001C34.05,0.00927001,35.4,1.40927,35.4,3.10927C35.4,4.80927,34,6.20927,32.3,6.20927L12.15,6.20927C8.85,6.40927,6.25,9.15927,6.25,12.4593L6.25,62.8093C6.45,66.1093,9.2,68.7093,12.5,68.7093L58.7,68.7093C62,68.5093,64.6,65.7593,64.6,62.4593L64.6,28.1093C64.6,26.3593,66,25.0093,67.7,25.0093C69.45,25.0093,70.8,26.4093,70.8,28.1093L70.8,62.5093C70.8,69.4093,65.2,75.0093,58.3,75.0093L12.5,75.0093C5.6,75.0093,0,69.4093,0,62.5093L0,12.5093C0,5.60927,5.6,0.00927001,12.5,0.00927001L32.3,0.00927001ZM42.7,52.1093C44.45,52.1093,45.8,53.5093,45.8,55.2093C45.8,56.9593,44.4,58.3093,42.7,58.3093L19.8,58.3093C18.05,58.3093,16.7,56.9093,16.7,55.2093C16.7,53.4593,18.1,52.1093,19.8,52.1093L42.7,52.1093ZM30.2,37.5093C31.95,37.5093,33.3,38.9093,33.3,40.6093C33.3,42.3093,31.9,43.7093,30.2,43.7093L19.8,43.7093C18.05,43.7093,16.7,42.3093,16.7,40.6093C16.7,38.9093,18.1,37.5093,19.8,37.5093L30.2,37.5093ZM51.45,6.30927L61.75,12.1593L49.9,32.4593L43.2,35.2593C42.2,35.7093,41.05,35.2093,40.6,34.2093C40.55,34.0593,40.5,33.8593,40.45,33.6593L39.6,26.5593L51.45,6.30927ZM61.6,0.809269C64.4,2.35927,65.4,5.90927,63.85,8.70927C63.85,8.75927,63.8,8.75927,63.8,8.80927L62.8,10.5093L52.5,4.65927L53.5,2.95927C55.1,0.109269,58.75,-0.840731,61.6,0.809269Z" fill="#4090FF" fill-opacity="1"/></g></svg>
\ No newline at end of file
diff --git a/images/record.svg b/images/record.svg
new file mode 100644
index 0000000..f835666
--- /dev/null
+++ b/images/record.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="93.75" height="93.75" viewBox="0 0 93.75 93.75"><g><path d="M46.875,93.75C21.25,93.75,0,72.5,0,46.875C0,21.25,21.25,0,46.875,0C72.5,0,93.75,21.25,93.75,46.875C93.75,72.5,72.5,93.75,46.875,93.75ZM15.7684,20.6928C9.82413,27.7548,6.25,36.8835,6.25,46.875C6.25,57.5031,10.2942,67.1551,16.9333,74.3817L23.1658,67.2327Q22.7143,66.7069,22.2866,66.1617Q21.859,65.6164,21.4559,65.0527Q21.0528,64.4891,20.6751,63.9081Q20.2973,63.3271,19.9458,62.7299Q19.5942,62.1328,19.2694,61.5206Q18.9446,60.9084,18.6473,60.2825Q18.35,59.6565,18.0807,59.018Q17.8115,58.3795,17.5708,57.7297Q17.3301,57.0799,17.1184,56.42Q16.9067,55.7602,16.7245,55.0916Q16.5423,54.423,16.3899,53.747Q16.2376,53.0709,16.1153,52.3889Q15.993,51.7067,15.9011,51.0199Q15.8092,50.333,15.7478,49.6428Q15.6864,48.9526,15.6557,48.2603Q15.625,47.568,15.625,46.875Q15.625,45.5497,15.7372,44.2292Q15.8494,42.9086,16.073,41.6024Q16.2966,40.2961,16.63,39.0134Q16.9634,37.7307,17.4042,36.4809Q17.8451,35.2311,18.3901,34.023Q18.9351,32.815,19.5805,31.6575Q20.2259,30.4999,20.9669,29.4012Q21.708,28.3025,22.5394,27.2704L15.7684,20.6928ZM20.0612,16.3112L26.7326,22.9826Q27.7792,22.1003,28.899,21.3128Q30.0188,20.5254,31.2031,19.8388Q32.3874,19.1523,33.6273,18.572Q34.8671,17.9917,36.1529,17.522Q37.4388,17.0523,38.7607,16.6968Q40.0827,16.3414,41.4307,16.1029Q42.7787,15.8644,44.1424,15.7447Q45.5061,15.625,46.875,15.625Q48.112,15.625,49.3452,15.7228Q50.5784,15.8206,51.7999,16.0155Q53.0215,16.2105,54.2239,16.5014Q55.4262,16.7923,56.6018,17.1773Q57.7774,17.5624,58.9189,18.0391Q60.0603,18.5159,61.1605,19.0814Q62.2608,19.6469,63.3128,20.2976Q64.3649,20.9483,65.3622,21.6801L71.5618,14.5688C64.7277,9.34659,56.1751,6.25,46.875,6.25C36.583,6.25,27.2064,10.0424,20.0612,16.3112ZM76.4469,18.9711L70.144,26.0155Q70.6205,26.5471,71.0722,27.0998Q71.5239,27.6526,71.9499,28.2253Q72.376,28.7981,72.7754,29.3898Q73.1748,29.9814,73.5468,30.5907Q73.9188,31.1999,74.2625,31.8256Q74.6063,32.4512,74.9212,33.0918Q75.236,33.7325,75.5213,34.3869Q75.8065,35.0412,76.0616,35.7079Q76.3167,36.3746,76.5411,37.0523Q76.7655,37.73,76.9587,38.4172Q77.1519,39.1044,77.3135,39.7997Q77.4751,40.495,77.6048,41.197Q77.7345,41.8989,77.832,42.6061Q77.9296,43.3132,77.9947,44.0241Q78.0598,44.735,78.0924,45.4481Q78.125,46.1612,78.125,46.875Q78.125,48.2161,78.0101,49.5523Q77.8952,50.8885,77.6662,52.21Q77.4373,53.5314,77.0959,54.8284Q76.7546,56.1254,76.3034,57.3883Q75.8522,58.6513,75.2945,59.871Q74.7367,61.0906,74.0766,62.258Q73.4164,63.4254,72.6586,64.532Q71.9008,65.6385,71.051,66.676L77.7292,73.3542C83.8245,66.2521,87.5,57.0071,87.5,46.875C87.5,36.0509,83.3054,26.2393,76.4469,18.9711ZM73.3542,77.7292L66.676,71.051Q65.6385,71.9008,64.532,72.6586Q63.4254,73.4164,62.258,74.0766Q61.0906,74.7367,59.871,75.2945Q58.6513,75.8522,57.3884,76.3034Q56.1254,76.7546,54.8284,77.0959Q53.5314,77.4373,52.21,77.6662Q50.8885,77.8952,49.5523,78.0101Q48.2161,78.125,46.875,78.125Q45.6084,78.125,44.3459,78.0225Q43.0835,77.92,41.8334,77.7156Q40.5834,77.5113,39.354,77.2065Q38.1247,76.9016,36.924,76.4983Q35.7233,76.095,34.5592,75.5958Q33.3951,75.0966,32.2752,74.5048Q31.1553,73.9131,30.087,73.2327Q29.0187,72.5522,28.0089,71.7875L21.8149,78.8925C28.7097,84.2891,37.4048,87.5,46.875,87.5C57.0071,87.5,66.2521,83.8245,73.3542,77.7292Z" fill-rule="evenodd" fill="#2D8DFE" fill-opacity="1"/></g></svg>
\ No newline at end of file
diff --git a/images/record_blue.png b/images/record_blue.png
new file mode 100644
index 0000000..5d836ee
--- /dev/null
+++ b/images/record_blue.png
Binary files differ
diff --git a/images/record_grey.png b/images/record_grey.png
new file mode 100644
index 0000000..c81f0d0
--- /dev/null
+++ b/images/record_grey.png
Binary files differ
diff --git a/images/valva.svg b/images/valva.svg
new file mode 100644
index 0000000..f9f6508
--- /dev/null
+++ b/images/valva.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="100" height="100" viewBox="0 0 100 100"><g><path d="M50,0C77.6146,0,100,22.3854,100,50C100,77.6146,77.6146,100,50,100C22.3854,100,0,77.6146,0,50C0,22.3854,22.3854,0,50,0ZM50,1.93542C23.3979,1.93542,1.83333,23.5,1.83333,50.1021C1.83333,76.7042,23.3979,98.2687,50,98.2687C76.6021,98.2687,98.1667,76.7042,98.1667,50.1021C98.1667,23.5,76.6021,1.93542,50,1.93542ZM55.5062,91.8521L52.5646,97.4938L51.4208,97.5729L54.3646,91.9312L55.5062,91.8521ZM47.8771,92.0854L49.0208,92.1646L45.3208,97.3417L44.1771,97.2604L47.8771,92.0854ZM61.8187,90.5187L59.7937,96.5521L58.6792,96.8083L60.7042,90.7771L61.8187,90.5187ZM41.4875,91.2687L42.6042,91.5271L38.1396,96.0604L37.0229,95.8021L41.4875,91.2687ZM67.8542,88.2417L66.7979,94.5167L65.7354,94.9458L66.7917,88.6708L67.8542,88.2417ZM35.2958,89.4896L36.3583,89.9187L31.2396,93.6979L30.1771,93.2688L35.2958,89.4896ZM73.4687,85.0708L73.4062,91.4333L72.4271,92.0229L72.4896,85.6604L73.4687,85.0708ZM50.1667,8.33333C73.1771,8.33333,91.8333,26.9875,91.8333,50C91.8333,73.0125,73.1771,91.6667,50.1667,91.6667C27.1542,91.6667,8.5,73.0125,8.5,50C8.5,26.9875,27.1542,8.33333,50.1667,8.33333ZM29.4479,86.7854L30.4292,87.375L24.7833,90.3083L23.8,89.7188L29.4458,86.7854L29.4479,86.7854ZM50.2604,10C28.1688,10,10.2604,27.9083,10.2604,50C10.2604,72.0917,28.1688,90,50.2604,90C72.35,90,90.2604,72.0917,90.2604,50C90.2604,27.9083,72.35,10,50.2604,10ZM50.0521,11.6667C71.225,11.6667,88.3854,28.8292,88.3854,50C88.3854,71.1708,71.225,88.3333,50.0521,88.3333C28.8833,88.3333,11.7188,71.1708,11.7188,50C11.7188,28.8292,28.8833,11.6667,50.0521,11.6667ZM78.5354,81.0833L79.4687,87.375L78.5917,88.1125L77.6583,81.8187L78.5333,81.0812L78.5354,81.0833ZM24.0771,83.2229L24.9562,83.9583L18.9208,85.9708L18.0437,85.2354L24.0792,83.2229L24.0771,83.2229ZM82.9937,76.3583L84.7937,82.4625L84.0271,83.3125L82.2271,77.2083L82.9917,76.3583L82.9937,76.3583ZM19.2958,78.8333L20.0625,79.6854L13.8042,80.8375L13.0396,79.9875L19.2958,78.8333ZM86.6146,71.0208L89.3479,76.7688L88.7229,77.7271L85.9917,71.9833L86.6167,71.0229L86.6146,71.0208ZM15.2583,73.8167L15.8833,74.7771L9.52292,74.9375L8.89792,73.9792L15.2583,73.8167ZM58.6208,38.4917L39.0208,38.4917C38.4417,38.4917,37.675,38.8583,37.3083,39.3083L32.5167,45.2521C32.0769,45.7385,31.4631,46.0319,30.8083,46.0688L29.7458,46.0688C29.1644,46.0699,28.6937,46.5415,28.6937,47.1229L28.6937,52.1354C28.6926,52.716,28.2222,53.1864,27.6417,53.1875L25.55,53.1875C24.9694,53.1864,24.4991,52.716,24.4979,52.1354L24.4979,46.3542C24.4979,45.772,24.0259,45.3,23.4437,45.3L21.0521,45.3C20.4707,45.3011,20,45.7728,20,46.3542L20,65.6042C20,66.1833,20.4729,66.6562,21.0521,66.6562L23.4437,66.6562C24.0251,66.6562,24.4968,66.1855,24.4979,65.6042L24.4979,59.825C24.4979,59.2437,24.9708,58.7708,25.55,58.7708L27.6417,58.7708C28.2208,58.7708,28.6937,59.2437,28.6937,59.825L28.6937,64.8229C28.6937,65.4104,29.1667,65.8833,29.7458,65.8833L32.7896,65.8833C33.3708,65.8833,34.1646,66.2187,34.5667,66.65L39.8292,72.2562C40.2312,72.6854,41.0187,73.0292,41.5917,73.0292L62.375,73.0292C62.9542,73.0292,63.7417,72.6729,64.1292,72.2417L69.9375,65.7833C70.3229,65.3521,71.1104,64.9958,71.6917,64.9958L74.0042,64.9958C74.5854,64.9958,75.0583,65.375,75.0583,65.825C75.0583,66.2917,75.5292,66.6562,76.1104,66.6562L78.5021,66.6562C79.0826,66.6551,79.553,66.1847,79.5542,65.6042L79.5542,46.3542C79.5542,45.7728,79.0835,45.3011,78.5021,45.3L76.1104,45.3C75.529,45.3011,75.0583,45.7728,75.0583,46.3542L75.0583,47.3854C75.0572,47.9668,74.5855,48.4375,74.0042,48.4375L71.6917,48.4375C71.1111,48.4363,70.6407,47.966,70.6396,47.3854L70.6396,44.9937C70.6396,44.4115,70.1676,43.9396,69.5854,43.9396L65.5104,43.9396C64.9312,43.9396,64.1562,43.5812,63.7708,43.1521L60.375,39.2771C59.9073,38.8074,59.2826,38.527,58.6208,38.4896L58.6208,38.4917ZM89.3854,65.2L92.9833,70.4479L92.5187,71.4938L88.9187,66.2458L89.3854,65.2ZM5.725,67.4021L12.0312,68.2396L12.4979,69.2854L6.18958,68.45L5.725,67.4021ZM49.9708,45.7875Q56.5958,56.2792,56.5958,59.6229C56.5958,62.9688,53.6312,65.6833,49.9771,65.6833C46.3187,65.6833,43.3604,62.9688,43.3604,59.6229Q43.3604,56.2792,49.9708,45.7896L49.9708,45.7875ZM91.2333,59.0208L95.6083,63.6396L95.3125,64.7458L90.9375,60.1271L91.2333,59.0208ZM3.59167,60.4229L9.69167,62.2354L9.9875,63.3417L3.88959,61.5292L3.59167,60.425L3.59167,60.4229ZM92.1625,52.5917L97.1375,56.5583L96.9979,57.6937L92.0229,53.7292L92.1625,52.5917ZM2.51875,53.2521L8.30625,55.8979L8.44583,57.0333L2.65833,54.3875L2.51875,53.2521ZM2.58958,45.9521L7.89167,49.4688L7.85,50.6146L2.54792,47.0958L2.58958,45.95L2.58958,45.9521ZM92.0563,46.1396L97.5896,49.2792L97.6312,50.425L92.0958,47.2854L92.0542,46.1396L92.0563,46.1396ZM3.77083,38.75L8.45833,43.0542L8.23958,44.1792L3.55208,39.875L3.77083,38.75ZM90.9646,39.7854L96.9229,42.0187L97.1417,43.1437L91.1833,40.9083L90.9646,39.7833L90.9646,39.7854ZM6.04375,31.8125L10.0021,36.7958L9.60833,37.8708L5.65208,32.8875L6.04375,31.8125ZM88.9229,33.6667L95.1562,34.9417L95.5479,36.0167L89.3146,34.7417L88.9229,33.6667ZM58.7792,26.6667L39.5146,26.6667C38.934,26.6678,38.4636,27.1382,38.4625,27.7188L38.4625,30.1104C38.4625,30.6917,38.9354,31.1646,39.5146,31.1646L45.3021,31.1646C45.8813,31.1646,46.3542,31.6375,46.3542,32.2167L46.3542,34.0146C46.3542,34.5938,46.8271,35.0667,47.4063,35.0667L50.9021,35.0667C51.4827,35.0655,51.953,34.5952,51.9542,34.0146L51.9542,32.2167C51.9542,31.6375,52.4271,31.1646,53.0062,31.1646L58.7792,31.1646C59.3605,31.1634,59.8312,30.6918,59.8312,30.1104L59.8312,27.7188C59.8301,27.1382,59.3597,26.6678,58.7792,26.6667ZM9.35,25.3063L12.475,30.8479L11.9208,31.8479L8.79375,26.3063L9.35,25.3063ZM85.9708,27.9333L92.3271,28.2188L92.8833,29.2188L86.5271,28.9354L85.9708,27.9354L85.9708,27.9333ZM13.5479,19.3958L15.875,25.3187L15.1875,26.2333L12.8604,20.3104L13.5479,19.3958ZM88.5188,22.0542L89.2062,22.9708L82.8729,23.575L82.1854,22.6583L88.5188,22.0542ZM18.6604,14.1833L20.0333,20.3979L19.2083,21.1938L17.8375,14.9792L18.6604,14.1833ZM83.7958,16.4958L84.6208,17.2937L78.4583,18.8792L77.6354,18.0854L83.7958,16.4979L83.7958,16.4958ZM24.5104,9.81875L24.8917,16.1708L23.9542,16.8271L23.5708,10.475L24.5083,9.81875L24.5104,9.81875ZM78.2812,11.7292L79.2187,12.3854L73.3812,14.9167L72.4437,14.2604L78.2812,11.7292ZM30.9562,6.39583L30.3396,12.7292L29.3104,13.2312L29.9271,6.89792L30.9562,6.39792L30.9562,6.39583ZM72.1,7.85625L73.1292,8.35833L67.7604,11.7729L66.7292,11.2708L72.1,7.85625ZM37.7917,3.975L36.3,10.1625L35.2104,10.5167L36.7021,4.32917L37.7917,3.975ZM65.4375,5.00417L66.5271,5.35833L61.6854,9.48542L60.5958,9.13125L65.4375,5.00625L65.4375,5.00417ZM44.9729,2.65417L42.5312,8.52917L41.4,8.70833L43.8417,2.83333L44.9729,2.65417ZM58.3792,3.175L59.5104,3.35417L55.3729,8.1875L54.2417,8.00833L58.3792,3.175ZM52.2687,2.44583L48.9396,7.86667L47.7937,7.86667L51.1229,2.44583L52.2687,2.44583Z" fill="#3F8BFD" fill-opacity="1"/></g></svg>
\ No newline at end of file
diff --git a/images/wallet.svg b/images/wallet.svg
new file mode 100644
index 0000000..26d4c60
--- /dev/null
+++ b/images/wallet.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="87.44611358642578" height="87.44610595703125" viewBox="0 0 87.44611358642578 87.44610595703125"><g><path d="M43.7231,0C19.5754,0,0,19.5754,0,43.7231C0,67.8707,19.5754,87.4461,43.7231,87.4461C67.8707,87.4461,87.4461,67.8706,87.4461,43.7231C87.4461,19.5755,67.8707,0,43.7231,0ZM64.1109,64.58C62.8001,65.915,60.5913,66.5583,57.4844,66.5098L51.8532,66.5098C47.5166,66.5098,45.3483,64.0825,45.3483,59.2279L45.3483,45.9752L39.887,46.218C39.0777,57.351,33.8592,64.5031,24.2314,67.6748C22.2569,64.9885,20.6229,62.901,19.3283,61.4125C27.678,59.0987,32.2897,54.1551,33.1635,46.5821C29.8626,46.7926,27.3383,47.0111,25.5906,47.2376L23.0662,41.4607C26.6744,39.3247,30.4609,35.9752,34.4257,31.4119L20.1052,31.4119L20.1052,25.0039L39.8628,25.0039L38.1152,20.9749L45.2028,19.4213L47.4842,25.0039L66.5138,25.0039L66.5138,31.4119L43.2366,31.4119C40.3561,34.5674,37.1602,37.6904,33.6491,40.7809C38.196,40.7165,44.329,40.5545,52.0476,40.2957L46.8532,35.1984L51.6104,31.509C56.5942,35.8135,61.368,40.1986,65.9312,44.6647L60.9311,49.3735L57.2903,45.5871L52.1445,45.757L52.1445,58.063C52.1445,59.7462,53.002,60.5874,54.7173,60.5874L56.6105,60.5874C58.0343,60.5874,58.973,60.1384,59.4261,59.2403C59.879,58.3423,60.2999,55.9435,60.6884,52.0435C62.5004,52.8852,64.7661,53.7753,67.4846,54.7135C66.5461,59.9562,65.4215,63.2451,64.1109,64.58Z" fill="#4090FF" fill-opacity="1"/></g></svg>
\ No newline at end of file
diff --git a/images/water_intake_blue.png b/images/water_intake_blue.png
new file mode 100644
index 0000000..c3aada1
--- /dev/null
+++ b/images/water_intake_blue.png
Binary files differ
diff --git a/images/water_intake_grey.png b/images/water_intake_grey.png
new file mode 100644
index 0000000..8f621ee
--- /dev/null
+++ b/images/water_intake_grey.png
Binary files differ
diff --git a/images/wifi_no.svg b/images/wifi_no.svg
new file mode 100644
index 0000000..e451c37
--- /dev/null
+++ b/images/wifi_no.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#00FF00"><path d="M0 0h24v24H0z" fill="none"/><path d="M1 9l2 2c4.97-4.97 13.03-4.97 18 0l2-2C16.93 2.93 7.08 2.93 1 9zm8 8l3 3 3-3c-1.65-1.66-4.34-1.66-6 0zm-4-4l2 2c2.76-2.76 7.24-2.76 10 0l2-2C15.14 9.14 8.87 9.14 5 13z"/></svg>
\ No newline at end of file
diff --git a/images/wifi_off.svg b/images/wifi_off.svg
new file mode 100644
index 0000000..d1a5802
--- /dev/null
+++ b/images/wifi_off.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#FF4500"><path d="M24 .01c0-.01 0-.01 0 0L0 0v24h24V.01zM0 0h24v24H0V0zm0 0h24v24H0V0z" fill="none"/><path d="M22.99 9C19.15 5.16 13.8 3.76 8.84 4.78l2.52 2.52c3.47-.17 6.99 1.05 9.63 3.7l2-2zm-4 4c-1.29-1.29-2.84-2.13-4.49-2.56l3.53 3.53.96-.97zM2 3.05L5.07 6.1C3.6 6.82 2.22 7.78 1 9l1.99 2c1.24-1.24 2.67-2.16 4.2-2.77l2.24 2.24C7.81 10.89 6.27 11.73 5 13v.01L6.99 15c1.36-1.36 3.14-2.04 4.92-2.06L18.98 20l1.27-1.26L3.29 1.79 2 3.05zM9 17l3 3 3-3c-1.65-1.66-4.34-1.66-6 0z"/></svg>
\ No newline at end of file
diff --git a/pages/feedback/feedback.js b/pages/feedback/feedback.js
new file mode 100644
index 0000000..023a57c
--- /dev/null
+++ b/pages/feedback/feedback.js
@@ -0,0 +1,97 @@
+Page({
+ data: {
+ recordingSrc: '',
+ isRecording: false,
+ },
+
+ onLoad() {
+ this.recorderManager = wx.getRecorderManager();
+
+ this.recorderManager.onStart(() => {
+ console.log('recorder start');
+ this.setData({ isRecording: true });
+ this.startWaveformDrawing();
+ });
+
+ this.recorderManager.onStop((res) => {
+ console.log('recorder stop', res);
+ const { tempFilePath } = res;
+ this.setData({
+ recordingSrc: tempFilePath,
+ isRecording: false
+ });
+ this.stopWaveformDrawing();
+ });
+
+ this.recorderManager.onError((res) => {
+ console.error(res);
+ this.setData({ isRecording: false });
+ this.stopWaveformDrawing();
+ });
+ },
+
+ startRecording() {
+ if (this.data.isRecording) return;
+
+ wx.authorize({
+ scope: 'scope.record',
+ success: () => {
+ const options = {
+ duration: 60000,
+ sampleRate: 44100,
+ numberOfChannels: 1,
+ encodeBitRate: 192000,
+ format: 'aac',
+ frameSize: 50
+ };
+ this.recorderManager.start(options);
+ },
+ fail: () => {
+ wx.showModal({
+ title: '鎺堟潈澶辫触',
+ content: '璇锋巿鏉冨綍闊冲姛鑳�',
+ showCancel: false
+ });
+ }
+ });
+ },
+
+ stopRecording() {
+ if (!this.data.isRecording) return;
+
+ this.recorderManager.stop();
+ },
+
+ startWaveformDrawing() {
+ if (this.waveformInterval) return;
+
+ const canvasContext = wx.createCanvasContext('waveform');
+ const drawWaveform = () => {
+ if (!this.data.isRecording) return;
+
+ // 鐢熸垚妯℃嫙鐨勯煶閲忔暟鎹�
+ const data = new Array(100).fill(0).map(() => Math.random() * 100);
+
+ canvasContext.clearRect(0, 0, 300, 100);
+ canvasContext.beginPath();
+ canvasContext.moveTo(0, 50);
+ for (let i = 0; i < data.length; i++) {
+ const x = (i / data.length) * 300;
+ const y = 50 - data[i] / 2;
+ canvasContext.lineTo(x, y);
+ }
+ canvasContext.lineTo(300, 50);
+ canvasContext.stroke();
+ canvasContext.draw();
+
+ this.waveformInterval = setTimeout(drawWaveform, 100);
+ };
+
+ drawWaveform();
+ },
+
+ stopWaveformDrawing() {
+ clearTimeout(this.waveformInterval);
+ this.waveformInterval = null;
+ }
+});
diff --git a/pages/feedback/feedback.json b/pages/feedback/feedback.json
new file mode 100644
index 0000000..83cdf94
--- /dev/null
+++ b/pages/feedback/feedback.json
@@ -0,0 +1,4 @@
+{
+ "navigationBarTitleText": "闂鍙嶉",
+ "navigationBarTextStyle": "white"
+}
\ No newline at end of file
diff --git a/pages/feedback/feedback.wxml b/pages/feedback/feedback.wxml
new file mode 100644
index 0000000..b4efa7a
--- /dev/null
+++ b/pages/feedback/feedback.wxml
@@ -0,0 +1,9 @@
+<view class="container">
+ <button class="btn" bindtouchstart="startRecording" bindtouchend="stopRecording">
+ 鎸変綇褰曢煶
+ </button>
+ <view wx:if="{{isRecording}}" class="recording-overlay">
+ <canvas canvas-id="waveform" style="width: 300px; height: 100px;"></canvas>
+ </view>
+ <audio src="{{recordingSrc}}" controls></audio>
+</view>
\ No newline at end of file
diff --git a/pages/feedback/feedback.wxss b/pages/feedback/feedback.wxss
new file mode 100644
index 0000000..af408cd
--- /dev/null
+++ b/pages/feedback/feedback.wxss
@@ -0,0 +1,37 @@
+/* app.wxss 鎴栧崟鐙〉闈㈢殑 .wxss 鏂囦欢 */
+.container {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ height: 100vh;
+ padding: 20px;
+}
+
+.btn {
+ margin: 10px;
+ padding: 10px 20px;
+ background-color: #1cbbb4;
+ color: white;
+ border: none;
+ border-radius: 5px;
+ font-size: 16px;
+}
+
+audio {
+ margin-top: 20px;
+ width: 100%;
+}
+
+.recording-overlay {
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ background-color: rgba(0, 0, 0, 0.7);
+ z-index: 9999;
+}
diff --git a/pages/home/home.js b/pages/home/home.js
index befb840..fb846ac 100644
--- a/pages/home/home.js
+++ b/pages/home/home.js
@@ -1,14 +1,19 @@
// pages/home/home.js
+const storage = require('../../utils/storage.js');
+const {
+ get,
+ post
+} = require('../../api/request.js');
Page({
/**
* 椤甸潰鐨勫垵濮嬫暟鎹�
*/
data: {
+ sessionId: "",
image: "/images/ic_head_bg.jpg",
- userCode: "寮犱笁",
- userName: "1005535",
- userBalance: "100.5鍏�",
+ userPhone: "158****0723",
+ userName: "寮犱笁",
scrollViewHeight: 0,
listData: [{
name: '鍙栨按鍙� 1',
@@ -27,16 +32,26 @@
code: '1055201'
},
{
- name: '鍙栨按鍙� 3',
+ name: '鍙栨按鍙� 4',
+ code: '1055201'
+ },
+ {
+ name: '鍙栨按鍙� 5',
+ code: '1055201'
+ },
+ {
+ name: '鍙栨按鍙� 6',
code: '1055201'
}
- ]
+ ],
+ isRefreshing: false,
+ isWXRefreshing: false
},
- rechageTap:function (e) {
- wx.navigateTo({
- url: '/pages/recharge/recharge',
- })
+ openValve: function (e) {
+ wx.navigateTo({
+ url: '/pages/waterIntake/waterIntake',
+ })
},
calculateScrollViewHeight: function () {
wx.createSelectorQuery().selectAll('.list-item').boundingClientRect((rects) => {
@@ -46,23 +61,67 @@
});
}).exec();
},
+ startPullDownRefresh() {
+ if (!this.data.isWXRefreshing) {
+ var self = this;
+ console.log(this.data.isRefreshing);
+ this.setData({
+ isRefreshing: true
+ });
+ setTimeout(function () {
+ self.setData({
+ isRefreshing: false, // 灏唗riggered灞炴�ц缃负false锛岃〃绀轰笅鎷夊埛鏂板凡瀹屾垚
+ })
+ console.log('涓嬫媺鍒锋柊宸插畬鎴�');
+ }, 3000);
+ }
+
+ },
+ //鑾峰彇鐢ㄦ埛鏁版嵁
+ getUserData() {
+ get('/items')
+ .then((data) => {
+ this.setData({
+ items: data
+ });
+ })
+ .catch((error) => {
+ console.error('Failed to fetch data:', error);
+ });
+ },
+
/**
* 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
*/
onLoad(options) {
- // 浣跨敤 wx.nextTick 绛夊緟椤甸潰娓叉煋瀹屾垚
- wx.nextTick(() => {
- this.calculateScrollViewHeight();
- });
+ // 浣跨敤 wx.nextTick 绛夊緟椤甸潰娓叉煋瀹屾垚
+ wx.nextTick(() => {
+ this.calculateScrollViewHeight();
+ });
+ console.log("onLoad锛�" + options.param);
},
/**
* 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚
*/
onReady() {
+ //鍒ゆ柇鏈湴鏄惁淇濆瓨sessionId
+ if (storage.isHasKeySync("sessionId")) {
+ storage.getItem('sessionId').then((data) => {
+ this.setData({
+ sessionId: data
+ });
+ if (sessionId !== "") {
+ }
+ }).catch((err) => {
+ console.error('Failed to load parameter:', err);
+ });
+ } else {
+ console.log('Failed to load parameter:false');
+ }
},
/**
@@ -90,7 +149,21 @@
* 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔
*/
onPullDownRefresh() {
-
+ // 涓嬫媺鍒锋柊瑙﹀彂鐨勯�昏緫锛屽彲浠ユ槸璇锋眰鏁版嵁绛夋搷浣�
+ // 渚嬪锛岃姹傛暟鎹悗鏇存柊椤甸潰鍐呭
+ console.log(this.data.isRefreshing);
+ this.setData({
+ isWXRefreshing: true
+ });
+ console.log(this.data.isRefreshing);
+ // 鏁版嵁璇锋眰瀹屾垚鍚庯紝鍋滄涓嬫媺鍒锋柊鐨勫姩鐢�
+ var self = this;
+ setTimeout(function () {
+ self.setData({
+ isWXRefreshing: false, // 灏唗riggered灞炴�ц缃负false锛岃〃绀轰笅鎷夊埛鏂板凡瀹屾垚
+ })
+ console.log('涓嬫媺鍒锋柊宸插畬鎴�');
+ }, 3000);
},
/**
diff --git a/pages/home/home.json b/pages/home/home.json
index dfc93ed..0c560da 100644
--- a/pages/home/home.json
+++ b/pages/home/home.json
@@ -4,7 +4,7 @@
"t-avatar": "tdesign-miniprogram/avatar/avatar",
"t-switch": "tdesign-miniprogram/switch/switch"
},
- "navigationBarTitleText": "棣栭〉",
- "navigationBarTextStyle": "white"
-
+ "navigationBarTitleText": "澶х鑺傛按",
+ "navigationBarTextStyle": "white",
+ "enablePullDownRefresh": true
}
\ No newline at end of file
diff --git a/pages/home/home.wxml b/pages/home/home.wxml
index 20de5ae..ca7bc1b 100644
--- a/pages/home/home.wxml
+++ b/pages/home/home.wxml
@@ -5,48 +5,58 @@
<t-avatar class="avatar-example" image="{{image}}" size="120rpx" />
<view class="head-text-wrapper">
<text>{{userName}}</text>
- <text>{{userCode}}</text>
+ <text class="head-bottom">{{userPhone}}</text>
+ </view>
+ <view class="head-button-wrapper">
+ <text class="unbind">瑙g粦</text>
+ <text class="head-bottom">鑱旂郴瀹㈡湇</text>
</view>
</view>
- <text class="balance-label">{{userBalance}}</text>
</view>
<view class="center-wrapper">
<view class="center-view">
- <t-avatar image="{{image}}" size="80rpx" />
- <text>鍙栨按鍙�</text>
+ <image src="/images/wallet.svg" />
+ <text>鍏呭��</text>
</view>
- <view class="center-view" bind:tap="rechageTap">
- <t-avatar image="{{image}}" size="80rpx" />
- <text>鍏呭�肩即璐�</text>
+ <view class="center-view" bind:tap="openValve">
+ <image src="/images/valva.svg" />
+ <text>寮�闃�</text>
</view>
<view class="center-view">
- <t-avatar image="{{image}}" size="80rpx" />
- <text>鐢ㄦ按璁板綍</text>
+ <image src="/images/record.svg" />
+ <text>寮�鍏抽榾璁板綍</text>
</view>
<view class="center-view">
- <t-avatar image="{{image}}" size="80rpx" />
+ <image src="/images/question.svg" />
<text>闂鍙嶉</text>
</view>
</view>
<view class="bottom-title">
- <text>甯哥敤鐨勫彇姘村彛</text>
+ <text class="bottom-title-text">蹇�熷叧闃�</text>
+ <text class="refresh-button" bind:tap="startPullDownRefresh">鍒锋柊</text>
</view>
- <scroll-view class="scroll-view" scroll-y="true">
- <view class="scroll-bg">
- <view class="list-item" wx:for="{{listData}}" wx:for-item="item" wx:for-index="index">
- <text>{{item.name}}</text>
- <view class="list-item-piping">
- <image src="/images/piping.png"></image>
- <text>{{item.code}}</text>
- </view>
- <view>
- <t-switch bindchange="handleChange" value="{{defaultVal}}" label="{{['寮�', '鍏�']}}" slot="note" />
+ <!-- refresher-enabled="true" refresher-threshold="50" -->
+ <scroll-view class="scroll-view" scroll-x="false" scroll-y="true" refresher-enabled="{{isRefreshing==false?true:false}}" refresher-threshold="50" bindrefresherrefresh="onPullDownRefresh" refresher-triggered="{{isWXRefreshing}}">
+ <view wx:if="{{isRefreshing}}" class="refresh-view">
+ <view class="dot"></view>
+ <view class="dot"></view>
+ <view class="dot"></view>
+ </view>
+ <view class="scroll-bg">
+ <view class="list-item" wx:for="{{listData}}" wx:for-item="item" wx:for-index="index">
+ <view class="item-left">
+ <!-- <image class="item-img" src="/images/pipeline.svg" /> -->
+ <text>{{item.name}}</text>
+ <image class="item-img" src="/images/wifi_no.svg" />
+ </view>
+ <view>
+ <t-switch class="switch" bindchange="handleChange" value="{{true}}" label="{{['寮�', '鍏�']}}" slot="note" />
+ </view>
</view>
</view>
- </view>
</scroll-view>
</view>
\ No newline at end of file
diff --git a/pages/home/home.wxss b/pages/home/home.wxss
index 3e06c83..a6806c0 100644
--- a/pages/home/home.wxss
+++ b/pages/home/home.wxss
@@ -11,19 +11,20 @@
.head-wrapper {
background-color: #1890FF;
- height: 30vh;
+ height: 25vh;
+ width: 100%;
padding-left: 40rpx;
display: grid;
flex-direction: column;
align-items: center;
-
border-bottom-left-radius: 5rpx;
border-bottom-right-radius: 5rpx;
z-index: 1;
+ border-top: 1px solid #0484fc;
+
}
.head-top {
- margin-top: 40rpx;
display: flex;
align-items: center;
/* 鍦ㄧ旱鍚戞柟鍚戜笂灞呬腑瀵归綈 */
@@ -31,13 +32,49 @@
.head-text-wrapper {
+ flex: 1;
display: flex;
flex-direction: column;
- margin-left: 30rpx;
+ align-items: left;
+ justify-content: center;
+ margin-left: 15rpx;
+}
+
+.head-button-wrapper {
+ flex: 1;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ margin-left: 15rpx;
+}
+
+
+.head-bottom {
+ margin-top: 20rpx;
+ color: #fff;
+ font-size: 35rpx;
+}
+
+.unbind {
+ font-size: 30rpx;
+ /* 鎸夐挳鏂囧瓧鐨勫瓧浣撳ぇ灏� */
+ color: #1890FF;
+ /* 鎸夐挳鏂囧瓧棰滆壊 */
+ background-color: #fff;
+ /* 鎸夐挳鑳屾櫙棰滆壊 */
+ border: none;
+ /* 鍘绘帀鎸夐挳杈规 */
+ border-radius: 20px;
+ /* 鎸夐挳鍦嗚 */
+ padding-left: 20rpx;
+ padding-right: 20rpx;
+ padding-top: 5rpx;
+ padding-bottom: 5rpx;
+ margin-bottom: 10rpx;
}
.head-text-wrapper text {
- margin-bottom: 10rpx;
color: #fff;
}
@@ -64,6 +101,8 @@
}
.center-view {
+ flex: 1;
+ /* 姣忎釜鍏冪礌骞冲垎瀹藉害 */
display: flex;
flex-direction: column;
/* 鍦ㄧ旱鍚戜笂鎺掑垪瀛愬厓绱� */
@@ -73,9 +112,20 @@
/* 鍦ㄦí鍚戝拰绾靛悜涓婇兘灞呬腑鏄剧ず瀛愬厓绱� */
}
+.center-view image,
+.center-view t-avatar {
+ width: 90rpx;
+ /* 鏍规嵁闇�瑕佽皟鏁村浘鏍囧ぇ灏� */
+ height: 90rpx;
+ /* 鏍规嵁闇�瑕佽皟鏁村浘鏍囧ぇ灏� */
+ margin-bottom: 10rpx;
+ /* 鍥炬爣鍜屾枃鏈箣闂寸殑闂磋窛 */
+}
+
.center-view text {
margin-top: 15rpx;
font-size: 30rpx;
+ color: #1890FF;
}
.bottom-wrapper {
@@ -98,7 +148,7 @@
.list-item {
background-color: #fff;
- margin-top: 10rpx;
+ margin-top: 2rpx;
display: flex;
justify-content: space-between;
align-items: center;
@@ -106,17 +156,15 @@
padding-right: 30rpx;
padding-top: 20rpx;
padding-bottom: 20rpx;
-
+ margin-left: 20rpx;
+ margin-right: 20rpx;
}
.list-item text {
font-size: 30rpx;
}
-.list-item image {
- width: 80rpx;
- height: 80rpx;
-}
+
.list-item-piping {
display: flex;
@@ -127,7 +175,99 @@
.bottom-title {
border-radius: 5px 5px 0 0;
background-color: #fff;
- padding-left: 30rpx;
- padding-top: 30rpx;
- padding-bottom: 30rpx;
-}
\ No newline at end of file
+ display: flex;
+ align-items: center;
+ /* 鍨傜洿鏂瑰悜灞呬腑 */
+ justify-content: space-between;
+ /* 瀛愬厓绱犲湪涓昏酱涓婄殑瀵归綈鏂瑰紡 */
+ padding: 10px;
+ /* 瀹瑰櫒鐨勫唴杈硅窛 */
+ margin-left: 20rpx;
+ margin-right: 20rpx;
+ margin-top: 20rpx;
+}
+
+.bottom-title-text {
+ position: absolute;
+ /* 缁濆瀹氫綅 */
+ left: 50%;
+ /* 绉诲姩鍒板鍣ㄧ殑涓棿 */
+ transform: translateX(-50%);
+ /* 閫氳繃骞崇Щ鑷韩瀹藉害鐨勪竴鍗婃潵瀹炵幇鐪熸鐨勫眳涓� */
+ font-size: 16px;
+ /* 瀛椾綋澶у皬 */
+ color: #333;
+ /* 瀛椾綋棰滆壊 */
+}
+
+.refresh-button {
+ margin-left: auto;
+ /* 灏嗘寜閽帹鍒板鍣ㄧ殑鏈�鍙充晶 */
+ font-size: 30rpx;
+ /* 鎸夐挳鏂囧瓧鐨勫瓧浣撳ぇ灏� */
+ color: #fff;
+ /* 鎸夐挳鏂囧瓧棰滆壊 */
+ background-color: #1890FF;
+ /* 鎸夐挳鑳屾櫙棰滆壊 */
+ border: none;
+ /* 鍘绘帀鎸夐挳杈规 */
+ border-radius: 5px;
+ /* 鎸夐挳鍦嗚 */
+ padding-left: 20rpx;
+ padding-right: 20rpx;
+ padding-top: 5rpx;
+ padding-bottom: 5rpx;
+}
+
+.refresh-view {
+ text-align: center;
+ padding: 30rpx;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+}
+
+.dot {
+ width: 20rpx;
+ height: 20rpx;
+ background-color: #333;
+ border-radius: 50%;
+ margin: 0 5px;
+ animation: blink 1.4s infinite both;
+}
+
+.dot:nth-child(2) {
+ animation-delay: 0.2s;
+}
+
+.dot:nth-child(3) {
+ animation-delay: 0.4s;
+}
+
+@keyframes blink {
+ 0%, 80%, 100% {
+ opacity: 0;
+ }
+ 40% {
+ opacity: 1;
+ }
+}
+.switch{
+ --td-switch-checked-color: #1890FF;
+}
+
+
+.item-left {
+ display: flex;
+ align-items: center;
+}
+.item-left text{
+ font-size: 40rpx;
+}
+.item-img {
+ width: 40rpx;
+ /* 鏍规嵁闇�瑕佽皟鏁村浘鏍囧ぇ灏� */
+ height: 40rpx;
+ /* 鏍规嵁闇�瑕佽皟鏁村浘鏍囧ぇ灏� */
+ margin-left: 20rpx;
+}
diff --git a/pages/login/login.js b/pages/login/login.js
index c954612..a957679 100644
--- a/pages/login/login.js
+++ b/pages/login/login.js
@@ -1,12 +1,78 @@
-// pages/login/login.js
+const app = getApp();
+
Page({
/**
* 椤甸潰鐨勫垵濮嬫暟鎹�
*/
data: {
-
+ mobile: '',
+ code: '',
+ codeSent: false,
+ countdown: 60,
},
+
+ bindMobileInput: function (e) {
+ this.setData({
+ mobile: e.detail.value,
+ });
+ },
+ sendCode: function () {
+ if (!this.data.mobile) {
+ wx.showToast({
+ title: '璇疯緭鍏ユ墜鏈哄彿',
+ icon: 'none',
+ duration: 2000,
+ });
+ return;
+ }
+
+ // 鍦ㄨ繖閲屽鐞嗗彂閫侀獙璇佺爜鐨勯�昏緫锛屽彲浠ヨ皟鐢ㄥ悗鍙版帴鍙e疄鐜�
+ // 浠ヤ笅鏄竴涓畝鍗曠殑绀轰緥锛屼粎浣滃弬鑰�
+ wx.showToast({
+ title: '楠岃瘉鐮佸凡鍙戦��',
+ icon: 'success',
+ duration: 2000,
+ });
+
+ this.setData({
+ codeSent: true,
+ });
+
+ // 鍚姩鍊掕鏃�
+ this.startCountdown();
+ },
+ //鍊掕鏃�
+ startCountdown: function () {
+ let that = this;
+ let timer = setInterval(function () {
+ let countdown = that.data.countdown - 1;
+ that.setData({
+ countdown: countdown,
+ });
+
+ if (countdown <= 0) {
+ clearInterval(timer);
+ that.setData({
+ codeSent: false,
+ countdown: 60,
+ });
+ }
+ }, 1000);
+ },
+
+ /**
+ * 鐧诲綍
+ */
+ login: function (e) {
+ console.log("login")
+ let userName = "寮犱笁"
+ wx.navigateTo({
+ url: '/pages/wxbind/wxbind'
+ })
+ },
+
+
/**
* 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
@@ -63,13 +129,7 @@
onShareAppMessage() {
},
- /**
- * 鐧诲綍
- */
- login:function(e) {
- console.log("login")
- wx.reLaunch({
- url: 'pages/home/home',
- })
- }
+
+
+
})
\ No newline at end of file
diff --git a/pages/login/login.json b/pages/login/login.json
index 0b72fbc..a32ca47 100644
--- a/pages/login/login.json
+++ b/pages/login/login.json
@@ -1,10 +1,4 @@
{
- "window": {
- "navigationBarBackgroundColor": "#ffffff",
- "navigationBarTextStyle": "black",
- "navigationBarTitleText": "鐧诲綍",
- "backgroundColor": "#eeeeee",
- "backgroundTextStyle": "light",
- "enablePullDownRefresh": true
- }
+ "navigationBarTitleText": "鐧诲綍",
+ "navigationBarTextStyle": "white"
}
\ No newline at end of file
diff --git a/pages/login/login.wxml b/pages/login/login.wxml
index b500eae..80ca67a 100644
--- a/pages/login/login.wxml
+++ b/pages/login/login.wxml
@@ -4,20 +4,16 @@
<image src="/images/login_bg.jpeg"></image>
</view>
<view class="input-wrapper">
- <view class="label-container">
- <text class="input-label">鎵嬫満鍙凤細</text>
- </view>
- <input class="input" placeholder="璇疯緭鍏�11浣嶆墜鏈哄彿" maxlength="11" />
+ <input class="input" placeholder="璇疯緭鍏�11浣嶆墜鏈哄彿" maxlength="11" bindinput="bindMobileInput" />
</view>
<view class="input-wrapper">
- <view class="label-container">
- <text class="input-label"> 瀵嗙爜锛�</text>
- </view>
- <input class="input" type="password" placeholder="璇疯緭鍏ュ瘑鐮�" bindinput="bindPasswordInput" />
+ <input class="input" type="number" placeholder="璇疯緭鍏ラ獙璇佺爜" />
+ <button class="code-button" wx:if="{{!codeSent}}" bindtap="sendCode">鑾峰彇楠岃瘉鐮�</button>
+ <button class="code-button" wx:if="{{codeSent}}" disabled>閲嶆柊鑾峰彇({{countdown}}s)</button>
</view>
<view>
<button class="login-button" bindtap="login">鐧诲綍</button>
</view>
- </view>
\ No newline at end of file
+</view>
\ No newline at end of file
diff --git a/pages/login/login.wxss b/pages/login/login.wxss
index 8d3b2a8..c042c05 100644
--- a/pages/login/login.wxss
+++ b/pages/login/login.wxss
@@ -5,10 +5,9 @@
.login-container {
display: flex;
flex-direction: column;
- align-items: center;
justify-content: flex-end;
height: 80vh;
-
+ width: 100%;
}
@@ -29,25 +28,30 @@
border: 1px solid #ccc;
border-radius: 5px;
background-color: #fff;
-
+ font-size: 35rpx;
+ padding-left: 15rpx;
}
+
.input-wrapper {
- width: 70%;
+
display: flex;
/* 浣跨敤 Flex 甯冨眬浣� text 鍜� input 鍦ㄥ悓涓�琛� */
align-items: center;
justify-content: center;
- margin-bottom: 15px;
-
+ margin-bottom: 40rpx;
+ margin-left: 40rpx;
+ margin-right: 40rpx;
+
}
.input-label {
- flex: 1; /* 璁╁�煎崰鎹墿浣欑┖闂� */
+ flex: 1;
+ /* 璁╁�煎崰鎹墿浣欑┖闂� */
align-items: left;
- width: 150px;
- margin-right: 10px;
- font-size: 16px;
+ width: 150rpx;
+ margin-right: 10rpx;
+ font-size: 31rpx;
color: #fff;
font-weight: bold;
text-align: justify;
@@ -59,6 +63,19 @@
display: flex;
align-items: center;
}
-.login-button{
+
+.login-button {
margin-top: 50rpx;
+ margin-left: 40rpx;
+ margin-right: 40rpx;
+ height: 90rpx;
+ justify-content: center; /* 姘村钩灞呬腑 */
+ align-items: center; /* 鍨傜洿灞呬腑 */
+ display: flex;
+}
+
+.code-button {
+ width: 50%;
+ font-size: 30rpx;
+ margin-left: 15rpx;
}
\ No newline at end of file
diff --git a/pages/my/my.js b/pages/my/my.js
index 7c8d6d5..e77d64f 100644
--- a/pages/my/my.js
+++ b/pages/my/my.js
@@ -5,7 +5,9 @@
* 椤甸潰鐨勫垵濮嬫暟鎹�
*/
data: {
-
+ image: "/images/ic_head_bg.jpg",
+ userCode: "寮犱笁",
+ userName: "1005535"
},
/**
diff --git a/pages/my/my.wxml b/pages/my/my.wxml
index 19fb6c7..823b887 100644
--- a/pages/my/my.wxml
+++ b/pages/my/my.wxml
@@ -1,2 +1,27 @@
<!--pages/my/my.wxml-->
-<text>pages/my/my.wxml</text>
\ No newline at end of file
+<view class="base-wrapper">
+ <view class="head-wrapper">
+ <view class="center-wrapper">
+ <view class="head-top">
+ <t-avatar class="avatar-example" image="{{image}}" size="120rpx" />
+ <view class="head-text-wrapper">
+ <text>{{userName}}</text>
+ <text>{{userCode}}</text>
+ </view>
+ </view>
+ </view>
+ </view>
+
+ <view class="bottom-title">
+ <text>鐗囧尯璐熻矗浜�</text>
+ </view>
+ <view class="item">
+ <text>闂鍙嶉</text>
+ </view>
+ <view class="item">
+ <text>瑙i櫎缁戝畾</text>
+ </view>
+ <view class="item">
+ <text>閫�鍑虹櫥褰�</text>
+ </view>
+</view>
\ No newline at end of file
diff --git a/pages/my/my.wxss b/pages/my/my.wxss
index 1c3fe88..e335d7a 100644
--- a/pages/my/my.wxss
+++ b/pages/my/my.wxss
@@ -1 +1,143 @@
-/* pages/my/my.wxss */
\ No newline at end of file
+/* pages/my/my.wxss */
+
+/* pages/home/home.wxss */
+.base-wrapper {
+ background-color: #f5f5f5;
+ width: 100%;
+ height: 100vh;
+ overflow: hidden;
+ /* 闃叉搴曢儴鍖哄煙婊氬姩 */
+ display: flex;
+ flex-direction: column;
+}
+
+.head-wrapper {
+ background-color: #1890FF;
+ height: 30vh;
+ display: grid;
+ flex-direction: column;
+ align-items: center;
+ border-bottom-left-radius: 5rpx;
+ border-bottom-right-radius: 5rpx;
+ z-index: 1;
+}
+
+.head-top {
+ margin-top: 40rpx;
+ display: flex;
+ align-items: center;
+ /* 鍦ㄧ旱鍚戞柟鍚戜笂灞呬腑瀵归綈 */
+}
+
+
+.head-text-wrapper {
+ display: flex;
+ flex-direction: column;
+ margin-left: 30rpx;
+}
+
+.head-text-wrapper text {
+ margin-bottom: 10rpx;
+ color: #fff;
+}
+
+.balance-label {
+ margin-bottom: 40rpx;
+ color: #fff;
+ font-size: 35rpx;
+}
+
+.center-wrapper {
+ margin-top: 30rpx;
+ margin-right: 20rpx;
+ margin-left: 20rpx;
+ background-color: #fff;
+ border-radius: 5px;
+ display: flex;
+
+
+ justify-content: space-around;
+ z-index: 1;
+ height: 30vh;
+ /* 浣� center-wrapper 鍦ㄥご閮ㄤ箣涓� */
+}
+
+.center-view {
+ display: flex;
+ flex-direction: column;
+ /* 鍦ㄧ旱鍚戜笂鎺掑垪瀛愬厓绱� */
+ align-items: center;
+ /* 鍦ㄧ旱鍚戜笂灞呬腑鏄剧ず瀛愬厓绱� */
+ justify-content: center;
+ /* 鍦ㄦí鍚戝拰绾靛悜涓婇兘灞呬腑鏄剧ず瀛愬厓绱� */
+}
+
+.center-view text {
+ margin-top: 15rpx;
+ font-size: 30rpx;
+}
+
+.bottom-wrapper {
+ margin-right: 20rpx;
+ margin-left: 20rpx;
+ display: flex;
+ flex-direction: column;
+ margin-top: 48vh;
+}
+
+.scroll-view {
+ flex: 1;
+ overflow-y: auto;
+ /* 鍏佽鍨傜洿婊氬姩 */
+ z-index: 0;
+ /* 纭繚 scroll-view 鍦ㄥご閮ㄥ拰 center-wrapper 涔嬩笅 */
+}
+
+
+
+.list-item {
+ background-color: #fff;
+ margin-top: 10rpx;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding-left: 30rpx;
+ padding-right: 30rpx;
+ padding-top: 20rpx;
+ padding-bottom: 20rpx;
+
+}
+
+.list-item text {
+ font-size: 30rpx;
+}
+
+.list-item image {
+ width: 80rpx;
+ height: 80rpx;
+}
+
+.list-item-piping {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+}
+
+.bottom-title {
+ background-color: #fff;
+ padding-left: 30rpx;
+ padding-top: 30rpx;
+ padding-bottom: 30rpx;
+ margin-top: 60rpx;
+}
+.item {
+ background-color: #fff;
+ padding-left: 30rpx;
+ padding-top: 30rpx;
+ padding-bottom: 30rpx;
+ margin-top: 10rpx;
+}
+text{
+ color: #000;
+ font-size: 38rpx;
+}
\ No newline at end of file
diff --git a/pages/openCard/openCard.js b/pages/openCard/openCard.js
new file mode 100644
index 0000000..7115e73
--- /dev/null
+++ b/pages/openCard/openCard.js
@@ -0,0 +1,117 @@
+// pages/openCard/openCard.js
+Page({
+
+ /**
+ * 椤甸潰鐨勫垵濮嬫暟鎹�
+ */
+ data: {
+ allCardPoints: [{
+ id: 511111111,
+ balance: '30',
+ state: 1
+ },
+ {
+ id: 411111111,
+ balance: '30',
+ state: 0
+ },
+ {
+ id: 31111111111,
+ balance: '30',
+ state: 1
+ },
+ {
+ id: 2,
+ balance: '30',
+ state: 1
+ },
+ {
+ id: 1,
+ balance: '30',
+ state: 1
+ },
+ {
+ id: 0,
+ balance: '30',
+ state: 1
+ },
+ ] // 甯哥敤鍙栨按鍙f暟鎹�
+ },
+ openValva(event) {
+ const {
+ item
+ } = event.currentTarget.dataset; // 鑾峰彇褰撳墠鐐瑰嚮鐨� item
+ if (item.state === 1) {
+ // 鍦ㄩ〉闈㈠姞杞芥椂鏄剧ず鍔犺浇鍔ㄧ敾
+ wx.showLoading({
+ title: '姝e湪寮�娉佃绋嶅悗...', // 鍔犺浇鎻愮ず鏂囧瓧
+ mask: true // 鏄惁鏄剧ず閫忔槑钂欏眰锛岄槻姝㈣Е鎽哥┛閫忥紝榛樿涓� false
+ });
+ // 妯℃嫙鍔犺浇鏁版嵁
+ setTimeout(() => {
+ // 鍔犺浇瀹屾垚鍚庨殣钘忓姞杞藉姩鐢�
+ wx.hideLoading();
+ //瀹屾垚鍚庡洖鍒伴椤�
+ wx.reLaunch({
+ url: '/pages/home/home?param=true' // 棣栭〉鐨勮矾寰勶紝鏍规嵁瀹為檯鎯呭喌濉啓
+ });
+ }, 2000); // 寤舵椂 2 绉掓ā鎷熷姞杞芥暟鎹�
+ }
+
+ },
+ /**
+ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
+ */
+ onLoad(options) {
+
+ },
+
+ /**
+ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍗歌浇
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁�
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜�
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/openCard/openCard.json b/pages/openCard/openCard.json
new file mode 100644
index 0000000..0fc5efb
--- /dev/null
+++ b/pages/openCard/openCard.json
@@ -0,0 +1,4 @@
+{
+ "navigationBarTitleText": "閫夋嫨铏氭嫙鍗�",
+ "navigationBarTextStyle": "white"
+}
\ No newline at end of file
diff --git a/pages/openCard/openCard.wxml b/pages/openCard/openCard.wxml
new file mode 100644
index 0000000..18e5562
--- /dev/null
+++ b/pages/openCard/openCard.wxml
@@ -0,0 +1,23 @@
+<!--pages/openCard/openCard.wxml 寮�鍗℃椂鐨勮櫄鎷熷崱-->
+<view>
+
+ <scroll-view class="list-container" scroll-y="true" scroll-x="false">
+ <block wx:for="{{allCardPoints}}" wx:key="index">
+ <view class="{{item.state===1?'item':'item-gray'}}">
+ <view class="item-card">
+ <text>鍗$紪鍙凤細</text>
+ <text>{{item.id}}</text>
+ </view>
+ <view class="item-bottom">
+ <image class="item-balance-img" src="/images/balance.svg" />
+ <view class="item-balance">
+ <text class="item-balance-text">{{item.balance}}</text>
+ <text class="item-balance-text-yuan">鍏�</text>
+ </view>
+ <text class="{{item.state===1?'item-button':'item-button-gray'}}" bind:tap="openValva" data-item="{{item}}">{{item.state === 1 ? '閫夋嫨' : '姝e湪浣跨敤'}}</text>
+ </view>
+
+ </view>
+ </block>
+ </scroll-view>
+</view>
\ No newline at end of file
diff --git a/pages/openCard/openCard.wxss b/pages/openCard/openCard.wxss
new file mode 100644
index 0000000..7d47420
--- /dev/null
+++ b/pages/openCard/openCard.wxss
@@ -0,0 +1,94 @@
+/* pages/openCard/openCard.wxss */
+
+.item {
+ background-color: #1890FF;
+ margin-top: 20rpx;
+ margin-left: 20rpx;
+ margin-right: 20rpx;
+ padding: 30rpx;
+ border-radius: 30rpx;
+}
+
+.item-gray {
+ background-color: #D3D3D3;
+ margin-top: 20rpx;
+ margin-left: 20rpx;
+ margin-right: 20rpx;
+ padding: 30rpx;
+ border-radius: 30rpx;
+}
+
+.item-balance-img {
+ width: 60rpx;
+ height: 50rpx;
+}
+
+.item-bottom {
+ display: flex;
+ margin-top: 10rpx;
+ align-items: center;
+ /* 鍨傜洿灞呬腑 */
+}
+
+.item-card {
+ margin-left: 10rpx;
+}
+
+.item-card text {
+ font-size: 35rpx;
+ color: #fff;
+}
+
+.item-balance-text {
+ color: #fff;
+ font-size: 50rpx;
+ margin-left: 10rpx;
+}
+
+.item-button {
+ margin-left: auto;
+ /* 灏嗘寜閽浐瀹氬湪鍙宠竟 */
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ /* 浣挎寜閽唴閮ㄦ按骞冲拰鍨傜洿灞呬腑 */
+ background-color: #32CD32;
+ color: white;
+ padding-left: 40rpx;
+ padding-right: 40rpx;
+ padding-bottom: 8rpx;
+ padding-top: 8rpx;
+ border-radius: 30rpx;
+ font-size: 40rpx;
+ border: none;
+}
+
+.item-button-gray {
+ margin-left: auto;
+ /* 灏嗘寜閽浐瀹氬湪鍙宠竟 */
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ /* 浣挎寜閽唴閮ㄦ按骞冲拰鍨傜洿灞呬腑 */
+ background-color: #8B8989;
+ color: #FF6A6A;
+ padding-left: 40rpx;
+ padding-right: 40rpx;
+ padding-bottom: 8rpx;
+ padding-top: 8rpx;
+ border-radius: 30rpx;
+ font-size: 40rpx;
+ border: none;
+}
+
+.item-balance-text-yuan {
+ color: white;
+ margin-left: 10rpx;
+ margin-bottom: 2rpx;
+}
+
+.item-balance {
+ display: flex;
+ align-items: flex-end;
+ /* 搴曢儴瀵归綈 */
+}
\ No newline at end of file
diff --git a/pages/personCharge/personcharge.js b/pages/personCharge/personcharge.js
new file mode 100644
index 0000000..ba232d4
--- /dev/null
+++ b/pages/personCharge/personcharge.js
@@ -0,0 +1,66 @@
+// pages/personCharge/personcharge.js
+Page({
+
+ /**
+ * 椤甸潰鐨勫垵濮嬫暟鎹�
+ */
+ data: {
+
+ },
+
+ /**
+ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
+ */
+ onLoad(options) {
+
+ },
+
+ /**
+ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍗歌浇
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁�
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜�
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/personCharge/personcharge.json b/pages/personCharge/personcharge.json
new file mode 100644
index 0000000..8835af0
--- /dev/null
+++ b/pages/personCharge/personcharge.json
@@ -0,0 +1,3 @@
+{
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/personCharge/personcharge.wxml b/pages/personCharge/personcharge.wxml
new file mode 100644
index 0000000..62d8fb9
--- /dev/null
+++ b/pages/personCharge/personcharge.wxml
@@ -0,0 +1,2 @@
+<!--pages/personCharge/personcharge.wxml-->
+<text>pages/personCharge/personcharge.wxml</text>
\ No newline at end of file
diff --git a/pages/personCharge/personcharge.wxss b/pages/personCharge/personcharge.wxss
new file mode 100644
index 0000000..77e5a7b
--- /dev/null
+++ b/pages/personCharge/personcharge.wxss
@@ -0,0 +1 @@
+/* pages/personCharge/personcharge.wxss */
\ No newline at end of file
diff --git a/pages/recharge/recharge.js b/pages/recharge/recharge.js
index 0f5aea1..b043fef 100644
--- a/pages/recharge/recharge.js
+++ b/pages/recharge/recharge.js
@@ -5,30 +5,8 @@
* 椤甸潰鐨勫垵濮嬫暟鎹�
*/
data: {
- userName: "寮犱笁",
- userPhone: "15802220723",
- userCode: "15584236",
- balance: "1025鍏�",
- activeIndex: -1,
- },
-
- handleMoneyWrapperTap: function (e) {
- const index = e.currentTarget.dataset.index;
- console.log(index)
- if (index !== undefined) {
- this.setData({
- activeIndex: parseInt(index),
- });
- }
},
- moveToRechargeList:function(e){
- wx.navigateTo({
- url: '/pages/rechargeList/rechargeList'
- })
- },
-
-
/**
* 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
diff --git a/pages/recharge/recharge.json b/pages/recharge/recharge.json
deleted file mode 100644
index 8f556cf..0000000
--- a/pages/recharge/recharge.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "navigationBarTitleText": "鍏呭�肩即璐�",
- "navigationBarTextStyle": "white"
-}
\ No newline at end of file
diff --git a/pages/recharge/recharge.wxml b/pages/recharge/recharge.wxml
new file mode 100644
index 0000000..3f2a952
--- /dev/null
+++ b/pages/recharge/recharge.wxml
@@ -0,0 +1,2 @@
+<!--pages/recharge/recharge.wxml-->
+<text>pages/recharge/recharge.wxml</text>
\ No newline at end of file
diff --git a/pages/rechargeMoney/rechargMoney.js b/pages/rechargeMoney/rechargMoney.js
new file mode 100644
index 0000000..9e2514a
--- /dev/null
+++ b/pages/rechargeMoney/rechargMoney.js
@@ -0,0 +1,70 @@
+// pages/rechargeMoney/rechargMoney.js
+Page({
+
+ /**
+ * 椤甸潰鐨勫垵濮嬫暟鎹�
+ */
+ data: {
+ userName: "寮犱笁",
+ userPhone: "15802220723",
+ userCode: "15584236",
+ balance: "1025鍏�",
+ activeIndex: -1,
+ },
+
+ /**
+ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
+ */
+ onLoad(options) {
+
+ },
+
+ /**
+ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍗歌浇
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁�
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜�
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/rechargeMoney/rechargMoney.json b/pages/rechargeMoney/rechargMoney.json
new file mode 100644
index 0000000..8835af0
--- /dev/null
+++ b/pages/rechargeMoney/rechargMoney.json
@@ -0,0 +1,3 @@
+{
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/rechargeMoney/rechargMoney.wxml b/pages/rechargeMoney/rechargMoney.wxml
new file mode 100644
index 0000000..27006ab
--- /dev/null
+++ b/pages/rechargeMoney/rechargMoney.wxml
@@ -0,0 +1,71 @@
+<!--pages/recharge/recharge.wxml-->
+<view class="base-wrapper">
+ <view class="user-wrapper">
+ <view>
+ <text>{{userName}}</text>
+ <text>{{userPhone}}</text>
+ </view>
+ <view>
+ <text>鐢ㄦ埛缂栧彿锛�</text>
+ <text>{{userCode}}</text>
+ </view>
+ <view>
+ <text>浣欓锛�</text>
+ <text>{{balance}}</text>
+ </view>
+ </view>
+
+ <view class="money-base-wrapper">
+ <view class="row">
+ <view class="item{{activeIndex === 0 ? 'active' : ''}}" bindtap="handleMoneyWrapperTap" data-index="0">
+ <view class="money-wrapper">
+ <text class="money-number">30</text>
+ <text class="money-label">鍏�</text>
+ </view>
+ </view>
+ <view class="item{{activeIndex === 1 ? 'active' : ''}}" bindtap="handleMoneyWrapperTap" data-index="1">
+ <view class="money-wrapper">
+ <text class="money-number">50</text>
+ <text class="money-label">鍏�</text>
+ </view>
+ </view>
+ <view class="item{{activeIndex === 2 ? 'active' : ''}}" bindtap="handleMoneyWrapperTap" data-index="2">
+ <view class="money-wrapper">
+ <text class="money-number">100</text>
+ <text class="money-label">鍏�</text>
+ </view>
+ </view>
+ </view>
+ <view class="row">
+ <view class="item{{activeIndex === 3 ? 'active' : ''}}" bindtap="handleMoneyWrapperTap" data-index="3">
+ <view class="money-wrapper">
+ <text class="money-number">200</text>
+ <text class="money-label">鍏�</text>
+ </view>
+ </view>
+ <view class="item{{activeIndex === 4 ? 'active' : ''}}" bindtap="handleMoneyWrapperTap" data-index="4">
+ <view class="money-wrapper">
+ <text class="money-number">300</text>
+ <text class="money-label">鍏�</text>
+ </view>
+ </view>
+ <view class="item{{activeIndex === 5 ? 'active' : ''}}" bindtap="handleMoneyWrapperTap" data-index="5">
+ <view class="money-wrapper">
+ <text class="money-number">500</text>
+ <text class="money-label">鍏�</text>
+ </view>
+ </view>
+ </view>
+ </view>
+
+<view class="rechage-view">
+ <view class="rechage{{activeIndex === -1 ? 'active' : ''}}">
+ <text >鍏呭��</text>
+ </view>
+ <view class="rechageList-view">
+ <text class="rechageList" bind:tap="moveToRechargeList">鍏呭�艰褰�</text>
+ </view>
+</view>
+
+
+</view>
\ No newline at end of file
diff --git a/pages/rechargeMoney/rechargMoney.wxss b/pages/rechargeMoney/rechargMoney.wxss
new file mode 100644
index 0000000..b62d24a
--- /dev/null
+++ b/pages/rechargeMoney/rechargMoney.wxss
@@ -0,0 +1,153 @@
+/* pages/recharge/recharge.wxss */
+.base-wrapper {
+ background-color: #f5f5f5;
+ width: 100%;
+ height: 100vh;
+ overflow: hidden;
+ display: flex;
+ flex-direction: column;
+}
+
+.user-wrapper {
+ background-color: #1890FF;
+ height: 20vh;
+ padding-left: 10rpx;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-around;
+ padding-top: 20rpx;
+ padding-bottom: 30rpx;
+}
+
+.user-wrapper text {
+ color: #fff;
+ margin-left: 30rpx;
+}
+
+.money-base-wrapper {
+ flex-direction: column;
+ height: 20vh;
+ display: flex;
+ justify-content: space-around;
+ margin-top: 20rpx;
+}
+
+.row {
+ display: flex;
+ justify-content: space-around;
+}
+
+.item {
+ background-color: #fff;
+ border-radius: 5px;
+ width: 100%;
+ height: 10vh;
+ margin-left: 20rpx;
+ margin-top: 30rpx;
+ margin-right: 20rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+.item text {
+ color: #2D8BF7;
+}
+
+.money-number {
+ font-size: 40rpx;
+}
+
+.money-label {
+ font-size: 30rpx;
+ margin-left: 5rpx;
+}
+
+.itemactive {
+ background-color: #2D8BF7;
+ border-radius: 5px;
+ width: 100%;
+ height: 10vh;
+ margin-top: 30rpx;
+ margin-left: 20rpx;
+ margin-right: 20rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+.itemactive text {
+ color: #fff;
+}
+
+.money-wrapper {
+ display: flex;
+ align-items: flex-end;
+ /* 搴曢儴瀵归綈 */
+ justify-content: center;
+ /* 姘村钩灞呬腑 */
+}
+
+.rechage-view {
+ flex-grow: 1;
+ /* 鍗犳嵁鍓╀綑鐨勫叏閮ㄩ珮搴� */
+ flex-direction: column;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ width: 100%;
+}
+
+.rechageList-view {
+ width: 50%;
+ background-color: #fff;
+ display: flex;
+ margin-left: 20rpx;
+ margin-right: 20rpx;
+ align-items: center;
+ justify-content: center;
+ margin-top: 30rpx;
+ border-radius: 90px;
+ border: 2px solid #2D8BF7;
+ /* 娣诲姞钃濊壊鐨勮竟妗� */
+ padding-top: 15rpx;
+ padding-bottom: 15rpx;
+}
+
+.rechage {
+ display: flex;
+ width: 50%;
+ background-color: #2D8BF7;
+ align-items: center;
+ justify-content: center;
+ padding-top: 15rpx;
+ padding-bottom: 15rpx;
+ border-radius: 90px;
+ margin-top: 45rpx;
+}
+
+.rechageactive {
+ display: flex;
+ margin-top: 45rpx;
+ align-items: center;
+ justify-content: center;
+ width: 50%;
+ background-color: #bababa;
+ padding-top: 15rpx;
+ padding-bottom: 15rpx;
+ border-radius: 90px;
+}
+
+.rechage-view text {
+ font-size: 30rpx;
+ padding-top: 10rpx;
+ padding-bottom: 10rpx;
+}
+
+.rechageactive text {
+ color: #fff;
+}
+
+.rechage text {
+ color: #fff;
+}
\ No newline at end of file
diff --git a/pages/wallet/wallet.js b/pages/wallet/wallet.js
index d2b9f02..d8518c5 100644
--- a/pages/wallet/wallet.js
+++ b/pages/wallet/wallet.js
@@ -45,6 +45,13 @@
}
]
},
+ rechageTap:function (e) {
+ wx.navigateTo({
+ url: '/pages/recharge/recharge',
+ })
+ },
+
+
/**
* 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
diff --git a/pages/wallet/wallet.wxml b/pages/wallet/wallet.wxml
index 4493fbf..f7644a8 100644
--- a/pages/wallet/wallet.wxml
+++ b/pages/wallet/wallet.wxml
@@ -11,7 +11,7 @@
</view>
<view class="top-wrapper-button">
<text class="button-refund">閫�娆�</text>
- <text class="button-recharge">鍏呭��</text>
+ <text class="button-recharge" bind:tap="rechageTap">鍏呭��</text>
</view>
</view>
<view class="top-wallet-bg">
diff --git a/pages/waterIntake/waterIntake.js b/pages/waterIntake/waterIntake.js
new file mode 100644
index 0000000..bcfb618
--- /dev/null
+++ b/pages/waterIntake/waterIntake.js
@@ -0,0 +1,100 @@
+// pages/waterIntake/waterIntake.js
+Page({
+
+
+ data: {
+ currentTab: 0, // 褰撳墠鏄剧ず鐨勮〃鏍硷紝榛樿涓虹涓�涓〃鏍�
+ commonWaterPoints: [ "甯哥敤鍙栨按鍙�2", "甯哥敤鍙栨按鍙�3"], // 甯哥敤鍙栨按鍙f暟鎹�
+ allWaterPoints: ["鎵�鏈夊彇姘村彛1", "鎵�鏈夊彇姘村彛2", "鎵�鏈夊彇姘村彛3"], // 鎵�鏈夊彇姘村彛鏁版嵁
+ },
+
+ // 鍒囨崲 Tabs
+ switchTab: function (e) {
+ const tab = parseInt(e.currentTarget.dataset.tab);
+ this.setData({
+ currentTab: tab
+ });
+ },
+ onSearch: function() {
+ const query = this.data.searchQuery;
+ if (query) {
+ wx.showToast({
+ title: '鎼滅储: ' + query,
+ icon: 'success'
+ });
+ // 鍦ㄨ繖閲岃繘琛屾悳绱㈡搷浣滐紝鏇存柊 allWaterPoints 鏁版嵁
+ } else {
+ wx.showToast({
+ title: '璇疯緭鍏ユ悳绱㈠唴瀹�',
+ icon: 'none'
+ });
+ }
+ },
+
+ /**
+ * 閫夋嫨铏氭嫙鍗�
+ * @param {} event
+ */
+ choseCard(event){
+ wx.navigateTo({
+ url: '/pages/openCard/openCard',
+ })
+ },
+
+
+ /**
+ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
+ */
+ onLoad(options) {
+
+ },
+
+ /**
+ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍗歌浇
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁�
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜�
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/waterIntake/waterIntake.json b/pages/waterIntake/waterIntake.json
new file mode 100644
index 0000000..2af1a1e
--- /dev/null
+++ b/pages/waterIntake/waterIntake.json
@@ -0,0 +1,11 @@
+{
+ "component": true,
+ "usingComponents": {
+ "t-avatar": "tdesign-miniprogram/avatar/avatar",
+ "t-switch": "tdesign-miniprogram/switch/switch",
+ "t-button": "tdesign-miniprogram/button/button"
+ },
+ "navigationBarTitleText": "鍙栨按鍙�",
+ "navigationBarTextStyle": "white"
+
+}
\ No newline at end of file
diff --git a/pages/waterIntake/waterIntake.wxml b/pages/waterIntake/waterIntake.wxml
new file mode 100644
index 0000000..acb457c
--- /dev/null
+++ b/pages/waterIntake/waterIntake.wxml
@@ -0,0 +1,51 @@
+<!--pages/waterIntake/waterIntake.wxml鍙栨按鍙e垪琛�-->
+<view class="container">
+ <!-- 椤堕儴 Tabs -->
+ <view class="tabs">
+ <view class="tab" bindtap="switchTab" data-tab="0" id="tab0">
+ 甯哥敤鍙栨按鍙�
+ <view class="indicator" wx:if="{{currentTab === 0}}"></view>
+ </view>
+ <view class="tab" bindtap="switchTab" data-tab="1" id="tab1">
+ 鎵�鏈夊彇姘村彛
+ <view class="indicator" wx:if="{{currentTab === 1}}"></view>
+ </view>
+ </view>
+
+ <!-- 甯哥敤鍙栨按鍙� -->
+ <scroll-view class="list-container" wx:if="{{currentTab === 0}}" scroll-y="true" scroll-x="false">
+ <block wx:for="{{commonWaterPoints}}" wx:key="index">
+ <view class="item">
+ <view class="item-left">
+ <!-- <image class="item-img" src="/images/pipeline.svg" /> -->
+ <text>{{item}}</text>
+ <image class="item-img" src="/images/wifi_no.svg" />
+ </view>
+ <text class="item-button" bind:tap="choseCard" data-item="{{item}}">閫夋嫨</text>
+ </view>
+ </block>
+ </scroll-view>
+
+ <!-- 鎵�鏈夊彇姘村彛 -->
+ <view class="all-waterIntake" wx:else>
+ <view class="search-container">
+ <input class="search-input" placeholder="璇疯緭鍏ュ彇姘村彛缂栫爜鍚庣偣鍑绘悳绱�" bindinput="onInput" />
+ <!-- <text class="search-button" >鎼滅储</text> -->
+ <t-button class="search-button" theme="primary" size="large" icon="search" shape="square" aria-label="鎼滅储" bindtap="onSearch" style="background-color: #1890FF; border: none; height: 80rpx;"></t-button>
+ </view>
+ <view>
+ <scroll-view class="list-container" scroll-y="true" scroll-x="false">
+ <block wx:for="{{allWaterPoints}}" wx:key="index">
+ <view class="item">
+ <view class="item-left">
+ <!-- <image class="item-img" src="/images/pipeline.svg" /> -->
+ <text>{{item}}</text>
+ <image class="item-img" src="/images/wifi_no.svg" />
+ </view>
+ <text class="item-button" bind:tap="choseCard" data-item="{{item}}">閫夋嫨</text>
+ </view>
+ </block>
+ </scroll-view>
+ </view>
+ </view>
+</view>
\ No newline at end of file
diff --git a/pages/waterIntake/waterIntake.wxss b/pages/waterIntake/waterIntake.wxss
new file mode 100644
index 0000000..34cfae9
--- /dev/null
+++ b/pages/waterIntake/waterIntake.wxss
@@ -0,0 +1,146 @@
+/* pages/waterIntake/waterIntake.wxss */
+/* index.wxss */
+.container {
+ padding-left: 20rpx;
+ padding-right: 20rpx;
+ padding-top: 5rpx;
+ background-color: #fff;
+ width: 100%;
+ height: 100vh;
+ overflow: hidden;
+ /* 闃叉搴曢儴鍖哄煙婊氬姩 */
+ display: flex;
+ flex-direction: column;
+}
+
+.tabs {
+ display: flex;
+ justify-content: space-around;
+ position: relative;
+ width: 100%;
+ border-bottom: 1px solid #eee;
+ /* Tabs 鍗犳弧鏁翠釜妯悜灞忓箷 */
+}
+
+.tab {
+ font-size: 16px;
+ padding: 10px;
+ cursor: pointer;
+ position: relative;
+ width: 50%;
+ /* Tabs 骞冲垎鏁翠釜妯悜灞忓箷 */
+ text-align: center;
+ /* 鏂囧瓧灞呬腑 */
+}
+
+.indicator {
+ width: 100%;
+ height: 3px;
+ background-color: #1890FF;
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ transform: translateX(0);
+ /* 鍒濆鍖栦綅缃� */
+}
+
+.list {
+ margin-top: 20px;
+}
+
+.item {
+ padding: 10px;
+ border-bottom: 1px solid #eee;
+}
+
+
+.search-container {
+ display: flex;
+ align-items: center;
+ padding: 10rpx;
+ border-bottom: 1px solid #eee;
+}
+
+/* 鎼滅储妗� */
+.search-input {
+ flex: 1;
+ height: 80rpx;
+ padding: 0 20rpx;
+ border: 1px solid #ccc;
+ border-radius: 20rpx;
+ font-size: 30rpx;
+}
+
+/* 鎼滅储鎸夐挳 */
+.search-button {
+ display: flex;
+ margin-left: 10rpx;
+ height: 60rpx;
+
+ background-color: #1890FF;
+ color: white;
+ border: none;
+ border-radius: 20rpx;
+ font-size: 30rpx;
+ text-align: center;
+ align-items: center;
+}
+
+.list-container {
+ display: flex;
+ flex-direction: column;
+ justify-content: flex-start;
+ /* 纭繚鍐呭灞呬笂 */
+ height: 100%;
+}
+
+.all-waterIntake {
+ display: flex;
+ flex-direction: column;
+ justify-content: flex-start;
+ /* 纭繚鍐呭灞呬笂 */
+ height: 100%;
+ width: 100%;
+}
+
+.item {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding: 10px;
+ /* 閫傚綋璋冩暣闂磋窛 */
+}
+
+.item-left {
+ display: flex;
+ align-items: center;
+}
+
+.item-right {
+ display: flex;
+ align-items: center;
+}
+
+.item-img {
+ width: 40rpx;
+ /* 鏍规嵁闇�瑕佽皟鏁村浘鏍囧ぇ灏� */
+ height: 40rpx;
+ /* 鏍规嵁闇�瑕佽皟鏁村浘鏍囧ぇ灏� */
+ margin-left: 20rpx;
+}
+
+.item-button {
+ display: flex;
+ height: 60rpx;
+ padding: 0 60rpx;
+ background-color: #1890FF;
+ color: white;
+ border: none;
+ border-radius: 20rpx;
+ font-size: 30rpx;
+ align-items: center;
+ justify-content: center;
+}
+.item-left text{
+ font-size: 40rpx;
+}
\ No newline at end of file
diff --git a/pages/wxbind/wxbind.js b/pages/wxbind/wxbind.js
new file mode 100644
index 0000000..d0ee79f
--- /dev/null
+++ b/pages/wxbind/wxbind.js
@@ -0,0 +1,102 @@
+// pages/wxbind/wxbind.js
+const app = getApp();
+Page({
+
+ /**
+ * 椤甸潰鐨勫垵濮嬫暟鎹�
+ */
+ data: {
+ mobile: '',
+ code: '',
+ codeSent: false,
+ countdown: 60,
+ isButtonEnabled: false
+ },
+ bindMobileInput(e) {
+ this.setData({
+ mobile: e.detail.value
+ }, this.checkButtonState);
+ },
+
+ bindCodeInput(e) {
+ this.setData({
+ code: e.detail.value
+ }, this.checkButtonState);
+ },
+ checkButtonState() {
+ const {
+ mobile,
+ code
+ } = this.data;
+ const isButtonEnabled = mobile.length === 11 && code.length == 6;
+ this.setData({
+ isButtonEnabled
+ });
+ console.log(isButtonEnabled);
+ },
+ sendCode: function () {
+ if (!this.data.mobile) {
+ wx.showToast({
+ title: '璇疯緭鍏ユ墜鏈哄彿',
+ icon: 'none',
+ duration: 2000,
+ });
+ return;
+ }
+
+ // 鍦ㄨ繖閲屽鐞嗗彂閫侀獙璇佺爜鐨勯�昏緫锛屽彲浠ヨ皟鐢ㄥ悗鍙版帴鍙e疄鐜�
+ // 浠ヤ笅鏄竴涓畝鍗曠殑绀轰緥锛屼粎浣滃弬鑰�
+ wx.showToast({
+ title: '楠岃瘉鐮佸凡鍙戦��',
+ icon: 'success',
+ duration: 2000,
+ });
+
+ this.setData({
+ codeSent: true,
+ });
+
+ // 鍚姩鍊掕鏃�
+ this.startCountdown();
+ },
+ //鍊掕鏃�
+ startCountdown: function () {
+ let that = this;
+ let timer = setInterval(function () {
+ let countdown = that.data.countdown - 1;
+ that.setData({
+ countdown: countdown,
+ });
+
+ if (countdown <= 0) {
+ clearInterval(timer);
+ that.setData({
+ codeSent: false,
+ countdown: 60,
+ });
+ }
+ }, 1000);
+ },
+ bind: function () {
+ if (!this.data.isButtonEnabled) return;
+ wx.showToast({
+ title: '缁戝畾鎴愬姛',
+ icon: 'success'
+ });
+ // 璺宠浆鍒� TabBar 椤甸潰
+ wx.switchTab({
+ url: '/pages/home/home' // 杩欓噷濉啓浣犳兂瑕佽烦杞殑 TabBar 椤甸潰璺緞
+ });
+ },
+ postCode: function () {
+ post('/items', { name: 'New Item' })
+ .then((data) => {
+ this.setData({
+ items: [...this.data.items, data]
+ });
+ })
+ .catch((error) => {
+ console.error('Failed to add item:', error);
+ });
+ }
+})
\ No newline at end of file
diff --git a/pages/wxbind/wxbind.json b/pages/wxbind/wxbind.json
new file mode 100644
index 0000000..48c9a4a
--- /dev/null
+++ b/pages/wxbind/wxbind.json
@@ -0,0 +1,4 @@
+{
+ "navigationBarTitleText": "鍐滄埛缁戝畾",
+ "navigationBarTextStyle": "white"
+}
\ No newline at end of file
diff --git a/pages/wxbind/wxbind.wxml b/pages/wxbind/wxbind.wxml
new file mode 100644
index 0000000..ca09c58
--- /dev/null
+++ b/pages/wxbind/wxbind.wxml
@@ -0,0 +1,14 @@
+<!--pages/wxbind/wxbind.wxml-->
+<view class="base-wrapper">
+ <view class="container">
+ <view class="input-wrapper">
+ <input class="input" placeholder="璇疯緭鍏�11浣嶆墜鏈哄彿" maxlength="11" bindinput="bindMobileInput" />
+ </view>
+ <view class="input-wrapper">
+ <input class="input" type="number" maxlength="6" placeholder="璇疯緭鍏ラ獙璇佺爜" bindinput="bindCodeInput" />
+ <button class="code-button" wx:if="{{!codeSent}}" bindtap="sendCode">鑾峰彇楠岃瘉鐮�</button>
+ <button class="code-button" wx:if="{{codeSent}}" disabled>閲嶆柊鑾峰彇({{countdown}}s)</button>
+ </view>
+ </view>
+ <button class="button {{isButtonEnabled ? 'button-active' : 'button-disabled'}}" bindtap="bind">缁戝畾寰俊</button>
+</view>
\ No newline at end of file
diff --git a/pages/wxbind/wxbind.wxss b/pages/wxbind/wxbind.wxss
new file mode 100644
index 0000000..1485222
--- /dev/null
+++ b/pages/wxbind/wxbind.wxss
@@ -0,0 +1,133 @@
+/* pages/wxbind/wxbind.wxss */
+.base-wrapper {
+ background-color: #f5f5f5;
+ width: 100%;
+ height: 100vh;
+ overflow: hidden;
+ /* 闃叉搴曢儴鍖哄煙婊氬姩 */
+ display: flex;
+ flex-direction: column;
+}
+
+.container {
+ margin-top: 80rpx;
+ margin-right: 30rpx;
+ margin-left: 30rpx;
+ margin-bottom: 10rpx;
+ height: 30vh;
+ background-color: #fff;
+ border-radius: 5px;
+ display: flex;
+ padding-top: 20rpx;
+ padding-bottom: 20rpx;
+ justify-content: space-around;
+ align-items: flex-start;
+ padding-left: 30rpx;
+ z-index: 1;
+}
+
+.button {
+ margin-top: 170rpx;
+ height: 90rpx;
+ display: flex;
+ margin-left: 40rpx;
+ margin-right: 40rpx;
+ justify-content: center;
+ /* 姘村钩灞呬腑 */
+ align-items: center;
+ /* 鍨傜洿灞呬腑 */
+
+ color: #fff;
+}
+
+.button-active {
+ background-color: #2D8BF7;
+
+
+}
+
+.button-disabled {
+ background-color: #ccc;
+}
+
+/* pages/login/login.wxss */
+
+
+
+.login-container {
+ display: flex;
+ flex-direction: column;
+ justify-content: flex-end;
+ height: 80vh;
+ width: 100%;
+}
+
+
+image {
+ position: fixed;
+ left: 0;
+ bottom: 0;
+ display: block;
+ width: 100%;
+ height: 100%;
+ z-index: -999;
+}
+
+.input {
+ flex: 1;
+ height: 30rpx;
+ padding: 10rpx;
+ border: 1px solid #ccc;
+ border-radius: 5px;
+ background-color: #fff;
+ font-size: 35rpx;
+ padding-left: 15rpx;
+ width: 100%;
+}
+
+
+.input-wrapper {
+ display: flex;
+ /* 浣跨敤 Flex 甯冨眬浣� text 鍜� input 鍦ㄥ悓涓�琛� */
+ align-items: center;
+ justify-content: center;
+ width: 95%;
+ height: 20%;
+}
+
+.input-label {
+ flex: 1;
+ /* 璁╁�煎崰鎹墿浣欑┖闂� */
+ align-items: left;
+ width: 150rpx;
+ margin-right: 10rpx;
+ font-size: 31rpx;
+ color: #fff;
+ font-weight: bold;
+ text-align: justify;
+ text-align-last: justify;
+}
+
+.label-container {
+ width: 140rpx;
+ display: flex;
+ align-items: center;
+}
+
+.login-button {
+ margin-top: 50rpx;
+ margin-left: 40rpx;
+ margin-right: 40rpx;
+ height: 90rpx;
+ justify-content: center;
+ /* 姘村钩灞呬腑 */
+ align-items: center;
+ /* 鍨傜洿灞呬腑 */
+ display: flex;
+}
+
+.code-button {
+ width: 38%;
+ font-size: 28rpx;
+ margin-left: 15rpx;
+}
\ No newline at end of file
diff --git a/pages/wxlogin/wxlogin.js b/pages/wxlogin/wxlogin.js
new file mode 100644
index 0000000..2669ff4
--- /dev/null
+++ b/pages/wxlogin/wxlogin.js
@@ -0,0 +1,26 @@
+// pages/wxlogin/wxlogin.js
+Page({
+ data: {
+ userInfo: null
+ },
+
+ /**
+ * 鑾峰彇寰俊code
+ */
+ getCode: function (e) {
+ wx.login({
+ success: function (res) {
+ if (res.code) {
+ var code = res.code;
+ console.log(code);
+ wx.navigateTo({
+ url: '/pages/wxbind/wxbind'
+ })
+ // 灏哻ode鍙戦�佸埌鏈嶅姟鍣ㄨ幏鍙杘penid
+ } else {
+ console.log('鐧诲綍澶辫触锛�' + res.errMsg);
+ }
+ }
+ });
+ }
+})
\ No newline at end of file
diff --git a/pages/wxlogin/wxlogin.json b/pages/wxlogin/wxlogin.json
new file mode 100644
index 0000000..8835af0
--- /dev/null
+++ b/pages/wxlogin/wxlogin.json
@@ -0,0 +1,3 @@
+{
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/wxlogin/wxlogin.wxml b/pages/wxlogin/wxlogin.wxml
new file mode 100644
index 0000000..d7a5b7b
--- /dev/null
+++ b/pages/wxlogin/wxlogin.wxml
@@ -0,0 +1,7 @@
+<view class="container">
+ <view>
+ <image src="/images/login_bg.jpeg"></image>
+ </view>
+ <view class="title">澶х鑺傛按绠$亴绯荤粺</view>
+ <button class="login-btn" bindtap="getCode">寰俊鐧诲綍</button>
+</view>
\ No newline at end of file
diff --git a/pages/wxlogin/wxlogin.wxss b/pages/wxlogin/wxlogin.wxss
new file mode 100644
index 0000000..20a9656
--- /dev/null
+++ b/pages/wxlogin/wxlogin.wxss
@@ -0,0 +1,59 @@
+
+
+image {
+ position: fixed;
+ left: 0;
+ bottom: 0;
+ display: block;
+ width: 100%;
+ height: 100%;
+ z-index: -999;
+}
+.container {
+ display: flex;
+ flex-direction: column;
+ justify-content: flex-end;
+ height: 80vh;
+ width: 100%;
+}
+
+.title {
+ font-size: 24px;
+ margin-bottom: 300rpx;
+ color: #1890FF;
+}
+
+.login-btn {
+ width: 200px;
+ height: 40px;
+ line-height: 40px;
+ text-align: center;
+ background-color: #4CAF50;
+ color: white;
+ border-radius: 20px;
+}
+
+.user-info {
+ margin-top: 20px;
+ display: flex;
+ align-items: center;
+}
+
+.avatar {
+ width: 50px;
+ height: 50px;
+ border-radius: 50%;
+ margin-right: 10px;
+}
+
+.nickName {
+ font-size: 16px;
+}
+
+
+.login-btn-clicked {
+ background-color: #45a049; /* 鐐瑰嚮鏃剁殑鑳屾櫙鑹� */
+}
+.login-btn:hover {
+ background-color: #45a049; /* 榧犳爣鎮仠鏃剁殑鑳屾櫙鑹� */
+}
\ No newline at end of file
diff --git a/project.config.json b/project.config.json
index 7a61a12..afe1a45 100644
--- a/project.config.json
+++ b/project.config.json
@@ -24,5 +24,5 @@
"tabIndent": "auto",
"tabSize": 2
},
- "appid": "wx022cdcb93e578771"
+ "appid": "wxbc2b6a00dd904ead"
}
\ No newline at end of file
diff --git a/utils/storage.js b/utils/storage.js
new file mode 100644
index 0000000..3ca562d
--- /dev/null
+++ b/utils/storage.js
@@ -0,0 +1,61 @@
+const setItem = (key, data) => {
+ return new Promise((resolve, reject) => {
+ wx.setStorage({
+ key: key,
+ data: data,
+ success: resolve,
+ fail: reject
+ });
+ });
+};
+
+const getItem = (key) => {
+ return new Promise((resolve, reject) => {
+ wx.getStorage({
+ key: key,
+ success: (res) => resolve(res.data),
+ fail: reject
+ });
+ });
+};
+
+const removeItem = (key) => {
+ return new Promise((resolve, reject) => {
+ wx.removeStorage({
+ key: key,
+ success: resolve,
+ fail: reject
+ });
+ });
+};
+
+const clear = () => {
+ return new Promise((resolve, reject) => {
+ wx.clearStorage({
+ success: resolve,
+ fail: reject
+ });
+ });
+};
+
+/**
+ * 鍒ゆ柇鏈湴鏄惁淇濆瓨浜嗘煇涓猭ey
+ * @param {} key
+ */
+const isHasKeySync= (key) => {
+ try {
+ const res = wx.getStorageInfoSync();
+ return res.keys.includes(key);
+ } catch (e) {
+ console.error('Failed to get storage info:', e);
+ return false;
+ }
+};
+
+module.exports = {
+ setItem,
+ getItem,
+ removeItem,
+ clear,
+ isHasKeySync
+};
--
Gitblit v1.8.0