C端小程序
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.

293 line
6.0 KiB

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