首页物流分页
This commit is contained in:
parent
ea3f8f8a84
commit
c311f865cc
@ -58,8 +58,8 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<block v-if="ApproveList.length > 0">
|
<block v-if="ApproveList.length > 0">
|
||||||
<view class="backlog_item flex_a_c_j_sb" v-for="(item, index) in ApproveList.slice(0, 2)" :key="index"
|
<view class="backlog_item flex_a_c_j_sb" v-for="(item, index) in ApproveList.slice(0, 2)"
|
||||||
@click="clickNotice(item.id)">
|
:key="index" @click="clickNotice(item.id)">
|
||||||
<view class="text">
|
<view class="text">
|
||||||
<text class="text_time">{{
|
<text class="text_time">{{
|
||||||
item.create_time.substring(0, 10).replace(/-/g, ".")
|
item.create_time.substring(0, 10).replace(/-/g, ".")
|
||||||
@ -91,7 +91,8 @@
|
|||||||
<view class="fast_track">
|
<view class="fast_track">
|
||||||
<block v-for="(item, index) in oaHomeData" :key="item.id">
|
<block v-for="(item, index) in oaHomeData" :key="item.id">
|
||||||
<view class="track_item" @click="navTwo(item.paths, index)">
|
<view class="track_item" @click="navTwo(item.paths, index)">
|
||||||
<u--image :showLoading="true" :src="item.icon" mode="widthFix" width="77.19rpx" height="77.19rpx"></u--image>
|
<u--image :showLoading="true" :src="item.icon" mode="widthFix" width="77.19rpx"
|
||||||
|
height="77.19rpx"></u--image>
|
||||||
<view class="title">{{ item.name }}</view>
|
<view class="title">{{ item.name }}</view>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
@ -115,6 +116,7 @@
|
|||||||
<globalPopup ref="globalPopup"></globalPopup>
|
<globalPopup ref="globalPopup"></globalPopup>
|
||||||
<logistiBriefCard v-for="(item, index) in orderList" :key="index" :goodsInfo="item">
|
<logistiBriefCard v-for="(item, index) in orderList" :key="index" :goodsInfo="item">
|
||||||
</logistiBriefCard>
|
</logistiBriefCard>
|
||||||
|
<u-loadmore :status="status" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view v-else class="no_task">
|
<view v-else class="no_task">
|
||||||
@ -184,7 +186,9 @@
|
|||||||
mapState
|
mapState
|
||||||
} from 'vuex';
|
} from 'vuex';
|
||||||
import bj from "@/static/animation/home.json"
|
import bj from "@/static/animation/home.json"
|
||||||
import { userInfo } from "@/api/oaUser.js"
|
import {
|
||||||
|
userInfo
|
||||||
|
} from "@/api/oaUser.js"
|
||||||
//#ifdef APP-PLUS
|
//#ifdef APP-PLUS
|
||||||
var jpushModule = uni.requireNativePlugin("JG-JPush");
|
var jpushModule = uni.requireNativePlugin("JG-JPush");
|
||||||
// #endif
|
// #endif
|
||||||
@ -199,7 +203,11 @@
|
|||||||
options: {
|
options: {
|
||||||
data: '',
|
data: '',
|
||||||
},
|
},
|
||||||
|
status: "loadmore",
|
||||||
|
page_num: 1,
|
||||||
|
flag: false,
|
||||||
uniMP: false,
|
uniMP: false,
|
||||||
|
id: "",
|
||||||
is_captain: 0,
|
is_captain: 0,
|
||||||
notArr: [],
|
notArr: [],
|
||||||
orderList: [],
|
orderList: [],
|
||||||
@ -257,11 +265,35 @@
|
|||||||
});
|
});
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
if (this.flag) return
|
||||||
|
let that = this
|
||||||
|
this.status = "loading"
|
||||||
|
this.page_num += 1
|
||||||
|
this.flag = true
|
||||||
|
getList({
|
||||||
|
status: this.curNow,
|
||||||
|
user_id: this.id,
|
||||||
|
keywords: this.keywords,
|
||||||
|
user_type: this.is_captain,
|
||||||
|
page_num: this.page_num
|
||||||
|
}).then(res => {
|
||||||
|
|
||||||
|
that.orderList = that.orderList.concat(res.data.data)
|
||||||
|
this.flag = false
|
||||||
|
if (!res.data.data.length) {
|
||||||
|
this.status = "nomore"
|
||||||
|
this.flag = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
// this.getUserIndex()
|
// this.getUserIndex()
|
||||||
// this.getIndexList()
|
// this.getIndexList()
|
||||||
if (uni.getStorageSync('uniMP')) this.uniMP = true;
|
if (uni.getStorageSync('uniMP')) this.uniMP = true;
|
||||||
userInfo().then(({data})=>{
|
userInfo().then(({
|
||||||
|
data
|
||||||
|
}) => {
|
||||||
this.$store.commit('setUserInfo', data);
|
this.$store.commit('setUserInfo', data);
|
||||||
this.initUserInfo(data);
|
this.initUserInfo(data);
|
||||||
this.$store.dispatch('initConfig');
|
this.$store.dispatch('initConfig');
|
||||||
@ -303,7 +335,9 @@
|
|||||||
watch: {
|
watch: {
|
||||||
'$store.state.app.token': {
|
'$store.state.app.token': {
|
||||||
handler: function(n, o) {
|
handler: function(n, o) {
|
||||||
userInfo().then(({data})=>{
|
userInfo().then(({
|
||||||
|
data
|
||||||
|
}) => {
|
||||||
// console.log(data);
|
// console.log(data);
|
||||||
this.$store.commit('setUserInfo', data);
|
this.$store.commit('setUserInfo', data);
|
||||||
this.initUserInfo(data);
|
this.initUserInfo(data);
|
||||||
@ -353,9 +387,9 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
async getOrderList() {
|
async getOrderList() {
|
||||||
let id = JSON.parse(uni.getStorageSync("USER_INFO")).id || "";
|
this.id = JSON.parse(uni.getStorageSync("USER_INFO")).id || "";
|
||||||
let res = await getList({
|
let res = await getList({
|
||||||
user_id: id,
|
user_id: this.id,
|
||||||
user_type: this.is_captain
|
user_type: this.is_captain
|
||||||
// courier_id: 167
|
// courier_id: 167
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user