weiqingting.html 11.6 KB
<script type="text/template" id="template_content">
<!-- 文本内容 -->
[[each modules as module index]]
    <li class="form-group custom-group dragItem" data-index="[[index]]" style="width: 100%">
    [[if module.contentData.template_name=='text']]
        <div class="col-sm-12"><h3>[[module.contentData.data.text]]</h3></div>
    [[else if module.contentData.template_name=='singleImage']]
        <div class="col-sm-12">
            <img src="[[module.contentData.data[0].src]]" title="[[module.contentData.data[0].title]]">
        </div>
    [[else if module.contentData.template_name=='smallPic']]
        [[each module.contentData.data as item i]]
        <div class="col-sm-6">
                <img src="[[item.src]]" title="[[item.title]]">
        </div>
        [[/each]]
    [[else if module.contentData.template_name=='goods']]
        [[each module.contentData.data as item i]]
        <div class="col-sm-6">
                <img src="[[item.src]]" title="[[item.title]]">
        </div>
        [[/each]]
    [[else if module.contentData.template_name=='link']]
        <div class="col-sm-12">
            <h3>添加链接</h3>
        </div>
    [[else if module.contentData.template_name=='goodsGroup']]
        <div class="form-group">
        [[each module.contentData.data as items i]]
        <div class="col-sm-3">
            <img src="[[items.cover.cover]]" >
        </div>
        [[/each]]
        </div>

        [[each module.contentData.data[0].list as item index]]
        <div class="col-sm-6">
            <img src="[[item.src]]" title="[[item.id]]">
        </div>
        [[/each]]
        
    </div>
    {{> resource/taoyu2}}
    [[/if]]
        <div class="actions-box">
            <div class="actions-wrap">
                <span class="edit" data-index="[[index]]">编辑</span>
                <span class="del" data-index="[[index]]">删除</span>
            </div>
        </div>
     </li>
[[/each]]

</script>

<!-- 文本弹层 -->
<script type="text/template" id="template_dialog_text">
    <div class="rows">
       <textarea rows="2" class="form-control observe" placeholder="文章摘要" data-field="text" >[[contentData.data.text]]</textarea>
    </div>
</script>

<!-- 一张图片 -->
<script type="text/template" id="template_dialog_grid">
    <div class="rows">
    <div id="grid-baseFrom">
        <table class="table table-hover table-bordered responsive dataTable no-footer">
            <thead>
            <tr>
                <th>序号</th>
                <th>资源位</th>
                <th>地址</th>
            </tr>
            </thead>
            <tbody>
            [[each contentData.data as item index]]
            <tr>
                <td>[[index+1]]</td>
                <td><input type="file"  name="file" id="src-[[index]]" value="[[item.src]]" data-field="[[index]].src" data-index="[[index]]" /></td>
                <td>
                <div class="form-group">
                    <div class="col-sm-10">
                         <select class="form-control observe" data-field="[[index]].url.action" value='[[item.url.action]]'>     
                            [[layout template_default_1]]
                        </select>
                    </div>
                </div>

                 <div class="form-group">
                    <div class="col-sm-10">
                         <textarea rows="2" class="form-control observe" placeholder="跳转地址" data-field="[[index]].url.url">[[item.url.url]]</textarea>
                    </div>
                </div>


                <div class="form-group">
                    <div class="col-sm-10">
                         <input class="form-control observe" value="[[item.alt]]" placeholder="图片描述" data-field='[[index]].alt' />
                    </div>
                </div>

                   
                </td>
            </tr>
            [[/each]]
            </tbody>
        </table>
    </div>
    </div>
</script>

<!-- 选择商品 -->
<script type="text/template" id="template_dialog_goods">
    <div class="rows">
        <div class="form-group">
            <div class="col-sm-12">
                <ul class="cover-image-list col-sm-10" id="goodspic">
                    [[each contentData.data as item index]]    
                        <li class="cover-image-item image-list" data-index="2">
                            <div class="goods-img">
                                <a class="fileinput-button-icon" href="javascript:void(0);">
                                    <img src="[[item.src]]">
                                </a>
                                <i class="remove-item-btn removepic glyphicon glyphicon-remove-circle" data-index="[[index]]"></i>
                            </div>
                        </li>
                    [[/each]]
                </ul>
            </div>
            
        </div>
        <div class="form-group">
             <div class="col-sm-1">
                <button class="btn btn-info" type="button" id="goodsSelectBtn">选择标签</button>
            </div>
        </div>
    </div>
</script>

<script type="text/template" id="template_dialog_goodsimgs">
    [[each datas as data index]]    
        <li class="cover-image-item image-list" data-index="2">
            <div class="goods-img">
                <a class="fileinput-button-icon" href="javascript:void(0);">
                    <img src="[[data.src]]">
                </a>
                <i class="remove-item-btn removepic glyphicon glyphicon-remove-circle" data-index="[[index]]"></i>
            </div>
        </li>
    [[/each]]
</script>

