<style>
    .User_Main{
        display: flex;
        margin-top:10px;
    }
    .UserCenter .User_mobile{
        width: 400px;
        height: 740px;
        padding: 35px 11px;
        background-color: #fff;
        border-radius: 30px;
        background-size: cover;
        position: relative;
        font-size: .85rem;
        float: left;
        margin-right: 1rem;
    }
    .UserCenter .mobile_Header{
        width: 378px;
        height: 64px;
        position: relative;
        text-align: center;
        background: url('../../assets/img/head.png')
    }
    .UserCenter .mobile_Header div{
        position: absolute;
        text-align: center;
        width: 378px;
        font-size: 16px;
        font-weight: 600;
        height: 64px;
        line-height: 88px;    
    }
    .UserCenter .mobile_showbox{
        height: 606px;
        width: 375px;
        overflow: auto;
        font-size: 12px;
    }
    .UserCenter .mb_topBox{
        width:100%;
        height:150px;
        background: #F5F7F9;
        background-repeat: no-repeat;
        background-size: cover;
        background-position: center;
        display: flex;
        justify-content: center;
        flex-direction: column;
        font-size:12px;
    }
    .UserCenter .mb_header{
        display: flex;
        align-items: center;
    }
    .UserCenter .mobole_head{
        width: 40px;
        height: 40px;
        -webkit-border-radius: 50%;
        -moz-border-radius: 50%;
        border-radius: 50%;
        border: 2px solid #ffffff;
        background: #E3E3E3;
        margin-left: 20px;
    }
    .UserCenter .mb_header span{
        margin-left:10px;
        color:#fff;
    }
    .UserCenter .mobile_footBox{
        position: relative;
        background-color: #f7f7f7;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .UserCenter .foot-box-item{
        height: 64px;
        color: #666666;
        font-size: 13px;
        width: 50%;
        display: flex;
        justify-content:center;
    }
    .UserCenter .userAppimage{
        background-size: cover;
        background-position: center center;
        width: 20px;
        height: 20px;
        border-radius: 0%;
        margin-top: 33px;
    }
    .UserCenter .foot-box-info {
        padding-top: 8px;
        margin-left: 8.5px;
        text-align: center;
    }
    .UserCenter .foot-box-num {
        font-size: 16px;
        margin-bottom: 6px;
    }
    .UserCenter .foot-box-line {
        position: absolute;
        height: 20px;
        width: 1px;
        background-color: #666666;
        top: 22px;
        left: 50%;
        margin-left: -1px;
    }
    .UserCenter .userAccount_box {
        width: 100%;
        height: 60px;
        background-color: #f7f7f7;
        padding: 0 8px 8px;
    }
    .UserCenter .userAccount_box>div{
        background-color: #fff;
        border-radius: 4px;
        padding: 8px 0;
        height: 100%;
        display: flex;
        flex-direction: row;
    }
    .UserCenter .accountList{
        padding: 5px 0px;
        border-right: 1px solid rgb(226, 226, 226);
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        flex-grow: 1;
    }
    .UserCenter .accountList:last-child{
        border-right: 0;
    }
    .UserCenter .accountListImg{
        width: 10px;
        height: 10px;
        border-radius: 0%;
        display: inline-block;
        margin-right:5px;
    }
    .UserCenter .Account_score{
        color: rgb(255, 187, 67);
        margin-bottom:5px;
    }
    .UserCenter .AccountOrder_box{
        width: 100%;
        background-color: #f7f7f7;
        padding: 0 8px 1px;
        margin-bottom: 8px;
    }
    .UserCenter .AccountOrder_box>div{
        background-color: #fff;
        border-radius: 8px;
        height: 100%;
    }
    .UserCenter .AccountOrder_Top{
        padding:10px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    .UserCenter .Account_bTM{
        display: flex;
        margin: 10px 0px; 
        padding-bottom: 10px;
        flex-direction: row;
    }
    .UserCenter .Account_bTMList{
        display: flex;
        flex-grow: 1;
        align-items: center;
        justify-content: center;
        flex-direction: column;
    }
    .UserCenter .Account_btmimg{
        background-size: cover;
        background-position: center center;
        width: 30px;
        height: 30px;
        border-radius: 0%;
    }
    .UserCenter .mobile-menus-box {
        width: 100%;
        background-color: #f7f7f7;
        padding: 0 8px;
    }
    .UserCenter .mobile-menus-box>div {
        background-color: #fff;
        border-radius: 8px;
        height: 100%;
    }
    .UserCenter .mobile-menus-box .mobile-menu-title {
        padding: 10px 16px;
        font-size: 14px;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }
    .UserCenter .mobile_menu_inner{
        display: flex;
        flex-wrap: wrap;
    }
    .UserCenter .mobile_menuList{
        display: flex;
        align-items:center;
        justify-content:center;
        flex-direction:column;
        width:25%;
        margin-bottom:18px;
    }
    .UserCenter .mobile_menuList:last-child{
        margin-bottom:0;
    }
    .UserCenter .mobile_menu_image{
        background-size: cover;
        background-position: center center;
        width: 25px;
        height: 25px;
        border-radius: 0%;
        margin-bottom: 8px;
    }
    .UserCenter .mobile_showbox::-webkit-scrollbar {
        width: 1px;
    }
    .UserCenter .mobile_tableDiv{
        display: flex;
        flex-direction: column;
    }
   .UserCenter .mobile_tableDivList{
        display: flex;
        padding: 8px 16px;
        align-items: center;
        flex-direction: row;
    }
    .UserCenter .User_rightContent{
        width:100%;
        height:740px;
        overflow-y:scroll;
    }
    .UserCenter .User_rightTop{
        margin-bottom:20px;
        min-width:500px;
        border: 1px solid #EBEEF5;
        background-color: #FFF;
        color: #303133;
        -webkit-transition: .3s;
        transition: .3s;
        border-top-left-radius: 3px;
        border-top-right-radius: 3px;
    }
    .UserCenter .User_rightTop_header{
        padding: 18px 20px;
        border-bottom: 1px solid #EBEEF5;
        -webkit-box-sizing: border-box;
        box-sizing: border-box;
    }
    .UserCenter .User_topBtm{
        padding:20px;
        padding-right:30%;
    }
    .UserCenter .userCommonimg{
        width: 80px;
        height: 80px;
        border-radius: 0%;
    }
    .UserCenter .userCommonimg img{
        width:100%;
        height:100%;
    }
    .UserCenter .CollectDiv{
        display: flex;
        flex-wrap: wrap;
    }
    .UserCenter .ColeectList{
        display: flex;
        height: 80px;
        padding-top: 10px;
        border: 1px solid #eeeeee;
        margin-left: -1px;
        cursor: pointer;
        min-width: 60px;
        flex-grow: 1;
        max-width: 134.16px;
        align-items: center;
        justify-content: center;
        flex-direction: column;
    }
    .UserCenter .ColeectImgList{
        background-size: cover;
        background-position: center center;
        width: 30px;
        height: 30px;
    }
    .UserCenter .AccountImgList{
        background-size: cover;
        background-position: center center;
        width: 21px;
        height: 21px;
    }
    .UserCenter .LastMenuDiv{
        border: 1px solid #eeeeee;
        background: #F6F8F9;
    }
    .UserCenter .menu-add {
        text-align: right;
        background: #ffffff;
        height: 40px;
        line-height: 40px;
        padding-right: 10px;
    }
    .UserCenter .Lastmenu_item{
        cursor: move;
        background-color: #fff;
        margin: 5px 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .UserCenter .LastMenu_image{
        background-size: cover;
        background-position: center center;
        width: 25px;
        height: 25px;
    }
    .UserCenter .LastMenuFirst{
        margin:0 10px;
        flex-grow: 0;
    }
    .UserCenter .LastMenu_Second{
        flex-grow: 1;
    }
    .UserCenter .LastMenu_Third{
        display: flex;
        flex-grow: 0;
        width: 94px; 
        margin: 5px 0px;
    }
    .mb_headerOther{
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        color:#fff;
    }
    .UserUpImg img{
        width:80px;
        height:80px;
    }
</style>
<template>
    <div class="UserCenter">
        <div class="CommonHeader">用户中心设置</div>
        <div class="User_Main">
            <div class="User_mobile">
                <div class="mobile_Header">
                    <div>用户中心</div>
                </div>
                <div class="mobile_showbox">
                    <div class="mb_topBox" :style="{backgroundImage:'url('+ msg.defaultImg +  ')'}">
                        <div class="mb_header" v-if="msg.headerPosition==1">
                            <div class="mobole_head"></div>
                            <span>用户昵称</span>
                        </div>
                        <div class="mb_headerOther" v-if="msg.headerPosition==2">
                            <div style="margin-left:0;" class="mobole_head"></div>
                            <span>用户昵称</span>
                        </div>
                    </div>
                    <div class="mobile_footBox" v-if="msg.isShowCollectBar==1">
                        <div class="foot-box-item" v-for="(item,index) in msg.CollectArr" :key="index">
                            <div class="userAppimage" :style="{backgroundImage:'url('+ item.image +  ')'}"></div>
                            <div class="foot-box-info">
                                <div class="foot-box-num">0</div>
                                <div>{{item.name}}</div>
                            </div>
                        </div>                        
                        <div class="foot-box-line"></div>
                    </div>
                    <div class="userAccount_box" v-if="msg.isShowStatus==1">
                        <div>
                            <div class="accountList" v-for="(item,index) in msg.MyAccount" :key="index">
                                <div class="Account_score">0</div>
                                <div>
                                    <img class="accountListImg" :src="item.image">{{item.name}}
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="AccountOrder_box" v-if="msg.isShowOrder==1">
                        <div>
                            <div class="AccountOrder_Top">
                                <div>我的订单</div>
                                <div style="color: rgb(153, 153, 153);">查看更多></div>
                            </div>
                            <div class="Account_bTM">
                                <div class="Account_bTMList" v-for="(item,index) in msg.OrderArr" :key="index">
                                    <div class="Account_btmimg" :style="{backgroundImage:'url('+ item.image +  ')'}"></div>
                                    <div style="margin-top:5px;">{{item.name}}</div>
                                </div>    
                            </div>
                        </div>
                    </div>  
                    <div class="mobile-menus-box" v-if="msg.menuStatus==1">
                        <template v-if="msg.menuStyle==2">
                            <div class="mobile-menu-title">{{msg.menuTitle}}</div>
                            <div class="mobile_menu_inner">
                                <div class="mobile_menuList" v-for="(item,index) in msg.menuArr" :key="index">
                                    <div class="mobile_menu_image" :style="{backgroundImage:'url('+ item.image +  ')'}"></div>
                                    <div class="vue-line-clamp">{{item.name}}</div>
                                </div>
                            </div>
                        </template>
                        <template v-else>
                            <div class="mobile_tableDiv">
                                <div class="mobile-menu-title">{{msg.menuTitle}}</div>
                                <div class="mobile_tableDivList" v-for="(item,index) in msg.menuArr" :key="index">
                                    <div class="mobile_menu_image" :style="{backgroundImage:'url('+ item.image +  ')'}"></div>
                                    <div class="vue-line-clamp" style="margin-left:10px;">{{item.name}}</div>
                                </div>
                            </div>
                        </template>
                    </div>
                </div>
            </div>
            <div class="User_rightContent">
                <div class="User_rightTop">
                    <div class="User_rightTop_header">头像栏设置</div>
                    <div class="User_topBtm">
                        <el-form label-width="150px">
                            <el-form-item label="背景图片" size="small">
                                <div>
                                    <el-tooltip class="item" effect="dark" content="建议尺寸:750*300" placement="top-start">
                                        <el-button size="mini">选择文件</el-button>
                                    </el-tooltip>
                                </div>
                                <div class="userCommonimg">
                                    <img v-if="msg.defaultImg" :src="msg.defaultImg" alt="" />
                                    <img v-else src="../../assets/img/default.png" alt="" />
                                </div>
                            </el-form-item>
                            <el-form-item label="普通用户图标" size="small">
                                <div>
                                    <el-tooltip class="item" effect="dark" content="建议尺寸:44*44" placement="top-start">
                                        <el-button size="mini">选择文件</el-button>
                                    </el-tooltip>
                                </div>
                                <div class="userCommonimg">
                                    <img v-if="msg.averageUser" :src="msg.averageUser" alt="" />
                                    <img v-else src="../../assets/img/default.png" alt="" />
                                </div>
                            </el-form-item>
                            <el-form-item label="会员中心背景图" size="small">
                                <div>
                                    <el-tooltip class="item" effect="dark" content="建议尺寸:660*320" placement="top-start">
                                        <el-button size="mini">选择文件</el-button>
                                    </el-tooltip>
                                </div>
                                <div class="userCommonimg">
                                    <img v-if="msg.memberCenter" :src="msg.memberCenter" alt="" />
                                    <img v-else src="../../assets/img/default.png" alt="" />
                                </div>
                            </el-form-item>
                            <el-form-item label="头像样式" size="small">
                                <el-radio-group v-model="msg.headerPosition">
                                    <el-radio :label="1">头像靠左</el-radio>
                                    <el-radio :label="2">头像居中</el-radio>
                                    <!-- <el-radio :label="3">头像内嵌</el-radio> -->
                                </el-radio-group>
                            </el-form-item>
                        </el-form>   
                    </div>
                </div>
                <div class="User_rightTop">
                    <div class="User_rightTop_header">收藏足迹栏</div>
                    <el-form label-width="150px" style="padding:20px;">
                        <el-form-item label="收藏足迹栏显示状态" size="small">
                            <el-switch v-model="msg.isShowCollectBar" :active-value="1" :inactive-value="0"></el-switch>
                        </el-form-item>
                        <el-form-item label="收藏足迹栏" size="small">
                            <div class="CollectDiv">
                                <div class="ColeectList" v-for="(item,index) in msg.CollectArr" :key="index" @click="upDateMsg(item,1)">
                                    <div class="ColeectImgList" :style="{backgroundImage:'url('+ item.image +  ')'}"></div>
                                    <div>{{item.name}}</div>
                                </div>
                            </div>
                        </el-form-item>
                    </el-form>
                </div>
                <div class="User_rightTop">
                    <div class="User_rightTop_header">订单栏设置</div>
                    <el-form label-width="150px" style="padding:20px;">
                        <el-form-item label="订单栏显示状态" size="small">
                            <el-switch v-model="msg.isShowOrder" :active-value="1" :inactive-value="0"></el-switch>
                        </el-form-item>
                        <el-form-item label="订单栏" size="small">
                            <div class="CollectDiv">
                                <div class="ColeectList" v-for="(item,index) in msg.OrderArr" :key="index" @click="upDateMsg(item,2)">
                                    <div class="ColeectImgList" :style="{backgroundImage:'url('+ item.image +  ')'}"></div>
                                    <div>{{item.name}}</div>
                                </div>
                            </div>
                        </el-form-item>
                    </el-form>
                </div>
                <div class="User_rightTop">
                    <div class="User_rightTop_header">账户栏设置</div>
                    <el-form label-width="150px" style="padding:20px;">
                        <el-form-item label="显示状态" size="small">
                            <el-switch v-model="msg.isShowStatus" :active-value="1" :inactive-value="0"></el-switch>
                        </el-form-item>
                        <el-form-item label="订单栏" size="small">
                            <div class="CollectDiv">
                                <div class="ColeectList" v-for="(item,index) in msg.MyAccount" :key="index" @click="upDateMsg(item,3)">
                                    <div class="AccountImgList" :style="{backgroundImage:'url('+ item.image +  ')'}"></div>
                                    <div>{{item.name}}</div>
                                </div>
                            </div>
                        </el-form-item>
                    </el-form>
                </div>
                <div class="User_rightTop">
                    <div class="User_rightTop_header">菜单栏设置</div>
                    <el-form label-width="150px" style="padding:20px;">
                        <el-form-item label="菜单栏显示状态" size="small">
                            <el-switch v-model="msg.menuStatus" :active-value="1" :inactive-value="0"></el-switch>
                        </el-form-item>
                        <el-form-item label="菜单栏标题" size="small">
                            <el-input type="text" size="small" v-model="msg.menuTitle"></el-input>
                        </el-form-item>
                        <el-form-item label="菜单栏样式" size="small">
                            <el-radio-group v-model="msg.menuStyle">
                                <el-radio :label="1">列表形式</el-radio>
                                <el-radio :label="2">九宫格形式</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="菜单栏" size="small">
                            <div class="LastMenuDiv">
                                <div class="menu-add">
                                      <el-button plain size="mini">添加</el-button>
                                </div>
                                <div class="Lastmenu_item" v-for="(item,index) in msg.menuArr" :key="index" @click="upDateMsg(item,4)">
                                    <div class="LastMenuFirst">
                                        <div class="LastMenu_image" :style="{backgroundImage:'url('+ item.image +  ')'}"></div>
                                    </div>
                                    <div class="LastMenu_Second">{{item.name}}</div>
                                    <div class="LastMenu_Third">
                                        <el-tooltip class="item" effect="dark" content="编辑" placement="top-start">
                                            <el-button circle type="primary" size="mini" icon="el-icon-edit"></el-button>
                                        </el-tooltip>
                                        <el-tooltip class="item" effect="dark" content="删除" placement="top-start">
                                            <el-button circle type="danger" size="mini" icon="el-icon-delete"></el-button>
                                        </el-tooltip>
                                    </div>
                                </div>
                            </div>
                        </el-form-item>
                    </el-form>
                </div>
            </div>
        </div>

        <!-- 导航菜单编辑 -->
        <el-dialog :title="commonEditTitle" :visible.sync="isShowDialog" width="450px">
            <el-form label-width="120px">
                <el-form-item label="名称">
                    <el-input type="text" :disabled="EditIndex==1||EditIndex==2" v-model="modifyMsg.name" size="small" class="w200" maxlength="100" />
                </el-form-item>
                <el-form-item label="图标" >
                    <div>
                        <el-tooltip class="item" effect="dark" :content="SuggestSize" placement="top-start">
                            <el-button size="small">选择文件</el-button>
                        </el-tooltip>
                    </div>
                    <div class="UserUpImg">
                        <img v-if="modifyMsg.image" :src="modifyMsg.image" alt="" />
                        <img v-else src="../../assets/img/default.png" alt="" />
                    </div>
                </el-form-item>
            </el-form>
            <span slot="footer" class="dialog-footer">
                <el-button size="small" @click="isShowDialog = false">取 消</el-button>
                <el-button size="small" type="primary" @click="updateInfo()">提交</el-button>
            </span>
        </el-dialog>

    </div>
</template>
<script>
  export default {
    data() {
      return {
          commonEditTitle:'',
          isShowDialog:false,
          SuggestSize:'',
          EditIndex:1,
          msg:{
              //背景图片
              defaultImg:this.domainManager().ImageUrl+'/Static/user_default.jpg',
              //普通用户图标
              averageUser:this.domainManager().ImageUrl+'/Static/user_default.jpg',
              //会员中心背景图
              memberCenter:this.domainManager().ImageUrl+'/Static/user_cardmember-0.png',
              //头像样式
              headerPosition:1,
              //收藏足迹栏显示状态
              isShowCollectBar:1,
              //收藏足迹栏
              CollectArr:[{
                  name:'我的收藏',
                  image:this.domainManager().ImageUrl+'/Static/user_favorite.png'
              },{
                  name:'我的足迹',
                  image:this.domainManager().ImageUrl+'/Static/user_foot.png'
              }],
              //订单栏显示状态
              isShowOrder:1,
              //订单栏
              OrderArr:[{
                  name:'待付款',
                  image:this.domainManager().ImageUrl+'/Static/user_order-0.png'
              },{
                  name:'待发货',
                  image:this.domainManager().ImageUrl+'/Static/user_order-1.png'
              },{
                  name:'待收货',
                  image:this.domainManager().ImageUrl+'/Static/user_order-2.png'
              },{
                  name:'待评价',
                  image:this.domainManager().ImageUrl+'/Static/user_order-3.png'
              },{
                  name:'售后',
                  image:this.domainManager().ImageUrl+'/Static/user_order-4.png'
              }],
              //显示状态
              isShowStatus:1,
              //我的账户
              MyAccount:[{
                  name:'积分',
                  image:this.domainManager().ImageUrl+'/Static/user_integral.png'
              },{
                  name:'余额',
                  image:this.domainManager().ImageUrl+'/Static/user_balance.png'
              },{
                  name:'优惠券',
                  image:this.domainManager().ImageUrl+'/Static/user_coupon.png'
              },{
                  name:'卡券',
                  image:this.domainManager().ImageUrl+'/Static/user_card.png'
              }],
              //菜单栏显示状态
              menuStatus:1,
              //菜单栏标题
              menuTitle:'',
              //菜单栏样式
              menuStyle:2,
              menuArr:[{
                  name:'全部订单',
                  image:this.domainManager().ImageUrl+'/Static/user_order-all.png'
              },{
                  name:'我的订单',
                  image:this.domainManager().ImageUrl+'/Static/user_order.png'
              },{
                  name:'客服',
                  image:this.domainManager().ImageUrl+'/Static/user_service.png'
              },{
                  name:'分销中心',
                  image:this.domainManager().ImageUrl+'/Static/user_sharecenter.png'
              },{
                  name:'我的卡券',
                  image:this.domainManager().ImageUrl+'/Static/user_usercard.png'
              },{
                  name:'我的优惠券',
                  image:this.domainManager().ImageUrl+'/Static/user_usercoupons.png'
              },{
                  name:'领券中心',
                  image:this.domainManager().ImageUrl+'/Static/user_coupons.png'
              },{
                  name:'积分明细',
                  image:this.domainManager().ImageUrl+'/Static/user_score.png'
              },{
                  name:'商城管理',
                  image:this.domainManager().ImageUrl+'/Static/user_setting.png'
              }]
          },
          modifyMsg:{
              name:'',
              image:''
          }
      };
    },
    created() {

    },
    methods: {
        //修改确定
        updateInfo(){
            this.isShowDialog=false;
        },
        //修改方法
        upDateMsg(item,index){
            this.isShowDialog=true;
            this.EditIndex=index;
            switch(index){
                case 1:
                this.commonEditTitle='收藏栏编辑';
                this.SuggestSize='建议尺寸:40*40';
                break;
                case 2:
                this.commonEditTitle='订单栏编辑';
                this.SuggestSize='建议尺寸:60*60';
                break;
                case 3:
                this.commonEditTitle='我的账户编辑';
                this.SuggestSize='建议尺寸:26*26';
                break;
                case 4:
                this.commonEditTitle='订单栏编辑';
                this.SuggestSize='建议尺寸:50*50';
                break;
            }
            this.modifyMsg.name=item.name;
            this.modifyMsg.image=item.image;
        }
    },
    mounted() {

    }
  };

</script>
