From eb786afadc30fbbc006416d55ae95b2c92155891 Mon Sep 17 00:00:00 2001
From: anyv <anyu@bronet.cn>
Date: Thu, 4 Jul 2019 20:49:40 +0800
Subject: [PATCH] 4

---
 app/admin/controller/SalesmanorderController.php                         |   9 +++++++--
 public/themes/admin_simpleboot3/admin/platformorders/plat_view.html      |   2 +-
 public/themes/admin_simpleboot3/admin/salesmanorder/sale_order_show.html |   9 ++++++++-
 public/themes/simpleboot3/portal/order/get_one.html                      |   5 ++++-
 public/themes/simpleboot3/portal/personalcenter/shop_address.html        | 110 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
 public/themes/simpleboot3/public/assets/css/base.css                     |   2 +-
 public/themes/simpleboot3/public/assets/js/address.js                    |  32 ++++++++++++++++----------------
 simplewind/cmf/controller/WeChatBaseController.php                       |   2 +-
 8 files changed, 145 insertions(+), 26 deletions(-)

diff --git a/app/admin/controller/SalesmanorderController.php b/app/admin/controller/SalesmanorderController.php
index 432a70f..8361430 100644
--- a/app/admin/controller/SalesmanorderController.php
+++ b/app/admin/controller/SalesmanorderController.php
@@ -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);
diff --git a/public/themes/admin_simpleboot3/admin/platformorders/plat_view.html b/public/themes/admin_simpleboot3/admin/platformorders/plat_view.html
index 2d448ba..cd9a409 100755
--- a/public/themes/admin_simpleboot3/admin/platformorders/plat_view.html
+++ b/public/themes/admin_simpleboot3/admin/platformorders/plat_view.html
@@ -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>
diff --git a/public/themes/admin_simpleboot3/admin/salesmanorder/sale_order_show.html b/public/themes/admin_simpleboot3/admin/salesmanorder/sale_order_show.html
index 1d9c790..968bf45 100755
--- a/public/themes/admin_simpleboot3/admin/salesmanorder/sale_order_show.html
+++ b/public/themes/admin_simpleboot3/admin/salesmanorder/sale_order_show.html
@@ -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>
diff --git a/public/themes/simpleboot3/portal/order/get_one.html b/public/themes/simpleboot3/portal/order/get_one.html
index 7fa8650..5290ede 100755
--- a/public/themes/simpleboot3/portal/order/get_one.html
+++ b/public/themes/simpleboot3/portal/order/get_one.html
@@ -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"/>
diff --git a/public/themes/simpleboot3/portal/personalcenter/shop_address.html b/public/themes/simpleboot3/portal/personalcenter/shop_address.html
index 1c0c326..7c70553 100755
--- a/public/themes/simpleboot3/portal/personalcenter/shop_address.html
+++ b/public/themes/simpleboot3/portal/personalcenter/shop_address.html
@@ -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();
+    }
 
     /**
      *编辑地址
diff --git a/public/themes/simpleboot3/public/assets/css/base.css b/public/themes/simpleboot3/public/assets/css/base.css
index 08e3fbc..e608c68 100755
--- a/public/themes/simpleboot3/public/assets/css/base.css
+++ b/public/themes/simpleboot3/public/assets/css/base.css
@@ -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;
 }
diff --git a/public/themes/simpleboot3/public/assets/js/address.js b/public/themes/simpleboot3/public/assets/js/address.js
index 7bae6f3..5bbce19 100755
--- a/public/themes/simpleboot3/public/assets/js/address.js
+++ b/public/themes/simpleboot3/public/assets/js/address.js
@@ -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();
diff --git a/simplewind/cmf/controller/WeChatBaseController.php b/simplewind/cmf/controller/WeChatBaseController.php
index 447cf3a..fd14663 100644
--- a/simplewind/cmf/controller/WeChatBaseController.php
+++ b/simplewind/cmf/controller/WeChatBaseController.php
@@ -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)) {
--
libgit2 0.24.0