<!--添加商品/商品组--选择标签界面模板-->
<script type="text/template" id="template_dialog_goodsgird">
    <div class="rows">
        <div class="form-group">
            <div class="panel-col2">
                <input class="form-control"  id="skns" placeholder="输入SKN(多个skn以逗号分隔)" />
            </div>
            <div class="panel-col">
                <input type="number" id="beginPrice"  name="begin_price" class="form-control"
                       placeholder="起始价" value="" >
            </div>

            <div class="panel-col">
                <input type="number" id="endPrice" name="end_price" class="form-control"
                       placeholder="结束价" value="" >
            </div>
            <div class="col-sm-1">
                <input type="button" id="search" class="btn btn-primary mr5" value="搜索" />
            </div>
        </div>
        <div class="form-group">
            <div class="gird" id="goodsgird"></div>
        </div>
    </div>
</script>

<!-- 推荐商品 -->
<script type="text/tempalte" id="template_dialog_remgoods">
    <div class="rows" id="groupsgoods">
        [[each contentData.data as items i]]
            <div class="form-group">
            <div class="col-sm-10">
                <ul class="cover-image-list col-sm-10" id="goodspic-0">
                    [[each items.list as item index]]    
                        <li class="cover-image-item image-list" data-index="2">
                            <div class="goods-img">
                                <a class="fileinput-button-icon" href="javascript:void(0);">
                                    <img src="[[item.src]]">
                                </a>
                                <i class="remove-item-btn removepic glyphicon glyphicon-remove-circle" data-index="[[index]]"></i>
                            </div>
                        </li>
                    [[/each]]
                </ul>
            </div>
             <div class="col-sm-2">
                <button class="btn btn-info goodsSelectBtn" type="button" data-index="[[i]]">选择标签</button>
            </div>
        </div>
        [[/each]]

    </div>
    <div class="rows">
     <div class="form-group">
            <div class="col-sm-1">
                <button class="btn btn-info" type="button" id="goodsaddBtn">添加组</button>
            </div>
        </div>
    </div>
</script>

<script type="text/template" id="template_dialog_remgoodsgroup">
     [[each contentData.data as items i]]
        <div class="form-group">
        <div class="col-sm-10">
            <ul class="cover-image-list col-sm-10" id="goodspic-0">
                [[each items.list as item index]]    
                    <li class="cover-image-item image-list" data-index="2">
                        <div class="goods-img">
                            <a class="fileinput-button-icon" href="javascript:void(0);">
                                <img src="[[item.src]]">
                            </a>
                            <i class="remove-item-btn removepic glyphicon glyphicon-remove-circle" data-index="[[index]]"></i>
                        </div>
                    </li>
                [[/each]]
            </ul>
        </div>
         <div class="col-sm-2">
            <button class="btn btn-info goodsSelectBtn" type="button" data-index="[[i]]">选择标签</button>
        </div>
    </div>
    [[/each]]
</script>
<!-- 一个连接 -->
<script type="text/template" id="template_dialog_link">
    <div class="rows">
        <div class="form-group">
            <label class="col-sm-2 control-label">选择跳转目的地:</label>
            <div class="col-sm-8">
                <select class="form-control observe" data-field="0.url.action" value='[[contentData.data[0].url.action]]'>     
                    [[layout template_default_1]]
                </select>

            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">跳转地址:</label>
            <div class="col-sm-8">
                <textarea rows="2" class="form-control observe" placeholder="跳转地址" data-field="0.url.url" >[[contentData.data[0].url.url]]</textarea>
            </div>
           
        </div>
    </div>
</script>


<script type="text/template" id="template_default_1">
    <option value="">选择跳转目的</option>
    <option value="">选择跳转目标</option>
    <option value="go.brand">品牌列表页</option>
    <option value="go.productDetail">商品详情页</option>
    <option value="go.coupon">优惠券页</option>
    <option value="go.fav">收藏列表页</option>
    <option value="go.mine">我的页面</option>
    <option value="go.list">列表或搜索页</option>
    <option value="go.attention">关注页</option>
    <option value="go.plus">plus</option>
    <option value="go.star">star</option>
    <option value="go.new">新品到着页</option>
    <option value="go.sale">折扣页</option>
    <option value="go.share">分享</option>
    <option value="go.h5">h5网页</option>
    <option value="go.weblogin">h5网页调用本地登录</option>
    <option value="go.guangchannel">逛频道</option>
    <option value="go.gender">男女首页</option>
    <option value="go.activity">app活动页</option>
    <option value="go.home">频道首页</option>
    <option value="go.yohood">YOHOOD</option>
    <option value="go.top100">热销排行</option>
    <option value="go.activitytemplate">活动模板</option>
    <option value="go.globalpurchase">全球购</option>
    <option value="go.subchannel">二级频道</option>
    <option value="go.guangchannel">逛频道或SHOW晒单页</option>
    <option value="go.showgoods">去晒单</option>
    <option value="go.limitpurchase">尖货频道</option>
    <option value="go.vippro">会员商品</option>
    <option value="go.shortsize">断码页</option>
    <option value="go.discountmarket">折扣专区</option>
    <option value="go.discountmarketpro">折扣专区详情页</option>
    <option value="go.signin">签到页</option>
    <option value="go.playvideo">视频播放</option>
</script>