123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160 |
- <template>
- <view :class="['qn-page-' + theme]" style="height: 100vh">
- <view class="content">
- <view class="dyquan-wrap" v-for="(item,index) in list" :key="index">
- <view class="showtime">
- <text class="float_left order-no-text">{{ $_utils.formatDate(item.createTime) }}</text>
- </view>
- <view class="item-info">
- <image :src="item.image" mode=""></image>
- <view class="info-info">
- <view class="clamp2">
- {{item.name}}
- </view>
- <view class="info-cs">
- 剩余使用次数:{{item.number}}
- </view>
- </view>
- </view>
- <!-- <view class="btm">
- <view class="primary-btn btn" @click="goPage('/pagesT/unit/itemdetail?id=' + item.project_id)">
- 立即使用
- </view>
- </view> -->
- </view>
- <u-loadmore :status="loadingType" />
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- page: 1,
- pageSize: 10,
- loaded: false,
- loadingType: 'loadmore',
- list: []
- }
- },
- onLoad(opt) {
- },
- onShow() {
- this.getList()
- },
- onReachBottom() {
- this.getList()
- },
- onReady() {
- },
- methods: {
- tabClick(item, index) {
- this.tabCurrentIndex = index;
- },
- getList(type) {
- let that = this
- if (type == 'reload') {
- // item.list
- return
- }
- if (type == 'tab' && that.loaded) {
- return
- }
- if (that.loadingType == 'loading' || that.loadingType == 'nomore') {
- return
- }
- that.loadingType = 'loading'
- that.$u.api.getDyquanList({
- page: that.page,
- pageSize: that.pageSize,
- name: ''
- }).then(({
- data
- }) => {
- that.list = that.list.concat(data)
- that.page++
- if (data.length == that.pageSize) {
- that.loadingType = 'loadmore'
- } else {
- that.loadingType = 'nomore'
- }
- })
- }
- }
- }
- </script>
- <style lang="scss">
- .content {
- background-color:#f8f6f6 ;
- height: auto;
- min-height: 100%;
-
- }
- .dyquan-wrap {
- padding: 20rpx;
- background-color: #fff;
- margin-bottom: 15rpx;
- .showtime {
- height: 50rpx;
- }
- .item-info {
- width: 750rpx;
- height: 205rpx;
- background: #F7F7F7;
- display: flex;
- justify-content: flex-start;
- align-items: center;
-
- image {
- width: 160rpx;
- height: 160rpx;
- margin-right: 30rpx;
- }
- .info-info {
- height: 160rpx;
- padding: 15rpx 0;
- padding-right: 50rpx;
- font-size: 30rpx;
- font-weight: 500;
- color: #666666;
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- align-items: flex-start;
- .info-cs {
- font-size: 26rpx;
- font-weight: 500;
- color: #999999;
- }
- }
- }
- .btm {
- width: 100%;
- height: 95rpx;
- background-color: #fff;
- display: flex;
- justify-content: flex-end;
- align-items: center;
- .btn {
- width: 144rpx;
- height: 55rpx;
- border-radius: 28rpx;
- font-size: 26rpx;
- font-weight: 500;
- color: #FFFFFF;
- line-height: 55rpx;
- text-align: center;
- }
- }
- }
- </style>
|