Jelajahi Sumber

修改帮助中心

zs 1 tahun lalu
induk
melakukan
3b6af026c8
3 mengubah file dengan 76 tambahan dan 34 penghapusan
  1. 48 14
      src/layout/index.vue
  2. 26 16
      src/views/help/index.vue
  3. 2 4
      src/views/innovation/detail.vue

+ 48 - 14
src/layout/index.vue

@@ -3,9 +3,15 @@
     <div class="top">
       <el-row :gutter="20" align="middle">
         <el-col :span="6" class="top_1">
-          <el-image class="image" :src="siteInfo.logoUrl" fit="fill" />
+          <el-image
+            class="image"
+            v-if="configInfo && configInfo.logoUrl && configInfo.logoUrl.length > 0"
+            :src="configInfo.logoUrl[0].url"
+            fit="fill"
+          />
+          <el-image class="image" v-else :src="siteInfo.logoUrl" fit="fill" />
           <div class="content">
-            <text class="title">{{ siteInfo.zhTitle }}</text>
+            <text class="title">{{ configInfo.zhTitle || siteInfo.zhTitle }}</text>
             <!-- <text class="english">{{ siteInfo.zhBrief }}</text> -->
           </div>
         </el-col>
@@ -79,31 +85,50 @@
     </div>
     <div class="bottom">
       <div class="w_1200 footflex">
-        <el-image class="image" :src="footInfo.Unit" fit="fill" />
+        <el-image
+          class="image"
+          v-if="foot && foot.Unit && foot.Unit.length > 0"
+          :src="foot.Unit[0].url"
+          fit="fill"
+        />
+        <el-image class="image" v-else :src="footInfo.Unit" fit="fill" />
         <el-col :span="12" class="foot_1">
           <div class="footTitle">
-            <span>业务洽谈:{{ footInfo.Phone }}</span>
+            <span>业务洽谈:{{ foot.Phone || footInfo.Phone }}</span>
             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-            <span>企业邮箱:{{ footInfo.Email }}</span>
+            <span>企业邮箱:{{ foot.Email || footInfo.Email }}</span>
           </div>
-          <div class="footTitle">地 址:{{ footInfo.Address }}</div>
-          <div class="footTitle">版权所有:{{ footInfo.Copyright }}</div>
-          <div class="footTitle">技术支持:{{ footInfo.Company }}</div>
+          <div class="footTitle">地 址:{{ foot.Address || footInfo.Address }}</div>
+          <div class="footTitle">版权所有:{{ foot.Copyright || footInfo.Copyright }}</div>
+          <div class="footTitle">技术支持:{{ foot.Company || footInfo.Company }}</div>
         </el-col>
         <el-col :span="3" class="foot_2">
           <div class="footTop">关于我们</div>
           <div class="footTitle footflex1">
             <span class="footSpan" @click="toHelp('1')">关于我们</span>
-            <span class="footSpan" @click="toHelp('2')">意见反馈</span>
+            <span class="footSpan" @click="toHelp('3')">联系我们</span>
+            <!-- <span class="footSpan" @click="toHelp('2')">意见反馈</span> -->
           </div>
-          <div class="footTitle footflex1">
+          <!-- <div class="footTitle footflex1">
             <span class="footSpan" @click="toHelp('3')">联系我们</span>
             <span class="footSpan" @click="toHelp('4')">法律条款</span>
-          </div>
+          </div> -->
         </el-col>
         <el-col :span="4" class="foot_3 footflex">
-          <el-image class="image" :src="footInfo.Code" fit="fill" />
-          <el-image class="image" :src="footInfo.Code" fit="fill" />
+          <el-image
+            class="image"
+            v-if="foot && foot.Code && foot.Code.length > 0"
+            :src="foot.Code[0].url"
+            fit="fill"
+          />
+          <el-image class="image" v-else :src="footInfo.Code" fit="fill" />
+          <el-image
+            class="image"
+            v-if="foot && foot.Code && foot.Code.length > 0"
+            :src="foot.Code[0].url"
+            fit="fill"
+          />
+          <el-image class="image" v-else :src="footInfo.Code" fit="fill" />
         </el-col>
       </div>
     </div>
@@ -116,6 +141,8 @@ import { Search, Edit, User, Bell } from '@element-plus/icons-vue'
 // 接口
 import { TagsStore } from '@/store/api/system/tags'
 const store = TagsStore()
+import { DesignStore } from '@/store/api/platform/design'
+const designStore = DesignStore()
 const router = useRouter()
 const route = useRoute()
 const current = ref(route.name || 'home')
@@ -123,7 +150,8 @@ import { UserStore } from '@/store/user'
 const userStore = UserStore()
 const user = computed(() => userStore.user)
 const data = ref([])
