define(['jquery.ui', '../../js/goods_selector.js'], function(ui, gSelector) { var modal = { sysinfo: null, id: 0, type: 1, navs: {}, initnav: [], data: {}, selected: 'page', childid: null, keyworderr: false, }; jQuery.base64 = (function($) { var _PADCHAR = "=", _ALPHA = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", _VERSION = "1.1"; function _getbyte64(s, i) { var idx = _ALPHA.indexOf(s.charAt(i)); if(idx === -1) { throw "Cannot decode base64" } return idx } function _decode_chars(y, x) { while(y.length > 0) { var ch = y[0]; if(ch < 0x80) { y.shift(); x.push(String.fromCharCode(ch)) } else if((ch & 0x80) == 0xc0) { if(y.length < 2) break; ch = y.shift(); var ch1 = y.shift(); x.push(String.fromCharCode(((ch & 0x1f) << 6) + (ch1 & 0x3f))) } else { if(y.length < 3) break; ch = y.shift(); var ch1 = y.shift(); var ch2 = y.shift(); x.push(String.fromCharCode(((ch & 0x0f) << 12) + ((ch1 & 0x3f) << 6) + (ch2 & 0x3f))) } } } function _decode(s) { var pads = 0, i, b10, imax = s.length, x = [], y = []; s = String(s); if(imax === 0) { return s } if(imax % 4 !== 0) { throw "Cannot decode base64" } if(s.charAt(imax - 1) === _PADCHAR) { pads = 1; if(s.charAt(imax - 2) === _PADCHAR) { pads = 2 } imax -= 4 } for(i = 0; i < imax; i += 4) { var ch1 = _getbyte64(s, i); var ch2 = _getbyte64(s, i + 1); var ch3 = _getbyte64(s, i + 2); var ch4 = _getbyte64(s, i + 3); b10 = (_getbyte64(s, i) << 18) | (_getbyte64(s, i + 1) << 12) | (_getbyte64(s, i + 2) << 6) | _getbyte64(s, i + 3); y.push(b10 >> 16); y.push((b10 >> 8) & 0xff); y.push(b10 & 0xff); _decode_chars(y, x) } switch(pads) { case 1: b10 = (_getbyte64(s, i) << 18) | (_getbyte64(s, i + 1) << 12) | (_getbyte64(s, i + 2) << 6); y.push(b10 >> 16); y.push((b10 >> 8) & 0xff); break; case 2: b10 = (_getbyte64(s, i) << 18) | (_getbyte64(s, i + 1) << 12); y.push(b10 >> 16); break } _decode_chars(y, x); if(y.length > 0) throw "Cannot decode base64"; return x.join("") } function _get_chars(ch, y) { if(ch < 0x80) y.push(ch); else if(ch < 0x800) { y.push(0xc0 + ((ch >> 6) & 0x1f)); y.push(0x80 + (ch & 0x3f)) } else { y.push(0xe0 + ((ch >> 12) & 0xf)); y.push(0x80 + ((ch >> 6) & 0x3f)); y.push(0x80 + (ch & 0x3f)) } } function _encode(s) { if(arguments.length !== 1) { throw "SyntaxError: exactly one argument required" } s = String(s); if(s.length === 0) { return s } var i, b10, y = [], x = [], len = s.length; i = 0; while(i < len) { _get_chars(s.charCodeAt(i), y); while(y.length >= 3) { var ch1 = y.shift(); var ch2 = y.shift(); var ch3 = y.shift(); b10 = (ch1 << 16) | (ch2 << 8) | ch3; x.push(_ALPHA.charAt(b10 >> 18)); x.push(_ALPHA.charAt((b10 >> 12) & 0x3F)); x.push(_ALPHA.charAt((b10 >> 6) & 0x3f)); x.push(_ALPHA.charAt(b10 & 0x3f)) } i++ } switch(y.length) { case 1: var ch = y.shift(); b10 = ch << 16; x.push(_ALPHA.charAt(b10 >> 18) + _ALPHA.charAt((b10 >> 12) & 0x3F) + _PADCHAR + _PADCHAR); break; case 2: var ch1 = y.shift(); var ch2 = y.shift(); b10 = (ch1 << 16) | (ch2 << 8); x.push(_ALPHA.charAt(b10 >> 18) + _ALPHA.charAt((b10 >> 12) & 0x3F) + _ALPHA.charAt((b10 >> 6) & 0x3f) + _PADCHAR); break } return x.join("") } return { decode: _decode, encode: _encode, VERSION: _VERSION } }(jQuery)); modal.init = function(params) { window.tpl = params.tpl; modal.goods = ''; modal.headline = ''; modal.shop = ''; modal.optionInfo = ''; modal.attachurl = params.attachurl; modal.type = params.type; modal.diymenu = params.diymenu; modal.diyadv = params.diyadv; modal.menulist = params.menulist; modal.advlist = params.advlist; modal.data = params.data; modal.id = params.id; modal.diymenu = params.diymenu; modal.diyadvs = params.diyadvs; modal.merch = params.merch; modal.plugins = params.plugins ? params.plugins : {}; modal.goodCate = params.goodCate; modal.community_list = params.community_list; if(modal.data) { modal.type = modal.data.page.type; modal.page = modal.data.page; modal.items = modal.data.items }; modal.optionInfoFun(); modal.initTpl(); modal.initPage(); modal.getNavs(); modal.initItems(); modal.initNavs(); modal.initSortable(); modal.initGotop(); modal.cubeFun(); $(".btn-save").unbind('click').click(function() { var status = $(this).data('status'); var type = $(this).data('type'); if(status) { tip.msgbox.err("正在保存,请稍候。。。"); return } if(type == 'preview') { modal.save(true); //保存并且预览 } else if(type == 'save') { modal.save(); //保存信息 } else if(type = 'savetemp') { modal.initTemp(); //保存为模板 return } }); $("#page").unbind('click').click(function() { $("#adv_title").html("本页面编辑"); //隐藏配置栏点击按钮 $("#nav_config").click(); $("#page_title").hide(); if(modal.selected == 'page') { return }; modal.selected = 'page'; modal.initPage() }); $(".pageset").unbind('click').click(function() { $("#page").trigger("click"); //隐藏配置栏点击按钮 $("#nav_config").click(); $("#page_title").hide(); }); }; modal.initNavs = function() { /** * search 搜索框组件 *** menu 菜单组件 *** banner 轮播图组件 * magic_cube 图片魔方组件 *** picturew 图片橱窗组件 *** pictures 图片展播组件 * richtext 富文本组件 *** title 标题组件 *** notice 公告组件 * line 辅助线组件 *** blank 辅助空白组件 *** rush_goods 抢购商品组件 * groupon_goods 团购商品组件 *** fightgroup_goods 拼团商品组件 *** bargain_goods 砍价商品组件 * public_goods 通用商品组件 *** coupon_goods 卡券商品组件 *** packages 大礼包商品组件 * discount_card 折扣卡商品组件 *** community 社群组件 *** shop 商户(商家信息)组件 * area_select 地区选择组件 *** options 选项卡组件 *** user_info 用户信息(定制) * shop_join 商户入驻组件 *** jump_wxapp 公众号跳转小程序组件 *** recruit_statistics 求职-统计组件 * recruit_enterprise 求职-企业组件 *** recruit_recruit 求职 - 招聘信息组件 *** recruit_resume 求职-简历组件 * flow 流量主组件 *** dating_statistics 相亲交友 - 统计组件 *** dating_user 相亲交友 - 会员组件 * integral_goods 积分商品组件 *** citydelivery_goods 配送商品组件 *** housekeep 家政服务组件 */ modal.getNavs(); //配置信息:0=所有内容(供开发者查看/无该页面配置信息时使用);1=自定义页面;2=商城首页;3=抢购首页;4=团购首页;5=卡券首页;6=拼团首页;7=砍价首页;8=好店首页;l4=活动首页; //l5=求职招聘首页;l6=相亲交友首页;l7=家政服务首页 var navgroup = { 0: ['search', 'menu', 'banner', 'magic_cube', 'picturew', 'pictures', 'richtext', 'title', 'notice', 'line', 'blank', 'rush_goods', 'groupon_goods', 'bargain_goods', 'fightgroup_goods', 'activity_goods', 'coupon_goods','integral_goods','citydelivery_goods', 'public_goods', 'packages', 'discount_card', 'community', 'shop', 'area_select', 'options', 'headline', 'shop_join', 'user_info', 'jump_wxapp', 'recruit_statistics', 'recruit_enterprise', 'recruit_recruit', 'flow','dating_statistics','dating_user','house_keep'], 1: ['search', 'menu', 'banner', 'magic_cube', 'picturew', 'pictures', 'richtext', 'title', 'notice', 'line', 'blank', 'rush_goods', 'groupon_goods', 'bargain_goods', 'fightgroup_goods', 'activity_goods', 'coupon_goods','integral_goods','citydelivery_goods', 'public_goods', 'packages', 'discount_card', 'community', 'shop', 'area_select', 'options', 'headline', 'shop_join', 'user_info', 'jump_wxapp', 'recruit_statistics', 'recruit_enterprise', 'recruit_recruit', 'flow','dating_statistics','dating_user','house_keep'], 2: ['search', 'menu', 'banner', 'magic_cube', 'picturew', 'pictures', 'richtext', 'title', 'notice', 'line', 'blank', 'rush_goods', 'groupon_goods', 'bargain_goods', 'fightgroup_goods', 'activity_goods', 'coupon_goods','integral_goods','citydelivery_goods', 'public_goods', 'packages', 'discount_card', 'community', 'shop', 'area_select', 'options', 'headline', 'shop_join', 'user_info', 'jump_wxapp', 'recruit_statistics', 'recruit_enterprise', 'recruit_recruit', 'flow','dating_statistics','dating_user','house_keep'], 3: ['search', 'menu', 'banner', 'magic_cube', 'picturew', 'pictures', 'richtext', 'title', 'notice', 'line', 'blank', 'rush_goods', 'community', 'area_select', 'options', 'user_info', 'jump_wxapp', 'flow'], 4: ['search', 'menu', 'banner', 'magic_cube', 'picturew', 'pictures', 'richtext', 'title', 'notice', 'line', 'blank', 'groupon_goods', 'community', 'area_select', 'options', 'user_info', 'jump_wxapp', 'flow'], 5: ['search', 'menu', 'banner', 'magic_cube', 'picturew', 'pictures', 'richtext', 'title', 'notice', 'line', 'blank', 'coupon_goods', 'community', 'area_select', 'options', 'user_info', 'jump_wxapp', 'flow'], 6: ['search', 'menu', 'banner', 'magic_cube', 'picturew', 'pictures', 'richtext', 'title', 'notice', 'line', 'blank', 'fightgroup_goods', 'community', 'area_select', 'options', 'user_info', 'jump_wxapp', 'flow'], 7: ['search', 'menu', 'banner', 'magic_cube', 'picturew', 'pictures', 'richtext', 'title', 'notice', 'line', 'blank', 'bargain_goods', 'community', 'area_select', 'options', 'user_info', 'jump_wxapp', 'flow'], 8: ['search', 'menu', 'banner', 'magic_cube', 'picturew', 'pictures', 'richtext', 'title', 'notice', 'line', 'blank', 'community', 'area_select', 'shop', 'shop_join', 'options', 'user_info', 'jump_wxapp', 'flow'], 14: ['search', 'menu', 'banner', 'magic_cube', 'picturew', 'pictures', 'richtext', 'title', 'notice', 'line', 'blank', 'community', 'area_select', 'options', 'user_info', 'jump_wxapp', 'flow'], 15: ['search', 'menu', 'banner', 'magic_cube', 'picturew', 'pictures', 'richtext', 'title', 'notice', 'line', 'blank', 'community', 'area_select', 'options', 'user_info', 'jump_wxapp', 'recruit_statistics', 'recruit_enterprise', 'recruit_recruit', 'flow'], 16: ['search', 'menu', 'banner', 'magic_cube', 'picturew', 'pictures', 'richtext', 'title', 'notice', 'line', 'blank', 'community', 'area_select', 'options', 'user_info', 'jump_wxapp','dating_statistics','dating_user'], 17: ['search', 'menu', 'banner', 'magic_cube', 'picturew', 'pictures', 'richtext', 'title', 'notice', 'line', 'blank', 'community', 'area_select', 'options', 'user_info', 'jump_wxapp','house_keep'], }; //信息处理 var navpage = navgroup[modal.type]; if(!navpage) { navpage = navgroup[0] } $.each(navpage, function(index, val) { var params = modal.navs[val]; //判断当前插件是否存在 不存在则删除该插件对应的装修功能 if(params) { params.id = val; //基本插件判断 if(val == 'coupon_goods' && !modal.plugins.coupon) { return true } if(val == 'fightgroup_goods' && !modal.plugins.fightgroup) { return true } if(val == 'groupon_goods' && !modal.plugins.groupon) { return true } if(val == 'rush_goods' && !modal.plugins.rush) { return true } if(val == 'bargain_goods' && !modal.plugins.bargain) { return true } if(val == 'activity_goods' && !modal.plugins.activity) { return true } if(val == 'citydelivery_goods' && !modal.plugins.citydelivery) { return true } //定制组件判断 if(val == 'user_info' && !modal.plugins.user_info) { return true } //求职招聘判断 let recruitList = [ 'recruit_statistics',//求职-统计组件 'recruit_enterprise',//求职-企业组件 'recruit_recruit',//求职 - 招聘信息组件 'recruit_resume',//求职-简历组件 ]; if($.inArray(val,recruitList) > -1 && !modal.plugins.recruit) { return true } //相亲交友判断 let datingList = [ 'dating_statistics',//统计组件 'dating_user',//统计组件 ]; if($.inArray(val,datingList) > -1 && !modal.plugins.dating) { return true } //家政服务判断 let houserKeepList = [ 'house_keep',//家政服务 ]; if($.inArray(val,houserKeepList) > -1 && !modal.plugins.housekeep) { return true } modal.initnav.push(params) } }); var html = tpl("tpl_navs", modal); $("#navs").html(html).show(); $("#navs,#createNavContent").on('click', "nav,.drag", function() { var id = $(this).data('id'); var item = $.extend(true, {}, modal.navs[id]); //如果点击的是图片魔方 进行单独的其他操作 if(id == 'magic_cube') { modal.magicCube(); return false; } if(id === 'page') { $("#page").trigger("click"); return } var inArray = $.inArray(id, navpage); if(inArray < 0) { tip.msgbox.err("此页面类型禁止添加此元素!"); return } var group_name = $(this).attr("group_name"); //如果选取的内容是组件群 进行组件的替换操作 if(group_name) { //更换当前组件 var group_key = $(this).attr("group_key"); item = $.extend(true, {}, modal.groupNav[group_name][group_key]); item.group_name = group_name; item.group_key = group_key; item.id = item.model; delete item.title; delete item.model; //获取当前在phone中的itemid var itemid = $("#phone .selected").data("itemid"); //修改储存的数据 modal.items[itemid] = $.extend(true, {}, item); //从新渲染 modal.initItems(); $(".drag[data-itemid='" + itemid + "']").trigger('mousedown').trigger('click'); return false; } if(!item) { tip.msgbox.err("未找到此元素!"); return } var itemTplShow = $("#tpl_show_" + id).length; var itemTplEdit = $("#tpl_edit_" + id).length; if(itemTplShow == 0 || itemTplEdit == 0) { tip.msgbox.err("添加失败!模板错误,请刷新页面重试"); return } if(id === 'diymod') { modal.initMod(item); return } var itemid = modal.getId("M", 0); if(item.data) { var itemData = $.extend(true, {}, item.data); var newData = {}; var index = 0; $.each(itemData, function(id, data) { var childid = modal.getId("C", index); newData[childid] = data; delete childid; index++ }); item.data = newData } //判断当前组件是否限制添加数量 var limitStatus = modal.numberLimit(item); if(!limitStatus){ tip.msgbox.err("当前组件最多允许添加 " + item.max + " 个"); return false; } modal.items[itemid] = item; //添加时进行判断 保证选项卡组件在最后面 var optionItems = {},newModalItems = {}; $.each(modal.items, function(key, val) { if(val.id == 'options' || val.group_name == 'options' ){ optionItems = val; }else{ newModalItems[key]= $.extend(true, {}, val); } }); modal.items = $.extend(true, {}, newModalItems); if(optionItems.id == 'options' || optionItems.group_name == 'options'){ modal.items['M9999999999999'] = $.extend(true, {}, optionItems); if(id == 'options'){ //当 添加组件为选项卡组件时 选中当前添加的选项卡组件 itemid = 'M9999999999999'; } } //重新渲染一次内容 modal.initItems(); $(".drag[data-itemid='" + itemid + "']").trigger('mousedown').trigger('click'); modal.selected = itemid //隐藏配置栏点击按钮 $("#page_title").hide(); //建立组件群其他组件 if(item.group) { //组件群 显示配置栏点击按钮 $("#page_title").show(); //存在组件群 进行组件群建立步骤,不在进行单组件建立步骤 var groupInfo = $.extend(true, {}, modal.groupNav[item.group]); if(!groupInfo) { return } var html = ''; $.each(groupInfo, function(k, v) { //判断模板是否存在 var itemTplShow = $("#tpl_show_" + v['model']).length; //模板信息 if(itemTplShow == 0) { tip.msgbox.err("添加失败!模板错误,请刷新页面重试"); return } //建立单个组件 var navInfo = $.extend(true, {}, v); navInfo.merch = modal.merch; navInfo.plugins = modal.plugins; navInfo.id = id; navInfo.group_name = item.group; navInfo.group_key = k; //建立单个主键的标题 html += tpl("tpl_public_title", { title: navInfo['title'] }); html += tpl("tpl_show_" + navInfo['model'], navInfo); }); $("#diy-editor [page_id='nav_type']").html(html) return false; } }) //配置栏 组件&配置信息的显示隐藏 默认打开配置信息 $("[page_id='nav_config']").show(); $("#page_title .page_name").unbind('click').click(function() { var id = $(this).attr("id"); //删除active $("#page_title .page_name").removeClass("active"); //添加active $(this).addClass("active"); //隐藏内容 $("#diy-editor .inner_content").hide(); //显示内容 $("[page_id='" + id + "']").show(); }); //商品组件 - 点击选择商品 $("#diy-editor").on("click", '.select_goods', function() { //商品类型 1=抢购(rush) 2=团购(groupon) 3=拼团(wlfightgroup) 5=优惠券(coupon) var plugin = $(this).data("plugin"); var itemid = $(this).data("id"); $("#SelectGoodsContent").attr("itmeid",itemid); //发送获取商品的请求 modal.getGoods(plugin, '', '', itemid); }); //商品组件 - 点击商品信息栏分页获取当前页内容 $("#SelectGoodsContent").on('click', '.paging_button', function() { var plugin = $(this).data("plugin"); var page = $(this).data("page"); var itemid = $("#SelectGoodsContent").attr("itmeid"); var search = $("#SelectGoodsContent .searchContent").children("input").val(); modal.getGoods(plugin, page,search,itemid); }); //商品组件 - 搜索商品 $("#SelectGoodsContent").on('click', '.goodsSelect', function() { var plugin = $(this).data("plugin"); var search = $(this).prev(".searchContent").children("input").val(); var itemid = $("#SelectGoodsContent").attr("itmeid"); modal.getGoods(plugin, 1, search,itemid); }); //商品组件 - 点击选中商品 $("#SelectGoodsContent").on('click', '.selectGoods', function() { var key = $(this).data("key"); var keys = $(this).data("keys"); var info = modal.goods[key]; //获取itemid var itemid = $("#phone .selected").data("itemid"); modal.items[itemid]['data'][keys] = $.extend(true, {}, info); modal.initItems(); //更新配置信息 $(".drag[data-itemid='" + itemid + "']").trigger('mousedown').trigger('click'); //关闭弹框 $("#SelectGoodsContent").modal('hide'); }); //头条组件 - 点击获取头条信息 $("#diy-editor").on("click", '.select_headline', function() { var itemid = $(this).data("id"); $("#SelectHeadlineContent").attr("itmeid",itemid); modal.getHeadline('', '', itemid); }); //头条组件 - 点击分页获取当前页头条内容 $("#SelectHeadlineContent").on('click', '.paging_button', function() { var page = $(this).data("page"); var itemid = $("#SelectHeadlineContent").attr("itmeid"); var search = $("#SelectHeadlineContent .searchContent").children("input").val(); modal.getHeadline(page,search,itemid); }); //头条组件 - 搜索头条 $("#SelectHeadlineContent").on('click', '.headlineSelect', function() { var search = $(this).prev(".searchContent").children("input").val(); var itemid = $("#SelectHeadlineContent").attr("itmeid"); modal.getHeadline(1, search,itemid); }); //头条组件 - 点击选中头条 $("#SelectHeadlineContent").on('click', '.selectHeadline', function() { var key = $(this).data("key"); var id = $(this).data("itemid"); var info = modal.headline[key]; //获取itemid var itemid = $("#phone .selected").data("itemid"); modal.items[itemid]['data'][id] = $.extend(true, {}, info); modal.initItems(); //更新配置信息 $(".drag[data-itemid='" + itemid + "']").trigger('mousedown').trigger('click'); //关闭弹框 $("#SelectHeadlineContent").modal('hide'); }); //商户组件 - 点击获取商户信息 $("#diy-editor").on("click", '.select_shop', function() { var itemid = $(this).data("id"); $("#SelectShopContent").attr("itmeid",itemid); modal.getShop('', '', itemid); }); //商户组件 - 点击分页获取当前页商户内容 $("#SelectShopContent").on('click', '.paging_button', function() { var page = $(this).data("page"); var itemid = $("#SelectShopContent").attr("itmeid"); var search = $("#SelectShopContent .searchContent").children("input").val(); modal.getShop(page,search,itemid); }); //商户组件 - 搜索商户 $("#SelectShopContent").on('click', '.shopSelect', function() { var search = $(this).prev(".searchContent").children("input").val(); var itemid = $("#SelectShopContent").attr("itmeid"); modal.getShop(1, search,itemid); }); //商户组件 - 点击选中商户 $("#SelectShopContent").on('click', '.selectShop', function() { var key = $(this).data("key"); var id = $(this).data("itemid"); var info = modal.shop[key]; //获取itemid var itemid = $("#phone .selected").data("itemid"); modal.items[itemid]['data'][id] = $.extend(true, {}, info); modal.initItems(); //更新配置信息 $(".drag[data-itemid='" + itemid + "']").trigger('mousedown').trigger('click'); //关闭弹框 $("#SelectShopContent").modal('hide'); }); //求职招聘 - 企业选择器弹出 $("#diy-editor").on("click", '.select_enterprise', function() { var itemid = $(this).data("id"); $("#SelectEnterpriseContent").attr("itmeid",itemid); //显示弹框 var html = tpl("tplSelectEnterprise", {}); $("#SelectEnterpriseContent").html(html); $("#SelectEnterpriseContent").modal(); }); //求职招聘 - 搜索企业信息 $("#SelectEnterpriseContent").on('click', '.enterpriseSelect', function() { var search = $(this).prev(".searchContent").children("input").val(); var itemid = $("#SelectEnterpriseContent").attr("itmeid"); $.ajax({ url: biz.url('utility/select/selectEnterprise'), data: {search: search,return_type:'json'}, dataType: "json", async: false, success: function(res) { if(res.errno == 0) { tip.msgbox.err(res.message); return false; } var info = {'list':res.data}; modal.enterprise = info['list']; info['itemid'] = itemid; info['search'] = search; //显示弹框 var html = tpl("tplSelectEnterprise", info); $("#SelectEnterpriseContent").html(html); } }); }); //求职招聘 - 点击选中企业 $("#SelectEnterpriseContent").on('click', '.selectEnterprise', function() { var key = $(this).data("key"); var id = $(this).data("itemid"); var info = modal.enterprise[key]; //获取itemid var itemid = $("#phone .selected").data("itemid"); modal.items[itemid]['data'][id] = $.extend(true, {}, info); modal.initItems(); //更新配置信息 $(".drag[data-itemid='" + itemid + "']").trigger('mousedown').trigger('click'); //关闭弹框 $("#SelectEnterpriseContent").modal('hide'); }); //求职招聘 - 招聘选择器弹出 $("#diy-editor").on("click", '.select_recruit', function() { var itemid = $(this).data("id"); $("#SelectRecruitContent").attr("itmeid",itemid); modal.getRecruit('', '', itemid); }); //求职招聘 - 点击分页获取当前页招聘内容 $("#SelectRecruitContent").on('click', '.paging_button', function() { var page = $(this).data("page"); var itemid = $("#SelectRecruitContent").attr("itmeid"); var search = $("#SelectRecruitContent .searchContent").children("input").val(); modal.getRecruit(page,search,itemid); }); //求职招聘 - 搜索招聘信息 $("#SelectRecruitContent").on('click', '.recruitSelect', function() { var search = $(this).prev(".searchContent").children("input").val(); var itemid = $("#SelectRecruitContent").attr("itmeid"); modal.getRecruit(1, search,itemid); }); //求职招聘 - 点击选中招聘信息 $("#SelectRecruitContent").on('click', '.selectRecruit', function() { var key = $(this).data("key"); var id = $(this).data("itemid"); var info = modal.recruit[key]; //获取itemid var itemid = $("#phone .selected").data("itemid"); modal.items[itemid]['data'][id] = $.extend(true, {}, info); modal.initItems(); //更新配置信息 $(".drag[data-itemid='" + itemid + "']").trigger('mousedown').trigger('click'); //关闭弹框 $("#SelectRecruitContent").modal('hide'); }); //求职招聘 - 简历选择器弹出 $("#diy-editor").on("click", '.select_resume', function() { var itemid = $(this).data("id"); $("#SelectResumeContent").attr("itmeid",itemid); modal.getResume('', '', itemid); }); //求职招聘 - 点击分页获取当前页简历内容 $("#SelectResumeContent").on('click', '.paging_button', function() { var page = $(this).data("page"); var itemid = $("#SelectResumeContent").attr("itmeid"); var search = $("#SelectResumeContent .searchContent").children("input").val(); modal.getResume(page,search,itemid); }); //求职招聘 - 搜索简历信息 $("#SelectResumeContent").on('click', '.resumeSelect', function() { var search = $(this).prev(".searchContent").children("input").val(); var itemid = $("#SelectResumeContent").attr("itmeid"); modal.getResume(1, search,itemid); }); //求职招聘 - 点击选中简历信息 $("#SelectResumeContent").on('click', '.selectResume', function() { var key = $(this).data("key"); var id = $(this).data("itemid"); var info = modal.resume[key]; //获取itemid var itemid = $("#phone .selected").data("itemid"); modal.items[itemid]['data'][id] = $.extend(true, {}, info); modal.initItems(); //更新配置信息 $(".drag[data-itemid='" + itemid + "']").trigger('mousedown').trigger('click'); //关闭弹框 $("#SelectResumeContent").modal('hide'); }); //相亲交友 - 会员选择器弹出 $("#diy-editor").on("click", '.select_dating', function() { var itemid = $(this).data("id"); $("#SelectDatingContent").attr("itmeid",itemid); modal.getDating('', '', itemid); }); //相亲交友 - 点击分页获取当前页简历内容 $("#SelectDatingContent").on('click', '.paging_button', function() { var page = $(this).data("page"); var itemid = $("#SelectDatingContent").attr("itmeid"); var search = $("#SelectDatingContent .searchContent").children("input").val(); modal.getDating(page,search,itemid); }); //相亲交友 - 搜索简历信息 $("#SelectDatingContent").on('click', '.datingSelect', function() { var search = $(this).prev(".searchContent").children("input").val(); var itemid = $("#SelectDatingContent").attr("itmeid"); modal.getDating(1, search,itemid); }); //相亲交友 - 点击选中简历信息 $("#SelectDatingContent").on('click', '.selectDating', function() { var key = $(this).data("key"); var id = $(this).data("itemid"); var info = modal.dating[key]; //获取itemid var itemid = $("#phone .selected").data("itemid"); modal.items[itemid]['data'][id] = $.extend(true, {}, info); modal.initItems(); //更新配置信息 $(".drag[data-itemid='" + itemid + "']").trigger('mousedown').trigger('click'); //关闭弹框 $("#SelectDatingContent").modal('hide'); }); //家政服务 - 选择器弹出 $("#diy-editor").on("click", '.select_houseKeep', function() { var itemid = $(this).data("id"); $("#SelectHouseKeepContent").attr("itmeid",itemid); modal.getHouseKeep('', '', itemid); }); //家政服务 - 点击分页获取当前页内容 $("#SelectHouseKeepContent").on('click', '.paging_button', function() { var page = $(this).data("page"); var itemid = $("#SelectHouseKeepContent").attr("itmeid"); var search = $("#SelectHouseKeepContent .searchContent").children("input").val(); modal.getHouseKeep(page,search,itemid); }); //家政服务 - 搜索信息 $("#SelectHouseKeepContent").on('click', '.houseKeepSelect', function() { var search = $(this).prev(".searchContent").children("input").val(); var itemid = $("#SelectHouseKeepContent").attr("itmeid"); modal.getHouseKeep(1, search,itemid); }); //家政服务 - 点击选中信息 $("#SelectHouseKeepContent").on('click', '.selectHouseKeep', function() { var key = $(this).data("key"); var id = $(this).data("itemid"); var info = modal.houseKeep[key]; //获取itemid var itemid = $("#phone .selected").data("itemid"); modal.items[itemid]['data'][id] = $.extend(true, {}, info); modal.initItems(); //更新配置信息 $(".drag[data-itemid='" + itemid + "']").trigger('mousedown').trigger('click'); //关闭弹框 $("#SelectHouseKeepContent").modal('hide'); }); }; modal.getId = function(S, N) { var date = +new Date(); var id = S + (date + N); return id }; modal.getNavs = function() { //基础组件 nav_class=1:基础组件; =2:辅助组件; =3:商品/商户组件; =4:功能组件 modal.navs = { notice: { nav_class: 2, group: 'notice', name: '公告', style: { 'marginbottom': '0', }, }, banner: { nav_class: 1, group: 'banner', name: '图片轮播', params: { img_width:640, img_height:300, }, style: { 'dotstyle': 'round', 'dotalign': 'left', 'side_margin': 0,//0=无边距;1=有边距 'bottom': '0', }, data: { C0123456789101: { imgurl: '../addons/weliam_smartcity/web/resource/images/default.png', linkurl: '', }, C0123456789102: { imgurl: '../addons/weliam_smartcity/web/resource/images/default.png', linkurl: '', } } }, richtext: { nav_class: 1, name: '富文本', params: { content: '' }, style: { 'background': '#ffffff', 'padding': '0' }, data: {} }, title: { nav_class: 2, group: 'title', name: '标题栏', params: { 'title': '', 'link':"", 'butname':"查看更多", 'url_type':"", }, style: { 'background': '#ffffff', 'color': '#666666', 'textalign': 'left', 'paddingBottom': '5', } }, search: { nav_class: 1, group: 'search', name: '搜索框', params: { 'placeholder': '请输入关键字进行搜索', 'search_type': 1,//1=搜索商品,2=搜索招聘信息 }, style: { 'inputbackground': '#ffffff', 'background': '#f1f1f2', 'iconcolor': '#b4b4b4', 'color': '#999999', 'textalign': 'left', 'searchstyle': '', 'marginBottom': "0" } }, line: { nav_class: 2, name: '辅助线', params: {}, style: { 'background': '#ffffff', "bordercolor": "#000000", 'padding': '10', 'linestyle': 'solid', 'leftpadding': "0", } }, blank: { nav_class: 2, name: '辅助空白', params: {}, style: { height: '20', background: '#ffffff' } }, menu: { nav_class: 1, group: "menu", name: '按钮组', params: {}, style: { 'navstyle': '', 'background': '#ffffff', 'rownum': '4', 'showtype': '0', 'pagenum': '8', 'marginbottom': "0", }, data: { C0123456789101: { imgurl: '../addons/weliam_smartcity/web/resource/images/default.png', linkurl: '', text: '按钮文字1', color: '#666666' }, C0123456789102: { imgurl: '../addons/weliam_smartcity/web/resource/images/default.png', linkurl: '', text: '按钮文字2', color: '#666666' }, C0123456789103: { imgurl: '../addons/weliam_smartcity/web/resource/images/default.png', linkurl: '', text: '按钮文字3', color: '#666666' }, C0123456789104: { imgurl: '../addons/weliam_smartcity/web/resource/images/default.png', linkurl: '', text: '按钮文字4', color: '#666666' } } }, picturew: { nav_class: 1, group: 'picturew', name: '图片橱窗', params: {}, style: { 'marginLeftRight': "5", 'marginTopBottom': "5", 'bgColor': "#FFFFFF", }, data: { C0123456789101: { imgurl: '../addons/weliam_smartcity/web/resource/images/default.png', linkurl: '', }, C0123456789102: { imgurl: '../addons/weliam_smartcity/web/resource/images/default.png', linkurl: '', }, C0123456789103: { imgurl: '../addons/weliam_smartcity/web/resource/images/default.png', linkurl: '', }, C0123456789104: { imgurl: '../addons/weliam_smartcity/web/resource/images/default.png', linkurl: '', } } }, pictures: { nav_class: 1, name: '图片展播', params: { showtype: 0, rownum: 3 }, style: { background: "#ffffff", paddingtop: "5", paddingleft: "5", titlealign: 'left', titlecolor: '#ffffff', textcolor: '#666666' }, data: { C0123456789101: { imgurl: '../addons/weliam_smartcity/web/resource/images/default.png', linkurl: '', title: '这里是上标题', text: '这里是下标题' }, C0123456789102: { imgurl: '../addons/weliam_smartcity/web/resource/images/default.png', linkurl: '', title: '这里是上标题', text: '这里是下标题' }, C0123456789103: { imgurl: '../addons/weliam_smartcity/web/resource/images/default.png', linkurl: '', title: '这里是上标题', text: '这里是下标题' } } }, magic_cube: { nav_class: 1, name: '图片魔方', style: {}, data: {} }, rush_goods: { nav_class: 3, group: "rush_goods", name: '抢购商品', plugin: 1, //商品类型 params: { type: 1, //1=手动选择 2=选择分类 3=选择状态 orders: 1, //1=综合 2=按销量 3=价格降序 4=价格升序 classs: 0, //按商品分类选择时,商品分类id status: 1, //按状态选择时,商品状态 show_num: 1, //显示的商品数量 }, style: { 'bgColor': "#f6f6f6", 'margin': 15, 'padding': 10, 'marginBottom': "0", }, data: { C0123456789101: { goods_name: "请选择商品...", oldprice: "00.00", price: "00.00", storename: "店铺名称...", buy_num: "0", logo: "../addons/weliam_smartcity/web/resource/images/default.png" } } }, groupon_goods: { nav_class: 3, group: "groupon_goods", name: '团购商品', plugin: 2, params: { type: 1, orders: 1, classs: 0, show_num: 1, }, style: { 'bgColor': "#f6f6f6", 'margin': 15, 'padding': 10, 'marginBottom': "0", }, data: { C0123456789101: { goods_name: "请选择商品...", oldprice: "00.00", price: "00.00", storename: "店铺名称...", logo: "../addons/weliam_smartcity/web/resource/images/default.png" } } }, fightgroup_goods: { nav_class: 3, group: "fightgroup_goods", name: '拼团商品', plugin: 3, params: { type: 1, orders: 1, classs: 0, show_num: 1, marker_set: 0,//角标是否显示 0=不显示,1=显示 }, style: { 'bgColor': "#f6f6f6", 'margin': 15, 'padding': 10, 'marginBottom': "0", 'marker_bg': '#FF4444', 'marker_color': '#FFFFFF', }, data: { C0123456789101: { goods_name: "请选择商品...", oldprice: "00.00", price: "00.00", storename: "店铺名称...", buy_num: "0", logo: "../addons/weliam_smartcity/web/resource/images/default.png" } } }, bargain_goods:{ nav_class: 3, group: "bargain_goods", name: '砍价商品', plugin: 7, params: { type: 1, orders: 1, classs: 0, show_num: 1, marker_set: 0,//角标是否显示 0=不显示,1=显示 }, style: { 'bgColor': "#f6f6f6", 'margin': 15, 'padding': 10, 'marginBottom': "0", 'marker_bg': '#FF4444', 'marker_color': '#FFFFFF', }, data: { C0123456789101: { goods_name: "请选择商品...", oldprice: "00.00", price: "00.00", storename: "店铺名称...", buy_num: "0", logo: "../addons/weliam_smartcity/web/resource/images/default.png", } } }, activity_goods: { nav_class: 3, group: "activity_goods", name: '同城活动', plugin: 9, //商品类型 params: { type: 1, //1=手动选择 2=选择分类 3=选择状态 orders: 1, //1=综合 2=按销量 3=价格降序 4=价格升序 classs: 0, //按商品分类选择时,商品分类id status: 1, //按状态选择时,商品状态 show_num: 1, //显示的商品数量 }, style: { 'bgColor': "#f6f6f6", 'margin': 15, 'padding': 10, 'marginBottom': "0", }, data: { C0123456789101: { goods_name: "请选择商品...", oldprice: "00.00", price: "00.00", storename: "店铺名称...", buy_num: "0", logo: "../addons/weliam_smartcity/web/resource/images/default.png" } } }, coupon_goods: { nav_class: 3, group: "coupon_goods", name: '优惠券', plugin: 5, params: { type: 1, orders: 1, classs: 0, show_num: 1, }, style: { 'bgColor': "#f6f6f6", 'margin': 15, 'padding': 10, 'marginBottom': "0", }, data: { C0123456789101: { goods_name: "请选择商品...", oldprice: "00.00", price: "00.00", storename: "店铺名称...", user_num: "0", logo: "../addons/weliam_smartcity/web/resource/images/default.png" } } }, integral_goods: { nav_class: 3, group: "integral_goods", name: '积分商品', plugin: 8, params: { type: 1, //1=手动选择 2=选择分类 orders: 3,//3=推荐 4=人气 classs: 0, //按商品分类选择时,商品分类id show_num: 1, //显示的商品数量 }, style: { 'bgColor': "#f6f6f6", 'margin': 15, 'padding': 10, 'marginBottom': "0", }, data: { C0123456789101: { title: "请选择商品...", thumb: "../addons/weliam_smartcity/web/resource/images/default.png", old_price: "00.00", price: "00.00", price_text: "1000积分 + 999.00元", pv:'8888', stock: '', } } }, citydelivery_goods:{ nav_class: 3, group: "citydelivery_goods", name: '配送商品', plugin: 10, params: { title: '推荐',//块标题 show_more: 1,//是否显示更多 0=不显示,1=显示 type: 1, //1=手动选择 2=选择分类 orders: 1,//1=综合 2=销量 3=价格降序 4=价格升序 5=创建时间 classs: 0, //按商品分类选择时,商品分类id show_num: 1, //显示的商品数量 }, style: { 'bgColor': "#FFFFFF",//背景颜色 'padding': 10,//内边距 'marginBottom': 0,//下边距 }, data: { C0123456789101: { goods_name: "请选择商品...", logo: "../addons/weliam_smartcity/web/resource/images/default.png", long_logo: "../addons/weliam_smartcity/web/resource/images/default.png", price: "10.00", buy_num: 9999 }, C0123456789102: { goods_name: "请选择商品...", logo: "../addons/weliam_smartcity/web/resource/images/default.png", long_logo: "../addons/weliam_smartcity/web/resource/images/default.png", price: "10.00", buy_num: 9999 }, C0123456789103: { goods_name: "请选择商品...", logo: "../addons/weliam_smartcity/web/resource/images/default.png", long_logo: "../addons/weliam_smartcity/web/resource/images/default.png", price: "10.00", buy_num: 9999 }, } }, packages:{ nav_class: 3, group: "packages", name: '大礼包', plugin: 4, params: { type: 1, //1=手动选择 2=选择分类 3=选择状态 orders: 1, //1=综合 2=按销量 3=价格降序 4=价格升序 show_num: 1, //显示的商品数量 }, style: { 'bgColor': "#f6f6f6", 'margin': 15, 'padding': 10, 'marginBottom': "0", }, data: { C0123456789101: { datestatus:1, logo: "../addons/weliam_smartcity/web/resource/images/default.png", storename: '商户名称', name: '礼包名称', usetimes: '100',//周期内使用次数 surplus: '99',//剩余次数 price: '88888', } } }, discount_card:{ nav_class: 3, group: "discount_card", name: '折扣卡', plugin: 6, params: { type: 1, //1=手动选择 2=选择分类 3=选择状态 orders: 1, //1=综合 2=按销量 3=价格降序 4=价格升序 show_num: 1, //显示的商品数量 }, style: { 'bgColor': "#f6f6f6", 'margin': 15, 'padding': 10, 'marginBottom': "0", }, data: { C0123456789101: { name: '卡券名称', limit: '使用限制', discount: 1.0,//折扣 storename: '店铺名称',// logo: '../addons/weliam_smartcity/web/resource/images/default.png', } } }, headline: { nav_class: 1, group: "headline", name: '头条', params: {}, style: { 'bgColor': "#FFFFFF", 'marginBottom': "0", 'type':"1", 'show_num':"1" }, data: { C0123456789101: { 'title': '头条标题', 'summary': '头条副标题', 'display_img': '../addons/weliam_smartcity/web/resource/images/default.png', 'author': '作者', 'author_img': '../addons/weliam_smartcity/web/resource/images/default.png', 'browse': '999', 'one_name': '分类', 'two_name': '分类' } } }, community: { nav_class: 2, name: '社群', params: { community_id: 0, title: "入群", name: "请输入群名称", introduce: "请输入群的简介", imgUrl: "../addons/weliam_smartcity/web/resource/images/default.png", qrcodeUrl: "../addons/weliam_smartcity/web/resource/images/default.png" }, style: { 'bgColor': "#FFFFFF", //背景颜色 'marginBottom': "0", //上下边距 'buttonbg': "#ff0000", //按钮背景 'buttonColor': "#FFFFFF", //按钮颜色 }, data: {} }, public_goods:{ nav_class: 3, group: "public_goods", name: '通用商品', plugin: 0, //商品类型 params: {}, style: { 'bgColor': "#FFFFFF", 'margin': 0, 'padding': 15, 'marginBottom': "0", }, data: { C0123456789101: { goods_name: "请选择商品...", oldprice: "00.00", price: "00.00", storename: "店铺名称...", buy_num: "0", logo: "../addons/weliam_smartcity/web/resource/images/default.png" }, C0123456789102: { goods_name: "请选择商品...", oldprice: "00.00", price: "00.00", storename: "店铺名称...", buy_num: "0", logo: "../addons/weliam_smartcity/web/resource/images/default.png" }, C0123456789103: { goods_name: "请选择商品...", oldprice: "00.00", price: "00.00", storename: "店铺名称...", buy_num: "0", logo: "../addons/weliam_smartcity/web/resource/images/default.png" } } }, shop:{ nav_class: 3, group: "shop", name: '商家信息', params: { type:1,//1=手动选择 2=自动选择 rule:3,//自动规则 1 = 创建时间,2 = 店铺距离,3 = 默认设置,4 = 浏览人气 show_num:5,//默认显示的数量 }, style: { 'marginBottom': "0", }, data: { C0123456789101: { storename: "店铺名称...", logo: "../addons/weliam_smartcity/web/resource/images/default.png", score:"5", storehours:"00:00—23:59 营业", address:"店铺地址信息", oneType:'一级分类', twoType:'二级分类', goods:{ halfcard:{name:'一卡通'}, active:{name:'抢购商品'}, coupon:{name:'卡券信息'}, fightgroup:{name:'拼团商品'}, packages:{name:'大礼包信息'}, groupon:{name:'团购商品'}, } } } }, area_select:{ nav_class: 2, name: '地区选择', params: { nickname: "用户昵称...", avatar: "../addons/weliam_smartcity/web/resource/images/default.png", areaname:"地区名称", }, style:{ 'background':'#FFF', 'nicknameColor':'#000', 'areanameColor':'#000', 'marginBottom': "0", 'showtype':0, } }, options: { nav_class: 1, max: 1, group: "options", name: '选项卡', params: {}, style: { 'marginBottom': "0", 'selectBg': '#ff2d2d', 'background': '#FFFFFF', 'defaultBg': '#000000', }, data: modal.optionInfo, }, shop_join:{ nav_class: 2, group: "shop_join", name: '商户入驻', params: { title:"商户入驻", button:'我要入驻' }, style: { 'marginBottom': "0", }, data: {}, }, user_info:{ nav_class: 2, name: '用户信息', params: { 'title':'我的乐豆', 'button_title':'积分兑换乐豆', 'link':'', }, style: {}, data: {}, }, jump_wxapp:{ nav_class: 2, name: '公众号跳转小程序', params: { img: '', link:'', original_id:'', }, style: {} }, recruit_statistics:{ nav_class: 4, name: '统计(求职招聘)', params: { enterprise:{ title:'入驻企业', numberColor: '#000000', titleColor: '#CCCCCC', backgroundColor: '#FFFFFF', icon: '../addons/weliam_smartcity/web/resource/diy/images/enterprise.png' },//入驻企业 recruit:{ title:'职业', numberColor: '#000000', titleColor: '#CCCCCC', backgroundColor: '#FFFFFF', icon: '../addons/weliam_smartcity/web/resource/diy/images/recruit.png' },//职业 resume:{ title:'简历', numberColor: '#000000', titleColor: '#CCCCCC', backgroundColor: '#FFFFFF', icon: '../addons/weliam_smartcity/web/resource/diy/images/resume.png' },//简历 pv:{ title:'访问', numberColor: '#000000', titleColor: '#CCCCCC', backgroundColor: '#FFFFFF', icon: '../addons/weliam_smartcity/web/resource/diy/images/pv.png' },//访问 }, style: {}, data: {}, }, recruit_enterprise: { nav_class: 4, group: "recruit_enterprise", name: '企业(求职招聘)', params: { type: 1, //加载类型:1=手动选择,2=选择行业 orders: 1, //排序:1 = 创建时间,2 = 店铺距离,3 = 默认设置,4 = 浏览人气 industry_id: 0, //行业id show_num: 1, //显示的商品数量 }, style: { 'bgColor': "#FFFFFF",//背景颜色 'padding': 0,//内边距 'marginBottom': 0,//下边距 }, data: { R0123456789101: { storename: "请选择企业...", logo:'../addons/weliam_smartcity/web/resource/images/default.png', is_authentication: 0,//是否认证:0=未认证,1=已认证 nature:'企业性质',//企业性质 scale:'企业规模',//企业规模 industry:'经营行业',//经营行业 area:'所在区域',//所在区域 release_recruit: 999,//招聘中岗位数量 } } }, recruit_recruit: { nav_class: 4, name: '招聘(求职招聘)', params: { type: 1, //加载类型:1=手动选择,2=选择行业 orders: 1, //排序:1=推荐排序,2=浏览,3=发布时间,4=距离排序 industry_id: 0, //行业id show_num: 1, //显示的数量 }, style: { 'bgColor': "#FFFFFF",//背景颜色 labelBgColor: '#F4F4F4',//标签背景 labelColor: '#666666',//标签字体颜色 'padding': 0,//内边距 'marginBottom': 0,//下边距 }, data: { R0123456789101: { title:'招聘标题名称', recruitment_type: 1,//招聘类型:1=个人招聘,2=企业招聘 job_type:1,//工作类型:1=全职,2=兼职 status: 4,//招聘状态:1=待付款,2=审核中,3=未通过,4=招聘中,5=已结束 release: { name: '发布方姓名',//发布方姓名 logo: '../addons/weliam_smartcity/web/resource/images/default.png',//发布方logo nature: '企业性质',//企业性质 scale: '企业规模',//企业规模 industry: '企业行业',//企业行业 is_authentication: 1,//是否认证:0=未认证,1=已认证 }, salary: '99K~99K',//薪资 welfare_list:['职位福利','职位福利','职位福利','职位福利','职位福利'], area:'区', release_time: '今日', } } }, recruit_resume: { nav_class: 4, name: '求职招聘-简历', params: { type: 1, //加载类型:1=手动选择,2=选择行业 orders: 1, //排序:1=推荐排序,2=浏览,3=发布时间 industry_id: 0, //行业id show_num: 1, //显示的数量 }, style: { bgColor: "#FFFFFF",//背景颜色 labelBgColor: '#F4F4F4',//标签背景 labelColor: '#666666',//标签字体颜色 padding: 0,//内边距 marginBottom: 0,//下边距 }, data: { R0123456789101: { age: 18,//年龄 area: "区域",//区 avatar: "../addons/weliam_smartcity/web/resource/images/default.png",//头像 education: "学历",//学历 expect_position_list: ["职位一", "职位二", "职位三"],//期望职位,MAX:3 experience: "无工作经验",//工作经验 gender: "2",//性别:2=男,3=女 name: "姓名",//姓名 salary: "999~999K",//期望薪资 } } }, flow:{ nav_class: 2, group: "flow", name: '流量主', params: { unit_id:'', }, style: {}, data: {} }, dating_statistics:{ nav_class: 4, name: '统计(相亲交友)', params: { user:{ title:'会员数', numberColor: '#000000', titleColor: '#9E9E9E', backgroundColor: '#F8F8F8', icon: '../addons/weliam_smartcity/web/resource/diy/images/dating_user.png' },//会员数 pv:{ title:'访问量', numberColor: '#000000', titleColor: '#9E9E9E', backgroundColor: '#F8F8F8', icon: '../addons/weliam_smartcity/web/resource/diy/images/dating_pv.png' },//访问量 }, style: {}, data: {}, }, dating_user:{ nav_class: 4, name: '会员(相亲交友)', params: { type: 1, //加载类型:1=手动选择,2=自动加载 orders: 1, //排序:1=推荐排序,2=浏览量,3=发布时间,4=距离排序 show_num: 1, //显示的数量 }, style: { bgColor: "#FFFFFF",//背景颜色 padding: 10,//内边距 marginBottom: 0,//下边距 }, data: { R0123456789101: { gneder: 1,//性别:1=男,2=女 live: 1,//居住情况 travel: 1,//出行情况 pv: 9999,//人气 is_top: 1,//是否置顶:1=未置顶,2=置顶中 nickname: "昵称",//昵称 cover: "../addons/weliam_smartcity/web/resource/images/default.png",//头像 area: "区域",//区域 is_vip: 0,//是否为会员 age: 18,//年龄 }, R0123456789102: { gneder: 2,//性别:1=男,2=女 live: 1,//居住情况 travel: 1,//出行情况 pv: 9999,//人气 is_top: 1,//是否置顶:1=未置顶,2=置顶中 nickname: "昵称",//昵称 cover: "../addons/weliam_smartcity/web/resource/images/default.png",//头像 area: "区域",//区域 is_vip: 0,//是否为会员 age: 18,//年龄 }, } }, house_keep:{ nav_class: 4, group: "house_keep", name: '家政服务', params: { title:'推荐服务者',//标题 show_more: 1,//查看更多 show_title: 1,//标签栏 service_type: 0,//服务类型:0=全部,1=商户服务商,2=个人服务商,3=客户需求,4=服务项目 type: 1, //加载类型:1=手动选择,2=自动加载 show_num: 1, //显示的数量 orders: 1, //排序 jbstatus:1, //角标开关 }, style: { bgColor: "#FFFFFF",//背景颜色 padding: 0,//内边距 marginBottom: 0,//下边距 }, data: { R0123456789101: { logo: "../addons/weliam_smartcity/web/resource/images/default.png", long_logo: "../addons/weliam_smartcity/web/resource/images/default.png", name: '名称', address: '地址信息', service_type: 1,//类型:1=商户服务商,2=个人服务商,3=客户需求,4=服务项目 tip: '商户服务商', label: ['分类一','分类二','分类三'] }, R0123456789102: { logo: "../addons/weliam_smartcity/web/resource/images/default.png", long_logo: "../addons/weliam_smartcity/web/resource/images/default.png", name: '名称', address: '地址信息', service_type: 1,//类型:1=商户服务商,2=个人服务商,3=客户需求,4=服务项目 tip: '商户服务商', label: ['分类一','分类二','分类三'] }, R0123456789103: { logo: "../addons/weliam_smartcity/web/resource/images/default.png", long_logo: "../addons/weliam_smartcity/web/resource/images/default.png", name: '名称', address: '地址信息', service_type: 1,//类型:1=商户服务商,2=个人服务商,3=客户需求,4=服务项目 tip: '商户服务商', label: ['分类一','分类二','分类三'] }, } } } //组件群 同类型不同风格的组件 modal.groupNav = { //公告 notice: { 0: { model: "notice", title: '风格一', style: { 'marginbottom': '0', }, }, 1: { model: "notice2", title: '风格二', style: { 'marginbottom': '0', }, }, 2: { model: "notice3", title: '风格三', params: { title: "公告标题" }, style: { 'marginbottom': '0', }, } }, //标题 title: { 0: { model: 'title', title: '风格一', params: { 'title': '', 'link':"", 'butname':"查看更多", 'url_type':"", }, style: { 'background': '#ffffff', 'color': '#666666', 'textalign': 'left', 'paddingBottom': '5', } }, 1: { model: "title2", title: '风格二', params: { 'mainText': "", 'viceText': "", 'link':"", 'butname':"查看更多", 'url_type':"", }, style: { 'marginBottom': 0, 'bgColor': '#FFFFFF', 'mainColor': "#000000", 'mainAlign': "left", 'viceColor': "#000000", 'viceAlign': "left", } }, }, //搜索框 search: { 0: { model: "search", title: '风格一', params: { 'placeholder': '请输入关键字进行搜索', 'search_type': 1,//1=搜索商品,2=搜索招聘信息 }, style: { 'inputbackground': '#ffffff', 'background': '#f1f1f2', 'iconcolor': '#b4b4b4', 'color': '#999999', 'textalign': 'left', 'searchstyle': '', 'marginBottom': 0 } }, 1: { model: "search2", title: '风格二', params: { 'placeholder': '请输入关键字进行搜索', 'search_type': 1,//1=搜索商品,2=搜索招聘信息 }, style: { 'inputbackground': '#ffffff', 'background': '#f1f1f2', 'iconcolor': '#b4b4b4', 'color': '#999999', 'textalign': 'left', 'searchstyle': '', 'marginBottom': 0, 'areaColor': "#666666", } }, 2: { model: "search3", title: '风格三', params: { 'textcontent': '请输入文字内容', 'search_type': 1,//1=搜索商品,2=搜索招聘信息 }, style: { 'inputbackground': '#d9d9d9', 'background': '#f1f1f1', 'titlecolor': '#000000', 'iconcolor': '#000000', 'marginBottom': 0 } } }, //菜单 menu:{ 0: { model: "menu", title: '风格一', params: {}, style: { 'navstyle': '', 'background': '#ffffff', 'rownum': '4', 'showtype': '0', 'pagenum': '8', 'marginbottom': "0", }, data: { C0123456789101: { imgurl: '../addons/weliam_smartcity/web/resource/images/default.png', linkurl: '', text: '按钮文字1', color: '#666666' }, C0123456789102: { imgurl: '../addons/weliam_smartcity/web/resource/images/default.png', linkurl: '', text: '按钮文字2', color: '#666666' }, C0123456789103: { imgurl: '../addons/weliam_smartcity/web/resource/images/default.png', linkurl: '', text: '按钮文字3', color: '#666666' }, C0123456789104: { imgurl: '../addons/weliam_smartcity/web/resource/images/default.png', linkurl: '', text: '按钮文字4', color: '#666666' } } }, 1: { model: "menu2", title: '风格二', params: {}, style: { 'navstyle': 'radius',//按钮形状 'background': '#ffffff',//背景颜色 'rownum': '2',//每行数量 'showtype': '0',//显示方式 'pagenum': '4',//每页数量 'marginbottom': "0",//下边距 }, data: { C0123456789101: { imgurl: '', linkurl: '', text: '标题', color: '#ffffff', bgColor: '#FDAD28', }, C0123456789102: { imgurl: '', linkurl: '', text: '标题', color: '#ffffff', bgColor: '#FDAD28', } } }, }, //图片橱窗 picturew: { 0: { model: "picturew", title: '风格一', params: {}, style: { 'marginLeftRight': "5", 'marginTopBottom': "5", 'bgColor': "#FFFFFF", }, data: { C0123456789101: { imgurl: '../addons/weliam_smartcity/web/resource/images/default.png', linkurl: '', }, C0123456789102: { imgurl: '../addons/weliam_smartcity/web/resource/images/default.png', linkurl: '', }, C0123456789103: { imgurl: '../addons/weliam_smartcity/web/resource/images/default.png', linkurl: '', }, C0123456789104: { imgurl: '../addons/weliam_smartcity/web/resource/images/default.png', linkurl: '', } } }, 1: { model: "picturew2", title: '风格二', params: {}, style: { 'marginLeftRight': "5", 'marginTopBottom': "5", 'bgColor': "#FFFFFF", }, data: { C0123456789101: { imgurl: '../addons/weliam_smartcity/web/resource/images/default_adv.png', linkurl: '', }, C0123456789102: { imgurl: '../addons/weliam_smartcity/web/resource/images/default_adv.png', linkurl: '', }, } }, 2: { model: "picturew3", title: '风格三', params: {}, style: { 'marginLeftRight': "5", 'marginTopBottom': "5", 'bgColor': "#FFFFFF", }, data: { C0123456789101: { imgurl: '../addons/weliam_smartcity/web/resource/images/default.png', linkurl: '', }, C0123456789102: { imgurl: '../addons/weliam_smartcity/web/resource/images/default.png', linkurl: '', }, } }, 3: { model: "picturew4", title: '风格四', params: {}, style: { 'marginLeftRight': "10", 'marginTopBottom': "10", 'bgColor': "#FFFFFF", }, data: { C0123456789101: { imgurl: '../addons/weliam_smartcity/web/resource/images/default.png', linkurl: '', }, C0123456789102: { imgurl: '../addons/weliam_smartcity/web/resource/images/default_adv.png', linkurl: '', }, C0123456789103: { imgurl: '../addons/weliam_smartcity/web/resource/images/default_adv.png', linkurl: '', }, } }, 4: { model: "picturew5", title: '风格五', params: {}, style: { 'marginLeftRight': "10", 'marginTopBottom': "10", 'bgColor': "#FFFFFF", }, data: { C0123456789101: { imgurl: '../addons/weliam_smartcity/web/resource/images/default.png', linkurl: '', }, C0123456789102: { imgurl: '../addons/weliam_smartcity/web/resource/images/default_adv.png', linkurl: '', }, C0123456789103: { imgurl: '../addons/weliam_smartcity/web/resource/images/default.png', linkurl: '', }, C0123456789104: { imgurl: '../addons/weliam_smartcity/web/resource/images/default.png', linkurl: '', }, } }, 5: { model: "picturew6", title: '风格六', params: {}, style: { 'marginLeftRight': "5", 'marginTopBottom': "5", 'bgColor': "#FFFFFF", }, data: { C0123456789101: { imgurl: '../addons/weliam_smartcity/web/resource/images/default.png', linkurl: '', }, C0123456789102: { imgurl: '../addons/weliam_smartcity/web/resource/images/default.png', linkurl: '', }, C0123456789103: { imgurl: '../addons/weliam_smartcity/web/resource/images/default.png', linkurl: '', }, } }, }, //抢购商品组 rush_goods: { 0: { model: "rush_goods", title: '风格一', plugin: 1, params: { type: 1, orders: 1, classs: 0, status: 1, show_num: 1, }, style: { 'bgColor': "#f6f6f6", 'margin': 15, 'padding': 10, 'marginBottom': "0", }, data: { C0123456789101: { goods_name: "请选择商品...", oldprice: "00.00", price: "00.00", storename: "店铺名称...", buy_num: "0", logo: "../addons/weliam_smartcity/web/resource/images/default.png" } } }, 1: { model: "rush_goods2", title: '风格二', plugin: 1, params: { type: 1, orders: 1, classs: 0, status: 1, show_num: 1, }, style: { 'bgColor': "#FFFFFF", 'margin': 0, 'padding': 15, 'marginBottom': "0", }, data: { C0123456789101: { goods_name: "请选择商品...", oldprice: "00.00", price: "00.00", storename: "店铺名称...", buy_num: "0", logo: "../addons/weliam_smartcity/web/resource/images/default.png", discount_price:"1.00" }, C0123456789102: { goods_name: "请选择商品...", oldprice: "00.00", price: "00.00", storename: "店铺名称...", buy_num: "0", logo: "../addons/weliam_smartcity/web/resource/images/default.png", discount_price:"1.00" } } }, 2: { model: "rush_goods3", title: '风格三', plugin: 1, params: { type: 1, orders: 1, classs: 0, status: 1, show_num: 1, buy_user: 1, sort_icon: 1, goodsLabel: '抢购' }, style: { 'bgColor': "#FFFFFF", 'margin': 5, 'padding': 10, 'marginBottom': "0", }, data: { C0123456789101: { goods_name: "请选择商品...", oldprice: "00.00", price: "00.00", storename: "店铺名称...", buy_num: "0", logo: "../addons/weliam_smartcity/web/resource/images/default.png", discount_price:"1.00", } } }, 3: { model: "rush_goods4", title: '风格四', plugin: 1, //商品类型 params: { type: 1, orders: 1, classs: 0, status: 1, show_num: 1, }, style: { 'bgColor': "#FFFFFF", 'margin': 0, 'padding': 15, 'marginBottom': "0", }, data: { C0123456789101: { goods_name: "请选择商品...", oldprice: "00.00", price: "00.00", storename: "店铺名称...", buy_num: "0", logo: "../addons/weliam_smartcity/web/resource/images/default.png" }, C0123456789102: { goods_name: "请选择商品...", oldprice: "00.00", price: "00.00", storename: "店铺名称...", buy_num: "0", logo: "../addons/weliam_smartcity/web/resource/images/default.png" }, C0123456789103: { goods_name: "请选择商品...", oldprice: "00.00", price: "00.00", storename: "店铺名称...", buy_num: "0", logo: "../addons/weliam_smartcity/web/resource/images/default.png" } } }, }, //团购商品组 groupon_goods: { 0: { model: "groupon_goods", title: '风格一', plugin: 2, params: { type: 1, orders: 1, classs: 0, show_num: 1, }, style: { 'bgColor': "#f6f6f6", 'margin': 15, 'padding': 10, 'marginBottom': "0", }, data: { C0123456789101: { goods_name: "请选择商品...", oldprice: "00.00", price: "00.00", storename: "店铺名称...", logo: "../addons/weliam_smartcity/web/resource/images/default.png" } } }, 1: { model: "groupon_goods2", title: '风格二', plugin: 2, params: { type: 1, orders: 1, classs: 0, show_num: 1, }, style: { 'bgColor': "#FFFFFF", 'margin': 0, 'padding': 15, 'marginBottom': "0", }, data: { C0123456789101: { goods_name: "请选择商品...", oldprice: "00.00", price: "00.00", storename: "店铺名称...", logo: "../addons/weliam_smartcity/web/resource/images/default.png", discount_price:"1.00", buy_num: "0", }, C0123456789102: { goods_name: "请选择商品...", oldprice: "00.00", price: "00.00", storename: "店铺名称...", logo: "../addons/weliam_smartcity/web/resource/images/default.png", discount_price:"1.00", buy_num: "0", } } }, 2: { model: "groupon_goods3", title: '风格三', plugin: 2, params: { type: 1, orders: 1, classs: 0, show_num: 1, buy_user: 1, sort_icon: 1, goodsLabel: '团购' }, style: { 'bgColor': "#FFFFFF", 'margin': 5, 'padding': 10, 'marginBottom': "0", }, data: { C0123456789101: { goods_name: "请选择商品...", oldprice: "00.00", price: "00.00", storename: "店铺名称...", logo: "../addons/weliam_smartcity/web/resource/images/default.png", discount_price:"1.00", } } }, 4: { model: "groupon_goods4", title: '风格四', plugin: 2, //商品类型 params: { type: 1, orders: 1, classs: 0, show_num: 1, }, style: { 'bgColor': "#FFFFFF", 'margin': 0, 'padding': 15, 'marginBottom': "0", }, data: { C0123456789101: { goods_name: "请选择商品...", oldprice: "00.00", price: "00.00", storename: "店铺名称...", logo: "../addons/weliam_smartcity/web/resource/images/default.png" }, C0123456789102: { goods_name: "请选择商品...", oldprice: "00.00", price: "00.00", storename: "店铺名称...", logo: "../addons/weliam_smartcity/web/resource/images/default.png" }, C0123456789103: { goods_name: "请选择商品...", oldprice: "00.00", price: "00.00", storename: "店铺名称...", logo: "../addons/weliam_smartcity/web/resource/images/default.png" } } }, }, //优惠券商品组 coupon_goods: { 0: { model: "coupon_goods", title: '风格一', plugin: 5, params: { type: 1, orders: 1, classs: 0, show_num: 1, }, style: { 'bgColor': "#f6f6f6", 'margin': 15, 'padding': 10, 'marginBottom': "0", }, data: { C0123456789101: { goods_name: "请选择商品...", oldprice: "00.00", price: "00.00", storename: "店铺名称...", user_num: "0", logo: "../addons/weliam_smartcity/web/resource/images/default.png" } } }, 1: { model: "coupon_goods2", title: '风格二', plugin: 5, params: { type: 1, orders: 1, classs: 0, show_num: 1, }, style: { 'bgColor': "#FFFFFF", 'margin': 0, 'padding': 15, 'marginBottom': "0", }, data: { C0123456789101: { goods_name: "请选择商品...", oldprice: "00.00", price: "00.00", storename: "店铺名称...", buy_num: "0", logo: "../addons/weliam_smartcity/web/resource/images/default.png" }, C0123456789102: { goods_name: "请选择商品...", oldprice: "00.00", price: "00.00", storename: "店铺名称...", buy_num: "0", logo: "../addons/weliam_smartcity/web/resource/images/default.png" } } }, 2: { model: "coupon_goods3", title: '风格三', plugin: 5, params: { type: 1, orders: 1, classs: 0, show_num: 1, }, style: { 'marginBottom': "0", }, data: { C0123456789101: { goods_name: "请选择商品...", oldprice: "00.00", price: "00.00", storename: "店铺名称...", buy_num: "0", logo: "../addons/weliam_smartcity/web/resource/images/default.png" }, } }, 3: { model: "coupon_goods4", title: '风格四', plugin: 5, //商品类型 params: { type: 1, orders: 1, classs: 0, status: 1, show_num: 1, }, style: { 'marginBottom': "0", }, data: { C0123456789101: { goods_name: "请选择商品...", oldprice: "00.00", price: "00.00", storename: "店铺名称...", buy_num: "0", logo: "../addons/weliam_smartcity/web/resource/images/default.png" }, C0123456789102: { goods_name: "请选择商品...", oldprice: "00.00", price: "00.00", storename: "店铺名称...", buy_num: "0", logo: "../addons/weliam_smartcity/web/resource/images/default.png" }, C0123456789103: { goods_name: "请选择商品...", oldprice: "00.00", price: "00.00", storename: "店铺名称...", buy_num: "0", logo: "../addons/weliam_smartcity/web/resource/images/default.png" } } }, }, //积分商品组 integral_goods: { 0: { model: "integral_goods", title: '风格一', plugin: 8, params: { type: 1, //1=手动选择 2=选择分类 orders: 3,//3=推荐 4=人气 classs: 0, //按商品分类选择时,商品分类id show_num: 1, //显示的商品数量 }, style: { 'bgColor': "#f6f6f6", 'margin': 15, 'padding': 10, 'marginBottom': "0", }, data: { C0123456789101: { title: "请选择商品...", thumb: "../addons/weliam_smartcity/web/resource/images/default.png", old_price: "00.00", price: "00.00", price_text: "1000积分 + 999.00元", pv:'8888', stock: '', } } }, 1: { model: "integral_goods2", title: '风格二', plugin: 8, params: { type: 1, //1=手动选择 2=选择分类 orders: 3,//3=推荐 4=人气 classs: 0, //按商品分类选择时,商品分类id show_num: 1, //显示的商品数量 }, style: { 'bgColor': "#f6f6f6", 'margin': 15, 'padding': 15, 'marginBottom': "0", }, data: { C0123456789101: { title: "请选择商品...", thumb: "../addons/weliam_smartcity/web/resource/images/default.png", old_price: "00.00", price: "00.00", price_text: "1000积分 + 999.00元", pv:'8888', stock: '', }, C0123456789102: { title: "请选择商品...", thumb: "../addons/weliam_smartcity/web/resource/images/default.png", old_price: "00.00", price: "00.00", price_text: "1000积分 + 999.00元", pv:'8888', stock: '', } } }, 2: { model: "integral_goods3", title: '风格三', plugin: 8, params: { type: 1, //1=手动选择 2=选择分类 orders: 3,//3=推荐 4=人气 classs: 0, //按商品分类选择时,商品分类id show_num: 1, //显示的商品数量 sort_icon: 1, goodsLabel: '积分' }, style: { 'bgColor': "#f6f6f6", 'margin': 0, 'padding': 15, 'marginBottom': "0", }, data: { C0123456789101: { title: "请选择商品...", thumb: "../addons/weliam_smartcity/web/resource/images/default.png", long_logo: "../addons/weliam_smartcity/web/resource/images/default.png", old_price: "00.00", price: "00.00", price_text: "1000积分 + 999.00元", pv:'8888', stock: '', } } }, 3: { model: "integral_goods4", title: '风格四', plugin: 8, params: { type: 1, //1=手动选择 2=选择分类 orders: 3,//3=推荐 4=人气 classs: 0, //按商品分类选择时,商品分类id show_num: 1, //显示的商品数量 }, style: { 'bgColor': "#f6f6f6", 'margin': 15, 'padding': 10, 'marginBottom': "0", }, data: { C0123456789101: { title: "请选择商品...", thumb: "../addons/weliam_smartcity/web/resource/images/default.png", old_price: "00.00", price: "00.00", price_text: "1000积分 + 999.00元", pv:'8888', stock: '', }, C0123456789102: { title: "请选择商品...", thumb: "../addons/weliam_smartcity/web/resource/images/default.png", old_price: "00.00", price: "00.00", price_text: "1000积分 + 999.00元", pv:'8888', stock: '', }, C0123456789103: { title: "请选择商品...", thumb: "../addons/weliam_smartcity/web/resource/images/default.png", old_price: "00.00", price: "00.00", price_text: "1000积分 + 999.00元", pv:'8888', stock: '', } } }, }, //拼团商品组 fightgroup_goods: { 0: { model: "fightgroup_goods", title: '风格一', plugin: 3, params: { type: 1, orders: 1, classs: 0, show_num: 1, marker_set: 0,//角标是否显示 0=不显示,1=显示 }, style: { 'bgColor': "#f6f6f6", 'margin': 15, 'padding': 10, 'marginBottom': "0", 'marker_bg': '#FF4444', 'marker_color': '#FFFFFF', }, data: { C0123456789101: { goods_name: "请选择商品...", oldprice: "00.00", price: "00.00", storename: "店铺名称...", buy_num: "0", logo: "../addons/weliam_smartcity/web/resource/images/default.png" } } }, 1: { model: "fightgroup_goods2", title: '风格二', plugin: 3, params: { type: 1, orders: 1, classs: 0, show_num: 1, marker_set: 0,//角标是否显示 0=不显示,1=显示 }, style: { 'bgColor': "#FFFFFF", 'margin': 0, 'padding': 15, 'marginBottom': "0", 'marker_bg': '#FF4444', 'marker_color': '#FFFFFF', }, data: { C0123456789101: { goods_name: "请选择商品...", oldprice: "00.00", price: "00.00", storename: "店铺名称...", buy_num: "0", logo: "../addons/weliam_smartcity/web/resource/images/default.png", discount_price:"1.00" }, C0123456789102: { goods_name: "请选择商品...", oldprice: "00.00", price: "00.00", storename: "店铺名称...", buy_num: "0", logo: "../addons/weliam_smartcity/web/resource/images/default.png", discount_price:"1.00" } } }, 2: { model: "fightgroup_goods3", title: '风格三', plugin: 3, //商品类型 params: { type: 1, orders: 1, classs: 0, show_num: 1, }, style: { 'bgColor': "#FFFFFF", 'margin': 0, 'padding': 15, 'marginBottom': "0", }, data: { C0123456789101: { goods_name: "请选择商品...", oldprice: "00.00", price: "00.00", storename: "店铺名称...", buy_num: "0", logo: "../addons/weliam_smartcity/web/resource/images/default.png" }, C0123456789102: { goods_name: "请选择商品...", oldprice: "00.00", price: "00.00", storename: "店铺名称...", buy_num: "0", logo: "../addons/weliam_smartcity/web/resource/images/default.png" }, C0123456789103: { goods_name: "请选择商品...", oldprice: "00.00", price: "00.00", storename: "店铺名称...", buy_num: "0", logo: "../addons/weliam_smartcity/web/resource/images/default.png" } } }, 3: { model: "fightgroup_goods4", title: '风格四', plugin: 3, params: { type: 1, orders: 1, classs: 0, show_num: 1, buy_user: 1, sort_icon: 1, goodsLabel: '拼团' }, style: { 'bgColor': "#FFFFFF", 'margin': 5, 'padding': 10, 'marginBottom': "0", }, data: { C0123456789101: { goods_name: "请选择商品...", oldprice: "00.00", price: "00.00", storename: "店铺名称...", buy_num: "0", logo: "../addons/weliam_smartcity/web/resource/images/default.png", discount_price:"1.00", } } }, }, //砍价商品 bargain_goods: { 0: { model: "bargain_goods", title: '风格一', plugin: 7, params: { type: 1, orders: 1, classs: 0, show_num: 1, marker_set: 0,//角标是否显示 0=不显示,1=显示 }, style: { 'bgColor': "#f6f6f6", 'margin': 15, 'padding': 10, 'marginBottom': "0", 'marker_bg': '#FF4444', 'marker_color': '#FFFFFF', }, data: { C0123456789101: { oldprice: "00.00", goods_name: "请选择商品...", price: "00.00", storename: "店铺名称...", buy_num: "0", logo: "../addons/weliam_smartcity/web/resource/images/default.png", } } }, 1: { model: "bargain_goods2", title: '风格二', plugin: 7, params: { type: 1, orders: 1, classs: 0, show_num: 1, marker_set: 0,//角标是否显示 0=不显示,1=显示 }, style: { 'bgColor': "#FFFFFF", 'margin': 0, 'padding': 15, 'marginBottom': "0", 'marker_bg': '#FF4444', 'marker_color': '#FFFFFF', }, data: { C0123456789101: { oldprice: "00.00", goods_name: "请选择商品...", price: "00.00", storename: "店铺名称...", buy_num: "0", logo: "../addons/weliam_smartcity/web/resource/images/default.png", discount_price:"1.00" }, C0123456789102: { oldprice: "00.00", goods_name: "请选择商品...", price: "00.00", storename: "店铺名称...", buy_num: "0", logo: "../addons/weliam_smartcity/web/resource/images/default.png", discount_price:"1.00" } } }, 2: { model: "bargain_goods3", title: '风格三', plugin: 7, params: { type: 1, orders: 1, classs: 0, show_num: 1, buy_user: 1, sort_icon: 1, goodsLabel: '砍价' }, style: { 'bgColor': "#FFFFFF", 'margin': 5, 'padding': 10, 'marginBottom': "0", }, data: { C0123456789101: { goods_name: "请选择商品...", oldprice: "00.00", price: "00.00", storename: "店铺名称...", logo: "../addons/weliam_smartcity/web/resource/images/default.png", discount_price:"1.00", } } }, 4: { model: "bargain_goods4", title: '风格四', plugin: 7, //商品类型 params: { type: 1, orders: 1, classs: 0, show_num: 1, }, style: { 'bgColor': "#FFFFFF", 'margin': 0, 'padding': 15, 'marginBottom': "0", }, data: { C0123456789101: { goods_name: "请选择商品...", oldprice: "00.00", price: "00.00", storename: "店铺名称...", logo: "../addons/weliam_smartcity/web/resource/images/default.png" }, C0123456789102: { goods_name: "请选择商品...", oldprice: "00.00", price: "00.00", storename: "店铺名称...", logo: "../addons/weliam_smartcity/web/resource/images/default.png" }, C0123456789103: { goods_name: "请选择商品...", oldprice: "00.00", price: "00.00", storename: "店铺名称...", logo: "../addons/weliam_smartcity/web/resource/images/default.png" } } }, }, //同城活动组 activity_goods: { 0: { model: "activity_goods", title: '风格一', plugin: 9, params: { type: 1, orders: 1, classs: 0, status: 1, show_num: 1, }, style: { 'bgColor': "#f6f6f6", 'margin': 15, 'padding': 10, 'marginBottom': "0", }, data: { C0123456789101: { goods_name: "请选择商品...", oldprice: "00.00", price: "00.00", address: "详细地址...", logo: "../addons/weliam_smartcity/web/resource/images/default.png", catename:'活动分类' } } }, }, //头条 headline: { 0: { model: "headline", title: '风格一', params: {}, style: { 'bgColor': "#FFFFFF", 'marginBottom': "0", 'type':"1", 'show_num':"1", }, data: { C0123456789101: { 'title': '头条标题', 'summary': '头条副标题', 'display_img': '../addons/weliam_smartcity/web/resource/images/default.png', 'author': '作者', 'author_img': '../addons/weliam_smartcity/web/resource/images/default.png', 'browse': '999', 'one_name': '分类', 'two_name': '分类' } } }, 1: { model: "headline2", title: '风格二', params: { title: "榜单标题", detailed: "榜单详细" }, style: { 'bgColor': "#FFFFFF", 'marginBottom': "0", 'type':"1", 'show_num':"1", }, data: { C0123456789101: { 'title': '头条标题', 'summary': '头条副标题', 'display_img': '../addons/weliam_smartcity/web/resource/images/default.png', 'author': '作者', 'author_img': '../addons/weliam_smartcity/web/resource/images/default.png', 'browse': '999', 'one_name': '分类', 'two_name': '分类' }, C0123456789102: { 'title': '头条标题', 'summary': '头条副标题', 'display_img': '../addons/weliam_smartcity/web/resource/images/default.png', 'author': '作者', 'author_img': '../addons/weliam_smartcity/web/resource/images/default.png', 'browse': '999', 'one_name': '分类', 'two_name': '分类' } } }, }, //图片轮播 banner:{ 0:{ model: "banner", title: '风格一', params: { img_width:750, img_height:560, }, style: { 'dotstyle': 'round', 'dotalign': 'left', 'side_margin': 0,//0=无边距;1=有边距 'bottom': '0', }, data: { C0123456789101: { imgurl: '../addons/weliam_smartcity/web/resource/images/default.png', linkurl: '', }, C0123456789102: { imgurl: '../addons/weliam_smartcity/web/resource/images/default.png', linkurl: '', } } }, 1: { model: "banner2", title: '风格二', params: { title: "标题内容", text: "副标题内容", img_width:750, img_height:560, }, style: { 'bgColor': '#FFFFFF', 'marginBottom': '0', 'titlecolor':"#000000", 'textcolor':"#666666", }, data: { C0123456789101: { title:"", text:"", imgurl: '../addons/weliam_smartcity/web/resource/images/default.png', linkurl: '', }, C0123456789102: { title:"", text:"", imgurl: '../addons/weliam_smartcity/web/resource/images/default.png', linkurl: '', } } }, }, //通用商品 public_goods:{ 0:{ model: "public_goods", title: '风格一', plugin: 0, //商品类型 params: {}, style: { 'bgColor': "#FFFFFF", 'margin': 0, 'padding': 15, 'marginBottom': "0", }, data: { C0123456789101: { goods_name: "请选择商品...", oldprice: "00.00", price: "00.00", storename: "店铺名称...", buy_num: "0", logo: "../addons/weliam_smartcity/web/resource/images/default.png" }, C0123456789102: { goods_name: "请选择商品...", oldprice: "00.00", price: "00.00", storename: "店铺名称...", buy_num: "0", logo: "../addons/weliam_smartcity/web/resource/images/default.png" }, C0123456789103: { goods_name: "请选择商品...", oldprice: "00.00", price: "00.00", storename: "店铺名称...", buy_num: "0", logo: "../addons/weliam_smartcity/web/resource/images/default.png" } } }, 1:{ model: "public_goods2", title: '风格二', plugin: 0, //商品类型 params: { title:"", sub_title:"", button_name:'购买', }, style: { 'bgColor': "#FFFFFF", 'marginBottom': "0", 'margin': 0, }, data: { C0123456789101: { goods_name: "请选择商品...", oldprice: "00.00", price: "00.00", storename: "店铺名称...", buy_num: "0", logo: "../addons/weliam_smartcity/web/resource/images/default.png" }, C0123456789102: { goods_name: "请选择商品...", oldprice: "00.00", price: "00.00", storename: "店铺名称...", buy_num: "0", logo: "../addons/weliam_smartcity/web/resource/images/default.png", }, C0123456789103: { goods_name: "请选择商品...", oldprice: "00.00", price: "00.00", storename: "店铺名称...", buy_num: "0", logo: "../addons/weliam_smartcity/web/resource/images/default.png", discount_price:"1.00" } } }, }, //商户组件 shop:{ 0:{ model: "shop", title: '风格一', params: { type:1, rule:3, show_num:5, }, style: { 'marginBottom': "0", }, data: { C0123456789101: { storename: "店铺名称...", logo: "../addons/weliam_smartcity/web/resource/images/default.png", score:"5", storehours:"00:00—23:59 营业", address:"店铺地址信息", oneType:'一级分类', twoType:'二级分类', goods:{ halfcard:{name:'一卡通'}, active:{name:'抢购商品'}, coupon:{name:'卡券信息'}, fightgroup:{name:'拼团商品'}, packages:{name:'大礼包信息'}, groupon:{name:'团购商品'}, } } } }, 1:{ model: "shop2", title: '风格二', params: { type:1, rule:3, show_num:5, }, style: { 'marginBottom': "0", }, data: { C0123456789101: { storename: "店铺名称...", logo: "../addons/weliam_smartcity/web/resource/images/default.png", score:"5", salesVolume:88888, storehours:"00:00—23:59 营业", } } }, 2:{ model: "shop3", title: '风格三', params: { type:1,//1=手动选择 2=自动选择 rule:3,//自动规则 1 = 创建时间,2 = 店铺距离,3 = 默认设置,4 = 浏览人气 show_num:5,//默认显示的数量 }, style: { 'marginBottom': "0", }, data: { C0123456789101: { logo: "../addons/weliam_smartcity/web/resource/images/default.png", distance: '500m', storename: "店铺名称...", score:"5", salesVolume:88888, storehours:"00:00—23:59 营业", tag:['标签一','标签二','标签三'], }, C0123456789102: { logo: "../addons/weliam_smartcity/web/resource/images/default.png", distance: '500m', storename: "店铺名称...", score:"5", salesVolume:88888, storehours:"00:00—23:59 营业", tag:['标签一','标签二','标签三'], }, C0123456789103: { logo: "../addons/weliam_smartcity/web/resource/images/default.png", distance: '500m', storename: "店铺名称...", score:"5", salesVolume:88888, storehours:"00:00—23:59 营业", tag:['标签一','标签二','标签三'], }, } }, 3:{ model: "shop4", title: '风格四', params: { type:1,//1=手动选择 2=自动选择 rule:3,//自动规则 1 = 创建时间,2 = 店铺距离,3 = 默认设置,4 = 浏览人气 show_num:5,//默认显示的数量 }, style: { 'marginBottom': "0", }, data: { C0123456789101: { logo: "../addons/weliam_smartcity/web/resource/images/default.png", distance: '500m', storename: "店铺名称...", score:"5", salesVolume:88888, storehours:"00:00—23:59 营业", tag:['标签一','标签二','标签三'], address:'店铺详细地址', }, C0123456789102: { logo: "../addons/weliam_smartcity/web/resource/images/default.png", distance: '500m', storename: "店铺名称...", score:"5", salesVolume:88888, storehours:"00:00—23:59 营业", tag:['标签一','标签二','标签三'], address:'店铺详细地址', }, } }, 4:{ model: "shop5", title: '风格五', params: { type:1,//1=手动选择 2=自动选择 rule:3,//自动规则 1 = 创建时间,2 = 店铺距离,3 = 默认设置,4 = 浏览人气 show_num:5,//默认显示的数量 }, style: { 'marginBottom': "0", 'title': '专区标题', 'top_image': '../addons/weliam_smartcity/web/resource/images/default.png', 'titleColor':'#FFFFFF',//标题颜色 'bgColor': '#FFFFFF',//背景颜色 'link':'',//跳转链接 }, data: { C0123456789101: { logo: "../addons/weliam_smartcity/web/resource/images/default.png", distance: '500m', storename: "店铺名称...", score:"5", salesVolume:888, storehours:"00:00—23:59 营业", tag:['标签一','标签二','标签三'], address:'店铺详细地址', }, C0123456789102: { logo: "../addons/weliam_smartcity/web/resource/images/default.png", distance: '500m', storename: "店铺名称...", score:"5", salesVolume:888, storehours:"00:00—23:59 营业", tag:['标签一','标签二','标签三'], address:'店铺详细地址', }, C0123456789103: { logo: "../addons/weliam_smartcity/web/resource/images/default.png", distance: '500m', storename: "店铺名称...", score:"5", salesVolume:888, storehours:"00:00—23:59 营业", tag:['标签一','标签二','标签三'], address:'店铺详细地址', }, } }, 5:{ model: "shop6", title: '风格六', params: { type:1,//1=手动选择 2=自动选择 rule:3,//自动规则 1 = 创建时间,2 = 店铺距离,3 = 默认设置,4 = 浏览人气 show_num:5,//默认显示的数量 }, style: { 'marginBottom': "0", 'bgColor': '#f6f6f6',//背景颜色 }, data: { C0123456789101: { logo: "../addons/weliam_smartcity/web/resource/images/default.png", distance: '500m', storename: "店铺名称...", score:"5", salesVolume:888, storehours:"00:00—23:59 营业", tag:['标签一','标签二','标签三'], address:'店铺详细地址', }, C0123456789102: { logo: "../addons/weliam_smartcity/web/resource/images/default.png", distance: '500m', storename: "店铺名称...", score:"5", salesVolume:888, storehours:"00:00—23:59 营业", tag:['标签一','标签二','标签三'], address:'店铺详细地址', }, } }, }, //大礼包组件 packages:{ 0:{ model: "packages", title: '风格一', plugin: 4, //商品类型 params: { type: 1, //1=手动选择 2=选择分类 3=选择状态 orders: 1, //1=综合 2=按销量 3=价格降序 4=价格升序 show_num: 1, //显示的商品数量 }, style: { 'bgColor': "#f6f6f6", 'margin': 15, 'padding': 10, 'marginBottom': "0", }, data: { C0123456789101: { datestatus:1, logo: "../addons/weliam_smartcity/web/resource/images/default.png", storename: '商户名称', name: '礼包名称', usetimes: '100',//周期内使用次数 surplus: '99',//剩余次数 price: '88888', } } }, // 1:{ // model: "packages2", // title: '风格二', // plugin: 4,//商品类型 // params: { // type: 1, //1=手动选择 2=选择分类 3=选择状态 // orders: 1, //1=综合 2=按销量 3=价格降序 4=价格升序 // show_num: 1, //显示的商品数量 // }, // style: { // 'marginBottom': "0", // }, // data: { // C0123456789101: { // datestatus:1, // logo: "../addons/weliam_smartcity/web/resource/images/default.png", // storename: '某某商户', // name: '礼包名称', // usetimes: '100',//周期内使用次数 // surplus: '99',//剩余次数 // price: '88888', // limit:'当前礼包的使用限制', // } // } // } }, //打折卡组件 discount_card:{ 0:{ model: "discount_card", title: '风格一', plugin: 6, //商品类型 params: { type: 1, //1=手动选择 2=选择分类 3=选择状态 orders: 1, //1=综合 2=按销量 3=价格降序 4=价格升序 show_num: 1, //显示的商品数量 }, style: { 'bgColor': "#f6f6f6", 'margin': 15, 'padding': 10, 'marginBottom': "0", }, data: { C0123456789101: { name: '卡券名称', limit: '使用限制', discount: '1.0', storename: '店铺名称', logo: '../addons/weliam_smartcity/web/resource/images/default.png', } } }, // 1:{ // model: "discount_card2", // title: '风格二', // plugin: 6,//商品类型 // params: { // type: 1, //1=手动选择 2=选择分类 3=选择状态 // orders: 1, //1=综合 2=按销量 3=价格降序 4=价格升序 // show_num: 1, //显示的商品数量 // }, // style: { // 'marginBottom': "0", // }, // data: { // C0123456789101: { // name: '卡券名称', // limit: '使用限制', // discount: '1.0', // storename: '店铺名称', // logo: '../addons/weliam_smartcity/web/resource/images/default.png', // } // } // } }, //选项卡组件 options:{ 0:{ model: "options", title: '首页选项卡', params: {}, style: { 'marginBottom': "0", 'selectBg': '#ff2d2d', 'background': '#FFFFFF', 'defaultBg': '#000000', }, data: modal.optionInfo, }, 1:{ model: "options2", title: '商品选项卡', params: { goods_type: modal.getOption2DefautlSelectedPlugin(), }, style: { 'marginBottom': "0", 'selectBg': '#ff2d2d', 'background': '#FFFFFF', 'defaultBg': '#000000', }, data: { C0123456789101: { 'name': '标题',//名称 'sort': '1',//当前按钮顺序 'status': '1',//状态 'orders': 1,//1=创建时间 2=店铺距离 3=推荐设置 4=浏览人气 5=商品销量 gneder: '1',//性别:1=男,2=女 service_type:'1',//类型 }, C0123456789102: { 'name': '标题',//名称 'sort': '2',//当前按钮顺序 'status': '2',//状态 'orders': 1,//1=创建时间 2=店铺距离 3=推荐设置 4=浏览人气 5=商品销量 gneder: '1',//性别:1=男,2=女 service_type:'1',//类型 }, C0123456789103: { 'name': '标题',//名称 'sort': '3',//当前按钮顺序 'status': '3',//状态 'orders': 1,//1=创建时间 2=店铺距离 3=推荐设置 4=浏览人气 5=商品销量 gneder: '1',//性别:1=男,2=女 service_type:'1',//类型 } }, }, 2:{ model: "options3", title: '商户选项卡', params: {}, style: { 'marginBottom': "0", }, data: { C0123456789101: { title:'最新', order:1,//1=时间排序;2=距离排序;3=推荐排序;4=人气排序 }, C0123456789102: { title:'附近', order:2,//1=时间排序;2=距离排序;3=推荐排序;4=人气排序 }, C0123456789103: { title:'推荐', order:3,//1=时间排序;2=距离排序;3=推荐排序;4=人气排序 }, C0123456789104: { title:'人气', order:4,//1=时间排序;2=距离排序;3=推荐排序;4=人气排序 }, } }, }, //商户入驻组件 shop_join:{ 0:{ model: "shop_join", title: '风格一', params: { title:"商户入驻", button:'我要加入' }, style: { 'marginBottom': "0", }, data: {}, }, }, //求职 - 企业 recruit_enterprise:{ 0: { model: "recruit_enterprise", title: '风格一', params: { type: 1, //加载类型:1=手动选择,2=选择行业 orders: 1, //排序:1 = 创建时间,2 = 店铺距离,3 = 默认设置,4 = 浏览人气 industry_id: 0, //行业id show_num: 1, //显示的商品数量 }, style: { 'bgColor': "#FFFFFF",//背景颜色 'padding': 0,//内边距 'marginBottom': 0,//下边距 }, data: { R0123456789101: { storename: "请选择企业...", logo:'../addons/weliam_smartcity/web/resource/images/default.png', is_authentication: 0,//是否认证:0=未认证,1=已认证 nature:'企业性质',//企业性质 scale:'企业规模',//企业规模 industry:'经营行业',//经营行业 area:'所在区域',//所在区域 release_recruit: 999,//招聘中岗位数量 } } }, 1: { model: "recruit_enterprise2", title: '风格二', params: { title: '企业推荐',//块标题 show_more: 1,//是否显示更多 0=不显示,1=显示 type: 1, //加载类型:1=手动选择,2=选择行业 orders: 1, //排序:1 = 创建时间,2 = 店铺距离,3 = 默认设置,4 = 浏览人气 industry_id: 0, //行业id show_num: 1, //显示的商品数量 }, style: { 'bgColor': "#FFFFFF",//背景颜色 'padding': 10,//内边距 'marginBottom': 0,//下边距 }, data: { R0123456789101: { storename: "请选择企业...", logo:'../addons/weliam_smartcity/web/resource/images/default.png', is_authentication: 0,//是否认证:0=未认证,1=已认证 nature:'企业性质',//企业性质 scale:'企业规模',//企业规模 industry:'经营行业',//经营行业 area:'所在区域',//所在区域 release_recruit: 999,//招聘中岗位数量 }, R0123456789102: { storename: "请选择企业...", logo:'../addons/weliam_smartcity/web/resource/images/default.png', is_authentication: 0,//是否认证:0=未认证,1=已认证 nature:'企业性质',//企业性质 scale:'企业规模',//企业规模 industry:'经营行业',//经营行业 area:'所在区域',//所在区域 release_recruit: 999,//招聘中岗位数量 }, R0123456789103: { storename: "请选择企业...", logo:'../addons/weliam_smartcity/web/resource/images/default.png', is_authentication: 0,//是否认证:0=未认证,1=已认证 nature:'企业性质',//企业性质 scale:'企业规模',//企业规模 industry:'经营行业',//经营行业 area:'所在区域',//所在区域 release_recruit: 999,//招聘中岗位数量 }, } }, }, //流量主 flow:{ 0:{ model: "flow", title: 'Banner广告', params: { unit_id:'', }, style: {}, data: {} }, 1:{ model: "flow2", title: '激励式广告', params: { unit_id:'', }, style: {}, data: {} }, 2:{ model: "flow3", title: '插屏广告', params: { unit_id:'', }, style: {}, data: {} }, 3:{ model: "flow4", title: '视频广告', params: { unit_id:'', }, style: {}, data: {} }, // 4:{ // model: "flow5", // title: '视频贴片广告', // params: { // unit_id:'', // }, // style: {}, // data: {} // }, 5:{ model: "flow6", title: '格子广告', params: { unit_id:'', }, style: {}, data: {} }, }, //配送商品 citydelivery_goods:{ 0: { model: "citydelivery_goods", title: '风格一', plugin: 10, params: { title: '推荐',//块标题 show_more: 1,//是否显示更多 0=不显示,1=显示 type: 1, //1=综合 2=销量 3=价格降序 4=价格升序 5=创建时间 orders: 1,//3=推荐 4=人气 classs: 0, //按商品分类选择时,商品分类id show_num: 1, //显示的商品数量 }, style: { 'bgColor': "#FFFFFF",//背景颜色 'padding': 10,//内边距 'marginBottom': 0,//下边距 }, data: { C0123456789101: { goods_name: "请选择商品...", logo: "../addons/weliam_smartcity/web/resource/images/default.png", long_logo: "../addons/weliam_smartcity/web/resource/images/default.png", price: "10.00", buy_num: 9999 }, C0123456789102: { goods_name: "请选择商品...", logo: "../addons/weliam_smartcity/web/resource/images/default.png", long_logo: "../addons/weliam_smartcity/web/resource/images/default.png", price: "10.00", buy_num: 9999 }, C0123456789103: { goods_name: "请选择商品...", logo: "../addons/weliam_smartcity/web/resource/images/default.png", long_logo: "../addons/weliam_smartcity/web/resource/images/default.png", price: "10.00", buy_num: 9999 }, } }, 1: { model: "citydelivery_goods2", title: '风格二', plugin: 10, params: { type: 1, //1=综合 2=销量 3=价格降序 4=价格升序 5=创建时间 orders: 1,//3=推荐 4=人气 classs: 0, //按商品分类选择时,商品分类id show_num: 1, //显示的商品数量 }, style: { 'top_image': '../addons/weliam_smartcity/web/resource/images/default.png', 'link':'',//跳转链接 'bgColor': "#FFFFFF",//背景颜色 'padding': 0,//内边距 'marginBottom': 0,//下边距 }, data: { C0123456789101: { goods_name: "请选择商品...", logo: "../addons/weliam_smartcity/web/resource/images/default.png", long_logo: "../addons/weliam_smartcity/web/resource/images/default.png", price: "10.00", buy_num: 9999 }, C0123456789102: { goods_name: "请选择商品...", logo: "../addons/weliam_smartcity/web/resource/images/default.png", long_logo: "../addons/weliam_smartcity/web/resource/images/default.png", price: "10.00", buy_num: 9999 }, C0123456789103: { goods_name: "请选择商品...", logo: "../addons/weliam_smartcity/web/resource/images/default.png", long_logo: "../addons/weliam_smartcity/web/resource/images/default.png", price: "10.00", buy_num: 9999 }, C0123456789104: { goods_name: "请选择商品...", logo: "../addons/weliam_smartcity/web/resource/images/default.png", long_logo: "../addons/weliam_smartcity/web/resource/images/default.png", price: "10.00", buy_num: 9999 }, } }, 2: { model: "citydelivery_goods3", title: '风格三', plugin: 10, params: { type: 1, //1=手动选择 2=选择分类 orders: 1,//1=综合 2=销量 3=价格降序 4=价格升序 5=创建时间 classs: 0, //按商品分类选择时,商品分类id show_num: 1, //显示的商品数量 }, style: { 'top_image': '../addons/weliam_smartcity/web/resource/images/default.png', 'link':'',//跳转链接 'bgColor': "#FFFFFF",//背景颜色 'padding': 10,//内边距 'marginBottom': 0,//下边距 }, data: { C0123456789101: { goods_name: "请选择商品...", logo: "../addons/weliam_smartcity/web/resource/images/default.png", long_logo: "../addons/weliam_smartcity/web/resource/images/default.png", price: "10.00", buy_num: 9999 } } }, 3: { model: "citydelivery_goods4", title: '风格四', plugin: 10, params: { type: 1, //1=手动选择 2=选择分类 orders: 1,//1=综合 2=销量 3=价格降序 4=价格升序 5=创建时间 classs: 0, //按商品分类选择时,商品分类id show_num: 1, //显示的商品数量 }, style: { top_image: '../addons/weliam_smartcity/web/resource/images/default.png', link:'',//跳转链接 'bgColor': "#FFFFFF",//背景颜色 'padding': 10,//内边距 'marginBottom': 0,//下边距 }, data: { C0123456789101: { goods_name: "请选择商品...", logo: "../addons/weliam_smartcity/web/resource/images/default.png", long_logo: "../addons/weliam_smartcity/web/resource/images/default.png", price: "10.00", buy_num: 9999 }, C0123456789102: { goods_name: "请选择商品...", logo: "../addons/weliam_smartcity/web/resource/images/default.png", long_logo: "../addons/weliam_smartcity/web/resource/images/default.png", price: "10.00", buy_num: 9999 }, C0123456789103: { goods_name: "请选择商品...", logo: "../addons/weliam_smartcity/web/resource/images/default.png", long_logo: "../addons/weliam_smartcity/web/resource/images/default.png", price: "10.00", buy_num: 9999 }, } }, }, //家政服务 house_keep:{ 0:{ model: "house_keep", title: '风格一', params: { title:'推荐服务者',//标题 show_more: 1,//查看更多 show_title: 1,//标签栏 service_type: 0,//服务类型:0=全部,1=商户服务商,2=个人服务商,3=客户需求,4=服务项目 type: 1, //加载类型:1=手动选择,2=自动加载 show_num: 1, //显示的数量 orders: 1, //排序 jbstatus:1, //角标开关 }, style: { bgColor: "#FFFFFF",//背景颜色 padding: 0,//内边距 marginBottom: 0,//下边距 }, data: { R0123456789101: { logo: "../addons/weliam_smartcity/web/resource/images/default.png", long_logo: "../addons/weliam_smartcity/web/resource/images/default.png", name: '名称', address: '地址信息', service_type: 1,//类型:1=商户服务商,2=个人服务商,3=客户需求,4=服务项目 tip: '商户服务商', label: ['分类一','分类二','分类三'] }, R0123456789102: { logo: "../addons/weliam_smartcity/web/resource/images/default.png", long_logo: "../addons/weliam_smartcity/web/resource/images/default.png", name: '名称', address: '地址信息', service_type: 1,//类型:1=商户服务商,2=个人服务商,3=客户需求,4=服务项目 tip: '商户服务商', label: ['分类一','分类二','分类三'] }, R0123456789103: { logo: "../addons/weliam_smartcity/web/resource/images/default.png", long_logo: "../addons/weliam_smartcity/web/resource/images/default.png", name: '名称', address: '地址信息', service_type: 1,//类型:1=商户服务商,2=个人服务商,3=客户需求,4=服务项目 tip: '商户服务商', label: ['分类一','分类二','分类三'] }, } }, 1:{ model: "house_keep2", title: '风格二', params: { service_type: 0,//服务类型:0=全部,1=商户服务商,2=个人服务商,3=客户需求,4=服务项目 type: 1, //加载类型:1=手动选择,2=自动加载 show_num: 1, //显示的数量 orders: 1, //排序 jbstatus:1, //角标开关 }, style: { bgColor: "#F6F6F6",//背景颜色 margin: 15,//外边距 padding: 10,//内边距 marginBottom: 0,//下边距 }, data: { R0123456789101: { logo: "../addons/weliam_smartcity/web/resource/images/default.png", long_logo: "../addons/weliam_smartcity/web/resource/images/default.png", name: '名称', address: '地址信息', service_type: 1,//类型:1=商户服务商,2=个人服务商,3=客户需求,4=服务项目 tip: '商户服务商', label: ['分类一','分类二','分类三'] }, R0123456789102: { logo: "../addons/weliam_smartcity/web/resource/images/default.png", long_logo: "../addons/weliam_smartcity/web/resource/images/default.png", name: '名称', address: '地址信息', service_type: 1,//类型:1=商户服务商,2=个人服务商,3=客户需求,4=服务项目 tip: '商户服务商', label: ['分类一','分类二','分类三'] }, R0123456789103: { logo: "../addons/weliam_smartcity/web/resource/images/default.png", long_logo: "../addons/weliam_smartcity/web/resource/images/default.png", name: '名称', address: '地址信息', service_type: 1,//类型:1=商户服务商,2=个人服务商,3=客户需求,4=服务项目 tip: '商户服务商', label: ['分类一','分类二','分类三'] }, } }, } } }; //判断插件 获取选项卡风格二默认选中插件 modal.getOption2DefautlSelectedPlugin = function(){ if(modal.plugins.rush) return 'rush';//抢购 else if(modal.plugins.groupon) return 'groupon';//团购 else if(modal.plugins.wlfightgroup) return 'wlfightgroup';//拼团 else if(modal.plugins.bargain) return 'bargain';//砍价 else if(modal.plugins.wlcoupon) return 'coupon';//卡券 else if(modal.plugins.activity) return 'activity';//活动 else if(modal.plugins.recruit) return 'recruit';//求职招聘 else if(modal.plugins.housekeep) return 'housekeep';//家政服务 }; modal.initItems = function(selected) { var phone = $("#phone"); if(!modal.items) { modal.items = {}; return } phone.empty(); var page_bgColor = modal.page['background']; $.each(modal.items, function(itemid, item) { //存在group 添加group_name group_key if(item.group) { item.group_name = item.group; item.group_key = 0; } //id不存在 判断是否为组件群 是获取新的id if(typeof(item.id) === 'undefined' && typeof(item.group) !== 'undefined'){ if(item.group_key == 0 || (typeof(item.group) !== 'undefined' && typeof(item.group_name) === 'undefined')){ item.id = item.group; }else{ var id_name = item.group+item.group_key; item.id = item.group+item.group_key; } } //id存在 进行数据的渲染 if(typeof(item.id) !== 'undefined') { var newItem = $.extend(true, {}, item); newItem.itemid = itemid; newItem['page_bgColor'] = page_bgColor; //获取组件数量 if(newItem.data && typeof newItem.data != 'object'){ newItem.params.length = Object.keys(newItem.data).length; } //console.log(newItem); var html = tpl("tpl_show_" + newItem.id, newItem); $("#phone").append(html) } }); var btnhtml = $("#edit-del").html(); $("#phone .drag").append(btnhtml); //点击删除 $("#phone .drag .btn-edit-del .btn-del").unbind('click').click(function(e) { e.stopPropagation(); var drag = $(this).closest(".drag"); var itemid = drag.data('itemid'); var nodelete = $(this).closest(".drag").hasClass("nodelete"); if(nodelete) { tip.alert("此元素禁止删除"); return } tip.confirm("确定删除吗", function() { var nearid = modal.getNear(itemid); delete modal.items[itemid]; modal.initItems(); if(nearid) { $(document).find(".drag[data-itemid='" + nearid + "']").trigger('mousedown') } else { $("#page").trigger('click') } }) }); if(selected) { modal.selectedItem(selected) } }; modal.selectedItem = function(itemid) { if(!itemid) { return } modal.selected = itemid; if(itemid == 'page') { $("#page").trigger('click') } else { $(".drag[data-itemid='" + itemid + "']").addClass('selected') } }; modal.initPage = function(initE) { if(typeof(initE) === 'undefined') { initE = true } if(!modal.page) { modal.page = { type: modal.type, title: '请输入页面标题', name: '未命名页面', background: '#FFFFFF', diymenu: '-1', diyadv: '-1', diylayer: '0', diygotop: '0', followbar: '0', visit: '0', poster: '0', bgm_music: '', share_title:'', share_description:'', share_image:'', visitlevel: { member: null, commission: null }, novisit: { title: null, link: null } }; if(modal.type == 5) { modal.page.title = "商品详情" } else if(modal.type == 8) { modal.page.title = "兑换中心" } else if(modal.type == 99) { modal.page.type = 99; modal.page.title = '公用模块'; modal.page.name = '未命名模块' } } if(!modal.page.visitlevel) { modal.page.visitlevel = { member: null, commission: null }; } if(!modal.page.novisit) { modal.page.novisit = {}; } $("#page").text(modal.page.title); $("#phone").css({ 'background-color': modal.page.background }); $("#phone").find(".drag").removeClass("selected"); if(initE) { modal.initEditor() } }; modal.initSortable = function() { $("#phone").sortable({ opacity: 0.8, placeholder: "highlight", items: '.drag:not(.fixed)', revert: 100, scroll: false, start: function(event, ui) { var height = ui.item.height(); $(".highlight").css({ "height": height + "px" }); $(".highlight").html('