Your Name 1 тиждень тому
джерело
коміт
5084fa503a

+ 3
- 1
app/api/controller/ShopContent.php Переглянути файл

91
         }
91
         }
92
     }
92
     }
93
 
93
 
94
+
94
     /*
95
     /*
95
      * 验证秘钥
96
      * 验证秘钥
96
      *
97
      *
107
         if($data['status'] == 100){
108
         if($data['status'] == 100){
108
             //通过
109
             //通过
109
             $respon = [
110
             $respon = [
110
-                    'is_gi' => $data['is_gi']  //是否到期  0未到期 或者 1 是到期(但评论数量存在>10条)
111
+                    'is_gi' => $data['is_gi'], //是否到期  0未到期 或者 1 是到期(但评论数量存在>10条)
112
+                    'count' => $data['count']
111
                 ];
113
                 ];
112
             return JsonServer::success($data['msg'], $respon);
114
             return JsonServer::success($data['msg'], $respon);
113
         }else{
115
         }else{

+ 1
- 0
app/api/logic/ShopContentLogic.php Переглянути файл

33
 
33
 
34
 class ShopContentLogic extends Logic
34
 class ShopContentLogic extends Logic
35
 {
35
 {
36
+
36
     /*
37
     /*
37
      * 获取机器秘钥
38
      * 获取机器秘钥
38
      */
39
      */

+ 8
- 2
app/shop/logic/order/OrderRenewLogic.php Переглянути файл

345
         $where[] = ['shop_id', '=', $get['shop_id']];
345
         $where[] = ['shop_id', '=', $get['shop_id']];
346
         $type_id = $get['type_id'] ?? 1;
346
         $type_id = $get['type_id'] ?? 1;
