图书馆小程序
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.

157 lines
2.8 KiB

2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
  1. import request from '../utils/request';
  2. // 获取第三方url/appid/Secret/sm4_key
  3. export function FetchInitScreenSetting(data) {
  4. return request({
  5. url: '/api/screenSetting/initScreenSetting',
  6. data
  7. })
  8. }
  9. //根据微信code 获取openId
  10. export function FetchOpenId(data) {
  11. return request({
  12. url: '/api/weixin/getOpenId',
  13. data
  14. });
  15. }
  16. // 根据openid获取所有绑定读者证列表
  17. // ?libcode=&openId=
  18. export function FetchFindAllReaderBindByOpenId(data) {
  19. return request({
  20. url: '/api/weixin/findAllReaderBindByOpenId',
  21. data
  22. });
  23. }
  24. // 根据openid获取用户信息
  25. // ?libcode=&openId=
  26. export function FetchFindAllReaderByOpenId(data) {
  27. return request({
  28. url: '/api/weixin/findReaderByOpenId',
  29. data
  30. });
  31. }
  32. // 读者认证
  33. export function FetchReaderList(data) {
  34. return request({
  35. url: '/api/screenSetting/searchreaderlist2',
  36. data
  37. });
  38. }
  39. // 用户绑定读者证
  40. // {
  41. // "openid":"小程序用户openID",
  42. // "bindValue":"绑定值",
  43. // "bindType":"绑定方式(rdid 读者证号 rdname读者姓名 rdcertify身份证号 othercardno其他编号 workcardno工作/学生证号 rdphone电话 rdloginid手机 cardid附属卡(IC卡))",
  44. // "libcode":"馆代码"
  45. // }
  46. export function FetchBindReadCard(data) {
  47. return request({
  48. url: '/api/weixin/bindReadCard',
  49. method: 'POST',
  50. data
  51. });
  52. }
  53. // 绑定用户
  54. // {
  55. // "avatar": "头像",
  56. // "libcode": "馆代码",
  57. // "nickname": "昵称",
  58. // "openid": ""
  59. // }
  60. export function FetchBindRead(data) {
  61. return request({
  62. url: '/api/weixin/bindReader',
  63. method: 'POST',
  64. data
  65. });
  66. }
  67. // 设置默认读者证
  68. // {
  69. // "bindType": "string",
  70. // "bindValue": "string",
  71. // "libcode": "string",
  72. // "openid": "string"
  73. // }
  74. export function FetchSetDefaultReadCard(data) {
  75. return request({
  76. url: '/api/weixin/setDefaultReadCard',
  77. method: 'POST',
  78. data
  79. });
  80. }
  81. // 用户解绑读者证
  82. // {
  83. // "bindType": "string",
  84. // "bindValue": "string",
  85. // "libcode": "string",
  86. // "openid": "string"
  87. // }
  88. export function FetchUnbindReadCard(data) {
  89. return request({
  90. url: '/api/weixin/unbindReadCard',
  91. method: 'POST',
  92. data
  93. });
  94. }
  95. /**
  96. * 用户登录
  97. */
  98. export function login(data) {
  99. return request({
  100. url: '/sys/login',
  101. method: 'POST',
  102. data
  103. });
  104. }
  105. /**
  106. * 关注用户
  107. */
  108. // export function userFollow(data) {
  109. // return request({
  110. // url: '/user/follow',
  111. // data
  112. // });
  113. // }
  114. /**
  115. * 发表评论
  116. */
  117. // export function userArticleComment(data) {
  118. // return request({
  119. // url: '/user/article/comment',
  120. // method: 'POST',
  121. // data
  122. // });
  123. // }
  124. /**
  125. * 用户点赞
  126. */
  127. // export function userPraise(data) {
  128. // return request({
  129. // url: '/user/praise',
  130. // data
  131. // });
  132. // }
  133. /**
  134. * 用户收藏
  135. */
  136. // export function userCollect(data) {
  137. // return request({
  138. // url: '/user/collect',
  139. // data
  140. // });
  141. // }