From c4e304ae1ce9c0d8310c0a47d83b8e0eb06912f1 Mon Sep 17 00:00:00 2001
From: Chadwuo <41413559+Chadwuo@users.noreply.github.com>
Date: Tue, 7 Mar 2023 09:26:59 +0800
Subject: [PATCH 1/6] Update README.md
---
README.md | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/README.md b/README.md
index dba63ca8..06d0609f 100644
--- a/README.md
+++ b/README.md
@@ -56,9 +56,18 @@ li-ji-weapp
```
### 作者
-
-- [Chadwuo](https://github.com/chadwuo)
-
+
### 更新日志
@@ -66,7 +75,7 @@ li-ji-weapp
### 版权说明
-该项目签署了GPL-3.0授权许可,详情请参阅 [LICENSE.txt](https://github.com/chadwuo/li-ji-weapp/blob/master/LICENSE)
+该项目签署了GPL-3.0授权许可,详情请参阅 [LICENSE.txt](https://github.com/chadwuo/li-ji-weapp/blob/master/LICENSE),请自由地享受和参与开源。
### 鸣谢
From c0953f42cd466634d9fe98d6820d88c47eff2554 Mon Sep 17 00:00:00 2001
From: Chadwuo
Date: Sat, 18 Mar 2023 10:05:44 +0800
Subject: [PATCH 2/6] =?UTF-8?q?=F0=9F=8C=88=20style:=20=E7=BB=9F=E4=B8=80?=
=?UTF-8?q?=E6=8C=89=E9=92=AE=E6=A0=B7=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
miniprogram/pages/book/edit/index.wxml | 2 +-
miniprogram/pages/friend/edit/index.wxml | 2 +-
miniprogram/pages/giftOut/edit/index.wxml | 2 +-
miniprogram/pages/giftReceive/edit/index.wxml | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/miniprogram/pages/book/edit/index.wxml b/miniprogram/pages/book/edit/index.wxml
index aa1e08ed..8b0e0a74 100644
--- a/miniprogram/pages/book/edit/index.wxml
+++ b/miniprogram/pages/book/edit/index.wxml
@@ -27,7 +27,7 @@
-
+
diff --git a/miniprogram/pages/friend/edit/index.wxml b/miniprogram/pages/friend/edit/index.wxml
index 0fd1a0a4..db443c10 100644
--- a/miniprogram/pages/friend/edit/index.wxml
+++ b/miniprogram/pages/friend/edit/index.wxml
@@ -26,7 +26,7 @@
-
+
diff --git a/miniprogram/pages/giftOut/edit/index.wxml b/miniprogram/pages/giftOut/edit/index.wxml
index cd53f05f..d2996869 100644
--- a/miniprogram/pages/giftOut/edit/index.wxml
+++ b/miniprogram/pages/giftOut/edit/index.wxml
@@ -42,7 +42,7 @@
-
+
diff --git a/miniprogram/pages/giftReceive/edit/index.wxml b/miniprogram/pages/giftReceive/edit/index.wxml
index 2b4b6bfd..bd197a62 100644
--- a/miniprogram/pages/giftReceive/edit/index.wxml
+++ b/miniprogram/pages/giftReceive/edit/index.wxml
@@ -28,7 +28,7 @@
-
+
From d6ebf774ff8a085fd267953e31d739e3867515c5 Mon Sep 17 00:00:00 2001
From: Chadwuo
Date: Sat, 18 Mar 2023 10:06:33 +0800
Subject: [PATCH 3/6] =?UTF-8?q?=F0=9F=90=9E=20fix:=20=E7=94=A8=E6=88=B7?=
=?UTF-8?q?=E4=BF=A1=E6=81=AF=E5=A1=AB=E5=86=99=E5=AD=98=E5=9C=A8=E7=9A=84?=
=?UTF-8?q?bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
miniprogram/pages/mine/index.js | 120 ++++++++++++++++++------------
miniprogram/pages/mine/index.wxml | 15 ++--
2 files changed, 82 insertions(+), 53 deletions(-)
diff --git a/miniprogram/pages/mine/index.js b/miniprogram/pages/mine/index.js
index a1e8b843..933a297e 100644
--- a/miniprogram/pages/mine/index.js
+++ b/miniprogram/pages/mine/index.js
@@ -16,36 +16,39 @@ Page({
jinrishici: '',
avatarUrl: '',
nickName: '',
- showProfile: false,
+ avatarUrl_edit: '',
+ nickName_edit: '',
+ popupVisible: false,
+ confirmLoading: false,
welcome: welcome(),
totalGift: {
receiveTotal: '',
outTotal: ''
},
menus: [{
- icon: "cicon-home-community",
- name: "我的家庭",
- color: "text-mauve",
- path: "/pages/family/index"
- },
- {
- icon: "cicon-event-list",
- name: "数据导出",
- color: "text-orange",
- path: "/pages/backup/index"
- },
- {
- icon: "cicon-demo",
- name: "统计分析",
- color: "text-red",
- path: "/pages/analysis/index"
- },
- {
- icon: "cicon-person-pin-circle-o",
- name: "亲友关系",
- color: "text-green",
- path: "/pages/relationship/index"
- }
+ icon: "cicon-home-community",
+ name: "我的家庭",
+ color: "text-mauve",
+ path: "/pages/family/index"
+ },
+ {
+ icon: "cicon-event-list",
+ name: "数据导出",
+ color: "text-orange",
+ path: "/pages/backup/index"
+ },
+ {
+ icon: "cicon-demo",
+ name: "统计分析",
+ color: "text-red",
+ path: "/pages/analysis/index"
+ },
+ {
+ icon: "cicon-person-pin-circle-o",
+ name: "亲友关系",
+ color: "text-green",
+ path: "/pages/relationship/index"
+ }
],
},
// 监听用户滑动页面事件。
@@ -86,39 +89,62 @@ Page({
};
console.log(avatarUrl)
app.mpserverless.file.uploadFile(options).then(res => {
- console.log(res);
this.setData({
- avatarUrl: res.fileUrl
+ avataavatarUrl_editrUrl: res.fileUrl
})
});
},
- onShowProfile() {
+ onShowPopup() {
this.setData({
- showProfile: true
+ popupVisible: true,
+ avatarUrl_edit: app.userInfo.avatarUrl,
+ nickName_edit: app.userInfo.nickName,
})
},
- onCloseProfile() {
+ onClosePopup() {
this.setData({
- showProfile: false
+ popupVisible: false
})
},
// 保存个人信息
async onSaveProfile() {
+ this.setData({
+ confirmLoading: true
+ })
+
+ const avatarUrl = this.data.avatarUrl_edit
+ const nickName = this.data.nickName_edit
+
const res = await userService.updateUserInfo({
_id: app.userInfo._id,
- nickName: this.data.nickName,
- avatarUrl: this.data.avatarUrl,
- })
- if (res.success) {
- wx.showToast({
- title: '更新成功',
- })
- app.userInfo.nickName = this.data.nickName
- app.userInfo.avatarUrl = this.data.avatarUrl
- }
- this.setData({
- showProfile: false
+ nickName: nickName,
+ avatarUrl: avatarUrl,
})
+
+ setTimeout(() => {
+ if (res.success) {
+ wx.showToast({
+ title: '更新成功',
+ })
+
+ this.setData({
+ avatarUrl: avatarUrl,
+ nickName: nickName,
+ popupVisible: false,
+ confirmLoading: false
+ })
+ app.userInfo.nickName = nickName
+ app.userInfo.avatarUrl = avatarUrl
+ } else {
+ wx.showToast({
+ title: res.message,
+ icon: "none"
+ })
+ this.setData({
+ confirmLoading: false
+ })
+ }
+ }, 600);
},
async getGiftTotal() {
const {
@@ -137,7 +163,7 @@ Page({
/**
* 生命周期函数--监听页面初次渲染完成
*/
- onReady: function () { },
+ onReady: function () {},
/**
* 生命周期函数--监听页面显示
@@ -153,22 +179,22 @@ Page({
/**
* 生命周期函数--监听页面隐藏
*/
- onHide: function () { },
+ onHide: function () {},
/**
* 生命周期函数--监听页面卸载
*/
- onUnload: function () { },
+ onUnload: function () {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
- onPullDownRefresh: function () { },
+ onPullDownRefresh: function () {},
/**
* 页面上拉触底事件的处理函数
*/
- onReachBottom: function () { },
+ onReachBottom: function () {},
/**
* 用户点击右上角分享
diff --git a/miniprogram/pages/mine/index.wxml b/miniprogram/pages/mine/index.wxml
index 5de97d96..b4f48a6b 100644
--- a/miniprogram/pages/mine/index.wxml
+++ b/miniprogram/pages/mine/index.wxml
@@ -3,7 +3,7 @@
我的
-
+
@@ -54,20 +54,23 @@
-
+
完善用户信息体验更多功能
-
+
-
+
-
-
+
+
\ No newline at end of file
From 8210921e04aec1f5cee0d706ac6e2a2f9454f478 Mon Sep 17 00:00:00 2001
From: Chadwuo
Date: Sat, 18 Mar 2023 10:08:44 +0800
Subject: [PATCH 4/6] =?UTF-8?q?=F0=9F=90=8E=20ci:=20config=20updae?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
project.config.json | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/project.config.json b/project.config.json
index 6cd5df09..21491114 100644
--- a/project.config.json
+++ b/project.config.json
@@ -24,7 +24,8 @@
"useCompilerPlugins": [
"sass"
],
- "ignoreUploadUnusedFiles": true
+ "ignoreUploadUnusedFiles": true,
+ "condition": false
},
"condition": {},
"editorSetting": {
From 8a48287a614c648394e66cef602a7a2916add1f3 Mon Sep 17 00:00:00 2001
From: Chadwuo
Date: Sat, 18 Mar 2023 10:16:10 +0800
Subject: [PATCH 5/6] Delete .gitignore
---
miniprogram/alicloud/.gitignore | 1 -
1 file changed, 1 deletion(-)
delete mode 100644 miniprogram/alicloud/.gitignore
diff --git a/miniprogram/alicloud/.gitignore b/miniprogram/alicloud/.gitignore
deleted file mode 100644
index 652bb1b1..00000000
--- a/miniprogram/alicloud/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/index.js
From 07e8485131471306cc05803b9fb72f0bda7add6e Mon Sep 17 00:00:00 2001
From: Chadwuo
Date: Sat, 18 Mar 2023 10:29:36 +0800
Subject: [PATCH 6/6] =?UTF-8?q?=F0=9F=93=83=20docs:=20=E6=9B=B4=E6=94=B9?=
=?UTF-8?q?=E6=96=87=E6=A1=88?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 2 +-
miniprogram/pages/about/index.wxml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 06d0609f..cd8d692d 100644
--- a/README.md
+++ b/README.md
@@ -15,7 +15,7 @@
礼尚往来,是中华民族的传统美德,老一辈人一般会在举行宴席的时候用手写人情簿的方式来记录每一个亲友的送礼,然后在对方有宴席邀请的时候翻阅人情簿,计算出送礼金额。这种方式存在很多弊端,比如人情簿丢失、无法携带在身边、很难搜索到某个人的送礼记录、由于手写原因无法辨认清楚内容等等。
- 「礼记」是一个基于微信小程序的在线人情帐簿,随身携带、快速查找人情、统计汇总礼金、亲友往来明细、家庭共享记账。让生活没有"难"还的人情。
+ 「礼记」是一款微信小程序,方便随时随地查看和记录亲友的礼金情况。随身携带、快速查找人情、统计汇总礼金、亲友往来明细、家庭共享记账、安全可靠。
---
diff --git a/miniprogram/pages/about/index.wxml b/miniprogram/pages/about/index.wxml
index 7ef83def..e1e21dab 100644
--- a/miniprogram/pages/about/index.wxml
+++ b/miniprogram/pages/about/index.wxml
@@ -13,7 +13,7 @@
- 「礼记」是一个基于微信小程序的在线人情帐簿,随身携带、快速查找人情、统计汇总礼金、亲友往来明细、家庭共享记账。
+ 「礼记」是一款微信小程序,方便随时随地查看和记录亲友的礼金情况。随身携带、快速查找人情、统计汇总礼金、亲友往来明细、家庭共享记账、安全可靠。