提交 70518aae 编写于 作者: Skyeye云's avatar Skyeye云

小程序模板允许html和html_js的修改

上级 b8ee4887
......@@ -116,12 +116,14 @@
<update id="editRmGroupMemberMationById" parameterType="java.util.Map">
UPDATE rm_group_member
<set>
<if test="htmlContent != '' and htmlContent != null">
html_content = #{htmlContent},
</if>
html_js_content = #{htmlJsContent},
<if test="wxmlContent != '' and wxmlContent != null">
wxml_content = #{wxmlContent},
</if>
<if test="wxmlJsContent != '' and wxmlJsContent != null">
wxml_js_content = #{wxmlJsContent},
</if>
wxml_js_content = #{wxmlJsContent},
<if test="img != '' and img != null">
prints_pic_url = #{img},
</if>
......
......@@ -254,6 +254,8 @@
<property id="rowId" name="id" ref="required" var="小程序组件id"/>
</url>
<url id="rmxcx021" path="/post/RmGroupMemberController/editRmGroupMemberMationById" val="编辑小程序组件信息" allUse="1">
<property id="htmlContent" name="htmlContent" ref="required" var="html内容"/>
<property id="htmlJsContent" name="htmlJsContent" ref="" var="html对应的js内容"/>
<property id="wxmlContent" name="wxmlContent" ref="required" var="wxml内容"/>
<property id="wxmlJsContent" name="wxmlJsContent" ref="" var="wxml对应的js内容"/>
<property id="rowId" name="id" ref="required" var="小程序组件id"/>
......
......@@ -2657,6 +2657,9 @@ body .layer-ext-winconfirm {
border: 2px solid rgba(0, 0, 0, 0.9);
border-radius: 3px;
}
.iphone-screen>.check-item:HOVER{
border: 1px black solid;
}
.iphone-screen img {
width: 100%;
}
......
......@@ -39,6 +39,8 @@ layui.config({
if (winui.verifyForm(data.elem)) {
var params = {
htmlContent: encodeURI($("#htmlContent").val()),
htmlJsContent: encodeURI($("#htmlJsContent").val()),
wxmlContent: encodeURI($("#wxmlContent").val()),
wxmlJsContent: encodeURI($("#wxmlJsContent").val()),
rowId: parent.rowId,
......@@ -60,6 +62,18 @@ layui.config({
}
});
//HTML内容变化事件
$("body").on("input", "#htmlContent", function(){
$("#htmlJsContentScript").html('<script>layui.define(["jquery"], function(exports) {var jQuery = layui.jquery;(function($) {' + $("#htmlJsContent").val() + '})(jQuery);});</script>');
$("#printPic").html($(this).val());
});
//HTML-JS内容变化事件
$("body").on("change", "#htmlJsContent", function(){
$("#htmlJsContentScript").html('<script>layui.define(["jquery"], function(exports) {var jQuery = layui.jquery;(function($) {' + $("#htmlJsContent").val() + '})(jQuery);});</script>');
// $("#htmlJsContent").val(do_js_beautify($(this).val()));
});
//取消
$("body").on("click", "#cancle", function(){
parent.layer.close(index);
......
......@@ -66,7 +66,7 @@ layui.config({
}
}).on('drop', function (el, container) {//放置
if($(container).attr("id") == 'centerText'){//放置在手机里面
el.className = 'layui-col-md12';
el.className = 'layui-col-md12 check-item';
var content = $(el).attr("htmlContent");
var JsContent = '<script>layui.define(["jquery"], function(exports) {var jQuery = layui.jquery;(function($) {' + $(el).attr("htmlJsContent") + '})(jQuery);});</script>'
$(el).html(content + JsContent);
......
......@@ -14,13 +14,22 @@
<div class="layui-form-item">
<label class="layui-form-label">HTML内容<i class="red">*</i></label>
<div class="layui-input-block">
{{htmlContent}}
<textarea id="htmlContent" name="htmlContent" win-verify="required" placeholder="请填写代码块" class="layui-textarea" style="height: 100px;">{{htmlContent}}</textarea>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">HTML-JS内容</label>
<div class="layui-input-block">
{{htmlJsContent}}
<textarea id="htmlJsContent" name="htmlJsContent" placeholder="请填写代码块" class="layui-textarea" style="height: 100px;">{{htmlJsContent}}</textarea>
<div id="htmlJsContentScript"></div>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">效果图<i class="red">*</i></label>
<div class="layui-col-xs6">
<div class="layui-col-xs10" id="printPic">
</div>
</div>
</div>
<div class="layui-form-item">
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册