submit
This commit is contained in:
parent
0672f5886f
commit
b614ca7766
3
App.vue
3
App.vue
@ -4,6 +4,9 @@
|
|||||||
console.log('App Launch')
|
console.log('App Launch')
|
||||||
},
|
},
|
||||||
onShow: function() {
|
onShow: function() {
|
||||||
|
if (this.$route.query.uid){
|
||||||
|
uni.setStorageSync('uid',this.$route.query.uid)
|
||||||
|
}
|
||||||
console.log('App Show')
|
console.log('App Show')
|
||||||
},
|
},
|
||||||
onHide: function() {
|
onHide: function() {
|
||||||
|
@ -5,11 +5,11 @@
|
|||||||
<tm-images style="margin-top: 90rpx" :width="300" :src="info.goodsInfo.picUrl"></tm-images>
|
<tm-images style="margin-top: 90rpx" :width="300" :src="info.goodsInfo.picUrl"></tm-images>
|
||||||
<div style="display: flex;justify-content: center;align-items: center;margin-top: 90rpx">{{info.goodsInfo.goodsName}}</div>
|
<div style="display: flex;justify-content: center;align-items: center;margin-top: 90rpx">{{info.goodsInfo.goodsName}}</div>
|
||||||
<div style="display: flex;justify-content: center;align-items: center;margin-top: 90rpx">借用人: {{userInfo.nickName}}</div>
|
<div style="display: flex;justify-content: center;align-items: center;margin-top: 90rpx">借用人: {{userInfo.nickName}}</div>
|
||||||
<div style="margin-top: 400rpx;display: flex;flex-direction: column;align-items: center">
|
<div style="margin-top: 200rpx;display: flex;flex-direction: column;align-items: center">
|
||||||
<tm-button @click="borrowMe" v-if="info.goodsInfo.currentPosition!==info.userName" style="margin-bottom: 100rpx" theme="bg-gradient-red-accent" :round="24" size="g">
|
<tm-button @click="borrowMe" v-if="info.goodsInfo.currentPosition!==info.userName" style="margin-bottom: 100rpx" :round="24" size="g">
|
||||||
确认借用
|
确认借用
|
||||||
</tm-button>
|
</tm-button>
|
||||||
<tm-button v-if="info.goodsInfo.status===1" @click="returnMe" theme="bg-gradient-red-accent" :round="24" size="g">确认归还</tm-button>
|
<tm-button v-if="info.goodsInfo.status===1" @click="returnMe" :round="24" size="g">确认归还</tm-button>
|
||||||
</div>
|
</div>
|
||||||
</tm-sheet>
|
</tm-sheet>
|
||||||
</div>
|
</div>
|
||||||
@ -33,7 +33,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
async borrowMe(){
|
async borrowMe(){
|
||||||
const data = {
|
const data = {
|
||||||
"borrowInfoUid": "8b09da87-e4c4-4ad2-9518-2db84a8fc954"
|
"borrowInfoUid": uni.getStorageSync('uid')
|
||||||
}
|
}
|
||||||
const res= await borrowApi(data)
|
const res= await borrowApi(data)
|
||||||
if (res.code===200){
|
if (res.code===200){
|
||||||
@ -43,18 +43,17 @@ export default {
|
|||||||
},
|
},
|
||||||
async returnMe(){
|
async returnMe(){
|
||||||
const data = {
|
const data = {
|
||||||
"borrowInfoUid": "8b09da87-e4c4-4ad2-9518-2db84a8fc954"
|
"borrowInfoUid": uni.getStorageSync('uid')
|
||||||
}
|
}
|
||||||
const res= await returnApi(data)
|
const res= await returnApi(data)
|
||||||
if (res.code===200){
|
if (res.code===200){
|
||||||
this.getData()
|
this.getData()
|
||||||
this.$refs.toast.show({model:'success',label:'归还成功'})
|
this.$refs.toast.show({model:'success',label:'归还成功'})
|
||||||
}
|
}
|
||||||
console.log(res,'returnMe')
|
|
||||||
},
|
},
|
||||||
async getData() {
|
async getData() {
|
||||||
const data = {
|
const data = {
|
||||||
"borrowInfoUid": "8b09da87-e4c4-4ad2-9518-2db84a8fc954"
|
"borrowInfoUid": uni.getStorageSync('uid')
|
||||||
}
|
}
|
||||||
const res = await getInfo(data)
|
const res = await getInfo(data)
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
|
Loading…
Reference in New Issue
Block a user