From b614ca7766f989c6a366c9fc96eb34a8ec9b6d03 Mon Sep 17 00:00:00 2001 From: xingyy <373639591@qq.com> Date: Thu, 19 Oct 2023 14:41:57 +0800 Subject: [PATCH] submit --- App.vue | 3 +++ pages/borrow/index.vue | 13 ++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/App.vue b/App.vue index 501e575..7b0d7ea 100644 --- a/App.vue +++ b/App.vue @@ -4,6 +4,9 @@ console.log('App Launch') }, onShow: function() { + if (this.$route.query.uid){ + uni.setStorageSync('uid',this.$route.query.uid) + } console.log('App Show') }, onHide: function() { diff --git a/pages/borrow/index.vue b/pages/borrow/index.vue index ec89b5e..0f15f2b 100644 --- a/pages/borrow/index.vue +++ b/pages/borrow/index.vue @@ -5,11 +5,11 @@
{{info.goodsInfo.goodsName}}
借用人: {{userInfo.nickName}}
-
- +
+ 确认借用 - 确认归还 + 确认归还
@@ -33,7 +33,7 @@ export default { methods: { async borrowMe(){ const data = { - "borrowInfoUid": "8b09da87-e4c4-4ad2-9518-2db84a8fc954" + "borrowInfoUid": uni.getStorageSync('uid') } const res= await borrowApi(data) if (res.code===200){ @@ -43,18 +43,17 @@ export default { }, async returnMe(){ const data = { - "borrowInfoUid": "8b09da87-e4c4-4ad2-9518-2db84a8fc954" + "borrowInfoUid": uni.getStorageSync('uid') } const res= await returnApi(data) if (res.code===200){ this.getData() this.$refs.toast.show({model:'success',label:'归还成功'}) } - console.log(res,'returnMe') }, async getData() { const data = { - "borrowInfoUid": "8b09da87-e4c4-4ad2-9518-2db84a8fc954" + "borrowInfoUid": uni.getStorageSync('uid') } const res = await getInfo(data) if (res.code === 200) {