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

4

@@ -86,9 +86,14 @@ class SalesmanorderController extends AdminBaseController{ @@ -86,9 +86,14 @@ class SalesmanorderController extends AdminBaseController{
86 $address_region = ''; 86 $address_region = '';
87 } 87 }
88 }else{ 88 }else{
89 - $address_region = $data['region'].$data['school'].$data['grade'];$data['class']; 89 + $address_region = $data['region'].$data['school'].$data['grade'].$data['class'];
90 } 90 }
91 - 91 + //判断订单是统一配送还是快递配送
  92 +// if($data['is_courier'] == 1){
  93 +//
  94 +// }else{
  95 +//
  96 +// }
92 $data_content = Db::name('indent_goods') -> where('indent_id',$id['id']) -> select(); 97 $data_content = Db::name('indent_goods') -> where('indent_id',$id['id']) -> select();
93 $this -> assign('data',$data); 98 $this -> assign('data',$data);
94 $this -> assign('address_region',$address_region); 99 $this -> assign('address_region',$address_region);
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 </ul> 8 </ul>
9 <volist name="data_goods" id="vo"> 9 <volist name="data_goods" id="vo">
10 <div style="margin-top: 10px;"> 10 <div style="margin-top: 10px;">
11 - <img src="{:cmf_get_image_url($vo.thumbnail)}" class="img-rounded"> 11 + <img src="{:cmf_get_image_url($vo.thumbnail)}" class="img-rounded" style="width: 300px;height: 300px;">
12 <h4>书籍:{$vo.book_name}&nbsp;&nbsp;X&nbsp;&nbsp;{$vo.number}本</h4> 12 <h4>书籍:{$vo.book_name}&nbsp;&nbsp;X&nbsp;&nbsp;{$vo.number}本</h4>
13 <h4>定价:{$vo.pricing}</h4> 13 <h4>定价:{$vo.pricing}</h4>
14 <h4>售价:{$vo.price}</h4> 14 <h4>售价:{$vo.price}</h4>
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 </ul> 8 </ul>
9 <volist name="data_content" id="vo"> 9 <volist name="data_content" id="vo">
10 <div style="margin-top: 10px;"> 10 <div style="margin-top: 10px;">
11 - <img src="{:cmf_get_image_url($vo.thumbnail)}" class="img-rounded"> 11 + <img src="{:cmf_get_image_url($vo.thumbnail)}" class="img-rounded" style="width: 300px;height: 300px;">
12 <h4>书籍:{$vo.book_name}&nbsp;&nbsp;X&nbsp;&nbsp;{$vo.number}本</h4> 12 <h4>书籍:{$vo.book_name}&nbsp;&nbsp;X&nbsp;&nbsp;{$vo.number}本</h4>
13 <h4>定价:{$vo.pricing}</h4> 13 <h4>定价:{$vo.pricing}</h4>
14 <h4>售价:{$vo.price}</h4> 14 <h4>售价:{$vo.price}</h4>
@@ -25,6 +25,13 @@ @@ -25,6 +25,13 @@
25 快递配送 25 快递配送
26 </if> 26 </if>
27 </h4> 27 </h4>
  28 + <h4>
  29 + <if condition="$data.is_courier eq 1">
  30 + 预计送达:
  31 + <else/>
  32 + 物流信息:
  33 + </if>
  34 + </h4>
28 <h4>买家留言:{$data.leave_word}</h4> 35 <h4>买家留言:{$data.leave_word}</h4>
29 <h4>收货地址:{$address_region}</h4> 36 <h4>收货地址:{$address_region}</h4>
30 </div> 37 </div>
@@ -220,7 +220,10 @@ @@ -220,7 +220,10 @@
220 <a href="{:url('logistics/index',array('indent_id'=>$data['id']))}"> 220 <a href="{:url('logistics/index',array('indent_id'=>$data['id']))}">
221 <div class="pay_bottom2_1">物流信息</div> 221 <div class="pay_bottom2_1">物流信息</div>
222 </a> 222 </a>
223 - 223 + <else/>
  224 + <a href="{:url('logistics/index',array('indent_id'=>$data['id']))}">
  225 + <div class="pay_bottom2_1">物流信息</div>
  226 + </a>
