applyService.js 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295
  1. import { mockIp, mockReqId } from '../../utils/mock';
  2. const orderResps = [
  3. {
  4. data: {
  5. saasId: '88888888',
  6. uid: '88888888205468',
  7. storeId: '1000',
  8. skuId: '135691625',
  9. numOfSku: 1,
  10. numOfSkuAvailable: 1,
  11. refundableAmount: '26900',
  12. refundableDiscountAmount: '0',
  13. shippingFeeIncluded: '0',
  14. paidAmountEach: '26900',
  15. boughtQuantity: 1,
  16. orderNo: '132222623132329291',
  17. goodsInfo: {
  18. goodsName:
  19. '迷你便携高颜值蓝牙无线耳机立体声只能触控式操作简约立体声耳机',
  20. skuImage: 'https://cdn-we-retail.ym.tencent.com/tsr/goods/dz-2a.png',
  21. specInfo: [
  22. {
  23. specId: '50456',
  24. specTitle: '颜色',
  25. specValue: '黑色',
  26. },
  27. {
  28. specId: '50459',
  29. specTitle: '尺码',
  30. specValue: '简约款',
  31. },
  32. ],
  33. },
  34. },
  35. code: 'Success',
  36. msg: null,
  37. requestId: mockReqId(),
  38. clientIp: mockIp(),
  39. rt: 36,
  40. success: true,
  41. },
  42. {
  43. data: {
  44. saasId: '88888888',
  45. uid: '88888888205468',
  46. storeId: '1000',
  47. skuId: '135676631',
  48. numOfSku: 1,
  49. numOfSkuAvailable: 1,
  50. refundableAmount: '26900',
  51. refundableDiscountAmount: '0',
  52. shippingFeeIncluded: '0',
  53. paidAmountEach: '26900',
  54. boughtQuantity: 1,
  55. orderNo: '132222623132329291',
  56. goodsInfo: {
  57. goodsName: '白色短袖连衣裙荷叶边裙摆宽松韩版休闲纯白清爽优雅连衣裙',
  58. skuImage: 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-09a.png',
  59. specInfo: [
  60. {
  61. specId: '50456',
  62. specTitle: '颜色',
  63. specValue: '米色荷叶边',
  64. },
  65. {
  66. specId: '50459',
  67. specTitle: '尺码',
  68. specValue: 'S',
  69. },
  70. ],
  71. },
  72. },
  73. code: 'Success',
  74. msg: null,
  75. requestId: mockReqId(),
  76. clientIp: mockIp(),
  77. rt: 36,
  78. success: true,
  79. },
  80. {
  81. data: {
  82. saasId: '88888888',
  83. uid: '88888888205468',
  84. storeId: '1000',
  85. skuId: '135691622',
  86. numOfSku: 1,
  87. numOfSkuAvailable: 1,
  88. refundableAmount: '26900',
  89. refundableDiscountAmount: '0',
  90. shippingFeeIncluded: '0',
  91. paidAmountEach: '26900',
  92. boughtQuantity: 1,
  93. orderNo: '132222623132329291',
  94. goodsInfo: {
  95. goodsName: '腾讯极光盒子4智能网络电视机顶盒6K千兆网络机顶盒4K高分辨率',
  96. skuImage: 'https://cdn-we-retail.ym.tencent.com/tsr/goods/dz-3a.png',
  97. specInfo: [
  98. {
  99. specId: '50456',
  100. specTitle: '颜色',
  101. specValue: '经典白',
  102. },
  103. {
  104. specId: '50459',
  105. specTitle: '类型',
  106. specValue: '经典套装',
  107. },
  108. ],
  109. },
  110. },
  111. code: 'Success',
  112. msg: null,
  113. requestId: mockReqId(),
  114. clientIp: mockIp(),
  115. rt: 36,
  116. success: true,
  117. },
  118. {
  119. data: {
  120. saasId: '88888888',
  121. uid: '88888888205468',
  122. storeId: '1000',
  123. skuId: '135676629',
  124. numOfSku: 1,
  125. numOfSkuAvailable: 1,
  126. refundableAmount: '26900',
  127. refundableDiscountAmount: '0',
  128. shippingFeeIncluded: '0',
  129. paidAmountEach: '26900',
  130. boughtQuantity: 1,
  131. orderNo: '132222623132329291',
  132. goodsInfo: {
  133. goodsName: '带帽午休毯虎年款多功能加厚加大加绒简约多功能午休毯连帽披肩',
  134. skuImage: 'https://cdn-we-retail.ym.tencent.com/tsr/goods/muy-3a.png',
  135. specInfo: [
  136. {
  137. specId: '50456',
  138. specTitle: '颜色',
  139. specValue: '浅灰色',
  140. },
  141. {
  142. specId: '50459',
  143. specTitle: '尺码',
  144. specValue: 'S',
  145. },
  146. ],
  147. },
  148. },
  149. code: 'Success',
  150. msg: null,
  151. requestId: mockReqId(),
  152. clientIp: mockIp(),
  153. rt: 36,
  154. success: true,
  155. },
  156. {
  157. data: {
  158. saasId: '88888888',
  159. uid: '88888888205468',
  160. storeId: '1000',
  161. skuId: '135686631',
  162. numOfSku: 1,
  163. numOfSkuAvailable: 1,
  164. refundableAmount: '26900',
  165. refundableDiscountAmount: '0',
  166. shippingFeeIncluded: '0',
  167. paidAmountEach: '26900',
  168. boughtQuantity: 1,
  169. orderNo: '132222623132329291',
  170. goodsInfo: {
  171. goodsName: '运动连帽拉链卫衣休闲开衫长袖多色运动细绒面料运动上衣',
  172. skuImage: 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-17a.png',
  173. specInfo: [
  174. {
  175. specId: '50456',
  176. specTitle: '颜色',
  177. specValue: '军绿色',
  178. },
  179. {
  180. specId: '50459',
  181. specTitle: '尺码',
  182. specValue: 'XS',
  183. },
  184. ],
  185. },
  186. },
  187. code: 'Success',
  188. msg: null,
  189. requestId: mockReqId(),
  190. clientIp: mockIp(),
  191. rt: 36,
  192. success: true,
  193. },
  194. {
  195. data: {
  196. saasId: '88888888',
  197. uid: '88888888205468',
  198. storeId: '1000',
  199. skuId: '19384938948343',
  200. numOfSku: 1,
  201. numOfSkuAvailable: 1,
  202. refundableAmount: '26900',
  203. refundableDiscountAmount: '0',
  204. shippingFeeIncluded: '0',
  205. paidAmountEach: '26900',
  206. boughtQuantity: 1,
  207. orderNo: '130169571554503755',
  208. goodsInfo: {
  209. goodsName:
  210. '纯色纯棉休闲圆领短袖T恤纯白亲肤厚柔软细腻面料纯白短袖套头T恤',
  211. skuImage: 'https://cdn-we-retail.ym.tencent.com/tsr/goods/nz-08b.png',
  212. specInfo: [
  213. {
  214. specId: '50456',
  215. specTitle: '颜色',
  216. specValue: '军绿色',
  217. },
  218. {
  219. specId: '50459',
  220. specTitle: '尺码',
  221. specValue: 'XS',
  222. },
  223. ],
  224. },
  225. },
  226. code: 'Success',
  227. msg: null,
  228. requestId: mockReqId(),
  229. clientIp: mockIp(),
  230. rt: 36,
  231. success: true,
  232. },
  233. ];
  234. export function genRightsPreview(params) {
  235. const { orderNo, skuId } = params;
  236. const resp = orderResps.find(
  237. (r) => r.data.orderNo === orderNo && r.data.skuId === skuId,
  238. );
  239. return resp;
  240. }
  241. export function genApplyReasonList(params) {
  242. const resp = {
  243. data: {
  244. saasId: '70000001',
  245. rightsReasonList: [
  246. { id: '1', desc: '实际商品与描述不符' },
  247. { id: '2', desc: '质量问题' },
  248. { id: '3', desc: '少件/漏发' },
  249. { id: '4', desc: '包装/商品/污迹/裂痕/变形' },
  250. { id: '5', desc: '发货太慢' },
  251. { id: '6', desc: '物流配送太慢' },
  252. { id: '7', desc: '商家发错货' },
  253. { id: '8', desc: '不喜欢' },
  254. ],
  255. },
  256. code: 'Success',
  257. msg: null,
  258. requestId: mockReqId(),
  259. clientIp: mockIp(),
  260. rt: 6,
  261. success: true,
  262. };
  263. // 未收货对应的原因列表
  264. if (params.rightsReasonType === 'REFUND_MONEY') {
  265. resp.data.rightsReasonList = [
  266. { id: '9', desc: '空包裹' },
  267. { id: '10', desc: '快递/物流一直未送到' },
  268. { id: '11', desc: '货物破损已拒签' },
  269. { id: '12', desc: '不喜欢' },
  270. ];
  271. }
  272. return resp;
  273. }
  274. export function applyService() {
  275. const resp = {
  276. data: {
  277. rightsNo: '123123423',
  278. saasId: '70000001',
  279. uid: '700000011070005',
  280. storeId: '542',
  281. result: null,
  282. },
  283. code: 'Success',
  284. msg: null,
  285. requestId: mockReqId(),
  286. clientIp: mockIp(),
  287. rt: 269,
  288. success: true,
  289. };
  290. return resp;
  291. }