index.js 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574
  1. const Mock = require('mockjs');
  2. var loginState="0";//登陆状态,0未登录,1管理员登陆,2商家登陆,3买家登陆
  3. var accountInfo=[//账号列表
  4. [//管理员账号
  5. {"name":"admin1","password":"123","mess":{"userName":"附近的拉布拉多","loginId":"admin1","password":"123"}},
  6. {"name":"admin2","password":"123","mess":{"userName":"附近的哈士奇","loginId":"admin2","password":"123"}},
  7. {"name":"admin3","password":"123","mess":{"userName":"附近的金毛","loginId":"admin3","password":"123"}},
  8. ],
  9. [//商家账号
  10. {"name":"shop1","password":"123","mess":{"id":1,"userName":"楚楚饰品店","loginId":"shop1","password":"123","label":"饰品"},
  11. "goodList":[
  12. {
  13. "id":"1",
  14. "coverImg":"../../../static/images/shop/coverImg2.jpg",
  15. "title":"精美项链定制",
  16. "produce":"文艺简约,气质,森系,黄金,纯银,彩金,玫瑰金,吊坠,韩版,首饰礼物,锁骨链,学生,潮流白搭",
  17. "price":"¥119",
  18. "exampleImg":[
  19. {name:'exampleImg21.jpg',url:'../../../static/images/shop/exampleImg21.jpg'},
  20. {name:'exampleImg22.jpg',url:'../../../static/images/shop/exampleImg22.jpg'},
  21. {name:'exampleImg23.jpg',url:'../../../static/images/shop/exampleImg23.jpg'},
  22. {name:'exampleImg24.jpg',url:'../../../static/images/shop/exampleImg24.jpg'},
  23. ],
  24. "tags":[//个性化元素列表
  25. {
  26. "id":0,
  27. "inputVisible":false,
  28. "type":"材质",
  29. "list":["黄金","白银","彩金","水晶","珍珠"]
  30. },
  31. {
  32. "id":1,
  33. "inputVisible":false,
  34. "type":"图形",
  35. "list":["比翼双飞","心心相印","长命百岁","合家欢乐","福运到","守护天使"]
  36. },
  37. {
  38. "id":2,
  39. "inputVisible":false,
  40. "type":"刻字",
  41. "list":["嘿,是我","小幸运","我是你爸爸","女神"]
  42. },
  43. ],
  44. "commentsList":[
  45. {
  46. "text":"特别美妹妹很喜欢",
  47. "author":"和牙刷私奔叻丶"
  48. },
  49. {
  50. "text":"不咋地啊",
  51. "author":"夜凋凝"
  52. },
  53. {
  54. "text":"材质是真的",
  55. "author":"盛夏。"
  56. },
  57. ]
  58. },
  59. {
  60. "id":"2",
  61. "coverImg":"../../../static/images/shop/coverImg3.jpg",
  62. "title":"戒指定制",
  63. "produce":"北极光系列,裸钻定制,钻石,纯银,个性,学生,生日礼物,求婚,订婚,创意,网红定制刻字,日韩潮流",
  64. "price":"¥749",
  65. "exampleImg":[
  66. {name:'exampleImg31.jpg',url:'../../../static/images/shop/exampleImg31.jpg'},
  67. {name:'exampleImg32.jpg',url:'../../../static/images/shop/exampleImg32.jpg'},
  68. {name:'exampleImg33.jpg',url:'../../../static/images/shop/exampleImg33.jpg'},
  69. {name:'exampleImg34.jpg',url:'../../../static/images/shop/exampleImg34.jpg'},
  70. {name:'exampleImg35.jpg',url:'../../../static/images/shop/exampleImg35.jpg'},
  71. ],
  72. "tags":[//个性化元素列表
  73. {
  74. "id":0,
  75. "inputVisible":false,
  76. "type":"材质",
  77. "list":["黄金","白银","彩金","水晶","珍珠"]
  78. },
  79. {
  80. "id":1,
  81. "inputVisible":false,
  82. "type":"图形",
  83. "list":["比翼双飞","心心相印","长命百岁","合家欢乐","福运到","守护天使"]
  84. },
  85. {
  86. "id":2,
  87. "inputVisible":false,
  88. "type":"刻字",
  89. "list":["嘿,是我","小幸运","我是你爸爸","女神"]
  90. },
  91. ],
  92. "commentsList":[
  93. {
  94. "text":"特别美妹妹很喜欢",
  95. "author":"和牙刷私奔叻丶"
  96. },
  97. {
  98. "text":"不咋地啊",
  99. "author":"夜凋凝"
  100. },
  101. {
  102. "text":"材质是真的",
  103. "author":"盛夏。"
  104. },
  105. ]
  106. },
  107. {
  108. "id":"3",
  109. "coverImg":"../../../static/images/shop/coverImg4.jpg",
  110. "title":"手链定制",
  111. "produce":"手工定制,字母,激光,名字,纯手工饰品,时尚,韩版,个性,收藏,包邮",
  112. "price":"¥158",
  113. "exampleImg":[
  114. {name:'exampleImg41.jpg',url:'../../../static/images/shop/exampleImg41.jpg'},
  115. {name:'exampleImg42.jpg',url:'../../../static/images/shop/exampleImg42.jpg'},
  116. {name:'exampleImg43.jpg',url:'../../../static/images/shop/exampleImg43.jpg'},
  117. {name:'exampleImg44.jpg',url:'../../../static/images/shop/exampleImg44.jpg'},
  118. ],
  119. "tags":[//个性化元素列表
  120. {
  121. "id":0,
  122. "inputVisible":false,
  123. "type":"材质",
  124. "list":["黄金","白银","彩金","水晶","珍珠"]
  125. },
  126. {
  127. "id":1,
  128. "inputVisible":false,
  129. "type":"图形",
  130. "list":["比翼双飞","心心相印","长命百岁","合家欢乐","福运到","守护天使"]
  131. },
  132. {
  133. "id":2,
  134. "inputVisible":false,
  135. "type":"刻字",
  136. "list":["嘿,是我","小幸运","我是你爸爸","女神"]
  137. },
  138. ],
  139. "commentsList":[
  140. {
  141. "text":"特别美妹妹很喜欢",
  142. "author":"和牙刷私奔叻丶"
  143. },
  144. {
  145. "text":"不咋地啊",
  146. "author":"夜凋凝"
  147. },
  148. {
  149. "text":"材质是真的",
  150. "author":"盛夏。"
  151. },
  152. ]
  153. },
  154. {
  155. "id":"4",
  156. "coverImg":"../../../static/images/shop/coverImg5.jpg",
  157. "title":"耳坠定制",
  158. "produce":"手工定制,字母,激光,名字,纯手工饰品,时尚,韩版,个性,收藏,包邮",
  159. "price":"¥138",
  160. "exampleImg":[
  161. {name:'exampleImg51.jpg',url:'../../../static/images/shop/exampleImg51.jpg'},
  162. {name:'exampleImg52.jpg',url:'../../../static/images/shop/exampleImg52.jpg'},
  163. {name:'exampleImg53.jpg',url:'../../../static/images/shop/exampleImg53.jpg'},
  164. {name:'exampleImg54.jpg',url:'../../../static/images/shop/exampleImg54.jpg'},
  165. ],
  166. "tags":[//个性化元素列表
  167. {
  168. "id":0,
  169. "inputVisible":false,
  170. "type":"材质",
  171. "list":["黄金","白银","彩金","水晶","珍珠"]
  172. },
  173. {
  174. "id":1,
  175. "inputVisible":false,
  176. "type":"图形",
  177. "list":["比翼双飞","心心相印","长命百岁","合家欢乐","福运到","守护天使"]
  178. },
  179. {
  180. "id":2,
  181. "inputVisible":false,
  182. "type":"刻字",
  183. "list":["嘿,是我","小幸运","我是你爸爸","女神"]
  184. },
  185. ],
  186. "commentsList":[
  187. {
  188. "text":"特别美妹妹很喜欢",
  189. "author":"和牙刷私奔叻丶"
  190. },
  191. {
  192. "text":"不咋地啊",
  193. "author":"夜凋凝"
  194. },
  195. {
  196. "text":"材质是真的",
  197. "author":"盛夏。"
  198. },
  199. ]
  200. },
  201. ]
  202. },
  203. {"name":"shop2","password":"123","mess":{"id":2,"userName":"张兴邦食品旗舰店","loginId":"shop2","password":"123","label":"食品"},
  204. "goodList":[
  205. {
  206. "id":"1",
  207. "coverImg":"../../../static/images/shop/coverImg1.jpg",//封面图片路径
  208. "title":"零食大礼包",
  209. "produce":"超多零食,送女友,超大一箱,多种类自选,小吃组合,散装混合批发,超级划算,性价比高,良心推荐,加量不加价",
  210. "price":"¥23.5",
  211. "exampleImg":[
  212. {name:'exampleImg11.jpg',url:'../../../static/images/shop/exampleImg11.jpg'},
  213. {name:'exampleImg12.jpg',url:'../../../static/images/shop/exampleImg12.jpg'},
  214. {name:'exampleImg13.jpg',url:'../../../static/images/shop/exampleImg13.jpg'},
  215. {name:'exampleImg14.jpg',url:'../../../static/images/shop/exampleImg14.jpg'},
  216. ],//示例图片路径
  217. "tags":[//个性化元素列表
  218. {
  219. "id":0,
  220. "inputVisible":false,
  221. "type":"膨化食品类",
  222. "list":["虾条","薯片","鱿鱼酥","蔬菜圈","爆米花"]
  223. },
  224. {
  225. "id":1,
  226. "inputVisible":false,
  227. "type":"凉果蜜饯类",
  228. "list":["话梅","凉果","蜜饯","果脯","瓜果干","酸角糕"]
  229. },
  230. {
  231. "id":2,
  232. "inputVisible":false,
  233. "type":"肉干鱼干类",
  234. "list":["牛肉干","牛肉脯","猪肉粒","鱼片"]
  235. },
  236. {
  237. "id":3,
  238. "inputVisible":false,
  239. "type":"干果类",
  240. "list":["花生","瓜子","开心果","核桃仁","杏仁","榛子"]
  241. },
  242. ],
  243. "commentsList":[
  244. {
  245. "text":"太好吃啦太好吃啦太好吃啦太好吃啦太好吃啦太好吃啦太好吃啦太好吃啦太好吃啦太好吃啦太好吃啦太好吃啦太好吃啦太好吃啦太好吃啦太好吃啦太好吃啦太好吃啦太好吃啦太好吃啦",
  246. "author":"和牙刷私奔叻丶"
  247. },
  248. {
  249. "text":"不咋地",
  250. "author":"夜凋凝"
  251. }
  252. ]
  253. },
  254. ]
  255. },
  256. {"name":"shop3","password":"123","mess":{"id":3,"userName":"帕霏原创女装","loginId":"shop3","password":"123","label":"服装"},
  257. "goodList":[
  258. {
  259. "id":"1",
  260. "coverImg":"../../../static/images/shop/coverImg6.jpg",//封面图片路径
  261. "title":"礼服定制",
  262. "produce":"定制,华丽,礼服,裙,个性,蓬蓬裙,性感",
  263. "price":"¥923.5",
  264. "exampleImg":[
  265. {name:'exampleImg61.jpg',url:'../../../static/images/shop/exampleImg61.jpg'},
  266. {name:'exampleImg62.jpg',url:'../../../static/images/shop/exampleImg62.jpg'},
  267. {name:'exampleImg63.jpg',url:'../../../static/images/shop/exampleImg63.jpg'},
  268. {name:'exampleImg64.jpg',url:'../../../static/images/shop/exampleImg64.jpg'},
  269. {name:'exampleImg65.jpg',url:'../../../static/images/shop/exampleImg65.jpg'},
  270. ],//示例图片路径
  271. "tags":[//个性化元素列表
  272. {
  273. "id":0,
  274. "inputVisible":false,
  275. "type":"材质",
  276. "list":["羊毛","石棉","锦纶","涤纶","晴纶"]
  277. },
  278. {
  279. "id":1,
  280. "inputVisible":false,
  281. "type":"颜色",
  282. "list":["红色","黑色","白色","紫色","粉色","绿色"]
  283. },
  284. {
  285. "id":2,
  286. "inputVisible":false,
  287. "type":"风格",
  288. "list":["少女","尊贵","气质","时尚"]
  289. },
  290. ],
  291. "commentsList":[
  292. {
  293. "text":"质量不错",
  294. "author":"和牙刷私奔叻丶"
  295. },
  296. {
  297. "text":"不咋地",
  298. "author":"夜凋凝"
  299. }
  300. ]
  301. },
  302. {
  303. "id":"2",
  304. "coverImg":"../../../static/images/shop/coverImg7.jpg",//封面图片路径
  305. "title":"夏装个性定制",
  306. "produce":"定制,华丽,礼服,裙,个性,蓬蓬裙,性感",
  307. "price":"¥923.5",
  308. "exampleImg":[
  309. {name:'exampleImg71.jpg',url:'../../../static/images/shop/exampleImg71.jpg'},
  310. {name:'exampleImg72.jpg',url:'../../../static/images/shop/exampleImg72.jpg'},
  311. {name:'exampleImg73.jpg',url:'../../../static/images/shop/exampleImg73.jpg'},
  312. {name:'exampleImg74.jpg',url:'../../../static/images/shop/exampleImg74.jpg'},
  313. ],//示例图片路径
  314. "tags":[//个性化元素列表
  315. {
  316. "id":0,
  317. "inputVisible":false,
  318. "type":"材质",
  319. "list":["羊毛","石棉","锦纶","涤纶","晴纶"]
  320. },
  321. {
  322. "id":1,
  323. "inputVisible":false,
  324. "type":"颜色",
  325. "list":["红色","黑色","白色","紫色","粉色","绿色"]
  326. },
  327. {
  328. "id":2,
  329. "inputVisible":false,
  330. "type":"风格",
  331. "list":["少女","尊贵","气质","时尚"]
  332. },
  333. ],
  334. "commentsList":[
  335. {
  336. "text":"质量不错",
  337. "author":"和牙刷私奔叻丶"
  338. },
  339. {
  340. "text":"不咋地",
  341. "author":"夜凋凝"
  342. }
  343. ]
  344. },
  345. ]
  346. },
  347. ],
  348. [//买家账号
  349. {"name":"buyer1","password":"123","mess":{"id":1,"userName":"和牙刷私奔叻丶","loginId":"buyer1","password":"123","address":"黑龙江省大庆市"}},
  350. {"name":"buyer2","password":"123","mess":{"id":2,"userName":"夜凋凝","loginId":"buyer2","password":"123","address":"黑龙江省鹤岗市"}},
  351. {"name":"buyer3","password":"123","mess":{"id":3,"userName":"盛夏。","loginId":"buyer3","password":"123","address":"四川省南充市"}},
  352. ],
  353. ];
  354. var shopTagList=[{id: 1, text: '饰品', value: '饰品' }, {id: 2, text: '食品', value: '食品' }, {id: 3, text: '服装', value: '服装' }]
  355. //登陆前检测用户名和角色是否匹配
  356. Mock.mock('http://www.Zhengy.com/api/judegAccount',function(options){
  357. var req = eval('('+options.body+')');
  358. var find = accountInfo[req.radio].findIndex((value,index,arr)=>{
  359. return value.name==req.name;
  360. })
  361. return find;
  362. })
  363. //登陆
  364. Mock.mock('http://www.Zhengy.com/api/login',function(options){
  365. var req = eval('('+options.body+')');
  366. var index = accountInfo[req.radio].findIndex((value,index,arr)=>{
  367. return value.name==req.name;
  368. })
  369. var code=accountInfo[req.radio][index].password==req.password?200:201;
  370. var mess=accountInfo[req.radio][index].mess;
  371. return {"code":code,"mess":mess};
  372. })
  373. //管理员页面
  374. //获取商家标签列表
  375. Mock.mock('http://www.Zhengy.com/api/getTagtList',function(options){
  376. var res = shopTagList;
  377. return res;
  378. })
  379. //获取账号列表
  380. Mock.mock('http://www.Zhengy.com/api/getAccountList',function(options){
  381. var req = eval('('+options.body+')');
  382. var res = [];
  383. for(var i=0,length=accountInfo[req.type].length;i<length;i++){
  384. res.push(accountInfo[req.type][i].mess);
  385. }
  386. return res;
  387. })
  388. //管理员对账号增删改查
  389. Mock.mock('http://www.Zhengy.com/api/adminHandle',function(options){
  390. var req = eval('('+options.body+')');
  391. var code = 201;
  392. var afterEdit = {};
  393. switch(req.handle){
  394. case "1"://添加账号
  395. if(req.type==1){//商家账号
  396. var shop={
  397. "name":req.mess.name,
  398. "password":req.mess.password,
  399. "mess":{
  400. "id":accountInfo[1][accountInfo[1].length-1].mess.id+1,
  401. "userName":req.mess.userName,
  402. "loginId":req.mess.name,
  403. "password":req.mess.password,
  404. "label":req.mess.label,
  405. }
  406. };
  407. accountInfo[1].push(shop);
  408. code=200;
  409. }else{//买家账号
  410. var buyer={
  411. "name":req.mess.name,
  412. "password":req.mess.password,
  413. "mess":{
  414. "id":accountInfo[2][accountInfo[2].length-1].mess.id+1,
  415. "userName":req.mess.userName,
  416. "loginId":req.mess.name,
  417. "password":req.mess.password,
  418. "address":req.mess.address,
  419. }
  420. }
  421. accountInfo[2].push(buyer);
  422. code=200;
  423. }
  424. break;
  425. case "2"://编辑账号
  426. var index=accountInfo[req.type].findIndex((value,index,arr)=>{
  427. return value.mess.id==req.mess.id;
  428. })
  429. if(req.mess.name!=""){
  430. accountInfo[req.type][index].name=req.mess.name;
  431. accountInfo[req.type][index].mess.loginId=req.mess.name;
  432. }
  433. if(req.mess.password!=""){
  434. accountInfo[req.type][index].password=req.mess.password;
  435. accountInfo[req.type][index].mess.password=req.mess.password;
  436. }
  437. if(req.mess.userName!=""){
  438. accountInfo[req.type][index].mess.userName=req.mess.userName;
  439. }
  440. if(req.type==1){//商家账号
  441. if(req.mess.label!=""){
  442. accountInfo[1][index].mess.label=req.mess.label;
  443. }
  444. code=200;
  445. }else{//买家账号
  446. if(req.mess.address!=""){
  447. accountInfo[2][index].mess.address=req.mess.address;
  448. }
  449. code=200;
  450. }
  451. afterEdit=accountInfo[req.type][index];
  452. break;
  453. default://删除账号
  454. var index=accountInfo[req.type].findIndex((value,index,arr)=>{
  455. return value.mess.id==req.mess.id;
  456. })
  457. accountInfo[req.type].splice(index,1);
  458. code=200;
  459. }
  460. return {"code":code,"afterEdit":afterEdit};
  461. })
  462. //商家页面
  463. //商家获取已上架商品列表
  464. Mock.mock('http://www.Zhengy.com/api/getGoodList',function(options){
  465. var req = eval('('+options.body+')');
  466. var index = accountInfo[1].findIndex((value,index,arr)=>{
  467. return value.mess.id==req.id;
  468. })
  469. var res = accountInfo[1][index].goodList;
  470. return res;
  471. })
  472. //商家获取某商品详细信息
  473. Mock.mock('http://www.Zhengy.com/api/getGoodMess',function(options){
  474. var req = eval('('+options.body+')');
  475. var index1 = accountInfo[1].findIndex((value,index,arr)=>{
  476. return value.mess.id==req.shopId;
  477. })
  478. var index2 = accountInfo[1][index1].goodList.findIndex((value,index,arr)=>{
  479. return value.id==req.goodId;
  480. })
  481. var res = accountInfo[1][index1].goodList[index2];
  482. return res;
  483. })
  484. //商家修改商品基本信息
  485. Mock.mock('http://www.Zhengy.com/api/changeGoodBasicMess',function(options){
  486. var req = eval('('+options.body+')');
  487. var code=201;
  488. var index1 = accountInfo[1].findIndex((value,index,arr)=>{
  489. return value.mess.id==req.shopId;
  490. })
  491. var index2 = accountInfo[1][index1].goodList.findIndex((value,index,arr)=>{
  492. return value.id==req.goodId;
  493. })
  494. accountInfo[1][index1].goodList[index2].title=req.title;
  495. accountInfo[1][index1].goodList[index2].produce=req.produce;
  496. accountInfo[1][index1].goodList[index2].price=req.price;
  497. code=200;
  498. return {code:code};
  499. })
  500. //商家修改个性化案例展示图片
  501. Mock.mock('http://www.Zhengy.com/api/changeExampleImg',function(options){
  502. var req = eval('('+options.body+')');
  503. var code=201;
  504. var index1 = accountInfo[1].findIndex((value,index,arr)=>{
  505. return value.mess.id==req.shopId;
  506. })
  507. var index2 = accountInfo[1][index1].goodList.findIndex((value,index,arr)=>{
  508. return value.id==req.goodId;
  509. })
  510. if(req.type==1){//增加
  511. accountInfo[1][index1].goodList[index2].exampleImg.push(req.file);
  512. code=200;
  513. }else{//删除
  514. var index3 = accountInfo[1][index1].goodList[index2].exampleImg.findIndex((value,index,arr)=>{
  515. return value.name==req.name;
  516. })
  517. accountInfo[1][index1].goodList[index2].exampleImg.splice(index3,1);
  518. code=200;
  519. }
  520. return {code:code,exampleImg:accountInfo[1][index1].goodList[index2].exampleImg};
  521. })
  522. //商家个性化元素管理
  523. Mock.mock('http://www.Zhengy.com/api/changeTags',function(options){
  524. var req = eval('('+options.body+')');
  525. var code=201;
  526. var index1 = accountInfo[1].findIndex((value,index,arr)=>{
  527. return value.mess.id==req.shopId;
  528. })
  529. var index2 = accountInfo[1][index1].goodList.findIndex((value,index,arr)=>{
  530. return value.id==req.goodId;
  531. })
  532. accountInfo[1][index1].goodList[index2].tags[req.id].list=req.list;
  533. code=200;
  534. return {code:code};
  535. })
  536. //商家添加个性化元素分类
  537. Mock.mock('http://www.Zhengy.com/api/addGoodTags',function(options){
  538. var req = eval('('+options.body+')');
  539. var code=201;
  540. var index1 = accountInfo[1].findIndex((value,index,arr)=>{
  541. return value.mess.id==req.shopId;
  542. })
  543. var index2 = accountInfo[1][index1].goodList.findIndex((value,index,arr)=>{
  544. return value.id==req.goodId;
  545. })
  546. var tag = {
  547. "id":accountInfo[1][index1].goodList[index2].tags[accountInfo[1][index1].goodList[index2].tags.length-1].id+1,
  548. "inputVisible":false,
  549. "type":req.type,
  550. "list":req.list
  551. }
  552. accountInfo[1][index1].goodList[index2].tags.push(tag);
  553. code=200;
  554. return {code:code,tag:tag}
  555. })
  556. //商家上架商品
  557. Mock.mock('http://www.Zhengy.com/api/addGood',function(options){
  558. var req = eval('('+options.body+')');
  559. var code=201;
  560. var index = accountInfo[1].findIndex((value,index,arr)=>{
  561. return value.mess.id==req.shopId;
  562. })
  563. var good = req.good;
  564. if(accountInfo[1][index].goodList.length==0){
  565. good.id="1";
  566. }else{
  567. good.id=accountInfo[1][index].goodList[accountInfo[1][index].goodList.length-1].id+1;
  568. }
  569. accountInfo[1][index].goodList.push(good);
  570. code=200;
  571. return {code:code,goodlist:accountInfo[1][index].goodList}
  572. })