/** * Copyright © 2020-present LiuDanYang. All rights Reserved. */ import { mGet, mPost } from "./request" const app = getApp() const zconfig = { baseUrl: app.release ? `https://api-client-ztb.qniao.cn` : `https://api-client-ztb-dev.qniao.cn` } // *******************************************************************账户业务*********************************************************** // /authorize/get/product-line-token/by/login-token通过登录token获取产品线token const loginToken = (params) => mPost(`/recycle-user-center/authorize/get/product-line-token/by/login-token`, params, zconfig) ///user/get/base-info基本信息 const getBaseInfo = () => mGet(`/recycle-service/user/get/base-info`, null, zconfig) // /get/all-paper-mill 获取全部纸厂列表 const getAllFactoryList = () => mGet(`/recycle-service/get/all-paper-mill`, null, zconfig) // /get/paper-mill-paper-category-price-list 获取纸厂品类价格信息列表 const getFactoryPrice = () => mGet(`/recycle-service/get/paper-mill-paper-category-price-list`, null, zconfig) // /get/paper-mill-paper-category-price-details/{id} 获取纸厂品类价格信息详情 const getFactoryPriceDetail = (id) => mGet(`/recycle-service/get/paper-mill-paper-category-price-details/${id}`, null, zconfig) // /get/paper-mill-city 获取纸厂所有地区列表 const getFactoryCity = () => mGet(`/recycle-service/get/paper-mill-city`, null, zconfig) // /get/index-info-id 首页获取公告id接口 const getIndexInfoId = () => mGet(`/recycle-service/get/index-info-id`, null, zconfig) // /get/paper-mill-list 获取纸厂列表 const getFactoryList = () => mGet(`/recycle-service/get/paper-mill-list`, null, zconfig) // /get/paper-mill-received-weight-list/on-today 获取纸厂今日收货量(排队)列表 const getFactoryTodayList = (params) => mGet(`/recycle-service/get/paper-mill-received-weight-list/on-today`, params, zconfig) // /proxy-sell/get/his-car-info 客户查看历史车辆 const getVehicleList = () => mGet(`/recycle-service/proxy-sell/get/his-car-info`, null, zconfig) // /proxy-sell/get/relation 查询客户业务人员绑定信息接口 const getRelation = () => mGet(`/recycle-service/proxy-sell/get/relation`, null, zconfig) // /recycle-service/proxy-sell/bind/relation const postRelation = (code) => mPost(`/recycle-service/proxy-sell/bind/relation?code=${code}`, null, zconfig) // /proxy-sell/get/proxy-order/{orderId}客户查看订单详情 const getProxyOrderInfo = (id) => mGet(`/recycle-service/proxy-sell/get/proxy-order/${id}`, null, zconfig) // recycle-service/proxy-sell/get/proxy-order-list const getProxyOrderList = (params) => mGet(`/recycle-service/proxy-sell/get/proxy-order-list`, params, zconfig) // recycle-service/proxy-sell/create/order const createProxyOrder = (params) => mPost(`/recycle-service/proxy-sell/create/order`, params, zconfig) const cancelProxyOrder = (id) => mPost(`/recycle-service/proxy-sell/cancel/order/${id}`, null, zconfig) const cancelReservation = (id) => mPost(`/recycle-service/proxy-sell/cancel/reservation/${id}`, null, zconfig) const cancelProxyOrderItem = (id) => mPost(`/recycle-service/proxy-sell/cancel/order-item/${id}`, null, zconfig) // /purchase/get/product-list 获取店铺采购商品列表接口 const getProductList = (params) => mGet(`/recycle-service/purchase/get/product-list`, params, zconfig) // /recycle-service/get/store-product-list const getStoreProductList = (params) => mGet(`/recycle-service/get/store-product-list`, params, zconfig) const getStoreInfo = (id) => mGet(`/recycle-service/get/store-information/${id}`, null, zconfig) const getStoreOverView = () => mGet(`/recycle-service/get/store-overview`, null, zconfig) const updateStore = (params) => mPost(`/recycle-service/update/store-information`, params, zconfig) const editStore = (params) => mPost(`/recycle-service/edit/store-information`, params, zconfig) const depositStore = (params) => mPost(`/recycle-service/create/store-deposit-order`, params, zconfig) const updatePurchase = (params) => mPost(`/recycle-service/purchase/update/product`, params, zconfig) const createPurchase = (params) => mPost(`/recycle-service/purchase/create/product`, params, zconfig) const paperCategoryList = (params) => mPost(`/recycle-service/paperCategoryList`, params, zconfig) const getPurchaseInfo = (id) => mGet(`/recycle-service/purchase/get/product/${id}`, null, zconfig) const getMiniProxyList = (params) => mGet(`/recycle-service/get/product-index-list/for/mini`, params, zconfig) const getProductInfo = (id) => mGet(`/recycle-service/get/product/${id}`, null, zconfig) const createProductInfo = (params) => mPost(`/recycle-service/create/product`, params, zconfig) const updateProductInfo = (params) => mPost(`/recycle-service/update/product`, params, zconfig) const getWaterRate = () => mGet(`/recycle-service/get/water-rate`, null, zconfig) const getDopantRate = () => mGet(`/recycle-service/get/dopant-rate`, null, zconfig) const getBiddingInterval = () => mGet(`/recycle-service/get/bidding-interval`, null, zconfig) const getGoodProductList = (params) => mGet(`/recycle-service/get/product-list`, params, zconfig) // /recycle-service/update/product-status const statusProductInfo = (params) => mPost(`/recycle-service/update/product-status`, params, zconfig) const deleteProduct = (params) => mPost(`/recycle-service/delete/product`, params, zconfig) export { zconfig, loginToken, getBaseInfo, getAllFactoryList, getFactoryPrice, getFactoryCity, getIndexInfoId, getFactoryList, getFactoryTodayList, getVehicleList, getFactoryPriceDetail, getRelation, postRelation, getProxyOrderInfo, getProxyOrderList, createProxyOrder, cancelProxyOrder, cancelReservation, cancelProxyOrderItem, getProductList, getStoreProductList, getStoreInfo, getStoreOverView, depositStore, updateStore, editStore, updatePurchase, createPurchase, paperCategoryList, getPurchaseInfo, getMiniProxyList, getProductInfo, createProductInfo, updateProductInfo, getWaterRate, getDopantRate, getBiddingInterval, getGoodProductList, statusProductInfo, deleteProduct }