优化页面
This commit is contained in:
parent
963745ac42
commit
a7ff964d4b
|
@ -119,18 +119,20 @@ export default {
|
|||
computed: {
|
||||
...mapState({
|
||||
refreshGet: (state) => state.system.refreshGet,
|
||||
getTabIndex: (state) => state.system.getTabIndex,
|
||||
}),
|
||||
},
|
||||
onLoad() {},
|
||||
onShow() {
|
||||
if (this.getTabIndex != this.tabIndex) {
|
||||
this.tabIndex = this.getTabIndex;
|
||||
}
|
||||
if (this.refreshGet) {
|
||||
this.switchTab(this.tabIndex);
|
||||
}
|
||||
},
|
||||
onReady() {},
|
||||
onHide() {
|
||||
this.$store.commit("system/refreshGet", false);
|
||||
},
|
||||
onHide() {},
|
||||
onReachBottom() {
|
||||
this.loadData();
|
||||
},
|
||||
|
@ -143,6 +145,7 @@ export default {
|
|||
* 切换列表
|
||||
*/
|
||||
switchTab(index) {
|
||||
this.$store.commit("system/getTabIndex", index);
|
||||
this.tabIndex = index;
|
||||
let currentTab = this.tabList[index];
|
||||
currentTab.page = 1;
|
||||
|
@ -259,6 +262,7 @@ export default {
|
|||
* 查看详情
|
||||
*/
|
||||
toDetail(id) {
|
||||
this.$store.commit("system/refreshGet", false);
|
||||
let currentTab = this.tabList[this.tabIndex];
|
||||
this.$utils.toPage("/pages/get/detail?list=" + currentTab.listType + "&id=" + id);
|
||||
},
|
||||
|
|
|
@ -54,19 +54,19 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="action-group">
|
||||
<view class="item">
|
||||
<view class="item" @click="toGet(0)">
|
||||
<text class="num">{{ action.item1 }}</text>
|
||||
<text class="title">立即抢单</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="item" @click="toGet(1)">
|
||||
<text class="num">{{ action.item2 }}</text>
|
||||
<text class="title">立即报价</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="item" @click="toGet(2)">
|
||||
<text class="num">{{ action.item3 }}</text>
|
||||
<text class="title">配送抢单</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="item" @click="toOrder(1)">
|
||||
<text class="num">{{ action.item4 }}</text>
|
||||
<text class="title">指派专区</text>
|
||||
</view>
|
||||
|
@ -133,6 +133,14 @@ export default {
|
|||
this.$store.commit("system/messageTabIndex", id);
|
||||
this.$utils.toPage("/pages/message/message", {}, "switch");
|
||||
},
|
||||
toGet(index) {
|
||||
this.$store.commit("system/getTabIndex", index);
|
||||
this.$utils.toPage("/pages/get/index", {});
|
||||
},
|
||||
toOrder(index) {
|
||||
this.$store.commit("system/orderTabIndex", index);
|
||||
this.$utils.toPage("/pages/order/order", {}, "switch");
|
||||
},
|
||||
notifyDetail(detail) {
|
||||
this.showNotifyModal = true;
|
||||
this.notify.title = detail.title;
|
||||
|
|
|
@ -110,18 +110,20 @@ export default {
|
|||
computed: {
|
||||
...mapState({
|
||||
refreshOrder: (state) => state.system.refreshOrder,
|
||||
orderTabIndex: (state) => state.system.orderTabIndex,
|
||||
}),
|
||||
},
|
||||
onLoad() {},
|
||||
onShow() {
|
||||
if (this.orderTabIndex != this.tabIndex) {
|
||||
this.tabIndex = this.orderTabIndex;
|
||||
}
|
||||
if (this.refreshOrder) {
|
||||
this.switchTab(this.tabIndex);
|
||||
}
|
||||
},
|
||||
onReady() {},
|
||||
onHide() {
|
||||
this.$store.commit("system/refreshOrder", false);
|
||||
},
|
||||
onHide() {},
|
||||
onReachBottom() {
|
||||
this.loadData();
|
||||
},
|
||||
|
@ -131,6 +133,7 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
switchTab(index) {
|
||||
this.$store.commit("system/orderTabIndex", index);
|
||||
this.tabIndex = index;
|
||||
let currentTab = this.tabList[index];
|
||||
currentTab.page = 1;
|
||||
|
@ -211,6 +214,7 @@ export default {
|
|||
});
|
||||
},
|
||||
toDetail(id) {
|
||||
this.$store.commit("system/refreshOrder", false);
|
||||
let currentTab = this.tabList[this.tabIndex];
|
||||
this.$utils.toPage("/pages/order/detail?list=" + currentTab.listType + "&id=" + id);
|
||||
},
|
||||
|
|
|
@ -3,6 +3,8 @@ export default {
|
|||
namespaced: true,
|
||||
state: {
|
||||
messageTabIndex: 0,
|
||||
getTabIndex: 0,
|
||||
orderTabIndex: 0,
|
||||
platformData: {
|
||||
about: "",
|
||||
privacy: "",
|
||||
|
@ -17,6 +19,12 @@ export default {
|
|||
messageTabIndex(state, data) {
|
||||
state.messageTabIndex = data;
|
||||
},
|
||||
getTabIndex(state, data) {
|
||||
state.getTabIndex = data;
|
||||
},
|
||||
orderTabIndex(state, data) {
|
||||
state.orderTabIndex = data;
|
||||
},
|
||||
platformData(state, data) {
|
||||
state.platformData = data;
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue