切换导航条
此项目
正在载入...
登录
anyv
/
xkeasy
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
anyv
6 years ago
提交
73f71153a640d738c5654a5c4026ae9304894f39
1 个父辈
be5d1ca4
1 个管道 的构建
通过
耗费 5 秒
bug 修改
变更
5
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
5 个修改的文件
包含
115 行增加
和
4 行删除
app/portal/controller/OrderpageController.php
app/portal/controller/PersonalcenterController.php
public/themes/simpleboot3/portal/orderpage/go_add_address.html
public/themes/simpleboot3/portal/personalcenter/personal_center.html
simplewind/cmf/controller/WeChatBaseController.php
app/portal/controller/OrderpageController.php
查看文件 @
73f7115
...
...
@@ -251,6 +251,23 @@ class OrderpageController extends WeChatBaseController{
}
/**
* 显示收货地址
*/
public
function
go_add_address
(){
$uid
=
cmf_get_current_user_id
();
$data
=
Db
::
name
(
'address'
)
->
where
(
"delete_time = 0 and uid ="
.
$uid
)
->
select
()
->
toArray
();
if
(
!
empty
(
$data
)){
foreach
(
$data
as
$key
=>
$val
){
$detailed
=
explode
(
','
,
$val
[
'detailed'
]);
$data
[
$key
][
'detailed'
]
=
$detailed
[
0
]
.
$detailed
[
1
];
}
}
$this
->
assign
(
'data'
,
$data
);
return
$this
->
fetch
();
}
...
...
app/portal/controller/PersonalcenterController.php
查看文件 @
73f7115
...
...
@@ -141,7 +141,7 @@ class PersonalcenterController extends WeChatBaseController{
public
function
personal_collect
(){
$uid
=
cmf_get_current_user_id
();
$data
=
Db
::
name
(
'collect'
)
->
where
(
"uid ="
.
$uid
)
->
select
();
$data
=
Db
::
name
(
'collect'
)
->
where
(
"uid ="
.
$uid
)
->
select
()
->
toArray
()
;
$data_count
=
count
(
$data
);
if
(
!
empty
(
$data
)){
foreach
(
$data
as
$key
=>
$val
){
...
...
public/themes/simpleboot3/portal/orderpage/go_add_address.html
0 → 100644
查看文件 @
73f7115
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html;charset=UTF-8"
>
<meta
content=
"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;"
name=
"viewport"
/>
<meta
http-equiv=
"X-UA-Compatible"
content=
"ie=edge"
>
<title>
学考无忧-收获地址
</title>
<link
rel=
"stylesheet"
href=
"__TMPL__/public/assets/css/reset.css"
>
<link
rel=
"stylesheet"
href=
"__TMPL__/public/assets/css/base.css"
>
</head>
<body
style=
"background-color:white;"
>
<div
class=
"address_box"
>
<!-- 顶部 -->
<div
class=
"ad_top"
>
<a
href=
"javascript:history.back(-1)"
>
<img
class=
"ad_topImg"
src=
"__TMPL__/public/assets/images/left.png"
alt=
""
>
</a>
<h1>
收货地址
</h1>
<a
href=
"{:url('Personalcenter/add_shop_address')}"
>
<p>
新增地址
</p>
</a>
</div>
<!-- 内容 -->
<div
class=
"ad_content"
>
<ul
id=
"ad_contentUl"
>
<volist
name=
"data"
id=
"vo"
>
<li
ontouchstart=
"fors()"
>
<div
class=
"ad_conBox"
>
<div
class=
"ad_con1"
>
<p
class=
"ad_conName"
>
{$vo.name}
</p>
<if
condition=
"$vo.default_address eq 1"
>
<p
class=
"ad_conMo"
style=
"display:block;"
>
默认
</p>
<else/>
<p
class=
"ad_conMo"
>
默认
</p>
</if>
<p
class=
"ad_conPhone"
>
{$vo.phone}
</p>
<img
class=
"ad_conImg"
src=
"__TMPL__/public/assets/images/35.png"
ontouchstart=
"address_edit({$vo.id})"
alt=
""
>
</div>
</div>
<p
class=
"ad_conAddress"
>
收货地址:{$vo.region}{$vo.detailed}
</p>
<div
class=
"ad_MoRemove"
>
<div
class=
"ad_mo"
ontouchstart=
"set_default({$vo.id})"
>
设为默认
</div>
<div
class=
"ad_move"
ontouchstart=
"address_del({$vo.id})"
>
删除
</div>
</div>
</li>
</volist>
</ul>
</div>
</div>
<script
src=
"__TMPL__/public/assets/js/base.js"
></script>
<script
src=
"__TMPL__/public/assets/js/address.js"
></script>
<script
src=
"__TMPL__/public/assets/js/jquery.js"
></script>
<script>
function
fors
()
{
console
.
log
(
111
)
}
/**
*点击设置默认
*/
function
set_default
(
id
){
$
.
post
(
"{:url('Personalcenter/set_default_address')}"
,{
id
:
id
},
function
(
data
){
if
(
data
){
}
else
{
alert
(
'设置失败!'
);
}
});
}
/**
* 点击删除地址
*/
function
address_del
(
id
){
$
.
post
(
"{:url('Personalcenter/address_del')}"
,{
id
:
id
},
function
(
data
){
if
(
$data
){
}
else
{
alert
(
'删除失败!'
);
}
});
}
/**
*编辑地址
*/
function
address_edit
(
id
){
window
.
location
.
href
=
"{:url('Personalcenter/address_edit')}?id="
+
id
;
}
</script>
</body>
</html>
\ No newline at end of file
...
...
public/themes/simpleboot3/portal/personalcenter/personal_center.html
查看文件 @
73f7115
...
...
@@ -89,7 +89,7 @@
<!-- 头像 -->
<div
class=
"log_top_buddha"
>
<div
class=
"log_top_buddha_img"
>
<img
src=
"{$weixin.avatar}"
alt=
""
/>
<img
src=
"{$weixin.avatar}"
alt=
""
style=
"border-radius: 50%;"
/>
</div>
<div
class=
"log_top_buddha_contant"
>
<div
class=
"log_top_buddha_contant_one"
>
...
...
simplewind/cmf/controller/WeChatBaseController.php
查看文件 @
73f7115
...
...
@@ -204,8 +204,8 @@ class WeChatBaseController extends BaseController
*/
public
function
checkWeChatUserLogin
()
{
/*$user = Db::name('user')->where('id',2)->find();
cmf_update_current_user($user);*/
$user
=
Db
::
name
(
'user'
)
->
where
(
'id'
,
2
)
->
find
();
cmf_update_current_user
(
$user
);
$userId
=
cmf_get_current_user_id
();
if
(
empty
(
$userId
))
{
$config
=
[
...
...
请
注册
或
登录
后发表评论