喻文俊 3 anni fa
parent
commit
06379e774a

+ 4 - 1
.env.production

@@ -14,4 +14,7 @@ VUE_APP_BASE_SERVER = 'https://www.caimei365.com'
 VUE_APP_SOCKET_SERVER = 'wss://zplma.caimei365.com/websocket?sessionSource=zplm_admin'
 
 # 支付
-VUE_APP_PAY_LOCAL = https://core.caimei365.com
+VUE_APP_PAY_LOCAL = https://core.caimei365.com
+
+# 网站地址
+VUE_APP_LOCAL = 'https://zplm.caimei365.com'

+ 1 - 0
src/layout/components/AvatarWrapper/index.vue

@@ -39,6 +39,7 @@ export default {
       return this.userIdentity === 2
     },
     userName() {
+      console.log(this.mobile, this.loginAccount, this.name)
       return this.loginAccount || this.mobile || this.name
     },
     // 未开通会员

+ 3 - 3
src/layout/components/VipTipDialog/index.vue

@@ -25,13 +25,13 @@ export default {
     }
   },
   computed: {
-    ...mapGetters(['vipInfo']),
+    ...mapGetters(['vipInfo', 'userIdentity']),
     vipTipVisiable() {
-      return this.vipInfo.freeUseFlag > 0
+      return this.vipInfo.tipType > 0 && this.userIdentity > 1
     },
     contentText() {
       const insertText = ['', '账号试用即将到期', '账号试用已到期', '会员账号即将到期', '会员账号已到期']
-      return `对不起,您的${insertText[this.vipInfo.freeUseFlag]},请尽快开通会员,以免影响正常使用`
+      return `对不起,您的${insertText[this.vipInfo.tipType]},请尽快开通会员,以免影响正常使用`
     }
   },
   methods: {

+ 9 - 7
src/permission.js

@@ -1,7 +1,7 @@
 import router from '@/router'
 import store from '@/store'
 import { getToken, getUserInfo, initGoPage } from '@/utils/auth'
-import getPageTitle from './utils/get-page-title'
+// import getPageTitle from './utils/get-page-title'
 
 // 获取用户信息
 const userInfo = getUserInfo()
@@ -11,17 +11,18 @@ if (userInfo) {
 
 // 路由白名单
 const whiteList = ['/login']
-const shareList = ['/share', '/share/pay', '/share/pay-success', '/share/pay-faild']
+const shareList = ['Share', 'SharePayVip', 'SharePaySuccess', 'SharePayFaild']
 
 // 路由拦截器
 router.beforeEach(async(to, from, next) => {
   // 获取token
   const hasToken = getToken()
   // 设置页面标题
-  document.title = getPageTitle(to.meta.title)
-
-  if (shareList.indexOf(to.path) > -1) {
+  // document.title = getPageTitle(to.meta.title)
+  console.log(to)
+  if (shareList.indexOf(to.name) > -1) {
     next()
+    return
   }
 
   if (hasToken) {
@@ -38,7 +39,6 @@ router.beforeEach(async(to, from, next) => {
         next()
       } else {
         try {
-          console.log(to)
           // 代理状态更换时清空全部页面标签
           if (store.getters.isChangeProxy) {
             store.commit('tagsView/CLEAR_ALL_VIEW')
@@ -50,8 +50,10 @@ router.beforeEach(async(to, from, next) => {
           const accessRoutes = await store.dispatch('permission/generateRoutes')
           // 添加路由配置
           router.addRoutes(accessRoutes)
+          // debugger
+          console.log(to)
           // 放行
-          next({ ...to, replace: true })
+          next({ ...to, path: '/', replace: true })
         } catch (err) {
           store.dispatch('user/logout')
         }

+ 2 - 1
src/router/index.js

@@ -38,7 +38,8 @@ export const constantRoutes = [
   ...shareRoutes,
   {
     path: '/',
-    redirect: '/login'
+    component: () => import(/* webpackChunkName: "common-page" */ '@/views/index'),
+    hidden: true
   },
   {
     path: '/login',

+ 3 - 3
src/router/module/share.js

@@ -14,21 +14,21 @@ const vipRoutes = [
       {
         path: 'pay/:linkLogo',
         component: () => import('@/views/common/share/pay/pay'),
-        name: 'PayVip',
+        name: 'SharePayVip',
         meta: { title: '支付会员' },
         hidden: true
       },
       {
         path: 'pay-success',
         component: () => import('@/views/common/share/pay/success'),
-        name: 'PaySuccess',
+        name: 'SharePaySuccess',
         meta: { title: '支付成功' },
         hidden: true
       },
       {
         path: 'pay-faild',
         component: () => import('@/views/common/share/pay/faild'),
-        name: 'PayFaild',
+        name: 'SharePayFaild',
         meta: { title: '支付失败' },
         hidden: true
       }

+ 1 - 1
src/settings.js

@@ -1,5 +1,5 @@
 module.exports = {
-  title: '正品联盟后台管理系统',
+  title: '认证通',
 
   /**
    * @type {boolean} true | false

+ 2 - 1
src/store/modules/proxy.js

@@ -13,7 +13,8 @@ const mutations = {
       name: proxy.name,
       shopStatus: proxy.shopStatus ? 1 : 0,
       shopType: proxy.shopType,
-      userIdentity: 2 // 开启代理
+      userIdentity: 2, // 开启代理
+      mobile: proxy.mobile
     }
     state.proxyState = true // 用于判断是否需要更新路由 ture:需要更新, false:不需要更新
     state.isChangeProxy = true // 大理状态是否改变 根据改状态开重置路由和路由列表

+ 7 - 1
src/views/admin/member/record.vue

@@ -193,7 +193,13 @@ export default {
     },
     handleShowDemand(row) {
       this.dialogTableVisible = true
-      this.demandList = row.services
+      if (row.services) {
+        this.demandList = row.services.split(',').map(item => ({
+          demand: item
+        }))
+      } else {
+        this.demandList = []
+      }
     },
     // 获取套餐列表
     fetchConfigureList() {

+ 2 - 2
src/views/admin/member/settings/combo-edit.vue

@@ -33,9 +33,9 @@
     <el-divider content-position="left">会员订制服务配置</el-divider>
     <div class="list">
       <div v-for="(item, index) in serviceList" :key="index" class="section">
-        <div class="control"><span>制服务{{ index + 1 }}</span></div>
+        <div class="control"><span>制服务{{ index + 1 }}</span></div>
         <div class="control">
-          <span>制服务名称</span>
+          <span>制服务名称</span>
           <el-input v-model="item.name" size="mini" />
         </div>
         <div class="control">

+ 1 - 0
src/views/admin/supplier/index.vue

@@ -273,6 +273,7 @@ export default {
         this.$message.info('已取消操作')
       })
       if (text !== 'confirm') return
+      console.log(item)
       // 要执行的操作
       this.$store.commit('proxy/OPEN_PROXY', item)
       this.$store.dispatch('user/proxyLogin')

+ 1 - 1
src/views/common/proxy/index.vue

@@ -9,7 +9,7 @@ export default {
   },
   created() {
     const path = this.proxyState ? '/club' : '/supplier'
-    this.$router.push(path)
+    this.$router.replace(path)
   }
 }
 </script>

+ 1 - 0
src/views/common/share/pay/pay.vue

@@ -36,6 +36,7 @@
         :copy-status="false"
         :pay-way="3"
         :confirm="confirmVisiable"
+        :pay-submit="false"
         @change="handleBankChange"
         @pay-confirm="handleConfirmPay"
       />

+ 2 - 2
src/views/components/MemberBenefits/index.vue

@@ -40,9 +40,9 @@
       <td class="color909399">90天免费体验</td>
       <td class="color1890ff">永久</td>
     </tr>
-    <!-- 制服务 -->
+    <!-- 制服务 -->
     <tr>
-      <td rowspan="4" class="title" style="writing-mode: vertical-lr;">制服务</td>
+      <td rowspan="4" class="title" style="writing-mode: vertical-lr;">制服务</td>
       <td>认证授权图片模板</td>
       <td class="color909399">—</td>
       <td class="color1890ff">订制要求与费用另议</td>

+ 7 - 3
src/views/components/payment/pay-bank.vue

@@ -14,14 +14,14 @@
         <el-image :src="row.bankLogo" class="bank-icon" />
       </template>
     </radio-card>
-    <div v-if="payWay === 3 && copyStatus" class="pay-submit">
-      <div class="tip">
+    <div class="pay-submit">
+      <div v-if="payWay === 3 && copyStatus" class="tip">
         <div class="copy-tip">
           若您在公司的职位无法直接使用企业网银付款,请点击右侧“复制支付链接”按钮,将该链接发送给公司财务人员进行企业网银付款
         </div>
         <el-tag type="danger" @click="handleClipboard($event)">复制支付链接</el-tag>
       </div>
-      <el-button type="danger" @click="onSubmit">立即支付</el-button>
+      <el-button v-if="paySubmit" type="danger" @click="onSubmit">立即支付</el-button>
     </div>
     <!-- 确认支付 -->
     <el-dialog title="支付确认" :visible.sync="confirmVisiable" width="20%" center>
@@ -60,6 +60,10 @@ export default {
     confirm: {
       type: Boolean,
       default: false
+    },
+    paySubmit: {
+      type: Boolean,
+      default: true
     }
   },
   data() {

+ 11 - 0
src/views/index.vue

@@ -0,0 +1,11 @@
+<script>
+import { initGoPage } from '@/utils/auth'
+export default {
+  created() {
+    this.$router.replace(initGoPage())
+  },
+  render(h) {
+    return h()
+  }
+}
+</script>

+ 7 - 1
src/views/normal/personal/vip-record.vue

@@ -184,7 +184,13 @@ export default {
     },
     handleShowDemand(row) {
       this.dialogTableVisible = true
-      this.demandList = row.services
+      if (row.services) {
+        this.demandList = row.services.split(',').map(item => ({
+          demand: item
+        }))
+      } else {
+        this.demandList = []
+      }
     },
     // 获取套餐列表
     fetchConfigureList() {

+ 2 - 2
src/views/normal/vip/buy.vue

@@ -23,9 +23,9 @@
       </radio-card>
     </div>
     <el-divider class="divider" />
-    <!-- 制服务 -->
+    <!-- 制服务 -->
     <div class="section">
-      <div class="subtitle">制服务<span class="tip">(勾选且付费后,将会有专人与您进行沟通)</span></div>
+      <div class="subtitle">制服务<span class="tip">(勾选且付费后,将会有专人与您进行沟通)</span></div>
       <radio-card v-model="checkedServiceList" :list="serviceList" type="checkbox" @change="handleServiceChange">
         <template #item="{ row }">
           <div class="service-package">