个人页跳转到订单页
This commit is contained in:
		
							parent
							
								
									ea64e9bf44
								
							
						
					
					
						commit
						d942a6397b
					
				@ -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}`})
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -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()
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user