项目接口自己本机的 192.168.1.198

积分商城项目

所有接口一律采用 post的方式发起请求获得返回值

 

以下是每次请求调用过程中必传的参数

序号

参数

数据类型

是否必传

描述

1

Clientip

string

必传

客户端IP,格式为aaa.bbb.ccc.ddd

2

Clientkey

string

必传

传 android 

    ios

     pc

3

location

string

必传

当前位置坐标(经纬度),格式为x,y,如获取不到或者没有权限,loc=0,0

4

sessionid

string

必传

用户sessionid,未登录用户sessionid默认值为null字符串,已登录用户每次在客户端启动时会生成新的sessionid

5

Signature(先忽略这个字段,不管他)

string

必传

签名参数  数字签名的生成请看下面的文档   数字签名生成规则

6

Appversion

string

必传

APP版本,如beta1.0、alpha2.0、rc1.0、 lts2.0

7

os

string

必传

系统类型(如Android9.000),移动端和PC使用浏览器版本

8

timestamp

string

必传

发送请求时,客户端时间戳,10位,精度到秒即可  System.currentTimeMillis();

9

Deviceid

string

必传

设备唯一ID

10

pushtoken

string

必传

客户端必传选项,用于消息推送

11

brand

string

必传

设备品牌,如Mi 3S

12

screen

string

必传

屏幕分辨率

 

所有与密码相关的部分应使用 md5 进行加密操作 


本机测试地址

http://192.168.1.198:8080/mallintegral



1.

功能名称

用户登录

功能描述

用户登录方法

接口地址

 

测试接口

http://192.168.1.198:8080/mallintegral/index/userlogin

传入参数

{

                "clientip""192.168.239.136", 

                "clientkey""ggfhgfhgfhgjghgfdgfdgfdgf", 

                "location""116.40741300000002,39.904214", 

                "sessionid""dfdfdggfhgjkfggggdhhgjhjghgfjhgjhgghgfjgfjgf", 

                

                "appversion""Beta1.0", 

                "os""ios9", 

                "timestamp""376539658590869853465", 

                "deviceid""GF&^&#DBEFGRJ(#JGHF67383JKSD", 

                "pushtoken""fgfhfggfgfdhgfhgfj46yr654wters45tret", 

                "brand""IPHONE6Plus", 

                "screen""1920*1080",

             

                "phonenum""13096789876",

"userpassword""13096789876"

        }

 

传入参数描述

前面的必传参数+

用户输入的手机号码,

登录密码

)

返回参数

{

    "errno": "0000",

    "errmsg": "请求正常",

    "results": {

            "userid": 8,

            "phonenum": "13096789676",

            "userpassword": "aaaa",

            "invitenum": null,

            "nickname": null,

            "headphoto": null,

            "createdate": 1529650885000,

            "updatedate": null,

            "lastlogintime": null,

            "logintimer": 0,

            "lastloginlocation": null,

            "userlevel": "1",

            "integralnum": null,

            "usernum": null

    }

}

返回参数描述

Error_no:错误码  

Text:中文描述

Results:返回的真实数据

{

   loginsuccess:是否已经注册,

Malluser: 返回用户的所有信息

}

 

 

 

2.

功能名称

用户注册

功能描述

用户注册方法

接口地址

 

测试接口

http://192.168.1.198:8080/mallintegral/index/userregister

传入参数

{

                "clientip""192.168.239.136", 

                "clientkey""ggfhgfhgfhgjghgfdgfdgfdgf", 

                "location""116.40741300000002,39.904214", 

                "sessionid""dfdfdggfhgjkfggggdhhgjhjghgfjhgjhgghgfjgfjgf", 

                

                "appversion""Beta1.0", 

                "os""ios9", 

                "timestamp""376539658590869853465", 

                "deviceid""GF&^&#DBEFGRJ(#JGHF67383JKSD", 

                "pushtoken""fgfhfggfgfdhgfhgfj46yr654wters45tret", 

                "brand""IPHONE6Plus", 

                "screen""1920*1080",

       

                "phonenum""13096789876",

"checkcode""1234",

"userpassword""dhfjdshfdgjfdg",

"confirmuserpassword""dhfjdshfdgjfdg"

"invitenum""17618987678", 

        }

 

传入参数描述

前面的必传参数+

用户输入的手机号码,

验证码,

登录密码,

确认登录密码,

邀请码  (可以不传)

)

返回参数

{

        "err_no""0", 

        "text""登录成功", 

        "results"[

                {

                        "registersuccess"true

                }

        ]}

 

返回参数描述

Error_no:错误码  

Text:中文描述

Results:返回的真实数据

