瀏覽代碼

优化获客配置

xiaohai 3 週之前
父節點
當前提交
49afd3a7d0

+ 3
- 3
app/api/controller/ShopContent.php 查看文件

343
     public function getHKSYCount() {
343
     public function getHKSYCount() {
344
         if ($this->request->isGet()) {
344
         if ($this->request->isGet()) {
345
             $get = $this->request->get();
345
             $get = $this->request->get();
346
-            $count = ShopContentLogic::getHKSYCount($get);
347
-            if ($count === false) {
346
+            $data = ShopContentLogic::getHKSYCount($get);
347
+            if ($data === false) {
348
                 return JsonServer::error(ShopContentLogic::getError(), ['err_code' => ShopContentLogic::getErrCode()]);
348
                 return JsonServer::error(ShopContentLogic::getError(), ['err_code' => ShopContentLogic::getErrCode()]);
349
             }
349
             }
350
 
350
 
351
-            return JsonServer::success('', ['count' => $count]);
351
+            return JsonServer::success('', $data);
352
         }
352
         }
353
 
353
 
354
         return JsonServer::error('请求方式错误', ['err_code' => 10001]);
354
         return JsonServer::error('请求方式错误', ['err_code' => 10001]);

+ 8
- 2
app/api/logic/ShopContentLogic.php 查看文件

751
     /**
751
     /**
752
      * 获取剩余数量  ZMH 2025-03-18
752
      * 获取剩余数量  ZMH 2025-03-18
753
      * @param $get
753
      * @param $get
754
-     * @return bool|number
754
+     * @return bool|array
755
      */
755
      */
756
     public static function getHKSYCount($get) {
756
     public static function getHKSYCount($get) {
757
         $code = $get["code"] ?? '';
757
         $code = $get["code"] ?? '';
760
             return false;
760
             return false;
761
         }
761
         }
762
 
762
 
763
-        return $shop->hksy_count;
763
+        return ['count' => $shop->hksy_count, 'expire_time' => $shop->expire_time];
764
     }
764
     }
765
 
765
 
766
     /**
766
     /**
783
             return false;
783
             return false;
784
         }
784
         }
785
 
785
 
786
+        // 判断是否过期
787
+        $expire_time = $shop->expire_time;
788
+        if (time() < $expire_time) {
789
+           return true;
790
+        }
791
+
786
         if ($shop->hksy_count < $count) {
792
         if ($shop->hksy_count < $count) {
787
             self::$errCode = 5;
793
             self::$errCode = 5;
788
             self::$error = "剩余数量不足";
794
             self::$error = "剩余数量不足";

+ 53
- 3
app/common/model/content/Closure.php 查看文件

42
         return $content;
42
         return $content;
43
     }
43
     }
44
 
44
 
45
+    private function replaceContent($content)
46
+    {
47
+        // 替换空格
48
+        $content = preg_replace("/\s+/", "", $content);
49
+        // var_dump(111, $content);
50
+        str_replace("|", '|', $content);
51
+        $arr = explode('|', $content);
52
+        $arr = array_filter($arr);
53
+        return implode('|', $arr);
54
+    }
55
+
56
+    private function replaceContent2($content)
57
+    {
58
+        // 替换空格
59
+        $content = preg_replace("/\s+/", "", $content);
60
+        // str_replace("-", '-', $content);
61
+        $arr = explode('-', $content);
62
+        $arr = array_filter($arr);
63
+        if (count($arr) > 3) {
64
+            throw new \Exception('匹配词不能超过3个');
65
+        }
66
+
67
+        if (count($arr) <= 0) {
68
+            throw new \Exception('匹配词选项填写错误');
69
+        }
70
+
71
+        return implode('-', $arr);
72
+    }
73
+
45
     /*
74
     /*
46
      * 处理表达数据
75
      * 处理表达数据
47
      */
76
      */
