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) {