httpRequest.js 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572
  1. /**
  2. * 有关 访问服务器的uri
  3. */
  4. var $http = function () {
  5. this.ajaxLock = false;
  6. // this.ip = "http://192.168.43.144/api";
  7. // this.ip = "http://192.168.237.5:9002";
  8. //this.ip = "http://b2bcnapi.sailuntire.com/api";
  9. this.ip = "http://b2bcnapi.sailuntire.com/api/test";
  10. /****** 用户相关 ******/
  11. // 选择图片生成地址
  12. this.getUrlByFileUrl = "/web/file/upload";
  13. // 根据省获取经销商
  14. this.getUpuserByProvideUrl = "/web/bizLogin/testPostApi";
  15. // 注册用户
  16. this.regizeUrl = "/web/bizLogin/registRetailer";
  17. // 登录用户
  18. this.loginUrl = "/web/bizLogin/login";
  19. // 根据loginid获取用户信息
  20. // this.getUserInfoUrl = "/base/retailer/loginToInfo";
  21. /******* 订单相关 ********/
  22. // 查看剩余库存
  23. this.getStockUrl_old = "/jinyu/bizAgentStock/page";
  24. this.getStockUrl = "/base/material/pageMaterialStock";
  25. // 添加商品到购物车
  26. this.addCarUrl = "/jinyu/bizCart/save";
  27. // 获取购物车列表
  28. this.shopCarListUrl = "/jinyu/bizCart/list";
  29. // 获取商品详情
  30. this.getInfoUrl = "/base/material/info";
  31. // 下单传 {"retailerId":"212","amounr":100,"bizCartDtoList":[{"id":121...},{"id":12..}] 这里把购物车的列表给我}
  32. this.downOrderUrl = "/base/bizOrder/save";
  33. // 删除购物车 --删除一个
  34. this.deleteCar = "/jinyu/bizCart/deleteOne";
  35. // 删除购物车记录 -- 珊瑚多个
  36. this.deleteCars = "/jinyu/bizCart/delete";
  37. // 获取订单列表
  38. this.getOrderListUrl = "/base/bizOrder/page";
  39. // 获取订单详情
  40. this.getOrderInfo = "/base/bizOrder/info";
  41. // ---------- 525 ---------
  42. // 获取库存详情
  43. this.getKucunInfoUrl = "/jinyu/bizRetailerStock/page";
  44. // 获取商品类别
  45. this.getStoreTypeUrl = "/jinyu/bizGoodsType/list";
  46. // 添加商品类别
  47. this.addStoreTypeUrl = "/jinyu/bizGoodsType/save";
  48. // 添加商品
  49. this.addStoreUrl = "/jinyu/bizGoods/saveGoods";
  50. // 查看自己的供应商
  51. this.getSupplierUrl = "/jinyu/bizSupplier/list";
  52. // 根据条形码查询商品
  53. this.getStoreByScanUrl = "/jinyu/bizGoods/selectBySerialNumber";
  54. // 添加供应商
  55. this.addSupplierUrl = "/jinyu/bizSupplier/save";
  56. // 进货
  57. this.buyStoreUrl = "/jinyu/bizBills/save";
  58. // 单据
  59. this.buyListUrl = "/jinyu/bizBills/page";
  60. // 商品详情
  61. this.getStoreInfoUrl = "/jinyu/bizGoods/info";
  62. // 选择品牌
  63. this.chooseBrandUrl = "/base/brand/list";
  64. // 根据扫出来的码获取商品信息(进销存) -- 需要后面拼接
  65. this.jinstoreByScanUrl = "/base/material/infoByKey";
  66. // 获取门店经销商列表
  67. this.getSupplierListUrl = "/base/retailerAgent/list";
  68. // 经销商查询自己库存
  69. // this.checkStoreUrl = "/jinyu/bizAgentStock/page";
  70. this.checkStoreUrl_old = "/jinyu/bizAgentStock/page";
  71. this.checkStoreUrl = "/jinyu/bizAgentStock/pageOwn";
  72. // 扫码商品 0705
  73. this.addStoreByScanUrl = "/jinyu/bizGoods/selectBySerialNumberAndRetailerId";
  74. // 入库扫码
  75. this.addOrgoScanUrl = '/jinyu/bizGoods/selectInBySerialNumberAndRetailerId';
  76. // 出库扫码
  77. this.outScanUrl = '/jinyu/bizGoods/selectOutBySerialNumberAndRetailerId';
  78. /********* 0706 ***********/
  79. // 收取短信验证码
  80. this.getPhoneCode = '/web/bizLogin/sendCode';
  81. // 获取客户信息
  82. this.customListUrl = '/web/bizCustomRetailer/page';
  83. // 获取门店详情
  84. this.getMDInfo = "/base/retailer/retailerInfo";
  85. // 获取所有的轮胎服务类目
  86. this.getServices = "/base/service/list";
  87. // 添加服务
  88. this.addServices = "/jinyu/bizRetailerService/save";
  89. // 根据品牌统计库存
  90. this.getStockByPP = "/jinyu/bizRetailerStock/selectStockByBrand";
  91. // 获取积分
  92. this.getJFStore = "/jinyu/bizMall/page";
  93. // 获取新闻条
  94. this.getNews = "/jinyu/bizArticle/page";
  95. // 根据品牌获取上级代理商
  96. this.getUpByBrand = "/jinyu/bizAgentBrand/listByAgentIds";
  97. // 根据品牌和省市获取上级代理商
  98. this.getUpByBrandAndArea = "/jinyu/bizAgentBrand/listByBrandIds";
  99. // 获取门店积分列表
  100. this.getJFlistUrl = "/jinyu/bizRetailerIntegral/page";
  101. // 兑换商品
  102. this.exchangeUrl = "/jinyu/bizMallOrder/save";
  103. // 查看兑换记录
  104. this.exchangeListUrl = "/jinyu/bizMallOrder/page";
  105. // 检查版本
  106. this.getVersionUrl = "/web/biz/getAppVersion";
  107. // 活动banner
  108. this.getBannerUrl = "/biz/bizBanner/list";
  109. // 获取参加活动的商品
  110. this.getStoreBannerUrl = "/biz/bizActivity/activityInfo";
  111. // 根据条形码获取商品
  112. this.getStoreByScan = "/web/biz/bizGoods/Scancoderemotecall";
  113. // 获取经销商对应物料列表
  114. this.getStoreListU = "/web/biz/bizCoupon/select";
  115. // 添加商品至购物车
  116. this.addStoreToCarU = "/web/biz/bizCart/save";
  117. // 获取购物车列表
  118. this.getCarListU = "/web/biz/bizCart/selectCart";
  119. //线上订货修改购物车数量
  120. this.updateCarNum = "/web/biz/bizCart/update"
  121. // 从购物车下单
  122. this.downOrderU = "/web/base/bizOrder/save";
  123. // 扫码确定
  124. this.scanDoneU = "/web/biz/bizGoods/Scancode";
  125. //签约级别
  126. this.signLv = "/web/bizLogin/enum";
  127. // 门店立即抢购
  128. this.rushToBuyU = "/web/base/bizOrder/directSave";
  129. // 门店查询订单
  130. this.getOrderListU = "/web/base/bizOrder/selectStore";
  131. // 门店获取订单详情
  132. this.getOrderInfoU = "/web/biz/bizOrderInfo/selectOrderInfo";
  133. // 获取门店参保列表接口
  134. this.getInsuranceU = "/web/sailun/insurance/getInsuranceList";
  135. // 获取门店详情
  136. this.getAgentInfoU = "/web/biz/bizAudit/store";
  137. // 扫码入库
  138. this.sacaCodeIn = "/web/biz/bizGoods/ScanCodeIn";
  139. // 获取轮胎理赔详情
  140. this.getLipeiList = "/web/sailun/insurance/getInsuranceList";
  141. // 通过胎号获取理赔单详情
  142. this.getLipeiInfoU = "/web/sailun/insurance/getTireClaimInfo";
  143. // 理赔图片的上传
  144. this.uploadLipeU = "/web/sailun/insurance/tireImageUpload";
  145. // 提交轮胎保理赔记录
  146. this.sumbiltLipeiU = "/web/sailun/insurance/submitTireClaim";
  147. // 获取入库记录
  148. this.getIntoListU = "/web/sailun/insurance/getStoreClaimList";
  149. // 获取出入库记录
  150. this.getinOrOutU = "/web/biz/bizGoods/Incomingandoutgoingrecordsquery";
  151. // 获取赔付记录
  152. this.peifuListU = "/web/sailun/insurance/getStoreClaimList";
  153. // 扫码出库
  154. this.outStoreU = "/web/biz/bizGoods/ScanCodeOut";
  155. // 获取签约等级
  156. this.getSignLvU = "/web/bizLogin/enum";
  157. // 门店查询经销商库存
  158. this.getStockListU = "/web/biz/bizAudit/QueryStoreAgentStock";
  159. // 删除购物车记录
  160. this.delCarMataxU = "/web/biz/bizCart/deleteOne";
  161. // 获取理赔单详情
  162. this.getTlementInfoU = "/web/sailun/insurance/getTireInfo";
  163. // 生成核销code
  164. this.getHxCodeU = "/web/biz/bizCoupon/save";
  165. // 获取门店门店核销码列表
  166. this.getHxListU = "/web/biz/bizCoupon/selectCoupon";
  167. // 获取物料筛选条件
  168. this.getWuliaoAntionU = "/web/biz/bizCoupon/condition";
  169. //请求文章 根据id
  170. this.getOneDetails = "/web/biz/bizArticle/getOneDetails";
  171. //厂家宣传
  172. // this.getArticle="/web/biz/bizArticle/list"
  173. // 获取地址管理
  174. // this.getAddress="/sys/bizReceiptAddress/paget"
  175. // 获取地址列表
  176. this.getAddressListU = "/web/sys/bizReceiptAddress/page";
  177. // 门店新增收货地址
  178. this.addAddressU = "/web/sys/bizReceiptAddress/save";
  179. // 查看门店自己的优惠券
  180. // this.searchKuCunU = "/web/sys/bizStoreRegistrationSpree/page";
  181. /// 查看门店自己的库存
  182. this.searchKuCunU = "/web/biz/bizGoods/storeSelectStock";
  183. // 门店查询返利明细
  184. this.lookUserTotalU = "/web/biz/bizStoreReward/page";
  185. // 获取优惠券
  186. this.getCouponListU = "/web/sys/bizStoreRegistrationSpree/page";
  187. // 查询门店进货分析
  188. this.getStoreIntoListU = "/web/base/bizOrder/caculateStore";
  189. // 检查版本
  190. this.checkVersionU = "/web/biz/getAppVersion?type=1";
  191. // 上传门店车辆图片接口
  192. this.uploadCarPhotoU = "/web/sailun/insurance/carPictureUpload";
  193. //我的供应商
  194. this.getSupplier = "/web/biz/bizStoreAgent/mySuppliers";
  195. //获取跑马灯list
  196. this.getMessageList = "/web/mobile/sysMessage/getMessageList";
  197. //获取新版本
  198. this.getNewVersionU = "/web/file/getShopApk";
  199. //上传门店行驶证照片
  200. this.uploadUserCarU = "/web/sailun/insurance/carPictureUpload";
  201. //离线缓存工单
  202. this.saveJxItemU = "/event/queryEventLX/";
  203. //轮播图
  204. this.getbannerLists = "/web/biz/bizStoreBrand/selectStoreBrandBanner";
  205. //获取商品分类
  206. this.getTypes = "/web/biz/bizGoodsType/selectProductCategory";
  207. // 获取商品
  208. this.getshopLists = "/web/biz/bizGoodsType/selectCategoryItem";
  209. //加入购物车
  210. this.addShopCart = "/web/sailun/bizIntegralCart/save";
  211. //查看购物车
  212. this.getShopCart = "/web/sailun/bizIntegralCart/page";
  213. //修改购物车数量
  214. this.fixCartNum = "/web/sailun/bizIntegralCart/update";
  215. //删除购物车
  216. this.delCart = "/web/sailun/bizIntegralCart/deletes";
  217. //下单
  218. this.addOrder = "/web/biz/bizShopIntegralOrder/save";
  219. //查看兑换记录
  220. this.getOrderannal = "/web/biz/bizIntegralOrderItem/page";
  221. //积分商场详情
  222. this.getProductImage = "/web//sailun/bizProductImage/storeProductItem";
  223. //收货地址查询
  224. this.getReceiptAddress = "/web/sys/bizReceiptAddress/list";
  225. // 立即下单
  226. this.immediatelyOrder = "/web/biz/bizShopIntegralOrder/immediatelyOrder";
  227. //查找更换收后地址
  228. this.updateAddress = "/web/sys/bizReceiptAddress/update";
  229. //删除收货地址
  230. this.addressDel="/web/sys/bizReceiptAddress/delete";
  231. //根据商品名搜索积分商品
  232. this.searchShop="/web/biz/bizCart/appSelectProduct";
  233. //查找订单
  234. this.searchOrder="/web/biz/bizIntegralOrderItem/selectIntegralOrderProduct"
  235. //消息列表
  236. this.getMsg="/web/sailun/bizMessageForUser/getMessageCategory";
  237. //消息详情
  238. this.getMsgdetails="/web/sailun/bizMessageForUser/list";
  239. //消息已阅
  240. this.updateMessage="/web/sailun/bizMessageForUser/updateMessage";
  241. //修改签约地址
  242. this.updatesign="/web/biz/bizStoreUpdateMessage/save";
  243. //查看签约地址
  244. this.getsignAddress="/web/biz/bizStoreUpdateMessage/list";
  245. //查看核销详情页
  246. this.hexiaoInfo="/web/biz/bizCoupon/list";
  247. //季度任务数据
  248. this.selectQuarter="/web/biz/bizScanRecord/selectQuarter";
  249. //提交用户信息
  250. this.MobileMessage="/web/biz/bizMobileMessage/save";
  251. //修改签约
  252. this.SignlvUpdate="/web/biz/bizStoreUpdateSignlv/save";
  253. //查看签约
  254. this.SignlvList="/web/biz/bizStoreUpdateSignlv/list";
  255. /**********************************车主下单功能***********************************/
  256. //根据门店id获取所有门店微信订单信息
  257. this.getAllUndealCarOrder="/web/sailun/wxCarorderHead/caroder/getAllUndealCarOrderByStoreId";
  258. this.getOrderInfo = "/web/sailun/wxCarorderHead/carorder/getOrderInfoById";
  259. this.getStoreToMaktxInfoByBSP = "/web/biz/bizGoods/getStoreToMaktxInfoByBSP";
  260. this.updateStoreToMaktxInfoByBSP = "/web/biz/bizGoods/updateStoreToMaktxInfoByBSP";
  261. this.changeWxCarOrderStatus = "/web/sailun/wxCarorderHead/carorder/changeWxCarOrderStatus";
  262. /**********************************对账功能***********************************/
  263. this.getConfirmMonth = "/web/biz/bizMonthDetail/getConfirmMonth";//获取已确认的月份
  264. this.getMonthDetail = "/web/biz/bizMonthDetail/getMonthDetail";//获取月结明细
  265. this.confirmMonthDetail = "/web/biz/bizMonthDetail/confirmMonthDetail";//确认月结明细
  266. //通过图片获取信息
  267. this.licenseDiscern="/web/bizLogin/licenseDiscern";
  268. //运营执行信息是否有效
  269. this.verifyBusiness="/web/bizLogin/verifyBusiness";
  270. //上传运营图片
  271. this.storeUpdatalicense="/web/biz/bizStoreBasicInfo/storeUpdateLicense"
  272. //解冻
  273. this.storeUnfreezeProposer="/web/biz/bizAgentFunction/storeUnfreezeProposer"
  274. }
  275. $http.prototype.$postFile = function (url, data, callback) {
  276. var urlT = this.ip + eval('this.' + url);
  277. api.ajax({
  278. url: urlT,
  279. method: 'post',
  280. data: {
  281. values: data
  282. },
  283. headers: {
  284. "Content-type": "multipart/form-data"
  285. },
  286. }, function (ret, err) {
  287. api.hideProgress();
  288. api.refreshHeaderLoadDone();
  289. if (ret) {
  290. callback(ret);
  291. } else {
  292. api.toast({
  293. msg: '当前网络不稳定,请稍后再试'
  294. });
  295. }
  296. });
  297. }
  298. // api的ajax
  299. $http.prototype.$post = function (url, data, callback, other) {
  300. var content = "", urlT = "", _this = this;
  301. if (data.url == "json") {
  302. delete data.url;
  303. // 确认contenttype选项
  304. content = "application/json;charset=UTF-8";
  305. } else if (data.url == "file") {
  306. data = [{}, {
  307. file: data[1].file
  308. }]
  309. content = "application/json;charset=UTF-8";
  310. } else {
  311. content = "application/x-www-form-urlencoded"
  312. }
  313. var datas = this.serize(data);
  314. if (typeof other != 'undefined' && other != "" && other != 'undefined') {
  315. urlT = this.ip + eval('this.' + url) + '/' + other;
  316. } else {
  317. urlT = this.ip + eval('this.' + url);
  318. }
  319. api.showProgress({
  320. });
  321. if (this.ajax == true) {
  322. return;
  323. }
  324. this.ajax = true;
  325. api.ajax({
  326. url: urlT,
  327. method: 'post',
  328. data: datas,
  329. headers: {
  330. "Content-type": content,
  331. },
  332. }, function (ret, err) {
  333. _this.ajax = false;
  334. api.hideProgress();
  335. api.refreshHeaderLoadDone();
  336. if (ret) {
  337. callback(ret);
  338. } else {
  339. api.toast({
  340. msg: '当前网络不稳定,请稍后再试'
  341. });
  342. }
  343. });
  344. }
  345. //特殊post api
  346. $http.prototype.$postuser = function (url, data, callback, other) {
  347. var content = "", urlT = "", _this = this;
  348. if (data.url == "json") {
  349. delete data.url;
  350. // 确认contenttype选项
  351. content = "application/json;charset=UTF-8";
  352. } else if (data.url == "file") {
  353. data = [{}, {
  354. file: data[1].file
  355. }]
  356. content = "application/json;charset=UTF-8";
  357. } else {
  358. content = "application/x-www-form-urlencoded"
  359. }
  360. var datas = this.serize(data);
  361. if (typeof other != 'undefined' && other != "" && other != 'undefined') {
  362. urlT = this.ip + eval('this.' + url) + '/' + other;
  363. } else {
  364. urlT = this.ip + eval('this.' + url);
  365. }
  366. api.showProgress({
  367. });
  368. if (this.ajax == true) {
  369. return;
  370. }
  371. this.ajax = true;
  372. api.ajax({
  373. url: urlT,
  374. method: 'post',
  375. data: datas,
  376. headers: {
  377. "Content-type": content,
  378. },
  379. }, function (ret, err) {
  380. _this.ajax = false;
  381. api.hideProgress();
  382. api.refreshHeaderLoadDone();
  383. if (ret) {
  384. callback(ret);
  385. } else {
  386. api.toast({
  387. msg: '当前网络不稳定,请稍后再试'
  388. });
  389. }
  390. });
  391. }
  392. // 单独的get请求
  393. $http.prototype.$getadd = function (url, data, callback, other) {
  394. var _this = this;
  395. api.showProgress({
  396. });
  397. this.ajax = true;
  398. api.ajax({
  399. url: this.ip + eval('this.' + url) + data,
  400. method: 'get',
  401. data: {
  402. values: {
  403. }
  404. },
  405. headers: {
  406. "Content-type": "application/json;charset=UTF-8"
  407. },
  408. }, function (ret, err) {
  409. _this.ajax = false;
  410. api.hideProgress();
  411. api.refreshHeaderLoadDone();
  412. if (ret) {
  413. callback(ret);
  414. } else {
  415. api.toast({
  416. msg: '当前网络不稳定,请稍后再试'
  417. });
  418. }
  419. });
  420. }
  421. // get获取
  422. $http.prototype.$get = function (url, data, callback, other) {
  423. var content = "", urlT = "", _this = this;
  424. if (data.url == "json") {
  425. delete data.url;
  426. // 确认contenttype选项
  427. content = "application/json;charset=UTF-8";
  428. } else {
  429. content = "application/x-www-form-urlencoded"
  430. }
  431. var datas = this.serize(data);
  432. if (typeof other != 'undefined' && other != "" && other != 'undefined') {
  433. urlT = this.ip + eval('this.' + url) + '/' + other;
  434. } else {
  435. urlT = this.ip + eval('this.' + url);
  436. }
  437. api.showProgress({
  438. });
  439. if (this.ajax == true) {
  440. return;
  441. }
  442. this.ajax = true;
  443. api.ajax({
  444. url: urlT,
  445. method: 'get',
  446. data: {
  447. values: {
  448. }
  449. },
  450. headers: {
  451. "Content-type": "application/json;charset=UTF-8"
  452. },
  453. }, function (ret, err) {
  454. _this.ajax = false;
  455. api.hideProgress();
  456. api.refreshHeaderLoadDone();
  457. if (ret) {
  458. callback(ret);
  459. } else {
  460. api.toast({
  461. msg: '当前网络不稳定,请稍后再试'
  462. });
  463. }
  464. });
  465. }
  466. // 在链接后面拼接参数
  467. $http.prototype.$getOption = function (url, other, callback) {
  468. var _this = this;
  469. api.showProgress({
  470. });
  471. if (typeof other != 'undefined' && other != "" && other != 'undefined') {
  472. urlT = this.ip + eval('this.' + url) + '?' + other;
  473. } else {
  474. urlT = this.ip + eval('this.' + url);
  475. }
  476. api.ajax({
  477. url: urlT,
  478. method: 'get',
  479. data: {
  480. values: {
  481. }
  482. },
  483. headers: {
  484. "Content-type": "application/json;charset=UTF-8"
  485. },
  486. }, function (ret, err) {
  487. _this.ajax = false;
  488. api.hideProgress();
  489. api.refreshHeaderLoadDone();
  490. if (ret) {
  491. callback(ret);
  492. } else {
  493. api.toast({
  494. msg: '当前网络不稳定,请稍后再试'
  495. });
  496. }
  497. });
  498. }
  499. // 单独的有文件名字的上传文件
  500. $http.prototype.uploadfile = function (url, data, callback) {
  501. var _this = this;
  502. var urlT = this.ip + eval('this.' + url);
  503. var formdata = new FormData();
  504. formdata.append('file', data.file);
  505. formdata.append('type', data.type);
  506. api.showProgress({
  507. });
  508. $.ajax({
  509. url: urlT,
  510. type: "POST",
  511. data: formdata,
  512. processData: false, // 告诉jQuery不要去处理发送的数据
  513. contentType: false, // 告诉jQuery不要去设置Content-Type请求头
  514. success: function (ret, status, xhr) {
  515. api.hideProgress();
  516. if (ret.code == 0 || ret.code == '0') {
  517. callback(ret);
  518. }
  519. }
  520. });
  521. }
  522. // 对数据进行处理,第一个为values,第二个为file body
  523. $http.prototype.serize = function (data) {
  524. var serizeData;
  525. if (data instanceof Array) {
  526. if (data.length == 1) {
  527. serizeData = {
  528. values: data[0]
  529. }
  530. } else {
  531. serizeData = {
  532. values: data[0],
  533. files: data[1]
  534. }
  535. }
  536. } else {
  537. if (data.type == 'body') {
  538. delete data.type;
  539. if (data.yy == 'keng') {
  540. delete data.yy
  541. serizeData = {
  542. body: data.id
  543. }
  544. } else {
  545. serizeData = {
  546. body: data
  547. }
  548. }
  549. } else {
  550. serizeData = {
  551. values: data
  552. }
  553. }
  554. }
  555. return serizeData;
  556. }
  557. function alertJson(str) {
  558. alert(JSON.stringify(str));
  559. }