目錄
說明: 2
1、 用戶登錄商城 2
2、 獲取用戶積分 4
3、 修改用戶積分 5
4、 申請積分兌換 6
5、 修改用戶信息 7
6、 獲取充值比例 9
7、 獲取兌換記錄列表 10
8、 獲取充值記錄列表 13
說明:
接口請求協(xié)議https;
請求域名如jinyejixie.com;
端口測試使用8080,正式版使用80
請求參數(shù)唯一,用param,param為請求對象轉(zhuǎn)成json字符串;
請求返回用同一個(gè)的對象Result,參數(shù)說明如下;
參數(shù)名
參數(shù)類型
參數(shù)示例
參數(shù)說明
actioncode
字符串
SUCCESS
用于判斷請求是否成功(SUCCESS為成功)
data
字符串
{
"ssid":”swdurj5ifjti65jucf11”,
"tokenuuid":
"b5c5891a8a8042ae801d42ff2f6efe6d"
}
請求成功后獲取的數(shù)據(jù)對象以json字符串的形式賦值給data
endtime
字符串
最后響應(yīng)時(shí)間
message
字符串
請求的說明
用戶登錄商城
接口地址
https://ip:8080/outsideaction/wxMallAction/doLogin
接口說明
用戶登錄商城驗(yàn)證 返回用戶數(shù)據(jù)
輸入?yún)?shù)
參數(shù)
類型
默認(rèn)值
說明
param
String
請求唯一參數(shù),它是有多個(gè)參數(shù)的對象封裝成json字符串的形式存在
param={
"loginname":"admin",
"password":"123",
"openid":"123",
"appid":"123"
}
https://IP:8080/outsideaction/wxMallAction/doLogin?param={"loginname":"admin","password":"123","openid":"123","appid":"123"}
輸出結(jié)果:
類型
返回json數(shù)據(jù)
成功返回
{
"version":"V1.X",
"actioncode":"SUCCESS",
"data":
{"ssid":”swdurj5ifjti65jucf11”,
"nickname":"admin",
"integraltotal":100,
"integralexchangeed":100,
"integralexchange":100},
"endtime":"2018-12-11 11:33:02",
"message":"請求成功","token":"true"
}
失敗返回
{"version":"V1.X",
"actioncode":"FAIL",
"data":"",
"endtime":"2018-12-11 11:35:25",
"message":"用戶名或密碼錯(cuò)誤","token":"true"}
實(shí)際返回的數(shù)據(jù)說明
ssid;//用戶ssid
integraltotal;//總積分
integralexchangeed; //已兌換積分
integralexchange; //可兌換積分
nickname;//昵稱
獲取用戶積分
接口地址
https://ip:8080/outsideaction/wxMallAction/getUserIntegral
接口說明
獲取用戶積分
輸入?yún)?shù)
參數(shù)
類型
默認(rèn)值
說明
param
String
請求唯一參數(shù),它是有多個(gè)參數(shù)的對象封裝成json字符串的形式存在
param={
"userssid":"b5c5891a8a8042ae801d42ff2f6efe6d",
"tokenuuid":"b1345891a8a80fse801d42ff2f6136d"
}
https://IP:8080/outsideaction/wxMallAction/doLogin?param={
"userssid":"b5c5891a8a8042ae801d42ff2f6efe6d"}
Userssid用戶的唯一標(biāo)識
輸出結(jié)果:
類型
返回json數(shù)據(jù)
成功返回
{
"version":"V1.X",
"actioncode":"SUCCESS",
"data":
{
"integraltotal":100,
"integralexchangeed":100,
"integralexchange":100
},
"endtime":"2018-12-11 11:33:02",
"message":"請求成功","token":"true"
}
失敗返回
{"version":"V1.X",
"actioncode":"FAIL",
"data":"",
"endtime":"2018-12-11 11:35:25",
"message":"用戶名或密碼錯(cuò)誤","token":"true"}
實(shí)際返回的數(shù)據(jù)說明
integraltotal;//總積分
integralexchangeed; //已兌換積分
integralexchange; //可兌換積分
修改用戶積分
接口地址
https://ip:8080/outsideaction/wxMallAction/updateUserIntegral
接口說明
修改用戶積分
輸入?yún)?shù)
參數(shù)
類型
默認(rèn)值
說明
param
String
請求唯一參數(shù),它是有多個(gè)參數(shù)的對象封裝成json字符串的形式存在
param={
"userssid":"b5c5891a8a8042ae801d42ff2f6efe6d",
"tokenuuid":"b1345891a8a80fse801d42ff2f6136d",
"integeraltype":1,
"score":1000
}
https://IP:8080/outsideaction/wxMallAction/getUserIntegral?param={
"userssid":"b5c5891a8a8042ae801d42ff2f6efe6d",
"integeraltype":1,
"score":1000}
參數(shù)說明
integeraltype;//積分兌換RMB==1,充值積分==2, 中獎(jiǎng)添加積分==3
score;//充值/兌換/中獎(jiǎng)的積分
userssid;//用戶的唯一標(biāo)識
輸出結(jié)果:
類型
返回json數(shù)據(jù)
成功返回
{
"version":"V1.X",
"actioncode":"SUCCESS",
"data":
{
"integraltotal":100,
"integralexchangeed":100,
"integralexchange":100
},
"endtime":"2018-12-11 11:33:02",
"message":"請求成功","token":"true"
}
失敗返回
{"version":"V1.X",
"actioncode":"FAIL",
"data":"",
"endtime":"2018-12-11 11:35:25",
"message":"用戶名或密碼錯(cuò)誤","token":"true"}
實(shí)際返回的數(shù)據(jù)說明
integraltotal;//總積分
integralexchangeed; //已兌換積分
integralexchange; //可兌換積分
申請積分兌換
接口地址
https://ip:8080/outsideaction/wxMallAction/integralExchange
接口說明
申請積分兌換
輸入?yún)?shù)
參數(shù)
類型
默認(rèn)值
說明
param
String
請求唯一參數(shù),它是有多個(gè)參數(shù)的對象封裝成json字符串的形式存在
param={
"userssid":"b5c5891a8a8042ae801d42ff2f6efe6d",
"exchangeid":"123456",
“exchangescore”:12000,
“exchangetype”:2
}
https://IP:8080/outsideaction/wxMallAction/integralExchange?param={
"userssid":"b5c5891a8a8042ae801d42ff2f6efe6d",
"exchangeid":"123456",
“exchangescore”:12000,
“exchangetype”:2}
exchangeid;//兌換、中獎(jiǎng)物品時(shí)的物品id,字符串格式
exchangescore;// 兌換積分
exchangetype;// 1/兌換現(xiàn)金 2/實(shí)物3/抽獎(jiǎng)
輸出結(jié)果:
類型
返回json數(shù)據(jù)
成功返回
{
"version":"V1.X",
"actioncode":"SUCCESS",
"data":null,
"endtime":"2018-12-11 11:33:02",
"message":"請求成功","token":"true"
}
失敗返回
{"version":"V1.X",
"actioncode":"FAIL",
"data":"",
"endtime":"2018-12-11 11:35:25",
"message":"用戶名或密碼錯(cuò)誤","token":"true"}
實(shí)際返回的數(shù)據(jù)說明
data里面可以不要數(shù)據(jù),根據(jù)actioncode判斷是否修改成功
修改用戶信息
接口地址
https://ip:8080/outsideaction/wxMallAction/updateUserinfo
接口說明
修改用戶信息(主要是改手機(jī)、微信、收貨地址)
輸入?yún)?shù)
參數(shù)
類型
默認(rèn)值
說明
param
String
請求唯一參數(shù),它是有多個(gè)參數(shù)的對象封裝成json字符串的形式存在
param={
"userssid":"b5c5891a8a8042ae801d42ff2f6efe6d",
"phonenum":"12512451368",
"wechatid":"wx125124513",
"email":"12512@qq.com",
"address":"成都市寶安區(qū)196號 XX收"
}
https://IP:8080/outsideaction/wxMallAction/doLogin?param={
"userssid":"b5c5891a8a8042ae801d42ff2f6efe6d",
"phonenum":"12512451368",
"wechatid":"wx125124513",
"email":"12512@qq.com",
"address":"成都市寶安區(qū)196號 XX收"
}
phonenum;//手機(jī)號
wechatid;//微信號
email;//郵箱
address;//收貨地址
輸出結(jié)果:
類型
返回json數(shù)據(jù)
成功返回
{
"version":"V1.X",
"actioncode":"SUCCESS",
"data":null,
"endtime":"2018-12-11 11:33:02",
"message":"請求成功","token":"true"
}
失敗返回
{"version":"V1.X",
"actioncode":"FAIL",
"data":"",
"endtime":"2018-12-11 11:35:25",
"message":"用戶名或密碼錯(cuò)誤","token":"true"}
實(shí)際返回的數(shù)據(jù)說明
data里面可以不要數(shù)據(jù),根據(jù)actioncode判斷是否修改成功
獲取充值比例
接口地址
https://ip:8080/outsideaction/wxMallAction/getRechargePercent
接口說明
獲取充值比例
輸入?yún)?shù)
參數(shù)
類型
默認(rèn)值
說明
param
String
請求唯一參數(shù),它是有多個(gè)參數(shù)的對象封裝成json字符串的形式存在
param={
"userssid":"b5c5891a8a8042ae801d42ff2f6efe6d"
}
https://IP:8080/outsideaction/wxMallAction/doLogin?param={
"userssid":"b5c5891a8a8042ae801d42ff2f6efe6d"}
輸出結(jié)果:
類型
返回json數(shù)據(jù)
成功返回
{
"version":"V1.X",
"actioncode":"SUCCESS",
"data":
{"currencytype":”rmb”,
"score":10000
},
"endtime":"2018-12-11 11:33:02",
"message":"請求成功","token":"true"
}
失敗返回
{"version":"V1.X",
"actioncode":"FAIL",
"data":"",
"endtime":"2018-12-11 11:35:25",
"message":"用戶名或密碼錯(cuò)誤","token":"true"}
實(shí)際返回的數(shù)據(jù)說明
currencytype="rmb";//rmb標(biāo)識人民幣
score=100;//1單位的貨幣兌換可以的積分
獲取兌換記錄列表
接口地址
https://ip:8080/outsideaction/wxMallAction/getExchangeList
接口說明
獲取兌換記錄列表
輸入?yún)?shù)
參數(shù)
類型
默認(rèn)值
說明
param
String
請求唯一參數(shù),它是有多個(gè)參數(shù)的對象封裝成json字符串的形式存在
param={
"userssid":"b5c5891a8a8042ae801d42ff2f6efe6d",
"pageSize":10,
"currPage":1
}
https://IP:8080/outsideaction/wxMallAction/doLogin?param={
"userssid":"b5c5891a8a8042ae801d42ff2f6efe6d",
"pageSize":10,
"currPage":"1"}
pageSize;//每頁條數(shù)
currPage;//當(dāng)前頁碼 要查詢的頁碼
輸出結(jié)果:
類型
返回json數(shù)據(jù)
成功返回
{
"version":"V1.X",
"actioncode":"SUCCESS",
"data":
{
"exchangeAllScore":2000,
"exchangeMoneyScore":1000,
"exchangeMoneyTotal":1,
"exchangeGoodsScore":1000,
"maxPage":5,
"currPage":1,
"maxSize":48,
"exchangeList":[
{
"applyscore":10000,
"usemoney":100,
"exchangetype":1,
"applystate":1,
"applynum":1,
"appphysicalid":””,
"wantExchargetime":”2015-12-12 12:12:12”
}
{
"applyscore":10000,
"usemoney":100,
"exchangetype":1,
"applystate":1,
"applynum":1,
"appphysicalid":””,
"wantExchargetime":”2015-12-12 12:12:12”
}
{...}
]
},
"endtime":"2018-12-11 11:33:02",
"message":"請求成功","token":"true"
}
失敗返回
{"version":"V1.X",
"actioncode":"FAIL",
"data":"",
"endtime":"2018-12-11 11:35:25",
"message":"暫無兌換記錄","token":"true"}
實(shí)際返回的數(shù)據(jù)說明
exchangeAllScore;//兌換總積分
exchangeMoneyScore;//兌換現(xiàn)金的積分
exchangeGoodsScore;//兌換實(shí)物的積分
exchangeMoneyTotal;//兌換現(xiàn)金的金額
maxPage;//總頁數(shù)
currPage;//當(dāng)前頁碼
maxSize;//總條數(shù)
exchangeList:{//兌換列表
applyscore;//兌換的積分
usemoney;//兌換的金額
applystate;//兌換的狀態(tài)1兌換中,2兌換成功,-1兌換失敗
exchangetype;//兌換的類型 ,兌換金額==1,兌換物品==2
applynum;//兌換的個(gè)數(shù)
appphysicalid;//兌換商品的id標(biāo)識
wantExchargetime;//兌換的申請時(shí)間
}
獲取充值記錄列表
接口地址
https://ip:8080/outsideaction/wxMallAction/getRechargeList
接口說明
獲取兌換記錄列表
輸入?yún)?shù)
參數(shù)
類型
默認(rèn)值
說明
param
String
請求唯一參數(shù),它是有多個(gè)參數(shù)的對象封裝成json字符串的形式存在
param={
"userssid":"b5c5891a8a8042ae801d42ff2f6efe6d",
"pageSize":10,
"currPage":1
}
https://IP:8080/outsideaction/wxMallAction/getRechargeList?param={
"userssid":"b5c5891a8a8042ae801d42ff2f6efe6d",
"pageSize":10,
"currPage":"1"}
pageSize;//每頁條數(shù)
currPage;//當(dāng)前頁碼 要查詢的頁碼
輸出結(jié)果:
類型
返回json數(shù)據(jù)
成功返回
{
"version":"V1.X",
"actioncode":"SUCCESS",
"data":
{
"rechargeAllScore":2000,
"rechargeMoneyTotal":1000,
"maxPage":5,
"currPage":1,
"maxSize":48,
"rechargeList":[
{
"usemoney":1,
"rechargescore":1000,
"addtime":”2015-12-12 12:12:12”
},
{
"usemoney":2,
"rechargescore":2000,
"addtime":”2015-12-12 12:12:12”
},{...}
]
},
"endtime":"2018-12-11 11:33:02",
"message":"請求成功","token":"true"
}
失敗返回
{"version":"V1.X",
"actioncode":"FAIL",
"data":"",
"endtime":"2018-12-11 11:35:25",
"message":"暫無充值記錄","token":"true"}
實(shí)際返回的數(shù)據(jù)說明
rechargeAllScore;//充值總積分
rechargeMoneyTotal;//充值總金額
maxPage;//總頁數(shù)
currPage;//當(dāng)前頁碼
maxSize;//總條數(shù)
rechargeList:{//充值記錄列表
rechargescore;//充值的積分
usemoney;//充值的金額
addtime;//充值時(shí)間
}
1、接口1==》說明:新增字段【luckscore】
抽獎(jiǎng)操作時(shí)若中了積分傳遞積分值luckscore;中了實(shí)物則傳遞實(shí)物exchangeid
接口地址
https://ip:8080/outsideaction/wxMallAction/integralExchange
接口說明
申請積分兌換
輸入?yún)?shù)
參數(shù)
類型
默認(rèn)值
說明
param
String
請求唯一參數(shù),它是有多個(gè)參數(shù)的對象封裝成json字符串的形式存在
param={
"userssid":"b5c5891a8a8042ae801d42ff2f6efe6d",
"exchangeid":"123456",
“exchangescore”:12000,
“exchangetype”:2,
“luckscore”:1000
}
https://192.168.3.93:8080/outsideaction/wxMallAction/integralExchange?param={
"userssid":"b5c5891a8a8042ae801d42ff2f6efe6d",
"exchangeid":"123456",
“exchangescore”:12000,
“exchangetype”:2,
“luckscore”:1000
}
exchangeid;//兌換物品時(shí)的物品id,字符串格式
exchangescore;// 兌換積分
exchangetype;// 1/兌換現(xiàn)金 2/實(shí)物,3/抽獎(jiǎng)
Luckscore;//中獎(jiǎng)積分
輸出結(jié)果:
類型
返回json數(shù)據(jù)
成功返回
{
"version":"V1.X",
"actioncode":"SUCCESS",
"data":null,
"endtime":"2018-12-11 11:33:02",
"message":"請求成功","token":"true"
}
失敗返回
{"version":"V1.X",
"actioncode":"FAIL",
"data":"",
"endtime":"2018-12-11 11:35:25",
"message":"用戶名或密碼錯(cuò)誤","token":"true"}
實(shí)際返回的數(shù)據(jù)說明
data里面可以不要數(shù)據(jù),根據(jù)actioncode判斷是否修改成功
接口2==》說明:抽獎(jiǎng)查詢中獎(jiǎng)積分字段【luckscore】
接口地址
https://ip:8080/outsideaction/wxMallAction/getExchangeList
接口說明
獲取兌換記錄列表
輸入?yún)?shù)
參數(shù)
類型
默認(rèn)值
說明
param
String
請求唯一參數(shù),它是有多個(gè)參數(shù)的對象封裝成json字符串的形式存在
param={
"userssid":"b5c5891a8a8042ae801d42ff2f6efe6d",
"pageSize":10,
"currPage":1
}
https://192.168.3.93:8080/outsideaction/wxMallAction/doLogin?param={
"userssid":"b5c5891a8a8042ae801d42ff2f6efe6d",
"pageSize":10,
"currPage":"1"}
pageSize;//每頁條數(shù)
currPage;//當(dāng)前頁碼 要查詢的頁碼
輸出結(jié)果:
類型
返回json數(shù)據(jù)
成功返回
{
"version":"V1.X",
"actioncode":"SUCCESS",
"data":
{
"exchangeAllScore":2000,
"exchangeMoneyScore":1000,
"exchangeMoneyTotal":1,
"exchangeGoodsScore":1000,
"maxPage":5,
"currPage":1,
"maxSize":48,
"exchangeList":[
{
"applyscore":10000,
"usemoney":100,
"exchangetype":1,
"applystate":1,
"applynum":1,
"appphysicalid":””,
"wantExchargetime":”2015-12-12 12:12:12”,
"luckscore": 1000
}
{
"applyscore":10000,
"usemoney":100,
"exchangetype":1,
"applystate":1,
"applynum":1,
"appphysicalid":””,
"wantExchargetime":”2015-12-12 12:12:12”,
"luckscore": 1000
}
{...}
]
},
"endtime":"2018-12-11 11:33:02",
"message":"請求成功","token":"true"
}
失敗返回
{"version":"V1.X",
"actioncode":"FAIL",
"data":"",
"endtime":"2018-12-11 11:35:25",
"message":"用戶名或密碼錯(cuò)誤","token":"true"}
實(shí)際返回的數(shù)據(jù)說明
exchangeAllScore;//兌換總積分
exchangeMoneyScore;//兌換現(xiàn)金的積分
exchangeGoodsScore;//兌換實(shí)物的積分
exchangeMoneyTotal;//兌換現(xiàn)金的金額
maxPage;//總頁數(shù)
currPage;//當(dāng)前頁碼
maxSize;//總條數(shù)
exchangeList:{//兌換列表
applyscore;//兌換的積分
usemoney;//兌換的金額
applystate;//兌換的狀態(tài) 0兌換中,1兌換成功,-1兌換失敗
exchangetype;//兌換的類型 ,兌換金額==1,兌換物品==2,抽獎(jiǎng)==3
applynum;//兌換的個(gè)數(shù)
appphysicalid;//兌換商品的id標(biāo)識
wantExchargetime;//兌換的申請時(shí)間
Luckscore;//中獎(jiǎng)積分
}
分享文章:小程序商城對接APP應(yīng)用服務(wù)器的接口說明
文章轉(zhuǎn)載:http://jinyejixie.com/news27/244527.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供電子商務(wù)、網(wǎng)站設(shè)計(jì)公司、用戶體驗(yàn)、網(wǎng)站制作、域名注冊、商城網(wǎng)站
廣告
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源:
創(chuàng)新互聯(lián)