347
         if ($type_id == 1) {
347
         if ($type_id == 1) {
348
-            $where[] = ['source_type', '>=', 100];
349
-            $where[] = ['source_type', '<', 200];
348
+            //搜索
349
+            $source_type = $get['source_type'] ?? 0;
350
+            if($source_type != 0){
351
+                $where[] = ['source_type', '=', $source_type];
352
+            }else{
353
+                $where[] = ['source_type', '>=', 100];
354
+                $where[] = ['source_type', '<', 200];
355
+            }
350
         } else {
356
         } else {
351
             $where[] = ['source_type', '>=', 200];
357
             $where[] = ['source_type', '>=', 200];
352
             $where[] = ['source_type', '<', 300];
358
             $where[] = ['source_type', '<', 300];

+ 7
- 3
app/shop/view/content/closure/edit/04.html Переглянути файл

14
14
15
         </span>
15
         </span>
16
 
16
 
17
+        <?php
18
+        //var_dump($extend['c1_1']);
19
+        ?>
20
+
17
         <span class="ks">
21
         <span class="ks">
18
-        评论数:<input type="text" name="c1_1[]" id="" autocomplete="off" class="layui-input w100" value="{if !isset($extend.c1_1[1]) || empty($extend.c1_1[1])}5-9{/if}">
22
+        评论数:<input type="text" name="c1_1[]" id="" autocomplete="off" class="layui-input w100" value="{if !isset($extend.c1_1[1]) || empty($extend.c1_1[1])}5-9{else/}{$extend.c1_1[1]}{/if}">
19
         观看
23
         观看
20
-        <input type="number" name="c1_2[]" id="" autocomplete="off" class="layui-input w30" value="{if !isset($extend.c1_2[1]) || empty($extend.c1_2[1])}5{/if}">
24
+        <input type="number" name="c1_2[]" id="" autocomplete="off" class="layui-input w30" value="{if !isset($extend.c1_2[1]) || empty($extend.c1_2[1])}5{else/}{$extend.c1_2[1]}{/if}">
21
         秒到
25
         秒到
22
-        <input type="number" name="c1_3[]" id="" autocomplete="off" class="layui-input w30" value="{if !isset($extend.c1_3[1]) || empty($extend.c1_3[1])}9{/if}">
26
+        <input type="number" name="c1_3[]" id="" autocomplete="off" class="layui-input w30" value="{if !isset($extend.c1_3[1]) || empty($extend.c1_3[1])}9{else/}{$extend.c1_3[1]}{/if}">
23
27
24
         </span>
28
         </span>
25
 
29
 

+ 3
- 3
app/shop/view/content/closure/edit/05.html Переглянути файл

13
         </span>
13
         </span>
14
         <span class="ks">
14
         <span class="ks">
15
 
15
 
16
-        评论数:<input type="text" name="d1_1[]" id="" autocomplete="off" class="layui-input w100" value="{if !isset($extend.d1_1[1]) || empty($extend.d1_1[1])}5-9{/if}">
16
+        评论数:<input type="text" name="d1_1[]" id="" autocomplete="off" class="layui-input w100" value="{if !isset($extend.d1_1[1]) || empty($extend.d1_1[1])}5-9{else/}{$extend.d1_1[1]}{/if}">
17
         观看
17
         观看
18
-        <input type="number" name="d1_2[]" id="" autocomplete="off" class="layui-input w30" value="{if !isset($extend.d1_2[1]) || empty($extend.d1_2[1])}5{/if}">
18
+        <input type="number" name="d1_2[]" id="" autocomplete="off" class="layui-input w30" value="{if !isset($extend.d1_2[1]) || empty($extend.d1_2[1])}5{else/}{$extend.d1_2[1]}{/if}">
19
         秒到
19
         秒到
20
-        <input type="number" name="d1_3[]" id="" autocomplete="off" class="layui-input w30" value="{if !isset($extend.d1_3[1]) || empty($extend.d1_3[1])}9{/if}">
20
+        <input type="number" name="d1_3[]" id="" autocomplete="off" class="layui-input w30" value="{if !isset($extend.d1_3[1]) || empty($extend.d1_3[1])}9{else/}{$extend.d1_3[1]}{/if}">
21
21
22
         </span>
22
         </span>
23
 
23
 

+ 11
- 6
app/shop/view/content/equi_category/lists.html Переглянути файл

25
 {php}
25
 {php}
26
 $date1 = time();
26
 $date1 = time();
27
 $date2 = strtotime($end_time);
27
 $date2 = strtotime($end_time);
28
-
29
 // 将时间戳转换为天数
28
 // 将时间戳转换为天数
30
 $days = abs($date2 - $date1) / (60 * 60 * 24);
29
 $days = abs($date2 - $date1) / (60 * 60 * 24);
31
-              $days = intval($days);
32
-
30
+$days = intval($days); //取整
31
+if($date1 > $date2){
32
+    $days_desc = "已过期".$days."天";
33
+}else if($days == 0){
34
+    $days_desc = "今天已到期";
35
+}else{
36
+    $days_desc = "剩余".$days."天";
37
+}
33
 //echo "相差天数:".intval($days); // 输出相差天数,使用intval确保得到整数结果
38
 //echo "相差天数:".intval($days); // 输出相差天数,使用intval确保得到整数结果
34
 {/php}
39
 {/php}
35
 
40
 
36
-              <b>套餐包含:</b> 电脑{$server_info.pc_num}台,每台电脑可添加手机{$server_info.mobile_num}台,可同时运行手机{$server_info.run_num}台。
41
+                <b>套餐包含:</b> 电脑 <b style="color:#000;">{$server_info.pc_num}</b> 台,每台电脑可添加手机 <b style="color:#000;">{$server_info.mobile_num}</b> 台,可同时运行手机 <b style="color:#000;">{$server_info.run_num}</b> 台。
37
               <br/>
42
               <br/>
38
-              总电脑数量:{$edui_info[0][0]??"0"}台 &nbsp;&nbsp;&nbsp;&nbsp;<b style="color:red;">服务到期时间:</b>  <span style="color:red;">{$end_time} (剩余{$days}天)</span> &nbsp;&nbsp;&nbsp;&nbsp;<b style="color:red;">评论次数剩余数量:</b>  <span style="color:red;">{$hksy_count}</span> <br/>
43
+              总电脑数量:<b style="color:#000;">{$edui_info[0][0]??"0"}</b> 台 &nbsp;&nbsp;&nbsp;&nbsp;<b style="color:red;">服务到期时间:</b>  <span style="color:red;">{$end_time} ({$days_desc})</span> &nbsp;&nbsp;&nbsp;&nbsp;<b style="color:red;">评论次数剩余数量:</b>  <span style="color:red;">{$hksy_count}</span> <br/>
39
               {volist name="edui_info" id="vo"}
44
               {volist name="edui_info" id="vo"}
40
-              第{$vo[1]}台电脑,总共{$vo[2]}台手机设备,已启用{$vo[3]}台手机设备,未启用{$vo[4]}台手机设备,可同时运行手机{$server_info.run_num}台。 <br/>
45
+                 <b style="color:#000;">{$vo[1]}</b> 台电脑,总共 <b style="color:#000;">{$vo[2]}</b> 台手机设备,已启用 <b style="color:#000;">{$vo[3]}</b> 台手机设备,未启用 <b style="color:#000;">{$vo[4]}</b> 台手机设备,可同时运行手机 <b style="color:#000;">{$server_info.run_num}</b> 台。 <br/>
41
               {/volist}
46
               {/volist}
42
 
47
 
43
             </p>
48
             </p>

+ 32
- 7
app/shop/view/order/order_renew/renew_log.html Переглянути файл

27
             <div class="layui-form-item">
27
             <div class="layui-form-item">
28
                 <label class="layui-form-label">类型</label>
28
                 <label class="layui-form-label">类型</label>
29
                 <div class="layui-input-inline">
29
                 <div class="layui-input-inline">
30
-                    <select name="type_id">
31
-                        <option value=""></option>
30
+                    <select name="source_type">
31
+                        <option value="">请选择</option>
32
+                        <option value="101">使用扣减次数</option>
33
+                        <option value="100">充值次数</option>
32
                     </select>
34
                     </select>
33
                 </div>
35
                 </div>
34
-                <div class="layui-inline">
36
+                <div class="layui-inline" style="margin-top: 5px;">
35
                     <a class="layui-btn layui-btn-sm layui-btn-normal" lay-submit lay-filter="search">搜索</a>
37
                     <a class="layui-btn layui-btn-sm layui-btn-normal" lay-submit lay-filter="search">搜索</a>
36
                     <a class="layui-btn layui-btn-sm layui-btn-primary" lay-submit lay-filter="clear-search">重置</a>
38
                     <a class="layui-btn layui-btn-sm layui-btn-primary" lay-submit lay-filter="clear-search">重置</a>
37
                 </div>
39
                 </div>
43
             <table id="like-table-lists" lay-filter="like-table-lists"></table>
45
             <table id="like-table-lists" lay-filter="like-table-lists"></table>
44
         </div>
46
         </div>
45
 
47
 
48
+        <script type="text/html" id="table-count">
49
+            {{# if(0 - d.change_count > 0){ }}
50
+            <span style="color: red;">{{ d.change_count }}</span>
51
+            {{#  }else{ }}
52
+            <span style="color: blue;">+{{ d.change_count }}</span>
53
+            {{#  } }}
54
+        </script>
55
+
56
+        <script type="text/html" id="table-type">
57
+            {{# if(d.source_type == 101){ }}
58
+            <span style="color: red;">使用扣减次数</span>
59
+            {{#  } }}
60
+
61
+            {{# if(d.source_type == 100){ }}
62
+            <span style="color: blue;">充值次数</span>
63
+            {{#  } }}
64
+        </script>
65
+
66
+        <script type="text/html" id="table-num">
67
+            <span style="color: #000;"><b>{{ d.left_count }}</b></span>
68
+        </script>
69
+
46
     </div>
70
     </div>
47
 </div>
71
 </div>
48
 
72
 
54
 
78
 
55
         like.tableLists("#like-table-lists", "{:url()}", [
79
         like.tableLists("#like-table-lists", "{:url()}", [
56
             { field: "id", width: 80, title: "ID" }
80
             { field: "id", width: 80, title: "ID" }
57
-            , { field: "change_count", width: 200, align: "center", title: "变动数量" }
58
-            , { field: "left_count", width: 200, align: "center", title: "变动后总数" }
59
-            , { field: "remark", width: 400, align: "center", title: "备注" }
60
-            , { field: "create_time", width: 200, align: "center", title: "变动时间" }
81
+            , { field: "source_type", width: 120, align: "center", title: "变动类型",templet:"#table-type"}
82
+            , { field: "change_count", width: 120, align: "center", title: "变动数量",templet:"#table-count"}
83
+            , { field: "left_count", width: 120, align: "center", title: "变动后总数",templet:"#table-num" }
84
+            , { field: "remark", align: "center", title: "备注" }
85
+            , { field: "create_time", width: 200, align: "center", title: "更新时间" }
61
         ]);
86
         ]);
62
 
87
 
63
         form.on("submit(search)", function (data) {
88
         form.on("submit(search)", function (data) {

+ 19
- 6
app/shop/view/order/order_renew/renew_month_log.html Переглянути файл

23
         </div>
23
         </div>
24
 
24
 
25
          <!-- 搜索区域 -->
25
          <!-- 搜索区域 -->
26
-         <div class="layui-card-body layui-form">
26
+         <div class="layui-card-body layui-form" style="display:none;">
27
             <div class="layui-form-item">
27
             <div class="layui-form-item">
28
                 <label class="layui-form-label">类型</label>
28
                 <label class="layui-form-label">类型</label>
29
                 <div class="layui-input-inline">
29
                 <div class="layui-input-inline">
43
             <table id="like-table-lists" lay-filter="like-table-lists"></table>
43
             <table id="like-table-lists" lay-filter="like-table-lists"></table>
44
         </div>
44
         </div>
45
 
45
 
46
+
47
+        <script type="text/html" id="table-count">
48
+
49
+            {{# if(0 - d.change_count > 0){ }}
50
+                <span style="color: blue;">{{ d.change_count }}</span>
51
+            {{#  }else{ }}
52
+                <span style="color: red;">+{{ d.change_count }}</span>
53
+            {{#  } }}
54
+
55
+
56
+
57
+        </script>
58
+
46
     </div>
59
     </div>
47
 </div>
60
 </div>
48
 
61
 
54
 
67
 
55
         like.tableLists("#like-table-lists", "{:url()}", [
68
         like.tableLists("#like-table-lists", "{:url()}", [
56
             { field: "id", width: 80, title: "ID" }
69
             { field: "id", width: 80, title: "ID" }
57
-            , { field: "change_count", width: 200, align: "center", title: "变动数量" }
58
-            , { field: "before_date", width: 200, align: "center", title: "变动前到期时间" }
59
-            , { field: "after_date", width: 200, align: "center", title: "变动后到期时间" }
60
-            , { field: "remark", width: 400, align: "center", title: "备注" }
61
-            , { field: "create_time", width: 200, align: "center", title: "变动时间" }
70
+            , { field: "change_count", width: 100, align: "center", title: "续费月数",templet:"#table-count"}
71
+            , { field: "before_date", width: 200, align: "center", title: "续费前到期时间" }
72
+            , { field: "after_date", width: 200, align: "center", title: "续费后到期时间" }
73
+            , { field: "remark",align: "center", title: "备注" }
74
+            , { field: "create_time", width: 200, align: "center", title: "更新时间" }
62
         ]);
75
         ]);
63
 
76
 
64
         form.on("submit(search)", function (data) {
77
         form.on("submit(search)", function (data) {

Завантаження…
Відмінити
Зберегти