web_custom_request 如何做关联
录制购物提交订单时用到web_custom_request 函数,不做关联时,运行没有错误但是数据库没有增加数据,觉得应该是web_custom_request 函数需要关联,但是没找到在哪个地方,麻烦各位高手帮忙看看,不胜感激 代码如下:buy()
{
web_add_cookie("Hm_lpvt_f4a56461e6bc7a21f9e08ffc944fbf5e=1441679854; DOMAIN=user.kxyun.cn");
// Parameter {WCSParam_Diff1} created by Correlation Studio
web_reg_save_param( "WCSParam_Diff1", "LB= value=\"", "RB=\"", "Ord=1", "IgnoreRedirections=Yes", "Search=Body", "RelFrameId=1", LAST );
web_submit_data("buyconfirm",
"Action=http://user.kxyun.cn/usercenter/buyconfirm",
"Method=POST",
"RecContentType=text/html",
"Referer=http://www.kxyun.cn/product",
"Snapshot=t9.inf",
"Mode=HTML",
ITEMDATA,
"Name=productId", "Value=06db1870-b9bd-4789-9748-0d7263838481", ENDITEM,
"Name=discount", "Value=1", ENDITEM,
"Name=elements.elementId", "Value=3e9d1256-34f1-49ba-99a1-639b9bb94096", ENDITEM,
"Name=elements.value", "Value=1", ENDITEM,
"Name=elements.elementId", "Value=cf790ba9-d118-4835-b093-fd576b311aa4", ENDITEM,
"Name=elements.value", "Value=20", ENDITEM,
"Name=elements.elementId", "Value=8b992c82-0138-43ae-a7c6-3895c3db65f7", ENDITEM,
"Name=elements.value", "Value=5", ENDITEM,
"Name=elements.elementId", "Value=8b992c82-0138-43ae-a7c6-3895c3db65f7", ENDITEM,
"Name=elements.value", "Value=0", ENDITEM,
"Name=elements.elementId", "Value=8b992c82-0138-43ae-a7c6-3895c3db65f7", ENDITEM,
"Name=elements.value", "Value=0", ENDITEM,
"Name=elements.elementId", "Value=8b992c82-0138-43ae-a7c6-3895c3db65f7", ENDITEM,
"Name=elements.value", "Value=0", ENDITEM,
"Name=elements.elementId", "Value=8b992c82-0138-43ae-a7c6-3895c3db65f7", ENDITEM,
"Name=elements.value", "Value=0", ENDITEM,
"Name=elements.elementId", "Value=bd4fab3e-e66d-4798-a264-19901e56d0fc", ENDITEM,
"Name=elements.value", "Value=0", ENDITEM,
"Name=elements.elementId", "Value=b3c30a56-9fe5-4a69-b706-a1edd7e171e1", ENDITEM,
"Name=elements.value", "Value=CentOS 6.4(64-bit)", ENDITEM,
"Name=templateType", "Value=0", ENDITEM,
"Name=i_osType", "Value=CentOS", ENDITEM,
"Name=i_osVersion", "Value=6.4", ENDITEM,
"Name=buyCount", "Value=1", ENDITEM,
"Name=priceType", "Value=2", ENDITEM,
"Name=priceCounter", "Value=1", ENDITEM,
"Name=serialized", "Value=H4sIAAAAAAAAAJ1US2skVRS+6SRjHiPGBJcDLgSdxe3c9wNBlMRFNI6R+AfuM5TpVJfV1ZnOLMTZ6EJwpQsRwYXgZnb+AXGhuBV/gLh34UpFEM/t7mR6nM04Bd3UPec73/nOo+6939DqqEXPh+FZfxi6QVWf9rsUWD8Oz1xV94/aYRyH7qAeda4OafDjnT9f+viv13vomUO05scXe8Nx3XVo5/Add+52B64+2T2ou3SS2hcP0bUwrHN10qGnZu5xVw1233ANuDZCm1yX9uHXoa0Fd7GA/3rKuQqp7sr5XfQeWoZ8aZDOwDR6MOKwGnWFMU2aqk0L+F4VO7S9oOy4a6v6BLBPDNuY2oNYgKuHaLVpIdeD2P3h2A+mSqbOaZ2pLQFLh2h9anv7oklzw2Yz69PeMKY56frcdJXlenMxqoIbHHdziYWoTXW6vaB5Y5Tayg2qO+"
"lK3GgRPz0s4NfHddUdFTXFcA16Ph4tVLZ5DlzxCDiHU9PSpIFpP13K7Jcy+/Nhbf/65Vd/3P3Q9NDSAVqFoHGatGjrPu7W+Myn9oN7n97Y/OSXj3oITRqE0FLTFL6dKa4Mo/9K27qLMpHJ3Z9ufPaD+2K5MK6MoKBpxObtFfjfgqD+I67cq7Ohf/7z7zvf//P1cg+twSbEanR6y51d9Xq+GVd1w+jnbxvVnOfKt1LfD1zu3Mlln6dVzw9r58PB+OwyZtI0HXqOJxspkwpzkSkW1jtsraNYceut91YQqwCWTMoucYYDJxoLKhR2RgssApFBZE2EcU0hXKLNqNA/OWOnMgRlCHZWWgAzgn1IAnPto1GCushoU555DIR4DikcCLI5SSycsthrAuloilEnqmmiACOZp6isxVH6UAQFCAgSmwR+L5nQYiZoew9a+Obxs6ovXlAC+"
"6q7uZgtiuw8TzgpFbHQ1mDHAEatJTRJFUkOABNZBEqoxTnYhAWnGmCEYwlNMTlnrpyalU8WyEPWlngHGik1WBgusSeW4xylVp5T6pwAmFWEE2IDdpnCCFyM2DnjsIL8jjNmjDZT8h4ji80VDERrlXGGdsLoqMSuaJRcU+44JV6Q/zTXeGtZMAwTykERdwk7HWD4xsrAo1cya4BRFqxk2eFsFDTXZI4N1wwb6bzSQhtN5Kxc+f/JmU9Z0mBw8pRhIYnAVoiErWfRUWNYTvHhXj4iuZRE0mwJDtTC9rCcYXu4xjknB/ssOKzGY5Nz5rQ00mDmBCyLYh67CHMjMXMAemUEfWxyKnlg2XvMlYcvLGmKjTKw9zLlZG3UMV6t2KTwqqSEcPBZKW9E4S1DYgZLapMjPghgLPfYwn03u/7f/+a7126e/r0C1+L+5bVY1K6//"
"Na3qDzlsDEtYA1OvZKMqOgpjB1DE8t3Yiy2WhgoXTPFDTfC0CIOTRfuX8BVQNCABwAA", ENDITEM,
"Name=from", "Value=buy", ENDITEM,
"Name=productType", "Value=1", ENDITEM,
EXTRARES,
"Url=http://static.kxyun.cn/static/resource/js/tec2/newindex/jquery.touchSlider.js", ENDITEM,
"Url=http://hm.baidu.com/hm.gif?cc=1&ck=1&cl=32-bit&ds=1366x768&ep=45717%2C13739&et=3&fl=18.0&ja=1&ln=zh-cn&lo=0<=1441679819&nv=0&rnd=1929835373&si=f4a56461e6bc7a21f9e08ffc944fbf5e&st=4&su=http%3A%2F%2Fuser.kxyun.cn%2Fusercenter%2F&v=1.1.2&lv=3", "Referer=http://www.kxyun.cn/product", ENDITEM,
"Url=http://static.kxyun.cn/static/resource/js/include/jquery-1.7.2.min.js", ENDITEM,
"Url=http://static.kxyun.cn/static/resource/css/usercenter/payflow.css?6362", ENDITEM,
"Url=http://static.kxyun.cn/static/resource/css/usercenter/y_p_up.css?876", ENDITEM,
"Url=http://static.kxyun.cn/static/resource/js/tec2/tec2.widthCtrl.js", ENDITEM,
"Url=http://static.kxyun.cn/static/resource/css/include/include_common.css?7683", ENDITEM,
"Url=http://static.kxyun.cn/static/resource/css/index/new_index.css?895", ENDITEM,
"Url=http://static.kxyun.cn/static/resource/imgs/buy_circle.png", ENDITEM,
"Url=http://static.kxyun.cn/static/resource/imgs/buy_local.png", ENDITEM,
LAST);
web_custom_request("getcount_4",
"URL=http://user.kxyun.cn/usercenter/shoppingcart/getcount",
"Method=POST",
"Resource=0",
"RecContentType=text/plain",
"Referer=http://user.kxyun.cn/usercenter/buyconfirm",
"Snapshot=t10.inf",
"Mode=HTML",
"EncType=",
EXTRARES,
"Url=http://static.kxyun.cn/static/resource/js/include/jquery-1.7.2.min.js", "Referer=http://www.kxyun.cn/contactus/service?id=9999", ENDITEM,
"Url=http://static.kxyun.cn/static/resource/css/cloud.css?9421", "Referer=http://www.kxyun.cn/contactus/service?id=9999", ENDITEM,
"Url=http://static.kxyun.cn/static/resource/css/include/include_common.css?3390", "Referer=http://www.kxyun.cn/contactus/service?id=9999", ENDITEM,
"Url=http://static.kxyun.cn/static/resource/css/service.css?1766", "Referer=http://www.kxyun.cn/contactus/service?id=9999", ENDITEM,
"Url=http://static.kxyun.cn/static/resource/css/app/app.css?4541", "Referer=http://www.kxyun.cn/contactus/service?id=9999", ENDITEM,
LAST);
return 0;
}
submit()
{
web_custom_request("add",
"URL=http://user.kxyun.cn/usercenter/orderui/add?token={WCSParam_Diff1}&templateId=92c2ce56-d759-4ae3-8c64-372bd3395820",
"Method=POST",
"Resource=0",
"RecContentType=application/json",
"Referer=http://user.kxyun.cn/usercenter/buyconfirm",
"Snapshot=t11.inf",
"Mode=HTML",
"EncType=application/x-www-form-urlencoded; charset=UTF-8",
"Body=elements%5B6%5D.value=5&count=1&elements%5B0%5D.elementId=3e9d1256-34f1-49ba-99a1-639b9bb94096&__USER_NAME=qin0525&productType=1&userType=2&elements%5B7%5D.value=0&elements%5B7%5D.elementId=8b992c82-0138-43ae-a7c6-3895c3db65f7&userId=62ed71d5-3d31-47bc-b900-0f8747c59020&elements%5B4%5D.elementId=cf790ba9-d118-4835-b093-fd576b311aa4&userName=qin0525&instance%5BpysicalState%5D=&instance%5BbuyCount%5D=1&instance%5BproductCode%5D=&instance%5BvalidPeriod%5D=&instance%5Bstate%5D=&"
"instance%5BpriceType%5D=2&instance%5BrenewDate%5D=&instance%5BunitPrice%5D=&instance%5BefficentDate%5D=&instance%5BproductId%5D=06db1870-b9bd-4789-9748-0d7263838481&instance%5Bid%5D=6e644a59-6b84-43a3-8328-519ea0bc4153&instance%5Bserialized%5D=&instance%5BstateDate%5D=&instance%5Bprice%5D=71&instance%5BuserId%5D=&instance%5BexpireDate%5D=&instance%5Bgid%5D=6e644a59-6b84-43a3-8328-519ea0bc4153&instance%5Bconfig%5D=&instance%5BcreateDate%5D=&instance%5BorderId%5D=&instance%5BpriceCounter%5D=1&"
"i_osType=CentOS&elements%5B2%5D.elementId=b3c30a56-9fe5-4a69-b706-a1edd7e171e1&platform=&buyCount=1&orderType=buy&priceType=2&elements%5B8%5D.value=0&discount=1&priceKeyId=&personScale=&elements%5B9%5D.elementId=8b992c82-0138-43ae-a7c6-3895c3db65f7&elements%5B10%5D.value=0&__USER_ID=62ed71d5-3d31-47bc-b900-0f8747c59020&elements%5B10%5D.elementId=8b992c82-0138-43ae-a7c6-3895c3db65f7&priceCounter=1&parentProductInstanceId=&isPersonScale=&from=buy&creator=qin0525&elements%5B2%5D.value=CentOS+6.4"
"(64-bit)&version=&templateType=0&serialized="
"H4sIAAAAAAAAAJ1US2skVRS%2B6SRjHiPGBJcDLgSdxe3c9wNBlMRFNI6R%2BAfuM5TpVJfV1ZnOLMTZ6EJwpQsRwYXgZnb%2BAXGhuBV%2FgLh34UpFEM%2Ft7mR6nM04Bd3UPec73%2Fn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N1wwb6bzSQhtN5Kxc%2Bf%2FJmU9Z0mBw8pRhIYnAVoiErWfRUWNYTvHhXj4iuZRE0mwJDtTC9rCcYXu4xjknB%2FssOKzGY5Nz5rQ00mDmBCyLYh67CHMjMXMAemUEfWxyKnlg2XvMlYcvLGmKjTKw9zLlZG3UMV6t2KTwqqSEcPBZKW9E4S1DYgZLapMjPghgLPfYwn03u%2F7f%2F%2Ba7126e%2Fr0C1%2BL%2B5bVY1K6%2F%2FNa3qDzlsDEtYA1OvZKMqOgpjB1DE8t3Yiy2WhgoXTPFDTfC0C"
"IOTRfuX8BVQNCABwAA&parentOrderId=&token=&elements%5B3%5D.elementId=bd4fab3e-e66d-4798-a264-19901e56d0fc&i_osVersion=6.4&elements%5B0%5D.value=1&sourceType=&elements%5B4%5D.value=20&ids=&elements%5B3%5D.value=0&elements%5B9%5D.value=0&productId=06db1870-b9bd-4789-9748-0d7263838481&elements%5B8%5D.elementId=8b992c82-0138-43ae-a7c6-3895c3db65f7&duration=1&elements%5B6%5D.elementId=8b992c82-0138-43ae-a7c6-3895c3db65f7",
LAST);
web_submit_data("buypay",
"Action=http://user.kxyun.cn/usercenter/buypay",
"Method=POST",
"RecContentType=text/html",
"Referer=http://user.kxyun.cn/usercenter/buyconfirm",
"Snapshot=t12.inf",
"Mode=HTML",
ITEMDATA,
"Name=id", "Value=d9dc917e-a25c-4705-837b-f8dfc711c277", ENDITEM,
"Name=templateId", "Value=92c2ce56-d759-4ae3-8c64-372bd3395820", ENDITEM,
EXTRARES,
"Url=http://static.kxyun.cn/static/resource/js/include/jquery-1.7.2.min.js", ENDITEM,
"Url=http://static.kxyun.cn/static/resource/js/tec2/newindex/jquery.touchSlider.js", ENDITEM,
"Url=http://static.kxyun.cn/static/resource/css/index/new_index.css?3602", ENDITEM,
"Url=http://static.kxyun.cn/static/resource/css/usercenter/y_p_up.css?5604", ENDITEM,
"Url=http://static.kxyun.cn/static/resource/css/include/include_common.css?1608", ENDITEM,
"Url=http://static.kxyun.cn/static/resource/css/usercenter/payflow.css?5813", ENDITEM,
"Url=http://static.kxyun.cn/static/resource/js/tec2/tec2.widthCtrl.js", ENDITEM,
"Url=http://static.kxyun.cn/static/resource/imgs/pay_pass.png", ENDITEM,
"Url=http://static.kxyun.cn/static/resource/imgs/bank.png", ENDITEM,
LAST);
web_custom_request("getcount_5",
"URL=http://user.kxyun.cn/usercenter/shoppingcart/getcount",
"Method=POST",
"Resource=0",
"RecContentType=text/plain",
"Referer=http://user.kxyun.cn/usercenter/buypay",
"Snapshot=t13.inf",
"Mode=HTML",
"EncType=",
EXTRARES,
"Url=http://static.kxyun.cn/static/resource/css/cloud.css?9515", "Referer=http://www.kxyun.cn/contactus/service?id=9999", ENDITEM,
"Url=http://static.kxyun.cn/static/resource/js/include/jquery-1.7.2.min.js", "Referer=http://www.kxyun.cn/contactus/service?id=9999", ENDITEM,
"Url=http://static.kxyun.cn/static/resource/css/app/app.css?4518", "Referer=http://www.kxyun.cn/contactus/service?id=9999", ENDITEM,
"Url=http://static.kxyun.cn/static/resource/css/service.css?976", "Referer=http://www.kxyun.cn/contactus/service?id=9999", ENDITEM,
"Url=http://static.kxyun.cn/static/resource/css/include/include_common.css?581", "Referer=http://www.kxyun.cn/contactus/service?id=9999", ENDITEM,
LAST);
return 0;
}
把你自己做关联的数据打印出来跟服务端日志中记录的比较一下,看看是不是正确的 把你自己做关联的数据打印出来跟服务端日志中记录的比较一下,看看是不是正确的 把 serialized 的值做了关联,打印出来也正确,但是数据库的数据还是没有增加,应该是还有哪个地方要关联,没找到地方 把web_custom_request函数做了如下关联,但是运行时服务器端返回的日志结果还是空的:{"errorNO":1,"result":null},也没报错,麻烦各位大侠帮忙看一下,整了好几天了还是没搞定
web_custom_request("add",
"URL=http://user.kxyun.cn/usercenter/orderui/add?token={WCSParam_Diff1}&templateId=92c2ce56-d759-4ae3-8c64-372bd3395820",
"Method=POST",
"Resource=0",
"RecContentType=application/json",
"Referer=http://user.kxyun.cn/usercenter/buyconfirm",
"Snapshot=t11.inf",
"Mode=HTML",
"EncType=application/x-www-form-urlencoded; charset=UTF-8",
"Body=elements%5B6%5D.value=5&count=1&elements%5B0%5D.elementId=3e9d1256-34f1-49ba-99a1-639b9bb94096&__USER_NAME=qin0525&productType=1&userType=2&elements%5B7%5D.value=0&elements%5B7%5D.elementId=8b992c82-0138-43ae-a7c6-3895c3db65f7&userId=62ed71d5-3d31-47bc-b900-0f8747c59020&elements%5B4%5D.elementId=cf790ba9-d118-4835-b093-fd576b311aa4&userName=qin0525&instance%5BpysicalState%5D=&instance%5BbuyCount%5D=1&instance%5BproductCode%5D=&instance%5BvalidPeriod%5D=&instance%5Bstate%5D=&"
"instance%5BpriceType%5D=2&instance%5BrenewDate%5D=&instance%5BunitPrice%5D=&instance%5BefficentDate%5D=&instance%5BproductId%5D=06db1870-b9bd-4789-9748-0d7263838481&instance%5Bid%5D={WCSParam_Diff5}&instance%5Bserialized%5D=&instance%5BstateDate%5D=&instance%5Bprice%5D=71&instance%5BuserId%5D=&instance%5BexpireDate%5D=&instance%5Bgid%5D={WCSParam_Diff5}&instance%5Bconfig%5D=&instance%5BcreateDate%5D=&instance%5BorderId%5D=&instance%5BpriceCounter%5D=1&"
"i_osType=CentOS&elements%5B2%5D.elementId=b3c30a56-9fe5-4a69-b706-a1edd7e171e1&platform=&buyCount=1&orderType=buy&priceType=2&elements%5B8%5D.value=0&discount=1&priceKeyId=&personScale=&elements%5B9%5D.elementId=8b992c82-0138-43ae-a7c6-3895c3db65f7&elements%5B10%5D.value=0&__USER_ID=62ed71d5-3d31-47bc-b900-0f8747c59020&elements%5B10%5D.elementId=8b992c82-0138-43ae-a7c6-3895c3db65f7&priceCounter=1&parentProductInstanceId=&isPersonScale=&from=buy&creator=qin0525&elements%5B2%5D.value=CentOS+6.4"
"(64-bit)&version=&templateType=0&serialized={WCSParam_Diff3}&parentOrderId=&token={WCSParam_Diff1}&elements%5B3%5D.elementId=bd4fab3e-e66d-4798-a264-19901e56d0fc&i_osVersion=6.4&elements%5B0%5D.value=1&sourceType=&elements%5B4%5D.value=20&ids=&elements%5B3%5D.value=0&elements%5B9%5D.value=0&productId=06db1870-b9bd-4789-9748-0d7263838481&elements%5B8%5D.elementId=8b992c82-0138-43ae-a7c6-3895c3db65f7&duration=1&elements%5B6%5D.elementId=8b992c82-0138-43ae-a7c6-3895c3db65f7",
LAST); 可能是ID什么的有唯一性约束 楼主在吗,不懂怎么在web_custom_request函数下关联,求教。
页:
[1]