UserInformation.js 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702
  1. var Api = require('../net/Api');
  2. var UserInformationApi = require('../net/UserInformationApi');
  3. const PackApi = require('../net/PackApi');
  4. var { UserInformationType, UserInformationRelateOptType, GameNotificationKey, UserInteractionType, JobPageType, UserJobType} = require('../utils/GameEnum');
  5. var DWTool = require('../utils/DWTool');
  6. const AlertManager = require('../utils/AlertManager');
  7. var GameModule = require('../utils/GameModule');
  8. const tipsInfo = require('UserInformationTips');
  9. cc.Class({
  10. extends: cc.Component,
  11. properties: {
  12. titleNode: cc.Node,
  13. backgroundNode: cc.Node,
  14. infoBackgroundNode: cc.Node,
  15. informationNode: cc.Node, //用户信息节点
  16. userInformationNode: cc.Node, //左边当前人物信息节点
  17. userAvatar: cc.Sprite,
  18. userNicknameLabel: cc.Label,
  19. artistNameText: cc.RichText,
  20. bossButton: cc.Button, //显示老板按钮
  21. bossInformationNode: cc.Node,
  22. bossAvatar: cc.Sprite,
  23. bossNicknameLabel: cc.Label,
  24. bossArtistNameText: cc.RichText,
  25. timelineNode: cc.Node, //动态节点
  26. //用户角色
  27. infoRole: {
  28. default:UserInformationType.Mine,
  29. visible: false,
  30. },
  31. //关系改变弹窗:抢夺、赎身、签约
  32. changeRelationNode: cc.Node,
  33. //修改艺名节点
  34. editNameNode: cc.Node,
  35. editboxName: cc.EditBox,
  36. //提示框节点
  37. errorNode: cc.Node,
  38. _userIdArray: [cc.Integer],
  39. themeNode: cc.Node,
  40. jobNode: cc.Node,
  41. //个人属性节点
  42. propertyNode: cc.Node,
  43. //互动、亲密度相关操作
  44. interactionPrefab: cc.Prefab,
  45. //背包预制
  46. packPrefab: cc.Prefab,
  47. //插卡操作节点
  48. insertCardNode: cc.Node,
  49. },
  50. // LIFE-CYCLE CALLBACKS:
  51. onLoad() {
  52. this.bossInformationNode.on('touchend', this.showBossInfoToView, this);
  53. this.editNameNode.on('touchend', this.closeEditName, this);
  54. this.jobNode.on('touchend', this.changeJob, this);
  55. let XHeight = 1624;
  56. this.winSize = cc.view.getVisibleSize();
  57. let nodeY = this.winSize.height / 2.0;
  58. this.node.y = nodeY;
  59. this.infoTop = 135;
  60. if (this.winSize.height >= XHeight) {
  61. this.titleNode.getComponent(cc.Widget).top = 80;
  62. this.infoBackgroundNode.getComponent(cc.Widget).top = -50;
  63. this.informationNode.getComponent(cc.Widget).top = 185;
  64. this.infoTop = 185;
  65. }
  66. let timelineHeight = (this.winSize.height - this.infoTop - this.informationNode.height);
  67. this.timelineNode.height = timelineHeight;
  68. this.timelineNode.y = timelineHeight - this.winSize.height;
  69. //适配pad尺寸修改
  70. if (this.winSize.height <= 1100) {
  71. this.backgroundNode.getComponent(cc.Widget).bottom = -500;
  72. this.scrollY = 0;
  73. this.node.setContentSize(cc.size(this.winSize.width, 1334));
  74. let maxHeight = 1334 - nodeY;
  75. this.node.on(cc.Node.EventType.TOUCH_START, function (event) {
  76. this.scrollY = event.getLocation().y;
  77. }, this);
  78. this.node.on(cc.Node.EventType.TOUCH_MOVE, function (event) {
  79. let moveY = event.getLocation().y;
  80. if (moveY <= this.scrollY) {
  81. if (this.node.y <= nodeY) {
  82. this.node.y = nodeY;
  83. } else {
  84. this.node.y -= Math.min((this.scrollY - moveY), 20);
  85. }
  86. } else {
  87. if (this.node.y >= maxHeight) {
  88. this.node.y = maxHeight;
  89. } else {
  90. this.node.y += Math.min((moveY - this.scrollY), 20);
  91. }
  92. }
  93. this.scrollY = moveY;
  94. }, this);
  95. let timelineHeight = (1334 - this.infoTop - this.informationNode.height);
  96. this.timelineNode.height = timelineHeight;
  97. this.timelineNode.y = timelineHeight - 1334;
  98. }
  99. this.artistNameText.getComponent('UserInformationRichText').init(this);
  100. this.errorMng = this.errorNode.getComponent('UserInformationAlert');
  101. this.timelineMng = this.timelineNode.getComponent('UserInformationTimeline');
  102. this.relationAlertMng = this.changeRelationNode.getComponent('UserInformationAlert');
  103. this.themeMng = this.themeNode.getComponent('UserInformationTheme');
  104. this.propertyMng = this.propertyNode.getComponent('UserInformationProperty');
  105. this.insertCardMng = this.insertCardNode.getComponent('UserInsertCard');
  106. //亲密度显示操作页面
  107. this.interaction = cc.instantiate(this.interactionPrefab);
  108. this.interaction = this.interaction.getComponent('UserInteraction');
  109. //背包页面
  110. this.pack = cc.instantiate(this.packPrefab);
  111. this.pack = this.pack.getComponent('UserPack');
  112. this.setEventListener();
  113. this.trainEvent = _.debounce(() => {
  114. //0为还没选择职业将不能进行培养,跳去选择职业界面
  115. if (this.userInfo.jobId == UserJobType.None) {
  116. AlertManager.showArtistTrainNoJob(() => {
  117. this.changeJob();
  118. }, this.node.zIndex);
  119. } else {
  120. AlertManager.showTrainAlert(this.userInfo.uid, this.node.zIndex);
  121. }
  122. }, 1000, true);
  123. this.visitEvent = _.debounce( () => {
  124. GameEvent.fire(GameNotificationKey.VisitFriendHome, this.userInfo.uid);
  125. }, 1000, true);
  126. },
  127. init(game, uid) {
  128. this.node.parent = cc.find("Canvas");
  129. this.node.setContentSize(cc.view.getVisibleSize());
  130. this.node.active = true;
  131. this.node.zIndex += 1;
  132. this.loadUserInformation(uid);
  133. this.game = game;
  134. },
  135. start() {
  136. },
  137. onEnable() {
  138. },
  139. setEventListener() {
  140. GameEvent.on(GameNotificationKey.ShowInteraction, this, () => {
  141. if (this.responseData.interactionInfo) {
  142. var isCommon = (this.infoRole == UserInformationType.Boss || this.infoRole == UserInformationType.MyArtist) ? false : true;
  143. this.interaction.showIntimacyInfo(isCommon);
  144. }
  145. });
  146. GameEvent.on(GameNotificationKey.RefreshUserInformation, this, () => {
  147. this.getNetworkData(true);
  148. });
  149. GameEvent.on(GameNotificationKey.OpenPack, this, (justOpen) => {
  150. this.openPack(justOpen);
  151. });
  152. GameEvent.on(GameNotificationKey.RefreshInsertCardsInfo, this, (cardInfo,isInsert) => {
  153. this.refreshCardsInfo(cardInfo,isInsert);
  154. });
  155. },
  156. onDisable() {
  157. this.bossInformationNode.enabled = true;
  158. this.bossInformationNode.active = false;
  159. this.bossInformationNode.x = this.winSize.width / 2.0;
  160. this.bossButton.node.x = this.winSize.width / 2.0 - 84;
  161. this.bossButton.node.active = false;
  162. this.themeMng.relationButtonNode.enabled = true;
  163. this.themeMng.successNode.active = false;
  164. this.editNameNode.active = false;
  165. this.changeRelationNode.active = false;
  166. this.errorNode.active = false;
  167. this.node.zIndex = 0;
  168. this._userIdArray = [];
  169. this.clearUserData();
  170. },
  171. loadUserInformation(uid) {
  172. if (uid) {
  173. this.uid = uid;
  174. }
  175. if (Global.user.uid == this.uid) {
  176. this.isSelf = true;
  177. } else {
  178. this.isSelf = false;
  179. }
  180. this.getNetworkData(false);
  181. },
  182. //获取个人信息
  183. getNetworkData(isRefresh) {
  184. UserInformationApi.getUserInformation(this.uid, (responseData) => {
  185. // console.log("responseData: " + JSON.stringify(responseData));
  186. this.loadInformation(responseData);
  187. if (isRefresh == false) {
  188. this._userIdArray.push(this.uid);
  189. }
  190. this.clearUserData();
  191. }, (error) => {
  192. console.log('userinformation error' + error);
  193. this.bossInformationNode.enabled = true;
  194. });
  195. },
  196. loadInformation(responseData) {
  197. if (responseData) {
  198. this.role = responseData.role;
  199. this.currentUserCost = responseData.currentUserCost;
  200. this.userInfo = responseData.userInfo;
  201. this.bossInfo = responseData.bossInfo;
  202. this.responseData = responseData;
  203. this.refreshThemeUI();
  204. this.timelineMng.loadUserTimeline(this.uid);
  205. this.getCardsInfo();
  206. this.getRelationCondition();
  207. }
  208. },
  209. //获取插卡信息
  210. getCardsInfo() {
  211. PackApi.getUserCardsInfo(this.uid, (responseData) => {
  212. // console.log("responseData: " + JSON.stringify(responseData));
  213. this.cardsList = responseData.list;
  214. this.themeMng.configCardsData(responseData.list);
  215. }, (error) => {
  216. console.log('userinformation error' + error);
  217. this.cardsList = null;
  218. this.themeMng.equipCardNode.active = false;
  219. });
  220. },
  221. //获取抢夺条件
  222. getRelationCondition() {
  223. var opt = UserInformationRelateOptType.None;
  224. switch (this.infoRole) {
  225. case UserInformationType.Boss:
  226. opt = UserInformationRelateOptType.Redeem;
  227. break;
  228. case UserInformationType.OtherArtist:
  229. opt = UserInformationRelateOptType.Loot;
  230. break;
  231. case UserInformationType.ArtistFree:
  232. opt = UserInformationRelateOptType.Sign;
  233. break;
  234. case UserInformationType.MyArtist:
  235. opt = UserInformationRelateOptType.Fire;
  236. break;
  237. default:
  238. break;
  239. }
  240. UserInformationApi.getRelationCondition(this.uid,opt, (responseData) => {
  241. // console.log("condition: " + JSON.stringify(responseData));
  242. this.conditionData = responseData;
  243. this.themeMng.refreshRelationNode();
  244. }, (error) => {
  245. console.log('condition error' + error);
  246. this.conditionData = null;
  247. this.themeMng.relationButtonNode.active = false;
  248. });
  249. },
  250. //关闭个人信息页
  251. closeInformationAction() {
  252. if (this._userIdArray.length > 1) {
  253. let uid = this._userIdArray[this._userIdArray.length - 2];
  254. this.loadUserInformation(uid);
  255. this.removeItems(this._userIdArray, 2);
  256. } else {
  257. this.node.active = false;
  258. if (this.game != undefined) {
  259. this.game.gameFSM.historyBack();
  260. }
  261. }
  262. },
  263. removeItems(arr, item) {
  264. for (var i = 0; i < item; i++) {
  265. arr.pop();
  266. }
  267. },
  268. //清除用户数据
  269. clearUserData() {
  270. this.cardsList = [];
  271. this.conditionData = null;
  272. this.themeMng.equipCardNode.active = false;
  273. this.themeMng.relationButtonNode.active = false;
  274. },
  275. // update (dt) {},
  276. //根据不同用户状态信息显示
  277. refreshThemeUI() {
  278. if (this.userInfo) {
  279. if (this.userInfo.head) {
  280. Api.createImageFromUrl(this.userInfo.head, (spriteFrame) => {
  281. this.userAvatar.spriteFrame = spriteFrame;
  282. });
  283. }
  284. if (this.userInfo.nick) {
  285. this.userNicknameLabel.string = this.userInfo.nick;
  286. }
  287. var genderIcon = 'artist_female';
  288. if (this.userInfo.gender == 1) {
  289. genderIcon = 'artist_male';
  290. }
  291. var artistName = " 无艺名 ";
  292. if (this.userInfo.artistName) {
  293. artistName = " " + this.userInfo.artistName.slice(0,5) + " ";
  294. }
  295. var artistString = "<img src='"+ genderIcon +"'/><outline color=white width=2> " + artistName + "</outline>";
  296. if (this.role == 2) {
  297. let editName = "<img src='artist_name_edit' click='clickEditName'/>";
  298. artistString += editName;
  299. }
  300. this.artistNameText.string = artistString;
  301. if (this.isSelf) {
  302. this.infoRole = UserInformationType.Mine;
  303. } else {
  304. switch (this.role) {
  305. case UserInformationType.Boss:
  306. this.infoRole = UserInformationType.Boss;
  307. break;
  308. case UserInformationType.MyArtist:
  309. this.infoRole = UserInformationType.MyArtist;
  310. if (this.userInfo.artistName) {
  311. this.editNameNode.string = this.userInfo.artistName;
  312. }
  313. break;
  314. case UserInformationType.ArtistFree:
  315. this.infoRole = UserInformationType.ArtistFree;
  316. break;
  317. case UserInformationType.OtherArtist:
  318. this.infoRole = UserInformationType.OtherArtist;
  319. break;
  320. default:
  321. break
  322. }
  323. }
  324. this.propertyMng.setUserData(this.userInfo, this.infoRole);
  325. }
  326. if (this.bossInfo) {
  327. this.bossButton.node.active = true;
  328. if (this.bossInfo.head) {
  329. Api.createImageFromUrl(this.bossInfo.head, (spriteFrame) => {
  330. this.bossAvatar.spriteFrame = spriteFrame;
  331. });
  332. }
  333. if (this.bossInfo.nick) {
  334. this.bossNicknameLabel.string = this.bossInfo.nick;
  335. }
  336. var genderIcon = 'artist_female';
  337. if (this.userInfo.gender == 1) {
  338. genderIcon = 'artist_male';
  339. }
  340. var artistName = " 无艺名";
  341. if (this.bossInfo.artistName) {
  342. artistName = " " + this.bossInfo.artistName.slice(0,3);
  343. }
  344. var artistString = "<img src='"+ genderIcon +"'/><outline color=white width=2> " + artistName + "</outline>";
  345. this.bossArtistNameText.string = artistString;
  346. } else {
  347. this.bossButton.node.active = false;
  348. }
  349. this.bossInformationNode.enabled = true;
  350. this.bossInformationNode.active = false;
  351. this.bossInformationNode.x = this.winSize.width / 2.0;
  352. this.bossButton.node.x = this.winSize.width / 2.0 - 84;
  353. if (this.responseData.interactionInfo) {
  354. this.interaction.init(this.uid, this.responseData.interactionInfo, this);
  355. this.configIntimacy(this.responseData.interactionInfo);
  356. }
  357. let hasBoss = this.bossInfo ? true : false;
  358. this.themeMng.changeTheme(this.infoRole,hasBoss);
  359. },
  360. showBossInfo() {
  361. if (this.bossInformationNode.active === true) {
  362. let callBack = cc.callFunc(function () {
  363. this.bossInformationNode.active = false;
  364. }, this);
  365. let positionAction = cc.moveBy(0.15, 153, 0);
  366. this.bossInformationNode.runAction(cc.sequence(positionAction, callBack));
  367. let buttonAction = cc.moveBy(0.15, 148, 0);
  368. this.bossButton.node.runAction(buttonAction);
  369. } else {
  370. this.bossInformationNode.active = true;
  371. let positionAction = cc.moveBy(0.15, -153, 0);
  372. this.bossInformationNode.runAction(positionAction);
  373. let buttonAction = cc.moveBy(0.15, -148, 0);
  374. this.bossButton.node.runAction(buttonAction);
  375. }
  376. },
  377. showBossInfoToView() {
  378. this.bossInformationNode.enabled = false;
  379. this.loadUserInformation(this.bossInfo.uid);
  380. },
  381. //抢夺、赎身、签约操作
  382. changeRelationAction() {
  383. if (!this.conditionData) {
  384. return;
  385. }
  386. this.themeMng.relationButtonNode.enabled = false;
  387. var opt = UserInformationRelateOptType.None;
  388. switch (this.infoRole) {
  389. case UserInformationType.Boss:
  390. opt = UserInformationRelateOptType.Redeem;
  391. break;
  392. case UserInformationType.OtherArtist:
  393. opt = UserInformationRelateOptType.Loot;
  394. break;
  395. case UserInformationType.ArtistFree:
  396. opt = UserInformationRelateOptType.Sign;
  397. break;
  398. case UserInformationType.MyArtist:
  399. opt = UserInformationRelateOptType.Fire;
  400. break;
  401. default:
  402. break;
  403. }
  404. let string = tipsInfo.changeRelationTitle[opt].content;
  405. this.relationAlertMng.showRelationAlert(string, this.conditionData, () => {
  406. this.changeRelationNode.active = false;
  407. }, () => {
  408. this.confirmChangeRelation(opt);
  409. });
  410. },
  411. confirmChangeRelation(opt) {
  412. this.changeRelate(opt);
  413. this.changeRelationNode.active = false;
  414. },
  415. /**
  416. * 修改用户状态
  417. * @param {UserInformationRelateOptType} type
  418. */
  419. changeRelate(opt) {
  420. UserInformationApi.postRelate(this.uid, opt, (responseData) => {
  421. // console.log("responseData: " + JSON.stringify(responseData));
  422. var bossUid = 0;
  423. switch (opt) {
  424. case UserInformationRelateOptType.Loot:
  425. bossUid = this.bossInfo.uid;
  426. break;
  427. default:
  428. break;
  429. }
  430. this.themeMng.showChangeRelationSuccess(tipsInfo.relationSuccess[opt].image);
  431. if (bossUid > 0) {
  432. GameEvent.fire(GameNotificationKey.NoticeRoleOpt, this.uid, opt, bossUid);
  433. } else {
  434. GameEvent.fire(GameNotificationKey.NoticeRoleOpt, this.uid, opt);
  435. }
  436. GameModule.userInfo.grossIncome -= this.conditionData.coin;
  437. this.themeMng.relationButtonNode.enabled = true;
  438. this.loadInformation(responseData);
  439. GameEvent.fire(GameNotificationKey.RefreshFriendList);
  440. }, (code, msg) => {
  441. var errorString = msg;
  442. if (code == 805) {
  443. errorString = tipsInfo.relationFail805[opt].content;
  444. }
  445. let errorImage = tipsInfo.relationFail[opt].image;
  446. this.errorMng.showRelationErrorAlert(errorImage, errorString, () => {
  447. });
  448. this.themeMng.relationButtonNode.enabled = true;
  449. });
  450. },
  451. //修改艺人名字
  452. showEditName() {
  453. this.editNameNode.active = true;
  454. if (this.userInfo.artistName) {
  455. this.editboxName.string = this.userInfo.artistName;
  456. }
  457. this.editboxName.setFocus(true);
  458. },
  459. confirmEditName() {
  460. UserInformationApi.editArtistName(this.uid, this.editboxName.string, (responseData) => {
  461. // console.log("修改艺名成功 " + JSON.stringify(responseData));
  462. this.reloadArtistName();
  463. this.closeEditName();
  464. }, (error) => {
  465. console.log('修改艺名失败' + error);
  466. });
  467. this.editNameNode.active = false;
  468. },
  469. reloadArtistName() {
  470. this.userInfo.artistName = this.editboxName.string;
  471. var genderIcon = 'artist_female';
  472. if (this.userInfo.gender == 1) {
  473. genderIcon = 'artist_male';
  474. }
  475. var artistName = " 无艺名 ";
  476. if (this.userInfo.artistName) {
  477. artistName = " " + this.userInfo.artistName.slice(0,5) + " ";
  478. }
  479. var artistString = "<img src='"+ genderIcon +"'/><outline color=white width=2> " + artistName + "</outline>";
  480. if (this.role == 2) {
  481. let editName = "<img src='artist_name_edit' click='clickEditName'/>";
  482. artistString += editName;
  483. }
  484. this.artistNameText.string = artistString;
  485. },
  486. closeEditName() {
  487. this.editboxName.setFocus(false);
  488. if (window.wx != undefined) {
  489. wx.hideKeyboard();
  490. }
  491. this.editNameNode.active = false;
  492. },
  493. //跳转到指定用户家园
  494. showUserHome() {
  495. this.node.active = false;
  496. this.visitEvent();
  497. },
  498. //培养按钮点击
  499. trainAction() {
  500. this.trainEvent();
  501. },
  502. //亲密度数据设置
  503. configIntimacy(interactionInfo) {
  504. this.themeMng.configIntimacyData(interactionInfo);
  505. },
  506. showInteraction(event,customEventData) {
  507. //判断互动是否正向
  508. var isGood = false;
  509. if (customEventData == 'true') {
  510. isGood = true;
  511. }
  512. var interactionType = UserInteractionType.Common;
  513. switch (this.infoRole) {
  514. case UserInformationType.Boss:
  515. interactionType = isGood ? UserInteractionType.PlayUp : UserInteractionType.Revolt;
  516. break;
  517. case UserInformationType.MyArtist:
  518. interactionType = isGood ? UserInteractionType.Pacify : UserInteractionType.Order;
  519. break;
  520. default:
  521. break;
  522. }
  523. this.interaction.showInteraction(interactionType);
  524. },
  525. //突破按钮点击,职业进阶
  526. levelUpgradeAction() {
  527. if (this.userInfo) {
  528. GameEvent.fire(GameNotificationKey.ShowJobPage, JobPageType.LevelUp, this.userInfo, this.node.zIndex);
  529. }
  530. },
  531. //选择或转换职业
  532. changeJob() {
  533. if (this.infoRole == UserInformationType.MyArtist && this.userInfo) {
  534. //0为还没有选择职业,其他为已选择职业转职
  535. if (this.userInfo.jobId == UserJobType.None) {
  536. GameEvent.fire(GameNotificationKey.ShowJobPage, JobPageType.ChooseJob, this.userInfo, this.node.zIndex);
  537. } else {
  538. GameEvent.fire(GameNotificationKey.ShowJobPage, JobPageType.ChangeJob, this.userInfo, this.node.zIndex);
  539. // this.levelUpgradeAction();
  540. }
  541. }
  542. },
  543. //打开背包
  544. openPackAction() {
  545. GameEvent.fire(GameNotificationKey.OpenPack,true);
  546. },
  547. openPack(justOpen) {
  548. this.pack.init(justOpen,this.uid);
  549. this.pack.showPack();
  550. },
  551. //打开插卡页面
  552. showInseertCard() {
  553. this.insertCardNode.active = true;
  554. this.insertCardMng.init(this.cardsList, this.uid);
  555. },
  556. refreshCardsInfo(cardInfo,isInsert) {
  557. if (isInsert) {
  558. if (this.cardsList != undefined) {
  559. this.cardsList.push(cardInfo);
  560. } else {
  561. this.cardsList = [];
  562. this.cardsList.push(cardInfo);
  563. }
  564. } else {
  565. for(var index in this.cardsList) {
  566. let item = this.cardsList[index];
  567. if (item.id == cardInfo.id) {
  568. this.cardsList.splice(index,1);
  569. break;
  570. }
  571. }
  572. }
  573. this.themeMng.configCardsData(this.cardsList);
  574. }
  575. });