{

   loginsuccess:是否已经注册

}

 

 

3.

功能名称

用户找回密码

功能描述

用户找回密码

接口地址

 

测试接口

http://192.168.1.198:8080/mallintegral/index/userfindpassword

传入参数

{

                "clientip""192.168.239.136", 

                "clientkey""ggfhgfhgfhgjghgfdgfdgfdgf", 

                "location""116.40741300000002,39.904214", 

                "sessionid""dfdfdggfhgjkfggggdhhgjhjghgfjhgjhgghgfjgfjgf", 

                

                "appversion""Beta1.0", 

                "os""ios9", 

                "timestamp""376539658590869853465", 

                "deviceid""GF&^&#DBEFGRJ(#JGHF67383JKSD", 

                "pushtoken""fgfhfggfgfdhgfhgfj46yr654wters45tret", 

                "brand""IPHONE6Plus", 

                "screen""1920*1080",

      

                "phonenum""13096789876",

"checkcode""1234",

"newuserpassword""dhfjdshfdgjfdg",

"confirmnewuserpassword""dhfjdshfdgjfdg"

 

 

        }

 

传入参数描述

前面的必传参数+

用户输入的手机号码,

验证码,

登录密码,

确认登录密码

)

返回参数

{

    "errno": "0000",

    "errmsg": null,

    "text": "请求正常",

    "results": {

        "findpasswordsuccess": true

    }

}

返回参数描述

Error_no:错误码  

Text:中文描述

Results:返回的真实数据

{

   loginsuccess:是否已经找回密码成功

}

 

4.

功能名称

用户修改密码

功能描述

用户修改密码

接口地址

 

测试接口

http://192.168.1.198:8080/mallintegral/index/updatepassword

传入参数

{

                "clientip""192.168.239.136", 

                "clientkey""ggfhgfhgfhgjghgfdgfdgfdgf", 

                "location""116.40741300000002,39.904214", 

                "sessionid""dfdfdggfhgjkfggggdhhgjhjghgfjhgjhgghgfjgfjgf", 

                

                "appversion""Beta1.0", 

                "os""ios9", 

                "timestamp""376539658590869853465", 

                "deviceid""GF&^&#DBEFGRJ(#JGHF67383JKSD", 

                "pushtoken""fgfhfggfgfdhgfhgfj46yr654wters45tret", 

                "brand""IPHONE6Plus", 

                "screen""1920*1080",

       

                "phonenum""13876546785",

"newuserpassword""dhfjdshfdgjfdg"

        }

 

传入参数描述

前面的必传参数+

用户输入的手机号码,

验证码,

登录密码,

确认登录密码

)

返回参数

{

    "errno": "0000",

    "errmsg": null,

    "text": "请求正常",

    "results": {

        "updatepasswordsuccess": true

    }

}

返回参数描述

Error_no:错误码  

Text:中文描述

Results:返回的真实数据

{

   loginsuccess:是否已经找回密码成功

}

 

5.

功能名称

用户手机号码

功能描述

用户手机号码

接口地址

 

测试接口

http://192.168.1.198:8080/mallintegral/index/updatephonenum

传入参数

{

                "clientip""192.168.239.136", 

                "clientkey""ggfhgfhgfhgjghgfdgfdgfdgf", 

                "location""116.40741300000002,39.904214", 

                "sessionid""dfdfdggfhgjkfggggdhhgjhjghgfjhgjhgghgfjgfjgf", 

                

                "appversion""Beta1.0", 

                "os""ios9", 

                "timestamp""376539658590869853465", 

                "deviceid""GF&^&#DBEFGRJ(#JGHF67383JKSD", 

                "pushtoken""fgfhfggfgfdhgfhgfj46yr654wters45tret", 

                "brand""IPHONE6Plus", 

                "screen""1920*1080",

      

                "oldphonenum""13876546785",

 "phonenum""13876546781"

"checkcode""1234"

        }

 

传入参数描述

前面的必传参数+

用户输入的手机号码,

验证码,

登录密码,

确认登录密码

)

返回参数

{

    "errno": "0000",

    "errmsg": null,

    "text": "请求正常",

    "results": {

        "updatepasswordsuccess": true

    }

}

返回参数描述

Error_no:错误码  

Text:中文描述

Results:返回的真实数据

{

   updatepasswordsuccess:是否已经找回密码成功

}

 

6.

功能名称

昵称设置

功能描述

昵称设置

接口地址

 

测试接口

http://192.168.1.198:8080/mallintegral/index/nicknameset

传入参数

