pull/30/head
陶士涵 5 years ago
parent 58a04c9700
commit 165ae5a154

@ -241,7 +241,7 @@ func folders(w http.ResponseWriter, r *http.Request) {
defer wg.Done() defer wg.Done()
folders := tools.GetFolders(mailServer.Server, mailServer.Email,mailServer.Password, fid) folders := tools.GetFolders(mailServer.Server, mailServer.Email,mailServer.Password, fid)
result["folders"]=folders result["folders"]=folders
result["total"]=folders[fid]
}() }()
go func() { go func() {
defer wg.Done() defer wg.Done()

@ -70,6 +70,13 @@
</el-timeline-item> </el-timeline-item>
</el-timeline> </el-timeline>
</div> </div>
<el-pagination
background
:current-page="page"
@current-change="getFolders"
layout="prev, pager, next"
:total="mailTotal">
</el-pagination>
</el-main> </el-main>
</el-container> </el-container>
</template> </template>
@ -82,13 +89,23 @@
data: { data: {
fullscreenLoading:true, fullscreenLoading:true,
folderlist:[], folderlist:[],
mailTotal:0,
page:1,
}, },
methods: { methods: {
//提交表单 //提交表单
getFolders: function () { getFolders: function (page) {
this.fullscreenLoading=true;
if(page==""){
page=1;
}
var data={};
data.page=page;
let _this = this; let _this = this;
$.get('/folders', function (rs) { $.get('/folders',data, function (rs) {
_this.folderlist=rs.result; _this.folderlist=rs.result;
_this.mailTotal=rs.result.total;
_this.fullscreenLoading=false;
}).then(()=>{ }).then(()=>{
_this.fullscreenLoading=false; _this.fullscreenLoading=false;
}); });

Loading…
Cancel
Save