瀏覽代碼

Merge branch 'developerA' into developer

yuwenjun1997 2 年之前
父節點
當前提交
20f8eb90cf

+ 1 - 1
.env.development

@@ -25,4 +25,4 @@ HOST = '192.168.1.102'
 PORT = '8888'
 PORT = '8888'
 
 
 # HTTPS flag
 # HTTPS flag
-HTTPS = false
+HTTPS = true

+ 8 - 194
apis/index.js

@@ -1,199 +1,13 @@
-/*
- * queryStringify
- * 将k-v的对象序列化转成 url?k=v&k1=v1;
- */
-const queryStringify = function (search = {}) {
-  return Object.entries(search)
-    .reduce(
-      (t, v) => `${t}${v[0]}=${encodeURIComponent(v[1])}&`,
-      Object.keys(search).length ? '?' : ''
-    )
-    .replace(/&$/, '')
-}
+import authApi from './module/auth'
+import commonApi from './module/common'
+import userApi from './module/user'
+import docApi from './module/doc'
 
 
 export default ($axios) => {
 export default ($axios) => {
-  // 订阅号用户登录
-  const customLogin = (data) =>
-    $axios.post('/wx/user/login/subscribe/verify/code', data)
-  // 订阅号用户绑定邀请码登录
-  const customLoginWithCode = (data) =>
-    $axios.post('/wx/user/login/subscribe/invitation/code', data)
-  // 服务号微信授权登录
-  const wechatLogin = (data) =>
-    $axios.post('/wx/user/login/authorization', data)
-  // 服务号微信授权绑定邀请码登录
-  const wechatLoginWithCode = (data) =>
-    $axios.post('/wx/user/login/service/invitation/code', data)
-  // 获取jssdk配置参数
-  const initWxConfig = (params = {}) =>
-    $axios.get('/wx/sdk/config/data', { params })
-  // 发送验证码
-  const sendVerifyCode = (data = {}) =>
-    $axios.post('/wx/user/login/verify/code/send', data)
-  // 获取文章列表
-  const getArticleList = (params = {}) =>
-    $axios.get('/wx/data/article/list', { params })
-  // 获取图片列表
-  const getImageList = (params = {}) =>
-    $axios.get('/wx/data/image/list', { params })
-  // 获取视频列表
-  const getVideoList = (params = {}) =>
-    $axios.get('/wx/data/video/list', { params })
-  // 获取文件列表
-  const getFileList = (params = {}) =>
-    $axios.get('/wx/data/file/list', { params })
-  // 获取文章详情
-  const getArticleDetail = (params = {}) =>
-    $axios.get('/wx/data/article/form/data', { params })
-  // 用户反馈
-  const feedback = (data = {}) => $axios.post('/wx/data/feedback/submit', data)
-  // 获取已认证机构列表
-  const getAuthClubList = (params = {}) =>
-    $axios.get('/wx/auth/club/list', { params })
-  // 获取已认证机构列表
-  const getAuthClubStarList = (params = {}) =>
-    $axios.get('/wx/auth/club/star/list', { params })
-  // 获取已认证机构详情
-  const getAuthClubDetail = (params = {}) =>
-    $axios.get('/wx/auth/club/details', { params })
-  // 获取已认证商品分类
-  const getAuthProductCateList = (params = {}) =>
-    $axios.get('/wx/auth/product/type/list', { params })
-  // 获取已认证商品列表
-  const getAuthProductList = (params = {}) =>
-    $axios.get('/wx/auth/product/list', { params })
-  // 验证token是否到期
-  const checkToken = (data = {}) =>
-    $axios.post('/wx/user/login/token/check', data)
-  // 下载文件
-  const downFile = (params = {}) => $axios.get('/wx/download/file', { params })
-  // 获取城市列表
-  const fetchCityList = (params = {}) =>
-    $axios.get('/wx/address/select', { params })
-  // 获取城市列表
-  const fetchAllCityList = () => $axios.get('/wx/address/select/all')
-  // 获取供应商信息
-  const fetchSupplierInfo = (params = {}) =>
-    $axios.get('/wx/auth/shop/info', { params })
-  // 获取医师列表
-  const fetchDoctorList = (params = {}) =>
-    $axios.get('/wx/auth/doctor/list', { params })
-  // 获取医师详情
-  const fetchDoctorDetail = (params = {}) =>
-    $axios.get('/wx/auth/doctor/details', { params })
-  // 公众号类型
-  const checkAccountType = (params = {}) =>
-    $axios.get('/wx/sdk/account/type', { params })
-  // 判断用户手机号是否绑定了机构信息
-  const fetchClubAuthInfo = (params = {}) =>
-    $axios.get('/wx/user/info', { params })
-  // 获取品牌列表
-  const fetchBrandList = (params = {}) =>
-    $axios.get('/wx/auth/shop/info/list', { params })
-  // 获取设备分类列表
-  const fetchProductSelectList = (params = {}) =>
-    $axios.get('/wx/auth/product/type/select', { params })
-  // 机构注册(全部信息注册)
-  const clubUserRegisterAll = (data = {}) =>
-    $axios.post('/wx/user/register/all', data)
-  // 机构账号注册
-  const clubUserRegister = (data = {}) =>
-    $axios.post('/wx/user/register/simple', data)
-  // 机构账号密码找回
-  const clubUserReset = (data = {}) =>
-    $axios.post('/wx/user/password/update', data)
-  // 机构账号登录
-  const clubUserLogin = (data = {}) =>
-    $axios.post('/wx/user/login/password', data)
-  // 机构账号验证码
-  const clubUserCodeSend = (data = {}) =>
-    $axios.post('/wx/user/login/code/send', data)
-  // 查询机构认证信息
-  const fetchClubAuthInfoData = (params = {}) =>
-    $axios.get('/wx/auth/form/data', { params })
-  // 查询机构认证信息
-  const authClubSave = (data = {}) => $axios.post('/wx/auth/save', data)
-  // 查询授权商品列表
-  const getClubAuthProductList = (params = {}) =>
-    $axios.get('/wx/auth/product/list', { params })
-  // 查询授权商品列表
-  const getProductDetails = (params = {}) =>
-    $axios.get('/wx/auth/product/form/data', { params })
-  // 编辑保存授权商品
-  const authProducSave = (data = {}) =>
-    $axios.post('/wx/auth/product/save', data)
-  // 高德地图api : 将坐标转化为高德地图坐标
-  const assistant = (params = {}) =>
-    fetch(
-      'https://restapi.amap.com/v3/assistant/coordinate/convert' +
-        queryStringify(params)
-    )
-  const assistantBaidu = (params = {}) =>
-    fetch('https://api.map.baidu.com/geoconv/v1' + queryStringify(params))
-
-  // 查询授权商品列表
-  const fetchProductDetails = (params = {}) =>
-    $axios.get('/wx/auth/product/details', { params })
-  // 查询授权商品列表
-  const fetchDetialBySnCode = (params = {}) =>
-    $axios.get('/wx/auth/product/info', { params })
-  
-  // 获取文件列表
-  const fetchDocsList = (params = {}) =>
-    $axios.get('/notoken/path/file', { params })
-  // 获取面包屑
-  const fetchCrumbsList = (params = {}) =>
-    $axios.get('/notoken/path/crumbs', { params })
-
-  // 获取面包屑
-  const fetchFileDetail = (params = {}) =>
-    $axios.get('/wx/data/file/detail', { params })
-
   return {
   return {
-    customLogin,
-    customLoginWithCode,
-    wechatLogin,
-    wechatLoginWithCode,
-    initWxConfig,
-    sendVerifyCode,
-    getArticleList,
-    getImageList,
-    getVideoList,
-    getFileList,
-    getArticleDetail,
-    feedback,
-    getAuthClubList,
-    getAuthClubStarList,
-    getAuthProductCateList,
-    getAuthProductList,
-    checkToken,
-    downFile,
-    fetchCityList,
-    fetchAllCityList,
-    fetchSupplierInfo,
-    getAuthClubDetail,
-    fetchDoctorList,
-    fetchDoctorDetail,
-    checkAccountType,
-    assistant,
-    fetchClubAuthInfo,
-    fetchBrandList,
-    fetchProductSelectList,
-    clubUserRegisterAll,
-    clubUserRegister,
-    clubUserReset,
-    clubUserLogin,
-    clubUserCodeSend,
-    fetchClubAuthInfoData,
-    authClubSave,
-    getClubAuthProductList,
-    getProductDetails,
-    authProducSave,
-    fetchProductDetails,
-    assistantBaidu,
-    fetchDetialBySnCode,
-    fetchDocsList,
-    fetchCrumbsList,
-    fetchFileDetail
+    ...commonApi($axios),
+    ...authApi($axios),
+    ...userApi($axios),
+    ...docApi($axios),
   }
   }
 }
 }

+ 72 - 0
apis/module/auth.js

