json串拼接模版

Posted Timeleader

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了json串拼接模版相关的知识,希望对你有一定的参考价值。

              var jsonarr = new Array;;

                                jsonstr = ‘{‘ +

                                               ‘"objuid":‘ + ‘"‘ + abp.common.json2string($.trim(objuid)) + ‘",‘ +

                                               ‘"scx_uid":‘ + ‘"‘ + abp.common.json2string($.trim(scx_uid)) + ‘",‘ +

                                               ‘"ph":‘ + ‘"‘ + abp.common.json2string($.trim(ph)) + ‘",‘ +

                                               ‘"pm":‘ + ‘"‘ + abp.common.json2string($.trim(pm)) + ‘",‘ +

                                               ‘"gg":‘ + ‘"‘ + abp.common.json2string($.trim(gg)) + ‘",‘ +

                                               ‘"zt":‘ + ‘‘ + abp.common.json2string($.trim(JSON.stringify(gx))) + ‘,‘ +

                                               ‘"ts":‘ + ‘‘ + abp.common.json2string($.trim(JSON.stringify(gx))) + ‘,‘ +

                                               "}";

                                              

                                              

                                               jsonarr.push(jsonstr);

                                              

                                               var jsparams = new abp.common.JSParams();

                                               jsparams.push("jsons", "[" + jsonarr.join(",") + "]");

                                               var url = "/"+globalURL+"/servicecontroller?";

                                               $.ajax({

                                                        type: "post",

                                                        url: url,

                                                        data:"userDefineClass=com.anolesoft.mes.stk.action.TouLiaoAction&callType=ao"+"&"+jsparams.paramsToString(),

                                                        dataType:"text",

                                                        success: function(data){

                                                                 if($.trim(data) == "success"){

                                                                           alert("保存成功!");

                                                                 }else if($.trim(data) == "error"){

                                                                           alert("保存失败!");

                                                                 }else{

                                                                           alert($.trim(data));

                                                                 }

                                                        },error:function(data){

                                                                 alert("发生错误.");

                                                                 //$("#button_4028818251dc9f220151dcb3ca8c017b").closeOpenPane();

                                                        }

                                               });

 

以上是关于json串拼接模版的主要内容,如果未能解决你的问题,请参考以下文章

模版AC自动机(简单版)

回文树模版

P3808 模版AC自动机(简单版)

P3808 模版AC自动机(简单版)

kmp模版

[算法模版]AC自动机