98 lines
2.0 KiB
Vue
98 lines
2.0 KiB
Vue
<template>
|
|
<view>
|
|
<view class="">
|
|
<z-paging ref="paging" v-model="contList" @query="queryList" :empty-view-text="$t('emptycg')">
|
|
<template #top>
|
|
<uni-nav-bar leftText=" " :fixed="true" :border="false" leftIcon="back" @clickLeft="leftClick" color="#000000" backgroundColor="#fff" :statusBar="true" :title="$t('navbar.drafts')"></uni-nav-bar>
|
|
</template>
|
|
<view class="t-conten" v-for="(item,index) in contList" :key="index" @click="findfn(item)">
|
|
<view> {{item.name}}</view>
|
|
<view class="find">
|
|
{{$t('view')}}
|
|
</view>
|
|
</view>
|
|
</z-paging>
|
|
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import { request,showToast } from '@/api/apiT.js'
|
|
export default {
|
|
data() {
|
|
return {
|
|
contList:[],
|
|
listlength:0,
|
|
}
|
|
},
|
|
onLoad() {
|
|
this.getcontList()
|
|
},
|
|
methods: {
|
|
leftClick(){
|
|
uni.navigateBack({})
|
|
},
|
|
getcontList(){
|
|
request({
|
|
url:'draft/list',
|
|
method:'get',
|
|
}).then(res => {
|
|
this.contList = res.data.data.list
|
|
})
|
|
},
|
|
queryList(pageNo, pageSize) {
|
|
console.log(pageNo)
|
|
console.log(pageSize)
|
|
var that = this;
|
|
request({
|
|
url:'draft/list',
|
|
method:'get',
|
|
data: {
|
|
page:pageNo,
|
|
limit:10
|
|
}
|
|
}).then(res => {
|
|
console.log(res.data)
|
|
if(res.data.code ==0){
|
|
var datas = res.data.data.list;
|
|
this.$refs.paging.complete(datas);
|
|
}else{
|
|
// this.$refs.paging.complete(null);
|
|
// that.listlength=0
|
|
}
|
|
uni.stopPullDownRefresh();
|
|
//
|
|
})
|
|
},
|
|
findfn(item){
|
|
uni.navigateTo({
|
|
url: '/pages/mine/drafts/draftsDetil?id='+item.id
|
|
});
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
.t-conten{
|
|
justify-content: space-between;
|
|
margin: 10px;
|
|
border-radius: 10px;
|
|
overflow: hidden;
|
|
background-color: white;
|
|
padding: 0px 10px;
|
|
display: flex;
|
|
height: 70px;
|
|
line-height: 70px;
|
|
font-weight: 500;
|
|
}
|
|
.uni-list{
|
|
background-color: #F9F9F9 !important;
|
|
}
|
|
.find{
|
|
color: #646465;
|
|
font-size: 13px;
|
|
}
|
|
</style>
|