{

                "clientip""192.168.239.136", 

                "clientkey""ggfhgfhgfhgjghgfdgfdgfdgf", 

                "location""116.40741300000002,39.904214", 

                "sessionid""dfdfdggfhgjkfggggdhhgjhjghgfjhgjhgghgfjgfjgf", 

                

                "appversion""Beta1.0", 

                "os""ios9", 

                "timestamp""376539658590869853465", 

                "deviceid""GF&^&#DBEFGRJ(#JGHF67383JKSD", 

                "pushtoken""fgfhfggfgfdhgfhgfj46yr654wters45tret", 

                "brand""IPHONE6Plus", 

                "screen""1920*1080",

     

                "phonenum""13876546781",

"nickname""三毛"

        }

 

传入参数描述

前面的必传参数+

用户输入的手机号码,

昵称

)

返回参数

{

    "errno": "0000",

    "errmsg": null,

    "text": "请求正常",

    "results": {

        "updatepasswordsuccess": true

    }

}

返回参数描述

Error_no:错误码  

Text:中文描述

Results:返回的真实数据

{

   loginsuccess:是否已经找回密码成功

}

 

7.

功能名称

意见反馈信息

功能描述

意见反馈信息

接口地址

 

测试接口

http://192.168.1.198:8080/mallintegral/suggestion/suggestionResponse

传入参数

{

                "clientip": "192.168.239.136",

                "clientkey": "ggfhgfhgfhgjghgfdgfdgfdgf",

                "location": "116.40741300000002,39.904214",

                "sessionid": "dfdfdggfhgjkfggggdhhgjhjghgfjhgjhgghgfjgfjgf",

                

                "appversion": "Beta1.0",

                "os": "ios9",

                "timestamp": "376539658590869853465",

                "deviceid": "GF&^&#DBEFGRJ(#JGHF67383JKSD",

                "pushtoken": "fgfhfggfgfdhgfhgfj46yr654wters45tret",

                "brand": "IPHONE6Plus",

                "screen": "1920*1080",

     

                "suggestioncontent": "13876546781",

"contactway": "907364604@qq.com"

        }

传入参数描述

前面的必传参数+

用户输入的手机号码,

昵称

)

返回参数

{

    "errno": "0000",

    "errmsg": null,

    "text": "请求正常",

    "results": {

        "suggestionsuccess": true

    }

}

返回参数描述

Error_no:错误码  

Text:中文描述

Results:返回的真实数据

{

   loginsuccess:是否已经找回密码成功

}

 

8.

功能名称

头像修改

功能描述

头像修改

接口地址

 

测试接口

http://192.168.1.198:8080/mallintegral/user/resetheadphoto

传入参数

{

                "clientip": "192.168.239.136",

                "clientkey": "ggfhgfhgfhgjghgfdgfdgfdgf",

                "location": "116.40741300000002,39.904214",

                "sessionid": "dfdfdggfhgjkfggggdhhgjhjghgfjhgjhgghgfjgfjgf",

                

                "appversion": "Beta1.0",

                "os": "ios9",

                "timestamp": "376539658590869853465",

                "deviceid": "GF&^&#DBEFGRJ(#JGHF67383JKSD",

                "pushtoken": "fgfhfggfgfdhgfhgfj46yr654wters45tret",

                "brand": "IPHONE6Plus",

                "screen": "1920*1080",

     

                "phonenum": "13876546781",

        }+

要上传的照片

传入参数描述

前面的必传参数+

用户输入的手机号码,

)

要上传的照片

返回参数

{

    "errno": "0000",

    "errmsg": null,

    "text": "请求正常",

    "results": {

        "headphotostatus": true

    }

}

返回参数描述

Error_no:错误码  

Text:中文描述

Results:返回的真实数据

{

   headphotostatus:是否已经成功上传

}

 

请求错误码

public static String error0000 = "0000"; //正常
public static String error1000 = "1000"; //系统错误或无法获取的异常,默认错误
public static String error2001 = "2001"; //缺少某个参数
public static String error2002 = "2002"; //用户key错误
public static String error2003 = "2003"; //timestamp超出请求预期
public static String error2010 = "2010"; //签名校验失败
public static String error2100 = "2100"; //需要用户登陆的地方为检测到合法的用户信息,需要跳转到登陆页面


public static String error3001 = "3001"; //phonenum or password is incorrect
public static String error3011 = "3011"; //phonenum already exist!!
public static String error3021 = "3021"; //findpassword failed
public static String error3022 = "3022"; //password and repassword is not equal!!
public static String error3031 = "3031"; //update password failed!!
public static String error3041 = "3041"; //update phonenum failed!!
public static String error3051 = "3051"; //nickname set failed!!




评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值