history.ts 747 B

1234567891011121314151617181920212223242526
  1. import http from '../../utils/http'
  2. export default class History {
  3. static async findByHashOrBlockOrDataVague(block: String, hashCode: String, dataVague: String,
  4. limit1: Number, limit2: Number) {
  5. let url = '/ethmev/findByHashOrBlockOrDataVague'
  6. const rst = await http.post(url, {
  7. block: block,
  8. hash: hashCode,
  9. dataVague: dataVague,
  10. limit1: limit1,
  11. limit2: limit2
  12. })
  13. return rst.data
  14. }
  15. static async appendOrUpdate(block: String, hashCode: String, data: any) {
  16. let url = '/ethmev/appendOrUpdate'
  17. const rst = await http.post(url, {
  18. 'block': block,
  19. 'hash': hashCode,
  20. 'data': JSON.stringify(data)
  21. })
  22. return rst.data
  23. }
  24. }