天波h5前端应用
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

wx.js 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*
  2. * @Date: 2021-06-30 14:29:56
  3. * @LastEditors: JinxChen
  4. * @LastEditTime: 2023-02-25 10:44:01
  5. * @FilePath: \TelpoH5FrontendWeb\src\api\wx.js
  6. * @description: 功能
  7. */
  8. import request from '@/http/webapi';
  9. const APIWx = {
  10. createJSSDK,
  11. checkIsNewCustomer, //获取微信用户是否首次关注,即是否是新用户
  12. ocr, //ocr识别
  13. Effective, //激活接口
  14. GetCardInfo,
  15. LckjGetOrderPackageShow,
  16. CheckImei,
  17. }
  18. export default APIWx;
  19. function createJSSDK({ userId, sUrl, appId }) {
  20. return request({
  21. url: '/api/WX/CreateJsSdk',
  22. method: 'get',
  23. params: { userId, sUrl, appId },
  24. })
  25. }
  26. function checkIsNewCustomer(params) {
  27. return request({
  28. url: '/api/User/getOpenId',
  29. method: 'post',
  30. headers: { AuthKey: 'key1' },
  31. data: params,
  32. })
  33. }
  34. function ocr(params) {
  35. return request({
  36. url: '/api/WX/ocr',
  37. method: 'post',
  38. headers: { AuthKey: 'key1' },
  39. data: params,
  40. })
  41. }
  42. // 中亿SIM自动激活接口
  43. function Effective(params) {
  44. return request({
  45. url: '/api/Command/Effective',
  46. method: 'post',
  47. data: params,
  48. });
  49. }
  50. //获取物联网卡信息
  51. function GetCardInfo(params) {
  52. return request({
  53. url: '/api/Command/GetCardInfo',
  54. method: 'post',
  55. data: params,
  56. });
  57. }
  58. // 随手精灵(查询零川物联卡加油包已订购套餐)
  59. function LckjGetOrderPackageShow({ iccid, imei }){
  60. return request({
  61. url: '/api/IOTCard/LckjGetOrderPackageShow',
  62. method: 'get',
  63. params: { iccid, imei}
  64. })
  65. }
  66. //检查imei属于哪家厂商
  67. function CheckImei(params) {
  68. return request({
  69. url: '/api/Command/CheckImei',
  70. method: 'post',
  71. data: params,
  72. });
  73. }