@@ -0,0 +1,72 @@
+export default ($axios) => {
+  const authApis = {}
+  
+  // 获取已认证机构列表
+  authApis.getAuthClubList = (params = {}) =>
+    $axios.get('/wx/auth/club/list', { params })
+
+  // 获取已认证机构列表
+  authApis.getAuthClubStarList = (params = {}) =>
+    $axios.get('/wx/auth/club/star/list', { params })
+
+  // 获取已认证机构详情
+  authApis.getAuthClubDetail = (params = {}) =>
+    $axios.get('/wx/auth/club/details', { params })
+
+  // 获取已认证商品分类
+  authApis.getAuthProductCateList = (params = {}) =>
+    $axios.get('/wx/auth/product/type/list', { params })
+
+  // 获取已认证商品列表
+  authApis.getAuthProductList = (params = {}) =>
+    $axios.get('/wx/auth/product/list', { params })
+
+  // 获取供应商信息
+  authApis.fetchSupplierInfo = (params = {}) =>
+    $axios.get('/wx/auth/shop/info', { params })
+
+  // 获取医师列表
+  authApis.fetchDoctorList = (params = {}) =>
+    $axios.get('/wx/auth/doctor/list', { params })
+
+  // 获取医师详情
+  authApis.fetchDoctorDetail = (params = {}) =>
+    $axios.get('/wx/auth/doctor/details', { params })
+
+  // 获取设备分类列表
+  authApis.fetchProductSelectList = (params = {}) =>
+    $axios.get('/wx/auth/product/type/select', { params })
+
+  // 获取品牌列表
+  authApis.fetchBrandList = (params = {}) =>
+    $axios.get('/wx/auth/shop/info/list', { params })
+
+  // 查询机构认证信息
+  authApis.fetchClubAuthInfoData = (params = {}) =>
+    $axios.get('/wx/auth/form/data', { params })
+
+  // 查询机构认证信息
+  authApis.authClubSave = (data = {}) => $axios.post('/wx/auth/save', data)
+
+  // 查询授权商品列表
+  authApis.getClubAuthProductList = (params = {}) =>
+    $axios.get('/wx/auth/product/list', { params })
+
+  // 查询授权商品列表
+  authApis.getProductDetails = (params = {}) =>
+    $axios.get('/wx/auth/product/form/data', { params })
+
+  // 编辑保存授权商品
+  authApis.authProducSave = (data = {}) =>
+    $axios.post('/wx/auth/product/save', data)
+
+  // 查询授权商品列表
+  authApis.fetchProductDetails = (params = {}) =>
+    $axios.get('/wx/auth/product/details', { params })
+
+  // 查询授权商品列表
+  authApis.fetchDetialBySnCode = (params = {}) =>
+    $axios.get('/wx/auth/product/info', { params })
+
+  return authApis
+}

+ 48 - 0
apis/module/common.js

@@ -0,0 +1,48 @@
+export default ($axios) => {
+  const commonApis = {}
+
+  // 订阅号用户登录
+  commonApis.customLogin = (data) =>
+    $axios.post('/wx/user/login/subscribe/verify/code', data)
+
+  // 订阅号用户绑定邀请码登录
+  commonApis.customLoginWithCode = (data) =>
+    $axios.post('/wx/user/login/subscribe/invitation/code', data)
+
+  // 服务号微信授权登录
+  commonApis.wechatLogin = (data) =>
+    $axios.post('/wx/user/login/authorization', data)
+
+  // 服务号微信授权绑定邀请码登录
+  commonApis.wechatLoginWithCode = (data) =>
+    $axios.post('/wx/user/login/service/invitation/code', data)
+
+  // 公众号类型
+  commonApis.checkAccountType = (params = {}) =>
+    $axios.get('/wx/sdk/account/type', { params })
+
+  // 获取jssdk配置参数
+  commonApis.initWxConfig = (params = {}) =>
+    $axios.get('/wx/sdk/config/data', { params })
+
+  // 发送验证码
+  commonApis.sendVerifyCode = (data = {}) =>
+    $axios.post('/wx/user/login/verify/code/send', data)
+
+  // 用户反馈
+  commonApis.feedback = (data = {}) =>
+    $axios.post('/wx/data/feedback/submit', data)
+
+  // 验证token是否到期
+  commonApis.checkToken = (data = {}) =>
+    $axios.post('/wx/user/login/token/check', data)
+
+  // 获取城市列表(树状)
+  commonApis.fetchCityList = (params = {}) =>
+    $axios.get('/wx/address/select', { params })
+
+  // 获取城市列表(列表)
+  commonApis.fetchAllCityList = () => $axios.get('/wx/address/select/all')
+
+  return commonApis
+}

+ 41 - 0
apis/module/doc.js

@@ -0,0 +1,41 @@
+export default ($axios) => {
+  const docApis = {}
+
+  // 获取文章列表
+  docApis.getArticleList = (params = {}) =>
+    $axios.get('/wx/data/article/list', { params })
+
+  // 获取图片列表
+  docApis.getImageList = (params = {}) =>
+    $axios.get('/wx/data/image/list', { params })
+
+  // 获取视频列表
+  docApis.getVideoList = (params = {}) =>
+    $axios.get('/wx/data/video/list', { params })
+
+  // 获取文件列表
+  docApis.getFileList = (params = {}) =>
+    $axios.get('/wx/data/file/list', { params })
+
+  // 获取文章详情
+  docApis.getArticleDetail = (params = {}) =>
+    $axios.get('/wx/data/article/form/data', { params })
+
+  // 下载文件
+  docApis.downFile = (params = {}) =>
+    $axios.get('/wx/download/file', { params })
+
+  // 获取文件列表
+  docApis.fetchDocsList = (params = {}) =>
+    $axios.get('/notoken/path/file', { params })
+
+  // 获取面包屑
+  docApis.fetchCrumbsList = (params = {}) =>
+    $axios.get('/notoken/path/crumbs', { params })
+
+  // 获取面包屑
+  docApis.fetchFileDetail = (params = {}) =>
+    $axios.get('/wx/data/file/detail', { params })
+
+  return docApis
+}

+ 29 - 0
apis/module/user.js

@@ -0,0 +1,29 @@
+export default ($axios) => {
+  const userApis = {}
+
+  // 判断用户手机号是否绑定了机构信息
+  userApis.fetchClubAuthInfo = (params = {}) =>
+    $axios.get('/wx/user/info', { params })
+
+  // 机构注册(全部信息注册)
+  userApis.clubUserRegisterAll = (data = {}) =>
+    $axios.post('/wx/user/register/all', data)
+
+  // 机构账号注册
+  userApis.clubUserRegister = (data = {}) =>
+    $axios.post('/wx/user/register/simple', data)
+
+  // 机构账号密码找回
+  userApis.clubUserReset = (data = {}) =>
+    $axios.post('/wx/user/password/update', data)
+
+  // 机构账号登录
+  userApis.clubUserLogin = (data = {}) =>
+    $axios.post('/wx/user/login/password', data)
+
+  // 机构账号验证码
+  userApis.clubUserCodeSend = (data = {}) =>
+    $axios.post('/wx/user/login/code/send', data)
+
+  return userApis
+}

+ 11 - 0
assets/css/global.css

@@ -1,3 +1,14 @@
 .__nuxt-error-page svg {
 .__nuxt-error-page svg {
   display: inline-block;
   display: inline-block;
 }
 }
+
+@media screen and (min-width: 768px) {
+  ::-webkit-scrollbar {
+    width: 0;
+  }
+
+  ::-webkit-scrollbar-thumb {
+    border-radius: 2px;
+    background-color: #ddd;
+  }
+}

+ 1 - 1
configs/mode-map.js

