|
- const extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {}
- let weappId = extConfig.weappId;
- let configUrls;
- console.log(Object.keys(extConfig).length)
- if (Object.keys(extConfig).length == 0){
- weappId = 'wx649b3be73c1afe47';
- configUrls = 'https://ctest.malls.iformall.com/C/api';
- }else{
- configUrls = extConfig.attr.configUrl;
- }
- var config = {
- url: configUrls,
- api: {
- /**
- * 接口用途:login
- */
- login: "/user/login",
- /**
- * 授权后获取用户的昵称,unionId等信息
- */
- getUserInfo: "/user/getUserInfo",
- /**
- * 接口用途:授权后获取用户的手机号
- */
- getUserPhone: "/user/getUserPhone",
- /**
- * 检查用户授权状态
- */
- checkUserStatus: "/user/checkUserStatus",
- /**
- * 检查用户手机授权状态
- */
- checkPhoneStatus: "/user/checkPhoneStatus",
- /**
- * 优惠券详情
- */
- couponDetail: "/wxCoupon/detail",
-
- /**
- * 业态查询
- */
- businessList: "/wxBusiness/list",
- /**
- * 频道查询
- */
- couponChannelList: "/wxCouponChannel/list",
- /**
- * 下订单
- */
- orderSave: "/order/save",
- /**
- * 支付订单
- */
- payOrderCreate: "/pay/create",
- /**
- * 订单状态更新
- */
- payOrderUpdate: "/pay/updatePayOrder",
- /**
- * 订单列表
- */
- orderList: "/order/list",
- getWeRunData: '/user/getWeRunData',
- /**
- * 订单详情
- */
- orderDetail: "/order/detail",
- /**
- * 券包
- */
- couponOrderList: "/couponOrder/list",
- /**
- * 券包详情
- */
- couponOrderDetail: "/couponOrder/detail", /// TODO
- /**
- * 验证码发送
- */
- sendValidationCode: "/wxMsgValidationcode/sendvalidationcode",
- /**
- * 验证码确认
- */
- validationCode: "/wxMsgValidationcode/hasvalidationcode",
- /**
- * 车场信息获取
- */
- scoreLevelInfo: '/mall/scoreLevelInfo',
- getParkInfo: "/wxPark/info",
- /**
- * 用户所绑车牌获取
- */
- userCarCount: "/user/carCount",
- /**
- * 用户所绑车牌获取
- */
- getUserCarList: "/user/carList",
- /**
- * 联合登录
- */
- carInit: "/car/init",
- /**
- * 绑车牌
- */
- bindCar: "/car/bindCar",
- /**
- * 解绑车牌
- */
- unbindCar: "/car/unbindCar",
- /**
- * 停车费
- */
- getCarStopFee: "/car/getCarStopFee",
- /**
- * 停车费抵扣 (TJD)
- */
- deductionFee: "/car/deductionFee",
- /**
- * 优免券领取
- */
- getCarCoupon: "/car/getCoupon",
- /**
- * 停车券包
- */
- couponOrderCarList: "/car/couponOrderList",
- /**
- * banner
- */
- bannerlist: "/wxCampaign/list",
- /**
- * banner详情页面
- */
- bannerDetail: "/wxCampaign/findById",
- /**
- * 授权个人信息
- * 和授权手机号
- * 和login页面
- * 页面的图标
- */
- marketicon: '/mall/getAppIcon',
- /**
- * 获取停车场状态
- */
- getParkStatus: '/car/getParkStatus',
- /**
- * 检查核销的状态
- */
- getStatus: "/couponOrder/getStatus",
- /**
- * 获得成长值
- */
- getScore: '/user/userinfo',
- /**
- * 小程序分享
- * title
- * 描述
- */
- getWeapNote:'/mall/getWeapNote',
- /**
- * 小程序获取游戏路径
- */
- getGame:'/game/getOne',
- /**
- * 用户更新信息
- */
- updateInfo: "/user/updateUserInfo",
- /**
- * 查询问卷
- */
- getQuestion:"/wxQuestion/getQuestion",
- /**
- * 提交问卷
- */
- answerQuestion:"/wxQuestion/answerQuestion",
- /**
- *
- 获取打折商户列表
- */
- discountMerchantList:"/mall/discountMerchantList",
- /**
- * 卡包分页列表接口
- */
- cardorderList:"/couponOrder/cardList",
- /**
- * 卡券详情接口
- */
- cardDetail: "/couponOrder/cardDetail",
- /**
- * C端扫B端储值卡支付订单
- */
- cardPayOrder:"/cardPay/order_create",
- /**
- * 兑换历史列表
- */
- scoreHistory:"/scoreHistory/list",
- /**
- * 获取用户折扣率
- */
- getDiscountInfo:"/user/getDiscountInfo",
- /**
- * C端扫B端储值卡交易流水列表接口
- */
- cardpayList:"/cardPay/list",
- /**
- * 根据code查询接口
- */
- findByCode:"/merchant/findByCode",
- /**
- * 参与砍价
- */
- pressOrderJoin:"/press/pressOrderJoin",
- /**
- * 我的砍价列表
- */
- pressOrderList:"/order/pressOrderList",
- /**
- * 砍价订单详情
- */
- pressOrderDetail:"/order/pressOrderDetail",
- /**
- *
- */
- getPressOrderStatus:"/press/getPressOrderStatus",
- /**
- * 查询转赠卡状态
- */
- queryCardStatus:"/couponOrder/queryCardStatus",
- /**
- * 领取转赠卡
- */
- cardAccept:'/couponOrder/cardAccept',
- /**
- * 获取我的拼团列表
- */
- getMySepllList:'/orderGroup/queryOrderGroup',
- /**
- *查询差1个的团购信息
- */
- queryRemainOne:'/orderGroup/queryRemainOne'
- },
- weapp: {
- AppId: weappId
- },
- ErrorCode: {
- NICK_NOT_AUTH: 11004,
- PHONE_NOT_AUTH: 11005,
- PHONE_IS_ENCRYPTED: 11006
- }
- };
- /*
- for (var key in config.api) {
- config.api[key] = apiPrefix + config.api[key];
- }
- */
- module.exports = config;
|