48
     public function postDataHandle($post=[]){
77
     public function postDataHandle($post=[]){
78
+        // var_dump(123, $post['b3']);
79
+        $post['b3'] = $this->replaceContent($post['b3']);
80
+        // var_dump(456, $post['b3']);
81
+        // return true;
82
+
83
+        $post['a7'] = $this->replaceContent($post['a7']);
84
+        $post['e7'] = $this->replaceContent($post['e7']);
85
+        $post['f10'] = $this->replaceContent($post['f10']);
86
+        $post['f11'] = $this->replaceContent($post['f11']);
87
+        $post['f12'] = $this->replaceContent($post['f12']);
88
+        $post['f13'] = $this->replaceContent($post['f13']);
89
+        $post['f14'] = $this->replaceContent($post['f14']);
90
+        $post['f15'] = $this->replaceContent($post['f15']);
91
+        $post['f17'] = $this->replaceContent($post['f17']);
92
+        $post['f19'] = $this->replaceContent($post['f19']);
93
+        $post['f20'] = $this->replaceContent($post['f20']);
94
+        $post['f24'] = $this->replaceContent($post['f24']);
95
+        $post['k6'] = $this->replaceContent($post['k6']);
96
+
49
         //处理b2
97
         //处理b2
50
         $str = [];
98
         $str = [];
51
         foreach ($post['b2_1'] as $k => $v) {
99
         foreach ($post['b2_1'] as $k => $v) {
52
             if(!empty($v)) {
100
             if(!empty($v)) {
101
+                $v_str = $this->replaceContent2($v);
53
                 $str[] = $v . '_' . $post['b2_2'][$k] . '-' . $post['b2_3'][$k] . '-' . $post['b2_4'][$k];
102
                 $str[] = $v . '_' . $post['b2_2'][$k] . '-' . $post['b2_3'][$k] . '-' . $post['b2_4'][$k];
54
             }
103
             }
55
         }
104
         }
166
         $str7 = [];
215
         $str7 = [];
167
         foreach ($post['f21_1'] as $k => $v) {
216
         foreach ($post['f21_1'] as $k => $v) {
168
             if(!empty($v)) {
217
             if(!empty($v)) {
169
-                $str7[$v] = $post['f21_2'][$k];
218
+                $str7[$v] = $this->replaceContent($post['f21_2'][$k]);
170
             }
219
             }
171
         }
220
         }
172
 
221
 
174
         $str8 = [];
223
         $str8 = [];
175
         foreach ($post['f25_1'] as $k => $v) {
224
         foreach ($post['f25_1'] as $k => $v) {
176
             if(!empty($v)) {
225
             if(!empty($v)) {
177
-                $str8[$v] = $post['f25_2'][$k];
226
+                $str8[$v] = $this->replaceContent($post['f25_2'][$k]);
178
             }
227
             }
179
         }
228
         }
180
 
229
 
304
             "评论钩子内容" =>  $post['k6']
353
             "评论钩子内容" =>  $post['k6']
305
 
354
 
306
         ];
355
         ];
307
-        return $json;
356
+
357
+        return [$json, $post];
308
     }
358
     }
309
 }
359
 }

+ 6
- 0
app/shop/controller/content/Closure.php 查看文件

33
 
33
 
34
             $post = $this->request->post();
34
             $post = $this->request->post();
35
             $post['shop_id'] = $this->shop_id;
35
             $post['shop_id'] = $this->shop_id;
36
+            $post['a3'] = $post['a2'] ?? 0;
36
 
37
 
37
             (new ClosureValidate())->goCheck('add',$post);
38
             (new ClosureValidate())->goCheck('add',$post);
39
+            $post['a3'] = intval($post['a3'] / 10);
40
+            
41
+
38
             $res = ClosureLogic::add($post);
42
             $res = ClosureLogic::add($post);
