contentEdit.html 24.3 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651
<div class="pageheader">
    <div class="media">
        <div class="pageicon pull-left">
            <i class="fa fa-th-list"></i>
        </div>
        <div class="media-body">
            <ul class="breadcrumb">
                <li><a href=""><i class="glyphicon glyphicon-home"></i></a></li>
                <li><a href="/guang/article/index">文章管理</a></li>
                <li>{{pageTitle}}</li>
            </ul>

            <div>
                <h4>{{pageTitle}}</h4>
            </div>
        </div>
    </div>
    <!-- media -->
</div>

<div class="contentpanel">
    <div class="rows">
        <div class="col-md-12">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h4 class="panel-title">添加文章</h4>
                </div>
                <div class="panel-body form-horizontal" id="panel-body" action="{{action}}">

                </div>
                <div class="panel-footer">
                    <div class="row">
                        <div class="col-sm-9 col-sm-offset-3">
                            <input type="button" id="submit" class="btn btn-primary mr5" value="保存"/>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/template" id="tempalte1">
    <div class="row" id="baseform">
        <div class="form-group">
            <label class="col-sm-2 control-label">文章标题:</label>

            <div class="col-sm-8">
                <input type="text" id="articleTitle" maxlength="80" class="form-control" placeholder="文章标题" required
                       value="[[articleTitle]]">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">文章分类:</label>
            <!--文章分类-->
            <div class="col-sm-2">
                <select class="form-control" id="maxSortId" required>
                    <option value="[[maxSortId||'-1']]">[[maxSortName||'请选择一级分类']]</option>
                </select>
            </div>
            <div class="col-sm-2">
                <select class="form-control" id="minSortId">
                    <option value="[[minSortId||'-1']]">[[minSortName||'请选择二级分类']]</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">性别:</label>

            <div class="col-sm-8">
                <input type="radio" value="1" name="articleGender">
                <label></label>
                <input type="radio" value="2" name="articleGender">
                <label></label>
                <input type="radio" value="3" name="articleGender" checked>
                <label>通用</label>
                <input type="hidden" value="[[articleGender||3]]" id="articleGender" for="radio" required/>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">选择作者:</label>

            <div class="col-sm-8">
                <select class="form-control" id="authorId" required>
                    <option value="[[authorId||'']]">[[authorName||'请选择']]</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">文章摘要:</label>

            <div class="col-sm-8">
                <textarea rows="2" id="articleSummary" class="form-control" placeholder="文章摘要" required maxlength="85">[[articleSummary]]</textarea>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">封面图:<span class="red">*</span> </label>

            <div class="col-sm-8">
                <input type="file" name="coverImage" id="coverImage" value="[[coverImage]]" required placeholder="封面图"/>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">图片类型:</label>

            <div class="col-sm-8">
                <input type="radio" value="1" name="coverImageType">
                <label>方形</label>
                <input type="radio" value="2" name="coverImageType">
                <label>长形</label>
                <input type="hidden" id="coverImageType" value="[[coverImageType]]" for="radio"/>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">文章类型:</label>

            <div class="col-sm-8">
                <select class="form-control" value="[[articleType]]" id="articleType">
                    <option value="1">普通文章</option>
                    <option value="2">广告</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">广告尺寸:</label>

            <div class="col-sm-8">
                <select class="form-control" value="[[adsImgSize]]" id="adsImgSize">
                    <option value="">请选择广告图片尺寸</option>
                    <option value="10881088">1088X1088</option>
                    <option value="1088680">1088X680</option>
                    <option value="1088340">1088X340</option>
                </select>
            </div>
        </div>

    </div>
    <div class="row">

        <div class="form-group">
            <label class="col-sm-2 control-label">链接:</label>

            <div class="col-sm-7">

                <input type="text" name="url" id="url" value='[[url]]' class="form-control" placeholder="请输入内容链接"
                       readonly="true">

                <p style="color:#999">注:链接中不能有英文单引号</p>
            </div>
            <div class="col-sm-1">
                <button type="button" class="btn btn-info" id="addUrl">添加链接</button>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">文章内容:</label>

            <div class="col-sm-6">
                <div id="base-form">
                    <div class="source-content" id="source-m">
                        <!-- left -->
                        <div class="content-left" id="contentLeft">
                            <h4 class="title" data-type="title" style="text-align: center">文章内容</h4>
                            <ul class="add-box showContain ui-sortable" id="add-content">
                            </ul>
                            <nav>
                                <em><i></i></em>
                                <ul class="contents" id="content_btns">

                                </ul>
                            </nav>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">添加品牌:</label>

            <div class="col-sm-8">
                <ul class="cover-image-list col-sm-10" id="addPic" style="padding: 0;margin: 0;">
                    <li class="cover-image-item fileinput-button">
                        <div class="goods-img">
                            <a class="fileinput-button-icon" href="javascript:void(0);" id="addBrands">+</a>
                        </div>
                    </li>
                </ul>
            </div>

        </div>
        <div class="form-group">
            <div class="col-sm-2">

            </div>
            <div class="col-sm-8">
                <button class="btn btn-info" type="button" id="brandAutoBtn">自动获取品牌</button>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">选择标签:</label>

            <div class="col-sm-6">
                <div id="taglist" class="tagwrap">

                </div>
            </div>
            <div class="col-sm-1">
                <button class="btn btn-info" type="button" id="TagsSelectBtn">选择标签</button>
            </div>
        </div>
    </div>
</script>