224 </if> 227 </if>
225 228
226 <elseif condition="$data.state eq 5 || $data.state eq 3 || $data.state eq 2"/> 229 <elseif condition="$data.state eq 5 || $data.state eq 3 || $data.state eq 2"/>
@@ -8,10 +8,75 @@ @@ -8,10 +8,75 @@
8 <title>学考无忧-收货地址</title> 8 <title>学考无忧-收货地址</title>
9 <link rel="stylesheet" href="__TMPL__/public/assets/css/reset.css"> 9 <link rel="stylesheet" href="__TMPL__/public/assets/css/reset.css">
10 <link rel="stylesheet" href="__TMPL__/public/assets/css/base.css"> 10 <link rel="stylesheet" href="__TMPL__/public/assets/css/base.css">
  11 + <link rel="stylesheet" href="__TMPL__/public/assets/css/log.css">
  12 + <style>
  13 + .tx_mask_delete {
  14 + display: none;
  15 + z-index: 2;
  16 + width: 100%;
  17 + height: 100%;
  18 + position: fixed;
  19 + background-color: rgba(0, 0, 0, 0.5);
  20 + }
  21 +
  22 + .delete_school {
  23 + font-size: 0.32rem;
  24 + color: #333;
  25 + text-align: center;
  26 + }
  27 +
  28 + .delete_btn {
  29 + display: flex;
  30 + display: -webkit-flex;
  31 + justify-content: space-around;
  32 + align-items: center;
  33 + }
  34 +
  35 + .tx_maskcancel {
  36 + width: 100%;
  37 + height: 0.8rem;
  38 + background: #f2f2f2;
  39 + border-radius: 0.08rem;
  40 + text-align: center;
  41 + line-height: 0.8rem;
  42 + color: #333;
  43 + font-size: 0.32rem;
  44 + margin-top: 0.4rem;
  45 + margin-right: 0.5rem;
  46 + }
  47 +
  48 + .tx_maskYes {
  49 + width: 100%;
  50 + height: 0.8rem;
  51 + background: linear-gradient(338deg, rgba(255, 78, 0, 1) 0%, rgba(255, 157, 45, 1) 100%);
  52 + border-radius: 0.08rem;
  53 + text-align: center;
  54 + line-height: 0.8rem;
  55 + color: white;
  56 + font-size: 0.32rem;
  57 + margin-top: 0.4rem;
  58 + margin-left: 0.5rem;
  59 + }
  60 + </style>
11 </head> 61 </head>
12 62
13 <body style="background-color:white;"> 63 <body style="background-color:white;">
14 <div class="address_box"> 64 <div class="address_box">
  65 + <!-- 删除弹窗 -->
  66 + <div class="tx_mask_delete" onclick="$(this).hide()">
  67 + <div class="tx_maskCon" onclick="zZFun(this)">
  68 + <div class="tx_maskCon2" style="border-radius: 0.1rem;">
  69 + <div class="delete_school">
  70 + 是否确定删除?
  71 + </div>
  72 +
  73 + <div class="delete_btn">
  74 + <div class="tx_maskcancel">取消</div>
  75 + <div class="tx_maskYes">确定</div>
  76 + </div>
  77 + </div>
  78 + </div>
  79 + </div>
15 <!-- 顶部 --> 80 <!-- 顶部 -->
16 <div class="ad_top"> 81 <div class="ad_top">
17 <a href="javascript:history.back(-1)"> 82 <a href="javascript:history.back(-1)">
@@ -26,7 +91,7 @@ @@ -26,7 +91,7 @@
26 <div class="ad_content"> 91 <div class="ad_content">
27 <ul id="ad_contentUl"> 92 <ul id="ad_contentUl">
28 <volist name="data" id="vo"> 93 <volist name="data" id="vo">
29 - <li ontouchstart="fors()"> 94 + <li ontouchstart="fors()" class="com">
30 <div class="ad_conBox"> 95 <div class="ad_conBox">
31 <div class="ad_con1"> 96 <div class="ad_con1">
32 <p class="ad_conName">{$vo.name}</p> 97 <p class="ad_conName">{$vo.name}</p>
@@ -47,7 +112,8 @@ @@ -47,7 +112,8 @@
47 112
48 <div class="ad_MoRemove"> 113 <div class="ad_MoRemove">
49 <div class="ad_mo" ontouchstart="set_default({$vo.id})">设为默认</div> 114 <div class="ad_mo" ontouchstart="set_default({$vo.id})">设为默认</div>
50 - <div class="ad_move" ontouchstart="address_del({$vo.id})">删除</div> 115 + <!--<div class="ad_move" ontouchstart="address_del({$vo.id})">删除</div>-->
  116 + <div class="ad_move" ontouchstart="fun(this)" data-id="{$vo.id}">删除</div>
51 </div> 117 </div>
52 </li> 118 </li>
53 </volist> 119 </volist>
@@ -58,6 +124,7 @@ @@ -58,6 +124,7 @@
58 <script src="__TMPL__/public/assets/js/address.js"></script> 124 <script src="__TMPL__/public/assets/js/address.js"></script>
59 <script src="__TMPL__/public/assets/js/jquery.js"></script> 125 <script src="__TMPL__/public/assets/js/jquery.js"></script>
60 <script> 126 <script>
  127 +
61 function fors() { 128 function fors() {
62 console.log(111) 129 console.log(111)
63 } 130 }
@@ -77,14 +144,51 @@ @@ -77,14 +144,51 @@
77 /** 144 /**
78 * 点击删除地址 145 * 点击删除地址
79 */ 146 */
  147 + var id;
