Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Litemall
Commits
cdc1619a
Commit
cdc1619a
authored
Oct 26, 2018
by
Junling Bu
Browse files
fix[litemall-wx-api, litemall-wx]: 修复收货地址不能修改
parent
cd27350a
Changes
3
Hide whitespace changes
Inline
Side-by-side
litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/web/WxAddressController.java
View file @
cdc1619a
...
...
@@ -85,10 +85,11 @@ public class WxAddressController {
* name: xxx,
* provinceId: xxx,
* cityId: xxx,
*
district
Id: xxx,
*
area
Id: xxx,
* mobile: xxx,
* address: xxx,
* isDefault: xxx,
* version: xxx
* provinceName: xxx,
* cityName: xxx,
* areaName: xxx
...
...
@@ -112,10 +113,11 @@ public class WxAddressController {
data
.
put
(
"name"
,
address
.
getName
());
data
.
put
(
"provinceId"
,
address
.
getProvinceId
());
data
.
put
(
"cityId"
,
address
.
getCityId
());
data
.
put
(
"
district
Id"
,
address
.
getAreaId
());
data
.
put
(
"
area
Id"
,
address
.
getAreaId
());
data
.
put
(
"mobile"
,
address
.
getMobile
());
data
.
put
(
"address"
,
address
.
getAddress
());
data
.
put
(
"isDefault"
,
address
.
getIsDefault
());
data
.
put
(
"version"
,
address
.
getVersion
());
String
pname
=
regionService
.
findById
(
address
.
getProvinceId
()).
getName
();
data
.
put
(
"provinceName"
,
pname
);
String
cname
=
regionService
.
findById
(
address
.
getCityId
()).
getName
();
...
...
@@ -211,7 +213,7 @@ public class WxAddressController {
return
ResponseUtil
.
updatedDateExpired
();
}
}
return
ResponseUtil
.
ok
(
address
.
getId
()
);
return
ResponseUtil
.
ok
(
address
);
}
/**
...
...
litemall-wx/pages/ucenter/addressAdd/addressAdd.js
View file @
cdc1619a
...
...
@@ -14,6 +14,7 @@ Page({
name
:
''
,
mobile
:
''
,
isDefault
:
0
,
version
:
0
,
provinceName
:
''
,
cityName
:
''
,
areaName
:
''
...
...
@@ -302,9 +303,7 @@ Page({
areaId
:
address
.
areaId
,
address
:
address
.
address
,
isDefault
:
address
.
isDefault
,
provinceName
:
address
.
provinceName
,
cityName
:
address
.
cityName
,
countyName
:
address
.
areaName
version
:
address
.
version
},
'
POST
'
).
then
(
function
(
res
)
{
if
(
res
.
errno
===
0
)
{
//返回之前,先取出上一页对象,并设置addressId
...
...
@@ -313,11 +312,11 @@ Page({
console
.
log
(
prevPage
);
if
(
prevPage
.
route
==
"
pages/checkout/checkout
"
)
{
prevPage
.
setData
({
addressId
:
res
.
data
addressId
:
res
.
data
.
id
})
try
{
wx
.
setStorageSync
(
'
addressId
'
,
res
.
data
);
wx
.
setStorageSync
(
'
addressId
'
,
res
.
data
.
id
);
}
catch
(
e
)
{
}
...
...
renard-wx/pages/ucenter/addressAdd/addressAdd.js
View file @
cdc1619a
...
...
@@ -14,6 +14,7 @@ Page({
name
:
''
,
mobile
:
''
,
isDefault
:
0
,
version
:
0
,
provinceName
:
''
,
cityName
:
''
,
areaName
:
''
...
...
@@ -302,9 +303,7 @@ Page({
areaId
:
address
.
areaId
,
address
:
address
.
address
,
isDefault
:
address
.
isDefault
,
provinceName
:
address
.
provinceName
,
cityName
:
address
.
cityName
,
countyName
:
address
.
areaName
version
:
address
.
version
},
'
POST
'
).
then
(
function
(
res
)
{
if
(
res
.
errno
===
0
)
{
//返回之前,先取出上一页对象,并设置addressId
...
...
@@ -313,11 +312,11 @@ Page({
console
.
log
(
prevPage
);
if
(
prevPage
.
route
==
"
pages/checkout/checkout
"
)
{
prevPage
.
setData
({
addressId
:
res
.
data
addressId
:
res
.
data
.
id
})
try
{
wx
.
setStorageSync
(
'
addressId
'
,
res
.
data
);
wx
.
setStorageSync
(
'
addressId
'
,
res
.
data
.
id
);
}
catch
(
e
)
{
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment