Commit 6bf871b8 authored by chuan.liu's avatar chuan.liu

账票查询 滚动性能优化

parent 312c8c87
{ {
"name": "五粮液APP", "name" : "五粮液APP",
"appid": "__UNI__343534B", "appid" : "__UNI__343534B",
"description": "订货系统", "description" : "订货系统",
"versionName": "1.0.0", "versionName" : "1.0.0",
"versionCode": "100", "versionCode" : "100",
"transformPx": false, "transformPx" : false,
"app-plus": { "app-plus" : {
/* 5+App特有相关 */ /* 5+App特有相关 */
"usingComponents": true, "usingComponents" : true,
"nvueCompiler": "uni-app", "nvueCompiler" : "uni-app",
"nvueStyleCompiler": "uni-app", "nvueStyleCompiler" : "uni-app",
"splashscreen": { "splashscreen" : {
"alwaysShowBeforeRender": true, "alwaysShowBeforeRender" : true,
"waiting": true, "waiting" : true,
"autoclose": true, "autoclose" : true,
"delay": 0 "delay" : 0
}, },
"nvue": { "nvue" : {
"flex-direction": "row" "flex-direction" : "row"
}, },
"modules": {}, "modules" : {},
/* 模块配置 */ /* 模块配置 */
"distribute": { "distribute" : {
/* 应用发布信息 */ /* 应用发布信息 */
"android": { "android" : {
/* android打包配置 */ /* android打包配置 */
"permissions": [ "permissions" : [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>", "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>", "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
...@@ -42,72 +42,72 @@ ...@@ -42,72 +42,72 @@
"<uses-feature android:name=\"android.hardware.camera\"/>", "<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
], ],
"abiFilters": ["armeabi-v7a"] "abiFilters" : [ "armeabi-v7a" ]
}, },
"ios": {}, "ios" : {},
/* ios打包配置 */ /* ios打包配置 */
"sdkConfigs": { "sdkConfigs" : {
"ad": {} "ad" : {}
}, },
"icons": { "icons" : {
"android": { "android" : {
"hdpi": "unpackage/res/icons/72x72.png", "hdpi" : "unpackage/res/icons/72x72.png",
"xhdpi": "unpackage/res/icons/96x96.png", "xhdpi" : "unpackage/res/icons/96x96.png",
"xxhdpi": "unpackage/res/icons/144x144.png", "xxhdpi" : "unpackage/res/icons/144x144.png",
"xxxhdpi": "unpackage/res/icons/192x192.png" "xxxhdpi" : "unpackage/res/icons/192x192.png"
}, },
"ios": { "ios" : {
"appstore": "unpackage/res/icons/1024x1024.png", "appstore" : "unpackage/res/icons/1024x1024.png",
"ipad": { "ipad" : {
"app": "unpackage/res/icons/76x76.png", "app" : "unpackage/res/icons/76x76.png",
"app@2x": "unpackage/res/icons/152x152.png", "app@2x" : "unpackage/res/icons/152x152.png",
"notification": "unpackage/res/icons/20x20.png", "notification" : "unpackage/res/icons/20x20.png",
"notification@2x": "unpackage/res/icons/40x40.png", "notification@2x" : "unpackage/res/icons/40x40.png",
"proapp@2x": "unpackage/res/icons/167x167.png", "proapp@2x" : "unpackage/res/icons/167x167.png",
"settings": "unpackage/res/icons/29x29.png", "settings" : "unpackage/res/icons/29x29.png",
"settings@2x": "unpackage/res/icons/58x58.png", "settings@2x" : "unpackage/res/icons/58x58.png",
"spotlight": "unpackage/res/icons/40x40.png", "spotlight" : "unpackage/res/icons/40x40.png",
"spotlight@2x": "unpackage/res/icons/80x80.png" "spotlight@2x" : "unpackage/res/icons/80x80.png"
}, },
"iphone": { "iphone" : {
"app@2x": "unpackage/res/icons/120x120.png", "app@2x" : "unpackage/res/icons/120x120.png",
"app@3x": "unpackage/res/icons/180x180.png", "app@3x" : "unpackage/res/icons/180x180.png",
"notification@2x": "unpackage/res/icons/40x40.png", "notification@2x" : "unpackage/res/icons/40x40.png",
"notification@3x": "unpackage/res/icons/60x60.png", "notification@3x" : "unpackage/res/icons/60x60.png",
"settings@2x": "unpackage/res/icons/58x58.png", "settings@2x" : "unpackage/res/icons/58x58.png",
"settings@3x": "unpackage/res/icons/87x87.png", "settings@3x" : "unpackage/res/icons/87x87.png",
"spotlight@2x": "unpackage/res/icons/80x80.png", "spotlight@2x" : "unpackage/res/icons/80x80.png",
"spotlight@3x": "unpackage/res/icons/120x120.png" "spotlight@3x" : "unpackage/res/icons/120x120.png"
} }
} }
} }
} }
}, },
/* SDK配置 */ /* SDK配置 */
"quickapp": {}, "quickapp" : {},
/* 快应用特有相关 */ /* 快应用特有相关 */
"mp-weixin": { "mp-weixin" : {
/* 小程序特有相关 */ /* 小程序特有相关 */
"appid": "", "appid" : "",
"setting": { "setting" : {
"urlCheck": false "urlCheck" : false
}, },
"usingComponents": true "usingComponents" : true
}, },
"h5": { "h5" : {
"devServer": { "devServer" : {
"https": false, "https" : false,
"port": "8080", "port" : "8080",
"disableHostCheck": true, "disableHostCheck" : true,
"proxy": { "proxy" : {
"/sap": { "/sap" : {
"target": "http://10.0.134.45:8000", "target" : "http://10.0.134.45:8000",
"changeOrigin": true "changeOrigin" : true
}, },
"/crm-app": { "/crm-app" : {
"target": "http://10.0.135.139", "target" : "http://10.0.135.139",
// "target" : "http://10.2.4.2", // "target" : "http://10.2.4.2",
"changeOrigin": true "changeOrigin" : true
} }
} }
} }
......
...@@ -669,6 +669,7 @@ ...@@ -669,6 +669,7 @@
}, },
"bounce": "none" "bounce": "none"
} }
// "enablePullDownRefresh": true
} }
} }
], ],
......
...@@ -42,6 +42,11 @@ ...@@ -42,6 +42,11 @@
<view class="empty-block"> <view class="empty-block">
</view> </view>
</cell> </cell>
<cell>
<view class="loading-more" v-if='lists.length>2'>
<text class="loading-more-text">-- 到底了 --</text>
</view>
</cell>
</list> </list>
</view> </view>
</view> </view>
...@@ -61,7 +66,13 @@ ...@@ -61,7 +66,13 @@
data() { data() {
return { return {
itemHead: {}, itemHead: {},
lists: [] lists: [{
BILLTO_BP: '--',
BILLTO_NAME: '',
GOODS_AMOUNT: '',
FORWARD_AMOUNT: '',
DEALING_AMOUNT: '',
}]
} }
}, },
computed: { computed: {
...@@ -306,4 +317,18 @@ ...@@ -306,4 +317,18 @@
color: #333; color: #333;
font-size: 28rpx; font-size: 28rpx;
} }
.loading-more {
flex: 1;
align-items: center;
justify-content: center;
padding-top: 14px;
padding-bottom: 14px;
text-align: center;
}
.loading-more-text {
font-size: 12px;
color: #999;
}
</style> </style>
...@@ -321,7 +321,7 @@ ...@@ -321,7 +321,7 @@
} }
.loading-more-text { .loading-more-text {
font-size: 28upx; font-size: 12px;
color: #999; color: #999;
} }
</style> </style>
<template> <template>
<view class="page-news"> <view class="page-news">
<uni-list ref="list" class="listview" :enableBackToTop="true" :scroll-y="true" @scrolltolower="loadMore()"> <uni-list ref="list" class="listview" :enableBackToTop="true" :scroll-y="true" @scrolltolower="loadMore()">
<uni-refresh class="refresh" @refresh="onrefresh" @pullingdown="onpullingdown" :display="refreshing ? 'show' : 'hide'"> <uni-refresh class="refresh" @refresh="onrefresh" @pullingdown="onpullingdown"
:display="refreshing ? 'show' : 'hide'">
<div class="refresh-view"> <div class="refresh-view">
<image class="refresh-icon" :src="refreshIcon" :style="{width: (refreshing || pulling) ? 0: '32px'}" :class="{'refresh-icon-active': refreshFlag}"></image> <image class="refresh-icon" :src="refreshIcon" :style="{width: (refreshing || pulling) ? 0: '32px'}"
<uni-load-more v-if="refreshing" class="loading-icon" status="loading" :contentText="loadingMoreText"></uni-load-more> :class="{'refresh-icon-active': refreshFlag}"></image>
<uni-load-more v-if="refreshing" class="loading-icon" status="loading"
:contentText="loadingMoreText"></uni-load-more>
<text class="loading-text">{{refreshText}}</text> <text class="loading-text">{{refreshText}}</text>
</div> </div>
</uni-refresh> </uni-refresh>
...@@ -22,7 +25,6 @@ ...@@ -22,7 +25,6 @@
</template> </template>
<script> <script>
import uniList from '@/components/uni-list.vue'; import uniList from '@/components/uni-list.vue';
import uniCell from '@/components/uni-cell.vue'; import uniCell from '@/components/uni-cell.vue';
import uniRefresh from '@/components/uni-refresh.vue'; import uniRefresh from '@/components/uni-refresh.vue';
...@@ -201,7 +203,8 @@ ...@@ -201,7 +203,8 @@
let s4 = function() { let s4 = function() {
return (65536 * (1 + Math.random()) | 0).toString(16).substring(1); return (65536 * (1 + Math.random()) | 0).toString(16).substring(1);
} }
return (s4() + s4() + "-" + s4() + "-4" + s4().substr(0, 3) + "-" + s4() + "-" + s4() + s4() + s4()).toUpperCase(); return (s4() + s4() + "-" + s4() + "-4" + s4().substr(0, 3) + "-" + s4() + "-" + s4() + s4() + s4())
.toUpperCase();
} }
} }
} }
...@@ -294,7 +297,7 @@ ...@@ -294,7 +297,7 @@
} }
.loading-more-text { .loading-more-text {
font-size: 28upx; font-size: 12px;
color: #999; color: #999;
} }
</style> </style>
...@@ -45,6 +45,8 @@ ...@@ -45,6 +45,8 @@
<view class="planout-block-lists" :style="scrollHeight"> <view class="planout-block-lists" :style="scrollHeight">
<list class="lists-wrapper" scrollable loadmoreoffset='1' show-scrollbar='false'> <list class="lists-wrapper" scrollable loadmoreoffset='1' show-scrollbar='false'>
<cell class="list-cell" v-for="(item,index) in lists" :key='index'> <cell class="list-cell" v-for="(item,index) in lists" :key='index'>
<!-- <scroll-view class="scroll-area" :style='scrollHeight' scroll-y="true" lower-threshold='150'
@scrolltolower='scrolltolower'> -->
<view class="middle view planout-block-item"> <view class="middle view planout-block-item">
<view class="text-block"> <view class="text-block">
<text class="middle-date middle-date-select">客户编码</text> <text class="middle-date middle-date-select">客户编码</text>
...@@ -64,8 +66,8 @@ ...@@ -64,8 +66,8 @@
</view> </view>
</view> </view>
<view class="empty-block"></view> <view class="empty-block"></view>
<!-- </scroll-view> -->
</cell> </cell>
</list> </list>
</view> </view>
...@@ -93,6 +95,16 @@ ...@@ -93,6 +95,16 @@
end: '' end: ''
}, },
lists: [], lists: [],
page: {
"PAGE": "1",
"PAGESIZE": "10",
},
toPageParams: {
page: '',
mode: '',
index: 0,
head: {}
}
} }
}, },
computed: { computed: {
...@@ -109,19 +121,25 @@ ...@@ -109,19 +121,25 @@
}, },
scrollHeight() { scrollHeight() {
return { return {
'height': `${this.sysinfo.safeArea.height - 237}px`, 'height': `${this.sysinfo.safeArea.height - 237- 44 - 20}px`
} }
} }
}, },
onPullDownRefresh() {
console.log('refresh');
this.reset()
this.getMarketSupportFee(true)
setTimeout(function() {
uni.stopPullDownRefresh();
}, 600);
},
created() { created() {
this.condition.start = timeFormat(new Date(), 'yyyy-mm-dd') this.condition.start = timeFormat(new Date(), 'yyyy-mm-dd')
this.condition.end = timeFormat(new Date(), 'yyyy-mm-dd') this.condition.end = timeFormat(new Date(), 'yyyy-mm-dd')
this.getMarketSupportFee(); this.reset()
this.getMarketSupportFee(true);
}, },
methods: { methods: {
search() {
this.getMarketSupportFee()
},
async getMarketSupportFee() { async getMarketSupportFee() {
let CUSTOMER = [] let CUSTOMER = []
let POSTING_DATE = [] let POSTING_DATE = []
...@@ -130,13 +148,16 @@ ...@@ -130,13 +148,16 @@
SIGN: 'I', SIGN: 'I',
OPTION: 'BT', OPTION: 'BT',
LOW: '20220401' || this.condition.start.replaceAll('-', ''), LOW: '20220401' || this.condition.start.replaceAll('-', ''),
// LOW: '20220401' || this.condition.start.replaceAll('-', ''),
HIGH: '20220530' || this.condition.end.replaceAll('-', '') HIGH: '20220530' || this.condition.end.replaceAll('-', '')
// HIGH: '20220530' || this.condition.end.replaceAll('-', '')
}] }]
} }
if (this.userInfo.role !== 'WLY001') { if (this.userInfo.role !== 'WLY001') {
CUSTOMER = [{ CUSTOMER = [{
SIGN: 'I', SIGN: 'I',
OPTION: 'EQ', OPTION: 'EQ',
// LOW: '4000000105' || this.userInfo.code,
LOW: this.userInfo.code, LOW: this.userInfo.code,
HIGH: '' HIGH: ''
}] }]
...@@ -149,7 +170,22 @@ ...@@ -149,7 +170,22 @@
} }
const res = await apiGetMarketSupportFee(params) const res = await apiGetMarketSupportFee(params)
this.lists = res.DATA this.lists = res.DATA.concat(res.DATA).concat(res.DATA)
},
reset() {
this.loadParams = {
total: 0,
totalPage: 1,
isDone: false,
isRefresh: false
}
this.page.PAGE = 1
this.lists = []
this.loadingText = '加载中'
},
search() {
this.reset()
this.getMarketSupportFee(true)
}, },
bindPickerYearStartChange(e) { bindPickerYearStartChange(e) {
console.log('picker发送选择改变,携带值为', e.detail.value) console.log('picker发送选择改变,携带值为', e.detail.value)
...@@ -182,9 +218,11 @@ ...@@ -182,9 +218,11 @@
position: relative; position: relative;
flex-direction: column; flex-direction: column;
background: #f0f4f5; background: #f0f4f5;
// height: 100vh;
} }
.main { .main {
position: relative;
flex-direction: column; flex-direction: column;
margin-top: -164rpx; margin-top: -164rpx;
padding: 0 16rpx; padding: 0 16rpx;
...@@ -270,7 +308,6 @@ ...@@ -270,7 +308,6 @@
.planout-block-lists { .planout-block-lists {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
overflow: scroll;
background: #f0f4f5; background: #f0f4f5;
} }
...@@ -294,6 +331,8 @@ ...@@ -294,6 +331,8 @@
.planout-block-item { .planout-block-item {
flex: 1; flex: 1;
// width: 750rpx;
// margin-bottom: 26rpx;
} }
.btn { .btn {
......
...@@ -306,7 +306,7 @@ ...@@ -306,7 +306,7 @@
} }
.loading-more-text { .loading-more-text {
font-size: 28upx; font-size: 12px;
color: #999; color: #999;
} }
</style> </style>
...@@ -402,7 +402,7 @@ ...@@ -402,7 +402,7 @@
} }
.loading-more-text { .loading-more-text {
font-size: 28upx; font-size: 12px;
color: #999; color: #999;
} }
</style> </style>
<template> <template>
<view class="page-news"> <view class="page-news">
<uni-list ref="list" class="listview" :enableBackToTop="true" :scroll-y="true" @scrolltolower="loadMore()"> <uni-list ref="list" class="listview" :enableBackToTop="true" :scroll-y="true" @scrolltolower="loadMore()">
<uni-refresh class="refresh" @refresh="onrefresh" @pullingdown="onpullingdown" :display="refreshing ? 'show' : 'hide'"> <uni-refresh class="refresh" @refresh="onrefresh" @pullingdown="onpullingdown"
:display="refreshing ? 'show' : 'hide'">
<div class="refresh-view"> <div class="refresh-view">
<image class="refresh-icon" :src="refreshIcon" :style="{width: (refreshing || pulling) ? 0: '32px'}" :class="{'refresh-icon-active': refreshFlag}"></image> <image class="refresh-icon" :src="refreshIcon" :style="{width: (refreshing || pulling) ? 0: '32px'}"
<uni-load-more v-if="refreshing" class="loading-icon" status="loading" :contentText="loadingMoreText"></uni-load-more> :class="{'refresh-icon-active': refreshFlag}"></image>
<uni-load-more v-if="refreshing" class="loading-icon" status="loading"
:contentText="loadingMoreText"></uni-load-more>
<text class="loading-text">{{refreshText}}</text> <text class="loading-text">{{refreshText}}</text>
</div> </div>
</uni-refresh> </uni-refresh>
...@@ -22,7 +25,6 @@ ...@@ -22,7 +25,6 @@
</template> </template>
<script> <script>
import uniList from '@/components/uni-list.vue'; import uniList from '@/components/uni-list.vue';
import uniCell from '@/components/uni-cell.vue'; import uniCell from '@/components/uni-cell.vue';
import uniRefresh from '@/components/uni-refresh.vue'; import uniRefresh from '@/components/uni-refresh.vue';
...@@ -201,7 +203,8 @@ ...@@ -201,7 +203,8 @@
let s4 = function() { let s4 = function() {
return (65536 * (1 + Math.random()) | 0).toString(16).substring(1); return (65536 * (1 + Math.random()) | 0).toString(16).substring(1);
} }
return (s4() + s4() + "-" + s4() + "-4" + s4().substr(0, 3) + "-" + s4() + "-" + s4() + s4() + s4()).toUpperCase(); return (s4() + s4() + "-" + s4() + "-4" + s4().substr(0, 3) + "-" + s4() + "-" + s4() + s4() + s4())
.toUpperCase();
} }
} }
} }
...@@ -294,7 +297,7 @@ ...@@ -294,7 +297,7 @@
} }
.loading-more-text { .loading-more-text {
font-size: 28upx; font-size: 12px;
color: #999; color: #999;
} }
</style> </style>
...@@ -477,7 +477,7 @@ ...@@ -477,7 +477,7 @@
} }
.loading-more-text { .loading-more-text {
font-size: 28upx; font-size: 12px;
color: #999; color: #999;
} }
</style> </style>
...@@ -473,7 +473,7 @@ ...@@ -473,7 +473,7 @@
} }
.loading-more-text { .loading-more-text {
font-size: 28upx; font-size: 12px;
color: #999; color: #999;
} }
</style> </style>
...@@ -478,7 +478,7 @@ ...@@ -478,7 +478,7 @@
} }
.loading-more-text { .loading-more-text {
font-size: 28upx; font-size: 12px;
color: #999; color: #999;
} }
</style> </style>
...@@ -480,7 +480,7 @@ ...@@ -480,7 +480,7 @@
} }
.loading-more-text { .loading-more-text {
font-size: 28upx; font-size: 12px;
color: #999; color: #999;
} }
</style> </style>
...@@ -481,7 +481,7 @@ ...@@ -481,7 +481,7 @@
} }
.loading-more-text { .loading-more-text {
font-size: 28upx; font-size: 12px;
color: #999; color: #999;
} }
</style> </style>
...@@ -478,7 +478,7 @@ ...@@ -478,7 +478,7 @@
} }
.loading-more-text { .loading-more-text {
font-size: 28upx; font-size: 12px;
color: #999; color: #999;
} }
</style> </style>
...@@ -514,7 +514,7 @@ ...@@ -514,7 +514,7 @@
} }
.loading-more-text { .loading-more-text {
font-size: 28upx; font-size: 12px;
color: #999; color: #999;
} }
</style> </style>
<template> <template>
<view class="page-news"> <view class="page-news">
<uni-list ref="list" class="listview" :enableBackToTop="true" :scroll-y="true" @scrolltolower="loadMore()"> <uni-list ref="list" class="listview" :enableBackToTop="true" :scroll-y="true" @scrolltolower="loadMore()">
<uni-refresh class="refresh" @refresh="onrefresh" @pullingdown="onpullingdown" :display="refreshing ? 'show' : 'hide'"> <uni-refresh class="refresh" @refresh="onrefresh" @pullingdown="onpullingdown"
:display="refreshing ? 'show' : 'hide'">
<div class="refresh-view"> <div class="refresh-view">
<image class="refresh-icon" :src="refreshIcon" :style="{width: (refreshing || pulling) ? 0: '32px'}" :class="{'refresh-icon-active': refreshFlag}"></image> <image class="refresh-icon" :src="refreshIcon" :style="{width: (refreshing || pulling) ? 0: '32px'}"
<uni-load-more v-if="refreshing" class="loading-icon" status="loading" :contentText="loadingMoreText"></uni-load-more> :class="{'refresh-icon-active': refreshFlag}"></image>
<uni-load-more v-if="refreshing" class="loading-icon" status="loading"
:contentText="loadingMoreText"></uni-load-more>
<text class="loading-text">{{refreshText}}</text> <text class="loading-text">{{refreshText}}</text>
</div> </div>
</uni-refresh> </uni-refresh>
...@@ -22,7 +25,6 @@ ...@@ -22,7 +25,6 @@
</template> </template>
<script> <script>
import uniList from '@/components/uni-list.vue'; import uniList from '@/components/uni-list.vue';
import uniCell from '@/components/uni-cell.vue'; import uniCell from '@/components/uni-cell.vue';
import uniRefresh from '@/components/uni-refresh.vue'; import uniRefresh from '@/components/uni-refresh.vue';
...@@ -201,7 +203,8 @@ ...@@ -201,7 +203,8 @@
let s4 = function() { let s4 = function() {
return (65536 * (1 + Math.random()) | 0).toString(16).substring(1); return (65536 * (1 + Math.random()) | 0).toString(16).substring(1);
} }
return (s4() + s4() + "-" + s4() + "-4" + s4().substr(0, 3) + "-" + s4() + "-" + s4() + s4() + s4()).toUpperCase(); return (s4() + s4() + "-" + s4() + "-4" + s4().substr(0, 3) + "-" + s4() + "-" + s4() + s4() + s4())
.toUpperCase();
} }
} }
} }
...@@ -294,7 +297,7 @@ ...@@ -294,7 +297,7 @@
} }
.loading-more-text { .loading-more-text {
font-size: 28upx; font-size: 12px;
color: #999; color: #999;
} }
</style> </style>
...@@ -369,7 +369,7 @@ ...@@ -369,7 +369,7 @@
} }
.loading-more-text { .loading-more-text {
font-size: 28upx; font-size: 12px;
color: #999; color: #999;
} }
</style> </style>
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment