| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- @extends('layouts.base')
- @section('title', '基础设置')
- @section('content')
- <style>
- .content{
- background: #f5f5f5;
- padding: 10px!important;
- }
- .con{
- padding-bottom:40px;
- position:relative;
- border-radius: 8px;
- min-height:100vh;
- background:#fff;
- }
- .con .setting .block{
- padding:20px;
- padding-left:10px;
- background-color:#fff;
- border-radius: 8px;
- }
- .con .setting .block .title{
- font-size:18px;
- margin-bottom:15px;
- display:flex;
- align-items:center;
- }
- .confirm-btn{
- width: calc(100% - 266px);
- position:fixed;
- bottom:0;
- right:0;
- margin-right:10px;
- line-height:63px;
- background-color: #ffffff;
- box-shadow: 0px 8px 23px 1px
- rgba(51, 51, 51, 0.3);
- background-color:#fff;
- text-align:center;
- }
- b{
- font-size:14px;
- }
- input[type=file]{
- display:none;
- }
- </style>
- <div id="all">
- <div class="con">
- <div class="setting">
- <el-form ref="form" :model="form" label-width="15%" >
- <div class="block">
- <div class="title"><span style="width: 4px;height: 18px;background-color: #29ba9c;margin-right:15px;display:inline-block;"></span><b>基础设置</b></div>
-
- <el-form-item label="插件开启">
- <template>
- <el-switch
- v-model="form.is_open"
- :active-value="1"
- :inactive-value="0"
- >
- </el-switch>
- </template>
- </el-form-item>
- <el-form-item label="类型">
- <el-checkbox-group v-model="form.msg_type" style="margin-top:4px;">
- <el-checkbox v-for="(item,index) in msg_type" :key="index" :label="item.id">[[item.name]]</el-checkbox>
- </el-checkbox-group>
- </el-form-item>
- </div>
- <div class="confirm-btn">
- <el-button type="primary" @click="submitForm">提交</el-button>
- </div>
- </el-form>
- </div>
- </div>
- </div>
- <script>
- let setData = {!! json_encode($set)?:'{}' !!};
- let msgType = {!! json_encode($msgType)?:'{}' !!};
- var app = new Vue({
- el:"#all",
- delimiters: ['[[', ']]'],
- name: 'test',
- data() {
- return{
- msg_type:msgType,
- form:{
- is_open:setData.is_open,
- msg_type:setData.msg_type,
- },
-
- }
- },
- created() {
- },
- mounted() {
- },
- methods: {
- submitForm() {
- let loading = this.$loading({target:document.querySelector(".content"),background: 'rgba(0, 0, 0, 0)'});
- this.$http.post('{!! yzWebFullUrl('plugin.instation-message.admin.set.index') !!}',{'set':this.form}).then(response => {
- if (response.data.result) {
- this.$message({type: 'success',message: '操作成功!'});
-
- } else {
- this.$message({message: response.data.msg,type: 'error'});
- }
- loading.close();
- location.reload();
- },response => {
- loading.close();
- });
-
-
- },
-
- },
- })
- </script>
- @endsection
|