美甲小程序
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

38 wiersze
785 B

  1. // const HTTPS = 'https://mjcms.fnuo123.net'
  2. const HTTPS = 'https://chkj.fnuo123.net'
  3. export const http = function (param) {
  4. let { url, data, method } = param
  5. return new Promise((resolve, rejected) => {
  6. wx.request({
  7. url: `${HTTPS + url}`,
  8. data: data,
  9. method: method,
  10. success: (result) => {
  11. if (result.statusCode === 200) {
  12. resolve(result.data)
  13. return
  14. }
  15. if(result.statusCode === 500) {
  16. wx.showToast({
  17. title: `服务器错误:${result.statusCode}`,
  18. duration: 2000,
  19. icon: 'none',
  20. })
  21. }
  22. },
  23. fail: (res) => { },
  24. complete: (res) => {
  25. wx.hideLoading({
  26. success: (res) => {},
  27. })
  28. },
  29. })
  30. })
  31. }