添加:关于我们相关设置
This commit is contained in:
parent
d25fbc31b3
commit
d0299f6364
|
|
@ -500,4 +500,31 @@ class MemberSetController extends BaseController
|
|||
}
|
||||
return true;
|
||||
}
|
||||
/**
|
||||
* Common: 关于我们
|
||||
* Author: wu-hui
|
||||
* Time: 2023/10/26 14:06
|
||||
* @return array|\Illuminate\Http\JsonResponse|string
|
||||
* @throws \Throwable
|
||||
*/
|
||||
public function aboutUs(){
|
||||
if(request()->isMethod('post')){
|
||||
$set = request()->set;
|
||||
Setting::set('shop.about_us', $set);
|
||||
|
||||
return $this->successJson('操作成功');
|
||||
}
|
||||
|
||||
$shopSet = Setting::get('shop.about_us');
|
||||
|
||||
return view('member.memberSet.about-us', [
|
||||
'set' => $shopSet ?? [],
|
||||
])->render();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -3691,6 +3691,29 @@ class Menu
|
|||
],
|
||||
]
|
||||
],
|
||||
'member_set_about_us' => [
|
||||
'name' => '关于我们',
|
||||
'url' => 'member.member-set.about-us',
|
||||
'url_params' => '',
|
||||
'permit' => 1,
|
||||
'menu' => 1,
|
||||
'icon' => 'fa-circle-o',
|
||||
'sort' => 0,
|
||||
'item' => 'member_set_about_us',
|
||||
'parents' => ['Member', 'relation_base'],
|
||||
'child' => [
|
||||
'member_set_about_us_store' => [
|
||||
'name' => '保存注册协议',
|
||||
'url' => 'member.member-set.about-us',
|
||||
'url_params' => '',
|
||||
'permit' => 1,
|
||||
'menu' => 0,
|
||||
'sort' => 0,
|
||||
'item' => 'member_set_about_us_store',
|
||||
'parents' => ['Member', 'relation_base','member_set_about_us'],
|
||||
],
|
||||
]
|
||||
],
|
||||
|
||||
|
||||
'relation_base_data' => [
|
||||
|
|
|
|||
|
|
@ -402,6 +402,7 @@ class ComponentService
|
|||
['name' => '拼团列表', 'mini_url' => '/packageB/member/group/GroupList/GroupList', 'url' => 'group_list', 'plugin_name' => 'fight-groups'],
|
||||
['name' => '我的拼团', 'mini_url' => '/packageB/member/group/MyGroups/MyGroups', 'url' => 'mygroups', 'plugin_name' => 'fight-groups'],
|
||||
['name' => '典藏室', 'mini_url' => '', 'url' => 'member/collection_room'],
|
||||
['name' => '关于我们', 'mini_url' => '', 'url' => 'member/tool/about_us'],
|
||||
];
|
||||
|
||||
$data = static::delNotOpenPlugin($data);
|
||||
|
|
|
|||
|
|
@ -251,4 +251,21 @@ class SettingController extends BaseController
|
|||
return $this->successJson('获取商城语言设置成功', $langData);
|
||||
}
|
||||
|
||||
/**
|
||||
* Common: 获取关于我们相关信息
|
||||
* Author: wu-hui
|
||||
* Time: 2023/10/26 14:07
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function getAboutUsInfo(){
|
||||
// 获取站点信息
|
||||
$shopSet = Setting::get('shop.shop');
|
||||
$set = Setting::get('shop.about_us');
|
||||
$set['shop_name'] = $shopSet['name'] ?? '';
|
||||
$set['shop_logo'] = $shopSet['logo'] ? yz_tomedia($shopSet['logo']) : '';
|
||||
|
||||
return $this->successJson('success', $set);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,188 @@
|
|||
@extends('layouts.base')
|
||||
@section('title', '关于我们')
|
||||
@section('content')
|
||||
<link href="{{static_url('yunshop/css/total.css')}}" media="all" rel="stylesheet" type="text/css" />
|
||||
<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 scoped>
|
||||
.main-panel{
|
||||
margin-top:50px;
|
||||
}
|
||||
.main-panel #re_content {
|
||||
padding: 10px;
|
||||
}
|
||||
.panel{
|
||||
margin-bottom:10px!important;
|
||||
border-radius: 10px;
|
||||
padding-left: 20px;
|
||||
}
|
||||
.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;
|
||||
}
|
||||
.con .setting .block{
|
||||
padding:10px;
|
||||
background-color:#fff;
|
||||
border-radius: 8px;
|
||||
}
|
||||
.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;
|
||||
}
|
||||
.el-checkbox__inner{
|
||||
border:solid 1px #56be69!important;
|
||||
}
|
||||
.upload-boxed .el-icon-close {
|
||||
position: absolute;
|
||||
top: -5px;
|
||||
right: -5px;
|
||||
color: #fff;
|
||||
background: #333;
|
||||
border-radius: 50%;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
<div style="padding: 10px">
|
||||
@include('layouts.newTabs')
|
||||
<div>
|
||||
<div id="app" v-cloak>
|
||||
<div class="total-head block" style="margin: 0 0 20px 0;padding: 0">
|
||||
<!-- 注册协议 -->
|
||||
<div class="block">
|
||||
<div class="vue-title">
|
||||
<div class="vue-title-left"></div>
|
||||
<div class="vue-title-content">⽤户协议</div>
|
||||
</div>
|
||||
<el-form ref="form" :model="form" label-width="15%">
|
||||
<el-form-item label="⽤户协议自定义名称">
|
||||
<el-input v-model="form.user_title" style="width:70%;" placeholder="⽤户协议"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="协议内容">
|
||||
<tinymceee v-model="form.user_agreement" style="width:70%;"></tinymceee>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div style="background: #eff3f6;width:100%;height:15px;"></div>
|
||||
<div class="block">
|
||||
<div class="vue-title">
|
||||
<div class="vue-title-left"></div>
|
||||
<div class="vue-title-content">隐私政策</div>
|
||||
</div>
|
||||
<el-form ref="form" :model="form" label-width="15%">
|
||||
<el-form-item label="隐私政策自定义名称">
|
||||
<el-input v-model="form.policy_title" placeholder="隐私政策" style="width:70%;"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="隐私政策" prop="agreement">
|
||||
<tinymceee v-model="form.policy_agreement" style="width:70%" ></tinymceee>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div style="background: #eff3f6;width:100%;height:15px;"></div>
|
||||
<div class="block">
|
||||
<div class="vue-title">
|
||||
<div class="vue-title-left"></div>
|
||||
<div class="vue-title-content">平台资质</div>
|
||||
</div>
|
||||
<el-form ref="form" :model="form" label-width="15%">
|
||||
<el-form-item label="平台资质自定义名称">
|
||||
<el-input v-model="form.platform_title" placeholder="平台资质" style="width:70%;"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="平台资质" prop="agreement">
|
||||
<tinymceee v-model="form.platform_agreement" style="width:70%" ></tinymceee>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="confirm-btn">
|
||||
<el-button type="primary" @click="submit">提交</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="{{resource_get('static/yunshop/tinymce4.7.5/tinymce.min.js')}}"></script>
|
||||
@include('public.admin.tinymceee')
|
||||
<script>
|
||||
var vm = new Vue({
|
||||
el: '#app',
|
||||
delimiters: ['[[', ']]'],
|
||||
data() {
|
||||
let set = {!! json_encode(($set?:[])) !!};
|
||||
return {
|
||||
type:'',
|
||||
selNum:'',
|
||||
form:{
|
||||
...set
|
||||
},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
submit() {
|
||||
let that = this;
|
||||
let url = '{!! yzWebFullUrl('member.member-set.about-us') !!}';
|
||||
let json = {
|
||||
set : this.form
|
||||
};
|
||||
let loading = this.$loading({target:document.querySelector(".content"),background: 'rgba(0, 0, 0, 0)'});
|
||||
this.$http.post(url,json).then(response => {
|
||||
if (response.data.result) {
|
||||
this.$message({type: 'success',message: response.data.msg},function(){
|
||||
location.reload();
|
||||
});
|
||||
} else {
|
||||
this.$message({message: response.data.msg,type: 'error'});
|
||||
}
|
||||
loading.close();
|
||||
// location.reload();
|
||||
},response => {
|
||||
loading.close();
|
||||
});
|
||||
},
|
||||
copyLink(type) {
|
||||
this.$refs[type].select();
|
||||
document.execCommand("Copy")
|
||||
this.$message.success("复制成功!");
|
||||
},
|
||||
}
|
||||
})
|
||||
</script>
|
||||
@endsection
|
||||
Loading…
Reference in New Issue