| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187 |
- @extends('layouts.base')
- @section('title', '基础设置')
- @section('content')
- <link rel="stylesheet" href="{{static_url('css/public-number.css')}}">
- <link rel="stylesheet" type="text/css" href="{{static_url('yunshop/goods/vue-goods1.css')}}"/>
- <style>
- .main-panel{
- margin-top:50px;
- }
- .panel{
- margin-bottom:10px!important;
- padding-left: 20px;
- border-radius: 10px;
- }
- .panel .active a {
- background-color: #29ba9c!important;
- border-radius: 18px!important;
- color:#fff;
- }
- .panel a{
- border:none!important;
- background-color:#fff!important;
- }
- .content{
- background: #eff3f6;
- padding: 10px!important;
- }
- .con{
- padding-bottom:40px;
- position:relative;
- border-radius: 8px;
- min-height:100vh;
- background-color:#fff;
- }
- .con .setting .block{
- padding: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;
- }
- </style>
- <div id='re_content' >
- <div class="con">
- <div class="setting">
- <el-row>
- <el-button type="primary" disabled>基础设置</el-button>
- <el-button type="success" @click="code()">授权码管理</el-button>
- <el-button type="info" @click="codeLog()">使用记录</el-button>
- </el-row>
- <div style="background: #eff3f6;width:100%;height:15px;margin-top: 1em;"></div>
- <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.open_code"
- active-value="1"
- inactive-value="0"
- >
- </el-switch>
- </template>
- </el-form-item>
- <el-form-item label="前端显示" >
- <template>
- <el-switch
- v-model="form.front_show"
- active-value="1"
- inactive-value="0"
- >
- </el-switch>
- </template>
- </el-form-item>
- <el-form-item label="海报背景" prop="head_img_url">
- <div class="upload-box" @click="openUpload('share_img')" v-if="!form.share_img_url">
- <i class="el-icon-plus" style="font-size:32px"></i>
- </div>
- <div @click="openUpload('share_img')" class="upload-boxed" v-if="form.share_img_url">
- <img :src="form.share_img_url" alt="" style="width:150px;height:150px;border-radius: 5px;cursor: pointer;">
- <div class="upload-boxed-text">点击重新上传</div>
- </div>
- <div>建议尺寸:640*1008</div>
- </el-form-item>
- <upload-img :upload-show="uploadShow" :name="chooseImgName" @replace="changeProp" @sure="sureImg"></upload-img>
- </div>
- <div class="confirm-btn">
- <el-button type="primary" @click="submit">提交</el-button>
- </div>
- </el-form>
- </div>
- </div>
- </div>
- @include('public.admin.uploadImg')
- <script>
- var vm = new Vue({
- el: "#re_content",
- delimiters: ['[[', ']]'],
- data() {
- let set={!!$set?:'{}' !!}
-
- return {
- uploadShow:false,
- chooseImgName:'',
- uploadListShow:false,
- chooseImgListName:'',
- form:{
- open_code:set&&set.open_code?set.open_code:'0',
- front_show:set&&set.front_show?set.front_show:'0',
- share_img:set&&set.share_img?set.share_img:'',
- share_img_url:set&&set.share_img_url?set.share_img_url:'',
- },
- }
- },
- mounted () {
-
- },
- methods: {
- openUpload(str) {
-
- this.chooseImgName = str;
- this.uploadShow = true;
- },
- changeProp(val) {
- if(val == true) {
- this.uploadShow = false;
- }
- else {
- this.uploadShow = true;
- }
- },
- sureImg(name,image,image_url) {
- this.form.share_img = image;
- this.form.share_img_url = image_url;
- },
-
- submit() {
- this.$http.post('{!! yzWebFullUrl('plugin.room.admin.anchor-manage.basicCode') !!}',{'data':this.form}).then(function (response){
- if (response.data.result) {
- this.$message({message: response.data.msg,type: 'success'});
- }else {
- this.$message({message: response.data.msg,type: 'error'});
- }
- console.log(response);
- //location.reload();
- },function (response) {
- console.log(response);
- this.$message({message: response.data.msg,type: 'error'});
- })
- },
- code() {
- window.location.href = "{!! yzWebFullUrl('plugin.room.admin.anchor-manage.codeList') !!}";
- },
- codeLog() {
- window.location.href = "{!! yzWebFullUrl('plugin.room.admin.anchor-manage.usageRecord') !!}";
- },
- codeBasic() {
- window.location.href = "{!! yzWebFullUrl('plugin.room.admin.anchor-manage.basicCode') !!}";
- },
- },
- });
- </script>
- @endsection
|