applyService.js 8.4 KB

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