StoreView.js 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606
  1. cc.Class({
  2. extends: cc.Component,
  3. properties: {
  4. Seed: {
  5. default: null,
  6. type: cc.Node,
  7. },
  8. Exchange: {
  9. default: null,
  10. type: cc.Node,
  11. },
  12. SeedBtn: {
  13. default: null,
  14. type: cc.Node,
  15. },
  16. ExchangeBtn: {
  17. default: null,
  18. type: cc.Node,
  19. },
  20. <<<<<<< HEAD
  21. OpentSNBExchangeToCNT() {
  22. GlobalD.GameData.showToast(cc.find("Canvas/UICamera"), "转换CNT通道关闭!", 1);
  23. return;
  24. //限制相关人员交易
  25. if (1 === GlobalD.UserInfo.limitTran) {
  26. GlobalD.GameData.showToast(cc.find("Canvas/UICamera"), "转换CNT通道关闭,请联系相关管理人员!", 1);
  27. return;
  28. }
  29. //更新数据
  30. this.snbAmountLabel.string = GlobalD.GameData.SNB;
  31. this.ExchangePopView.active = true;
  32. =======
  33. EquipmentBtn: {
  34. default: null,
  35. type: cc.Node,
  36. >>>>>>> cba7e039f9979c7af0832b36f193289324b80096
  37. },
  38. SelectedFrame: cc.Node,
  39. //Building40: cc.Node,
  40. ManageUI: cc.Node,
  41. //四个按钮对应的sprite
  42. Normal_Seed_Sprite: cc.SpriteFrame,
  43. Selecteded_Seed_Sprite: cc.SpriteFrame,
  44. Normal_Exchange_Sprite: cc.SpriteFrame,
  45. Selecteded_Exchange_Sprite: cc.SpriteFrame,
  46. //需要切换节点顺序的父节点
  47. container: cc.Node,
  48. //商城的列表
  49. mySeedList: [],
  50. seedPrefab: cc.Prefab,
  51. seedSpriteFrame: {
  52. default: [],
  53. type: [cc.SpriteFrame],
  54. },
  55. //商城的图标列表
  56. mySeedIconList: {
  57. default: [],
  58. type: [cc.SpriteFrame],
  59. },
  60. seedNodeArry: {
  61. default: [],
  62. type: [cc.Node],
  63. serializable: false,
  64. visible: false,
  65. },
  66. snbAmount: 0,
  67. cntAmount: 0,
  68. ExchangePopView: {
  69. default: null,
  70. type: cc.Node,
  71. },
  72. PayCNTPopView: {
  73. default: null,
  74. type: cc.Node,
  75. },
  76. PaySNBPopView: {
  77. default: null,
  78. type: cc.Node,
  79. },
  80. buySeedIndex: -1,
  81. snbAmountLabel: {
  82. default: [],
  83. type: [cc.Label],
  84. },
  85. //拿到仓库列表的节点
  86. buildingView: {
  87. default: null,
  88. type: cc.Node,
  89. },
  90. myWareHouseSeedList: null,
  91. //轮询种子列表状态
  92. AutoGetSeedsData: null,
  93. bottomLabel: {
  94. default: null,
  95. type: cc.Node,
  96. },
  97. seedsView: {
  98. default: null,
  99. type: cc.Node,
  100. },
  101. // ExchangeView: {
  102. // default: null,
  103. // type: cc.Node,
  104. // },
  105. seedBottomLabel: {
  106. default: null,
  107. type: cc.Node,
  108. },
  109. scrollViewNode: {
  110. default: null,
  111. type: cc.Node,
  112. },
  113. //购买种类数值
  114. toggleInputValue: {
  115. default: '1',
  116. visible: false,
  117. },
  118. PayCNTPopViewNameLabel: {
  119. default: null,
  120. type: cc.Label,
  121. },
  122. PayCNTPopViewPriceLabel: {
  123. default: null,
  124. type: cc.Label,
  125. },
  126. PayCNTPopViewMutureDurLabel: {
  127. default: null,
  128. type: cc.Label,
  129. },
  130. isPlaying: false,
  131. },
  132. HiddenAll() {
  133. if (this.Seed.active) this.Seed.active = false
  134. if (this.Exchange.active) this.Exchange.active = false
  135. },
  136. start() {
  137. //获取到仓库列表的脚本
  138. this.buildingViewScript = this.buildingView.getComponent('BuildingView')
  139. //默认设置第一个节点为 最上面
  140. this.SeedBtn.setSiblingIndex(10)
  141. // console.log('SNB=======', GlobalD.GameData.SNB)
  142. this.snbAmountLabel.string = GlobalD.GameData.SNB
  143. //这里也初始化获取一个数据
  144. GlobalD.GameData.getWarehouseSeedAndFruit((vaule) => {
  145. this.myWareHouseSeedList = vaule.data.seed
  146. })
  147. //获取种子和果实
  148. GlobalD.GameData.getMallSeed((vaule) => {
  149. this.mySeedList = vaule.data
  150. // console.log('this.mySeedList[i]=', this.mySeedList);
  151. for (let i = 0; i < this.mySeedList.length; i++) {
  152. //没有种子数量不显示 todo 看看后续需不需要处理删除
  153. //if (this.mySeedList[i].amount < 1) continue;
  154. let _seed = cc.instantiate(this.seedPrefab)
  155. //if (this.mySeedList[i].amount < 1)
  156. if (this.mySeedList[i].amount < 1) {
  157. //_seed.getChildByName("SellOut").active = true;
  158. } else {
  159. _seed.getChildByName('SellOut').active = false
  160. }
  161. // _seed.getChildByName("buy_button").active = true;
  162. // _seed.getChildByName("Name").active = false;
  163. // _seed.getChildByName("Name").getChildByName("Num").getComponent(cc.Label).strng = '';//'x'+this.mySeedList[i].amount;
  164. this.seedNodeArry.push(_seed)
  165. _seed.parent = this.Seed
  166. let _seedScript = _seed.getComponent('Content_Button')
  167. _seedScript.Name = this.mySeedList[i].name
  168. _seedScript.Price = ''
  169. _seedScript.CNT = this.mySeedList[i].priceCnt
  170. _seedScript.SNB = this.mySeedList[i].priceSnb
  171. _seedScript.Mature = this.mySeedList[i].maturity + '天'
  172. _seedScript.Synopsis = this.mySeedList[i].seedDescribe
  173. //设置一个生成点
  174. let _spawnScript = _seed.getComponent('Content_seed')
  175. _spawnScript.myIndex = i
  176. _spawnScript.SpawnPoint = cc.find('Canvas/SpawnParent/SpawnPoint')
  177. _seedScript.NumLabel.string = this.mySeedList[i].amount
  178. _seedScript.NameLabel.string = this.mySeedList[i].name
  179. switch (this.mySeedList[i].picture) {
  180. case 'Cabbage':
  181. _seedScript.bgSprite.spriteFrame = this.mySeedIconList[0] //this.seedSpriteFrame[0];
  182. break
  183. case 'Potato':
  184. _seedScript.bgSprite.spriteFrame = this.mySeedIconList[1] //this.seedSpriteFrame[1];
  185. break
  186. case 'Carrot':
  187. _seedScript.bgSprite.spriteFrame = this.mySeedIconList[2] //this.seedSpriteFrame[2];
  188. break
  189. case 'Broccoli':
  190. _seedScript.bgSprite.spriteFrame = this.mySeedIconList[3] //this.seedSpriteFrame[3];
  191. break
  192. case 'Tomato':
  193. _seedScript.bgSprite.spriteFrame = this.mySeedIconList[4] //this.seedSpriteFrame[4];
  194. break
  195. case 'Squash':
  196. _seedScript.bgSprite.spriteFrame = this.mySeedIconList[5] //this.seedSpriteFrame[5];
  197. break
  198. case 'Eggplant':
  199. _seedScript.bgSprite.spriteFrame = this.mySeedIconList[6] //this.seedSpriteFrame[6];
  200. break
  201. case 'Pepper':
  202. _seedScript.bgSprite.spriteFrame = this.mySeedIconList[7] //this.seedSpriteFrame[7];
  203. break
  204. case 'Lentil':
  205. _seedScript.bgSprite.spriteFrame = this.mySeedIconList[8] //this.seedSpriteFrame[8];
  206. break
  207. default:
  208. break
  209. }
  210. }
  211. })
  212. },
  213. //切换建筑的面板
  214. onSwitchBuildingContent(event, index) {
  215. // this.SeedBtn.setScale(1)
  216. // this.ExchangeBtn.setScale(1)
  217. this.SeedBtn.getComponent(cc.Sprite).spriteFrame = this.Normal_Seed_Sprite
  218. this.ExchangeBtn.getComponent(cc.Sprite).spriteFrame =
  219. this.Normal_Exchange_Sprite
  220. // this.SeedBtn.setContentSize(100, 54)
  221. // this.ExchangeBtn.setContentSize(100, 54)
  222. // this.SeedBtn.y = -5
  223. // this.ExchangeBtn.y = -5
  224. this.HiddenAll()
  225. //面板设置index
  226. //种子
  227. if ('0' == index) {
  228. // this.SeedBtn.y = -20
  229. this.SeedBtn.getComponent(cc.Sprite).spriteFrame =
  230. this.Selecteded_Seed_Sprite
  231. this.Seed.active = true
  232. if (this.seedNodeArry.length != 0) {
  233. this.SelectedFrame.parent = this.seedNodeArry[0]
  234. }
  235. // this.SeedBtn.zIndex = 10
  236. // this.SeedBtn.setContentSize(110, 100)
  237. // this.ExchangeBtn.zIndex = 1
  238. // this.ExchangeBtn.setContentSize(86, 88);
  239. this.bottomLabel.active = false
  240. this.scrollViewNode.active = true
  241. this.seedBottomLabel.active = true
  242. this.seedsView.active = true
  243. this.Exchange.active = false
  244. }
  245. //兑换
  246. else if ('1' == index) {
  247. // this.ExchangeBtn.y = -20
  248. this.ExchangeBtn.getComponent(cc.Sprite).spriteFrame =
  249. this.Selecteded_Exchange_Sprite
  250. // this.ExchangeBtn.zIndex = 10
  251. // this.ExchangeBtn.setContentSize(110, 100)
  252. // this.SeedBtn.zIndex = 1
  253. // this.SeedBtn.setContentSize(86, 88);
  254. this.bottomLabel.active = true
  255. this.scrollViewNode.active = false
  256. this.seedBottomLabel.active = false
  257. this.seedsView.active = false
  258. this.Exchange.active = true
  259. }
  260. },
  261. switch: function () {
  262. var children = this.container.children
  263. var length = children.length
  264. if (length > 1) {
  265. var src = Math.floor(Math.random() * length)
  266. var node = children[src]
  267. var dst = src === length - 1 ? 0 : src + 1
  268. node.setSiblingIndex(dst)
  269. }
  270. },
  271. OpentSNBExchangeToCNT() {
  272. //限制相关人员交易
  273. if (1 === GlobalD.UserInfo.limitTran) {
  274. GlobalD.GameData.showToast(
  275. cc.find('Canvas/UICamera'),
  276. '转换CNT通道关闭,请联系相关管理人员!',
  277. 1
  278. )
  279. return
  280. }
  281. //更新数据
  282. this.snbAmountLabel.string = GlobalD.GameData.SNB
  283. this.ExchangePopView.active = true
  284. },
  285. SNBExchangeToCNT() {
  286. //限制相关人员交易
  287. if (1 === GlobalD.UserInfo.limitTran) {
  288. GlobalD.GameData.showToast(
  289. cc.find('Canvas/UICamera'),
  290. '转换CNT通道关闭,请联系相关管理人员!',
  291. 1
  292. )
  293. return
  294. }
  295. if (0 === Number(this.snbAmount) || 0 != Number(this.snbAmount) % 5) {
  296. GlobalD.GameData.showToast(
  297. cc.find('Canvas/UICamera'),
  298. '请输入5的倍数兑换!',
  299. 1
  300. )
  301. return
  302. }
  303. console.log('发起兑换:' + Number(this.snbAmount))
  304. GlobalD.GameData.onSnbToCnt(Number(this.snbAmount), (data) => {
  305. //更新数据
  306. this.snbAmountLabel.string = GlobalD.GameData.SNB
  307. this.ExchangePopView.active = false
  308. console.log('data=', data)
  309. // console.log('res=', res)
  310. })
  311. },
  312. onPayCNTPopView(myIndex) {
  313. this.buySeedIndex = myIndex
  314. this.PayCNTPopView.active = true
  315. // console.log('this.mySeedList[this.buySeedIndex] =',this.mySeedList[this.buySeedIndex])
  316. // this.PayCNTPopView.getChildByName("BG").getChildByName("BG1_sprite_splash").getChildByName("NameLabel").getChildByName("label").getComponent(cc.Label).string = this.mySeedList[this.buySeedIndex].name;
  317. // this.PayCNTPopView.getChildByName("BG").getChildByName("BG1_sprite_splash").getChildByName("PriceLabel").getChildByName("label").getComponent(cc.Label).string = this.mySeedList[this.buySeedIndex].priceCnt + ' CNT';
  318. // this.PayCNTPopView.getChildByName("BG").getChildByName("BG1_sprite_splash").getChildByName("MutureDurLabel").getChildByName("label").getComponent(cc.Label).string = this.mySeedList[this.buySeedIndex].maturity;
  319. this._updatePrice()
  320. // this.PayCNTPopViewNameLabel.string = this.mySeedList[this.buySeedIndex].name;
  321. // this.PayCNTPopViewPriceLabel.string = this.mySeedList[this.buySeedIndex].priceCnt + ' CNT';
  322. // this.PayCNTPopViewMutureDurLabel.string = this.mySeedList[this.buySeedIndex].maturity;
  323. },
  324. onPaySNBPopView(myIndex) {
  325. this.buySeedIndex = myIndex
  326. this.PaySNBPopView.active = true
  327. // console.log('this.mySeedList[this.buySeedIndex] =',this.mySeedList[this.buySeedIndex])
  328. this.PaySNBPopView.getChildByName('BG')
  329. .getChildByName('BG1_sprite_splash')
  330. .getChildByName('NameLabel')
  331. .getChildByName('label')
  332. .getComponent(cc.Label).string = this.mySeedList[this.buySeedIndex].name
  333. this.PaySNBPopView.getChildByName('BG')
  334. .getChildByName('BG1_sprite_splash')
  335. .getChildByName('PriceLabel')
  336. .getChildByName('label')
  337. .getComponent(cc.Label).string =
  338. this.mySeedList[this.buySeedIndex].priceCnt + ' SNB'
  339. this.PaySNBPopView.getChildByName('BG')
  340. .getChildByName('BG1_sprite_splash')
  341. .getChildByName('MutureDurLabel')
  342. .getChildByName('label')
  343. .getComponent(cc.Label).string =
  344. this.mySeedList[this.buySeedIndex].maturity
  345. },
  346. PayCNT() {
  347. console.log('this.cntAmount=', this.cntAmount)
  348. console.log(
  349. 'this.cntAmount price=',
  350. this.cntAmount * parseInt(this.mySeedList[this.buySeedIndex].priceCnt)
  351. )
  352. //购买种子也要使用轮询
  353. let currentAmount = 0
  354. for (let i = 0; i < this.myWareHouseSeedList.length; i++) {
  355. if (
  356. this.myWareHouseSeedList[i].id == this.mySeedList[this.buySeedIndex].id
  357. ) {
  358. currentAmount = this.myWareHouseSeedList[i].amount
  359. }
  360. }
  361. //当前背包的数量
  362. console.log('currentAmount:', {
  363. seedId: this.mySeedList[this.buySeedIndex].id,
  364. currentAmount: currentAmount, //把当前背包的数据传进去
  365. })
  366. let playAmount =
  367. this.cntAmount * parseInt(this.mySeedList[this.buySeedIndex].priceCnt)
  368. if (0 === playAmount) {
  369. GlobalD.GameData.showToast(
  370. cc.find('Canvas/UICamera'),
  371. '请输入购买数量',
  372. 1
  373. )
  374. return
  375. }
  376. // if (this.isPlaying) {
  377. // GlobalD.GameData.showToast(cc.find("Canvas/UICamera"), "购买过快!", 1);
  378. // return;
  379. // }
  380. // this.isPlaying = true;
  381. // GlobalD.GameData.showToast(cc.find("Canvas/UICamera"), "区块确认中,请耐心等待!", 120);
  382. GlobalD.GameData.payCNT(
  383. playAmount,
  384. 4,
  385. this.mySeedList[this.buySeedIndex].id + '',
  386. (data) => {
  387. const [err, tx] = data
  388. // this.isPlaying = false;
  389. if (err === null) {
  390. // TODO 成功, 支付为链上操作,需要提供回调接口给这边服务端确认交易成功后修改购买订单结果
  391. console.log(tx) // 交易hash,唯一标识符
  392. //todo 种子
  393. if (this.AutoGetSeedsData) {
  394. this.unschedule(this.AutoGetSeedsData)
  395. this.AutoGetSeedsData = null
  396. }
  397. this.AutoGetSeedsData = () => {
  398. // getSeedCount ++;
  399. GlobalD.GameData.onGetSeedState(
  400. {
  401. seedId: this.mySeedList[this.buySeedIndex].id,
  402. currentAmount: currentAmount, //把当前背包的数据传进去
  403. },
  404. (value) => {
  405. console.log('轮询种子:' + JSON.stringify(value))
  406. if (0 === value.code) {
  407. this.unschedule(this.AutoGetSeedsData)
  408. console.log('轮询种子购买成功')
  409. GlobalD.GameData.showToast(
  410. cc.find('Canvas/UICamera'),
  411. '种子购买成功!',
  412. 1
  413. )
  414. // this.PayCNTPopView.active = false;
  415. //直接重新初始化一下列表,
  416. this.buildingViewScript.onUpdateList()
  417. }
  418. }
  419. )
  420. }
  421. this.schedule(this.AutoGetSeedsData, 5)
  422. } else {
  423. console.log(err)
  424. GlobalD.GameData.showToast(cc.find('Canvas/UICamera'), err, 2)
  425. }
  426. }
  427. )
  428. },
  429. PaySNB() {
  430. console.log('this.snbAmount=', this.cntAmount)
  431. console.log('priceSnb price=', this.mySeedList[this.buySeedIndex].priceSnb)
  432. console.log(
  433. 'this.snbAmount price=',
  434. this.cntAmount * parseInt(this.mySeedList[this.buySeedIndex].priceSnb)
  435. )
  436. console.log(
  437. '支付价格:' +
  438. this.cntAmount * parseInt(this.mySeedList[this.buySeedIndex].priceSnb)
  439. )
  440. let playAmount =
  441. this.cntAmount * parseInt(this.mySeedList[this.buySeedIndex].priceSnb)
  442. if (0 === playAmount) {
  443. GlobalD.GameData.showToast(
  444. cc.find('Canvas/UICamera'),
  445. '请输入购买数量',
  446. 1
  447. )
  448. return
  449. }
  450. if (this.isPlaying) {
  451. GlobalD.GameData.showToast(cc.find('Canvas/UICamera'), '购买过快!', 1)
  452. return
  453. }
  454. GlobalD.GameData.showToast(cc.find('Canvas/UICamera'), '支付处理中...', 10)
  455. this.isPlaying = true
  456. GlobalD.GameData.onBuySeedsWithSNB(
  457. playAmount,
  458. this.mySeedList[this.buySeedIndex].id,
  459. (flag, value) => {
  460. // console.log("SNB购买后", value);
  461. this.isPlaying = false
  462. if (flag && 0 === value.code) {
  463. //todo 种子
  464. GlobalD.GameData.showToast(
  465. cc.find('Canvas/UICamera'),
  466. '种子购买成功!',
  467. 1
  468. )
  469. // this.PayCNTPopView.active = false;
  470. //重新获取一下snb,会自动更新到面板
  471. GlobalD.GameData.onGetUserSnb()
  472. //直接重新初始化一下列表,
  473. this.buildingViewScript.onUpdateList()
  474. //更新日志数据
  475. cc.find('GameNode/ManageDapp')
  476. .getComponent('ManageDapp')
  477. .onUpdateSnbList()
  478. } else {
  479. GlobalD.GameData.showToast(cc.find('Canvas/UICamera'), value.msg, 2)
  480. }
  481. }
  482. )
  483. },
  484. onTextChanged1: function (text, editbox, customEventData) {
  485. // 这里的 text 表示 修改完后的 EditBox 的文本内容
  486. // 这里 editbox 是一个 cc.EditBox 对象
  487. // 这里的 customEventData 参数就等于你之前设置的 "foobar"
  488. this.cntAmount = parseInt(text)
  489. },
  490. // 假设这个回调是给 textChanged 事件的
  491. onTextChanged2: function (text, editbox, customEventData) {
  492. // 这里的 text 表示 修改完后的 EditBox 的文本内容
  493. // 这里 editbox 是一个 cc.EditBox 对象
  494. // 这里的 customEventData 参数就等于你之前设置的 "foobar"
  495. // this.snbAmount = parseInt(text);
  496. var numberTemp = new RegExp('^[A-Za-z0-9]+$')
  497. if (numberTemp.test(text)) {
  498. if (Number(text) >= 1) {
  499. this.snbAmount = Number(text)
  500. } else {
  501. this.snbAmount = 0
  502. editbox.string = this.snbAmount
  503. }
  504. } else {
  505. this.snbAmount = 0
  506. editbox.string = this.snbAmount
  507. console.log('请输入5的倍数', this.snbAmount)
  508. }
  509. },
  510. _updatePrice() {
  511. switch (this.toggleInputValue) {
  512. case '1':
  513. // this.totalPriceValue = 700 * this.inputInviteValue;
  514. // this.totalPriceLabel.string = this.totalPriceValue + "CNT";
  515. this.PayCNTPopViewNameLabel.string =
  516. this.mySeedList[this.buySeedIndex].name
  517. this.PayCNTPopViewPriceLabel.string =
  518. this.mySeedList[this.buySeedIndex].priceCnt + ' CNT'
  519. this.PayCNTPopViewMutureDurLabel.string =
  520. this.mySeedList[this.buySeedIndex].maturity
  521. break
  522. case '2':
  523. // this.totalPriceValue = 2500 * this.inputInviteValue;
  524. // this.totalPriceLabel.string = this.totalPriceValue + "CNT";
  525. this.PayCNTPopViewNameLabel.string =
  526. this.mySeedList[this.buySeedIndex].name
  527. this.PayCNTPopViewPriceLabel.string =
  528. this.mySeedList[this.buySeedIndex].priceSnb + ' SNB'
  529. this.PayCNTPopViewMutureDurLabel.string =
  530. this.mySeedList[this.buySeedIndex].maturity
  531. break
  532. default:
  533. console.error(
  534. 'this.toggleInputValue 不是1 2 3!',
  535. this.toggleInputValue
  536. )
  537. break
  538. }
  539. },
  540. //根据状态吊起不同支付
  541. onSwitchPlayType() {
  542. switch (this.toggleInputValue) {
  543. case '1': //cnt 支付
  544. this.PayCNT()
  545. break
  546. case '2': //snb 支付
  547. this.PaySNB()
  548. break
  549. default:
  550. console.error('状态吊起错误', this.toggleInputValue)
  551. GlobalD.GameData.showToast(
  552. cc.find('Canvas/UICamera'),
  553. '请先选择支付方式',
  554. 1
  555. )
  556. break
  557. }
  558. },
  559. onToggleInput(value, evnentData) {
  560. this.toggleInputValue = evnentData
  561. this._updatePrice()
  562. },
  563. onDestory() {
  564. if (this.AutoGetSeedsData) {
  565. this.unschedule(this.AutoGetSeedsData)
  566. this.AutoGetSeedsData = null
  567. }
  568. },
  569. })