切换导航条
此项目
正在载入...
登录
anyv
/
xkeasy
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
anyv
6 years ago
提交
4c1adc6171c178330a29b764baa70847ac996810
1 个父辈
8e8c8538
1 个管道 的构建
通过
耗费 1 秒
58
变更
2
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
20 行增加
和
9 行删除
app/portal/controller/PersonalcenterController.php
public/themes/simpleboot3/portal/personalcenter/address_edit.html
app/portal/controller/PersonalcenterController.php
查看文件 @
4c1adc6
...
...
@@ -209,13 +209,22 @@ class PersonalcenterController extends WeChatBaseController{
*/
public
function
address_edit
(){
$id
=
$this
->
request
->
param
();
$data
=
Db
::
name
(
'address'
)
->
where
(
'id'
,
$id
[
'id'
])
->
find
();
$detailed
=
explode
(
','
,
$data
[
'detailed'
]);
$data
[
'detailed0'
]
=
$detailed
[
0
];
$data
[
'detailed1'
]
=
$detailed
[
1
];
$this
->
assign
(
'data'
,
$data
);
return
$this
->
fetch
();
if
(
$this
->
request
->
isPost
()){
$data_update
=
Db
::
name
(
'address'
)
->
update
(
$_POST
);
if
(
$data_update
){
return
true
;
}
else
{
return
false
;
}
}
else
{
$id
=
$this
->
request
->
param
();
$data
=
Db
::
name
(
'address'
)
->
where
(
'id'
,
$id
[
'id'
])
->
find
();
$detailed
=
explode
(
','
,
$data
[
'detailed'
]);
$data
[
'detailed0'
]
=
$detailed
[
0
];
$data
[
'detailed1'
]
=
$detailed
[
1
];
$this
->
assign
(
'data'
,
$data
);
return
$this
->
fetch
();
}
}
...
...
public/themes/simpleboot3/portal/personalcenter/address_edit.html
查看文件 @
4c1adc6
...
...
@@ -44,6 +44,7 @@
<div
class=
"add_city"
id=
"city_text"
type=
"text"
placeholder=
""
>
{$data.region}
</div>
<img
src=
"__TMPL__/public/assets/images/29.png"
alt=
""
>
</li>
<input
type=
"hidden"
name=
"id"
value=
"{$data.id}"
id=
"id"
>
<li>
<label
for=
""
>
详细地址
</label>
<input
type=
"text"
placeholder=
"街道、小区、门牌号码"
id=
"address_content"
value=
"{$data.detailed0}"
>
...
...
@@ -73,13 +74,14 @@
}
else
if
(
$
(
'#address_content'
).
val
()
==
''
){
alert
(
'详细地址不能为空'
);
}
else
{
id
=
$
(
'#id'
).
val
();
name
=
$
(
'#name'
).
val
();
phone
=
$
(
'#phone'
).
val
();
region
=
$
(
'#city_text'
).
text
();
address_content
=
$
(
'#address_content'
).
val
();
address_content_con
=
$
(
'#address_content_con'
).
val
();
detailed
=
address_content
+
address_content_con
;
$
.
post
(
"{:url('Personalcenter/add_shop_address')}"
,{
name
:
name
,
phone
:
phone
,
region
:
region
,
detailed
:
detailed
},
function
(
data
){
detailed
=
address_content
+
','
+
address_content_con
;
$
.
post
(
"{:url('Personalcenter/address_edit')}"
,{
id
:
id
,
name
:
name
,
phone
:
phone
,
region
:
region
,
detailed
:
detailed
},
function
(
data
){
if
(
data
){
window
.
location
.
href
=
"{:url('Personalcenter/shop_address')}"
;
}
else
{
...
...
请
注册
或
登录
后发表评论