setting.blade.php 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. @extends('layouts.base')
  2. @section('title', '基础设置')
  3. @section('content')
  4. <link rel="stylesheet" type="text/css" href="{{static_url('yunshop/goods/vue-goods1.css')}}"/>
  5. <link rel="stylesheet" type="text/css" href="{{static_url('yunshop/goods/vue-ohter.css')}}"/>
  6. <style>
  7. .el-checkbox-group {
  8. position: relative;
  9. z-index: 0;
  10. }
  11. .el-checkbox {
  12. margin-top: 10px !important;
  13. }
  14. </style>
  15. <div id='re_content'>
  16. <div class="con">
  17. <div class="vue-main-title">
  18. <div class="title" style="margin-top: 20px"><span
  19. style="width: 4px;height: 18px;background-color: #29ba9c;margin-right:15px;display:inline-block;"></span><b>基础设置</b>
  20. </div>
  21. </div>
  22. <div class="setting">
  23. <el-form ref="form" label-width="15%">
  24. <div class="block">
  25. <el-form-item label="是否只有绑定企业可用">
  26. <template>
  27. <el-switch v-model="form.only_bind" :active-value="1"
  28. :inactive-value="0" disabled="true"></el-switch>
  29. </template>
  30. <div class="tip">该插件功能暂时只供绑定企业使用</div>
  31. </el-form-item>
  32. </div>
  33. </el-form>
  34. </div>
  35. <div class="confirm-btn">
  36. <el-button type="primary" @click="submit">提交</el-button>
  37. </div>
  38. </el-form>
  39. </div>
  40. </div>
  41. <script>
  42. var app = new Vue({
  43. el: "#re_content",
  44. delimiters: ['[[', ']]'],
  45. name: 'test',
  46. data() {
  47. return {
  48. form: {},
  49. }
  50. },
  51. created() {
  52. this.getData();
  53. },
  54. mounted() {
  55. },
  56. methods: {
  57. copyUrl: function (url) {
  58. let oInput = document.createElement('input');
  59. oInput.value = url;
  60. document.body.appendChild(oInput);
  61. oInput.select(); // 选择对象;
  62. console.log(oInput.value);
  63. document.execCommand("Copy"); // 执行浏览器复制命令
  64. this.$message({message: '复制成功', type: 'success'});
  65. oInput.remove()
  66. },
  67. getData() {
  68. this.$http.post('{!! yzWebFullUrl('plugin.customer-increase.admin.setting.index') !!}', {is_json: 1}).then(response => {
  69. if (response.data.result) {
  70. console.log(response.data.result);
  71. this.form = response.data.data.setting;
  72. } else {
  73. this.$message({message: response.data.msg, type: 'error'});
  74. }
  75. }, response => {
  76. this.$message({message: response.data.msg, type: 'error'});
  77. })
  78. },
  79. submit() {
  80. let that = this;
  81. this.$http.post('{!! yzWebFullUrl('plugin.customer-increase.admin.setting.edit') !!}', this.form).then(response => {
  82. if (response.data.result) {
  83. this.$message({message: response.data.msg, type: 'success'});
  84. this.getData();
  85. } else {
  86. this.$message({message: response.data.msg, type: 'error'});
  87. }
  88. }, response => {
  89. this.$message({message: response.data.msg, type: 'error'});
  90. })
  91. },
  92. },
  93. })
  94. </script>
  95. @endsection