个人页跳转到订单页

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

View File

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