123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752 |
- /* HTTP API 公共模块业务
- * Copyright 2020, CAIMEI365
- * Date 2020/06/16
- * auther ZHJY
- */
- var PublicApi = {
- // 获取搜索关键词
- fetchQueryKeywordList: function(params){
- return Http.AjaxService({
- url:'/commodity/search/query/get/keyword/list',
- type:'post',
- data:params,
- json:false,
- })
- },
- // 获取搜索关键词
- fetchLabelKeywordList: function(params){
- return Http.AjaxService({
- url:'/commodity/search/query/keyword/list',
- type:'get',
- data:params,
- json:false,
- })
- },
- // oss 初始化 (临时凭证获取)
- fetchOssInitData: function(params){
- return Http.AjaxService({
- url:'/user/oss/token',
- type:'get',
- data:params,
- json:false,
- })
- },
- uploadimg: function (params, callback) {//供应商添加物流上传图片
- Http.uploadImage({
- url:'/tools/image/upload/multi',
- data:params
- },callback)
- },
- uploadFile: function (params, callback) {//上传文件
- Http.uploadImage({
- url:'/tools/file/upload/oss',
- data:params
- },callback)
- },
- deleteOssFile: function (params, callback) {//删除Oss文件
- Http.AjaxService({
- url:'/tools/file/delete/oss',
- type:'post',
- data:params,
- json:false,
- mask:true,
- replace:false
- })
- .then(function(res){
- callback(res);
- });
- },
- GetHomeData:function(params,callback){ //首页数据
- Http.AjaxService({
- url:'/commodity/home/floor',
- type:'get',
- data:params,
- json:false,
- isHost:true
- })
- .then(function(res){
- callback(res)
- });
- },
- GetHomeRecommend:function(params,callback){ //新品橱窗重点推荐
- Http.AjaxService({
- url:'/commodity/home/recommend',
- type:'get',
- data:params,
- json:false,
- isHost:true
- })
- .then(function(res){
- callback(res)
- });
- },
- GetHomeNewFloorList:function(params,callback){ //新品橱窗商品列表
- Http.AjaxService({
- url:'/commodity/home/NewFloorList',
- type:'get',
- data:params,
- json:false,
- isHost:true
- })
- .then(function(res){
- callback(res)
- });
- },
- GetHomeNBrandName:function(params,callback){ //新品橱窗品牌列表
- Http.AjaxService({
- url:'/commodity/home/BrandName',
- type:'get',
- data:params,
- json:false,
- isHost:true
- })
- .then(function(res){
- callback(res)
- });
- },
- GetHomeInit:function(params,callback){ //首页数据
- Http.AjaxService({
- url:'/commodity/home/init',
- type:'get',
- data:params,
- json:false,
- isHost:true
- })
- .then(function(res){
- callback(res)
- });
- },
- // GetHomeBanner:function(params,callback){ //首页bnner
- // Http.AjaxService({
- // url:'/home/banner',
- // type:'get',
- // data:params,
- // json:false
- // })
- // .then(function(res){
- // callback(res)
- // });
- // },
- // GetHomeRightData:function(params,callback){ //首页右侧模块
- // Http.AjaxService({
- // url:'/commodity/home/sidebar',
- // type:'get',
- // data:params,
- // json:false,
- // })
- // .then(function(res){
- // callback(res)
- // });
- // },
- GetProductClassify:function(params,callback){ //获取一级分类
- Http.AjaxService({
- url:'/commodity/classify',
- type:'get',
- data:params,
- json:false,
- isHost:true
- })
- .then(function(res){
- callback(res)
- });
- },
- // GetNavigationMenu:function(params,callback){ //获取顶部导航
- // Http.AjaxService({
- // url:'/home/init',
- // type:'get',
- // data:params,
- // json:false
- // })
- // .then(function(res){
- // callback(res)
- // });
- // },
- GetProvince:function(params,callback){ //获取省份信息
- Http.AjaxService({
- url:'/order/address/select',
- type:'get',
- data:params,
- json:false,
- isHost:true
- })
- .then(function(res){
- callback(res)
- });
- },
- GetCity:function(params,callback){ //获取区分信息
- Http.AjaxService({
- url:'/order/address/select',
- type:'get',
- data:params,
- json:false,
- isHost:true
- })
- .then(function(res){
- callback(res)
- });
- },
- GetTown:function(params,callback){ //获取市信息
- Http.AjaxService({
- url:'/order/address/select',
- type:'get',
- data:params,
- json:false,
- isHost:true
- })
- .then(function(res){
- callback(res)
- });
- },
- GetFirstClassFication:function(params,callback){ //获取一级分类
- Http.AjaxService({
- url:'/commodity/type/first',
- type:'get',
- data:params,
- json:true,
- isHost:true
- })
- .then(function(res){
- callback(res)
- });
- },
- GetTwoClassFication:function(params,callback){ //获取二级分类
- Http.AjaxService({
- url:'/commodity/type/second',
- type:'get',
- data:params,
- json:true,
- isHost:true
- })
- .then(function(res){
- callback(res)
- });
- },
- GetThreeClassFication:function(params,callback){ //获取三级分类
- Http.AjaxService({
- url:'/commodity/type/third',
- type:'get',
- data:params,
- json:true,
- isHost:true
- })
- .then(function(res){
- callback(res)
- });
- },
- addCart : function (params,callback) { //加入购物车
- Http.AjaxService({
- url:'/shoppingCart/addCart',
- type:'post',
- data:params,
- json:false
- })
- .then(function(res){
- callback(res)
- });
- },
- getImgVerifyCode : function (params,callback){ //获取图形验证图形
- Http.AjaxService({
- url:'/user/captcha',
- type:'get',
- data:params,
- json:true,
- isHost:true
- })
- .then(function(res){
- if (res.code == 0) {
- callback(res);
- }
- });
- },
- getMobileSMScode : function (params,callback){//直接获取手机短信验证码
- Http.AjaxService({
- url:'/user/activateCodeByReg',
- type:'get',
- data:params,
- json:true
- })
- .then(function(res){
- callback(res);
- });
- },
- getEmailSMScode : function (params,callback) { //获取邮箱短信验证码
- Http.AjaxService({
- url:'/user/mail/code',
- type:'get',
- data:params,
- json:true,
- isHost:true
- })
- .then(function(res){
- callback(res);
- });
- },
- findCompanyPwd : function(params,callback) {//用户找回密码
- Http.AjaxService({
- url:'/user/findCompanyPwd',
- type:'post',
- data:params,
- json:true
- })
- .then(function(res){
- callback(res);
- });
- },
- clubChangeMobile:function(params,callback){//更换手机号
- Http.AjaxService({
- url:'/user/update/mobile',
- type:'post',
- data:params,
- json:false,
- isHost:true
- })
- .then(function(res){
- callback(res);
- });
- },
- editCompanyInfo : function (params,callback) {//获取要修改的企业信息
- Http.AjaxService({
- url:'/user/club/applicationData',
- type:'get',
- data:params,
- json:true
- })
- .then(function(res){
- callback(res);
- });
- },
- modifiedData : function (params,callback) {//提交个人中心修改机构信息
- Http.AjaxService({
- url:'/operation/modifiedData',
- type:'post',
- data:params,
- json:false
- })
- .then(function(res){
- callback(res);
- });
- },
- bindIngUseEmail : function(params,callback) { //未绑定邮箱账户绑定邮箱
- Http.AjaxService({
- url:'/user/binding',
- type:'post',
- data:params,
- json:true
- })
- .then(function(res){
- callback(res)
- });
- },
- getOperationList : function (params,callback) { //获取机构运营人员列表
- Http.AjaxService({
- url:'/user/bindOrganization',
- type:'post',
- data:params,
- json:false
- })
- .then(function(res){
- callback(res)
- });
- },
- addOperation : function (params,callback) { //机构员工管理添加运营人员
- Http.AjaxService({
- url:'/operation/add',
- type:'post',
- data:params,
- json:false
- })
- .then(function(res){
- callback(res)
- });
- },
- deleteOperation : function (params,callback) { //机构员工管理删除运营人员
- Http.AjaxService({
- url:'/operation/delete',
- type:'post',
- data:params,
- json:false
- })
- .then(function(res){
- callback(res)
- });
- },
- updateInvitationCode : function (params,callback) { //机构员工管理更新邀请码
- Http.AjaxService({
- url:'/operation/updateInvitationCode',
- type:'post',
- data:params,
- json:false
- })
- .then(function(res){
- callback(res)
- });
- },
- queryShoppingCartList:function(params,callback){ //购物车数据列表
- Http.AjaxService({
- url:'/shoppingCart/shoppingInfo',
- type:'get',
- data:params, json:false
- })
- .then(function(res){
- callback(res)
- });
- },
- shoppingCartUpdate:function(params,callback){//更新商品增减
- Http.AjaxService({
- url:'/shoppingCart/update',
- type:'post',
- data:params,
- json:false
- })
- .then(function(res){
- callback(res)
- });
- },
- shoppingCartDelete:function(params,callback) {//删除购物车商品
- Http.AjaxService({
- url:'/shoppingCart/delete',
- type:'post',
- data:params,
- json:false
- })
- .then(function(res){
- callback(res)
- });
- },
- queryOrderConfirmInfo:function(params,callback){ //购物车数据列表
- Http.AjaxService({
- url:'/order/confirm',
- type:'get',
- data:params,
- json:true
- })
- .then(function(res){
- callback(res)
- });
- },
- queryAddressList:function(params,callback){ //地址列表
- Http.AjaxService({
- url:'/personalCenter/findAddress',
- type:'get',
- data:params,
- json:true
- })
- .then(function(res){
- callback(res)
- });
- },
- deleteNewAddress:function(params,callback){ //删除地址
- Http.AjaxService({
- url:'/personalCenter/deleteAddress',
- type:'get',
- data:params,
- json:true
- })
- .then(function(res){
- callback(res)
- });
- },
- addNewAddress:function(params,callback) {//保存地址
- Http.AjaxService({
- url:'/personalCenter/saveAddress',
- type:'post',
- data:params,
- json:false
- })
- .then(function(res){
- callback(res)
- });
- },
- defaultAddress:function(params,callback) {//设为默认地址
- Http.AjaxService({
- url:'/personalCenter/defaultAddress',
- type:'post',
- data:params,
- json:false
- })
- .then(function(res){
- callback(res)
- });
- },
- getOrderPostage:function(params,callback){ //获取邮费信息
- Http.AjaxService({
- url:'/order/postage',
- type:'get',
- data:params,
- json:true
- })
- .then(function(res){
- callback(res)
- });
- },
- getFindInvoice:function(params,callback){ //获取发票信息
- Http.AjaxService({
- url:'/personalCenter/findInvoice',
- type:'get',
- data:params,
- json:true
- })
- .then(function(res){
- callback(res)
- });
- },
- getHomeSaleTips:function(params,callback){ //获取关于我们
- Http.AjaxService({
- url:'/commodity/home/sale/tips',
- type:'get',
- data:params,
- json:true
- })
- .then(function(res){
- callback(res)
- });
- },
- confirmOrder:function (params,callback) {//提交订单
- Http.AjaxService({
- url:'/order/submit',
- type:'post',
- data:params,
- json:false
- })
- .then(function(res){
- callback(res)
- });
- },
- updateInvoice:function (params,callback) {//保存发票信息
- Http.AjaxService({
- url:'/personalCenter/invoice',
- type:'post',
- data:params,
- json:false
- })
- .then(function(res){
- callback(res)
- });
- },
- markAsRead:function (params,callback) {//已读消息
- Http.AjaxService({
- url:'/user/center/messages/read',
- type:'post',
- data:params,
- json:false
- })
- .then(function(res){
- callback(res)
- });
- },
- deleteMessage:function (params,callback) {//删除消息
- Http.AjaxService({
- url:'/user/center/messages/delete',
- type:'post',
- data:params,
- json:false
- })
- .then(function(res){
- callback(res)
- });
- },
- GetNewsList:function(params,callback){ //公告列表
- Http.AjaxService({
- url:'/commodity/home/title',
- type:'get',
- data:params,
- json:false,
- isHost:true
- })
- .then(function(res){
- callback(res)
- });
- },
- GetNewsDetails:function(params,callback){ //获取公告详情
- Http.AjaxService({
- url:'/commodity/home/capacity',
- type:'get',
- data:params,
- json:false,
- isHost:true
- })
- .then(function(res){
- callback(res)
- });
- },
- getAuthClubCount:function(params,callback){ // 获取机构未读消息数量
- Http.AjaxService({
- url:'/user/login/auth/ClubCount',
- type:'get',
- data:params,
- json:false,
- isHost:true
- })
- .then(function(res){
- callback(res)
- });
- },
- getAuthShopCount:function(params,callback){ // 获取供应商未读消息数量
- Http.AjaxService({
- url:'/user/login/auth/ShopCount',
- type:'get',
- data:params,
- json:false,
- isHost:true
- })
- .then(function(res){
- callback(res)
- });
- },
- userRecordStatisticsApp: function (params, callback) {//上送统计用户浏览记录
- Http.AjaxService({
- url: '/user/record/Statistics',
- type:'get',
- data:params,
- json:false,
- isHost:true
- }).then(function (res) {
- callback(res);
- });
- },
- userInformationIsClick: function (params, callback) {//查看用户是否有过弹框,游客当天是否有过弹框
- Http.AjaxService({
- url: '/user/information/isClick',
- type:'get',
- data:params,
- json:false,
- isHost:true
- }).then(function (res) {
- callback(res);
- });
- },
- getUserPopUpInfo: function (params, callback) {//查看供应商广告弹窗信息
- Http.AjaxService({
- url: '/user/information/getPopUpInfo',
- type:'get',
- data:params,
- json:false,
- isHost:true
- }).then(function (res) {
- callback(res);
- });
- },
- userInformationInsertRoos: function (params, callback) {//插入填写咨询人基本信息
- Http.AjaxService({
- url: '/user/information/insertRoos',
- type:'post',
- data:params,
- json:false,
- isHost:true
- }).then(function (res) {
- callback(res);
- });
- },
- getShopAdvert: function (params, callback) {//查看访问者是否浏览过roos相关页面
- Http.AjaxService({
- url: '/user/information/getShopAdvert',
- type:'get',
- data:params,
- json:false,
- isHost:true
- }).then(function (res) {
- callback(res);
- });
- },
- getArticleRecommendation(params, callback) { // 精选文章和美业资料列表数据
- Http.AjaxService({
- url: '/info/articlerecommendation',
- type:'get',
- data:params,
- json:false,
- isHost:true
- }).then((res) => {
- callback(res);
- });
- },
- getVoteList(params, callback) { // 获取投票详情
- Http.AjaxService({
- url: '/commodity/vote/list',
- type:'get',
- data:params,
- json:false,
- isHost:true
- }).then((res) => {
- callback(res);
- });
- },
- getVotePush(params, callback) { // 获取投票详情
- Http.AjaxService({
- url: '/commodity/push/vote',
- type:'post',
- data:params,
- json:false,
- isHost:true
- }).then((res) => {
- callback(res);
- });
- },
- /**
- * @采美AI助手-提问
- * @param:userId 用户userId
- * @param:question 问题码
- */
- userNewChat: function (params, callback) {
- Http.AjaxService({
- url: '/user/chat/new/chat',
- type:'get',
- data:params,
- json:false,
- isHost:true
- }).then(function (res) {
- callback(res);
- });
- },
- /**
- * @采美AI助手-提问
- * @param:chatId 记录ID
- * @param:userId 用户userId
- * @param:question 问题码
- */
- userSecondChat: function (params, callback) {
- Http.AjaxService({
- url: '/user/chat/second/chat',
- type:'get',
- data:params,
- json:false,
- isHost:true
- }).then(function (res) {
- callback(res);
- });
- },
- /**
- * @采美AI助手-提问记录
- * @param:userId 用户userId
- * @param:pageNum 每页页码
- * @param:pageSize 条数
- */
- userNewChatHistory: function (params, callback) {
- Http.AjaxService({
- url: '/user/chat/chat/history',
- type:'get',
- data:params,
- json:false,
- isHost:true
- }).then(function (res) {
- callback(res);
- });
- },
- /**
- * @采美AI助手-提问记录详情
- * @param:userId 用户userId
- * @param:chatId 记录Id
- */
- userNewChatDetail: function (params, callback) {
- Http.AjaxService({
- url: '/user/chat/history/detail',
- type:'get',
- data:params,
- json:false,
- isHost:true
- }).then(function (res) {
- callback(res);
- });
- }
- };
|