39
             if ($res === false) {
43
             if ($res === false) {
40
                 $error = ClosureLogic::getError() ?: '新增失败';
44
                 $error = ClosureLogic::getError() ?: '新增失败';
92
 
96
 
93
             $post = $this->request->post();
97
             $post = $this->request->post();
94
             $post['shop_id'] = $this->shop_id;
98
             $post['shop_id'] = $this->shop_id;
99
+            $post['a3'] = $post['a2'] ?? 0;
95
 
100
 
96
             (new ClosureValidate())->goCheck('edit',$post);
101
             (new ClosureValidate())->goCheck('edit',$post);
102
+            $post['a3'] = intval($post['a3'] / 10);
97
 
103
 
98
             $res = ClosureLogic::edit($post);
104
             $res = ClosureLogic::edit($post);
99
             if ($res === false) {
105
             if ($res === false) {

+ 4
- 0
app/shop/controller/content/EquiCategory.php 查看文件

75
         //获取商家信息
75
         //获取商家信息
76
         $end_time = EquiCategoryLogic::getShopInfo($this->shop_id);
76
         $end_time = EquiCategoryLogic::getShopInfo($this->shop_id);
77
 
77
 
78
+        // 获取剩余评论数
79
+        $shop = EquiCategoryLogic::getShop($this->shop_id);
80
+        $hksy_count =$shop->hksy_count;
78
 
81
 
79
         return view('lists',['end_time' => $end_time,
82
         return view('lists',['end_time' => $end_time,
80
             'edui_info' => $str,
83
             'edui_info' => $str,
84
+            'hksy_count' => $hksy_count,
81
             'server_info' => $res]);
85
             'server_info' => $res]);
82
     }
86
     }
83
 
87
 

+ 17
- 18
app/shop/logic/content/ClosureLogic.php 查看文件

17
      * @param $get
17
      * @param $get
18
      * @return array
18
      * @return array
19
      */
19
      */
20
-    public static function lists($get,$shop_id)
20
+    public static function lists($get, $shop_id)
21
     {
21
     {
22
         try {
22
         try {
23
             $where = [
23
             $where = [
26
             ];
26
             ];
27
 
27
 
28
             if (!empty($get['title']) and $get['title'])
28
             if (!empty($get['title']) and $get['title'])
29
-                $where[] = ['title', 'like', '%'.$get['title'].'%'];
29
+                $where[] = ['title', 'like', '%' . $get['title'] . '%'];
30
 
30
 
31
             if (!empty($get['cid']) and is_numeric($get['cid']))
31
             if (!empty($get['cid']) and is_numeric($get['cid']))
32
                 $where[] = ['cid', '=', $get['cid']];
32
                 $where[] = ['cid', '=', $get['cid']];
42
             $model = new Closure();
42
             $model = new Closure();
43
             $lists = $model->field(true)
43
             $lists = $model->field(true)
44
                 ->where($where)
44
                 ->where($where)
45
-                ->with(['category','category2'])
45
+                ->with(['category', 'category2'])
46
                 //->order('sort', 'asc')
46
                 //->order('sort', 'asc')
47
                 ->order([
47
                 ->order([
48
                     'yid' => 'asc',
48
                     'yid' => 'asc',
62
                 $item['is_show']   = $item['is_show'] ? '显示' : '隐藏';
62
                 $item['is_show']   = $item['is_show'] ? '显示' : '隐藏';
63
             }
63
             }
64
 
64
 
65
-            return ['count'=>$lists['total'], 'lists'=>$lists['data']];
65
+            return ['count' => $lists['total'], 'lists' => $lists['data']];
66
         } catch (Exception $e) {
66
         } catch (Exception $e) {
67
-            return ['error'=>$e->getMessage()];
67
+            return ['error' => $e->getMessage()];
68
         }
68
         }
69
     }
69
     }
70
 
70
 
82
         return $data;
82
         return $data;
83
     }
83
     }
84
 
84
 
85
+
85
     /**
86
     /**
86
      * @Notes: 添加文章
87
      * @Notes: 添加文章
87
      * @Author: 张无忌
88
      * @Author: 张无忌
93
         try {
94
         try {
94
 
95
 
95
             $model = new Closure();
96
             $model = new Closure();
96
-            $json = $model->postDataHandle($post);
97
+            $arr = $model->postDataHandle($post);
97
 
98
 
98
             Closure::create([
99
             Closure::create([
99
                 'shop_id'       => $post['shop_id'],
100
                 'shop_id'       => $post['shop_id'],
108
                 'sort'      => $post['sort'] ?? 0,
109
                 'sort'      => $post['sort'] ?? 0,
109
                 'is_notice' => $post['is_notice'],
110
                 'is_notice' => $post['is_notice'],
110
                 'is_show'   => $post['is_show'],
111
                 'is_show'   => $post['is_show'],
111
-                'version' => $post['version'],
112
-                'form_data' => json_encode($post, JSON_UNESCAPED_UNICODE),
113
-                'json_data' => json_encode($json, JSON_UNESCAPED_UNICODE)
112
+                'version' => $post['shop_id'] . '-' . time(),
113
+                'form_data' => json_encode($arr[1], JSON_UNESCAPED_UNICODE),
114
+                'json_data' => json_encode($arr[0], JSON_UNESCAPED_UNICODE)
114
             ]);
115
             ]);
115
 
116
 
116
             return true;
117
             return true;
131
         try {
132
         try {
132
 
133
 
133
             $model = new Closure();
134
             $model = new Closure();
134
-            $json = $model->postDataHandle($post);
135
+            $arr = $model->postDataHandle($post);
135
 
136
 
136
             Closure::update([
137
             Closure::update([
137
                 'shop_id'       => $post['shop_id'],
138
                 'shop_id'       => $post['shop_id'],
138
                 'cid'       => $post['cid'],
139
                 'cid'       => $post['cid'],
139
-                'yid'       => $post['yid']?? '',
140
+                'yid'       => $post['yid'] ?? '',
140
                 'title'     => $post['title'],
141
                 'title'     => $post['title'],
141
                 'image'     => $post['image'] ?? '',
142
                 'image'     => $post['image'] ?? '',
142
                 'intro'     => $post['intro'] ?? '',
143
                 'intro'     => $post['intro'] ?? '',
147
                 'is_notice' => $post['is_notice'],
148
                 'is_notice' => $post['is_notice'],
148
                 'is_show'   => $post['is_show'],
149
                 'is_show'   => $post['is_show'],
149
                 'version' => $post['version'],
150
                 'version' => $post['version'],
150
-                'form_data' => json_encode($post, JSON_UNESCAPED_UNICODE),
151
-                'json_data' => json_encode($json, JSON_UNESCAPED_UNICODE)
152
-            ], ['id'=>$post['id']]);
151
+                'form_data' => json_encode($arr[1], JSON_UNESCAPED_UNICODE),
152
+                'json_data' => json_encode($arr[0], JSON_UNESCAPED_UNICODE)
153
+            ], ['id' => $post['id']]);
153
 
154
 
154
             return true;
155
             return true;
155
         } catch (\Exception $e) {
156
         } catch (\Exception $e) {
170
             Closure::update([
171
             Closure::update([
171
                 'del'         => 1,
172
                 'del'         => 1,
172
                 'update_time' => time()
173
                 'update_time' => time()
173
-            ], ['id'=>$id]);
174
+            ], ['id' => $id]);
174
 
175
 
175
             return true;
176
             return true;
176
         } catch (\Exception $e) {
177
         } catch (\Exception $e) {
194
             Closure::update([
195
             Closure::update([
195
                 'is_show'     => !$article['is_show'],
196
                 'is_show'     => !$article['is_show'],
196
                 'update_time' => time()
197
                 'update_time' => time()
197
-            ], ['id'=>$id]);
198
+            ], ['id' => $id]);
198
 
199
 
199
             return true;
200
             return true;
200
         } catch (\Exception $e) {
201
         } catch (\Exception $e) {
203
         }
204
         }
204
     }
205
     }
205
 }
206
 }
206
-
207
-

+ 6
- 1
app/shop/logic/content/EquiCategoryLogic.php 查看文件

137
           'create_time'       => time(),
137
           'create_time'       => time(),
138
           'update_time'       => time(),
138
           'update_time'       => time(),
139
             'code' => $code,
139
             'code' => $code,
140
-            'yid' => 0,
140
+            'yid' => $post['yid'] ?? 21,
141
+            'type' => $post['type'] ?? 3,
141
             'ver' => $post['ver']
142
             'ver' => $post['ver']
142
     ];
143
     ];
143
 
144
 
505
         return $str;
506
         return $str;
506
     }
507
     }
507
 
508
 
509
+    public static function getShop($shop_id) {
510
+        $shop = shopModel::where(['id' => $shop_id])->find();
511
+        return $shop;
512
+    }
508
 }
513
 }

+ 3
- 3
app/shop/validate/content/ClosureValidate.php 查看文件

13
         'id'    => 'require|number',
13
         'id'    => 'require|number',
14
         'cid'   => 'require|number',
14
         'cid'   => 'require|number',
15
         'title' => 'require',
15
         'title' => 'require',
16
-        'version' => 'require|checkVersion',
16
+        // 'version' => 'require|checkVersion',
17
         'a2' => 'require|number|checkPost',
17
         'a2' => 'require|number|checkPost',
18
         'a3' => 'require|number',
18
         'a3' => 'require|number',
19
     ];
19
     ];
34
     protected $scene = [
34
     protected $scene = [
35
         'id'   => ['id'],
35
         'id'   => ['id'],
36
         'add'  => [
36
         'add'  => [
37
-            'cid', 'title','version',
37
+            'cid', 'title',
38
             'a2',
38
             'a2',
39
             'a3'
39
             'a3'
40
         ],
40
         ],
41
         'edit' => [
41
         'edit' => [
42
-            'id', 'cid', 'title','version',
42
+            'id', 'cid', 'title',
43
             'a2',
43
             'a2',
44
             'a3'
44
             'a3'
45
         ],
45
         ],

+ 1
- 1
app/shop/view/content/closure/edit/01.html 查看文件

27
     </div>
27
     </div>
28
 </div>
28
 </div>
29
 
29
 
30
-<div class="layui-form-item">
30
+<div class="layui-form-item" style="display: none;">
31
     <label for="intro" class="layui-form-label">版本号:</label>
31
     <label for="intro" class="layui-form-label">版本号:</label>
32
     <div class="layui-input-inline">
32
     <div class="layui-input-inline">
33
         <input type="text" name="version" id="version" autocomplete="off" class="layui-input" value="{$detail.version}" />
33
         <input type="text" name="version" id="version" autocomplete="off" class="layui-input" value="{$detail.version}" />

+ 2
- 2
app/shop/view/content/closure/edit/02.html 查看文件

139
     </div>
139
     </div>
140
 </div>
140
 </div>
141
 
141
 
142
-<div class="layui-form-item">
142
+<!-- <div class="layui-form-item">
143
     <label for="intro" class="layui-form-label">操作总数:</label>
143
     <label for="intro" class="layui-form-label">操作总数:</label>
144
     <div class="layui-input-inline">
144
     <div class="layui-input-inline">
145
         <input type="number" name="a3" id="a3" autocomplete="off" class="layui-input" value="{$extend.a3??'180'}">
145
         <input type="number" name="a3" id="a3" autocomplete="off" class="layui-input" value="{$extend.a3??'180'}">
146
         <div class="layui-form-mid layui-word-aux">根据运行时长 1800s/60s(一分钟一篇) = 30 x 6(倍) = 180</div>
146
         <div class="layui-form-mid layui-word-aux">根据运行时长 1800s/60s(一分钟一篇) = 30 x 6(倍) = 180</div>
147
     </div>
147
     </div>
148
-</div>
148
+</div> -->

+ 3
- 3
app/shop/view/content/closure/edit/03.html 查看文件

16
             <div class="layui-card">
16
             <div class="layui-card">
17
                 <div class="layui-card-header">列表数据</div>
17
                 <div class="layui-card-header">列表数据</div>
18
                 <div class="layui-card-body">
18
                 <div class="layui-card-body">
19
-                    <div class="layui-form-item">
19
+                    <div class="layui-form-item" style="display: none;">
20
                         <label class="layui-form-label">数据分类:</label>
20
                         <label class="layui-form-label">数据分类:</label>
21
                         <div class="layui-input-inline">
21
                         <div class="layui-input-inline">
22
                             <input type="radio" name="b1" value="1" title="是" {if $extend.b1==1}checked{/if} >
22
                             <input type="radio" name="b1" value="1" title="是" {if $extend.b1==1}checked{/if} >
82
                     <div class="layui-form-item">
82
                     <div class="layui-form-item">
83
                         <label class="layui-form-label"></label>
83
                         <label class="layui-form-label"></label>
84
                         <div class="layui-input-block tips">
84
                         <div class="layui-input-block tips">
85
-                            匹配词不宜过长,用"-"号连接多个词语,例:
86
-                            职称-评审-申报
85
+                            匹配词不宜过长,用"-"号连接多个词语,最多3个词语,例:
86
+                            职称/职称-评审/职称-评审-申报 
87
                         </div>
87
                         </div>
88
                     </div>
88
                     </div>
89
 
89
 

+ 10
- 2
app/shop/view/content/closure/setting/01.html 查看文件

1
+<!--
2
+ * @Author: xiaohai zmhwork@qq.com
3
+ * @Date: 2025-03-13 18:17:49
4
+ * @LastEditors: xiaohai zmhwork@qq.com
5
+ * @LastEditTime: 2025-03-20 15:25:27
6
+ * @FilePath: \opkpm\app\shop\view\content\closure\setting\01.html
7
+ * @Description: 
8
+-->
1
 <div class="layui-form-item">
9
 <div class="layui-form-item">
2
     <label for="title" class="layui-form-label"><span style="color:red;">*</span>配置标题:</label>
10
     <label for="title" class="layui-form-label"><span style="color:red;">*</span>配置标题:</label>
3
     <div class="layui-input-inline">
11
     <div class="layui-input-inline">
27
     </div>
35
     </div>
28
 </div>
36
 </div>
29
 
37
 
30
-<div class="layui-form-item">
38
+<!-- <div class="layui-form-item">
31
     <label for="intro" class="layui-form-label">版本号:</label>
39
     <label for="intro" class="layui-form-label">版本号:</label>
32
     <div class="layui-input-inline">
40
     <div class="layui-input-inline">
33
         <input type="text" name="version" id="version" autocomplete="off" class="layui-input" value="1.0.0" />
41
         <input type="text" name="version" id="version" autocomplete="off" class="layui-input" value="1.0.0" />
34
     </div>
42
     </div>
35
-</div>
43
+</div> -->
36
 
44
 
37
 <div class="layui-form-item">
45
 <div class="layui-form-item">
38
     <label for="intro" class="layui-form-label">配置简介:</label>
46
     <label for="intro" class="layui-form-label">配置简介:</label>

+ 2
- 2
app/shop/view/content/closure/setting/02.html 查看文件

139
     </div>
139
     </div>
140
 </div>
140
 </div>
141
 
141
 
142
-<div class="layui-form-item">
142
+<!-- <div class="layui-form-item">
143
     <label for="intro" class="layui-form-label">操作总数:</label>
143
     <label for="intro" class="layui-form-label">操作总数:</label>
144
     <div class="layui-input-inline">
144
     <div class="layui-input-inline">
145
         <input type="number" name="a3" id="a3" autocomplete="off" class="layui-input" value="180">
145
         <input type="number" name="a3" id="a3" autocomplete="off" class="layui-input" value="180">
146
         <div class="layui-form-mid layui-word-aux">根据运行时长 1800s/60s(一分钟一篇) = 30 x 6(倍) = 180</div>
146
         <div class="layui-form-mid layui-word-aux">根据运行时长 1800s/60s(一分钟一篇) = 30 x 6(倍) = 180</div>
147
     </div>
147
     </div>
148
-</div>
148
+</div> -->

+ 3
- 3
app/shop/view/content/closure/setting/03.html 查看文件

13
             <div class="layui-card">
13
             <div class="layui-card">
14
                 <div class="layui-card-header">列表数据</div>
14
                 <div class="layui-card-header">列表数据</div>
15
                 <div class="layui-card-body">
15
                 <div class="layui-card-body">
16
-                    <div class="layui-form-item">
16
+                    <div class="layui-form-item" style="display: none;">
17
                         <label class="layui-form-label">数据分类:</label>
17
                         <label class="layui-form-label">数据分类:</label>
18
                         <div class="layui-input-inline">
18
                         <div class="layui-input-inline">
19
                             <input type="radio" name="b1" value="1" title="是" checked>
19
                             <input type="radio" name="b1" value="1" title="是" checked>
59
                     <div class="layui-form-item">
59
                     <div class="layui-form-item">
60
                         <label class="layui-form-label"></label>
60
                         <label class="layui-form-label"></label>
61
                         <div class="layui-input-block tips">
61
                         <div class="layui-input-block tips">
62
-                            匹配词不宜过长,用"-"号连接多个词语,例:
63
-                            职称-评审-申报
62
+                            匹配词不宜过长,用"-"号连接多个词语,最多3个词语,例:
63
+                            职称/职称-评审/职称-评审-申报 
64
                         </div>
64
                         </div>
65
                     </div>
65
                     </div>
66
 
66
 

+ 3
- 3
app/shop/view/content/closure/setting/04.html 查看文件

15
         </span>
15
         </span>
16
 
16
 
17
         <span class="ks">
17
         <span class="ks">
18
-        评论数:<input type="text" name="c1_1[]" id="" autocomplete="off" class="layui-input w100" value="">
18
+        评论数:<input type="text" name="c1_1[]" id="" autocomplete="off" class="layui-input w100" value="5-10">
19
         观看
19
         观看
20
-        <input type="number" name="c1_2[]" id="" autocomplete="off" class="layui-input w30" value="">
20
+        <input type="number" name="c1_2[]" id="" autocomplete="off" class="layui-input w30" value="5">
21
         秒到
21
         秒到
22
-        <input type="number" name="c1_3[]" id="" autocomplete="off" class="layui-input w30" value="">
22
+        <input type="number" name="c1_3[]" id="" autocomplete="off" class="layui-input w30" value="10">
23
23
24
             <font class="ks_del">删除</font>
24
             <font class="ks_del">删除</font>
25
         </span>
25
         </span>

+ 3
- 3
app/shop/view/content/closure/setting/05.html 查看文件

13
         </span>
13
         </span>
14
 
14
 
15
         <span class="ks">
15
         <span class="ks">
16
-        评论数:<input type="text" name="d1_1[]" id="" autocomplete="off" class="layui-input w100" value="">
16
+        评论数:<input type="text" name="d1_1[]" id="" autocomplete="off" class="layui-input w100" value="5-10">
17
         观看
17
         观看
18
-        <input type="number" name="d1_2[]" id="" autocomplete="off" class="layui-input w30" value="">
18
+        <input type="number" name="d1_2[]" id="" autocomplete="off" class="layui-input w30" value="5">
19
         秒到
19
         秒到
20
-        <input type="number" name="d1_3[]" id="" autocomplete="off" class="layui-input w30" value="">
20
+        <input type="number" name="d1_3[]" id="" autocomplete="off" class="layui-input w30" value="10">
21
21
22
             <font class="ks_del">删除</font>
22
             <font class="ks_del">删除</font>
23
         </span>
23
         </span>

+ 2
- 2
app/shop/view/content/equi_category/lists.html 查看文件

24
 
24
 
25
               <b>套餐包含:</b> 电脑{$server_info.pc_num}台,每台电脑可添加手机{$server_info.mobile_num}台,可同时运行手机{$server_info.run_num}台.
25
               <b>套餐包含:</b> 电脑{$server_info.pc_num}台,每台电脑可添加手机{$server_info.mobile_num}台,可同时运行手机{$server_info.run_num}台.
26
               <br/>
26
               <br/>
27
-              总电脑数量: {$edui_info[0][0]??"0"}台 &nbsp;&nbsp;&nbsp;&nbsp;<b>服务到期时间:</b>  {$end_time}<br/>
27
+              总电脑数量: {$edui_info[0][0]??"0"}台 &nbsp;&nbsp;&nbsp;&nbsp;<b>服务到期时间:</b>  {$end_time} &nbsp;&nbsp;&nbsp;&nbsp;<b>评论剩余数量:</b>  {$hksy_count}<br/>
28
               {volist name="edui_info" id="vo"}
28
               {volist name="edui_info" id="vo"}
29
               第{$vo[1]}台电脑,总共{$vo[2]}台手机设备,已启用{$vo[3]}台手机设备,未启用{$vo[4]}台手机设备,可同时运行手机{$server_info.run_num}台. <br/>
29
               第{$vo[1]}台电脑,总共{$vo[2]}台手机设备,已启用{$vo[3]}台手机设备,未启用{$vo[4]}台手机设备,可同时运行手机{$server_info.run_num}台. <br/>
30
               {/volist}
30
               {/volist}
99
 
99
 
100
 
100
 
101
         {{#  if(d.pid > 0){ }}
101
         {{#  if(d.pid > 0){ }}
102
-        <a class="layui-btn layui-btn-normal layui-btn-sm" lay-event="bd_1">绑定行业</a>
102
+        <!-- <a class="layui-btn layui-btn-normal layui-btn-sm" lay-event="bd_1">绑定行业</a> -->
103
         <a class="layui-btn layui-btn-normal layui-btn-sm" lay-event="bd_2">绑定配置</a>
103
         <a class="layui-btn layui-btn-normal layui-btn-sm" lay-event="bd_2">绑定配置</a>
104
 
104
 
105
         {{# }else{ }}
105
         {{# }else{ }}

+ 116
- 64
app/shop/view/order/order_renew/pay_page.html 查看文件

2
  * @Author: xiaohai zmhwork@qq.com
2
  * @Author: xiaohai zmhwork@qq.com
3
  * @Date: 2025-03-14 18:14:19
3
  * @Date: 2025-03-14 18:14:19
4
  * @LastEditors: xiaohai zmhwork@qq.com
4
  * @LastEditors: xiaohai zmhwork@qq.com
5
- * @LastEditTime: 2025-03-17 17:32:59
5
+ * @LastEditTime: 2025-03-20 16:52:12
6
  * @FilePath: \opkpm\app\shop\view\order\order_renew\pay_page.html
6
  * @FilePath: \opkpm\app\shop\view\order\order_renew\pay_page.html
7
  * @Description: 续费套餐支付方式
7
  * @Description: 续费套餐支付方式
8
 -->
8
 -->
9
-{layout name="layout2" /}
10
-
11
-<div class="layui-card layui-form" style="box-shadow:none;" id="payPage">
12
-    <div class="layui-card-body">
13
-        <div class="layui-form-item">
14
-            <label for="order_sn" class="layui-form-label"><span style="color:red;">*</span>订单编号:</label>
15
-            <div class="layui-input-block">
16
-                <input type="hidden" name="id" id="id" value="{$detail.id}" />
17
-                <input type="text" name="order_sn" id="order_sn" value="{$detail.order_sn}" lay-verType="tips"
18
-                    lay-verify="required" autocomplete="off" class="layui-input" readonly>
19
-            </div>
20
-        </div>
9
+<!DOCTYPE html>
10
+<html>
21
 
11
 
22
-        <div class="layui-form-item">
23
-            <label for="total_num" class="layui-form-label"><span style="color:red;">*</span>商品数量:</label>
24
-            <div class="layui-input-block">
25
-                <input type="text" name="total_num" id="total_num" value="{$detail.total_num}" lay-verType="tips"
26
-                    lay-verify="required" autocomplete="off" class="layui-input" readonly>
27
-            </div>
28
-        </div>
12
+<head>
13
+    <meta charset="utf-8">
14
+    <title>支付</title>
15
+    <meta name="renderer" content="webkit">
16
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
17
+    <meta name="viewport"
18
+        content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
19
+    <link rel="stylesheet" href="__PUBLIC__/static/lib/layui/css/layui.css?v={$front_version}">
20
+    <link rel="stylesheet" href="__PUBLIC__/static/admin/css/app.css">
21
+    <link rel="stylesheet" href="__PUBLIC__/static/admin/css/like.css">
22
+    <script src="__PUBLIC__/static/lib/layui/layui.js?v={$front_version}"></script>
23
+    <script src="__PUBLIC__/static/admin/js/app.js"></script>
24
+</head>
29
 
25
 
30
-        <div class="layui-form-item">
31
-            <label for="order_amount" class="layui-form-label"><span style="color:red;">*</span>应付金额:</label>
32
-            <div class="layui-input-block">
33
-                <input type="text" name="order_amount" id="order_amount" value="{$detail.order_amount}"
34
-                    lay-verType="tips" lay-verify="required" autocomplete="off" class="layui-input" readonly>
35
-            </div>
26
+<body>
27
+
28
+    <div class="layui-row layui-col-space15" data-filtered="filtered" style="margin-top: 100px;">
29
+        <div class="layui-col-md3" data-filtered="filtered">
36
         </div>
30
         </div>
37
 
31
 
38
-        <div class="layui-form-item">
39
-            <label class="layui-form-label">支付方式</label>
40
-            <div class="layui-input-block">
41
-                <input type="radio" name="pay_way" value="1" title="微信支付" disabled>
42
-                <input type="radio" name="pay_way" value="2" title="支付宝支付" checked>
32
+        <div class="layui-col-md6" data-filtered="filtered">
33
+            <div class="layui-panel" data-filtered="filtered">
34
+                <div class="layui-card layui-form" style="margin: 20px;" id="payPage">
35
+                    <div class="layui-card-body">
36
+                        <div class="layui-form-item">
37
+                            <label for="order_sn" class="layui-form-label"><span
38
+                                    style="color:red;">*</span>订单编号:</label>
39
+                            <div class="layui-input-block">
40
+                                <input type="hidden" name="id" id="id" value="{$detail.id}" />
41
+                                <input type="text" name="order_sn" id="order_sn" value="{$detail.order_sn}"
42
+                                    lay-verType="tips" lay-verify="required" autocomplete="off" class="layui-input"
43
+                                    readonly>
44
+                            </div>
45
+                        </div>
46
+
47
+                        <div class="layui-form-item">
48
+                            <label for="renew_name" class="layui-form-label"><span
49
+                                    style="color:red;">*</span>商品名称:</label>
50
+                            <div class="layui-input-block">
51
+                                <input type="text" name="renew_name" id="renew_name" value="{$detail.renew_name}"
52
+                                    lay-verType="tips" lay-verify="required" autocomplete="off" class="layui-input"
53
+                                    readonly>
54
+                            </div>
55
+                        </div>
56
+
57
+                        <div class="layui-form-item">
58
+                            <label for="total_num" class="layui-form-label"><span
59
+                                    style="color:red;">*</span>商品数量:</label>
60
+                            <div class="layui-input-block">
61
+                                <input type="text" name="total_num" id="total_num" value="{$detail.total_num}"
62
+                                    lay-verType="tips" lay-verify="required" autocomplete="off" class="layui-input"
63
+                                    readonly>
64
+                            </div>
65
+                        </div>
66
+
67
+                        <div class="layui-form-item">
68
+                            <label for="order_amount" class="layui-form-label"><span
69
+                                    style="color:red;">*</span>应付金额:</label>
70
+                            <div class="layui-input-block">
71
+                                <input type="text" name="order_amount" id="order_amount" value="{$detail.order_amount}"
72
+                                    lay-verType="tips" lay-verify="required" autocomplete="off" class="layui-input"
73
+                                    readonly>
74
+                            </div>
75
+                        </div>
76
+
77
+                        <div class="layui-form-item">
78
+                            <label class="layui-form-label">支付方式</label>
79
+                            <div class="layui-input-block">
80
+                                <input type="radio" name="pay_way" value="1" title="微信支付" disabled>
81
+                                <input type="radio" name="pay_way" value="2" title="支付宝支付" checked>
82
+                            </div>
83
+                        </div>
84
+
85
+                        <div class="layui-form-item">
86
+                            <div class="layui-input-block">
87
+                                <button type="button" class="layui-btn" lay-event="pay" id="pay">点击支付</button>
88
+                            </div>
89
+                        </div>
90
+                    </div>
91
+                </div>
43
             </div>
92
             </div>
44
         </div>
93
         </div>
45
 
94
 
46
-        <div class="layui-form-item">
47
-            <div class="layui-input-block">
48
-                <button type="button" class="layui-btn" lay-event="pay" id="pay">点击支付</button>
49
-            </div>
95
+        <div class="layui-col-md3" data-filtered="filtered">
50
         </div>
96
         </div>
51
     </div>
97
     </div>
52
-</div>
53
-
54
-<script>
55
-    layui.use(["table", "form", "jquery"], function () {
56
-        var table = layui.table;
57
-        var form = layui.form;
58
-        var $ = layui.jquery;
59
-
60
-        function payPage(id, pay_way) {
61
-            // 选择支付方式
62
-            like.ajax({
63
-                url: "{:url('order.OrderRenew/payWay')}",
64
-                data: {id: id, pay_way: pay_way},
65
-                type: "POST",
66
-                success: function (res) {
67
-                    if (res.code === 1) {
68
-                        $('#payPage').html(res.data.page);
69
-                    } else {
70
-                        layer.msg(res.msg);
98
+
99
+
100
+    <script src="__PUBLIC__/static/admin/js/jquery.min.js"></script>
101
+    <script src="__PUBLIC__/static/admin/js/function.js"></script>
102
+    <script>
103
+        layui.use(["table", "form", "jquery"], function () {
104
+            var table = layui.table;
105
+            var form = layui.form;
106
+            var $ = layui.jquery;
107
+
108
+            function payPage(id, pay_way) {
109
+                // 选择支付方式
110
+                like.ajax({
111
+                    url: "{:url('order.OrderRenew/payWay')}",
112
+                    data: { id: id, pay_way: pay_way },
113
+                    type: "POST",
114
+                    success: function (res) {
115
+                        if (res.code === 1) {
116
+                            $('#payPage').html(res.data.page);
117
+                        } else {
118
+                            layer.msg(res.msg);
119
+                        }
71
                     }
120
                     }
72
-                }
73
-            })
74
-        }
121
+                })
122
+            }
123
+
124
+
125
+            $("#pay").on("click", function () {
126
+                var id = $("#id").val();
127
+                var pay_way = $("input[name='pay_way']:checked").val();
128
+                payPage(id, pay_way);
129
+            });
75
 
130
 
131
+        })
132
+    </script>
76
 
133
 
77
-        $("#pay").on("click", function () {
78
-            var id = $("#id").val();
79
-            var pay_way = $("input[name='pay_way']:checked").val();
80
-            payPage(id, pay_way);
81
-        });
134
+</body>
82
 
135
 
83
-    })
84
-</script>
136
+</html>

Loading…
取消
儲存