80 function address_del(id){ 148 function address_del(id){
81 $.post("{:url('Personalcenter/address_del')}",{id:id},function(data){ 149 $.post("{:url('Personalcenter/address_del')}",{id:id},function(data){
82 - if($data){ 150 + if(data){
83 }else{ 151 }else{
84 alert('删除失败!'); 152 alert('删除失败!');
85 } 153 }
86 }); 154 });
87 } 155 }
  156 + //删除
  157 + let index = ''
  158 +
  159 + function fun(e){
  160 + console.log(e)
  161 + id=$(e).attr("data-id");
  162 + console.log(id)
  163 + index = $(e).parents(".com").index();
  164 + console.log(index)
  165 + $(".tx_mask_delete").css({
  166 + display: "block"
  167 + });
  168 + };
  169 + $(".tx_maskYes").click(function() {
  170 + console.log(index)
  171 + var len = $(".com");
  172 + console.log(len)
  173 + for(var i = 0; i < len.length; i++) {
  174 + if(i == index) {
  175 + $(len[i]).remove()
  176 + };
  177 + $(".tx_mask_delete").css({
  178 + display: "none"
  179 + });
  180 + }
  181 +
  182 + address_del(id)
  183 + })
  184 + $(".tx_maskcancel").click(function() {
  185 + $(".tx_mask_delete").css({
  186 + display: "none"
  187 + });
  188 + })
  189 + function zZFun(e) {
  190 + window.event ? (window.event.cancelBubble = true) : e.stopPropagation();
  191 + }
88 192
89 /** 193 /**
90 *编辑地址 194 *编辑地址
@@ -157,7 +157,7 @@ body { @@ -157,7 +157,7 @@ body {
157 .in_campusTitle2 { 157 .in_campusTitle2 {
158 color: #333333; 158 color: #333333;
159 font-weight: bold; 159 font-weight: bold;
160 - font-size: 0.38rem; 160 + font-size: 0.4rem;
161 margin-left: 0.16rem; 161 margin-left: 0.16rem;
162 cursor: pointer; 162 cursor: pointer;
163 } 163 }
@@ -40,22 +40,22 @@ document.addEventListener('DOMContentLoaded', function(ev) { @@ -40,22 +40,22 @@ document.addEventListener('DOMContentLoaded', function(ev) {
40 aLi[this.index].addEventListener('touchend', fnEnd, false); 40 aLi[this.index].addEventListener('touchend', fnEnd, false);
41 }, false) 41 }, false)
42 // 删除按钮 42 // 删除按钮
43 - aDel[i].index = i;  
44 - aDel[i].addEventListener('touchstart', function(ev) {  
45 - ev.preventDefault();  
46 - this.innerHTML = '';  
47 - this.style.height = '0';  
48 - this.style.display = 'none';  
49 - aLi[this.index].style.height = '0';  
50 - aLi[this.index].style.display = 'none';  
51 - aDiv[this.index].style.height = '0';  
52 - aDiv[this.index].style.display = 'none';  
53 - aDiv[this.index].innerHTML = '';  
54 - this.addEventListener('transitionend', function(ev) {  
55 - ev.preventDefault();  
56 - oUl.removeChild(aLi[this.index]);  
57 - }, false)  
58 - }, false); 43 + // aDel[i].index = i;
  44 + // aDel[i].addEventListener('touchstart', function(ev) {
  45 + // ev.preventDefault();
  46 + // this.innerHTML = '';
  47 + // this.style.height = '0';
  48 + // this.style.display = 'none';
  49 + // aLi[this.index].style.height = '0';
  50 + // aLi[this.index].style.display = 'none';
  51 + // aDiv[this.index].style.height = '0';
  52 + // aDiv[this.index].style.display = 'none';
  53 + // aDiv[this.index].innerHTML = '';
  54 + // this.addEventListener('transitionend', function(ev) {
  55 + // ev.preventDefault();
  56 + // oUl.removeChild(aLi[this.index]);
  57 + // }, false)
  58 + // }, false);
59 aMo[i].index = i; 59 aMo[i].index = i;
60 aMo[i].addEventListener('touchstart', function(ev) { 60 aMo[i].addEventListener('touchstart', function(ev) {
61 ev.preventDefault(); 61 ev.preventDefault();
@@ -204,7 +204,7 @@ class WeChatBaseController extends BaseController @@ -204,7 +204,7 @@ class WeChatBaseController extends BaseController
204 */ 204 */
205 public function checkWeChatUserLogin() 205 public function checkWeChatUserLogin()
206 { 206 {
207 - /*$user = Db::name('user')->where('id',28)->find(); 207 + /*$user = Db::name('user')->where('id',27)->find();
208 cmf_update_current_user($user);*/ 208 cmf_update_current_user($user);*/
209 $userId = cmf_get_current_user_id(); 209 $userId = cmf_get_current_user_id();
210 if (empty($userId)) { 210 if (empty($userId)) {