C端小程序
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

254 righe
5.2 KiB

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