正在显示
4 个修改的文件
包含
66 行增加
和
2 行删除
@@ -26,7 +26,7 @@ class IndexController extends RestBaseController | @@ -26,7 +26,7 @@ class IndexController extends RestBaseController | ||
26 | * @param name:language type:string require:0 default: other desc:语言切换(英文传递此字段(en),中文无需传递) | 26 | * @param name:language type:string require:0 default: other desc:语言切换(英文传递此字段(en),中文无需传递) |
27 | * | 27 | * |
28 | * @return rotation:轮播图@ | 28 | * @return rotation:轮播图@ |
29 | - * @rotation id:轮播图id thumbnail:图片路径 link:立即查看链接 | 29 | + * @rotation id:轮播图id thumbnail:图片路径 thumbnail_mobile:移动图片路径 link:立即查看链接 |
30 | * | 30 | * |
31 | * @return about:关于我们@! | 31 | * @return about:关于我们@! |
32 | * @about id:关于我们id thumbnail:图片路径 introduce:简介 | 32 | * @about id:关于我们id thumbnail:图片路径 introduce:简介 |
@@ -45,7 +45,7 @@ class IndexController extends RestBaseController | @@ -45,7 +45,7 @@ class IndexController extends RestBaseController | ||
45 | $arr = []; | 45 | $arr = []; |
46 | 46 | ||
47 | //轮播图 | 47 | //轮播图 |
48 | - $res_rotation = CommonController::selectNoPositionData('rotation','id,thumbnail,link'); | 48 | + $res_rotation = CommonController::selectNoPositionData('rotation','id,thumbnail,thumbnail_mobile,link'); |
49 | $arr['rotation'] = $res_rotation; | 49 | $arr['rotation'] = $res_rotation; |
50 | 50 | ||
51 | //关于我们 | 51 | //关于我们 |
@@ -69,7 +69,27 @@ | @@ -69,7 +69,27 @@ | ||
69 | </td> | 69 | </td> |
70 | </tr> | 70 | </tr> |
71 | </table> | 71 | </table> |
72 | + <table class="table table-bordered"> | ||
73 | + <tr> | ||
74 | + <th>移动轮播图<span class="form-required">*</span></th> | ||
75 | + </tr> | ||
76 | + <tr> | ||
77 | + <td> | ||
78 | + <div style="text-align: center;"> | ||
79 | + <input type="hidden" name="thumbnail_mobile" id="thumbnail_mobile"> | ||
80 | + <a href="javascript:uploadOneImage('图片上传','#thumbnail_mobile');"> | ||
81 | + <img src="__TMPL__/public/assets/images/default-thumbnail.png" | ||
82 | + id="thumbnail_mobile-preview" | ||
83 | + width="135" style="cursor: pointer"/> | ||
84 | + </a> | ||
85 | + <input type="button" class="btn btn-sm btn-cancel-thumbnail_mobile" value="取消图片"> | ||
86 | + </div> | ||
87 | + </td> | ||
88 | + </tr> | ||
89 | + </table> | ||
90 | + | ||
72 | </div> | 91 | </div> |
92 | + | ||
73 | </div> | 93 | </div> |
74 | </form> | 94 | </form> |
75 | </div> | 95 | </div> |
@@ -95,6 +115,12 @@ | @@ -95,6 +115,12 @@ | ||
95 | $('#thumbnail').val(''); | 115 | $('#thumbnail').val(''); |
96 | }); | 116 | }); |
97 | 117 | ||
118 | + //移动轮播图 | ||
119 | + $('.btn-cancel-thumbnail_mobile').click(function () { | ||
120 | + $('#thumbnail_mobile-preview').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png'); | ||
121 | + $('#thumbnail_mobile').val(''); | ||
122 | + }); | ||
123 | + | ||
98 | }); | 124 | }); |
99 | </script> | 125 | </script> |
100 | </body> | 126 | </body> |
@@ -66,6 +66,27 @@ | @@ -66,6 +66,27 @@ | ||
66 | </td> | 66 | </td> |
67 | </tr> | 67 | </tr> |
68 | </table> | 68 | </table> |
69 | + | ||
70 | + <table class="table table-bordered"> | ||
71 | + <tr> | ||
72 | + <th>移动轮播图<span class="form-required">*</span></th> | ||
73 | + </tr> | ||
74 | + <tr> | ||
75 | + <td> | ||
76 | + <div style="text-align: center;"> | ||
77 | + <input type="hidden" name="thumbnail_mobile" id="thumbnail_mobile" value="{$post.thumbnail_mobile|default=''}"> | ||
78 | + <a href="javascript:uploadOneImage('图片上传','#thumbnail_mobile');"> | ||
79 | + <if condition="empty($post.thumbnail_mobile)"> | ||
80 | + <img src="__TMPL__/public/assets/images/default-thumbnail.png" id="thumbnail_mobile-preview" width="135" style="cursor: pointer"/> | ||
81 | + <else/> | ||
82 | + <img src="{:cmf_get_image_preview_url($post.thumbnail_mobile)}" id="thumbnail_mobile-preview" width="135" style="cursor: pointer"/> | ||
83 | + </if> | ||
84 | + </a> | ||
85 | + <input type="button" class="btn btn-sm btn-cancel-thumbnail_mobile" value="取消图片"> | ||
86 | + </div> | ||
87 | + </td> | ||
88 | + </tr> | ||
89 | + </table> | ||
69 | </div> | 90 | </div> |
70 | </div> | 91 | </div> |
71 | <div class="form-group"> | 92 | <div class="form-group"> |
@@ -97,6 +118,13 @@ | @@ -97,6 +118,13 @@ | ||
97 | $('#thumbnail-preview').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png'); | 118 | $('#thumbnail-preview').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png'); |
98 | $('#thumbnail').val(''); | 119 | $('#thumbnail').val(''); |
99 | }); | 120 | }); |
121 | + | ||
122 | + //移动轮播图 | ||
123 | + $('.btn-cancel-thumbnail_mobile').click(function () { | ||
124 | + $('#thumbnail_mobile-preview').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png'); | ||
125 | + $('#thumbnail_mobile').val(''); | ||
126 | + }); | ||
127 | + | ||
100 | }); | 128 | }); |
101 | </script> | 129 | </script> |
102 | </body> | 130 | </body> |
@@ -31,6 +31,7 @@ | @@ -31,6 +31,7 @@ | ||
31 | </th> | 31 | </th> |
32 | <th>ID</th> | 32 | <th>ID</th> |
33 | <th>轮播图</th> | 33 | <th>轮播图</th> |
34 | + <th>移动轮播图</th> | ||
34 | <th>链接</th> | 35 | <th>链接</th> |
35 | <th>创建时间</th> | 36 | <th>创建时间</th> |
36 | <th>操作</th> | 37 | <th>操作</th> |
@@ -53,6 +54,15 @@ | @@ -53,6 +54,15 @@ | ||
53 | </notempty> | 54 | </notempty> |
54 | </td> | 55 | </td> |
55 | <td> | 56 | <td> |
57 | + <notempty name="vo.thumbnail_mobile"> | ||
58 | + <a href="javascript:parent.imagePreviewDialog('{:cmf_get_image_preview_url($vo.thumbnail_mobile)}');"> | ||
59 | + <i class="fa fa-photo fa-fw"></i> | ||
60 | + </a> | ||
61 | + <else/> | ||
62 | + <i class="fa fa-close fa-fw"></i> | ||
63 | + </notempty> | ||
64 | + </td> | ||
65 | + <td> | ||
56 | {$vo.link} | 66 | {$vo.link} |
57 | </td> | 67 | </td> |
58 | <td> | 68 | <td> |
-
请 注册 或 登录 后发表评论