<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Share on 时光纪念馆</title>
    <link>https://www.soulmap.cn/categories/share/</link>
    <description>Recent content in Share on 时光纪念馆</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>zh</language>
    <lastBuildDate>Wed, 23 Oct 2024 09:24:44 +0800</lastBuildDate><atom:link href="https://www.soulmap.cn/categories/share/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>复杂代码转存</title>
      <link>https://www.soulmap.cn/posts/blog/share-file/</link>
      <pubDate>Wed, 23 Oct 2024 09:24:44 +0800</pubDate>
      
      <guid>https://www.soulmap.cn/posts/blog/share-file/</guid>
      <description>我有一个layui编写的页面，当后端正常返回时显示正常问题，但是后端返回失败信息（但是返回码还是200）时就显示异常。涉及代码如下： def vhosthis_sync(): querydata = g.session.query(VhostInfo, BusinessInfo).join(BusinessInfo, VhostInfo.bus_id == BusinessInfo.ename).filter(VhostInfo.status == VhostInfoStatus.ARCHIVE) host_type = g.session.query(ParamDefined).filter(ParamDefined.dtype == &amp;#39;modules&amp;#39;).all() hosttypedict = {} for host_type_item in host_type: hosttypedict[host_type_item.dkey] = host_type_item.dvalue acount = querydata.count() results = querydata.all() try: for vhostinfo, businessinfo in results: vhostinfohis = VhostInfoHis() if vhostinfo.host_type in hosttypedict.keys(): vhostinfohis.dvalue = hosttypedict[vhostinfo.host_type] else: vhostinfohis.dvalue = &amp;#39;待分类&amp;#39; for key,value in vars(vhostinfo).items(): if hasattr(vhostinfohis,key): setattr(vhostinfohis,key,value) for key,value in</description>
    </item>
    
  </channel>
</rss>
