| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530 |
- @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;
- }
- .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>
- <style>
- .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;
- margin-bottom:10px;
- }
- .block{
- padding:10px;
- background-color:#fff;
- border-radius: 8px;
- }
- .con .setting .block .title{
- font-size:18px;
- margin-bottom:15px;
- display:flex;
- align-items:center;
- justify-content:space-between;
- }
- .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;
- }
- .el-form-item__label{
- margin-right:30px;
- }
- .add{
- width: 100px;
- height: 36px;
- border-radius: 4px;
- border: solid 1px #29ba9c;
- color:#29ba9c;
- display:flex;
- align-items:center;
- justify-content:center;
- }
- .list-wrap{
- padding-left:10%;
- }
- .list{
- width: 911px;
- height: 159px;
- background-color: #f5f5f5;
- border-radius: 4px;
- margin-bottom:20px;
- box-sizing:border-box;
- padding:40px 0;
- position:relative;
- }
- .list .delete{
- width: 26px;
- height: 26px;
- background-color: #dee2ee;
- border-radius:50%;
- display:flex;
- align-items:center;
- justify-content:center;
- position:absolute;
- right:0;
- top:0;
- font-size:16px;
- }
- b{
- font-size:14px;
- }
- </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="注册填写">
- <template>
- <el-switch
- v-model="form.basic_register"
- active-value="1"
- inactive-value="0"
- >
- </el-switch>
- </template>
- <div class="tip">默认开启,开启后用户在注册会员、绑定手机号时需要填写自定义字段信息,开启手机验证码快速登录不显示该信息!关闭则仅在设置-会员资料中显示!</div>
- </el-form-item>
- <el-form-item label="基本信息">
- <span style="margin: 0 30px 0 20px; font-size: 14px; color: #666;font-weight: 400;">名称</span>
- <span style="margin: 0 30px 0 50px; font-size: 14px; color: #666;font-weight: 400;">是否必填</span>
- </el-form-item>
- <el-form-item label="">
- <el-checkbox v-model="form.name" style="margin: 0 30px 0 20px; font-size: 14px; color: #666;font-weight: 400;">姓名</el-checkbox>
- <el-switch
- v-model="form.name_must"
- active-value="1"
- inactive-value="0"
- style="margin: 0 30px 0 50px; font-size: 14px; color: #666;font-weight: 400;"
- >
- </el-switch>
- </el-form-item>
- <el-form-item label="">
- <el-checkbox v-model="form.sex" style="margin: 0 30px 0 20px; font-size: 14px; color: #666;font-weight: 400;">性别</el-checkbox>
- <el-switch
- v-model="form.sex_must"
- active-value="1"
- inactive-value="0"
- style="margin: 0 30px 0 50px; font-size: 14px; color: #666;font-weight: 400;"
- >
- </el-switch>
- </el-form-item>
- <el-form-item label="">
- <el-checkbox v-model="form.address" style="margin: 0 0 0 20px; font-size: 14px; color: #666;font-weight: 400;">详细地址</el-checkbox>
- <el-switch
- v-model="form.address_must"
- active-value="1"
- inactive-value="0"
- style="margin: 0 30px 0 50px; font-size: 14px; color: #666;font-weight: 400;"
- >
- </el-switch>
- </el-form-item>
- <el-form-item label="">
- <el-checkbox v-model="form.birthday" style="margin: 0 30px 0 20px; font-size: 14px; color: #666;font-weight: 400;">生日</el-checkbox>
- <el-switch
- v-model="form.birthday_must"
- active-value="1"
- inactive-value="0"
- style="margin: 0 30px 0 50px; font-size: 14px; color: #666;font-weight: 400;"
- >
- </el-switch>
- </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="修改昵称头像">
- <template>
- <el-switch
- v-model="form.change_info"
- active-value="1"
- inactive-value="0"
- >
- </el-switch>
- </template>
- <div class="tip">默认开启,用户可以在会员中心-设置中修改头像昵称</div>
- </el-form-item>
- </el-form>
- </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="自定义字段-固定">
- <template>
- <el-switch
- v-model="form.is_custom"
- active-value="1"
- inactive-value="0"
- >
- </el-switch>
- </template>
- <div class="tip">提示:开启后,在会员中心--设置中显示字段,用户编辑资料填写!会员列表可搜索!</div>
- </el-form-item>
- <el-form-item label="注册填写">
- <template>
- <el-switch
- v-model="form.is_custom_register"
- active-value="1"
- inactive-value="0"
- >
- </el-switch>
- </template>
- <div class="tip">默认开启,开启后用户在注册会员、绑定手机号时需要填写自定义字段信息,开启手机验证码快速登录不显示该信息!关闭则仅在设置-会员资料中显示!</div>
- </el-form-item>
- <el-form-item label="自定义字段显示名称">
- <el-input v-model="form.custom_title" style="width:70%;" placeholder=""></el-input>
- </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="自定义必填开启">
- <template>
- <el-switch
- v-model="form.form_open"
- active-value="1"
- inactive-value="0"
- >
- </el-switch>
- </template>
- <div class="tip">开启后,自定义字段必填</div>
- </el-form-item>
- <el-form-item label="注册填写">
- <template>
- <el-switch
- v-model="form.form_register"
- active-value="1"
- inactive-value="0"
- >
- </el-switch>
- </template>
- <div class="tip">默认开启,开启后用户在注册会员、绑定手机号时需要填写自定义字段信息,开启手机验证码快速登录不显示该信息!关闭则仅在设置-会员资料中显示!</div>
- </el-form-item>
- <el-form-item label="前端禁止编辑">
- <template>
- <el-switch
- v-model="form.form_edit"
- active-value="1"
- inactive-value="0"
- >
- </el-switch>
- </template>
- <div class="tip">开启后,前端会员设置不可编辑</div>
- </el-form-item>
- <el-form-item label="自定义字段">
- <el-button type="primary" @click="addBlock">添加</el-button>
- </el-form-item>
- <div class="list-wrap">
- <div class="list" v-for="(item,index) in form.form">
- <div>
- <span style="display:inline-block;margin-right:30px;width:150px;text-align:right;">排序</span>
- <el-input v-model="item.sort" style="width:60%;"></el-input>
- </div>
- <div style="margin-top:20px;">
- <span style="display:inline-block;margin-right:30px;width:150px;text-align:right;">自定义字段名称</span>
- <el-input v-model="item.name" style="width:60%;"></el-input>
- </div>
- <a style="color:#666;"><div class="delete" @click="deleteBlock(index)">x</div></a>
- </div>
- </div>
- </el-form>
- </div>
- <div style="background: #eff3f6;width:100%;height:15px;"></div>
- <!-- 自定义表单 -->
- <div class="block">
- <div class="vue-title" v-show="{!! app('plugins')->isEnabled('diyform') !!}">
- <div class="vue-title-left"></div>
- <div class="vue-title-content">自定义表单</div>
- </div>
- <el-form ref="form" :model="form" label-width="15%" v-show="{!! app('plugins')->isEnabled('diyform') !!}">
- <el-form-item label="自定义表单">
- <template>
- <el-select v-model="form.form_id" name="form_id" clearable>
- <el-option
- v-for="item in diyForm"
- :label="item.title"
- :value="item.id">
- </el-option>
- </el-select>
- </template>
- </el-form-item>
- <el-form-item label="注册填写">
- <template>
- <el-switch
- v-model="form.form_id_register"
- active-value="1"
- inactive-value="0"
- >
- </el-switch>
- </template>
- <div class="tip">默认开启,开启后用户在注册会员、绑定手机号时需要填写自定义字段信息,开启手机验证码快速登录不显示该信息!关闭则仅在设置-会员资料中显示!</div>
- </el-form-item>
- </el-form>
- </div>
- </div>
- <div class="confirm-btn">
- <el-button type="primary" @click="submit">提交</el-button>
- </div>
- </div>
- </div>
- </div>
- @include('public.admin.uploadMultimediaImg')
- <script>
- var vm = new Vue({
- el: '#app',
- delimiters: ['[[', ']]'],
- data() {
- let set = {!! json_encode(($set?:[])) !!};
- let diyForm = {!! json_encode(($diyForm?:[])) !!};
- return {
- uploadShow:false,
- chooseImgName:'',
- uploadListShow:false,
- chooseImgListName:'',
- type:'',
- selNum:'',
- form:{
- ...set
- },
- diyForm:diyForm,
- }
- },
- created() {
- },
- mounted () {
- console.log(this.form,111);
- },
- methods: {
- openUpload(str,type,sel) {
- this.chooseImgName = str;
- this.uploadShow = true;
- this.type = type
- this.selNum = sel
- },
- changeProp(val) {
- if(val == true) {
- this.uploadShow = false;
- }
- else {
- this.uploadShow = true;
- }
- },
- sureImg(name,uploadShow,fileList) {
- if(fileList.length <= 0) {
- return
- }
- console.log(name)
- console.log(fileList)
- this.form[name] =fileList[0].attachment;
- this.form[name+'_url'] = fileList[0].url;
- console.log(this.form[name],'aaaaa')
- console.log( this.form[name+'_url'],'bbbbb')
- },
- clearImg(str,type,index) {
- if(!type) {
- this.form[str] = "";
- this.form[str+'_url'] = "";
- }
- else {
- this.form[str].splice(index,1);
- this.form[str+'_url'].splice(index,1);
- }
- this.$forceUpdate();
- },
- // 消息模板开关
- changeModal(name) {
- let url_open = "{!! yzWebUrl('setting.default-notice.index') !!}"
- let url_close = "{!! yzWebUrl('setting.default-notice.cancel') !!}"
- let url = "";
- if(this.form[name+'_default']==1) {
- url = url_close;
- } else {
- url = url_open;
- }
- let json = {
- notice_name: name,
- setting_name: "relation_base",
- }
- 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 == 1) {
- this.$message({type: 'success',message: '操作成功!'});
- if(this.form[name+'_default'] == 0) {
- this.form[name+'_default'] = 1;
- this.form[name] = response.data.id;
- } else {
- this.form[name+'_default'] = 0;
- this.form[name] = '';
- }
- } else {
- this.$message({message: response.data.msg,type: 'error'});
- this.form[name+'_default'] = 0;
- }
- loading.close();
- },response => {
- loading.close();
- });
- },
- submit() {
- let that = this;
- let url = '{!! yzWebFullUrl('member.member-set.information-store') !!}';
- 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});
- } else {
- this.$message({message: response.data.msg,type: 'error'});
- }
- loading.close();
- // location.reload();
- },response => {
- loading.close();
- });
- },
- addBlock(){
- this.form.form.push({name:"",sort:""});
- },
- deleteBlock(index){
- this.form.form.splice(index,1)
- },
- }
- })
- </script>
- @endsection
|