wx_prj_bp_default_info.lsc 1.86 KB
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:ns1="leaf.application.action" xmlns:p="uncertain.proc" xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" trace="true">
    <a:init-procedure>
        <s:server-script import="wx/wx_login_check.js"><![CDATA[
            function lov_query() {
                var lov_list_details;
                try {
                    var lov_list_bm = $bm('wx.wx_prj_bp_default_info');
                    var lov_list_map = lov_list_bm.queryAsMap({
                        id_card_no: $ctx.parameter.id_card_no
                    });
                    lov_list_details = lov_list_map.getChildren();
                    $ctx.parameter.return_status = 'S';
                    $ctx.parameter.return_message = '执行成功';
                } catch (e) {
                    $ctx.success = "true";
                    $ctx.parameter.return_status = 'E';
                    $ctx.parameter.return_message = String(e);
                }
            
                if (lov_list_details) {
                    for (var i = 0;i < lov_list_details.length;i++) {
                        var lov_list_detail = lov_list_details[i];
                        $ctx.parameter.cell_phone = String(lov_list_detail['CELL_PHONE']);
                    }
                }
                var result = {
                    result: $ctx.parameter.return_status,
                    message: $ctx.parameter.return_message,
                    cell_phone: $ctx.parameter.cell_phone
                };
                $ctx.parameter.json = JSON.stringify(result);
            }
            
            if ($ctx.parameter.return_status != 'E' && $ctx.parameter.return_status != 'TIMEOUT') {
                lov_query();
            }
        ]]></s:server-script>
    </a:init-procedure>
    <a:service-output output="/parameter/@json"/>
</a:service>