123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 |
- <template>
- <view class="container">
- <u-navbar leftIconColor="#fff" titleStyle="color:#fff;fontSize:36rpx;" :autoBack="true" bgColor="#2C6FF3"
- :placeholder="true" title="通知"></u-navbar>
- <view class="content">
- <scroll-view class="scrollview" :scroll-with-animation="true" scroll-y lower-threshold="100"
- :style="{height:fullHeight}">
- <view class="list" v-if="list&&list.length>0">
- <block v-for="(item, index) in list" :key="index">
- <view class="comm-main flex justify-between">
-
- </view>
- </block>
- <view class="more" style="overflow: hidden;">
- <u-loadmore :status="status" v-if="list.length>=1" />
- </view>
- </view>
- <view class="empty" v-if="list.length==0">
- <u-empty mode="list" text="没有任何通知!"></u-empty>
- </view>
- </scroll-view>
- </view>
- </view>
- </template>
- <script>
- import {
- list,
- update
- } from "@/api/system/employee.js"
- export default {
- data() {
- return {
- list: [], //列表
- fullHeight: 0,
- }
- },
- onLoad() {
- let _this = this;
- const query = uni.createSelectorQuery().in(this);
- query.select(".scrollview").boundingClientRect((data) => {
- uni.getSystemInfo({
- success(res) {
- // 针对iPhone X等机型底部安全距离做适配
- const model = res.model;
- const modelInclude = [
- "iPhone X",
- 'iPhone XR',
- "iPhone XS",
- "iPhone XS MAX",
- "iPhone 12/13 mini",
- "iPhone 12/13 (Pro)",
- "iPhone 12/13 Pro Max",
- "iPhone 14 Pro Max"
- ];
- let safeDistance = modelInclude.includes(model)
- //动态设置商品区域高度
- if (safeDistance) {
- _this.fullHeight = res.windowHeight - data.top - 34 + 'px';
- } else {
- _this.fullHeight = res.windowHeight - data.top + 'px';
- }
- },
- });
- }).exec();
- },
- methods: {
-
- }
- }
- </script>
- <style lang="scss" scoped>
- .container {
- overflow: hidden;
- .content {
- .list {
- width: 100%;
- padding: 0rpx 13rpx 12rpx;
- padding-bottom: calc(110rpx + env(safe-area-inset-bottom) / 2);
- overflow: hidden;
- .comm-img {
- width: 130rpx;
- height: 130rpx;
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content: space-around;
- image {
- width: 130rpx;
- height: 130rpx;
- }
- }
- .comm-main {
- padding: 20rpx 30rpx;
- background-color: #fff;
- border-radius: 12rpx;
- margin-top: 12rpx;
- box-sizing: border-box;
- color: #999;
- line-height: 60rpx;
- position: relative;
-
-
- }
- }
- }
- }
- .empty {
- margin-top: 40%;
- }
- </style>
|