ソースを参照

登录页,配置页调整 整体功能优化

wqx 1 年間 前
コミット
a78af22418

+ 26 - 26
src/views/components/login/topMenu.vue

@@ -8,8 +8,8 @@
     </div>
     <div class="menuSty">
       <el-dropdown
-          v-for="(item,index1) in menuList"
-          :key="index1"
+          v-for="(item,index) in menuList"
+          :key="index"
           style="margin-right: 40px"
       >
         <span class="el-dropdown-link">
@@ -62,30 +62,30 @@ export default {
   data() {
     return {
       menuList: [
-        {
-          name: '行业解决方案',
-          data: [
-            { name: '行业解决方案1' },
-            { name: '行业解决方案2' },
-            { name: '行业解决方案3' }
-          ]
-        },
-        {
-          name: '行业标杆',
-          data: [
-            { name: '行业标杆1' },
-            { name: '行业标杆2' },
-            { name: '行业标杆3' }
-          ]
-        },
-        {
-          name: '服务支持',
-          data: [{ name: '服务支持' }]
-        },
-        {
-          name: '关于会助理',
-          data: [{ name: '关于会助理' }]
-        }
+        // {
+        //   name: '行业解决方案',
+        //   data: [
+        //     { name: '行业解决方案1' },
+        //     { name: '行业解决方案2' },
+        //     { name: '行业解决方案3' }
+        //   ]
+        // },
+        // {
+        //   name: '行业标杆',
+        //   data: [
+        //     { name: '行业标杆1' },
+        //     { name: '行业标杆2' },
+        //     { name: '行业标杆3' }
+        //   ]
+        // },
+        // {
+        //   name: '服务支持',
+        //   data: [{ name: '服务支持' }]
+        // },
+        // {
+        //   name: '关于会助理',
+        //   data: [{ name: '关于会助理' }]
+        // }
       ],
       loginMenuData: []
     }

+ 35 - 40
src/views/login.vue

@@ -2,7 +2,7 @@
   <div>
     <top-menu :methodType="1"></top-menu>
     <div>
-      <div class="container">
+      <div class="container" style="overflow: hidden">
         <!-- <div class="logo"></div> -->
         <div class="processPic">
           <img
@@ -38,7 +38,7 @@
             </div>
           </div>
           <div class="loginRight">
-            <div style="width: 80%; height: 100%; margin: 50px auto">
+            <div style="width: 80%; height: 100%; margin: 60px auto">
               <h1 style="font-size: 32px; text-align: center; margin: 0 auto">
                 手机号登录
               </h1>
@@ -80,6 +80,12 @@
                           icon-class="password"
                           class="el-input__icon input-icon"
                       />
+                      <el-checkbox
+                          slot="suffix"
+                          v-model="loginForm.rememberMe"
+                          style="float: right; right: 0px; color: #999999"
+                      >记住密码
+                      </el-checkbox>
                     </el-input>
                   </el-form-item>
                   <el-form-item prop="tenantName" v-if="tenantEnable">
@@ -157,12 +163,6 @@
                     <span v-else>登 录 中...</span>
                   </el-button>
                 </el-form-item>
-                <el-checkbox
-                    v-model="loginForm.rememberMe"
-                    style="float: right; right: 0px; color: #999999"
-                >记住密码
-                </el-checkbox
-                >
               </el-form>
             </div>
           </div>
@@ -186,37 +186,39 @@
         />
 
       </div>
-      <div style="padding: 3% 12%" ref="sortableContainer">
+      <div style="margin: 0 auto;width: 75%;padding: 3% 0" ref="sortableContainer">
         <!--        <div shadow="hover" v-for="(item,index) in [1,2,3,4,5,6]" :key="index"-->
-        <div shadow="hover" v-for="(item,index1) in loginModuleData" :key="index1"
-             class="module-item"
-             :style="{height: vModuleHeight +'px'}"
-        >
-          <div style="height: 12%;padding: 10px 10px 5px"
-               :style="{fontSize: vModuleFontSize1 +'px'}"
+        <div style="padding: 1.2%;display: inline-block;width: 33.3333%;"  v-for="(item,index1) in loginModuleData" :key="index1">
+          <div
+               class="module-item"
+               :style="{height: vModuleHeight +'px'}"
           >
-            {{ item.name }}
-          </div>
-          <div style="height: 78%;padding:10px 10px 10px">
-            <div style="height: 85%">
-              <img :src="item.imgUrls" width="100%" height="100%">
-            </div>
-            <div style="height: 15%;text-align: center;margin: 10px 0"
-                 :style="{fontSize: vModuleFontSize2 +'px'}"
+            <div style="height: 10%;padding: 10px 10px 5px"
+                 :style="{fontSize: vModuleFontSize1 +'px'}"
             >
-              {{ item.digest }}
+              {{ item.name }}
+            </div>
+            <div style="height: 80%;padding:10px 10px 10px">
+              <div style="height: 85%">
+                <img :src="item.imgUrls" width="100%" height="100%">
+              </div>
+              <div style="height: 15%;text-align: center;margin: 10px 0"
+                   :style="{fontSize: vModuleFontSize2 +'px'}"
+              >
+                {{ item.digest }}
+              </div>
+            </div>
+            <div style="text-align: center;height: 10%;margin-top: 5px">
+              <el-button size="mini" style="background: rgb(228,241,255);color: rgb(24,144,255);border: none;font-weight: 500">了解详情<i class="el-icon-arrow-right"></i></el-button>
             </div>
-          </div>
-          <div style="text-align: center;height: 11%;">
-            <el-button size="mini" slot="reference" type="primary">了解详情<i class="el-icon-arrow-right"></i></el-button>
           </div>
         </div>
       </div>
-      <div style="padding: 1% 12%; margin: 1.2%;">
-        <div class="bottomMod" v-html="bottomModData.pageContent"></div>
+      <div style="margin: 0 auto;width: 75%;padding: 0.8%">
+        <div v-html="bottomModData.pageContent"></div>
       </div>
       <!-- footer class="footer"-->
-      <div style="margin-top: 50px;text-align: center;font-size: 20px"
+      <div style="margin: 50px;text-align: center;font-size: 20px"
            :style="{fontSize: bottomFontSize +'px'}"
       >
         <div style="margin: 10px 0">
@@ -227,7 +229,7 @@
           <a style="margin: 0 15px">使用协议</a> |
           <a style="margin: 0 15px">隐私条款</a>
         </div>
-        <div style="margin: 10px 0">
+        <div style="margin: 20px 0">
           {{ version }} <span style="margin-left: 30px">开发者:会山科技</span>
         </div>
         <div style="margin: 10px 0">
@@ -431,7 +433,7 @@ export default {
               this.bottomModData = response.data.list[0]
               if (this.bottomModData) {
                 this.bottomModData.pageContent = this.bottomModData.pageContent.replace(/<img/g,
-                    "<img style='width:100%;height:auto;'")
+                    '<img style=\'width:100%;height:auto;\'')
               }
               break
             default:
@@ -707,17 +709,10 @@ export default {
 //.el-form-item {
 //  margin-bottom: 20px !important;
 //}
-.bottomMod img {
-  width: 100%;
-  height: auto;
-}
 
 .module-item {
-  display: inline-block;
-  width: 30%;
   border-radius: 10px;
-  margin: 1.2%;
-  box-shadow: 0 0 15px #c0cfe2;
+  box-shadow: 0 0 10px #c0cfe2;
   /*transition: transform 0.1s ease;*/
 }
 

+ 89 - 36
src/views/supplier/loginPagePopularizeModuleConfig/index.vue

@@ -4,26 +4,31 @@
       <div style="font-size: 30px;margin-bottom: 10px;background: #1c84c6;padding: 10px;color: #ffffff">
         顶部菜单栏配置
       </div>
-      <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd(0)">添 加 项 目</el-button>
+      <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd(0,null)">添 加 项 目</el-button>
       <div v-for="(menu,index) in loginMenuData" style="margin: 10px" :key="index">
         <div style="font-size: 22px;margin-bottom: 10px">
           {{ menu.name }}
         </div>
-        <div v-if="menu.parentId === 'aboutHZL'">
+        <div v-if="menu.parentId === 'aboutHZL' && aboutHZLData">
           <editor v-model="aboutHZLData.pageContent" :min-height="480"></editor>
         </div>
         <div v-if="menu.parentId !== 'aboutHZL'">
           <!-- 操作工具栏 -->
           <el-row :gutter="10" class="mb8">
             <el-col :span="1.5">
-              <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd(1,menu.parentId)">新增
+              <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd(1,menu.parentId,index)">
+                新增
               </el-button>
             </el-col>
             <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
           </el-row>
           <!-- 列表 -->
           <el-table v-loading="menu.loading" :data="menu.data">
-            <el-table-column label="序号" align="center" prop="id"/>
+            <el-table-column label="序号" align="center">
+              <template slot-scope="scope">
+                <span>{{ scope.$index + 1 }}</span>
+              </template>
+            </el-table-column>
             <el-table-column label="名称" align="center" prop="name"/>
             <!--        <el-table-column label="链接" align="center" prop="link"/>-->
             <el-table-column label="排序" align="center" prop="sort"/>
@@ -48,7 +53,8 @@
             <!--          <el-table-column label="模块摘要" align="center" prop="digest"/>-->
             <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
               <template v-slot="scope">
-                <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row,scope.row.type)"
+                <el-button size="mini" type="text" icon="el-icon-edit"
+                           @click="handleUpdate(scope.row,scope.row.type,index)"
                            v-hasPermi="['supplier:login-page-popularize-module-config:update']"
                 >编辑
                 </el-button>
@@ -83,7 +89,11 @@
       </el-row>
       <!-- 列表 -->
       <el-table v-loading="modObj.loading" :data="modObj.data">
-        <el-table-column label="序号" align="center" prop="id"/>
+        <el-table-column label="序号" align="center">
+          <template slot-scope="scope">
+            <span>{{ scope.$index + 1 }}</span>
+          </template>
+        </el-table-column>
         <el-table-column label="模块名称" align="center" prop="name"/>
         <el-table-column label="排序" align="center" prop="sort"/>
         <el-table-column label="状态" align="center" prop="status">
@@ -122,12 +132,12 @@
              class="module-item"
              :style="{height: vModuleHeight +'px'}"
         >
-          <div style="height: 12%;padding: 10px 10px 5px"
+          <div style="height: 10%;padding: 10px 10px 5px"
                :style="{fontSize: vModuleFontSize1 +'px'}"
           >
             {{ item.name }}
           </div>
-          <div style="height: 78%;padding:10px 10px 10px">
+          <div style="height: 80%;padding:10px 10px 10px">
             <div style="height: 85%">
               <img :src="item.imgUrls" width="100%" height="100%">
             </div>
@@ -137,7 +147,7 @@
               {{ item.digest }}
             </div>
           </div>
-          <div style="text-align: center;height: 11%;">
+          <div style="text-align: center;height: 10%;margin-top: 5px">
             <el-popover placement="top" width="400" trigger="click">
               <span v-for="(modItem,index2) in modObj.data" style="margin: 5px">
                 <el-button @click="selectMod(modItem,index1)" :key="index2"> {{ modItem.name }}</el-button>
@@ -152,11 +162,19 @@
       <div style="font-size: 30px;margin-bottom: 10px;background: #1c84c6;padding: 10px;color: #ffffff">
         底部服务配置
       </div>
+      <div style="margin: 10px 0">
+        <el-button icon="el-icon-view" @click="preView(3,bottomModData.pageContent,null)"
+        >预览
+        </el-button>
+      </div>
       <editor v-model="bottomModData.pageContent" :min-height="480"></editor>
     </div>
     <!-- 对话框(添加 / 修改) -->
     <el-dialog :title="title" :visible.sync="open" width="700px" v-dialogDrag append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item v-if="editType === 0" label="项目名称" prop="name">
+          <el-input v-model="form.name" placeholder="请输入项目名称"/>
+        </el-form-item>
         <el-form-item v-if="editType === 1" label="方案名称" prop="name">
           <el-input v-model="form.name" placeholder="请输入方案名称"/>
         </el-form-item>
@@ -181,11 +199,11 @@
         <!--<el-form-item label="链接" prop="link">-->
         <!--  <el-input v-model="form.link" type="textarea" placeholder="请输入内容"/>-->
         <!--</el-form-item>-->
-        <el-form-item label="排序" prop="sort">
-          <el-input v-model="form.sort" placeholder="请输入排序"/>
+        <el-form-item v-if="editType !== 0" label="排序" prop="sort">
+          <el-input-number v-model="form.sort" :min="1" label="排序"></el-input-number>
         </el-form-item>
 
-        <el-form-item label="状态" prop="status">
+        <el-form-item v-if="editType !== 0" label="状态" prop="status">
           <el-radio-group v-model="form.status+''">
             <el-radio v-for="dict in this.getDictDatas(DICT_TYPE.COMMON_STATUS)"
                       :key="dict.value" :label="dict.value"
@@ -196,13 +214,17 @@
 
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm">确 定</el-button>
-        <el-button icon="el-icon-view" style="background: #c79eff;color: #f3ecec">预 览</el-button>
+        <el-button v-if="editType === 0" type="primary" @click="submitProjectForm">确 定</el-button>
+        <el-button v-else type="primary" @click="submitForm">确 定</el-button>
+        <el-button icon="el-icon-view" style="background: #c79eff;color: #f3ecec"
+                   @click="preView(form.type,form,preIndex)"
+        >预 览
+        </el-button>
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
 
-    <el-dialog title="预览" :visible.sync="preOpen" width="1700px">
+    <el-dialog @opened="openPre" title="预览" :visible.sync="preOpen" append-to-body width="99%">
       <PreLogin ref="preLogin"></PreLogin>
     </el-dialog>
   </div>
@@ -247,6 +269,8 @@ export default {
       // 是否显示弹出层
       open: false,
       preOpen: false,
+      preLoading: false,
+      preParams: {},
       // 查询参数
       queryParams: {
         pageNo: 1,
@@ -276,7 +300,8 @@ export default {
       vModuleHeight: window.innerHeight * 0.45,
       vModuleFontSize1: window.innerHeight * 0.022,
       vModuleFontSize2: window.innerHeight * 0.015,
-      editType: 1
+      editType: 1,
+      preIndex: 0
     }
   },
   watch: {
@@ -326,14 +351,16 @@ export default {
   created() {
     //各个模块初始化数据
     this.getList('', 2, this.modObj)
-    this.getList('aboutHZL', 1, this.aboutHZLData)
+    this.getList('aboutHZL', 3, this.aboutHZLData)
     this.getList('bottomMod', 3, this.bottomModData)
     getConfigData('login_menu').then(res => {
       if (res.data) {
         this.configMenuData = res.data
         this.loginMenuData = JSON.parse(res.data.value)
         this.loginMenuData.forEach(item => {
-          this.getList(item.parentId, 1, item)
+          if (typeof item.parentId === 'number') {
+            this.getList(item.parentId, 1, item)
+          }
         })
       }
     })
@@ -348,16 +375,21 @@ export default {
   methods: {
     preView(type, data, index) {
       this.preOpen = true
-      if (type === 1) {
-        this.$nextTick(() => {
+      this.preParams = { type, data, index }
+    },
+    openPre() {
+      let type = this.preParams.type
+      let data = this.preParams.data
+      let index = this.preParams.index
+      this.$nextTick(() => {
+        if (type === 1) {
           this.$refs.preLogin.menuPre(data, index)
-        })
-      }
-      if (type === 2) {
-        this.$nextTick(() => {
+        } else if (type === 2) {
           this.$refs.preLogin.modulePre(data, index)
-        })
-      }
+        } else if (type === 3) {
+          this.$refs.preLogin.bottomPre(data)
+        }
+      })
     },
     /**
      * 更新配置模块的数据。
@@ -396,8 +428,9 @@ export default {
     getList(parentId, type, data) {
       if (type) {
         this.queryParams.type = type
-        if (type === 1) {
+        if (typeof type === 'number') {
           data.loading = true
+          data.data = []
         }
       }
       if (parentId) {
@@ -409,6 +442,7 @@ export default {
           switch (parentId) {
             case 'aboutHZL':
               this.aboutHZLData = response.data.list[0]
+              console.log(this.aboutHZLData)
               break
             case 'bottomMod':
               this.bottomModData = response.data.list[0]
@@ -419,6 +453,7 @@ export default {
               })
           }
           data.loading = false
+          this.$forceUpdate()
         }
       })
     },
@@ -454,9 +489,14 @@ export default {
       this.handleQuery()
     },
     /** 新增按钮操作 */
-    handleAdd(type, parentId) {
+    handleAdd(type, parentId, index) {
       this.reset()
       this.editType = type
+      this.preIndex = index
+      if (type === 0) {
+        this.form.parentId = (this.loginMenuData[this.loginMenuData.length - 1].parentId + 1)
+        this.title = '新增项目'
+      }
       if (type === 1) {
         this.form.type = 1
         this.form.parentId = parentId
@@ -469,10 +509,11 @@ export default {
       this.open = true
     },
     /** 修改按钮操作 */
-    handleUpdate(row, type) {
+    handleUpdate(row, type, index) {
       this.reset()
       const id = row.id
       this.editType = type
+      this.preIndex = index
       if (type === 1) {
         this.title = '修改方案'
       } else if (type === 2) {
@@ -484,6 +525,18 @@ export default {
       })
     },
     /** 提交按钮 */
+    submitProjectForm() {
+      let pro = {
+        name: this.form.name,
+        parentId: this.form.parentId,
+        data: [],
+        loading: false
+      }
+      this.loginMenuData.unshift(pro)
+      this.configMenuData.value = JSON.stringify(this.loginMenuData)
+      updateConfig(this.configMenuData)
+      this.$modal.msgSuccess('新增成功')
+    },
     submitForm() {
       this.$refs['form'].validate(valid => {
         if (!valid) {
@@ -512,15 +565,15 @@ export default {
         createLoginPagePopularizeModuleConfig(this.form).then(response => {
           this.$modal.msgSuccess('新增成功')
           this.open = false
-          if (this.from.type === 1) {
+          if (this.form.type === 1) {
             for (let i = 0; i < this.loginMenuData.length; i++) {
-              if (this.from.parentId === this.loginMenuData[i].parentId) {
-                this.getList(this.from.parentId, 1, this.loginMenuData[i])
+              if (this.form.parentId === this.loginMenuData[i].parentId) {
+                this.getList(this.form.parentId, 1, this.loginMenuData[i])
                 break
               }
             }
           }
-          if (this.from.type === 2) {
+          if (this.form.type === 2) {
             this.getList('', 2, this.modObj)
           }
         })
@@ -529,7 +582,7 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const id = row.id
-      this.$modal.confirm('是否确认删除登录页面推广模块配置编号为"' + id + '"的数据项?').then(function() {
+      this.$modal.confirm('是否确认删除编号为"' + id + '"的数据项?').then(function() {
         return deleteLoginPagePopularizeModuleConfig(id)
       }).then(() => {
         this.getList()
@@ -543,11 +596,11 @@ export default {
       let params = { ...this.queryParams }
       params.pageNo = undefined
       params.pageSize = undefined
-      this.$modal.confirm('是否确认导出所有登录页面推广模块配置数据项?').then(() => {
+      this.$modal.confirm('是否确认登录页面配置数据项?').then(() => {
         this.exportLoading = true
         return exportLoginPagePopularizeModuleConfigExcel(params)
       }).then(response => {
-        this.$download.excel(response, '登录页面推广模块配置.xls')
+        this.$download.excel(response, '登录页面配置.xls')
         this.exportLoading = false
       }).catch(() => {
       })

+ 1 - 4
src/views/supplier/loginPagePopularizeModuleConfig/preview/login.scss

@@ -36,11 +36,8 @@ $buttonHeight: $buttonH * 1px;
 
 // - - - - - 页面基础设置
 .module-item {
-  display: inline-block;
-  width: 30%;
   border-radius: 10px;
-  margin: 1.2%;
-  box-shadow: 0 0 15px #c0cfe2;
+  box-shadow: 0 0 10px #c0cfe2;
   /*transition: transform 0.1s ease;*/
 }
 .container {

+ 48 - 35
src/views/supplier/loginPagePopularizeModuleConfig/preview/login.vue

@@ -1,6 +1,6 @@
 <template xmlns="">
   <div>
-    <top-menu :methodType="1" ref="topMenu"></top-menu>
+    <top-menu ref="topMenu"></top-menu>
     <div>
       <div class="container">
         <!-- <div class="logo"></div> -->
@@ -28,7 +28,7 @@
             </div>
           </div>
           <div class="loginRight">
-            <div style="width: 80%; height: 100%; margin: 40px auto">
+            <div style="width: 90%; height: 100%; margin: 50px auto">
               <h1 style="font-size: 32px; text-align: center; margin: 0 auto">
                 <el-skeleton-item variant="text" style="width: 50%;height:30px"/>
               </h1>
@@ -38,17 +38,17 @@
               >
                 <!-- 账号密码登录 -->
                 <div>
-                  <el-skeleton-item variant="text" style="width: 95%;height: 20px"/>
-                  <el-skeleton-item variant="text" style="width: 95%;height: 20px"/>
-                  <el-skeleton-item variant="text" style="width: 95%;height: 20px"/>
-                  <el-skeleton-item variant="text" style="width: 95%;height: 20px"/>
+                  <el-skeleton-item variant="text" style="height: 30px"/>
+                  <el-skeleton-item variant="text" style="height: 30px"/>
+                  <el-skeleton-item variant="text" style="height: 30px"/>
+                  <el-skeleton-item variant="text" style="height: 30px"/>
                 </div>
                 <!-- 下方的登录按钮 -->
-                <el-form-item style="width: 100%; margin-top: 10px">
+                <el-form-item style="width: 100%; margin-top: 20px">
                   <el-button
                       size="medium"
                       type="primary"
-                      style="width: 95%;height: 40px"
+                      style="width:100%;height: 40px"
                   >
                     <span style="font-size: 14px">登 录</span>
                   </el-button>
@@ -71,40 +71,47 @@
       </div>
       <div style="padding: 3% 12%">
         <!--        <div shadow="hover" v-for="(item,index) in [1,2,3,4,5,6]" :key="index"-->
-        <div shadow="hover" v-for="(item,index1) in loginModuleData" :key="index1"
-             class="module-item"
-             :style="{height: vModuleHeight +'px'}"
+        <div style="padding: 1.2%;display: inline-block;width: 33.3333%;" v-for="(item,index1) in loginModuleData"
+             :key="index1"
         >
-          <div style="height: 12%;padding: 10px 10px 5px"
-               :style="{fontSize: vModuleFontSize1 +'px'}"
+          <div
+              class="module-item"
+              :style="{height: vModuleHeight +'px'}"
           >
-            <div v-if="item.name">
-              {{ item.name }}
-            </div>
-            <el-skeleton-item v-else variant="text" style="width: 80%;height:30px"/>
-          </div>
-          <div style="height: 78%;padding: 10px 10px 10px;">
-            <div style="height: 85%;">
-              <img v-if="item.imgUrls" :src="item.imgUrls" width="100%" height="100%">
-              <el-skeleton-item v-else variant="image" style="width: 100%; height: 100%;"/>
-            </div>
-            <div style="height: 15%;text-align: center;margin: 10px 0"
-                 :style="{fontSize: vModuleFontSize2 +'px'}"
+            <div style="height: 10%;padding: 10px 10px 5px"
+                 :style="{fontSize: vModuleFontSize1 +'px'}"
             >
-              <div v-if="item.digest">
-                {{ item.digest }}
+              <div v-if="item.name">
+                {{ item.name }}
               </div>
-              <div v-else>
-                <el-skeleton-item variant="image" style="width: 100%; height: 15px;margin: 2px 0"/>
-                <el-skeleton-item variant="image" style="width: 100%; height: 15px;margin: 2px 0"/>
+              <el-skeleton-item v-else variant="text" style="width: 40%;height:30px"/>
+            </div>
+            <div style="height: 80%;padding: 10px 10px 10px;">
+              <div style="height: 85%;">
+                <img v-if="item.imgUrls" :src="item.imgUrls" width="100%" height="100%">
+                <el-skeleton-item v-else variant="image" style="width: 100%; height: 100%;"/>
+              </div>
+              <div style="height: 15%;text-align: center;margin: 10px 0"
+                   :style="{fontSize: vModuleFontSize2 +'px'}"
+              >
+                <div v-if="item.digest">
+                  {{ item.digest }}
+                </div>
+                <div v-else>
+                  <el-skeleton-item variant="image" style="width: 100%; height: 15px;margin: 2px 0"/>
+                  <el-skeleton-item variant="image" style="width: 100%; height: 15px;margin: 2px 0"/>
+                </div>
               </div>
             </div>
-          </div>
-          <div style="text-align: center;height: 10%;">
-            <el-button size="mini" slot="reference" type="primary">了解详情<i class="el-icon-arrow-right"></i></el-button>
+            <div style="text-align: center;height: 10%;margin-top: 5px">
+              <el-button size="mini" style="background: rgb(228,241,255);color: rgb(24,144,255);border: none;font-weight: 500" type="primary">了解详情<i class="el-icon-arrow-right"></i></el-button>
+            </div>
           </div>
         </div>
       </div>
+      <div style="margin: 0 auto;width: 75%;padding: 0.8%">
+        <div v-html="bottomModData.pageContent"></div>
+      </div>
       <!-- footer class="footer"-->
       <div style="margin-top: 50px;text-align: center;"
            :style="{fontSize: bottomFontSize +'px'}"
@@ -141,6 +148,7 @@ export default {
   },
   data() {
     return {
+      preLoading: true,
       loginModuleData: [{
         name: null,
         imgUrls: null,
@@ -166,6 +174,7 @@ export default {
         imgUrls: null,
         digest: null
       }],
+      bottomModData: { pageContent: null },
       vModuleHeight: window.innerHeight * 0.45,
       vModuleFontSize1: window.innerHeight * 0.022,
       vModuleFontSize2: window.innerHeight * 0.015,
@@ -191,8 +200,12 @@ export default {
       console.log('开始预览')
       this.loginModuleData.splice(index, 1, data)
     },
-    menuPre(data,index) {
-      this.$refs.topMenu.menuPre(data,index)
+    menuPre(data, index) {
+      this.$refs.topMenu.menuPre(data, index)
+    },
+    bottomPre(data) {
+      this.bottomModData.pageContent = data.replace(/<img/g,
+          '<img style=\'width:100%;height:auto;\'')
     },
     adVModuleHeightHeight() {
       this.vModuleHeight = window.innerHeight * 0.45

+ 24 - 32
src/views/supplier/loginPagePopularizeModuleConfig/preview/topMenu.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="topMenu">
+  <div class="topMenu" v-loading="preLoading">
     <div class="topLogo">
       <img
           src="@/assets/images/new_text_log.png"
@@ -8,15 +8,15 @@
     </div>
     <div class="menuSty">
       <el-dropdown
-          v-for="item in menuList"
-          :key="item"
+          v-for="(item,index) in menuList"
           style="margin-right: 40px"
+          :key="index"
       >
         <span class="el-dropdown-link">
-          {{ item.menuName }}<i class="el-icon-arrow-down el-icon--right"></i>
+          {{ item.name }}<i class="el-icon-arrow-down el-icon--right"></i>
         </span>
         <el-dropdown-menu slot="dropdown">
-          <el-dropdown-item v-for="it in item.childMenu" :key="it">{{
+          <el-dropdown-item v-for="(it,idx) in item.data" :key="idx">{{
               it.name
             }}
           </el-dropdown-item>
@@ -39,42 +39,34 @@
 </template>
 
 <script>
+import { getConfigData } from '@/api/infra/config'
+
 export default {
   name: 'topMenu',
-  props: {
-    methodType: {
-      type: Number,
-      default: 2
-    }
-  },
   data() {
     return {
-      menuList: [
-        {
-          menuName: '行业解决方案',
-          childMenu: []
-        },
-        {
-          menuName: '行业标杆',
-          childMenu: []
-        },
-        {
-          menuName: '服务支持',
-          childMenu: []
-        },
-        {
-          menuName: '关于会助理',
-          childMenu: [{ cName: '关于会助理' }]
-        }
-      ]
+      menuList: [],
+      preLoading: true
     }
   },
-  mounted() {
+  created() {
+    getConfigData('login_menu').then(res => {
+      if (res.data) {
+        this.menuList = JSON.parse(res.data.value)
+        console.log('config', this.menuList)
+        this.preLoading = false
+      }
+    })
+  },
+  beforeCreate() {
   },
   methods: {
     menuPre(data, index) {
-      this.menuList[index].childMenu.splice(0, 1, data)
-      console.log(this.menuList[index])
+      this.menuList.forEach(item => {
+        item.data = []
+      })
+      this.menuList[index].data.push(data)
+      console.log(this.menuList)
     },
     /**
      * 跳转登录页面