<?php
if ( ! defined( 'ABSPATH' ) ) exit;

// 注意这里的类名，要和主文件里 YFJ_Module_ + ucfirst('bazi_zwpan') 对应
class YFJ_Module_Bazi_zwpan extends YFJ_Base_Module {

    public function __construct() {
        $this->module_id = 'bazi_zwpan';             // 1. 修改模块 ID
        $this->shortcode = 'yfj_bazi_zwpan';         // 2. 修改短代码
        $this->api_endpoint = '/v1/Bazi/zwpan';      // 3. 配置对应的真实 API 接口

        parent::__construct();
    }

    /**
     * 专属数据拦截与加工引擎 (重写基类方法)
     * 在这里可以对 API 返回的原始数据进行格式化、过滤或追加二次计算的自定义数据。
     */
    protected function process_api_data($raw_data) {
        // 1. 确保数据是数组格式，防止报错
        if (is_array($raw_data)) {
            //如果 API 没返回格局，给个默认的兜底值
            if (!isset($raw_data['base_info']['zhengge'])) {
                $raw_data['base_info']['zhengge'] = '未入格';
            }
        }

        //将处理后的数据返回给 views/result.php 进行渲染
        return $raw_data;
    }

    /**
     * 沙盒模式下的模拟数据
     */
    protected function get_demo_data($post_data) {
        //获取当前后台设置的语言
        $lang = get_option('yfj_language', 'zh-cn');

        // 1. 把你的完整 JSON 粘贴到单引号里面（要考虑到zh-cn 和 zh-tw）
        $demo_json_zh_cn = '{"errcode":0,"errmsg":"请求成功","notice":"本次测算结果仅供娱乐使用，请勿用于封建迷信和违法用途。","data":{"base_info":{"sex":"坤造","name":"张三","age":39,"gongli":"1988年01月08日12时20分","nongli":"1987年冬月十九日午时","mingsihua":"机同阴巨","minggong":"午","shengong":"午","zidou":"申","liudou":"卯","mingju":"水二局","mingzhu":"破军","shenzhu":"天同","yeargz":"丁卯","monthgz":"癸丑","daygz":"壬戌","hourgz":"丙午","yearnayin":"炉中火","monthnayin":"桑柘木","daynayin":"大海水","hournayin":"天河水","gendertype":"阴女"},"gong_pan":[{"minggong":"奴仆宫","yinshou":"辛亥","jiangxing":"指背","changsheng":"绝","daxian":"52-61","xiaoxian":"白虎","boshi":"奏书","ziweixing":"","ziweixing_xingyao":"","ziweixing_sihua":"","tianfuxing":"天梁","tianfuxing_xingyao":"陷","tianfuxing_sihua":"","monthxing":"天姚,天巫","monthxing_xingyao":"无,无","monthxing_sihua":"","hourxing":"","hourxing_xingyao":"","hourxing_sihua":"","yearganxing":"天魁,天福","yearganxing_xingyao":"庙,庙","yearganxing_sihua":"","yearzhixing":"","yearzhixing_xingyao":"","yearzhixing_sihua":"","qitaxing":"天使","qitaxing_xingyao":"旺","qitaxing_sihua":"","ziweixing_desc":"无紫微星入宫，暂时没有具体的详解，请参考其他副星的位置及其组合来判断吉凶。结合副星的吉凶属性，综合分析各个宫位的具体情况，才能更准确地做出命理判断。这需要考虑整体星象格局，才能得出更全面的结论。","tianfuxing_desc":"天梁星入奴仆宫，表示一个人可能意味着在工作上会面临挑战和困难，需要更加努力和付出更多的努力。","fuxing_desc":"此宫副星总体为吉，可视为加吉。天魁入奴仆宫，命主朋友多，能得朋友帮助。天姚入奴仆宫，命主朋友多，交际能力较强，也宜有异性缘。天巫入奴仆宫，主身边的朋友值得珍惜和长久的交往。天福入奴仆宫，主很高度重视友谊，只要朋友出了事，自己绝对不会无动于衷，即使自己吃大亏也会帮助。天使入奴仆宫，朋友关系复杂，容易结交品质不佳的朋友。友谊不稳固，常遭遇朋友背叛或欺骗，友情难以长久维持，社交圈较为动荡，需时常面对朋友关系的破裂和新结识的风险。此宫内吉凶交错，属正常现象。由于总体趋吉，故吉利因素的作用增强，不利因素的影响减弱。"},{"minggong":"迁移宫","yinshou":"壬子","jiangxing":"咸池","changsheng":"墓","daxian":"62-71","xiaoxian":"天德","boshi":"飞廉","ziweixing":"","ziweixing_xingyao":"","ziweixing_sihua":"","tianfuxing":"七杀","tianfuxing_xingyao":"旺","tianfuxing_sihua":"","monthxing":"右弼","monthxing_xingyao":"旺","monthxing_sihua":"","hourxing":"台辅","hourxing_xingyao":"无","hourxing_sihua":"","yearganxing":"","yearganxing_xingyao":"","yearganxing_sihua":"","yearzhixing":"咸池,红鸾","yearzhixing_xingyao":"陷,无","yearzhixing_sihua":"","qitaxing":"","qitaxing_xingyao":"","qitaxing_sihua":"","ziweixing_desc":"无紫微星入宫，暂时没有具体的详解，请参考其他副星的位置及其组合来判断吉凶。结合副星的吉凶属性，综合分析各个宫位的具体情况，才能更准确地做出命理判断。这需要考虑整体星象格局，才能得出更全面的结论。","tianfuxing_desc":"七杀星入迁移宫，代表了与他人的关系、人际交往等方面的变动。如果七杀被带到了迁移宫，可能意味着你将会遇到新的人际关系或者需要与他人合作完成某个任务，也可能意味着你需要加强人际交往能力才能更好地完成你的工作。","fuxing_desc":"此宫副星总体为吉，可视为加吉。右弼入迁移宫，主可因贵人的扶助而发达。或可得到同事的帮忙。红鸾入迁移宫，桃花运很旺，外出有人缘，会说话，所以会有外财，但遇到煞星容易有桃花劫。台辅入迁移宫，主自制力好，无论身处在何方总是循规蹈矩，不论表现究竟如何，这样的态度就深得众人的心。此宫内吉凶交错，属正常现象。由于总体趋吉，故吉利因素的作用增强，不利因素的影响减弱。"},{"minggong":"疾厄宫","yinshou":"癸丑","jiangxing":"月煞","changsheng":"死","daxian":"72-81","xiaoxian":"吊客","boshi":"喜神","ziweixing":"","ziweixing_xingyao":"","ziweixing_sihua":"","tianfuxing":"","tianfuxing_xingyao":"","tianfuxing_sihua":"","monthxing":"","monthxing_xingyao":"","monthxing_sihua":"","hourxing":"","hourxing_xingyao":"","hourxing_sihua":"","yearganxing":"","yearganxing_xingyao":"","yearganxing_sihua":"","yearzhixing":"寡宿","yearzhixing_xingyao":"平","yearzhixing_sihua":"","qitaxing":"天伤","qitaxing_xingyao":"平","qitaxing_sihua":"","ziweixing_desc":"无紫微星入宫，暂时没有具体的详解，请参考其他副星的位置及其组合来判断吉凶。结合副星的吉凶属性，综合分析各个宫位的具体情况，才能更准确地做出命理判断。这需要考虑整体星象格局，才能得出更全面的结论。","tianfuxing_desc":"无天府星入宫，暂时没有具体的详解，请参考其他副星的位置及其组合来判断吉凶。结合副星的吉凶属性，综合分析各个宫位的具体情况，才能更准确地做出命理判断。这需要考虑整体星象格局，才能得出更全面的结论。","fuxing_desc":"此宫副星总体为凶，可视为加煞。寡宿入疾厄宫，逢吉星，胸闷、易生闷气、常有心病。逢凶星，生病时乏人问津、照料。天伤入疾厄宫，健康状况不佳，易有慢性病或意外伤害。天伤星在此宫位提醒需要特别注意身体保养和预防疾病，定期体检，保持健康的生活方式，以避免健康上的问题。此宫内吉凶交错，属正常现象。由于总体趋凶，故不利因素的作用增强，吉利因素的影响减弱。"},{"minggong":"财帛宫","yinshou":"壬寅","jiangxing":"亡神","changsheng":"病","daxian":"82-91","xiaoxian":"病符","boshi":"病符","ziweixing":"廉贞","ziweixing_xingyao":"庙","ziweixing_sihua":"","tianfuxing":"","tianfuxing_xingyao":"","tianfuxing_sihua":"","monthxing":"左辅","monthxing_xingyao":"旺","monthxing_sihua":"","hourxing":"","hourxing_xingyao":"","hourxing_sihua":"","yearganxing":"天官,副空","yearganxing_xingyao":"平,无","yearganxing_sihua":"","yearzhixing":"","yearzhixing_xingyao":"","yearzhixing_sihua":"","qitaxing":"","qitaxing_xingyao":"","qitaxing_sihua":"","ziweixing_desc":"廉贞星入财帛宫，代表勤俭和节制。在财帛宫中出现，表示财富可能来源于勤俭节约和理性消费，需要注重财务管理和规划。适合从事需要节制和理性消费的行业，如财务管理、投资规划、审计等。","tianfuxing_desc":"无天府星入宫，暂时没有具体的详解，请参考其他副星的位置及其组合来判断吉凶。结合副星的吉凶属性，综合分析各个宫位的具体情况，才能更准确地做出命理判断。这需要考虑整体星象格局，才能得出更全面的结论。","fuxing_desc":"此宫副星总体为吉，可视为加吉。左辅入财帛宫，经常有钱，加禄、权、科皆更主富。加禄存更主福，加空劫，经常要周转。天官入财帛宫，主淡泊名利，不过分强求，够用就行。但是如果因社会地位或较高职位则容易得财。副空入财帛宫，财运不稳，聚财困难。经济上常有波折，容易陷入财务困境。对金钱的追求不强烈，生活中容易因理财不善而造成经济压力，财务状况不佳，需特别注意理财规划。此宫内吉凶交错，属正常现象。由于总体趋吉，故吉利因素的作用增强，不利因素的影响减弱。"},{"minggong":"子女宫","yinshou":"癸卯","jiangxing":"将星","changsheng":"衰","daxian":"92-101","xiaoxian":"岁建","boshi":"大耗","ziweixing":"","ziweixing_xingyao":"","ziweixing_sihua":"","tianfuxing":"","tianfuxing_xingyao":"","tianfuxing_sihua":"","monthxing":"","monthxing_xingyao":"","monthxing_sihua":"","hourxing":"","hourxing_xingyao":"","hourxing_sihua":"","yearganxing":"正空","yearganxing_xingyao":"无","yearganxing_sihua":"","yearzhixing":"天哭","yearzhixing_xingyao":"庙","yearzhixing_sihua":"","qitaxing":"火星,天贵","qitaxing_xingyao":"平,旺","qitaxing_sihua":"","ziweixing_desc":"无紫微星入宫，暂时没有具体的详解，请参考其他副星的位置及其组合来判断吉凶。结合副星的吉凶属性，综合分析各个宫位的具体情况，才能更准确地做出命理判断。这需要考虑整体星象格局，才能得出更全面的结论。","tianfuxing_desc":"无天府星入宫，暂时没有具体的详解，请参考其他副星的位置及其组合来判断吉凶。结合副星的吉凶属性，综合分析各个宫位的具体情况，才能更准确地做出命理判断。这需要考虑整体星象格局，才能得出更全面的结论。","fuxing_desc":"此宫副星总体为凶，可视为加煞。火星入子女宫，子女不多，且性暴急燥，行动敏捷，幼时易出乱子。会桃辰，有突来之桃花。若昌曲、魁钺、左右同宫，则子女可成器。天哭入子女宫，子女间难沟通，子女缘薄，或子女成长后离家，子女个性大都独立。天贵入子女宫，具有强烈的亲情和家庭责任感，经常因此而为家庭奉献。善于教育孩子，在子女成长期间也会努力为他们提供支持和指导。大耗入子女宫，与子女相处不睦，有代沟，亲子翻脸。若为阳宫，实施打骂教育，阴宫，则对子女管教严厉。正空入子女宫，在子女方面可能会遇到一些困难和挑战，主与儿女中间有隔阂，老来儿女杜绝，重则儿女不肖。此宫内吉凶交错，属正常现象。由于总体趋凶，故不利因素的作用增强，吉利因素的影响减弱。"},{"minggong":"夫妻宫","yinshou":"甲辰","jiangxing":"攀鞍","changsheng":"帝旺","daxian":"102-111","xiaoxian":"晦气","boshi":"伏兵","ziweixing":"","ziweixing_xingyao":"","ziweixing_sihua":"","tianfuxing":"破军","tianfuxing_xingyao":"旺","tianfuxing_sihua":"","monthxing":"","monthxing_xingyao":"","monthxing_sihua":"","hourxing":"文昌","hourxing_xingyao":"旺","hourxing_sihua":"","yearganxing":"","yearganxing_xingyao":"","yearganxing_sihua":"","yearzhixing":"天空","yearzhixing_xingyao":"庙","yearzhixing_sihua":"","qitaxing":"铃星","qitaxing_xingyao":"陷","qitaxing_sihua":"","ziweixing_desc":"无紫微星入宫，暂时没有具体的详解，请参考其他副星的位置及其组合来判断吉凶。结合副星的吉凶属性，综合分析各个宫位的具体情况，才能更准确地做出命理判断。这需要考虑整体星象格局，才能得出更全面的结论。","tianfuxing_desc":"破军入夫妻宫，代表在恋爱和婚姻中具有很强的冲劲和激情，但也需要注意保持冷静和理性，以避免过度的冲突和摩擦。","fuxing_desc":"此宫副星总体为凶，可视为加煞。文昌入夫妻宫，夫妻恩爱，有文艺才华，生活高雅。若文曲再与同宫会照，桃花多，男有情妇，女有情夫。火星入夫妻宫，旺宫独守不克，但亦主夫妻不和。若逢昌曲、左右、禄存、羊陀、空劫，则有刑克。魁钺同宫，可免刑克。余宫皆主婚姻易有突发之变化，闪电结婚，欠缺考虑。铃星入夫妻宫，若魁钺同宫，则可免刑克。余宫皆主婚姻易有突发之变化，闪电结婚，欠缺考虑。男命配偶泼辣，不善家务。女命配偶大方，不拘小节。此宫内吉凶交错，属正常现象。由于总体趋凶，故不利因素的作用增强，吉利因素的影响减弱。"},{"minggong":"兄弟宫","yinshou":"乙巳","jiangxing":"岁驿","changsheng":"临官","daxian":"112-121","xiaoxian":"丧门","boshi":"官府","ziweixing":"天同","ziweixing_xingyao":"庙","ziweixing_sihua":"权","tianfuxing":"","tianfuxing_xingyao":"","tianfuxing_sihua":"","monthxing":"","monthxing_xingyao":"","monthxing_sihua":"","hourxing":"地空,地劫","hourxing_xingyao":"庙,闲","hourxing_sihua":"","yearganxing":"陀罗","yearganxing_xingyao":"陷","yearganxing_sihua":"","yearzhixing":"天马,孤辰,蜚廉,破碎","yearzhixing_xingyao":"平,陷,无,陷","yearzhixing_sihua":"","qitaxing":"","qitaxing_xingyao":"","qitaxing_sihua":"","ziweixing_desc":"天同入兄弟宫，代表兄弟之间思想相似，共同爱好和目标，容易形成集体力量，但也可能出现群体性格和思维定势，需要注意在兄弟之间的独立性和个性发展。","tianfuxing_desc":"无天府星入宫，暂时没有具体的详解，请参考其他副星的位置及其组合来判断吉凶。结合副星的吉凶属性，综合分析各个宫位的具体情况，才能更准确地做出命理判断。这需要考虑整体星象格局，才能得出更全面的结论。","fuxing_desc":"此宫副星总体为凶，可视为加煞。陀罗入兄弟宫，主兄弟单薄，性格沉闷，性情难捉摸，兄弟间多争执、隔阂，意见相左。地劫入兄弟宫，兄弟朋友无助力，易见夭折或聚少离多，不宜有过多的金钱往来。天马入兄弟宫，兄弟朋友不局限于一个职业，较杂，或朋友多为泛泛之交。有分居异地之象，天各一方聚少离多。孤辰入兄弟宫，逢吉星则手足间聚少离多、思想难沟通，各自为政。逢凶星则缘份淡，如同陌路，易有争讼。地空入兄弟宫，主手足难为，缘分淡薄，貌合神离。蜚廉入兄弟宫，与兄弟姐妹关系紧张，易有口舌之争，常因小事引发纠纷。家庭氛围不和谐，兄弟姐妹间互相猜忌，难以互相信任和支持，甚至可能出现反目成仇的情况。破碎入兄弟宫，和亲戚的关系比较淡，不强求，有矛盾时做得出断绝关系的事。无意于要为与朋友建立亲密的友谊而各种抓紧对方不放手，发现道不同就自行斩断关系。此宫内吉凶交错，属正常现象。由于总体趋凶，故不利因素的作用增强，吉利因素的影响减弱。"},{"minggong":"命宫","yinshou":"丙午","jiangxing":"息神","changsheng":"冠带","daxian":"2-11","xiaoxian":"贯索","boshi":"博士","ziweixing":"武曲","ziweixing_xingyao":"旺","ziweixing_sihua":"","tianfuxing":"天府","tianfuxing_xingyao":"旺","tianfuxing_sihua":"","monthxing":"阴煞","monthxing_xingyao":"无","monthxing_sihua":"","hourxing":"","hourxing_xingyao":"","hourxing_sihua":"","yearganxing":"禄存","yearganxing_xingyao":"庙","yearganxing_sihua":"","yearzhixing":"天喜","yearzhixing_xingyao":"庙","yearzhixing_sihua":"","qitaxing":"八座","qitaxing_xingyao":"旺","qitaxing_sihua":"","ziweixing_desc":"武曲星入命宫，是一颗吉星，代表着勇气、决断和战斗力。武曲入命的人通常具有冒险精神、果断和勇敢的特点，能够在困难和危险的情况下保持冷静和应对挑战。这些人在军事、竞技和创业领域中往往能够获得成功。","tianfuxing_desc":"天府星入命宫，是一颗吉星，代表着家庭、财富和幸福。天府入命的人通常具有温和、善良、贤惠的特点，注重家庭和人际关系，并且对物质生活有较高的追求。这些人在家庭和事业方面往往能够获得较好的平衡和成功。","fuxing_desc":"此宫副星总体为吉，可视为加吉。禄存入命宫，为人防御心强，虽较缺乏与人交往工作才能和方式，也不太喜爱展示出自己，但祸事也不会被波及。阴煞入命宫，主性情阴沉多变，敏感多疑，胡思乱想，疑神疑鬼，常无缘无故的情绪低落，小孩易受惊。八座入命宫，若主星庙旺得数，则命带八品，是有官贵之人，主处事稳健，更有着细密的心思，对于一件事情总能看得透彻。天喜入命宫，主婚姻喜庆。为避凶星，逃难星，消灾星，能化凶为吉。一喜可破三煞，主其人早婚，美貌或增加人口。但若遇截空、旬空则不吉。此宫内吉凶交错，属正常现象。由于总体趋吉，故吉利因素的作用增强，不利因素的影响减弱。"},{"minggong":"父母宫","yinshou":"丁未","jiangxing":"华盖","changsheng":"沐浴","daxian":"12-21","xiaoxian":"官符","boshi":"力士","ziweixing":"太阳","ziweixing_xingyao":"旺","ziweixing_sihua":"","tianfuxing":"太阴","tianfuxing_xingyao":"陷","tianfuxing_sihua":"禄","monthxing":"天刑","monthxing_xingyao":"无","monthxing_sihua":"","hourxing":"","hourxing_xingyao":"","hourxing_sihua":"","yearganxing":"擎羊","yearganxing_xingyao":"庙","yearganxing_sihua":"","yearzhixing":"龙池,凤阁,解神,华盖","yearzhixing_xingyao":"庙,陷,平,陷","yearzhixing_sihua":"","qitaxing":"","qitaxing_xingyao":"","qitaxing_sihua":"","ziweixing_desc":"太阳星入父母宫，代表着领导能力、自信心和阳光气质，有利于领导地位的提升，太阳主人通常有父母的支持和关心，也可能具有领导才能，能够为家族事业做出贡献。但也可能因此显得过于自我、独断独行。","tianfuxing_desc":"太阴星入父母宫，代表着柔情、感性，有利于从事文学、艺术等职业，太阴主人通常会得到父母的照顾和关爱，也可能具有较强的敏感和表达能力，但也可能因此带来过于情绪化、自我放纵的性格特点。","fuxing_desc":"此宫副星总体为吉，可视为加吉。擎羊入父母宫，与父母缘浅，容易针锋相对，或与父母意见相左。天刑入父母宫，主其人缘薄。即使有吉曜同宫，其人也与父母缘薄。若逢凶曜，则恐其人不利双亲。龙池入父母宫，主雍容大度，做任何事情总能不慌不忙，除了自己有本领外，更重要的是因为双亲很有学养。凤阁入父母宫，双亲生活讲究品味，不仅享受生活，更重视外在的体面，你的父母更教导了你正确的人生态度。解神入父母宫，主的父母不只是慈祥，更关心子女，而且和小孩子更是没有代沟。虽然管教严厉，但严肃的背后其实有更大的包容。此宫内吉凶交错，属正常现象。由于总体趋吉，故吉利因素的作用增强，不利因素的影响减弱。"},{"minggong":"福德宫","yinshou":"戊申","jiangxing":"劫煞","changsheng":"长生","daxian":"22-31","xiaoxian":"小耗","boshi":"青龙","ziweixing":"","ziweixing_xingyao":"","ziweixing_sihua":"","tianfuxing":"贪狼","tianfuxing_xingyao":"平","tianfuxing_sihua":"","monthxing":"","monthxing_xingyao":"","monthxing_sihua":"","hourxing":"封诰","hourxing_xingyao":"无","hourxing_sihua":"","yearganxing":"","yearganxing_xingyao":"","yearganxing_sihua":"","yearzhixing":"劫杀,大耗","yearzhixing_xingyao":"平,陷","yearzhixing_sihua":"","qitaxing":"三台","qitaxing_xingyao":"平","qitaxing_sihua":"","ziweixing_desc":"无紫微星入宫，暂时没有具体的详解，请参考其他副星的位置及其组合来判断吉凶。结合副星的吉凶属性，综合分析各个宫位的具体情况，才能更准确地做出命理判断。这需要考虑整体星象格局，才能得出更全面的结论。","tianfuxing_desc":"贪狼星入福德宫，代表着自己的事业和名声，以及可能获得的荣誉和财富。如果贪狼宫内的星宿被其它凶星破坏，则可能会遇到困难和挫折，影响事业发展。但如果贪狼宫内的星宿得到其他吉星的庇佑，则有可能在事业上获得成功和财富。","fuxing_desc":"此宫副星总体为凶，可视为加煞。封诰入福德宫，运气不是最好，但因为有颗善良的人心，总能设身处地为人着想，福报多，所以不知不觉间运气也慢慢变好了。三台入福德宫，主很公正，总是站在天秤的中间，不随便偏袒哪一方，操守更是光明磊落，既不容易得罪人，也容易交到朋友。大耗入福德宫，内心有不这人知的一面。阳宫，守不玉碎不为瓦全。阴宫，逢挫折常自虐，消耗自己的能量。劫杀入福德宫，内心不安，情绪波动大，易因突发事件感到焦虑。精神压力大，生活中常有不如意的事情发生。心理状态不佳，难以享受生活中的乐趣和幸福感。此宫内吉凶交错，属正常现象。由于总体趋凶，故不利因素的作用增强，吉利因素的影响减弱。"},{"minggong":"田宅宫","yinshou":"己酉","jiangxing":"灾煞","changsheng":"养","daxian":"32-41","xiaoxian":"大耗","boshi":"小耗","ziweixing":"天机","ziweixing_xingyao":"旺","ziweixing_sihua":"科","tianfuxing":"巨门","tianfuxing_xingyao":"旺","tianfuxing_sihua":"忌","monthxing":"","monthxing_xingyao":"","monthxing_sihua":"","hourxing":"","hourxing_xingyao":"","hourxing_sihua":"","yearganxing":"天钺","yearganxing_xingyao":"庙","yearganxing_sihua":"","yearzhixing":"天虚","yearzhixing_xingyao":"旺","yearzhixing_sihua":"","qitaxing":"恩光,天才,天寿","qitaxing_xingyao":"陷,旺,平","qitaxing_sihua":"","ziweixing_desc":"天机星入田宅宫，代表着个人的房屋结构和设计，以及家庭环境的协调性。这个位置会对一个人的家庭生活产生积极的影响。","tianfuxing_desc":"巨门星入田宅宫，代表着个人在家庭、房产或土地方面将取得显著的成功和成就，赢得家庭和社会的尊重和认可。","fuxing_desc":"此宫副星总体为吉，可视为加吉。天钺入田宅宫，在不动产的处理干净俐落，不会碰到诸如产权不清、权状不明等情事，也不会因不动产之事而发生诉讼之事。天虚入田宅宫，主资金容易周转不灵或者生意上亏损，只能变卖不动产，生活水平下降、经济情况容易陷入低谷。恩光入田宅宫，容易遇到关系好的邻居，家居布置典雅，环境安和宁静，注重生活品质。天才入田宅宫，主看一件事情总和别人有不同角度，就连住的地方也奇特，不仅房屋外观有特色，不仅展现了自己的风格，更显现了自己的别出心裁。天寿入田宅宫，主不爱贵气爱平凡，居家环境总是朴实无华，虽然摆饰很简单，但身边邻居的态度却让这间平凡小屋变得一点也不平凡，而且更增添了热闹。大耗入田宅宫，主不动产有破败。若入田宅宫会流耗，则易遭窃盗，若加火星并巨暗入命，或田宅，主有火灾。阳宫，耗田宅。阴宫，自己处理不当而造成不动产的损失。此宫内吉凶交错，属正常现象。由于总体趋吉，故吉利因素的作用增强，不利因素的影响减弱。"},{"minggong":"官禄宫","yinshou":"庚戌","jiangxing":"天煞","changsheng":"胎","daxian":"42-51","xiaoxian":"龙德","boshi":"将军","ziweixing":"紫微","ziweixing_xingyao":"陷","ziweixing_sihua":"","tianfuxing":"天相","tianfuxing_xingyao":"陷","tianfuxing_sihua":"","monthxing":"天月","monthxing_xingyao":"无","monthxing_sihua":"","hourxing":"文曲","hourxing_xingyao":"陷","hourxing_sihua":"","yearganxing":"","yearganxing_xingyao":"","yearganxing_sihua":"","yearzhixing":"","yearzhixing_xingyao":"","yearzhixing_sihua":"","qitaxing":"","qitaxing_xingyao":"","qitaxing_sihua":"","ziweixing_desc":"紫微星入官禄宫，表示职业和事业上的成功和晋升，以及稳定的收入来源。同时，也表示该人可能从事政府或官方机构的工作。","tianfuxing_desc":"天相星入官禄宫，表示该人有可能从事艺术、音乐、舞蹈等领域的工作，以及从事摄影、设计、创意等领域。","fuxing_desc":"此宫副星总体为吉，可视为加吉。文曲入官禄宫，主的学术文化享盛名，寅午戌力微。喜禄存、太阳，文武双全。天月入官禄宫，主读书平平、少有表现，不过工作状况却很不错，总是能将一份工作维持得很久，但就是少了分企图心。此宫内吉凶交错，属正常现象。由于总体趋吉，故吉利因素的作用增强，不利因素的影响减弱。"}]}}';
        $demo_json_zh_tw = '{"errcode":0,"errmsg":"請求成功","notice":"本次測算結果僅供娛樂使用，請勿用於封建迷信和違法用途。","data":{"base_info":{"sex":"坤造","name":"張三","age":39,"gongli":"1988年01月08日12時20分","nongli":"1987年冬月十九日午時","mingsihua":"機同陰巨","minggong":"午","shengong":"午","zidou":"申","liudou":"卯","mingju":"水二局","mingzhu":"破軍","shenzhu":"天同","yeargz":"丁卯","monthgz":"癸丑","daygz":"壬戌","hourgz":"丙午","yearnayin":"爐中火","monthnayin":"桑柘木","daynayin":"大海水","hournayin":"天河水","gendertype":"陰女"},"gong_pan":[{"minggong":"奴仆宮","yinshou":"辛亥","jiangxing":"指背","changsheng":"絕","daxian":"52-61","xiaoxian":"白虎","boshi":"奏書","ziweixing":"","ziweixing_xingyao":"","ziweixing_sihua":"","tianfuxing":"天梁","tianfuxing_xingyao":"陷","tianfuxing_sihua":"","monthxing":"天姚,天巫","monthxing_xingyao":"無,無","monthxing_sihua":"","hourxing":"","hourxing_xingyao":"","hourxing_sihua":"","yearganxing":"天魁,天福","yearganxing_xingyao":"廟,廟","yearganxing_sihua":"","yearzhixing":"","yearzhixing_xingyao":"","yearzhixing_sihua":"","qitaxing":"天使","qitaxing_xingyao":"旺","qitaxing_sihua":"","ziweixing_desc":"無紫微星入宮，暫時沒有具體的詳解，請參考其他副星的位置及其組合來判斷吉兇。結合副星的吉兇屬性，綜合分析各個宮位的具體情況，才能更準確地做出命理判斷。這需要考慮整體星象格局，才能得出更全面的結論。","tianfuxing_desc":"天梁星入奴仆宮，表示一個人可能意味著在工作上會面臨挑戰和困難，需要更加努力和付出更多的努力。","fuxing_desc":"此宮副星總體為吉，可視為加吉。天魁入奴仆宮，命主朋友多，能得朋友幫助。天姚入奴仆宮，命主朋友多，交際能力較強，也宜有異性緣。天巫入奴仆宮，主身邊的朋友值得珍惜和長久的交往。天福入奴仆宮，主很高度重視友誼，只要朋友出了事，自己絕對不會無動於衷，即使自己吃大虧也會幫助。天使入奴仆宮，朋友關系復雜，容易結交品質不佳的朋友。友誼不穩固，常遭遇朋友背叛或欺騙，友情難以長久維持，社交圈較為動蕩，需時常面對朋友關系的破裂和新結識的風險。此宮內吉兇交錯，屬正常現象。由於總體趨吉，故吉利因素的作用增強，不利因素的影響減弱。"},{"minggong":"遷移宮","yinshou":"壬子","jiangxing":"鹹池","changsheng":"墓","daxian":"62-71","xiaoxian":"天德","boshi":"飛廉","ziweixing":"","ziweixing_xingyao":"","ziweixing_sihua":"","tianfuxing":"七殺","tianfuxing_xingyao":"旺","tianfuxing_sihua":"","monthxing":"右弼","monthxing_xingyao":"旺","monthxing_sihua":"","hourxing":"臺輔","hourxing_xingyao":"無","hourxing_sihua":"","yearganxing":"","yearganxing_xingyao":"","yearganxing_sihua":"","yearzhixing":"鹹池,紅鸞","yearzhixing_xingyao":"陷,無","yearzhixing_sihua":"","qitaxing":"","qitaxing_xingyao":"","qitaxing_sihua":"","ziweixing_desc":"無紫微星入宮，暫時沒有具體的詳解，請參考其他副星的位置及其組合來判斷吉兇。結合副星的吉兇屬性，綜合分析各個宮位的具體情況，才能更準確地做出命理判斷。這需要考慮整體星象格局，才能得出更全面的結論。","tianfuxing_desc":"七殺星入遷移宮，代表了與他人的關系、人際交往等方面的變動。如果七殺被帶到了遷移宮，可能意味著你將會遇到新的人際關系或者需要與他人合作完成某個任務，也可能意味著你需要加強人際交往能力才能更好地完成你的工作。","fuxing_desc":"此宮副星總體為吉，可視為加吉。右弼入遷移宮，主可因貴人的扶助而發達。或可得到同事的幫忙。紅鸞入遷移宮，桃花運很旺，外出有人緣，會說話，所以會有外財，但遇到煞星容易有桃花劫。臺輔入遷移宮，主自製力好，無論身處在何方總是循規蹈矩，不論表現究竟如何，這樣的態度就深得眾人的心。此宮內吉兇交錯，屬正常現象。由於總體趨吉，故吉利因素的作用增強，不利因素的影響減弱。"},{"minggong":"疾厄宮","yinshou":"癸丑","jiangxing":"月煞","changsheng":"死","daxian":"72-81","xiaoxian":"吊客","boshi":"喜神","ziweixing":"","ziweixing_xingyao":"","ziweixing_sihua":"","tianfuxing":"","tianfuxing_xingyao":"","tianfuxing_sihua":"","monthxing":"","monthxing_xingyao":"","monthxing_sihua":"","hourxing":"","hourxing_xingyao":"","hourxing_sihua":"","yearganxing":"","yearganxing_xingyao":"","yearganxing_sihua":"","yearzhixing":"寡宿","yearzhixing_xingyao":"平","yearzhixing_sihua":"","qitaxing":"天傷","qitaxing_xingyao":"平","qitaxing_sihua":"","ziweixing_desc":"無紫微星入宮，暫時沒有具體的詳解，請參考其他副星的位置及其組合來判斷吉兇。結合副星的吉兇屬性，綜合分析各個宮位的具體情況，才能更準確地做出命理判斷。這需要考慮整體星象格局，才能得出更全面的結論。","tianfuxing_desc":"無天府星入宮，暫時沒有具體的詳解，請參考其他副星的位置及其組合來判斷吉兇。結合副星的吉兇屬性，綜合分析各個宮位的具體情況，才能更準確地做出命理判斷。這需要考慮整體星象格局，才能得出更全面的結論。","fuxing_desc":"此宮副星總體為兇，可視為加煞。寡宿入疾厄宮，逢吉星，胸悶、易生悶氣、常有心病。逢兇星，生病時乏人問津、照料。天傷入疾厄宮，健康狀況不佳，易有慢性病或意外傷害。天傷星在此宮位提醒需要特別註意身體保養和預防疾病，定期體檢，保持健康的生活方式，以避免健康上的問題。此宮內吉兇交錯，屬正常現象。由於總體趨兇，故不利因素的作用增強，吉利因素的影響減弱。"},{"minggong":"財帛宮","yinshou":"壬寅","jiangxing":"亡神","changsheng":"病","daxian":"82-91","xiaoxian":"病符","boshi":"病符","ziweixing":"廉貞","ziweixing_xingyao":"廟","ziweixing_sihua":"","tianfuxing":"","tianfuxing_xingyao":"","tianfuxing_sihua":"","monthxing":"左輔","monthxing_xingyao":"旺","monthxing_sihua":"","hourxing":"","hourxing_xingyao":"","hourxing_sihua":"","yearganxing":"天官,副空","yearganxing_xingyao":"平,無","yearganxing_sihua":"","yearzhixing":"","yearzhixing_xingyao":"","yearzhixing_sihua":"","qitaxing":"","qitaxing_xingyao":"","qitaxing_sihua":"","ziweixing_desc":"廉貞星入財帛宮，代表勤儉和節製。在財帛宮中出現，表示財富可能來源於勤儉節約和理性消費，需要註重財務管理和規劃。適合從事需要節製和理性消費的行業，如財務管理、投資規劃、審計等。","tianfuxing_desc":"無天府星入宮，暫時沒有具體的詳解，請參考其他副星的位置及其組合來判斷吉兇。結合副星的吉兇屬性，綜合分析各個宮位的具體情況，才能更準確地做出命理判斷。這需要考慮整體星象格局，才能得出更全面的結論。","fuxing_desc":"此宮副星總體為吉，可視為加吉。左輔入財帛宮，經常有錢，加祿、權、科皆更主富。加祿存更主福，加空劫，經常要周轉。天官入財帛宮，主淡泊名利，不過分強求，夠用就行。但是如果因社會地位或較高職位則容易得財。副空入財帛宮，財運不穩，聚財困難。經濟上常有波折，容易陷入財務困境。對金錢的追求不強烈，生活中容易因理財不善而造成經濟壓力，財務狀況不佳，需特別註意理財規劃。此宮內吉兇交錯，屬正常現象。由於總體趨吉，故吉利因素的作用增強，不利因素的影響減弱。"},{"minggong":"子女宮","yinshou":"癸卯","jiangxing":"將星","changsheng":"衰","daxian":"92-101","xiaoxian":"歲建","boshi":"大耗","ziweixing":"","ziweixing_xingyao":"","ziweixing_sihua":"","tianfuxing":"","tianfuxing_xingyao":"","tianfuxing_sihua":"","monthxing":"","monthxing_xingyao":"","monthxing_sihua":"","hourxing":"","hourxing_xingyao":"","hourxing_sihua":"","yearganxing":"正空","yearganxing_xingyao":"無","yearganxing_sihua":"","yearzhixing":"天哭","yearzhixing_xingyao":"廟","yearzhixing_sihua":"","qitaxing":"火星,天貴","qitaxing_xingyao":"平,旺","qitaxing_sihua":"","ziweixing_desc":"無紫微星入宮，暫時沒有具體的詳解，請參考其他副星的位置及其組合來判斷吉兇。結合副星的吉兇屬性，綜合分析各個宮位的具體情況，才能更準確地做出命理判斷。這需要考慮整體星象格局，才能得出更全面的結論。","tianfuxing_desc":"無天府星入宮，暫時沒有具體的詳解，請參考其他副星的位置及其組合來判斷吉兇。結合副星的吉兇屬性，綜合分析各個宮位的具體情況，才能更準確地做出命理判斷。這需要考慮整體星象格局，才能得出更全面的結論。","fuxing_desc":"此宮副星總體為兇，可視為加煞。火星入子女宮，子女不多，且性暴急燥，行動敏捷，幼時易出亂子。會桃辰，有突來之桃花。若昌曲、魁鉞、左右同宮，則子女可成器。天哭入子女宮，子女間難溝通，子女緣薄，或子女成長後離家，子女個性大都獨立。天貴入子女宮，具有強烈的親情和家庭責任感，經常因此而為家庭奉獻。善於教育孩子，在子女成長期間也會努力為他們提供支持和指導。大耗入子女宮，與子女相處不睦，有代溝，親子翻臉。若為陽宮，實施打罵教育，陰宮，則對子女管教嚴厲。正空入子女宮，在子女方面可能會遇到一些困難和挑戰，主與兒女中間有隔閡，老來兒女杜絕，重則兒女不肖。此宮內吉兇交錯，屬正常現象。由於總體趨兇，故不利因素的作用增強，吉利因素的影響減弱。"},{"minggong":"夫妻宮","yinshou":"甲辰","jiangxing":"攀鞍","changsheng":"帝旺","daxian":"102-111","xiaoxian":"晦氣","boshi":"伏兵","ziweixing":"","ziweixing_xingyao":"","ziweixing_sihua":"","tianfuxing":"破軍","tianfuxing_xingyao":"旺","tianfuxing_sihua":"","monthxing":"","monthxing_xingyao":"","monthxing_sihua":"","hourxing":"文昌","hourxing_xingyao":"旺","hourxing_sihua":"","yearganxing":"","yearganxing_xingyao":"","yearganxing_sihua":"","yearzhixing":"天空","yearzhixing_xingyao":"廟","yearzhixing_sihua":"","qitaxing":"鈴星","qitaxing_xingyao":"陷","qitaxing_sihua":"","ziweixing_desc":"無紫微星入宮，暫時沒有具體的詳解，請參考其他副星的位置及其組合來判斷吉兇。結合副星的吉兇屬性，綜合分析各個宮位的具體情況，才能更準確地做出命理判斷。這需要考慮整體星象格局，才能得出更全面的結論。","tianfuxing_desc":"破軍入夫妻宮，代表在戀愛和婚姻中具有很強的沖勁和激情，但也需要註意保持冷靜和理性，以避免過度的沖突和摩擦。","fuxing_desc":"此宮副星總體為兇，可視為加煞。文昌入夫妻宮，夫妻恩愛，有文藝才華，生活高雅。若文曲再與同宮會照，桃花多，男有情婦，女有情夫。火星入夫妻宮，旺宮獨守不克，但亦主夫妻不和。若逢昌曲、左右、祿存、羊陀、空劫，則有刑克。魁鉞同宮，可免刑克。余宮皆主婚姻易有突發之變化，閃電結婚，欠缺考慮。鈴星入夫妻宮，若魁鉞同宮，則可免刑克。余宮皆主婚姻易有突發之變化，閃電結婚，欠缺考慮。男命配偶潑辣，不善家務。女命配偶大方，不拘小節。此宮內吉兇交錯，屬正常現象。由於總體趨兇，故不利因素的作用增強，吉利因素的影響減弱。"},{"minggong":"兄弟宮","yinshou":"乙巳","jiangxing":"歲驛","changsheng":"臨官","daxian":"112-121","xiaoxian":"喪門","boshi":"官府","ziweixing":"天同","ziweixing_xingyao":"廟","ziweixing_sihua":"權","tianfuxing":"","tianfuxing_xingyao":"","tianfuxing_sihua":"","monthxing":"","monthxing_xingyao":"","monthxing_sihua":"","hourxing":"地空,地劫","hourxing_xingyao":"廟,閑","hourxing_sihua":"","yearganxing":"陀羅","yearganxing_xingyao":"陷","yearganxing_sihua":"","yearzhixing":"天馬,孤辰,蜚廉,破碎","yearzhixing_xingyao":"平,陷,無,陷","yearzhixing_sihua":"","qitaxing":"","qitaxing_xingyao":"","qitaxing_sihua":"","ziweixing_desc":"天同入兄弟宮，代表兄弟之間思想相似，共同愛好和目標，容易形成集體力量，但也可能出現群體性格和思維定勢，需要註意在兄弟之間的獨立性和個性發展。","tianfuxing_desc":"無天府星入宮，暫時沒有具體的詳解，請參考其他副星的位置及其組合來判斷吉兇。結合副星的吉兇屬性，綜合分析各個宮位的具體情況，才能更準確地做出命理判斷。這需要考慮整體星象格局，才能得出更全面的結論。","fuxing_desc":"此宮副星總體為兇，可視為加煞。陀羅入兄弟宮，主兄弟單薄，性格沈悶，性情難捉摸，兄弟間多爭執、隔閡，意見相左。地劫入兄弟宮，兄弟朋友無助力，易見夭折或聚少離多，不宜有過多的金錢往來。天馬入兄弟宮，兄弟朋友不局限於一個職業，較雜，或朋友多為泛泛之交。有分居異地之象，天各一方聚少離多。孤辰入兄弟宮，逢吉星則手足間聚少離多、思想難溝通，各自為政。逢兇星則緣份淡，如同陌路，易有爭訟。地空入兄弟宮，主手足難為，緣分淡薄，貌合神離。蜚廉入兄弟宮，與兄弟姐妹關系緊張，易有口舌之爭，常因小事引發糾紛。家庭氛圍不和諧，兄弟姐妹間互相猜忌，難以互相信任和支持，甚至可能出現反目成仇的情況。破碎入兄弟宮，和親戚的關系比較淡，不強求，有矛盾時做得出斷絕關系的事。無意於要為與朋友建立親密的友誼而各種抓緊對方不放手，發現道不同就自行斬斷關系。此宮內吉兇交錯，屬正常現象。由於總體趨兇，故不利因素的作用增強，吉利因素的影響減弱。"},{"minggong":"命宮","yinshou":"丙午","jiangxing":"息神","changsheng":"冠帶","daxian":"2-11","xiaoxian":"貫索","boshi":"博士","ziweixing":"武曲","ziweixing_xingyao":"旺","ziweixing_sihua":"","tianfuxing":"天府","tianfuxing_xingyao":"旺","tianfuxing_sihua":"","monthxing":"陰煞","monthxing_xingyao":"無","monthxing_sihua":"","hourxing":"","hourxing_xingyao":"","hourxing_sihua":"","yearganxing":"祿存","yearganxing_xingyao":"廟","yearganxing_sihua":"","yearzhixing":"天喜","yearzhixing_xingyao":"廟","yearzhixing_sihua":"","qitaxing":"八座","qitaxing_xingyao":"旺","qitaxing_sihua":"","ziweixing_desc":"武曲星入命宮，是一顆吉星，代表著勇氣、決斷和戰鬥力。武曲入命的人通常具有冒險精神、果斷和勇敢的特點，能夠在困難和危險的情況下保持冷靜和應對挑戰。這些人在軍事、競技和創業領域中往往能夠獲得成功。","tianfuxing_desc":"天府星入命宮，是一顆吉星，代表著家庭、財富和幸福。天府入命的人通常具有溫和、善良、賢惠的特點，註重家庭和人際關系，並且對物質生活有較高的追求。這些人在家庭和事業方面往往能夠獲得較好的平衡和成功。","fuxing_desc":"此宮副星總體為吉，可視為加吉。祿存入命宮，為人防禦心強，雖較缺乏與人交往工作才能和方式，也不太喜愛展示出自己，但禍事也不會被波及。陰煞入命宮，主性情陰沈多變，敏感多疑，胡思亂想，疑神疑鬼，常無緣無故的情緒低落，小孩易受驚。八座入命宮，若主星廟旺得數，則命帶八品，是有官貴之人，主處事穩健，更有著細密的心思，對於一件事情總能看得透徹。天喜入命宮，主婚姻喜慶。為避兇星，逃難星，消災星，能化兇為吉。一喜可破三煞，主其人早婚，美貌或增加人口。但若遇截空、旬空則不吉。此宮內吉兇交錯，屬正常現象。由於總體趨吉，故吉利因素的作用增強，不利因素的影響減弱。"},{"minggong":"父母宮","yinshou":"丁未","jiangxing":"華蓋","changsheng":"沐浴","daxian":"12-21","xiaoxian":"官符","boshi":"力士","ziweixing":"太陽","ziweixing_xingyao":"旺","ziweixing_sihua":"","tianfuxing":"太陰","tianfuxing_xingyao":"陷","tianfuxing_sihua":"祿","monthxing":"天刑","monthxing_xingyao":"無","monthxing_sihua":"","hourxing":"","hourxing_xingyao":"","hourxing_sihua":"","yearganxing":"擎羊","yearganxing_xingyao":"廟","yearganxing_sihua":"","yearzhixing":"龍池,鳳閣,解神,華蓋","yearzhixing_xingyao":"廟,陷,平,陷","yearzhixing_sihua":"","qitaxing":"","qitaxing_xingyao":"","qitaxing_sihua":"","ziweixing_desc":"太陽星入父母宮，代表著領導能力、自信心和陽光氣質，有利於領導地位的提升，太陽主人通常有父母的支持和關心，也可能具有領導才能，能夠為家族事業做出貢獻。但也可能因此顯得過於自我、獨斷獨行。","tianfuxing_desc":"太陰星入父母宮，代表著柔情、感性，有利於從事文學、藝術等職業，太陰主人通常會得到父母的照顧和關愛，也可能具有較強的敏感和表達能力，但也可能因此帶來過於情緒化、自我放縱的性格特點。","fuxing_desc":"此宮副星總體為吉，可視為加吉。擎羊入父母宮，與父母緣淺，容易針鋒相對，或與父母意見相左。天刑入父母宮，主其人緣薄。即使有吉曜同宮，其人也與父母緣薄。若逢兇曜，則恐其人不利雙親。龍池入父母宮，主雍容大度，做任何事情總能不慌不忙，除了自己有本領外，更重要的是因為雙親很有學養。鳳閣入父母宮，雙親生活講究品味，不僅享受生活，更重視外在的體面，你的父母更教導了你正確的人生態度。解神入父母宮，主的父母不只是慈祥，更關心子女，而且和小孩子更是沒有代溝。雖然管教嚴厲，但嚴肅的背後其實有更大的包容。此宮內吉兇交錯，屬正常現象。由於總體趨吉，故吉利因素的作用增強，不利因素的影響減弱。"},{"minggong":"福德宮","yinshou":"戊申","jiangxing":"劫煞","changsheng":"長生","daxian":"22-31","xiaoxian":"小耗","boshi":"青龍","ziweixing":"","ziweixing_xingyao":"","ziweixing_sihua":"","tianfuxing":"貪狼","tianfuxing_xingyao":"平","tianfuxing_sihua":"","monthxing":"","monthxing_xingyao":"","monthxing_sihua":"","hourxing":"封誥","hourxing_xingyao":"無","hourxing_sihua":"","yearganxing":"","yearganxing_xingyao":"","yearganxing_sihua":"","yearzhixing":"劫殺,大耗","yearzhixing_xingyao":"平,陷","yearzhixing_sihua":"","qitaxing":"三臺","qitaxing_xingyao":"平","qitaxing_sihua":"","ziweixing_desc":"無紫微星入宮，暫時沒有具體的詳解，請參考其他副星的位置及其組合來判斷吉兇。結合副星的吉兇屬性，綜合分析各個宮位的具體情況，才能更準確地做出命理判斷。這需要考慮整體星象格局，才能得出更全面的結論。","tianfuxing_desc":"貪狼星入福德宮，代表著自己的事業和名聲，以及可能獲得的榮譽和財富。如果貪狼宮內的星宿被其它兇星破壞，則可能會遇到困難和挫折，影響事業發展。但如果貪狼宮內的星宿得到其他吉星的庇佑，則有可能在事業上獲得成功和財富。","fuxing_desc":"此宮副星總體為兇，可視為加煞。封誥入福德宮，運氣不是最好，但因為有顆善良的人心，總能設身處地為人著想，福報多，所以不知不覺間運氣也慢慢變好了。三臺入福德宮，主很公正，總是站在天秤的中間，不隨便偏袒哪一方，操守更是光明磊落，既不容易得罪人，也容易交到朋友。大耗入福德宮，內心有不這人知的一面。陽宮，守不玉碎不為瓦全。陰宮，逢挫折常自虐，消耗自己的能量。劫殺入福德宮，內心不安，情緒波動大，易因突發事件感到焦慮。精神壓力大，生活中常有不如意的事情發生。心理狀態不佳，難以享受生活中的樂趣和幸福感。此宮內吉兇交錯，屬正常現象。由於總體趨兇，故不利因素的作用增強，吉利因素的影響減弱。"},{"minggong":"田宅宮","yinshou":"己酉","jiangxing":"災煞","changsheng":"養","daxian":"32-41","xiaoxian":"大耗","boshi":"小耗","ziweixing":"天機","ziweixing_xingyao":"旺","ziweixing_sihua":"科","tianfuxing":"巨門","tianfuxing_xingyao":"旺","tianfuxing_sihua":"忌","monthxing":"","monthxing_xingyao":"","monthxing_sihua":"","hourxing":"","hourxing_xingyao":"","hourxing_sihua":"","yearganxing":"天鉞","yearganxing_xingyao":"廟","yearganxing_sihua":"","yearzhixing":"天虛","yearzhixing_xingyao":"旺","yearzhixing_sihua":"","qitaxing":"恩光,天才,天壽","qitaxing_xingyao":"陷,旺,平","qitaxing_sihua":"","ziweixing_desc":"天機星入田宅宮，代表著個人的房屋結構和設計，以及家庭環境的協調性。這個位置會對一個人的家庭生活產生積極的影響。","tianfuxing_desc":"巨門星入田宅宮，代表著個人在家庭、房產或土地方面將取得顯著的成功和成就，贏得家庭和社會的尊重和認可。","fuxing_desc":"此宮副星總體為吉，可視為加吉。天鉞入田宅宮，在不動產的處理幹凈俐落，不會碰到諸如產權不清、權狀不明等情事，也不會因不動產之事而發生訴訟之事。天虛入田宅宮，主資金容易周轉不靈或者生意上虧損，只能變賣不動產，生活水平下降、經濟情況容易陷入低谷。恩光入田宅宮，容易遇到關系好的鄰居，家居布置典雅，環境安和寧靜，註重生活品質。天才入田宅宮，主看一件事情總和別人有不同角度，就連住的地方也奇特，不僅房屋外觀有特色，不僅展現了自己的風格，更顯現了自己的別出心裁。天壽入田宅宮，主不愛貴氣愛平凡，居家環境總是樸實無華，雖然擺飾很簡單，但身邊鄰居的態度卻讓這間平凡小屋變得一點也不平凡，而且更增添了熱鬧。大耗入田宅宮，主不動產有破敗。若入田宅宮會流耗，則易遭竊盜，若加火星並巨暗入命，或田宅，主有火災。陽宮，耗田宅。陰宮，自己處理不當而造成不動產的損失。此宮內吉兇交錯，屬正常現象。由於總體趨吉，故吉利因素的作用增強，不利因素的影響減弱。"},{"minggong":"官祿宮","yinshou":"庚戌","jiangxing":"天煞","changsheng":"胎","daxian":"42-51","xiaoxian":"龍德","boshi":"將軍","ziweixing":"紫微","ziweixing_xingyao":"陷","ziweixing_sihua":"","tianfuxing":"天相","tianfuxing_xingyao":"陷","tianfuxing_sihua":"","monthxing":"天月","monthxing_xingyao":"無","monthxing_sihua":"","hourxing":"文曲","hourxing_xingyao":"陷","hourxing_sihua":"","yearganxing":"","yearganxing_xingyao":"","yearganxing_sihua":"","yearzhixing":"","yearzhixing_xingyao":"","yearzhixing_sihua":"","qitaxing":"","qitaxing_xingyao":"","qitaxing_sihua":"","ziweixing_desc":"紫微星入官祿宮，表示職業和事業上的成功和晉升，以及穩定的收入來源。同時，也表示該人可能從事政府或官方機構的工作。","tianfuxing_desc":"天相星入官祿宮，表示該人有可能從事藝術、音樂、舞蹈等領域的工作，以及從事攝影、設計、創意等領域。","fuxing_desc":"此宮副星總體為吉，可視為加吉。文曲入官祿宮，主的學術文化享盛名，寅午戌力微。喜祿存、太陽，文武雙全。天月入官祿宮，主讀書平平、少有表現，不過工作狀況卻很不錯，總是能將一份工作維持得很久，但就是少了分企圖心。此宮內吉兇交錯，屬正常現象。由於總體趨吉，故吉利因素的作用增強，不利因素的影響減弱。"}]}}';
        $demo_name_zh_cn = "测试数据";
        $demo_name_zh_tw = "測試數據";

        if ($lang == 'zh-tw') {
            $demo_json = $demo_json_zh_tw;
            $demo_name = $demo_name_zh_tw;
        } else {
            $demo_json = $demo_json_zh_cn;
            $demo_name = $demo_name_zh_cn;
        }

        // 2. 解析为 PHP 数组
        $demo_array_json = json_decode($demo_json, true);

        // 3. 【核心提取】剥离外层的 errcode 状态，只提取 data 节点内容
        $data = $demo_array_json['data'] ?? [];

        // 4. 【测试数据】
        if (!empty($post_data['name'])) {
            $data['base_info']['name'] = $demo_name;
        }

        // 5. 返回处理好的干净数据给 process_api_data
        return $data;
    }
}