C端小程序
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

249 řádky
5.1 KiB

  1. const extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {}
  2. let weappId = extConfig.weappId;
  3. let configUrl;
  4. if (Object.keys(extConfig).length == 0){
  5. weappId = 'wx649b3be73c1afe47';
  6. configUrl = 'https://ctest.malls.iformall.com/C/api';
  7. }else{
  8. configUrl = extConfig.attr.configUrl;
  9. }
  10. var config = {
  11. url: configUrl,
  12. api: {
  13. /**
  14. * 接口用途:login
  15. */
  16. login: "/user/login",
  17. /**
  18. * 授权后获取用户的昵称,unionId等信息
  19. */
  20. getUserInfo: "/user/getUserInfo",
  21. /**
  22. * 接口用途:授权后获取用户的手机号
  23. */
  24. getUserPhone: "/user/getUserPhone",
  25. /**
  26. * 检查用户授权状态
  27. */
  28. checkUserStatus: "/user/checkUserStatus",
  29. /**
  30. * 检查用户手机授权状态
  31. */
  32. checkPhoneStatus: "/user/checkPhoneStatus",
  33. /**
  34. * 优惠券详情
  35. */
  36. couponDetail: "/wxCoupon/detail",
  37. /**
  38. * 业态查询
  39. */
  40. businessList: "/wxBusiness/list",
  41. /**
  42. * 频道查询
  43. */
  44. couponChannelList: "/wxCouponChannel/list",
  45. /**
  46. * 下订单
  47. */
  48. orderSave: "/order/save",
  49. /**
  50. * 支付订单
  51. */
  52. payOrderCreate: "/pay/create",
  53. /**
  54. * 订单状态更新
  55. */
  56. payOrderUpdate: "/pay/updatePayOrder",
  57. /**
  58. * 订单列表
  59. */
  60. orderList: "/order/list",
  61. getWeRunData: '/user/getWeRunData',
  62. /**
  63. * 订单详情
  64. */
  65. orderDetail: "/order/detail",
  66. /**
  67. * 券包
  68. */
  69. couponOrderList: "/couponOrder/list",
  70. /**
  71. * 券包详情
  72. */
  73. couponOrderDetail: "/couponOrder/detail", /// TODO
  74. /**
  75. * 验证码发送
  76. */
  77. sendValidationCode: "/wxMsgValidationcode/sendvalidationcode",
  78. /**
  79. * 验证码确认
  80. */
  81. validationCode: "/wxMsgValidationcode/hasvalidationcode",
  82. /**
  83. * 车场信息获取
  84. */
  85. scoreLevelInfo: '/mall/scoreLevelInfo',
  86. getParkInfo: "/wxPark/info",
  87. /**
  88. * 用户所绑车牌获取
  89. */
  90. userCarCount: "/user/carCount",
  91. /**
  92. * 用户所绑车牌获取
  93. */
  94. getUserCarList: "/user/carList",
  95. /**
  96. * 联合登录
  97. */
  98. carInit: "/car/init",
  99. /**
  100. * 绑车牌
  101. */
  102. bindCar: "/car/bindCar",
  103. /**
  104. * 解绑车牌
  105. */
  106. unbindCar: "/car/unbindCar",
  107. /**
  108. * 停车费
  109. */
  110. getCarStopFee: "/car/getCarStopFee",
  111. /**
  112. * 停车费抵扣 (TJD)
  113. */
  114. deductionFee: "/car/deductionFee",
  115. /**
  116. * 优免券领取
  117. */
  118. getCarCoupon: "/car/getCoupon",
  119. /**
  120. * 停车券包
  121. */
  122. couponOrderCarList: "/car/couponOrderList",
  123. /**
  124. * banner
  125. */
  126. bannerlist: "/wxCampaign/list",
  127. /**
  128. * banner详情页面
  129. */
  130. bannerDetail: "/wxCampaign/findById",
  131. /**
  132. * 授权个人信息
  133. * 和授权手机号
  134. * 和login页面
  135. * 页面的图标
  136. */
  137. marketicon: '/mall/getAppIcon',
  138. /**
  139. * 获取停车场状态
  140. */
  141. getParkStatus: '/car/getParkStatus',
  142. /**
  143. * 检查核销的状态
  144. */
  145. getStatus: "/couponOrder/getStatus",
  146. /**
  147. * 获得成长值
  148. */
  149. getScore: '/user/userinfo',
  150. /**
  151. * 小程序分享
  152. * title
  153. * 描述
  154. */
  155. getWeapNote:'/mall/getWeapNote',
  156. /**
  157. * 小程序获取游戏路径
  158. */
  159. getGame:'/game/getOne',
  160. /**
  161. * 用户更新信息
  162. */
  163. updateInfo: "/user/updateUserInfo",
  164. /**
  165. * 查询问卷
  166. */
  167. getQuestion:"/wxQuestion/getQuestion",
  168. /**
  169. * 提交问卷
  170. */
  171. answerQuestion:"/wxQuestion/answerQuestion",
  172. /**
  173. *
  174. 获取打折商户列表
  175. */
  176. discountMerchantList:"/mall/discountMerchantList",
  177. /**
  178. * 卡包分页列表接口
  179. */
  180. cardorderList:"/couponOrder/cardList",
  181. /**
  182. * 卡券详情接口
  183. */
  184. cardDetail: "/couponOrder/cardDetail",
  185. /**
  186. * C端扫B端储值卡支付订单
  187. */
  188. cardPayOrder:"/cardPay/order_create",
  189. /**
  190. * 兑换历史列表
  191. */
  192. scoreHistory:"/scoreHistory/list",
  193. /**
  194. * 获取用户折扣率
  195. */
  196. getDiscountInfo:"/user/getDiscountInfo",
  197. /**
  198. * C端扫B端储值卡交易流水列表接口
  199. */
  200. cardpayList:"/cardPay/list",
  201. /**
  202. * 根据code查询接口
  203. */
  204. findByCode:"/merchant/findByCode",
  205. /**
  206. * 参与砍价
  207. */
  208. pressOrderJoin:"/press/pressOrderJoin",
  209. /**
  210. * 我的砍价列表
  211. */
  212. pressOrderList:"/order/pressOrderList",
  213. /**
  214. * 砍价订单详情
  215. */
  216. pressOrderDetail:"/order/pressOrderDetail",
  217. /**
  218. *
  219. */
  220. getPressOrderStatus:"/press/getPressOrderStatus",
  221. /**
  222. * 查询转赠卡状态
  223. */
  224. queryCardStatus:"/couponOrder/queryCardStatus",
  225. /**
  226. * 领取转赠卡
  227. */
  228. cardAccept:'/couponOrder/cardAccept',
  229. /**
  230. * 获取我的拼团列表
  231. */
  232. getMySepllList:'/orderGroup/queryOrderGroup'
  233. },
  234. weapp: {
  235. AppId: weappId
  236. },
  237. ErrorCode: {
  238. NICK_NOT_AUTH: 11004,
  239. PHONE_NOT_AUTH: 11005,
  240. PHONE_IS_ENCRYPTED: 11006
  241. }
  242. };
  243. /*
  244. for (var key in config.api) {
  245. config.api[key] = apiPrefix + config.api[key];
  246. }
  247. */
  248. module.exports = config;