<script type="text/template" id="template2">
    <div class="rows">
        <div class="form-group">
            <label class="col-sm-2 control-label">选择跳转目的地:</label>

            <div class="col-sm-8">
                <select name="goTo" id="goTo" class="form-control">
                    [[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" id="goToUrl" class="form-control" placeholder="跳转地址"></textarea>
            </div>

        </div>
    </div>
</script>

<script type="text/template" id="template3">
    [[each Brands as brand 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="[[brand.brandIco]]">
            </a>
            <i class="remove-item-btn remove1 glyphicon glyphicon-remove-circle" data-index="[[index]]"></i>
        </div>
    </li>
    [[/each]]
</script>

<script type="text/template" id="template4">
    [[each tags as tag __index]]
    <span class="tag"><span>[[tag]]</span><a href="#" title="Removing tag" data-index='[[__index]]'>x</a></span>
    [[/each]]
</script>

<script type="text/template" id="template5">
    <div class="row" id="brandForm">

        <div class="form-group">
            [[each Brands as brand index]]
            <a class="btn brand-index" href="#[[brand.name]]">[[brand.name]]</a>
            [[/each]]
            <input type="text" class="form-control" placeholder="搜索" id="brandsearch"/>
        </div>

        <div class="form-group brand-wrap" style="height: 400px;overflow: auto;">
            [[each Brands as brand index]]
            <div class="form-group" name="[[brand.name]]">
                [[each brand.items as item __index ]]
                <a class="btn">
                    <input type="checkbox" value="[[item.id]]" name="brandCheckBox">
                    <label>[[item.brand_name]]</label>
                </a>
                [[/each]]
            </div>
            [[/each]]
            <div class="form-group" id="brandsearchwrap" name="brandsearch">
            </div>
        </div>
        <input type="hidden" id="brandCheckBox" for="checkbox" value="[[Brdata]]"/>
    </div>
</script>
<!--文章内容--按钮-->
<script type="text/template" id="template_content_btns">
    [[each btns as btn index]]
    <li><a href="javascript:void(0)" name="text" class="add_btn" data-index="[[index]]">[[btn.template_intro]]</a></li>
    [[/each]]
    <div class="clearfix"></div>
</script>

<!--文章内容--内容-->
<script type="text/template" id="template_content">
    [[each modules as module index]]
    <li class="form-group custom-group dragItem dragItem1" 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]]

        [[/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">
         <script id="baidueditor" style="width: 100%;" name="content" type="text/plain"></script>
    </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>
                    <!-- multiple="true" -->
                    <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 class="form-group">
            <div class="col-sm-2">
                <button class="btn btn-info" type="button" id="imgsSelectBtn">上传多张图片</button>
            </div>
        </div>
    </div>
</script>
<script type="text/template" id="template_dialog_imgmodule">
    <div class="rows" id="moduleimgs">
        <div class="form-group">
            [[each datas as item index]]
            <div class="col-sm-2">
                <img src="[[ item ]]" width="100%" height="100%">
            </div>
            [[/each]]
            <div class="col-sm-2">
                <input type="file" multiple="true" name="file" id="filemodelimgs"/>
            </div>
        </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 imagegroup" id="goodspic">
                    [[each contentData.data as item index]]
                    <li class="cover-image-item image-list dragItem dragItem2" >
                        <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 dragItem dragItem2">
        <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 class="row">
                    <div class="form-group">
                        <div class="col-sm-12">
                            <i class="col-sm-1 fa fa-star" style="text-align: right"></i>
                            <p class="col-sm-10">请在搜索框内输入SKN(多个skn以逗号分隔)或产品名称,然后点击搜索按钮</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</script>

<!-- 推荐商品 -->
<script type="text/tempalte" id="template_dialog_remgoods">
    <div class="rows" id="groupsgoods">
        [[layout template_dialog_remgoodsgroup]]
    </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 imagegroup" data-i="[[i]]">
                [[each items.list as item index]]
                <li class="cover-image-item image-list dragItem dragItem2" 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="" selected="selected">选择跳转目的</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.h5">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>
</script>
<script type="text/template" id="sorts-template">
    <div class="form-group">
        颜色:
        [[each colors as item index]]
        <input type="checkbox" name="color" data-index="[[index]]" value="[[item.id]]">[[item.colorName]]
        [[/each]]
        <input type="hidden" id="colors1" for="checkbox">

    </div>
    <div class="form-group">
    风格:
    [[each styles as item index]]
    <input type="checkbox" name="style" value="[[item.stylename]]">[[item.stylename]]
    [[/each]]
    <input type="hidden" for="checkbox" id="styles1">
    </div>
    <div class="form-group">
    品类:
    [[each types as item index]]
    <input type="checkbox" name="type" value="[[item.id]]">[[item.sortName]]
    [[/each]]
    <input type="hidden" for="checkbox" id="types1">
   </div>
    <div class="form-group">
    品牌:
    [[each brands as item index]]
        [[each item.items as _item _index]]
    <input type="checkbox" name="brand" value="[[_item.id]]">[[_item.brand_name]]
        [[/each]]
    [[/each]]
    <input type="hidden" for="checkbox" id="brands1">
    </div>
    <div class="form-group">
    性别:
    [[each genders as item index]]
    <input type="checkbox" name="gender" value="[[item.id]]">[[item.gendername]]
    [[/each]]
    <input type="hidden" for="checkbox" id="genders1">
    </div>
</script>
<script type="text/template" id="tag-template">
    <div class="form-group">
        所有标签:
        [[each sorts as item index]]
        <input type="checkbox" name="color"  value="[[item.id]]">[[item.id]]
        [[/each]]
        <input type="hidden" id="sorts1" for="checkbox">
    </div>

</script>