切换导航条
此项目
正在载入...
登录
何书鹏
/
silk
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
何书鹏
4 years ago
提交
1131b83536ca0ded74c777470d073649496bf6c4
1 个父辈
0e82de6f
1 个管道 的构建
通过
耗费 1 秒
测试
变更
2
构建
2
显示空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
2 行增加
和
2 行删除
application/api/controller/User.php
application/common/model/UserSize.php
application/api/controller/User.php
查看文件 @
1131b83
...
...
@@ -516,7 +516,7 @@ class User extends Api
{
$post
=
$this
->
request
->
post
();
$model
=
UserSize
::
detail
(
$this
->
user
[
'id'
],
$post
[
'user_size_id'
]);
$this
->
success
(
$model
->
edit
(
$post
));
$this
->
success
(
json_encode
(
$model
->
edit
(
$post
)
));
if
(
empty
(
$model
)){
$this
->
error
(
__
(
'尺寸信息不存在'
));
}
...
...
application/common/model/UserSize.php
查看文件 @
1131b83
...
...
@@ -79,13 +79,13 @@ class UserSize extends Model
empty
(
$data
[
'isdefault'
])
&&
$data
[
'isdefault'
]
=
'0'
;
// 该地址设为默认,其他地址就设为非默认
if
(
$data
[
'isdefault'
]
==
'1'
){
return
1
;
$this
->
where
(
'user_id'
,
$this
[
'user_id'
])
->
update
([
'isdefault'
=>
'0'
]);
}
// 对象转json字符串
if
(
!
empty
(
$data
[
'body_info'
])
&&
is_array
(
$data
[
'body_info'
])){
$data
[
'body_info'
]
=
json_encode
(
$data
[
'body_info'
]);
}
return
$data
;
return
$this
->
allowField
(
true
)
->
save
(
$data
);
}
...
...
请
注册
或
登录
后发表评论