@@ -1,4 +1,4 @@
-// 供应商白名单
+// 供应商指定模板列表
 export default [
 export default [
   {
   {
     authUserId: 10,
     authUserId: 10,

+ 0 - 27
configs/tabs.js

@@ -1,27 +0,0 @@
-export const tabs = () => [
-  {
-    id: 0,
-    path: '/database/article',
-    name: '文章',
-  },
-  {
-    id: 1,
-    path: '/database/image',
-    name: '图片',
-  },
-  {
-    id: 2,
-    path: '/database/video',
-    name: '视频',
-  },
-  {
-    id: 3,
-    path: '/database/file',
-    name: '文件',
-  },
-  {
-    id: 4,
-    path: '/database/package',
-    name: '资料包',
-  },
-]

+ 7 - 49
layouts/app-ldm.vue

@@ -34,65 +34,23 @@ export default {
     }
     }
   },
   },
   mounted() {
   mounted() {
-    this.init()
+    this.responseWidth()
+    this.initPageData()
   },
   },
   beforeDestroy() {
   beforeDestroy() {
     window.removeEventListener('resize', () => {})
     window.removeEventListener('resize', () => {})
+    this.refreshCacheData()
   },
   },
   methods: {
   methods: {
-    init() {
-      this.responseWidth()
-      this.initPageData()
-    },
     // 初始化数据页面公共数据
     // 初始化数据页面公共数据
     initPageData() {
     initPageData() {
-      // 获取供应商id
-      const authUserId = parseInt(this.$route.params.template)
-      const routePrefix = `/${authUserId}/ldm`
-      // 保存页面路由前缀
-      this.$store.commit('app/SET_ROUTE_PREFIX', routePrefix)
-      // 保存用户AppId
-      this.$store.commit('user/SET_AUTH_USER_ID', authUserId)
-
+      // this.$store.commit('app/SET_PAGE_THEME', 'app')
       // 获取用户信息
       // 获取用户信息
-      let userInfo = this.$getStorage(routePrefix, 'userInfo')
-      if (userInfo && userInfo.authUserId === authUserId) {
+      let userInfo = this.$getStorage(this.routePrefix, 'userInfo')
+      if (userInfo && userInfo.authUserId === this.authUserId) {
         this.$store.commit('user/SET_USER_INFO', userInfo)
         this.$store.commit('user/SET_USER_INFO', userInfo)
       }
       }
-      // 初始化供应商信息
-      this.fetchSupplierInfo()
-    },
-
-    // 获取供应商信息
-    async fetchSupplierInfo() {
-      try {
-        const res = await this.$http.api.fetchSupplierInfo({
-          authUserId: this.authUserId,
-        })
-        this.$store.commit('supplier/SET_SUPPLIER_INFO', res.data)
-        this.$store.commit('user/SET_APPID', res.data.appId)
-        // 如果appId存在
-        if (res.data.appId) {
-          this.checkAccountType(res.data.appId)
-        }
-      } catch (error) {
-        console.log(error)
-      } finally {
-        this.isMounted = true
-        // 清除缓存
-        this.refreshCacheData()
-      }
-    },
-
-    // 校验公众号类型
-    async checkAccountType(appId) {
-      try {
-        // 1订阅号,2服务号
-        const res = await this.$http.api.checkAccountType({ appId })
-        this.$store.commit('user/SET_ACCOUNT_TYPE', res.data)
-      } catch (error) {
-        console.log(error)
-      }
+      this.isMounted = true
     },
     },
 
 
     // 退出登录
     // 退出登录

+ 21 - 80
layouts/app-ross.vue

@@ -1,25 +1,19 @@
 <template>
 <template>
-  <div :class="themeClass">
-    <div
-      class="layout"
-      v-if="isMounted"
-      :style="{ paddingTop: showHeader ? '' : 0 }"
-    >
+  <div :class="themeClass" v-if="isMounted">
+    <div class="layout" :style="{ paddingTop: showHeader ? '' : 0 }">
       <div class="header" v-show="showHeader">
       <div class="header" v-show="showHeader">
         <div class="navbar flex justify-between items-center">
         <div class="navbar flex justify-between items-center">
           <div class="logo flex items-center" @click="backHome">
           <div class="logo flex items-center" @click="backHome">
             <img
             <img
               src="~/assets/theme-images/ross/ross-logo-f.png"
               src="~/assets/theme-images/ross/ross-logo-f.png"
-              v-if="themeName === 'ross'"
               class="ross"
               class="ross"
             />
             />
-            <img src="~/assets/theme-images/common/icon-logo.png" v-else />
             <span>认证通</span>
             <span>认证通</span>
           </div>
           </div>
           <div class="flex justify-center items-center">
           <div class="flex justify-center items-center">
             <div class="nav" v-if="isPc">
             <div class="nav" v-if="isPc">
               <template v-for="item in list">
               <template v-for="item in list">
-                <div class="link" :key="item.id" @click="toDetail(item)">
+                <div class="link" :key="item.id" @click="onJumpTo(item)">
                   <span class="icon" :class="item.icon"></span>
                   <span class="icon" :class="item.icon"></span>
                   <span class="text">{{ item.name }}</span>
                   <span class="text">{{ item.name }}</span>
                 </div>
                 </div>
@@ -80,7 +74,7 @@
       <el-drawer :visible.sync="drawer" size="63%">
       <el-drawer :visible.sync="drawer" size="63%">
         <div class="nav">
         <div class="nav">
           <template v-for="item in list">
           <template v-for="item in list">
-            <div class="link" :key="item.id" @click="toDetail(item)">
+            <div class="link" :key="item.id" @click="onJumpTo(item)">
               <span class="icon" :class="item.icon"></span>
               <span class="icon" :class="item.icon"></span>
               <span class="text">{{ item.name }}</span>
               <span class="text">{{ item.name }}</span>
             </div>
             </div>
@@ -93,8 +87,6 @@
 
 
 <script>
 <script>
 import { mapGetters } from 'vuex'
 import { mapGetters } from 'vuex'
-import { isWeChat } from '~/utils/validator'
-import { toAuthorization } from '~/utils'
 export default {
 export default {
   computed: {
   computed: {
     ...mapGetters([
     ...mapGetters([
@@ -102,7 +94,6 @@ export default {
       'accessToken',
       'accessToken',
       'authUserId',
       'authUserId',
       'appId',
       'appId',
-      'accountType',
       'routePrefix',
       'routePrefix',
       'themeName',
       'themeName',
       'isPc',
       'isPc',
@@ -127,9 +118,9 @@ export default {
   },
   },
   data() {
   data() {
     return {
     return {
-      isMounted: false,
       formType: 'login',
       formType: 'login',
       drawer: false,
       drawer: false,
+      isMounted: false,
       list: [
       list: [
         {
         {
           id: 1,
           id: 1,
@@ -153,14 +144,17 @@ export default {
     }
     }
   },
   },
   mounted() {
   mounted() {
-    this.init()
-    console.log(1)
+    this.responseWidth()
+    this.initPageData()
+    // this.checkAccountType()
   },
   },
   beforeDestroy() {
   beforeDestroy() {
     window.removeEventListener('resize', () => {})
     window.removeEventListener('resize', () => {})
+    this.refreshCacheData()
   },
   },
   methods: {
   methods: {
-    toDetail(item) {
+    // 跳转
+    onJumpTo(item) {
       this.drawer = false
       this.drawer = false
       const hasLogin = this.$store.getters.accessToken
       const hasLogin = this.$store.getters.accessToken
       // 保存登录重定向路由
       // 保存登录重定向路由
@@ -170,14 +164,6 @@ export default {
         this.routePrefix + item.path
         this.routePrefix + item.path
       )
       )
       if (item.id > 2 && !hasLogin) {
       if (item.id > 2 && !hasLogin) {
-        // 在微信浏览器中使用微信授权登录
-        if (isWeChat() && this.appId && this.accountType === 2) {
-          const payload = {
-            authUserId: this.authUserId,
-            routePrefix: this.routePrefix,
-          }
-          return toAuthorization(this.appId, payload)
-        }
         this.$toast({ message: '请先登录', duration: 1000 })
         this.$toast({ message: '请先登录', duration: 1000 })
         this.formType = 'login'
         this.formType = 'login'
         this.$store.commit('app/SHOW_LOGIN')
         this.$store.commit('app/SHOW_LOGIN')
@@ -193,94 +179,49 @@ export default {
       }
       }
     },
     },
 
 
+    // 点击登录
     onLoginClick(type) {
     onLoginClick(type) {
       this.formType = type
       this.formType = type
     },
     },
 
 
-    init() {
-      this.responseWidth()
-      this.initPageData()
-    },
     // 初始化数据页面公共数据
     // 初始化数据页面公共数据
     initPageData() {
     initPageData() {
-      // 获取供应商id
-      const authUserId = parseInt(this.$route.params.template)
-      const routePrefix = `/${authUserId}/ross`
-      // 保存页面路由前缀
-      this.$store.commit('app/SET_ROUTE_PREFIX', routePrefix)
-      // 保存用户AppId
-      this.$store.commit('user/SET_AUTH_USER_ID', authUserId)
-
-      // 设置页面主题12
-      // if (authUserId === parseInt(12)) {
-      //   this.$store.commit('app/SET_PAGE_THEME', 'ross')
-      // }
       this.$store.commit('app/SET_PAGE_THEME', 'ross')
       this.$store.commit('app/SET_PAGE_THEME', 'ross')
-
       // 获取用户信息
       // 获取用户信息
-      let userInfo = this.$getStorage(routePrefix, 'userInfo')
-      if (userInfo && userInfo.authUserId === authUserId) {
+      let userInfo = this.$getStorage(this.routePrefix, 'userInfo')
+      if (userInfo && userInfo.authUserId === this.authUserId) {
         this.$store.commit('user/SET_USER_INFO', userInfo)
         this.$store.commit('user/SET_USER_INFO', userInfo)
       }
       }
-      // 初始化供应商信息
-      this.fetchSupplierInfo()
-    },
-
-    // 获取供应商信息
-    async fetchSupplierInfo() {
-      try {
-        const res = await this.$http.api.fetchSupplierInfo({
-          authUserId: this.authUserId,
-        })
-        this.$store.commit('supplier/SET_SUPPLIER_INFO', res.data)
-        this.$store.commit('user/SET_APPID', res.data.appId)
-        // 如果appId存在
-        if (res.data.appId) {
-          this.checkAccountType(res.data.appId)
-        }
-      } catch (error) {
-        console.log(error)
-      } finally {
-        this.isMounted = true
-        // 清除缓存
-        this.refreshCacheData()
-      }
+      this.isMounted = true
     },
     },
 
 
     // 校验公众号类型
     // 校验公众号类型
-    async checkAccountType(appId) {
+    async checkAccountType() {
       try {
       try {
         // 1订阅号,2服务号
         // 1订阅号,2服务号
-        const res = await this.$http.api.checkAccountType({ appId })
-        this.$store.commit('user/SET_ACCOUNT_TYPE', res.data)
+        if (!this.appId) return
+        const res = await this.$http.api.checkAccountType({ appId: this.appId })
+        this.$store.commit('supplier/SET_ACCOUNT_TYPE', res.data)
       } catch (error) {
       } catch (error) {
         console.log(error)
         console.log(error)
       }
       }
     },
     },
 
 
+    // 登录
     onLogin() {
     onLogin() {
-      // 在微信浏览器中使用微信授权登录
-      if (isWeChat() && this.appId && this.accountType === 2) {
-        const payload = {
-          authUserId: this.authUserId,
-          routePrefix: this.routePrefix,
-        }
-        return toAuthorization(this.appId, payload)
-      }
       this.formType = 'login'
       this.formType = 'login'
       this.$store.commit('app/SHOW_LOGIN')
       this.$store.commit('app/SHOW_LOGIN')
     },
     },
 
 
+    // 注册
     onRegister() {
     onRegister() {
       this.formType = 'register'
       this.formType = 'register'
-      console.log(this.formType)
       this.$store.commit('app/SHOW_LOGIN')
       this.$store.commit('app/SHOW_LOGIN')
     },
     },
 
 
     // 退出登录
     // 退出登录
     logout() {
     logout() {
       this.$store.dispatch('user/logout')
       this.$store.dispatch('user/logout')
-      console.log(this.routePrefix)
       this.$removeStorage(this.routePrefix, 'userInfo')
       this.$removeStorage(this.routePrefix, 'userInfo')
       this.backHome()
       this.backHome()
     },
     },

+ 52 - 78
layouts/app.vue

@@ -1,19 +1,10 @@
 <template>
 <template>
-  <div :class="themeClass">
-    <div
-      class="layout"
-      v-if="isMounted"
-      :style="{ paddingTop: showHeader ? '' : 0 }"
-    >
+  <div :class="themeClass" v-if="isMounted">
+    <div class="layout" :style="{ paddingTop: showHeader ? '' : 0 }">
       <div class="header" v-show="showHeader">
       <div class="header" v-show="showHeader">
         <div class="navbar flex justify-between items-center">
         <div class="navbar flex justify-between items-center">
           <div class="logo flex items-center" @click="backHome">
           <div class="logo flex items-center" @click="backHome">
-            <img
-              src="~/assets/theme-images/ross/ross-logo-f.png"
-              v-if="themeName === 'ross'"
-              class="ross"
-            />
-            <img src="~/assets/theme-images/common/icon-logo.png" v-else />
+            <img src="~/assets/theme-images/common/icon-logo.png" />
             <span>认证通</span>
             <span>认证通</span>
           </div>
           </div>
           <div class="user-info">
           <div class="user-info">
@@ -54,8 +45,6 @@
 
 
 <script>
 <script>
 import { mapGetters } from 'vuex'
 import { mapGetters } from 'vuex'
-import { isWeChat } from '~/utils/validator'
-import { toAuthorization } from '~/utils'
 export default {
 export default {
   computed: {
   computed: {
     ...mapGetters([
     ...mapGetters([
@@ -63,9 +52,9 @@ export default {
       'accessToken',
       'accessToken',
       'authUserId',
       'authUserId',
       'appId',
       'appId',
-      'accountType',
       'routePrefix',
       'routePrefix',
       'themeName',
       'themeName',
+      'isPc',
       'showHeader',
       'showHeader',
       'showFooter',
       'showFooter',
       'supplierInfo',
       'supplierInfo',
@@ -74,112 +63,97 @@ export default {
       return `theme-${this.themeName}`
       return `theme-${this.themeName}`
     },
     },
   },
   },
-  // head(context) {
-  //   return {
-  //     link: [{ rel: 'icon', type: 'image/x-icon', href: context.themeName === 'ross' ? '' : '/favicon.ico' }],
-  //   }
-  // },
+  head() {
+    return {
+      meta: [
+        {
+          name: 'viewport',
+          content:
+            'width=device-width,initial-scale=1.0,minimum-scale=1.0, maximum-scale=1.0, user-scalable=no',
+        },
+      ],
+    }
+  },
   data() {
   data() {
     return {
     return {
-      isMounted: false,
       formType: 'login',
       formType: 'login',
+      drawer: false,
+      isMounted: false,
+      list: [
+        {
+          id: 1,
+          name: '授权申请',
+          path: '/form/club-register',
+          icon: 'icon-register',
+        },
+        {
+          id: 2,
+          name: '产品资料',
+          path: '/docs/0',
+          icon: 'icon-doc',
+        },
+        {
+          id: 3,
+          name: '意见反馈',
+          path: '/feedback',
+          icon: 'icon-feedback',
+        },
+      ],
     }
     }
   },
   },
   mounted() {
   mounted() {
-    this.init()
-    console.log(1)
+    this.responseWidth()
+    this.initPageData()
+    // this.checkAccountType()
   },
   },
   beforeDestroy() {
   beforeDestroy() {
     window.removeEventListener('resize', () => {})
     window.removeEventListener('resize', () => {})
+    this.refreshCacheData()
   },
   },
   methods: {
   methods: {
+    // 点击登录
     onLoginClick(type) {
     onLoginClick(type) {
       this.formType = type
       this.formType = type
     },
     },
 
 
-    init() {
-      this.responseWidth()
-      this.initPageData()
-    },
     // 初始化数据页面公共数据
     // 初始化数据页面公共数据
     initPageData() {
     initPageData() {
-      // 获取供应商id
-      const authUserId = parseInt(this.$route.params.template)
-      const routePrefix = `/${authUserId}/app`
-      // 保存页面路由前缀
-      this.$store.commit('app/SET_ROUTE_PREFIX', routePrefix)
-      // 保存用户AppId
-      this.$store.commit('user/SET_AUTH_USER_ID', authUserId)
-
-      // 设置页面主题
-      // if (authUserId === parseInt(12)) {
-      //   this.$store.commit('app/SET_PAGE_THEME', 'ross')
-      // }
-
+      // this.$store.commit('app/SET_PAGE_THEME', 'app')
       // 获取用户信息
       // 获取用户信息
-      let userInfo = this.$getStorage(routePrefix, 'userInfo')
-      if (userInfo && userInfo.authUserId === authUserId) {
+      let userInfo = this.$getStorage(this.routePrefix, 'userInfo')
+      if (userInfo && userInfo.authUserId === this.authUserId) {
         this.$store.commit('user/SET_USER_INFO', userInfo)
         this.$store.commit('user/SET_USER_INFO', userInfo)
       }
       }
-      // 初始化供应商信息
-      this.fetchSupplierInfo()
-    },
-
-    // 获取供应商信息
-    async fetchSupplierInfo() {
-      try {
-        const res = await this.$http.api.fetchSupplierInfo({
-          authUserId: this.authUserId,
-        })
-        this.$store.commit('supplier/SET_SUPPLIER_INFO', res.data)
-        this.$store.commit('user/SET_APPID', res.data.appId)
-        // 如果appId存在
-        if (res.data.appId) {
-          this.checkAccountType(res.data.appId)
-        }
-      } catch (error) {
-        console.log(error)
-      } finally {
-        this.isMounted = true
-        // 清除缓存
-        this.refreshCacheData()
-      }
+      this.isMounted = true
     },
     },
 
 
     // 校验公众号类型
     // 校验公众号类型
-    async checkAccountType(appId) {
+    async checkAccountType() {
       try {
       try {
         // 1订阅号,2服务号
         // 1订阅号,2服务号
-        const res = await this.$http.api.checkAccountType({ appId })
-        this.$store.commit('user/SET_ACCOUNT_TYPE', res.data)
+        if (!this.appId) return
+        const res = await this.$http.api.checkAccountType({ appId: this.appId })
+        this.$store.commit('supplier/SET_ACCOUNT_TYPE', res.data)
       } catch (error) {
       } catch (error) {
         console.log(error)
         console.log(error)
       }
       }
     },
     },
 
 
+    // 登录
     onLogin() {
     onLogin() {
-      // 在微信浏览器中使用微信授权登录
-      if (isWeChat() && this.appId && this.accountType === 2) {
-        const payload = {
-          authUserId: this.authUserId,
-          routePrefix: this.routePrefix,
-        }
-        return toAuthorization(this.appId, payload)
-      }
       this.formType = 'login'
       this.formType = 'login'
       this.$store.commit('app/SHOW_LOGIN')
       this.$store.commit('app/SHOW_LOGIN')
     },
     },
 
 
+    // 注册
     onRegister() {
     onRegister() {
       this.formType = 'register'
       this.formType = 'register'
-      console.log(this.formType)
       this.$store.commit('app/SHOW_LOGIN')
       this.$store.commit('app/SHOW_LOGIN')
     },
     },
 
 
     // 退出登录
     // 退出登录
     logout() {
     logout() {
       this.$store.dispatch('user/logout')
       this.$store.dispatch('user/logout')
-      console.log(this.routePrefix)
       this.$removeStorage(this.routePrefix, 'userInfo')
       this.$removeStorage(this.routePrefix, 'userInfo')
       this.backHome()
       this.backHome()
     },
     },

+ 0 - 116
middleware/auth.js

@@ -1,116 +0,0 @@
-import axios from 'axios'
-import oldRoutes from '@/utils/old-routes'
-import { getQueryObject } from '~/utils'
-import modeMap from '~/configs/mode-map'
-const templateList = ['app', 'ross', 'ldm']
-const baseURL = process.env.BASE_URL + '/wx/auth/shop/info'
-const dev = process.env.NODE_ENV
-
-// 获取供应商信息1 通过authUserId获取
-function fetchSupplierInfo(params) {
-  return axios.get(baseURL, { params })
-}
-
-// 旧链接初始化
-function oldLinkInit({ route, error, redirect }) {
-  return new Promise((resolve, reject) => {
-    let hash = route.hash
-    const query = getQueryObject(hash)
-    const appId = query.appId
-    const index = hash.indexOf('?')
-    hash = hash.slice(1, index)
-    const oldRoute = oldRoutes.find((item) => hash === item.path)
-    if (!oldRoute) {
-      error({ statusCode: 404, message: '页面不存在' })
-      reject()
-    }
-    fetchSupplierInfo({ appId })
-      .then(({ data }) => {
-        const res = data
-        if (res.code === -1) {
-          error({ statusCode: 404, message: '页面不存在' })
-        }
-        const path = `/${data.authUserId}` + oldRoute.redirect
-        redirect(path)
-        resolve()
-      })
-      .catch(() => {
-        error({ statusCode: 404, message: '页面不存在' })
-        resolve()
-      })
-  })
-}
-
-// 新链接初始化
-function newLinkInit({ route, error, redirect }) {
-  return new Promise((resolve) => {
-    const authUserId = parseInt(route.params.template)
-    const mode = modeMap.find((mode) => mode.authUserId === authUserId)
-    const prefixPath_app = `/${authUserId}/app`
-    fetchSupplierInfo({ authUserId })
-      .then(({ data }) => {
-        if (dev === 'production') {
-          const res = data
-          const prefix = res.data.prefix
-          const prefixPath = `/${authUserId}/${prefix}`
-          // 获取供应商失败
-          if (res.code === -1) {
-            error({ statusCode: 404, message: '页面不存在' })
-          }
-          // 没有指定模板 && 模板不存在 && 不是app默认模板路由地址
-          else if (
-            !mode &&
-            !templateList.includes(prefix) &&
-            !route.fullPath.startsWith(prefixPath_app)
-          ) {
-            if (!route.fullPath.startsWith(prefixPath)) {
-              error({ statusCode: 404, message: '页面不存在' })
-            } else {
-              const redirectPath = route.fullPath.replace(
-                prefixPath,
-                prefixPath_app
-              )
-              redirect(redirectPath)
-            }
-          }
-          // 没有指定模板 && 是app默认模板路由地址
-          else if (!mode && route.fullPath.startsWith(prefixPath_app)) {
-          }
-          // 模板未定义
-          else if (!templateList.includes(prefix)) {
-            error({ statusCode: 404, message: '页面不存在' })
-          }
-          // 模板与供应商不匹配
-          else if (!route.fullPath.startsWith(prefixPath)) {
-            error({ statusCode: 404, message: '页面不存在' })
-          }
-        }
-        resolve()
-      })
-      .catch((err) => {
-        error({ statusCode: 404, message: '页面不存在' })
-        resolve(err)
-      })
-  })
-}
-
-// 公共页页面入口
-function publickLinkInit({ route, error, redirect }) {
-  const whiteList = ['/download']
-  return new Promise((resovle) => {
-    if (whiteList.indexOf(route.path) === -1) {
-      error({ statusCode: 404, message: '页面不存在' })
-    }
-    resovle()
-  })
-}
-
-export default function (context) {
-  let hash = context.route.hash
-  const query = getQueryObject(hash)
-  const appId = query.appId
-  if (appId) return oldLinkInit(context) // 老连接适配
-  const authUserId = parseInt(context.route.params.template)
-  if (authUserId) return newLinkInit(context) // 模板入口页面
-  return publickLinkInit(context) // 公共页页面入口
-}

+ 106 - 0
middleware/intercept.js

@@ -0,0 +1,106 @@
+import modeMap from '~/configs/mode-map'
+const dev = process.env.EVN
+
+// 是否是公共页面入口
+function isPublicEntry(name) {
+  return /^public-.+$/gi.test(name)
+}
+
+// 是否是模板页面入口
+function isTemplateEntry(name) {
+  return /^template-.+$/gi.test(name)
+}
+
+// 错误信息
+function showError(error, options) {
+  return error({
+    statusCode: options.statusCode || 500,
+    message:
+      (dev === 'production' ? '页面不存在' : options.message) || '页面不存在',
+  })
+}
+
+// 供应商与模板匹配
+function isMatchTemplate(authUserId, prefix) {
+  const mode = modeMap.find((item) => item.authUserId == authUserId)
+  return mode && mode.prefix === prefix
+}
+
+// 供应商是否存在指定模板
+function isFixedTemplate(authUserId) {
+  const mode = modeMap.find((item) => item.authUserId == authUserId)
+  return mode && true
+}
+
+// 修改路由
+function replaceFullPath(fullPath) {
+  return fullPath.replace(/^(\/\d+\/)([a-z]+)(.*)/gi, (match, $1, $2, $3) => {
+    return $1 + 'app' + $3
+  })
+}
+
+// 初始化页面信息
+function initPageData(store, data) {
+  // 保存页面路由前缀
+  store.commit('app/SET_ROUTE_PREFIX', `/${data.authUserId}/${data.prefix}`)
+  // 保存供应商信息
+  store.commit('supplier/SET_SUPPLIER_INFO', data)
+}
+
+// 从模板入口进入
+async function initTemplateEntry(context) {
+  const { route, $http, error, store, redirect } = context
+  try {
+    // 模板不存在
+    let authUserId = parseInt(route.params.template)
+    if (!authUserId) {
+      showError(error, { statusCode: 500, message: '页面不存在' })
+      return
+    }
+    const res = await $http.api.fetchSupplierInfo({ authUserId })
+    const prefix = route.name.split('-')[1]
+
+    // 未匹配模板
+    if (prefix === 'mode') {
+      const redirectPath = replaceFullPath(route.fullPath)
+      redirect(redirectPath)
+      return
+    }
+
+    // 默认模板
+    if (prefix === 'app') {
+      if (isFixedTemplate(authUserId)) {
+        showError(error, { statusCode: 500, message: '模板与供应商不匹配' })
+        return
+      }
+    }
+
+    // 非默认模板
+    if (['ross', 'ldm'].includes(prefix)) {
+      // 供应商为指定模板
+      if (!isMatchTemplate(authUserId, prefix)) {
+        showError(error, { statusCode: 500, message: '模板与供应商不匹配' })
+        return
+      }
+    }
+
+    res.data.prefix = prefix
+
+    // console.log(res.data)
+    initPageData(store, res.data)
+  } catch (err) {
+    console.log(err)
+    showError(error, { statusCode: 500, message: err.message || err.msg })
+  }
+}
+
+// 公共入口进入
+// async function initPublicEntry(context) {}
+
+export default function (context) {
+  const name = context.route.name
+  // console.log(name)
+  if (isPublicEntry(name)) return // initPublicEntry(context)
+  if (isTemplateEntry(name)) return initTemplateEntry(context)
+  context.error({ statusCode: 404, message: '页面不存在' })
+}

+ 7 - 3
mixins/clubList.js

@@ -5,6 +5,7 @@ import { drawLogo, debounce } from '@/utils'
 export default {
 export default {
   data() {
   data() {
     return {
     return {
+      active: false,
       isRequest: false, // 是否发起请求
       isRequest: false, // 是否发起请求
       finished: true, // 列表加载是否完毕(加载完了所有数据)
       finished: true, // 列表加载是否完毕(加载完了所有数据)
       loadingMore: false, // 是否正在加载
       loadingMore: false, // 是否正在加载
@@ -51,10 +52,13 @@ export default {
         duration: 0,
         duration: 0,
       })
       })
       try {
       try {
-        const resLocation = await geolocation()
-        this.listQuery.lngAndLat = `${resLocation.position.lng},${resLocation.position.lat}`
+        if (process.env.HTTPS === 'true' || true) {
+          const resLocation = await geolocation()
+          this.listQuery.lngAndLat = `${resLocation.position.lng},${resLocation.position.lat}`
+        }
       } catch (error) {
       } catch (error) {
-        this.$toast('获取定位信息失败')
+        // this.$toast('获取定位信息失败')
+        console.log(error)
       } finally {
       } finally {
         this.filterClubList()
         this.filterClubList()
       }
       }

+ 2 - 2
nuxt.config.js

@@ -5,7 +5,7 @@ console.log(process.env.BASE_URL)
 
 
 export default {
 export default {
   router: {
   router: {
-    middleware: 'auth',
+    middleware: ['intercept'],
   },
   },
 
 
   // Global page headers: https://go.nuxtjs.dev/config-head
   // Global page headers: https://go.nuxtjs.dev/config-head
@@ -46,7 +46,7 @@ export default {
     'swiper/css/swiper.css',
     'swiper/css/swiper.css',
     'animate.css/animate.min.css',
     'animate.css/animate.min.css',
     '~/assets/css/global.css',
     '~/assets/css/global.css',
-    'three-dots/dist/three-dots.min.css'
+    'three-dots/dist/three-dots.min.css',
   ],
   ],
 
 
   // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
   // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins

+ 0 - 3
pages/_template/_.vue

@@ -1,3 +0,0 @@
-<template>
-  <div></div>
-</template>

+ 1 - 0
pages/_template/_mode.vue

@@ -0,0 +1 @@
+<template></template>

+ 2 - 2
pages/_template/app/approve/index.vue

@@ -31,7 +31,7 @@ export default {
     }
     }
   },
   },
   computed: {
   computed: {
-    ...mapGetters(['supplierInfo', 'routePrefix', 'themeName']),
+    ...mapGetters(['supplierInfo', 'routePrefix']),
   },
   },
   created() {
   created() {
     this.list = this.generateList()
     this.list = this.generateList()
@@ -51,7 +51,7 @@ export default {
         },
         },
         {
         {
           id: 3,
           id: 3,
-          name: this.themeName === 'ross' ? '体疗师认证' : '医师认证',
+          name: '医师认证',
           path: '/approve/personnel/operate',
           path: '/approve/personnel/operate',
         },
         },
       ]
       ]

+ 4 - 4
pages/_template/ldm/approve/club/index.vue

@@ -14,7 +14,7 @@
           <input
           <input
             type="text"
             type="text"
             placeholder="搜索店铺"
             placeholder="搜索店铺"
-            v-model="listQuery.clubName"
+            v-model="listQuery.authParty"
             @keyup.enter="onSearch"
             @keyup.enter="onSearch"
           />
           />
         </div>
         </div>
@@ -38,9 +38,9 @@
             :key="item.authId"
             :key="item.authId"
             @click="toDetail(item)"
             @click="toDetail(item)"
           >
           >
-            <img class="cover" :src="item.logo || drawLogo(item.clubName)" />
+            <img class="cover" :src="item.logo || drawLogo(item.authParty)" />
             <div class="info">
             <div class="info">
-              <div class="name" v-text="item.clubName"></div>
+              <div class="name" v-text="item.authParty"></div>
               <div class="line"></div>
               <div class="line"></div>
               <div class="mobile">{{ item.mobile || '暂无' }}</div>
               <div class="mobile">{{ item.mobile || '暂无' }}</div>
               <div class="address">
               <div class="address">
@@ -76,7 +76,7 @@ export default {
       listQuery: {
       listQuery: {
         authUserId: '',
         authUserId: '',
         lngAndLat: '',
         lngAndLat: '',
-        clubName: '',
+        authParty: '',
         provinceId: '',
         provinceId: '',
         cityId: '',
         cityId: '',
         townId: '',
         townId: '',

+ 0 - 195
pages/auth/index.vue

@@ -1,195 +0,0 @@
-<template>
-  <div class="auth-page" v-if="showBind">
-    <div class="form p-4">
-      <div class="form-item mb-4">
-        <input type="text" placeholder="手机号" v-model="formData.mobile" />
-      </div>
-      <div class="form-item mb-4 code">
-        <input
-          type="text"
-          placeholder="验证码"
-          class="code"
-          v-model="formData.verifyCode"
-        />
-        <span class="send" @click="onSend">{{ sendCodeBtnText }}</span>
-      </div>
-      <div class="submit" @click="onSubmit">登录</div>
-    </div>
-  </div>
-</template>
-
-<script>
-import { isMobile } from '@/utils/validator'
-export default {
-  data() {
-    return {
-      showBind: false,
-      sendStatus: 0,
-      formData: {
-        authUserId: '',
-        appId: '',
-        openId: '',
-        accessToken: '',
-        mobile: '',
-        verifyCode: '',
-      },
-      redirectPath: '',
-      code: '',
-    }
-  },
-  computed: {
-    sendCodeBtnText() {
-      return this.sendStatus === 0
-        ? '发送验证码'
-        : `再次发送${this.sendStatus}s`
-    },
-  },
-  mounted() {
-    this.initData()
-  },
-  beforeDestroy() {
-    this.$removeStorage(this.redirectPath, 'login_redicret')
-  },
-  methods: {
-    // 初始化数据
-    initData() {
-      // 获取链接参数
-      const { code, type, authUserId, appId } = this.$route.query
-      this.code = code
-      this.formData.appId = appId
-      this.formData.authUserId = parseInt(authUserId)
-      this.redirectPath = `/${authUserId}/${type}`
-      // 保存页面路由前缀
-      this.$store.commit('app/SET_ROUTE_PREFIX', this.redirectPath)
-      // 保存用户AppId
-      this.$store.commit('user/SET_AUTH_USER_ID', this.formData.authUserId)
-      // 尝试微信授权自动登录
-      this.autoLogin()
-    },
-
-    // 绑定并登录
-    async onSubmit() {
-      try {
-        const res = await this.$http.api.wechatLoginWithCode(this.formData)
-        this.loginSuccess(res)
-      } catch (error) {
-        console.log(error)
-      }
-    },
-
-    loginSuccess(res) {
-      this.$toast('登录成功')
-      this.$store.dispatch('user/login', res.data)
-      this.$setStorage(this.redirectPath, 'userInfo', res.data)
-      // 重定向
-      const login_redicret = this.$getStorage(
-        this.redirectPath,
-        'login_redicret'
-      )
-      if (login_redicret && login_redicret !== this.$route.path) {
-        this.$router.push(login_redicret)
-      } else {
-        this.$router.push(this.redirectPath)
-      }
-    },
-
-    // 发送验证码
-    async onSend() {
-      if (this.sendStatus > 0) return
-      // 验证手机号是否合法
-      if (!isMobile(this.formData.mobile)) {
-        this.$toast('请输入正确的手机号')
-        return
-      }
-      try {
-        // 发送验证码
-        const res = await this.$http.api.sendVerifyCode({
-          mobile: this.formData.mobile,
-          authUserId: this.formData.authUserId,
-          type: 1,
-        })
-        this.$toast('验证码已发送')
-        // 开启倒计时
-        this.countdown()
-      } catch (error) {
-        console.log(error)
-      }
-    },
-
-    // 短信倒计时
-    countdown() {
-      this.sendStatus = 30
-      this.timer = setInterval(() => {
-        if (this.sendStatus === 0) {
-          clearInterval(this.timer)
-          return
-        }
-        this.sendStatus--
-      }, 1000)
-    },
-
-    // 微信授权登录
-    async autoLogin() {
-      try {
-        const res = await this.$http.api.wechatLogin({
-          code: this.code,
-          appId: this.formData.appId,
-        })
-        this.loginSuccess(res)
-      } catch (error) {
-        // 未绑定微信号
-        if (error.code === -2) {
-          this.$toast('未绑定手机号')
-          this.showBind = true
-          this.formData.openId = error.data.openId
-          this.formData.accessToken = error.data.accessToken
-        } else {
-          this.$toast('登陆失败请重试')
-          // 其他错误跳转首页
-          setTimeout(() => {
-            this.$router.push(this.redirectPath)
-          }, 1000)
-        }
-      }
-    },
-  },
-}
-</script>
-
-<style scoped lang="scss">
-.auth-page {
-  .form {
-    .form-item {
-      position: relative;
-      border-bottom: 0.1vw solid #d8d8d8;
-      input {
-        display: block;
-        width: 100%;
-        font-size: 4.2vw;
-        line-height: 10vw;
-      }
-
-      .send {
-        position: absolute;
-        right: 2.4vw;
-        top: 50%;
-        transform: translateY(-50%);
-        font-size: 3.4vw;
-        @include themify($themes) {
-          color: themed('color');
-        }
-      }
-    }
-
-    .submit {
-      @include themify($themes) {
-        background: themed('color');
-      }
-      font-size: 3.2vw;
-      color: #fff;
-      text-align: center;
-      line-height: 10vw;
-    }
-  }
-}
-</style>

+ 3 - 1
pages/download/index.vue → pages/public/download/index.vue

@@ -23,7 +23,7 @@ export default {
       timer: null,
       timer: null,
       time: 0,
       time: 0,
       isRequest: false,
       isRequest: false,
-      success: false
+      success: false,
     }
     }
   },
   },
   computed: {
   computed: {
@@ -39,6 +39,8 @@ export default {
   methods: {
   methods: {
     async init() {
     async init() {
       try {
       try {
+        const state = this.$route.query.state
+        if (!state) return
         // 获取参数
         // 获取参数
         const query = JSON.parse(decrypt(this.$route.query.state))
         const query = JSON.parse(decrypt(this.$route.query.state))
         this.query = query
         this.query = query

+ 0 - 1
plugins/axios.js

@@ -2,7 +2,6 @@
 import initApi from '@/apis/index'
 import initApi from '@/apis/index'
 import Vue from 'vue'
 import Vue from 'vue'
 import { Dialog, Toast } from 'vant'
 import { Dialog, Toast } from 'vant'
-// import {} from ''
 
 
 export default function (context) {
 export default function (context) {
   const { $axios, redirect, store } = context
   const { $axios, redirect, store } = context

+ 5 - 5
store/getters.js

@@ -11,12 +11,12 @@ export default {
   showFooter: (state) => state.app.showFooter,
   showFooter: (state) => state.app.showFooter,
   // 用户相关
   // 用户相关
   userInfo: (state) => state.user.userInfo,
   userInfo: (state) => state.user.userInfo,
-  authUserId: (state) => state.user.authUserId,
-  authId: (state) => state.user.authId,
-  accessToken: (state) => state.user.accessToken,
-  appId: (state) => state.user.appId,
+  authId: (state) => state.user.userInfo.authId,
+  accessToken: (state) => state.user.userInfo.accessToken,
+  clubUserId: (state) => state.user.userInfo.clubUserId,
   accountType: (state) => state.user.accountType,
   accountType: (state) => state.user.accountType,
-  clubUserId: (state) => state.user.clubUserId,
   // 供应商相关
   // 供应商相关
   supplierInfo: (state) => state.supplier.supplierInfo,
   supplierInfo: (state) => state.supplier.supplierInfo,
+  authUserId: (state) => state.supplier.supplierInfo.authUserId,
+  appId: (state) => state.supplier.supplierInfo.appId,
 }
 }

+ 5 - 0
store/supplier.js

@@ -1,11 +1,16 @@
 const state = () => ({
 const state = () => ({
   supplierInfo: {},
   supplierInfo: {},
+  accountType: '',
 })
 })
 
 
 const mutations = {
 const mutations = {
   SET_SUPPLIER_INFO(state, supplierInfo) {
   SET_SUPPLIER_INFO(state, supplierInfo) {
     state.supplierInfo = supplierInfo
     state.supplierInfo = supplierInfo
   },
   },
+  // 微信公众号状态
+  SET_ACCOUNT_TYPE(state, accountType) {
+    state.accountType = accountType
+  },
 }
 }
 
 
 const actions = {}
 const actions = {}

+ 0 - 21
store/user.js

@@ -1,32 +1,11 @@
 const state = () => ({
 const state = () => ({
-  authUserId: '',
   userInfo: {},
   userInfo: {},
-  accessToken: '',
-  appId: '',
-  accountType: '',
-  clubUserId: '',
-  authId: '',
 })
 })
 
 
 const mutations = {
 const mutations = {
   // 设置用户信息
   // 设置用户信息
   SET_USER_INFO(state, data) {
   SET_USER_INFO(state, data) {
     state.userInfo = data
     state.userInfo = data
-    state.clubUserId = data.clubUserId
-    state.authId = data.authId
-    state.accessToken = data.accessToken
-  },
-  // 设置appId
-  SET_APPID(state, appId) {
-    state.appId = appId
-  },
-  // 设置供应商id
-  SET_AUTH_USER_ID(state, authUserId) {
-    state.authUserId = authUserId
-  },
-  // 微信公众号状态
-  SET_ACCOUNT_TYPE(state, accountType) {
-    state.accountType = accountType
   },
   },
 }
 }
 
 

+ 5 - 3
utils/clipboard.js

@@ -2,23 +2,25 @@ import Vue from 'vue'
 import Clipboard from 'clipboard'
 import Clipboard from 'clipboard'
 
 
 function clipboardSuccess(message) {
 function clipboardSuccess(message) {
+  if (!message) return
   Vue.prototype.$toast({
   Vue.prototype.$toast({
     message,
     message,
     type: 'success',
     type: 'success',
-    duration: 1500
+    duration: 1500,
   })
   })
 }
 }
 
 
 function clipboardError(message) {
 function clipboardError(message) {
+  if (!message) return
   Vue.prototype.$toast({
   Vue.prototype.$toast({
     message: '复制失败',
     message: '复制失败',
-    type: 'fail'
+    type: 'fail',
   })
   })
 }
 }
 
 
 export default function handleClipboard(text, event, message) {
 export default function handleClipboard(text, event, message) {
   const clipboard = new Clipboard(event.target, {
   const clipboard = new Clipboard(event.target, {
-    text: () => text
+    text: () => text,
   })
   })
   clipboard.on('success', () => {
   clipboard.on('success', () => {
     clipboardSuccess(message)
     clipboardSuccess(message)

+ 15 - 7
utils/donwload-tools.js

@@ -81,8 +81,9 @@ export async function downloadWithUrl(downUrl, fileName, self) {
 }
 }
 
 
 // 通过链接下载
 // 通过链接下载
-export default function downloadFile(downUrl, fileName, self, $event) {
+export default async function downloadFile(downUrl, fileName, self, $event) {
   if (isWeChat()) {
   if (isWeChat()) {
+    const event = $event
     // 加密下载链接
     // 加密下载链接
     const data = {
     const data = {
       downUrl: downUrl,
       downUrl: downUrl,
@@ -91,12 +92,19 @@ export default function downloadFile(downUrl, fileName, self, $event) {
     }
     }
     const redirectUrl = `${
     const redirectUrl = `${
       process.env.LOCALHOSE
       process.env.LOCALHOSE
-    }/download?state=${encodeURIComponent(encrypt(data))}`
-    return handleClipboard(
-      redirectUrl,
-      $event,
-      '下载链接已复制到剪切板,请粘贴到浏览器中下载'
-    )
+    }/public/download?state=${encodeURIComponent(encrypt(data))}`
+    handleClipboard(redirectUrl, event)
+    const result = await self.$dialog.alert({
+      title: '提示',
+      message: '请复制链接到其它浏览器下载!',
+      theme: 'round-button',
+      confirmButtonText: '点击复制下载链接',
+      confirmButtonColor: 'linear-gradient(to left, #404040, #101010)',
+    })
+    if (result === 'confirm') {
+      self.$toast('下载链接已复制到剪切板')
+    }
+    return
   } else {
   } else {
     downloadWithUrl(downUrl, fileName, self)
     downloadWithUrl(downUrl, fileName, self)
   }
   }

+ 0 - 12
utils/download-link.js

@@ -1,12 +0,0 @@
-import handleClipboard from '@/utils/clipboard'
-import { isWeChat } from '@/utils/validator'
-import { downloadUrlLink } from '@/utils/index'
-
-// 通过链接下载
-export default function downloadLink(link, $event) {
-  if (isWeChat()) {
-    return handleClipboard(link, $event, '下载链接已复制到剪切板')
-  } else {
-    downloadUrlLink(link)
-  }
-}

+ 0 - 40
utils/index.js

@@ -1,5 +1,3 @@
-import { Progress } from 'element-ui'
-
 // 绘制logo
 // 绘制logo
 export function drawLogo(text = '', len = 4) {
 export function drawLogo(text = '', len = 4) {
   if (text.length > 4) {
   if (text.length > 4) {
@@ -118,44 +116,6 @@ export function debounce(func, wait, immediate) {
   }
   }
 }
 }
 
 
-// 生成a标签下载文件
-export function downloadUrlLink(url) {
-  console.log(url)
-  const a = document.createElement('a')
-  a.setAttribute('download', true)
-  a.setAttribute('href', url)
-  a.setAttribute('target', '_blank')
-  a.style.display = 'none'
-  document.body.appendChild(a)
-  a.click()
-  document.body.removeChild(a)
-}
-
-// 下载方式2
-export async function downloadWithUrl(downUrl, fileName, self) {
-  const h = self.$createElement
-  const notification = self.$notify({
-    title: '提示',
-    message: h('div', {}, [
-      h('div', {}, `正在下载${fileName},请勿重复操作!`),
-      h(Progress, { props: { percentage: 100 } }),
-    ]),
-    duration: 0,
-  })
-  try {
-    const data = await fetch(downUrl)
-    const res = await data.blob()
-    const a = document.createElement('a')
-    a.href = URL.createObjectURL(res)
-    a.download = fileName
-    a.click()
-  } catch (err) {
-    self.$message.error(`下载${fileName}失败`)
-  } finally {
-    notification.close()
-  }
-}
-
 export function callMobile(mobile) {
 export function callMobile(mobile) {
   if (!mobile) return
   if (!mobile) return
   const a = document.createElement('a')
   const a = document.createElement('a')

+ 2 - 2
utils/map-utils.js

@@ -55,6 +55,6 @@ export async function mapNavigate(options = {}, origin) {
     options.locationUrl = `https://uri.amap.com/marker?position=${options.lng},${options.lat}&name=${options.title}&coordinate=gaode&callnative=0`
     options.locationUrl = `https://uri.amap.com/marker?position=${options.lng},${options.lat}&name=${options.title}&coordinate=gaode&callnative=0`
   }
   }
   // return
   // return
-  // window.open(options.locationUrl)
-  window.location.href = options.locationUrl
+  window.open(options.locationUrl, '_blank')
+  // window.location.href = options.locationUrl
 }
 }

+ 0 - 57
utils/old-routes.js

@@ -1,57 +0,0 @@
-/**
- * 旧版本路由重定向映射
- *
- */
-
-const oldRoutes = [
-  {
-    path: '/entry/approve',
-    redirect: '/app/approve',
-  },
-  {
-    path: '/entry/doc',
-    redirect: '/app/database/article',
-  },
-  {
-    path: '/entry/feedback',
-    redirect: '/app/feedback',
-  },
-  {
-    path: '/home',
-    redirect: '/app',
-  },
-  {
-    path: '/approve',
-    redirect: '/app/approve',
-  },
-  {
-    path: '/approve/page',
-    redirect: '/app/approve',
-  },
-  {
-    path: '/approve/club',
-    redirect: '/app/approve/club',
-  },
-  {
-    path: '/approve/club/detail',
-    redirect: '/app/approve/club/detail',
-  },
-  {
-    path: '/approve/device',
-    redirect: '/app/approve/device',
-  },
-  {
-    path: '/approve/device/detail',
-    redirect: '/app/approve/device/detail',
-  },
-  {
-    path: '/approve/doctor',
-    redirect: '/app/approve/personnel',
-  },
-  {
-    path: '/approve/doctor/detail',
-    redirect: '/app/approve/personnel/detail',
-  },
-]
-
-export default oldRoutes

+ 0 - 320
views/NormalHomePage.vue

@@ -1,320 +0,0 @@
-<template>
-  <div class="page">
-    <div class="page-top flex flex-col justify-center items-center">
-      <!-- <img class="logo" :src="supplierInfo.logo" /> -->
-      <div class="name mt-2" v-text="supplierInfo.shopName"></div>
-    </div>
-    <div class="page-content">
-      <keep-alive>
-        <div class="list">
-          <div
-            class="section flex flex-col justify-center items-center mt-6 mb-6"
-            v-for="item in list"
-            :key="item.id"
-            @click="toDetail(item)"
-            @mouseover="onMouseover(item)"
-            @mouseleave="onMouselevel(item)"
-          >
-            <div class="icon-image" :class="'item' + item.id"></div>
-            <div class="name mt-4" v-text="item.name"></div>
-          </div>
-        </div>
-      </keep-alive>
-    </div>
-  </div>
-</template>
-
-<script>
-import { mapGetters } from 'vuex'
-import { toAuthorization } from '~/utils'
-import { isWeChat } from '~/utils/validator'
-export default {
-  name: 'NormalHomePage',
-  data() {
-    return {
-      list: [],
-    }
-  },
-  computed: {
-    ...mapGetters([
-      'supplierInfo',
-      'authUserId',
-      'appId',
-      'routePrefix',
-      'accountType',
-    ]),
-  },
-  created() {
-    this.initEntryItems()
-  },
-  beforeDestroy() {
-    this.$removeStorage(this.routePrefix, 'login_redicret')
-  },
-  methods: {
-    // 初始化入口图标
-    initEntryItems() {
-      this.list = [
-        {
-          id: 0,
-          name: '正品授权申请入口',
-          path: '/form/club-register',
-          active: false,
-        },
-        {
-          id: 1,
-          name: '正品授权',
-          path: '/approve',
-          active: false,
-        },
-        {
-          id: 2,
-          name: '资料库',
-          path: '/database/article',
-          active: false,
-        },
-        {
-          id: 3,
-          name: '意见反馈',
-          path: '/feedback',
-          active: false,
-        },
-      ]
-    },
-
-    toDetail(item) {
-      const hasLogin = this.$store.getters.accessToken
-      // 保存登录重定向路由
-      this.$setStorage(
-        this.routePrefix,
-        'login_redicret',
-        this.routePrefix + item.path
-      )
-      if (item.id > 1 && !hasLogin) {
-        // 在微信浏览器中使用微信授权登录
-        if (isWeChat() && this.appId && this.accountType === 2) {
-          const payload = {
-            authUserId: this.authUserId,
-            routePrefix: this.routePrefix,
-          }
-          return toAuthorization(this.appId, payload)
-        }
-        this.$toast({ message: '请先登录', duration: 1000 })
-        this.$store.commit('app/SHOW_LOGIN')
-        return
-      }
-
-      if (item.id === 0) {
-        const url = this.routePrefix + item.path
-        this.$router.push(url)
-      } else {
-        const url = this.routePrefix + item.path
-        this.$router.push(url)
-      }
-    },
-    onMouseover(item) {
-      const isPc = this.$store.getters.isPc
-      if (!isPc) return
-      item.active = true
-    },
-    onMouselevel(item) {
-      const isPc = this.$store.getters.isPc
-      if (!isPc) return
-      item.active = false
-    },
-  },
-}
-</script>
-
-<style scoped lang="scss">
-// pc 端
-@media screen and (min-width: 768px) {
-  .page-top {
-    height: 360px;
-    @include themify($themes) {
-      background: themed('pc-banner-home');
-      background-size: auto 360px;
-    }
-    .logo {
-      display: block;
-      width: 120px;
-      height: 120px;
-      border-radius: 50%;
-      background: #fff;
-    }
-    .name {
-      font-size: 30px;
-      color: #fff;
-    }
-  }
-
-  .page-content {
-    width: 1200px;
-    margin: 0 auto;
-    overflow: hidden;
-
-    .list {
-      display: flex;
-      justify-content: space-between;
-      align-items: center;
-    }
-
-    .section {
-      width: 284px;
-      height: 260px;
-      margin-left: auto;
-      margin-right: auto;
-      background-color: #fff;
-      transition: all 0.4s;
-      cursor: pointer;
-      border-radius: 4px;
-
-      .icon-image {
-        width: 86px;
-        height: 86px;
-        background-size: 86px 86px;
-        background-repeat: no-repeat;
-        background-position: center;
-
-        &.item0 {
-          @include themify($themes) {
-            background-image: themed('pc-icon-home-edit');
-          }
-        }
-
-        &.item1 {
-          @include themify($themes) {
-            background-image: themed('pc-icon-home-approve');
-          }
-        }
-
-        &.item2 {
-          @include themify($themes) {
-            background-image: themed('pc-icon-home-doc');
-          }
-        }
-
-        &.item3 {
-          @include themify($themes) {
-            background-image: themed('pc-icon-home-feedback');
-          }
-        }
-      }
-
-      &:hover {
-        transform: translateY(-10px);
-
-        @include themify($themes) {
-          background-color: themed('color');
-        }
-
-        .icon-image {
-          &.item0 {
-            background-image: url(~assets/theme-images/common/pc-icon-edit-active.png) !important;
-          }
-
-          &.item1 {
-            background-image: url(~assets/theme-images/common/pc-icon-approve-active.png) !important;
-          }
-
-          &.item2 {
-            background-image: url(~assets/theme-images/common/pc-icon-doc-active.png) !important;
-          }
-
-          &.item3 {
-            background-image: url(~assets/theme-images/common/pc-icon-feedback-active.png) !important;
-          }
-        }
-
-        .name {
-          color: #fff;
-        }
-      }
-
-      .icon {
-        width: 86px;
-        height: 86px;
-      }
-
-      .name {
-        font-size: 24px;
-        color: #404040;
-      }
-    }
-  }
-}
-
-// 移动 端
-@media screen and (max-width: 768px) {
-  .page-top {
-    height: 46vw;
-    @include themify($themes) {
-      background: themed('h5-banner-home');
-      background-size: auto 46vw;
-    }
-    .logo {
-      display: block;
-      width: 14.8vw;
-      height: 14.8vw;
-      border-radius: 50%;
-      background: #fff;
-    }
-    .name {
-      font-size: 4vw;
-      color: #fff;
-    }
-  }
-
-  .page-content {
-    .section {
-      width: 85.6vw;
-      height: 58vw;
-      margin-left: auto;
-      margin-right: auto;
-      box-shadow: 0px 0.4vw 2vw rgba(0, 6, 32, 0.08);
-      border-radius: 4px;
-
-      .icon {
-        width: 20vw;
-        height: 20vw;
-      }
-
-      .name {
-        font-size: 4.8vw;
-        color: #404040;
-      }
-
-      .icon-image {
-        width: 86px;
-        height: 86px;
-        background-size: 86px 86px;
-        background-repeat: no-repeat;
-        background-position: center;
-
-        &.item0 {
-          @include themify($themes) {
-            background-image: themed('h5-icon-home-edit');
-          }
-        }
-
-        &.item1 {
-          @include themify($themes) {
-            background-image: themed('h5-icon-home-approve');
-          }
-        }
-
-        &.item2 {
-          @include themify($themes) {
-            background-image: themed('h5-icon-home-doc');
-          }
-        }
-
-        &.item3 {
-          @include themify($themes) {
-            background-image: themed('h5-icon-home-feedback');
-          }
-        }
-      }
-    }
-  }
-}
-</style>

+ 0 - 365
views/RossHomePage.vue

@@ -1,365 +0,0 @@
-<template>
-  <div class="page">
-    <div class="page-top">
-      <img class="logo" src="~/assets/theme-images/ross/ross-logo.png" />
-      <span></span>
-      <div class="name mt-2">来自西班牙殿堂级创新技术</div>
-    </div>
-    <div class="page-content">
-      <keep-alive>
-        <div class="list">
-          <div
-            class="section flex flex-col justify-center items-center"
-            v-for="item in list"
-            :key="item.id"
-            @click="toDetail(item)"
-            @mouseover="onMouseover(item)"
-            @mouseleave="onMouselevel(item)"
-          >
-            <div class="icon-image" :class="'item' + item.id"></div>
-            <div class="name mt-4" v-text="item.name"></div>
-          </div>
-        </div>
-      </keep-alive>
-    </div>
-  </div>
-</template>
-
-<script>
-import { mapGetters } from 'vuex'
-import { toAuthorization } from '~/utils'
-import { isWeChat } from '~/utils/validator'
-export default {
-  name: 'RossHomePage',
-  data() {
-    return {
-      list: [],
-    }
-  },
-  computed: {
-    ...mapGetters([
-      'supplierInfo',
-      'authUserId',
-      'appId',
-      'routePrefix',
-      'accountType',
-    ]),
-  },
-  created() {
-    this.initEntryItems()
-  },
-  beforeDestroy() {
-    this.$removeStorage(this.routePrefix, 'login_redicret')
-  },
-  methods: {
-    // 初始化入口图标
-    initEntryItems() {
-      this.list = [
-        {
-          id: 0,
-          name: '正品授权申请入口',
-          path: '/form/club-register',
-          active: false,
-        },
-        {
-          id: 1,
-          name: '正品授权',
-          path: '/approve',
-          active: false,
-        },
-        {
-          id: 2,
-          name: '资料库',
-          path: '/database/article',
-          active: false,
-        },
-        {
-          id: 3,
-          name: '意见反馈',
-          path: '/feedback',
-          active: false,
-        },
-      ]
-    },
-
-    toDetail(item) {
-      const hasLogin = this.$store.getters.accessToken
-      // 保存登录重定向路由
-      this.$setStorage(
-        this.routePrefix,
-        'login_redicret',
-        this.routePrefix + item.path
-      )
-      if (item.id > 1 && !hasLogin) {
-        // 在微信浏览器中使用微信授权登录
-        if (isWeChat() && this.appId && this.accountType === 2) {
-          const payload = {
-            authUserId: this.authUserId,
-            routePrefix: this.routePrefix,
-          }
-          return toAuthorization(this.appId, payload)
-        }
-        this.$toast({ message: '请先登录', duration: 1000 })
-        this.$store.commit('app/SHOW_LOGIN')
-        return
-      }
-
-      if (item.id === 0) {
-        const url = this.routePrefix + item.path
-        this.$router.push(url)
-      } else {
-        const url = this.routePrefix + item.path
-        this.$router.push(url)
-      }
-    },
-    onMouseover(item) {
-      const isPc = this.$store.getters.isPc
-      if (!isPc) return
-      item.active = true
-    },
-    onMouselevel(item) {
-      const isPc = this.$store.getters.isPc
-      if (!isPc) return
-      item.active = false
-    },
-  },
-}
-</script>
-
-<style scoped lang="scss">
-// pc 端
-@media screen and (min-width: 768px) {
-  .page {
-    min-height: calc(100vh - 160px);
-    @include themify($themes) {
-      background-size: auto 100%;
-      background: themed('pc-banner-home') no-repeat center;
-    }
-  }
-
-  .page-top {
-    width: 1200px;
-    margin: 0 auto;
-    padding: 75px 0 129px;
-    .logo {
-      display: block;
-      width: 119px;
-    }
-
-    span {
-      display: block;
-      width: 46px;
-      height: 3px;
-      margin: 40px 0 32px;
-      @include themify($themes) {
-        background: themed('color');
-      }
-    }
-
-    .name {
-      color: #fff;
-      font-size: 34px;
-    }
-  }
-
-  .page-content {
-    width: 1200px;
-    margin: 0 auto;
-
-    .list {
-      display: flex;
-      justify-content: space-between;
-      align-items: center;
-    }
-
-    .section {
-      width: 284px;
-      height: 260px;
-      margin-left: auto;
-      margin-right: auto;
-      background: rgba(255, 255, 255, 0.69);
-      cursor: pointer;
-      border-radius: 4px;
-      transition: all 0.4s;
-
-      &:hover {
-        transform: translateY(-10px);
-      }
-
-      &:nth-child(2n-1) {
-        transform: translateY(60px);
-
-        &:hover {
-          transform: translateY(50px);
-        }
-      }
-
-      .icon-image {
-        width: 86px;
-        height: 86px;
-        background-size: 86px 86px;
-        background-repeat: no-repeat;
-        background-position: center;
-
-        &.item0 {
-          @include themify($themes) {
-            background-image: themed('pc-icon-home-edit');
-          }
-        }
-
-        &.item1 {
-          @include themify($themes) {
-            background-image: themed('pc-icon-home-approve');
-          }
-        }
-
-        &.item2 {
-          @include themify($themes) {
-            background-image: themed('pc-icon-home-doc');
-          }
-        }
-
-        &.item3 {
-          @include themify($themes) {
-            background-image: themed('pc-icon-home-feedback');
-          }
-        }
-      }
-
-      &:hover {
-        @include themify($themes) {
-          background: url(~assets/theme-images/ross/pc-icon-approve-hover.png)
-            no-repeat center;
-          background-size: 100% auto;
-        }
-
-        .icon-image {
-          &.item0 {
-            background-image: url(~assets/theme-images/common/pc-icon-edit-active.png) !important;
-          }
-
-          &.item1 {
-            background-image: url(~assets/theme-images/common/pc-icon-approve-active.png) !important;
-          }
-
-          &.item2 {
-            background-image: url(~assets/theme-images/common/pc-icon-doc-active.png) !important;
-          }
-
-          &.item3 {
-            background-image: url(~assets/theme-images/common/pc-icon-feedback-active.png) !important;
-          }
-        }
-
-        .name {
-          color: #fff;
-        }
-      }
-
-      .icon {
-        width: 86px;
-        height: 86px;
-      }
-
-      .name {
-        font-size: 24px;
-        color: #404040;
-      }
-    }
-  }
-}
-
-// 移动 端
-@media screen and (max-width: 768px) {
-  .page {
-    min-height: calc(100vh - 12.8vw - 12.4vw);
-    padding-bottom: 16vw;
-    @include themify($themes) {
-      background: themed('h5-banner-home') no-repeat center;
-      background-size: cover;
-    }
-  }
-
-  .page-top {
-    padding: 11.5vw 7.2vw 15.5vw;
-    .logo {
-      display: block;
-      width: 14.3vw;
-    }
-
-    span {
-      display: block;
-      width: 7.2vw;
-      height: 0.5vw;
-      background: #fff;
-      margin: 6.2vw 0 4vw;
-    }
-
-    .name {
-      font-size: 4.8vw;
-      color: #fff;
-    }
-  }
-
-  .page-content {
-    .list {
-      display: flex;
-      justify-content: space-between;
-      flex-wrap: wrap;
-      padding: 0 7.2vw;
-    }
-
-    .section {
-      width: 41vw;
-      height: 38vw;
-      box-shadow: 0px 0.4vw 2vw rgba(0, 6, 32, 0.08);
-      margin-bottom: 8.8vw;
-      border-radius: 4px;
-
-      &:nth-child(2n-1) {
-        transform: translateY(16vw);
-      }
-
-      .icon {
-        width: 16vw;
-        height: 16vw;
-      }
-
-      .name {
-        font-size: 4vw;
-        color: #fff;
-      }
-
-      .icon-image {
-        width: 16vw;
-        height: 16vw;
-        background-size: 16vw 16vw;
-        background-repeat: no-repeat;
-        background-position: center;
-
-        &.item0 {
-          background-image: url(~assets/theme-images/common/pc-icon-edit-active.png) !important;
-        }
-
-        &.item1 {
-          background-image: url(~assets/theme-images/common/pc-icon-approve-active.png) !important;
-        }
-
-        &.item2 {
-          background-image: url(~assets/theme-images/common/pc-icon-doc-active.png) !important;
-        }
-
-        &.item3 {
-          background-image: url(~assets/theme-images/common/pc-icon-feedback-active.png) !important;
-        }
-      }
-
-      @include themify($themes) {
-        background: url(~assets/theme-images/ross/h5-icon-approve-hover.png)
-          no-repeat center;
-        background-size: 100% auto;
-      }
-    }
-  }
-}
-</style>