首页物流分页
This commit is contained in:
parent
ea3f8f8a84
commit
c311f865cc
@ -58,8 +58,8 @@
|
||||
</view>
|
||||
</view>
|
||||
<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"
|
||||
@click="clickNotice(item.id)">
|
||||
<view class="backlog_item flex_a_c_j_sb" v-for="(item, index) in ApproveList.slice(0, 2)"
|
||||
:key="index" @click="clickNotice(item.id)">
|
||||
<view class="text">
|
||||
<text class="text_time">{{
|
||||
item.create_time.substring(0, 10).replace(/-/g, ".")
|
||||
@ -91,7 +91,8 @@
|
||||
<view class="fast_track">
|
||||
<block v-for="(item, index) in oaHomeData" :key="item.id">
|
||||
<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>
|
||||
</block>
|
||||
@ -115,6 +116,7 @@
|
||||
<globalPopup ref="globalPopup"></globalPopup>
|
||||
<logistiBriefCard v-for="(item, index) in orderList" :key="index" :goodsInfo="item">
|
||||
</logistiBriefCard>
|
||||
<u-loadmore :status="status" />
|
||||
</view>
|
||||
|
||||
<view v-else class="no_task">
|
||||
@ -184,7 +186,9 @@
|
||||
mapState
|
||||
} from 'vuex';
|
||||
import bj from "@/static/animation/home.json"
|
||||
import { userInfo } from "@/api/oaUser.js"
|
||||
import {
|
||||
userInfo
|
||||
} from "@/api/oaUser.js"
|
||||
//#ifdef APP-PLUS
|
||||
var jpushModule = uni.requireNativePlugin("JG-JPush");
|
||||
// #endif
|
||||
@ -199,7 +203,11 @@
|
||||
options: {
|
||||
data: '',
|
||||
},
|
||||
status: "loadmore",
|
||||
page_num: 1,
|
||||
flag: false,
|
||||
uniMP: false,
|
||||
id: "",
|
||||
is_captain: 0,
|
||||
notArr: [],
|
||||
orderList: [],
|
||||
@ -257,11 +265,35 @@
|
||||
});
|
||||
// #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() {
|
||||
// this.getUserIndex()
|
||||
// this.getIndexList()
|
||||
if(uni.getStorageSync('uniMP'))this.uniMP = true;
|
||||
userInfo().then(({data})=>{
|
||||
if (uni.getStorageSync('uniMP')) this.uniMP = true;
|
||||
userInfo().then(({
|
||||
data
|
||||
}) => {
|
||||
this.$store.commit('setUserInfo', data);
|
||||
this.initUserInfo(data);
|
||||
this.$store.dispatch('initConfig');
|
||||
@ -301,9 +333,11 @@
|
||||
// },
|
||||
},
|
||||
watch: {
|
||||
'$store.state.app.token':{
|
||||
handler: function(n, o){
|
||||
userInfo().then(({data})=>{
|
||||
'$store.state.app.token': {
|
||||
handler: function(n, o) {
|
||||
userInfo().then(({
|
||||
data
|
||||
}) => {
|
||||
// console.log(data);
|
||||
this.$store.commit('setUserInfo', data);
|
||||
this.initUserInfo(data);
|
||||
@ -314,7 +348,7 @@
|
||||
'$store.state.config.config.menu': {
|
||||
immediate: true,
|
||||
deep: true,
|
||||
handler: function(n, o){
|
||||
handler: function(n, o) {
|
||||
const route = '/pages/oaHome/oaHome';
|
||||
let arr = [];
|
||||
n.forEach((item) => {
|
||||
@ -349,13 +383,13 @@
|
||||
leftClick(e) {
|
||||
uni.sendHostEvent('closeApp', e, (ret) => {
|
||||
//发送消息成功回调
|
||||
console.log('关闭应用'+JSON.stringify(ret));
|
||||
console.log('关闭应用' + JSON.stringify(ret));
|
||||
});
|
||||
},
|
||||
async getOrderList() {
|
||||
let id = JSON.parse(uni.getStorageSync("USER_INFO")).id || "";
|
||||
this.id = JSON.parse(uni.getStorageSync("USER_INFO")).id || "";
|
||||
let res = await getList({
|
||||
user_id: id,
|
||||
user_id: this.id,
|
||||
user_type: this.is_captain
|
||||
// courier_id: 167
|
||||
});
|
||||
@ -366,8 +400,8 @@
|
||||
url: "/pages/logistics/index",
|
||||
});
|
||||
},
|
||||
initUserInfo(data=null) {
|
||||
if(data) return this.myOaInfo = data;
|
||||
initUserInfo(data = null) {
|
||||
if (data) return this.myOaInfo = data;
|
||||
this.$store.state.app.userInfo ?
|
||||
(this.myOaInfo = this.$store.state.app.userInfo) :
|
||||
(this.myOaInfo.avatar = "");
|
||||
|
Loading…
x
Reference in New Issue
Block a user