admin
2020-07-22 b379901eb97d198c495de73b2dda74922d171fea
参数模板嵌入
7个文件已修改
1个文件已添加
590 ■■■■ 已修改文件
childPath/editor/message/wangYe.html 475 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
childPath/looks/layout_2.html 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
childPath/looks/special_activity_inner.html 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
childPath/looks/swiper2.html 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
home.html 补丁 | 查看 | 原始文档 | blame | 历史
js/admin-creat.js 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
js/jumpParams.js 87 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
js/pageEditTan.xml 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
childPath/editor/message/wangYe.html
@@ -7,8 +7,11 @@
        <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
        <title>网页推送</title>
        <link rel="stylesheet" type="text/css" href="../../../css/doui.min.css"/>
        <link rel="stylesheet" type="text/css" href="../../../layui/css/layui.css" />
        <script src="../../../layui/layui.all.js" type="text/javascript" charset="utf-8"></script>
        <script src="../../../js/doui.min.js" type="text/javascript" charset="utf-8"></script>
        <script src="../../../js/requestHost.js" type="text/javascript" charset="utf-8"></script>
        <script src="../../../js/jumpParams.js" type="text/javascript" charset="utf-8"></script>
        <script type="text/javascript">
            doui.importLoad({
                importArray: [
@@ -42,40 +45,62 @@
<script type="text/javascript">
    // ==================================================================================== 页面数据
    doui.onReady({
        success: function ()
        {
        success: function() {
            // ----------------------------------------------------- 顶部
            // 生成顶部筛选项dom
            adminDom.header.creat({ el: "#thisHeader" });
            adminDom.header.creat({
                el: "#thisHeader"
            });
            // 输入类型
            adminDom.header.select({
                show: true,
                list: [
                    { key: "1", value: "标题" },
                    { key: "2", value: "内容" },
                    { key: "3", value: "用户ID" },
                list: [{
                        key: "1",
                        value: "标题"
                    },
                    {
                        key: "2",
                        value: "内容"
                    },
                    {
                        key: "3",
                        value: "用户ID"
                    },
                ],
            });
            // 输入搜索
            adminDom.header.input({ placeholder: "根据选择填写", });
            adminDom.header.input({
                placeholder: "根据选择填写",
            });
            // 筛选项
            adminDom.header.screen({ 
                show: true,
                list: [
                    {
                list: [{
                        title: "推送状态", 
                        muchCheck: false, // 是否可以多选
                        child: [
                            { key: ["0"], value: "未推送", check: false },
                            { key: ["1"], value: "推送成功", check: false },
                            { key: ["2"], value: "推送失败", check: false },
                        ],
                        input: { type: "number", num: 0 },
                    child: [{
                            key: ["0"],
                            value: "未推送",
                            check: false
                        },
                        {
                            key: ["1"],
                            value: "推送成功",
                            check: false
                        },
                        {
                            key: ["2"],
                            value: "推送失败",
                            check: false
                    },
                ],
                    input: {
                        type: "number",
                        num: 0
                    },
                }, ],
            });
            
            
@@ -84,9 +109,10 @@
            adminDom.table.creat({
                el: "#thisTable",
                // 搜索触发
                touchSearch: function (optC)
                {
                    doui.showLoading({ content: "加载列表" });
                touchSearch: function(optC) {
                    doui.showLoading({
                        content: "加载列表"
                    });
                    doui.request({
                        type: "jsonp",
                        url: gethttp() + "/admin/new/api/v1/pushInfo/query",
@@ -98,139 +124,283 @@
                            key: optC.input[0].result, // 搜索关键字
                            state: optC.screen[0].result[0], // 推送状态
                        },
                        success: function (res)
                        {
                        success: function(res) {
                            doui.hideLoading();
                            if (res.code != 0) { doui.showToast({ content: res.msg }); }
                            else
                            {
                            if (res.code != 0) {
                                doui.showToast({
                                    content: res.msg
                                });
                            } else {
                                // 申明 表格内容数据
                                var mo_tr = []; // tr组
                                for (var i = 0, mo = res.data.result_list; i < mo.length; i++)
                                {
                                for (var i = 0, mo = res.data.result_list; i < mo.length; i++) {
                                    // 当前行
                                    var thatTr = {
                                        check: false,
                                        td: [
                                            { title: "状态", key: mo[i].state, value: mo[i].state },
                                            { title: "预设时间", key: mo[i].controlTime_str, value: mo[i].controlTime_str, "class": "font13 font-gray" },
                                            { title: "推送时间", key: mo[i].pushTime, value: mo[i].pushTime, "class": "font13 font-gray" },
                                            { title: "ID", key: mo[i].id, value: mo[i].id },
                                            { title: "标题", key: mo[i].title, value: mo[i].title },
                                            { title: "内容", key: mo[i].content, value: mo[i].content },
                                            { title: "网页地址", key: mo[i].url, value: mo[i].url, "dataType": "link" },
                                            { title: "推送用户", key: mo[i].uids, value: mo[i].uids },
                                            { title: "安卓推送版本", key: mo[i].listAndroid, value: "(缺省)" },
                                            { title: "IOS推送版本", key: mo[i].listIOS, value: "(缺省)" },
                                            { title: "自动推送", key: mo[i].timeTask, value: mo[i].timeTask?"是":"否", "class": mo[i].timeTask?"font-green":"font-red" },
                                            { title: "备注", key: mo[i].remark, value: mo[i].remark }
                                        td: [{
                                                title: "状态",
                                                key: mo[i].state,
                                                value: mo[i].state
                                            },
                                            {
                                                title: "预设时间",
                                                key: mo[i].controlTime_str,
                                                value: mo[i].controlTime_str,
                                                "class": "font13 font-gray"
                                            },
                                            {
                                                title: "推送时间",
                                                key: mo[i].pushTime,
                                                value: mo[i].pushTime,
                                                "class": "font13 font-gray"
                                            },
                                            {
                                                title: "ID",
                                                key: mo[i].id,
                                                value: mo[i].id
                                            },
                                            {
                                                title: "标题",
                                                key: mo[i].title,
                                                value: mo[i].title
                                            },
                                            {
                                                title: "内容",
                                                key: mo[i].content,
                                                value: mo[i].content
                                            },
                                            {
                                                title: "网页地址",
                                                key: mo[i].url,
                                                value: mo[i].url,
                                                "dataType": "link"
                                            },
                                            {
                                                title: "推送用户",
                                                key: mo[i].uids,
                                                value: mo[i].uids
                                            },
                                            {
                                                title: "安卓推送版本",
                                                key: mo[i].listAndroid,
                                                value: "(缺省)"
                                            },
                                            {
                                                title: "IOS推送版本",
                                                key: mo[i].listIOS,
                                                value: "(缺省)"
                                            },
                                            {
                                                title: "自动推送",
                                                key: mo[i].timeTask,
                                                value: mo[i].timeTask ? "是" : "否",
                                                "class": mo[i].timeTask ? "font-green" : "font-red"
                                            },
                                            {
                                                title: "备注",
                                                key: mo[i].remark,
                                                value: mo[i].remark
                                            }
                                        ],
                                    };
                                    // 状态分析
                                    if (thatTr.td[0].key == 0) { thatTr.td[0].value = "未推送"; thatTr.td[0]["class"]="font-orange"; }
                                    else if (thatTr.td[0].key == 1) { thatTr.td[0].value = "推送成功"; thatTr.td[0]["class"]="font-green"; }
                                    else if (thatTr.td[0].key == 2) { thatTr.td[0].value = "推送失败"; thatTr.td[0]["class"]="font-red"; }
                                    if (thatTr.td[0].key == 0) {
                                        thatTr.td[0].value = "未推送";
                                        thatTr.td[0]["class"] = "font-orange";
                                    } else if (thatTr.td[0].key == 1) {
                                        thatTr.td[0].value = "推送成功";
                                        thatTr.td[0]["class"] = "font-green";
                                    } else if (thatTr.td[0].key == 2) {
                                        thatTr.td[0].value = "推送失败";
                                        thatTr.td[0]["class"] = "font-red";
                                    }
                                    // 用户分析
                                    if (!thatTr.td[7].key || thatTr.td[7].key == 0 || thatTr.td[7].key == "") { thatTr.td[7].value = "不限"; thatTr.td[7]["class"]="font-gray"; }
                                    if (!thatTr.td[7].key || thatTr.td[7].key == 0 || thatTr.td[7].key == "") {
                                        thatTr.td[7].value = "不限";
                                        thatTr.td[7]["class"] = "font-gray";
                                    }
                                    // 版本分析
                                    if (thatTr.td[8].key.length <= 0) { thatTr.td[8]["class"]="font-gray"; }
                                    else { thatTr.td[8].value = thatTr.td[8].key.join("—"); }
                                    if (thatTr.td[9].key.length <= 0) { thatTr.td[9]["class"]="font-gray"; }
                                    else { thatTr.td[9].value = thatTr.td[9].key.join("—"); }
                                    if (thatTr.td[8].key.length <= 0) {
                                        thatTr.td[8]["class"] = "font-gray";
                                    } else {
                                        thatTr.td[8].value = thatTr.td[8].key.join("—");
                                    }
                                    if (thatTr.td[9].key.length <= 0) {
                                        thatTr.td[9]["class"] = "font-gray";
                                    } else {
                                        thatTr.td[9].value = thatTr.td[9].key.join("—");
                                    }
                                    // 将当前行放入tr组
                                    mo_tr.push(thatTr);
                                }
                                // 更新表格的数据
                                adminDom.table.opt({ pageMax: res.data.pe.totalPage }); // 最大页码
                                adminDom.table.tbody({ tr: mo_tr }); // 内容数据
                                adminDom.table.opt({
                                    pageMax: res.data.pe.totalPage
                                }); // 最大页码
                                adminDom.table.tbody({
                                    tr: mo_tr
                                }); // 内容数据
                            }
                        }
                    });
                },
            });
            // 表格设置
            adminDom.table.opt({ pageSize: 20, });
            adminDom.table.opt({
                pageSize: 20,
            });
            // 表格头排
            adminDom.table.thead({
                th: [
                    { title: "状态", width: "", orderUp: "", orderDown: "", },
                    { title: "预设时间", width: "", orderUp: "", orderDown: "",
                th: [{
                        title: "状态",
                        width: "",
                        orderUp: "",
                        orderDown: "",
                    },
                    {
                        title: "预设时间",
                        width: "",
                        orderUp: "",
                        orderDown: "",
                        edit: {
                            type: "datetime-local",
                        },
                    },
                    { title: "推送时间", width: "", orderUp: "", orderDown: "" },
                    { title: "ID", width: "", orderUp: "", orderDown: "", },
                    { title: "标题", width: "", orderUp: "", orderDown: "",
                    {
                        title: "推送时间",
                        width: "",
                        orderUp: "",
                        orderDown: ""
                    },
                    {
                        title: "ID",
                        width: "",
                        orderUp: "",
                        orderDown: "",
                    },
                    {
                        title: "标题",
                        width: "",
                        orderUp: "",
                        orderDown: "",
                        edit: {
                            type: "text",
                            placeholder: "如:双十一特价来袭",
                        },
                    },
                    { title: "内容", width: "", orderUp: "", orderDown: "",
                    {
                        title: "内容",
                        width: "",
                        orderUp: "",
                        orderDown: "",
                        edit: {
                            type: "text",
                            placeholder: "",
                        },
                    },
                    { title: "网页地址", width: "", orderUp: "", orderDown: "",
                    {
                        title: "网页地址",
                        width: "",
                        orderUp: "",
                        orderDown: "",
                        edit: {
                            type: "text",
                            placeholder: "http://......",
                            jumpParams: true,
                        },
                    },
                    { title: "推送用户", width: "", orderUp: "", orderDown: "",
                    {
                        title: "推送用户",
                        width: "",
                        orderUp: "",
                        orderDown: "",
                        edit: {
                            type: "text",
                            placeholder: "如:911382(多个用户用英文逗号间隔,不填则全员推送)",
                        },
                    },
                    { title: "安卓推送版本", width: "", orderUp: "", orderDown: "",
                    {
                        title: "安卓推送版本",
                        width: "",
                        orderUp: "",
                        orderDown: "",
                        edit: {
                            type: "check",
                            list: [],
                        },
                    },
                    { title: "IOS推送版本", width: "", orderUp: "", orderDown: "",
                    {
                        title: "IOS推送版本",
                        width: "",
                        orderUp: "",
                        orderDown: "",
                        edit: {
                            type: "check",
                            list: [],
                        },
                    },
                    { title: "自动推送", width: "", orderUp: "", orderDown: "",
                    {
                        title: "自动推送",
                        width: "",
                        orderUp: "",
                        orderDown: "",
                        edit: {
                            type: "radio",
                            list: [
                                { key: false, value: "否" },
                                { key: true, value: "是" }
                            list: [{
                                    key: false,
                                    value: "否"
                                },
                                {
                                    key: true,
                                    value: "是"
                                }
                            ],
                        },
                    },
                    
                    { title: "备注", width: "", orderUp: "", orderDown: "" },
                    {
                        title: "备注",
                        width: "",
                        orderUp: "",
                        orderDown: ""
                    },
                ]
            });
            // 工具栏
            adminDom.table.tools({
                show: true,
                list: [
                    { "title": "新建", "name": "add", "icon": "fi fi-plus" },
                    { "title": "删除", "name": "del", "icon": "fi fi-trash" },
                    { "title": "修改", "name": "edit", "icon": "fi fi-edit-box" },
                    { "title": "推送", "name": "work", "icon": "admin adminhuaban" },
                list: [{
                        "title": "新建",
                        "name": "add",
                        "icon": "fi fi-plus"
                    },
                    {
                        "title": "删除",
                        "name": "del",
                        "icon": "fi fi-trash"
                    },
                    {
                        "title": "修改",
                        "name": "edit",
                        "icon": "fi fi-edit-box"
                    },
                    {
                        "title": "推送",
                        "name": "work",
                        "icon": "admin adminhuaban"
                    },
                ],
                touch: function (back)
                {
                touch: function(back) {
                    // 新建
                    if (back.toolName == "add")
                    {
                    if (back.toolName == "add") {
                        // 修改弹框创建
                        adminDom.editTan.creat({
                            el: ".winSizeBox",
                            // 数据修改提交触发
                            touchSubmit: function (thereData)
                            {
                                doui.showLoading({ content: "正在处理" });
                            touchSubmit: function(thereData) {
                                doui.showLoading({
                                    content: "正在处理"
                                });
                                doui.request({
                                    type: "jsonp",
                                    url: gethttp() + "/admin/new/api/v1/pushInfo/save",
@@ -245,56 +415,74 @@
                                        timeTask: thereData.list[10].key,
                                        controlTime_str: thereData.list[1].key,
                                    },
                                    success: function (res)
                                    {
                                    success: function(res) {
                                        doui.hideLoading();
                                        if (res.code != 0) { doui.showToast({ content: res.msg }); }
                                        else
                                        {
                                        if (res.code != 0) {
                                            doui.showToast({
                                                content: res.msg
                                            });
                                        } else {
                                            adminDom.editTan.remove();
                                            doui.showToast({ content: "新建成功" });
                                            doui.showToast({
                                                content: "新建成功"
                                            });
                                            vm_table.search();
                                        }
                                    }
                                });
                            },
                        });
                        adminDom.editTan.opt({ title: "新建", });
                        adminDom.editTan.thereData({ show: false, });
                        adminDom.editTan.opt({
                            title: "新建",
                        });
                        adminDom.editTan.thereData({
                            show: false,
                        });
                    }
                    
                    // 删除
                    else if (back.toolName == "del")
                    {
                    else if (back.toolName == "del") {
                        // 被选中的行id组构建
                        var zu_id = new Array();
                        for (var i = 0, mo = back.list; i < mo.length; i++) { zu_id.push(mo[i][3].key); }
                        for (var i = 0, mo = back.list; i < mo.length; i++) {
                            zu_id.push(mo[i][3].key);
                        }
                        // 发起请求
                        doui.showLoading("正在删除");
                        doui.request({
                            type: "jsonp",
                            url: gethttp() + "/admin/new/api/v1/pushInfo/delete",
                            data: { idArray: zu_id },
                            success: function (res)
                            {
                            data: {
                                idArray: zu_id
                            },
                            success: function(res) {
                                doui.hideLoading();
                                if (res.code != 0) { doui.showToast(res.msg); }
                                else { doui.showToast("删除成功"); vm_table.search(); }
                                if (res.code != 0) {
                                    doui.showToast(res.msg);
                                } else {
                                    doui.showToast("删除成功");
                                    vm_table.search();
                                }
                            }
                        });
                    }
                    
                    // 修改列表
                    else if (back.toolName == "edit")
                    {
                        if (back.list.length > 1) { doui.showToast({ content: "一次只能操作一个" }); return false; }
                    else if (back.toolName == "edit") {
                        if (back.list.length > 1) {
                            doui.showToast({
                                content: "一次只能操作一个"
                            });
                            return false;
                        }
                        
                        // 修改弹框创建
                        adminDom.editTan.creat({
                            el: ".winSizeBox",
                            touchSubmit: function (thereData)
                            {
                                doui.showLoading({ content: "正在处理" });
                            touchSubmit: function(thereData) {
                                doui.showLoading({
                                    content: "正在处理"
                                });
                                doui.request({
                                    type: "jsonp",
                                    url: gethttp() + "/admin/new/api/v1/pushInfo/save",
@@ -310,41 +498,61 @@
                                        timeTask: thereData.list[10].key,
                                        controlTime_str: thereData.list[1].key,
                                    },
                                    success: function (res)
                                    {
                                    success: function(res) {
                                        doui.hideLoading();
                                        if (res.code != 0) { doui.showToast({ content: res.msg }); }
                                        else
                                        {
                                        if (res.code != 0) {
                                            doui.showToast({
                                                content: res.msg
                                            });
                                        } else {
                                            adminDom.editTan.remove();
                                            doui.showToast({ content: "修改成功" });
                                            doui.showToast({
                                                content: "修改成功"
                                            });
                                            vm_table.search();
                                        }
                                    }
                                });
                            },
                        });
                        adminDom.editTan.opt({ title: "修改" });
                        adminDom.editTan.thereData({ show: true, list: back.list[0] });
                        adminDom.editTan.opt({
                            title: "修改"
                        });
                        adminDom.editTan.thereData({
                            show: true,
                            list: back.list[0]
                        });
                    }
                    
                    // 推送
                    else if (back.toolName == "work")
                    {
                    else if (back.toolName == "work") {
                        // 获取所选行的ID
                        var zu_id = new Array();
                        for (var i = 0, mo = back.list; i < mo.length; i++) { zu_id.push(mo[i][3].key); }
                        for (var i = 0, mo = back.list; i < mo.length; i++) {
                            zu_id.push(mo[i][3].key);
                        }
                        // 发起请求
                        doui.showLoading({ content: "正在推送" });
                        doui.showLoading({
                            content: "正在推送"
                        });
                        doui.request({
                            type: "jsonp",
                            url: gethttp() + "/admin/new/api/v1/pushInfo/push",
                            data: { idArray: zu_id, },
                            success: function (res)
                            {
                            data: {
                                idArray: zu_id,
                            },
                            success: function(res) {
                                doui.hideLoading();
                                if (res.code != 0) { doui.showToast({ content: res.msg }); }
                                else { doui.showToast({ content: "推送成功" }); vm_table.search(); }
                                if (res.code != 0) {
                                    doui.showToast({
                                        content: res.msg
                                    });
                                } else {
                                    doui.showToast({
                                        content: "推送成功"
                                    });
                                    vm_table.search();
                                }
                            }
                        });
                    }
@@ -364,33 +572,36 @@
    
    // ==================================================================================== 数据请求
    // 获取版本
    function versionRequest ()
    {
    function versionRequest() {
        // 发起请求
        doui.request({
            type: "jsonp",
            url: gethttp() + "/admin/new/api/v1/config/getVersionList",
            data: {},
            success: function (res)
            {
                if (res.code != 0) { doui.showToast({ content: res.msg }); }
                else
                {
            success: function(res) {
                if (res.code != 0) {
                    doui.showToast({
                        content: res.msg
                    });
                } else {
                    // 安卓列表分析
                    for (var i = 0, mo = res.data.android; i < mo.length; i++)
                    {
                        var jiedian = { key: mo[i].version, value: mo[i].version };
                    for (var i = 0, mo = res.data.android; i < mo.length; i++) {
                        var jiedian = {
                            key: mo[i].version,
                            value: mo[i].version
                        };
                        vm_table.thead.th[8].edit.list.push(jiedian);
                    }
                    // ios列表分析
                    for (var i = 0, mo = res.data.ios; i < mo.length; i++)
                    {
                        var jiedian = { key: mo[i].version, value: mo[i].version };
                    for (var i = 0, mo = res.data.ios; i < mo.length; i++) {
                        var jiedian = {
                            key: mo[i].version,
                            value: mo[i].version
                        };
                        vm_table.thead.th[9].edit.list.push(jiedian);
                    }
                }
            },
        });
    }
</script>
childPath/looks/layout_2.html
@@ -11,6 +11,7 @@
        <script src="../../js/requestHost.js" type="text/javascript" charset="utf-8"></script>
        <script src="../../js/versionControl.js" type="text/javascript" charset="utf-8"></script>
        <script src="../../layui/layui.all.js" type="text/javascript" charset="utf-8"></script>
        <script src="../../js/jumpParams.js" type="text/javascript" charset="utf-8"></script>
        <script type="text/javascript">
            doui.importLoad({
                importArray: [
@@ -547,6 +548,7 @@
                        edit: {
                            type: "textarea",
                            placeholder: '如:{"url":"http://www.baidu.com","name":"百度跳转"}',
                            jumpParams:true,
                        },
                    },
                    {
childPath/looks/special_activity_inner.html
@@ -10,6 +10,7 @@
        <script src="../../js/doui.min.js" type="text/javascript" charset="utf-8"></script>
        <script src="../../js/requestHost.js" type="text/javascript" charset="utf-8"></script>
        <script src="../../js/versionControl.js" type="text/javascript" charset="utf-8"></script>
        <script src="../../js/jumpParams.js" type="text/javascript" charset="utf-8"></script>
        <script src="../../layui/layui.all.js" type="text/javascript" charset="utf-8"></script>
        <script type="text/javascript">
            doui.importLoad({
@@ -547,6 +548,7 @@
                        edit: {
                            type: "textarea",
                            placeholder: '如:{"url":"http://www.baidu.com","name":"百度跳转"}',
                            jumpParams:true
                        },
                    },
                    {
childPath/looks/swiper2.html
@@ -10,6 +10,7 @@
        <script src="../../js/requestHost.js" type="text/javascript" charset="utf-8"></script>
        <script src="../../layui/layui.all.js" type="text/javascript" charset="utf-8"></script>
        <script src="../../js/versionControl.js" type="text/javascript" charset="utf-8"></script>
        <script src="../../js/jumpParams.js" type="text/javascript" charset="utf-8"></script>
        <script type="text/javascript">
            doui.importLoad({
                importArray: [
@@ -359,6 +360,7 @@
                        edit: {
                            type: "textarea",
                            placeholder: '如:{"url":"http://www.baidu.com","name":"百度跳转"}',
                            jumpParams:true,
                        },
                    },
                    {
home.html
js/admin-creat.js
@@ -12,7 +12,6 @@
    hostPath: "/flqAdmin/", // 项目根目录
    requestGet: function (XMLurlC)
    {
        // 加载XMLDoc
        var xhttp = null;
        if (window.XMLHttpRequest) { xhttp = new XMLHttpRequest(); }
        else { xhttp = new ActiveXObject("Microsoft.XMLHTTP"); }
@@ -605,7 +604,8 @@
            if (typeof(objC.el)=="undefined") { objC.el = "body"; } // 要在哪个标签里面书写dom
            if (typeof(objC.touch)=="undefined") { objC.touch = function () {}; } // 操作变更触发的回调方法
            if (typeof(objC.touchSubmit)=="undefined") { objC.touchSubmit = function () {}; } // 提交按钮点击触发的回调方法
            if(typeof(jumpParamsContorls)!="undefined")
                jumpParamsContorls.init();
            // 请求对应的pageHeader.xml
            var dom_str = adminDom.requestGet(adminDom.hostPath+"js/pageEditTan.xml");
            // 打印xml的节点
@@ -757,6 +757,14 @@
                        jiedian["del"] = false;
                        jiedian["filePath"] = "";
                    }
                    //是否是选择跳转参数
                    try{
                    if(typeof(mo[i].edit.jumpParams)!="undefined"&&mo[i].edit.jumpParams){
                        jiedian["jumpParams"] = true;
                    }
                    }catch(e){}
                    mo_zu.push(jiedian);
                }
                vm_editTan.thereData.list = mo_zu;
js/jumpParams.js
New file
@@ -0,0 +1,87 @@
//跳转参数控制器
var jumpParamsContorls = {
    types: [{
            name: '京东可转链网页(网页跳转方式)',
            template: "{\"url\":\"http://apph5.banliapp.com/help/jd.html?url={内容}\"}"
        },
        {
            name: '百川网页',
            template: "{\"url\":\"http://apph5.banliapp.com/help/tb.html?url={内容}\"}"
        },
        {
            name: '团油',
            template: "{\"url\":\"http://apph5.banliapp.com/help/tuanyou.html\"}"
        },
        {
            name: '通用链接(网页/百川跳转方式)',
            template: "{\"url\":\"{内容}\"}"
        }
    ],
    init: function(navContainer) {
        //加入弹出层
        var html = "";
        html += "    <div id=\"jumpParamsDialog\" style=\"display: none;\">";
        html += "    <form class=\"layui-form\" lay-filter='p-form'>";
        html += "        <div style=\"width: 100%;height: auto;padding:0.1rem;\" >";
        html += "<div class='layui-form-item layui-form-text'>";
        html += "  <label class='layui-form-label'>跳转类型</label>";
        html += "  <div class='layui-input-inline'>";
        html += "<select id='jumpParamsType' >";
        for (var i = 0; i < jumpParamsContorls.types.length; i++) {
            html += "<option value=" + i + ">" + jumpParamsContorls.types[i].name + "</option>";
        }
        html += "</select>";
        html += "  </div>";
        html += "</div>";
        html += "<div class='layui-form-item layui-form-text'>";
        html += "  <label class='layui-form-label'>内容</label>";
        html += "  <div class='layui-input-block' style='width:200px;min-width:200px;max-width:200px;'>";
        html +=
            "    <textarea placeholder='请输入内容' class='layui-textarea' style='width:50%;max-width:100%' id='jumpParamsContent'></textarea>";
        html += "  </div>";
        html += "</div>";
        html += "<div id=\"control\" style=\"position: absolute;bottom: 10px;right: 10px;\">";
        html += "        <div class=\"layui-btn layui-btn-primary cancel\">取消</div>";
        html += "        <button class=\"layui-btn sure\" lay-submit lay-filter=\"sure\">确定</button>";
        html += "</div>";
        html += "</div>";
        html += "</form>";
        html += "</div>";
        $("body").append(html);
    },
    show: function(callback) {
        var dialog = layer.open({
            type: 1,
            title: '跳转参数选择',
            shadeClose: true,
            shade: 0.8,
            area: ['650px', '300px'],
            content: $("#jumpParamsDialog").html(), //iframe的url
        });
        layui.use('form', function() {
            form = layui.form;
        });
        //监听提交
        form.on('submit(sure)', function(data) {
            var index = parseInt($(".layui-layer-content").find("#jumpParamsType").eq(0).val());
            var type = jumpParamsContorls.types[index];
            var content = $(".layui-layer-content").find("#jumpParamsContent").eq(0).val();
            callback(type.template.replace("{内容}", content));
            layer.close(dialog);
            return false;
        });
        setTimeout(function() {
            form.render();
        }, 100);
        setTimeout(function() {
            $("#control .cancel").bind("click", function() {
                layer.close(dialog);
            });
        }, 100);
    }
};
js/pageEditTan.xml
@@ -24,14 +24,20 @@
                    <div style="min-width:2rem; max-width:5rem; min-height:60px;">
                        <!-- 文本输入 -->
                        <div v-if="item.edit.type=='text'" class="fboxWrap Xstart Ystart" >
                            <div class="inputShell admin-header-input" style="width:535px; margin:10px 0px 0px 0px">
                            <div class="inputShell admin-header-input" style="width:535px; margin:10px 0px 0px 0px;position:relative;">
                                <input type="text"  :placeholder="item.edit.placeholder" v-model="thereData.list[index].key"/>
                                <a v-if="item.edit.jumpParams"  style="text-decoration: none;color:#FF0000;position:absolute;bottom:5px;right:8px;cursor:pointer;" onclick="javascript:var $this=$(this);jumpParamsContorls.show(function(result){ var json=JSON.parse(result); $this.parent().find('input').val(json['url'])});">
                                    参数模板
                                </a>
                            </div>
                        </div>
                        
                        <!-- 文本输入 -->
                        <div v-if="item.edit.type=='textarea'" class="fboxWrap Xstart Ystart" style="margin-top:10px;">
                        <div v-if="item.edit.type=='textarea'" class="fboxWrap Xstart Ystart" style="margin-top:10px;position:relative;" >
                            <textarea :placeholder="item.edit.placeholder" v-model="thereData.list[index].key"></textarea>
                            <a v-if="item.edit.jumpParams"  style="text-decoration: none;color:#FF0000;position:absolute;bottom:5px;right:8px;cursor:pointer;" onclick="javascript:var $this=$(this);jumpParamsContorls.show(function(result){$this.parent().find('textarea').val(result)});">
                                参数模板
                            </a>
                        </div>
                        
                        <!-- radio单选项 -->