切换导航条
此项目
正在载入...
登录
anyv
/
xkeasy
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
anyv
6 years ago
提交
14396cd0877e567c57564b01affebc7c4316d17b
1 个父辈
d8ac85f1
1 个管道 的构建
通过
耗费 3 秒
7
变更
5
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
5 个修改的文件
包含
42 行增加
和
19 行删除
app/portal/controller/OrderpageController.php
app/portal/controller/PersonalcenterController.php
public/themes/simpleboot3/portal/orderpage/go_add_address.html
public/themes/simpleboot3/portal/orderpage/order_page.html
simplewind/cmf/controller/WeChatBaseController.php
app/portal/controller/OrderpageController.php
查看文件 @
14396cd
...
...
@@ -20,21 +20,26 @@ class OrderpageController extends WeChatBaseController{
$indet_id
=
$this
->
request
->
param
();
$uid
=
cmf_get_current_user_id
();
$address
=
Db
::
name
(
'address'
)
->
where
(
"uid="
.
$uid
.
" and default_address=1 and delete_time = 0"
)
->
find
();
if
(
empty
(
$address
)){
$this
->
assign
(
'address'
,
4
);
if
(
!
empty
(
$indet_id
[
'address_id'
])){
$address
=
Db
::
name
(
'address'
)
->
where
(
'id'
,
$indet_id
[
'address_id'
])
->
find
();
$this
->
assign
(
'address'
,
$address
);
}
else
{
$address_arr
=
explode
(
','
,
$address
[
'detailed'
]);
$address
[
'detailed'
]
=
$address_arr
[
0
]
.
$address_arr
[
1
];
$indet_data
=
Db
::
name
(
'indent'
)
->
where
(
"id"
,
$indet_id
[
'indet_id'
])
->
find
();
if
(
$indet_data
[
'state'
]
==
4
){
$indet_data_update
[
'id'
]
=
$indet_id
[
'indet_id'
];
$indet_data_update
[
'indent_address'
]
=
$address
[
'id'
];
$indet_data_update
[
'name'
]
=
$address
[
'name'
];
$indet_data_update
[
'phone'
]
=
$address
[
'phone'
];
Db
::
name
(
'indent'
)
->
update
(
$indet_data_update
);
$address
=
Db
::
name
(
'address'
)
->
where
(
"uid="
.
$uid
.
" and default_address=1 and delete_time = 0"
)
->
find
();
if
(
empty
(
$address
)){
$this
->
assign
(
'address'
,
4
);
}
else
{
$address_arr
=
explode
(
','
,
$address
[
'detailed'
]);
$address
[
'detailed'
]
=
$address_arr
[
0
]
.
$address_arr
[
1
];
$indet_data
=
Db
::
name
(
'indent'
)
->
where
(
"id"
,
$indet_id
[
'indet_id'
])
->
find
();
if
(
$indet_data
[
'state'
]
==
4
){
$indet_data_update
[
'id'
]
=
$indet_id
[
'indet_id'
];
$indet_data_update
[
'indent_address'
]
=
$address
[
'id'
];
$indet_data_update
[
'name'
]
=
$address
[
'name'
];
$indet_data_update
[
'phone'
]
=
$address
[
'phone'
];
Db
::
name
(
'indent'
)
->
update
(
$indet_data_update
);
}
$this
->
assign
(
'address'
,
$address
);
}
$this
->
assign
(
'address'
,
$address
);
}
$data
=
Db
::
name
(
'indent_goods'
)
->
where
(
'indent_id'
,
$indet_id
[
'indet_id'
])
->
select
()
->
toArray
();
...
...
@@ -262,6 +267,7 @@ class OrderpageController extends WeChatBaseController{
*/
public
function
go_add_address
(){
$indent_id
=
$this
->
request
->
param
();
$uid
=
cmf_get_current_user_id
();
$data
=
Db
::
name
(
'address'
)
->
where
(
"delete_time = 0 and uid ="
.
$uid
)
->
select
()
->
toArray
();
if
(
!
empty
(
$data
)){
...
...
@@ -270,6 +276,7 @@ class OrderpageController extends WeChatBaseController{
$data
[
$key
][
'detailed'
]
=
$detailed
[
0
]
.
$detailed
[
1
];
}
}
$this
->
assign
(
'indent_id'
,
$indent_id
[
'indent_id'
]);
$this
->
assign
(
'data'
,
$data
);
return
$this
->
fetch
();
...
...
app/portal/controller/PersonalcenterController.php
查看文件 @
14396cd
...
...
@@ -360,6 +360,7 @@ class PersonalcenterController extends WeChatBaseController{
$uid
=
cmf_get_current_user_id
();
$balance
=
Db
::
name
(
'my_user'
)
->
where
(
"uid"
,
$uid
)
->
find
();
$balance
[
'balance'
]
=
$balance
[
'balance'
]
-
$balance
[
'balance'
]
*
0.006
;
$balance
[
'balance'
]
=
sprintf
(
"%.2f"
,
$balance
[
'balance'
]);
$money_income
=
Db
::
name
(
"money_income"
)
->
where
(
'uid'
,
$uid
)
->
select
();
$cumulative_money
=
0
;
foreach
(
$money_income
as
$key
=>
$val
){
...
...
public/themes/simpleboot3/portal/orderpage/go_add_address.html
查看文件 @
14396cd
...
...
@@ -55,7 +55,7 @@
<volist
name=
"data"
id=
"vo"
>
<li>
<div
class=
""
style=
"display: flex;justify-content: flex-start;align-items: center;"
>
<div
style=
"width: 0.4rem;height: 0.4rem;margin-right: 0.25rem;"
class=
"select_img"
>
<div
style=
"width: 0.4rem;height: 0.4rem;margin-right: 0.25rem;"
class=
"select_img"
data-id=
"{$vo.id}"
>
<img
src=
"__TMPL__/public/assets/images/39_0.png"
style=
"width:100%;height: 100%;"
/>
</div>
<div
class=
"contant"
style=
"width: 6rem;"
>
...
...
@@ -82,13 +82,28 @@
</volist>
</ul>
</div>
<div
id=
'btn'
style=
"width: 1.5rem;height: 0.8rem;background:linear-gradient(344deg,rgba(255,78,0,1) 0%,rgba(255,157,45,1) 100%);border-radius: 0.025rem;text-align: center;line-height: 0.8rem;font-size: 0.3rem;color: #fff;margin: 0.5rem 0.5rem 0 auto;"
>
确定
</div>
<div
onclick=
"deter_sub()"
style=
"width: 1.5rem;height: 0.8rem;background:linear-gradient(344deg,rgba(255,78,0,1) 0%,rgba(255,157,45,1) 100%);border-radius: 0.025rem;text-align: center;line-height: 0.8rem;font-size: 0.3rem;color: #fff;margin: 0.5rem 0.5rem 0 auto;"
>
确定
</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/address(1).js"
></script>
<script
src=
"__TMPL__/public/assets/js/jquery.js"
></script>
<script>
/**
*点击确认
*/
function
deter_sub
(){
id
=
$
(
'.haha'
).
attr
(
'data-id'
);
if
(
typeof
(
id
)
==
'undefined'
){
window
.
location
.
href
=
"{:url('Orderpage/order_page',array('indet_id'=>$indent_id))}"
;
}
else
{
window
.
location
.
href
=
"{:url('Orderpage/order_page',array('indet_id'=>$indent_id))}?address_id="
+
id
;
}
}
</script>
<script>
$
(
"#btn"
).
click
(
function
(){
console
.
log
(
"确定成功"
)
})
...
...
public/themes/simpleboot3/portal/orderpage/order_page.html
查看文件 @
14396cd
...
...
@@ -37,7 +37,7 @@
<div
class=
"order_adImg"
>
<img
src=
"__TMPL__/public/assets/images/31.png"
alt=
""
>
</div>
<p
class=
"order_addressGo"
>
暂无默认收货地址,
<a
href=
"{:url('Orderpage/go_add_address')}"
>
去添加
</a></p>
<p
class=
"order_addressGo"
>
暂无默认收货地址,
<a
href=
"{:url('Orderpage/go_add_address'
,array('indent_id'=>$indent_id)
)}"
>
去添加
</a></p>
</div>
<else/>
<div
class=
"order_addressYes"
>
...
...
@@ -52,7 +52,7 @@
<p
class=
"or_address_detailed"
id=
"detailed"
>
{$address.region}{$address.detailed}
</p>
</div>
<div
class=
"or_addressYesImg2"
>
<a
href=
"{:url('
Personalcenter/shop_address'
)}"
>
<a
href=
"{:url('
Orderpage/go_add_address',array('indent_id'=>$indent_id)
)}"
>
<img
src=
"__TMPL__/public/assets/images/29.png"
alt=
""
>
</a>
</div>
...
...
simplewind/cmf/controller/WeChatBaseController.php
查看文件 @
14396cd
...
...
@@ -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'
,
5
)
->
find
();
cmf_update_current_user
(
$user
);
$userId
=
cmf_get_current_user_id
();
if
(
empty
(
$userId
))
{
$config
=
[
...
...
请
注册
或
登录
后发表评论