个人页跳转到订单页

This commit is contained in:
jqtmviyu@gmail.com 2021-03-07 05:39:47 +08:00
parent ea64e9bf44
commit d942a6397b
2 changed files with 14 additions and 7 deletions

View File

@ -34,14 +34,14 @@
:col="4"
:border="false"
>
<u-grid-item>
<u-grid-item @click="goToOrderHandle(2,1)">
<u-icon
name="file-text"
:size="46"
></u-icon>
<view class="grid-text">待付款</view>
</u-grid-item>
<u-grid-item>
<u-grid-item @click="goToOrderHandle(3,2)">
<u-icon
name="car"
:size="46"
@ -55,7 +55,7 @@
></u-icon>
<view class="grid-text">退货/退款</view>
</u-grid-item>
<u-grid-item>
<u-grid-item @click="goToOrderHandle(1,0)">
<u-icon
name="order"
:size="46"
@ -121,10 +121,15 @@ export default {
this.userInfo = userInfo
uni.setStorageSync("userInfo",userInfo)
},
//
phoneCall(){
uni.makePhoneCall({
phoneNumber: '114'
})
},
//
goToOrderHandle(type, current){
uni.navigateTo({url: `/pages/order/order?current=${current}&type=${type}`})
}
},
}

View File

@ -4,7 +4,7 @@
<u-tabs
:list="tabs"
:is-scroll="false"
:current="tabsCurrent"
:current="current"
inactive-color="#666"
active-color="#eb4450"
@change="onTapsChange"
@ -49,7 +49,7 @@ export default {
name: "待发货", type: 3
},
],
tabsCurrent: 0,
current: 0,
orders: [],
type: 1
}
@ -57,7 +57,7 @@ export default {
methods: {
//
onTapsChange(index){
this.tabsCurrent = index
this.current = index
this.type = this.tabs[index].type
this.getOrderList()
},
@ -68,7 +68,9 @@ export default {
}
},
onLoad() {
onLoad({current, type}) {
this.current = current || 0
this.type = type || 1
this.getOrderList()
}