作者 anyv
1 个管道 的构建 通过 耗费 4 秒

4

... ... @@ -86,9 +86,14 @@ class SalesmanorderController extends AdminBaseController{
$address_region = '';
}
}else{
$address_region = $data['region'].$data['school'].$data['grade'];$data['class'];
$address_region = $data['region'].$data['school'].$data['grade'].$data['class'];
}
//判断订单是统一配送还是快递配送
// if($data['is_courier'] == 1){
//
// }else{
//
// }
$data_content = Db::name('indent_goods') -> where('indent_id',$id['id']) -> select();
$this -> assign('data',$data);
$this -> assign('address_region',$address_region);
... ...
... ... @@ -8,7 +8,7 @@
</ul>
<volist name="data_goods" id="vo">
<div style="margin-top: 10px;">
<img src="{:cmf_get_image_url($vo.thumbnail)}" class="img-rounded">
<img src="{:cmf_get_image_url($vo.thumbnail)}" class="img-rounded" style="width: 300px;height: 300px;">
<h4>书籍:{$vo.book_name}&nbsp;&nbsp;X&nbsp;&nbsp;{$vo.number}本</h4>
<h4>定价:{$vo.pricing}</h4>
<h4>售价:{$vo.price}</h4>
... ...
... ... @@ -8,7 +8,7 @@
</ul>
<volist name="data_content" id="vo">
<div style="margin-top: 10px;">
<img src="{:cmf_get_image_url($vo.thumbnail)}" class="img-rounded">
<img src="{:cmf_get_image_url($vo.thumbnail)}" class="img-rounded" style="width: 300px;height: 300px;">
<h4>书籍:{$vo.book_name}&nbsp;&nbsp;X&nbsp;&nbsp;{$vo.number}本</h4>
<h4>定价:{$vo.pricing}</h4>
<h4>售价:{$vo.price}</h4>
... ... @@ -25,6 +25,13 @@
快递配送
</if>
</h4>
<h4>
<if condition="$data.is_courier eq 1">
预计送达:
<else/>
物流信息:
</if>
</h4>
<h4>买家留言:{$data.leave_word}</h4>
<h4>收货地址:{$address_region}</h4>
</div>
... ...
... ... @@ -220,7 +220,10 @@
<a href="{:url('logistics/index',array('indent_id'=>$data['id']))}">
<div class="pay_bottom2_1">物流信息</div>
</a>
<else/>
<a href="{:url('logistics/index',array('indent_id'=>$data['id']))}">
<div class="pay_bottom2_1">物流信息</div>
</a>
</if>
<elseif condition="$data.state eq 5 || $data.state eq 3 || $data.state eq 2"/>
... ...
... ... @@ -8,10 +8,75 @@
<title>学考无忧-收货地址</title>
<link rel="stylesheet" href="__TMPL__/public/assets/css/reset.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/base.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/log.css">
<style>
.tx_mask_delete {
display: none;
z-index: 2;
width: 100%;
height: 100%;
position: fixed;
background-color: rgba(0, 0, 0, 0.5);
}
.delete_school {
font-size: 0.32rem;
color: #333;
text-align: center;
}
.delete_btn {
display: flex;
display: -webkit-flex;
justify-content: space-around;
align-items: center;
}
.tx_maskcancel {
width: 100%;
height: 0.8rem;
background: #f2f2f2;
border-radius: 0.08rem;
text-align: center;
line-height: 0.8rem;
color: #333;
font-size: 0.32rem;
margin-top: 0.4rem;
margin-right: 0.5rem;
}
.tx_maskYes {
width: 100%;
height: 0.8rem;
background: linear-gradient(338deg, rgba(255, 78, 0, 1) 0%, rgba(255, 157, 45, 1) 100%);
border-radius: 0.08rem;
text-align: center;
line-height: 0.8rem;
color: white;
font-size: 0.32rem;
margin-top: 0.4rem;
margin-left: 0.5rem;
}
</style>
</head>
<body style="background-color:white;">
<div class="address_box">
<!-- 删除弹窗 -->
<div class="tx_mask_delete" onclick="$(this).hide()">
<div class="tx_maskCon" onclick="zZFun(this)">
<div class="tx_maskCon2" style="border-radius: 0.1rem;">
<div class="delete_school">
是否确定删除?
</div>
<div class="delete_btn">
<div class="tx_maskcancel">取消</div>
<div class="tx_maskYes">确定</div>
</div>
</div>
</div>
</div>
<!-- 顶部 -->
<div class="ad_top">
<a href="javascript:history.back(-1)">
... ... @@ -26,7 +91,7 @@
<div class="ad_content">
<ul id="ad_contentUl">
<volist name="data" id="vo">
<li ontouchstart="fors()">
<li ontouchstart="fors()" class="com">
<div class="ad_conBox">
<div class="ad_con1">
<p class="ad_conName">{$vo.name}</p>
... ... @@ -47,7 +112,8 @@
<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 class="ad_move" ontouchstart="address_del({$vo.id})">删除</div>-->
<div class="ad_move" ontouchstart="fun(this)" data-id="{$vo.id}">删除</div>
</div>
</li>
</volist>
... ... @@ -58,6 +124,7 @@
<script src="__TMPL__/public/assets/js/address.js"></script>
<script src="__TMPL__/public/assets/js/jquery.js"></script>
<script>
function fors() {
console.log(111)
}
... ... @@ -77,14 +144,51 @@
/**
* 点击删除地址
*/
var id;
function address_del(id){
$.post("{:url('Personalcenter/address_del')}",{id:id},function(data){
if($data){
if(data){
}else{
alert('删除失败!');
}
});
}
//删除
let index = ''
function fun(e){
console.log(e)
id=$(e).attr("data-id");
console.log(id)
index = $(e).parents(".com").index();
console.log(index)
$(".tx_mask_delete").css({
display: "block"
});
};
$(".tx_maskYes").click(function() {
console.log(index)
var len = $(".com");
console.log(len)
for(var i = 0; i < len.length; i++) {
if(i == index) {
$(len[i]).remove()
};
$(".tx_mask_delete").css({
display: "none"
});
}
address_del(id)
})
$(".tx_maskcancel").click(function() {
$(".tx_mask_delete").css({
display: "none"
});
})
function zZFun(e) {
window.event ? (window.event.cancelBubble = true) : e.stopPropagation();
}
/**
*编辑地址
... ...
... ... @@ -157,7 +157,7 @@ body {
.in_campusTitle2 {
color: #333333;
font-weight: bold;
font-size: 0.38rem;
font-size: 0.4rem;
margin-left: 0.16rem;
cursor: pointer;
}
... ...
... ... @@ -40,22 +40,22 @@ document.addEventListener('DOMContentLoaded', function(ev) {
aLi[this.index].addEventListener('touchend', fnEnd, false);
}, false)
// 删除按钮
aDel[i].index = i;
aDel[i].addEventListener('touchstart', function(ev) {
ev.preventDefault();
this.innerHTML = '';
this.style.height = '0';
this.style.display = 'none';
aLi[this.index].style.height = '0';
aLi[this.index].style.display = 'none';
aDiv[this.index].style.height = '0';
aDiv[this.index].style.display = 'none';
aDiv[this.index].innerHTML = '';
this.addEventListener('transitionend', function(ev) {
ev.preventDefault();
oUl.removeChild(aLi[this.index]);
}, false)
}, false);
// aDel[i].index = i;
// aDel[i].addEventListener('touchstart', function(ev) {
// ev.preventDefault();
// this.innerHTML = '';
// this.style.height = '0';
// this.style.display = 'none';
// aLi[this.index].style.height = '0';
// aLi[this.index].style.display = 'none';
// aDiv[this.index].style.height = '0';
// aDiv[this.index].style.display = 'none';
// aDiv[this.index].innerHTML = '';
// this.addEventListener('transitionend', function(ev) {
// ev.preventDefault();
// oUl.removeChild(aLi[this.index]);
// }, false)
// }, false);
aMo[i].index = i;
aMo[i].addEventListener('touchstart', function(ev) {
ev.preventDefault();
... ...
... ... @@ -204,7 +204,7 @@ class WeChatBaseController extends BaseController
*/
public function checkWeChatUserLogin()
{
/*$user = Db::name('user')->where('id',28)->find();
/*$user = Db::name('user')->where('id',27)->find();
cmf_update_current_user($user);*/
$userId = cmf_get_current_user_id();
if (empty($userId)) {
... ...