You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
zhishifufei_php/application/wap/view/first/material/my_material.html

97 lines
3.8 KiB

10 months ago
<!-- +---------------------------------------------------------------------- -->
<!-- | 天诚科技 [ 刘海东 17600099397赋能开发者,助力企业发展 ] -->
<!-- +---------------------------------------------------------------------- -->
<!-- | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved. -->
<!-- +---------------------------------------------------------------------- -->
<!-- | Licensed 该系统并不是自由软件,未经许可不能去掉相关版权 -->
<!-- +---------------------------------------------------------------------- -->
<!-- | Author:甘肃天诚志信电子商务有限公司 刘海东 联系电话维系17600099397 -->
<!-- +---------------------------------------------------------------------- -->
{extend name="public/container"}
{block name="title"}我的资料{/block}
{block name="content"}
<div v-cloak id="app">
<div class="user-material">
<div v-if="materialList.length" class="list">
<a v-for="item in materialList" :key="item.id" :href="'{:url('special/data_details')}?id=' + item.id">
<div>
<img :src="item.image" alt="">
</div>
<div>
<div>{{ item.title }}</div>
<div>
<div :class="{ money: item.pay_type }">
<template v-if="item.pay_type">
<span>{{ item.money }}</span>
</template>
<template v-else>
免费
</template>
</div>
<div>{{ item.ficti + item.sales }}人已下载</div>
</div>
</div>
</a>
</div>
<div v-if="loading" class="loading">
<i class="fa fa-spinner fa-spin"></i>
</div>
<div v-if="finished && materialList.length" class="finished">已全部加载完</div>
<div v-if="finished && !materialList.length" class="empty">
<img src="{__WAP_PATH}zsff/images/empty.png" alt="">
<div>暂无数据</div>
</div>
</div>
<quick-menu></quick-menu>
</div>
{/block}
{block name="foot"}
<script>
require(['vue', 'helper', 'store', 'quick'], function (Vue, axios, $http) {
var vm = new Vue({
el: '#app',
data: {
page: 1,
limit: 16,
loading: false,
finished: false,
materialList: []
},
created: function () {
this.getMaterialList();
},
mounted: function () {
this.$nextTick(function () {
$h.EventUtil.listenTouchDirection(document, function () {
vm.getMaterialList();
});
});
},
methods: {
// 获取资料列表
getMaterialList: function () {
if (this.loading || this.finished) {
return;
}
this.loading = true;
$http.basePost($h.U({
c: 'material',
a: 'my_material_list'
}), {
page: this.page++,
limit: this.limit
}, function (res) {
var materialList = res.data.data;
vm.loading = false;
vm.materialList = vm.materialList.concat(materialList);
vm.finished = vm.limit > materialList.length;
}, function () {
vm.loading = false;
});
}
}
});
});
</script>
{/block}