Helius
2020-12-23 c554c7ad5405bafa149dbb6429e8245f78b33ffc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
 
 
 
<!doctype html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  
  <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
  <title th:text="${session.userInfo.shopName }"></title>
 
  <!-- Set render engine for 360 browser -->
  <meta name="renderer" content="webkit">
 
  <!-- No Baidu Siteapp-->
  <meta http-equiv="Cache-Control" content="no-siteapp"/>
 
  
 
  <!-- Add to homescreen for Chrome on Android -->
  <meta name="mobile-web-app-capable" content="yes">
 
 
  <!-- Add to homescreen for Safari on iOS -->
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
 
 
  <!-- Tile icon for Win8 (144x144 + tile color) -->
  
  <meta name="msapplication-TileColor" content="#0e90d2">
  <script type="text/javascript"th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
  <script type="text/javascript"th:src="@{/js/systools/DDMBase.js}"></script>
  <link rel="stylesheet" th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
  <link rel="stylesheet" th:href="@{/plugin/amazingUI/css/app.css}">
  <link rel="stylesheet" type="text/css" th:href="@{/css/dingOrderMsg3.css}">
  
</head>
<body>
<!-- 套餐详情页面 -->
  <!-- 头部开始 -->
    <header data-am-widget="header"
          class="am-header color-w back-m1">
      <div class="am-header-left am-header-nav">
          <a th:href="@{/admin/redirect/hive/mobile/order-list?flag=套餐}" class="">
                <i class="am-header-icon am-icon-chevron-left"></i>
          </a>
      </div>
      <h1 class="am-header-title">
          <a href="#title-link" class="">
            套餐详情
          </a>
      </h1>
  </header>
  <!-- 头部结束 -->
  <form class="am-form am-form-horizontal" action="" id="dataform" onsubmit="javascripr:return false;">
  <div class=" main1 all" >
      <div data-am-widget="list_news" class="am-list-news am-list-news-default" >
  
         <div class="goods-img"><img src="" id="shopImg"  ></div>
          <div class="am-list-news-bd">
              <ul class="am-list">
 
                  <li class="am-g am-list-item-dated">
                      <a href="##" class="am-list-item-hd ">&nbsp;套餐名称</a>
                      <span class="am-list-date color-black" id="taocanName"></span>
                  </li>
                  
                  <li class="am-g am-list-item-dated">
                          <a href="##" class="am-list-item-hd ">&nbsp;套餐价格</a>
                          <span class="am-list-date color-r" id="sale"></span>
                  </li>
                  
                  <li class="am-g am-list-item-dated">
                          <a href="##" class="am-list-item-hd ">&nbsp;销量</a>
                          <span class="am-list-date  color-r" id="sealCount"></span>
                  </li>
                  
                  
                   <li class="am-g am-list-item-dated">
                          <a  class="am-list-item-hd ">&nbsp;有效期限</a>
                          <span class="am-list-date" id="validity"></span>
                  </li>
                   <li class="am-g am-list-item-dated"></li>
              </ul>
          </div>
  
  
      <!-- 数量选择 -->
      <div class="am-input-group am-form-group  am-input-group-primary">
        <span class="am-input-group-label num">套餐数量</span>
        <a onclick="num(1)" class="am-input-group-label">
            <i class="am-header-icon am-icon-minus"></i>
        </a>
        <input autocomplete="off"   type="tel" id="num"class="am-form-field " readonly="readonly" value="1" name="count">
        <a onclick="num(2)" class=" am-input-group-label">
              <i class="am-header-icon am-icon-plus"></i>
        </a>
      </div>
      <!-- 项目详情 -->
      <div class="am-panel am-panel-secondary" id="vipLevel">
        <div class="am-panel-hd">
          <h2 class="am-panel-title" >项目详情</h2>
          <span  class="down down1" ></span>
        </div>
        <div class="vipMsg">
          <ul class="am-list am-list-static am-list-border" id="projDetails">            
          </ul>
        </div>
      </div>
      <!-- 项目详情结束 -->
      <!-- 商品详情开始 -->
      <div class="am-panel am-panel-secondary" id="vipLevel2">
          <div class="am-panel-hd">
            <h2 class="am-panel-title" >商品详情</h2>
            <span  class="down down2" ></span>
          </div>
          <div class="vipMsg2">
            <ul class="am-list am-list-static am-list-border" id="goodsDetails">            
            </ul>
            
          </div>
      </div>
      <!-- 商品详情结束 -->
      
      <ul class="am-list">
      <li class="am-g ">
                        <div class="am-u-sm-4 guige">
                            <span  class="am-list-item-hd color-gray">&nbsp;详细描述</span> 
                        </div>
                        <div class=" am-u-sm-7 guige " >
                              <p id="description" class="color-gray"></p>
                        </div> 
                        
                </li>
    </ul>
                
                
      
      <!-- 测试 -->
       <!-- 增加隐藏域 -->
      <input autocomplete="off"   type="hidden" name="goodsId" id="goodsId">
      <input autocomplete="off"   type="hidden" name="type" value="套餐" id="type">
      <input autocomplete="off"   type="hidden"  id="hidval" value="0">
      <input autocomplete="off"   type="hidden"  id="hidval2" value="0">
  </div>
  </div>
  <div class="inputBtn am-g">
                <div class="am-u-sm-4" id="isPresent" style="display:none">
                    <button class="am-btn btn-m1 am-radius am-btn-block"
                        type="button" onclick="mysubmit('是')">赠送</button>
 
                </div>
 
                <div class="am-u-sm-4 ">
                    <button class="am-btn btn-m1  am-btn-block"
                        type="button" onclick="mysubmit('否')">加入购物车</button>
                </div>
 
