index.html 1.4 KB

123456789101112131415161718192021222324252627282930313233
  1. {extend name="admin@main"}
  2. {block name="content"}
  3. <div class="layui-tab layui-tab-card think-bg-white">
  4. <ul class="layui-tab-title notselect">
  5. <li data-type="store-config-type-sms1">配置信息</li>
  6. <li data-type="store-config-type-sms2">使用协议</li>
  7. <li data-type="store-config-type-sms2">首页公告</li>
  8. <li data-type="store-config-type-sms2">商城公告</li>
  9. </ul>
  10. <div class="layui-tab-content">
  11. <div class="layui-tab-item">{include file='official/platform-set'}</div>
  12. <div class="layui-tab-item">{include file='official/index-agreement'}</div>
  13. <div class="layui-tab-item">{include file='official/index-notice'}</div>
  14. <div class="layui-tab-item">{include file='official/index-mall-notice'}</div>
  15. </div>
  16. </div>
  17. <script>
  18. (function (storage) {
  19. (function (type, $default, $checked) {
  20. $default = $('.layui-tab ul.layui-tab-title li:first');
  21. $checked = $('.layui-tab ul.layui-tab-title li[data-type="' + type + '"]');
  22. ($checked.length > 0 ? $checked : $default).trigger('click');
  23. })(layui.data(storage)['type'] || '');
  24. $('.layui-tab ul.layui-tab-title li[data-type]').on('click', function () {
  25. layui.data(storage, {key: 'type', value: this.getAttribute('data-type')});
  26. });
  27. })('store-config-type');
  28. </script>
  29. {/block}