-
+const configInfo = ref({ logoUrl: [], Unit: [], Code: [] })
+const foot = ref({})
 // 请求
 onMounted(async () => {
   await search()
@@ -133,6 +161,12 @@ const search = async () => {
   const res = await store.query({ is_use: '0' })
   if (res.errcode == '0' && res.total > 0) data.value = res.data
   else data.value = menuList
+  // 基础设置
+  const result = await designStore.query({})
+  if (res.errcode == '0' && res.total > 0) {
+    configInfo.value = result.data[0] || {}
+    foot.value = result.data[0].footInfo || {}
+  }
 }
 const selectMenu = (item) => {
   current.value = item

+ 26 - 16
src/views/help/index.vue

@@ -15,9 +15,11 @@
             </el-col>
             <el-col v-if="select === '1'" :span="18" class="right">
               <h2>关于我们</h2>
-              <el-col :span="24" class="other"> 关于我们 </el-col>
+              <el-col :span="24" class="other">
+                <div v-html="configInfo.brief"></div>
+              </el-col>
             </el-col>
-            <el-col v-else-if="select === '2'" :span="18" class="right">意见反馈</el-col>
+            <!-- <el-col v-else-if="select === '2'" :span="18" class="right">意见反馈</el-col> -->
             <el-col v-else-if="select === '3'" :span="18" class="right">
               <el-row :gutter="20">
                 <el-col :span="12" class="left">
@@ -28,24 +30,24 @@
                     <el-icon color="#2374ff">
                       <Message />
                     </el-icon>
-                    <span>联系我们</span> 吉林省科技开发交流中心
+                    <span>联系我们</span> {{ configInfo.footInfo.Company }}
                   </el-col>
                   <el-col :span="24" class="other">
                     <el-icon color="#2374ff">
                       <Location />
                     </el-icon>
-                    <span>联系地址</span>长春朝阳区前进大街1244号(吉林省科技厅科研园)
+                    <span>联系地址</span> {{ configInfo.footInfo.Address }}
                   </el-col>
                   <el-col :span="24" class="other">
                     <el-icon color="#2374ff">
                       <Iphone />
                     </el-icon>
-                    <span>联系电话</span> 0431-81165166
+                    <span>联系电话</span> {{ configInfo.footInfo.Phone }}
                   </el-col>
                 </el-col>
               </el-row>
             </el-col>
-            <el-col v-else-if="select === '4'" :span="18" class="right">法律条款</el-col>
+            <!-- <el-col v-else-if="select === '4'" :span="18" class="right">法律条款</el-col> -->
           </el-row>
         </div>
       </el-col>
@@ -54,6 +56,10 @@
 </template>
 
 <script setup>
+const $checkRes = inject('$checkRes')
+// 接口
+import { DesignStore } from '@/store/api/platform/design'
+const designStore = DesignStore()
 // 图片引入
 import map from '@/assets/map.jpg'
 const route = useRoute()
@@ -67,22 +73,23 @@ const menuList = reactive([
     label: '关于我们',
     title: '关于我们'
   },
-  {
-    key: '2',
-    label: '意见反馈',
-    title: '意见反馈'
-  },
+  // {
+  //   key: '2',
+  //   label: '意见反馈',
+  //   title: '意见反馈'
+  // },
   {
     key: '3',
     label: '联系我们',
     title: '联系我们'
-  },
-  {
-    key: '4',
-    label: '法律条款',
-    title: '法律条款'
   }
+  // {
+  //   key: '4',
+  //   label: '法律条款',
+  //   title: '法律条款'
+  // }
 ])
+const configInfo = ref({ footInfo: {} })
 // 请求
 onMounted(async () => {
   loading.value = true
@@ -94,6 +101,9 @@ const search = async () => {
     select.value = route.query.type
     selectedKeys.value = [route.query.type]
   }
+  // 基础设置
+  const result = await designStore.query({})
+  if ($checkRes(result)) configInfo.value = result.data[0] || {}
 }
 const onOpenChange = (item) => {
   select.value = item.key

+ 2 - 4
src/views/innovation/detail.vue

@@ -44,8 +44,7 @@
               <el-col :span="22" class="twoLeft">
                 <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
                   <el-tab-pane label="赛制规则" name="first"></el-tab-pane>
-                  <el-tab-pane label="数据与评测" name="second"></el-tab-pane>
-                  <el-tab-pane label="常见问题" name="third"></el-tab-pane>
+                  <el-tab-pane label="常见问题" name="second"></el-tab-pane>
                 </el-tabs>
               </el-col>
               <el-col :span="2" class="twoRight" v-if="info.match_status == '1'">
@@ -74,8 +73,7 @@
                 </el-main>
               </el-container>
             </el-row>
-            <el-row class="two_2" v-if="activeName === 'second'"> 数据与评测 </el-row>
-            <el-row class="two_2" v-if="activeName === 'third'">
+            <el-row class="two_2" v-if="activeName === 'second'">
               <div v-html="info.brief"></div>
             </el-row>
           </el-col>