</div>
</form>
  <!-- 客户到访表单结束 -->
  
  
 
 
<script th:src="@{/plugin/amazingUI/js/handlebars.min.js}"></script>
<script th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
<!-- index js -->  
<script type="text/javascript">
 
    // 数量增加减少js
      function num(obj){
        if(obj==1){
          if($("#num").val()>1){
            $("#num").val($("#num").val()-1);
          }
          
        }
        if(obj==2){
          if($("#num").val()>=0){
            $("#num").val(parseInt($("#num").val())+1);
          }
        }
      }
      // 商品项目详情js
      $(function () {
               $("#vipLevel").bind("click", function () {
                   if ($("#hidval").val() == 1) {
                       $(".down1").css("transform","rotate(0deg)");
                       $(".vipMsg").slideUp(500,function(){
                           $("#hidval").val(0);
                           
                       })
                   } else {
                       $(".down1").css("transform","rotate(180deg)");
                       $(".vipMsg").slideDown(500,function(){
                       $("#hidval").val(1);                          
                       })
                   }
               })
           });
          $(function () {
               $("#vipLevel2").bind("click", function () {
                   if ($("#hidval2").val() == 1) {
                   $(".down2").css("transform","rotate(0deg)");
                   $(".vipMsg2").slideUp(500,function(){
                           $("#hidval2").val(0);
                           
                       })
                   } else {
                   $(".down2").css("transform","rotate(180deg)");
                   $(".vipMsg2").slideDown(500,function(){
                           $("#hidval2").val(1);
                           
                       })
                   }
               });
             
           });
 
   
  
    //套餐详情页面
      $(function(){
         var ding_order_id=$.query.get('ding_order_id');
           $.AjaxProxy({
             p : {
                 id:ding_order_id
             },
             a : true,
             c : true,
         }).invoke( basePath+"/admin/shoppinggoods/findShoppingGoods", function(loj) {
             
            //销售套餐的基本信息
             $("#taocanName").html(loj.getString(0,"name")==''?'&nbsp;&nbsp;':loj.getString(0,"name"));
             $("#sale").html('¥'+(loj.getString(0,"sealPice")==''?'&nbsp;&nbsp;':loj.getString(0,"sealPice")));
             $("#sealCount").html(loj.getString(0,"sealCount")==''?'&nbsp;&nbsp;':loj.getString(0,"sealCount"));
             $("#validity").html(loj.getString(0,"validity")==''?'&nbsp;&nbsp;':loj.getString(0,"validity")+" 月"); 
             $("#goodsId").val(loj.getString(0,"id"));
             $("#shopImg").attr("src",loj.getString(0, "img"));
            $("#description").html(loj.getString(0, "description"));
            var isPresent=loj.getString(0, "isPresent");
            if(isPresent=='是'){
                $("#isPresent").show();
            }
 
         });
      })
     //赠送和加入购物车
      function mysubmit(isFree){
         var myForm=MForm.initForm({
                invokeUrl: basePath+"/admin/shoppingCar/addItemToCar",
                isvalid:false,
                extendParam:{isFree:isFree},
                afterSubmit:function(loj){
                    var msg='';
                    if(loj.attr("result").status=='200'){
                        msg='操作成功';
                        layer
                          .open({
                            shade:false,
                            content :msg,
                            className : 'showBox',
                            time : 1,
                            end: function(elem){
                                MTools.redirect( basePath+"/admin/redirect/hive/mobile/order-list?flag=套餐");
                            } 
                            });
                    }
                    else{
                        msg='操作失败';
                        layer
                          .open({
                            shade:false,
                            content :msg,
                            className : 'showBox',
                            time : 2
                            });
                    }
                }
            }); 
         myForm.submit();
     }
</script>
</body>
</html>