Files
2024-09-27 02:06:13 +08:00

92 lines
2.1 KiB
Vue
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<view>
<!-- 订单 -->
<view class="top flood">
<img
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAfCAYAAAAFkva3AAAA9ElEQVRIS63UIW5CQRSF4f8YXFeAKHtgBU3qWlPRlWBqcDgSdoCoq6G+qhXV3Q6quWQIkCG8ee/emTd+vsxJ5hzRcMzsHvgA7oBX1Von6AeYnYx1FdYB7YGHMFaAXiR9hTAzS5G+s2jpRUcoRXVjQ5Ab80AuzAsNYhGoF4tCRawG6sRqoRusBbrCWqELNgZ0xMxsCvxmFfkHns4ViaxKwibAZwKyiytJywiUxxwFvBR9jBderUYreDNBLWDnntWCxXGsAXuXNgoOznYEHMTSZ/SCLiwDd8BzqSluzAOGsB5wIWkTxgrgn6R5FZaBW+AReJP0fgD6yKcB+KwshwAAAABJRU5ErkJggg=="
@click="back" />
<p>我的订单</p>
</view>
<p class="flag"></p>
<!-- tab栏切换 -->
<view>
<view class="end-title">
  <view
@tap="change(j)"
v-for="(i, j) in navList"
:key="j"
:class="{ btna: btnnum == j }"
>{{ i.text }}</view
>
 
</view>
<view
class="end-cont"
:class="{ dis: btnnum == j }"
v-for="(i, j) in navList"
:key="j"
>{{ i.state }}</view
>
</view>
</view>
</template>
<script>
export default {
data() {
return {
btnnum: 0,
//保存的是上一个页面带来的索引
index: [],
navList: [
{
state: "全部",
text: "全部",
orderList: [],
},
{
state: "待付款",
text: "待付款",
orderList: [],
},
{
state: "待发货",
text: "待发货",
orderList: [],
},
{
state: "待收获",
text: "待收获",
orderList: [],
},
{
state: "已完成",
text: "已完成",
orderList: [],
},
],
};
},
onLoad(el) {
this.index = el.index;
},
created() {
console.log("上一页传来的下标", this.index);
this.btnnum = this.index;
},
methods: {
change(e) {
this.btnnum = e;
console.log(this.btnnum);
},
back() {
uni.navigateBack();
},
},
};
</script>
<style lang='less' scoped>
@import "../../common/less/page/meinfo.less";
</style>