diff --git a/pages.json b/pages.json index 2f854a8..8f2581b 100644 --- a/pages.json +++ b/pages.json @@ -74,6 +74,9 @@ "navigationStyle": "custom", "navigationBarTitleText": "", "enablePullDownRefresh": false + }, + "app-plus":{ + "bounce":"none" } }, { diff --git a/pages/contract/index.vue b/pages/contract/index.vue index 77b424f..154048e 100644 --- a/pages/contract/index.vue +++ b/pages/contract/index.vue @@ -13,15 +13,17 @@ <div class="wrap2">合同编号</div> <div class="wrap3">签署日期</div> </div> - <scroll-view style="margin-top: 20rpx;" class="scrollbox" :scroll-y="true" @scrolltolower="loadMore"> - <div class="content3" :style="{height:`${distance}rpx`}" style="overflow-y: auto"> + + <div class="content3" > + <scroll-view :style="{height:`${elementBottom}rpx`}" :scroll-y="true" @scrolltolower="loadMore"> <div class="wrap1" v-for="(item,index) in mainList" :key="index"> <div class="wrap1_1">{{item.contractTile}}</div> <div class="wrap1_2">{{item.contractId.length>10?`${item.contractId.slice(0,10)}...`:item.contractId}}</div> <div class="wrap1_3"><div class="wrap1_3_1">{{item.signDate}}</div></div> </div> + </scroll-view> </div> - </scroll-view> + <tabbar :current="2"></tabbar> </div> </template> @@ -37,21 +39,20 @@ export default { page:1, pageSize:999, mainList:[], - distance:'' + elementBottom:'' } }, mounted(){ this.getData() - uni.createSelectorQuery().select('.content2').boundingClientRect(data => { - let res = uni.getSystemInfoSync(); - function pxToRpx(px) { - return (px / res.windowWidth) * 750; - } - const distance = res.windowHeight - data.bottom; - this.distance = pxToRpx(distance)-50 - }).exec() + this.getDistanceFromTopToPageBottom('.content3') + }, methods:{ + async getDistanceFromTopToPageBottom(classValue) { + const { windowHeight, windowWidth } = await uni.getSystemInfo(); + const [{ top }] = await new Promise(resolve => uni.createSelectorQuery().select(classValue).boundingClientRect().exec(resolve)); + this.elementBottom = ((windowHeight - top) / windowWidth) * 750 - 175; + }, loadMore(){ }, @@ -84,6 +85,7 @@ export default { width: 100vw; height: 100vh; .content3{ + margin-top: 20rpx; margin-bottom: 166rpx; .wrap1{ diff --git a/pages/order-goods/index.vue b/pages/order-goods/index.vue index 659a92d..f237175 100644 --- a/pages/order-goods/index.vue +++ b/pages/order-goods/index.vue @@ -32,8 +32,9 @@ </div> </div> - <scroll-view style=" margin-top: 28rpx;" class="scrollbox" :scroll-y="true" @scrolltolower="loadMore"> + <div class="content3"> + <scroll-view :style="{height:`${elementBottom}rpx`}" class="scrollbox" :scroll-y="true" @scrolltolower="loadMore"> <div v-for="(item,index) in mainList" :key="index" @touchstart="(e)=>{touchStart(e,index)}" @@ -69,8 +70,9 @@ <image style="width: 80rpx;height: 80rpx" src="../../static/zu154@3x.png"></image> </div> </div> + </scroll-view> </div> - </scroll-view> + <u-modal :show="show_1" title="确认删除吗" @cancel="show_1=false" @confirm="deleteClick" confirmText="确认" cancelText="取消" showCancelButton></u-modal> <tabbar :current="1"></tabbar> @@ -91,6 +93,7 @@ export default { startX: 0, windowWidth: 0, page: 1, + elementBottom:'', item: null, artworkStatus: 0, pageSize: 999, @@ -109,8 +112,17 @@ export default { this.windowWidth = res.windowWidth } }) + this.getDistanceFromTopToPageBottom('.content3') + }, + computed:{ + }, methods: { + async getDistanceFromTopToPageBottom(classValue) { + const { windowHeight, windowWidth } = await uni.getSystemInfo(); + const [{ top }] = await new Promise(resolve => uni.createSelectorQuery().select(classValue).boundingClientRect().exec(resolve)); + this.elementBottom = ((windowHeight - top) / windowWidth) * 750 - 175; + }, openDelete(item) { this.show_1 = true this.item = item @@ -207,9 +219,9 @@ export default { height: 100vh; .content3 { - height: 2000rpx; + margin-top: 20rpx; - margin-bottom: 166rpx; + margin-bottom: 300rpx; .wrap1 { margin-bottom: 20rpx; diff --git a/pages/order-goods/order-details.vue b/pages/order-goods/order-details.vue index b3d12d6..79ea4a2 100644 --- a/pages/order-goods/order-details.vue +++ b/pages/order-goods/order-details.vue @@ -1,6 +1,6 @@ <template> <div class="order-details" > - <title-block class="title-block" title="订单库"> + <title-block class="title-block" title="2订单库"> <template #left> <div> <image style="width: 112rpx;height: 52rpx" src="https://cdns.fontree.cn/fonchain-main/prod/image/default/artwork/785cf885-c4c9-44b3-8155-4b39988c7ef8.png" @click="back"></image></div> </template>