浏览代码

测试bug修改

喻文俊 3 年之前
父节点
当前提交
8f3710435a

+ 4 - 4
.env.development

@@ -2,12 +2,12 @@
 EVN = 'development'
 
 # 网站地址
-# LOCALHOSE = 'https://zp-b.caimei365.com'
-LOCALHOSE = 'http://192.168.2.81:3000'
+LOCALHOSE = 'https://zp-b.caimei365.com'
+# LOCALHOSE = 'http://192.168.2.81:3000'
 
 # 接口api地址
-# BASE_URL = 'https://zplma-b.caimei365.com'
-BASE_URL = 'http://192.168.2.68:8012'
+BASE_URL = 'https://zplma-b.caimei365.com'
+# BASE_URL = 'http://192.168.2.68:8012'
 
 # 静态资源文件地址
 STATIC_URL = 'https://static.caimei365.com/www/authentic'

+ 3 - 0
.env.production

@@ -1,6 +1,9 @@
 # 文件标记
 EVN = 'production'
 
+# 网站地址
+LOCALHOSE = 'https://zp.caimei365.com'
+
 # 接口api地址
 BASE_URL = 'https://zplma.caimei365.com'
 

+ 14 - 0
.env.staging

@@ -0,0 +1,14 @@
+# 文件标记
+EVN = 'satging'
+
+# 网站地址
+LOCALHOSE = 'https://zp-b.caimei365.com'
+
+# 接口api地址
+BASE_URL = 'https://zplma-b.caimei365.com'
+
+# 静态资源文件地址
+STATIC_URL = 'https://static.caimei365.com/www/authentic'
+
+# 采美网
+CIMEI_LOCAL = 'https://www-b.caimei365.com'

+ 90 - 30
components/SimplePagination/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="simple-pagination p-2">
+  <div class="simple-pagination p-2" :class="'theme-' + themeType">
     <van-pagination
       v-model="currentPage"
       :total-items="total"
@@ -24,6 +24,10 @@ export default {
       type: Number,
       default: 10,
     },
+    themeType: {
+      type: String,
+      default: 'red',
+    },
   },
   data() {
     return {
@@ -45,35 +49,72 @@ export default {
     display: flex;
     justify-content: center;
 
-    .van-pagination {
-      ::v-deep {
-        .van-pagination__item {
-          margin-left: 4px;
-          margin-right: 4px;
-          color: #bc1724;
+    &.theme-black{
+      .van-pagination {
+        ::v-deep {
+          .van-pagination__item {
+            margin-left: 4px;
+            margin-right: 4px;
+            color: #000;
 
-          &:active {
+            &:active {
+              color: #fff;
+              background-color: #000;
+            }
+          }
+
+          .van-pagination__prev,
+          .van-pagination__next {
+            background: transparent !important;
+            color: #101010;
+            &::after {
+              border-color: transparent !important;
+            }
+
+            &:hover {
+              color: #000;
+            }
+          }
+
+          .van-pagination__item--active {
+            background-color: #000 !important;
             color: #fff;
-            background-color: #bc1724;
           }
         }
+      }
+    }
 
-        .van-pagination__prev,
-        .van-pagination__next {
-          background: transparent !important;
-          color: #101010;
-          &::after {
-            border-color: transparent !important;
+    &.theme-red {
+      .van-pagination {
+        ::v-deep {
+          .van-pagination__item {
+            margin-left: 4px;
+            margin-right: 4px;
+            color: #bc1724;
+
+            &:active {
+              color: #fff;
+              background-color: #bc1724;
+            }
           }
 
-          &:hover {
-            color: #bc1724;
+          .van-pagination__prev,
+          .van-pagination__next {
+            background: transparent !important;
+            color: #101010;
+            &::after {
+              border-color: transparent !important;
+            }
+
+            &:hover {
+              color: #bc1724;
+            }
           }
-        }
 
-        .van-pagination__item--active {
-          background-color: #bc1724 !important;
-          color: #fff;
+          .van-pagination__item--active {
+            background-color: #bc1724 !important;
+            color: #fff;
+          }
         }
       }
     }
@@ -82,17 +123,36 @@ export default {
 
 @media screen and (max-width: 768px) {
   .van-pagination {
-    ::v-deep {
-      .van-pagination__prev,
-      .van-pagination__next {
-        color: #101010;
-        &::after {
-          border-color: transparent !important;
+    .theme-red {
+      ::v-deep {
+        .van-pagination__prev,
+        .van-pagination__next {
+          color: #101010;
+          &::after {
+            border-color: transparent !important;
+          }
+
+          &:active {
+            color: #fff;
+            background-color: #bc1724;
+          }
         }
+      }
+    }
+
+    .theme-black {
+      ::v-deep {
+        .van-pagination__prev,
+        .van-pagination__next {
+          color: #101010;
+          &::after {
+            border-color: transparent !important;
+          }
 
-        &:active {
-          color: #fff;
-          background-color: #bc1724;
+          &:active {
+            color: #fff;
+            background-color: #000;
+          }
         }
       }
     }

+ 8 - 4
generate.js

@@ -37,13 +37,17 @@ function generateRoutes(list, name, root = 'pages') {
     routes.forEach((route) => {
       const res = route.replace(`\\${name}\\`, '')
       if (res.startsWith(item.type)) {
-        reslut.push(route.replace(name, item.id))
+        const a = route.replace(name, item.id).replaceAll('\\', '/')
+        console.log(a)
+        reslut.push(a)
       }
     })
   })
   return reslut
 }
 
-const list = [{ id: 102, type: 'ldm' }]
-const routes = generateRoutes(list, '_template')
-console.log(routes)
+// const list = [{ id: 102, type: 'ldm' }]
+// const routes = generateRoutes(list, '_template')
+// console.log(routes)
+
+export default generateRoutes

+ 10 - 1
nuxt.config.js

@@ -1,5 +1,9 @@
 // import generateRoutes from './generate'
-// const list = [{ id: 102, type: 'app' }]
+// const list = [
+//   { id: 113, type: 'ldm' },
+//   { id: 102, type: 'app' },
+//   { id: 62, type: 'app' },
+// ]
 // const routes = generateRoutes(list, '_template')
 
 // 运行环境
@@ -70,4 +74,9 @@ export default {
     ...process.env,
     ...envConfig.parsed,
   },
+
+  server: {
+    port: 8888,
+    host: '192.168.2.81',
+  },
 }

+ 4 - 3
package.json

@@ -5,10 +5,11 @@
   "scripts": {
     "dev": "cross-env ENV=development nuxt",
     "build:dev": "cross-env NODE_ENV=development ENV=development nuxt build",
+    "build:stage": "cross-env NODE_ENV=staging ENV=staging nuxt build",
     "build:prod": "cross-env NODE_ENV=production ENV=production nuxt build",
-    "start": "nuxt start",
-    "generate:dev": "cross-env NODE_ENV=development ENV=development nuxt generate",
-    "generate": "nuxt generate",
+    "start:stage": "cross-env NODE_ENV=staging ENV=staging nuxt start",
+    "start:prod": "cross-env NODE_ENV=production ENV=production nuxt start",
+    "generate:prod": "cross-env NODE_ENV=production ENV=production nuxt generate",
     "lint:prettier": "prettier --check .",
     "lint": "npm run lint:prettier",
     "lintfix": "prettier --write --list-different ."

+ 3 - 2
pages/_template/app/approve/club/detail.vue

@@ -65,6 +65,7 @@ export default {
   },
   data() {
     return {
+      authId: '',
       clubInfo: {},
     }
   },
@@ -88,6 +89,7 @@ export default {
     },
     // 初始化
     initData() {
+      this.authId = this.$route.query.id
       const clubInfo = localStorage.getItem('clubInfo')
       if (clubInfo) {
         this.clubInfo = JSON.parse(clubInfo)
@@ -97,8 +99,7 @@ export default {
     // 获取机构详细信息
     async fetchDetail() {
       try {
-        const authId = this.clubInfo.authId
-        const res = await this.$http.api.getAuthClubDetail({ authId })
+        const res = await this.$http.api.getAuthClubDetail({ authId: this.authId })
         this.clubInfo = { ...this.clubInfo, ...res.data } // 合并
       } catch (error) {
         console.log(error)

+ 1 - 1
pages/_template/app/approve/club/index.vue

@@ -108,7 +108,7 @@ export default {
     // 查看详情
     toDetail(item) {
       localStorage.setItem('clubInfo', JSON.stringify(item))
-      const url = `/${this.authUserId}/app/approve/club/detail`
+      const url = `/${this.authUserId}/app/approve/club/detail?id=${item.authId}`
       this.$router.push(url)
     },
     // 初始化页面数据

+ 1 - 5
pages/_template/app/approve/device/index.vue

@@ -89,11 +89,7 @@ export default {
     },
     // 设备详情
     toDetail(item) {
-      localStorage.setItem(
-        'deviceInfo',
-        JSON.stringify({ productTypeId: item.productTypeId })
-      )
-      this.$router.push(`/${this.authUserId}/app/approve/device/list`)
+      this.$router.push(`/${this.authUserId}/app/approve/device/list?id=${item.productTypeId}`)
     },
     // 搜索
     onSearch() {

+ 2 - 6
pages/_template/app/approve/device/list.vue

@@ -82,12 +82,8 @@ export default {
   },
   methods: {
     initData() {
-      let deviceInfo = localStorage.getItem('deviceInfo')
-      if (deviceInfo) {
-        deviceInfo = JSON.parse(deviceInfo)
-        this.listQuery.productTypeId = deviceInfo.productTypeId
-        this.fetchList()
-      }
+      this.listQuery.productTypeId = this.$route.query.id
+      this.fetchList()
     },
     async fetchList() {
       try {

+ 4 - 6
pages/_template/app/approve/personnel/operate/detail.vue

@@ -51,6 +51,7 @@ export default {
   layout: 'app',
   data() {
     return {
+      doctorId: '',
       doctorInfo: {
         tagList: [],
         paramList: [],
@@ -62,16 +63,13 @@ export default {
   },
   methods: {
     initData() {
-      const doctorInfo = localStorage.getItem('doctorInfo')
-      if (doctorInfo) {
-        this.doctorInfo = JSON.parse(doctorInfo)
-        this.fetchDetail()
-      }
+      this.doctorId = this.$route.query.id
+      this.fetchDetail()
     },
     async fetchDetail() {
       try {
         const res = await this.$http.api.fetchDoctorDetail({
-          doctorId: this.doctorInfo.doctorId,
+          doctorId: this.doctorId,
         })
         this.doctorInfo = { ...this.clubInfo, ...res.data }
       } catch (error) {

+ 1 - 2
pages/_template/app/approve/personnel/operate/index.vue

@@ -113,8 +113,7 @@ export default {
     },
     // 医师详情
     toDetail(item) {
-      localStorage.setItem('doctorInfo', JSON.stringify(item))
-      const url = `/${this.authUserId}/app/approve/personnel/operate/detail`
+      const url = `/${this.authUserId}/app/approve/personnel/operate/detail?id=${item.doctorId}`
       this.$router.push(url)
     },
   },

+ 41 - 9
pages/_template/ldm/approve/club/detail.vue

@@ -7,8 +7,8 @@
       <div class="club-info">
         <img class="logo" :src="clubInfo.logo" />
         <div class="name" v-text="clubInfo.authParty"></div>
-        <div class="remark" v-if="clubInfo.remark">
-          认证设备:{{ clubInfo.remark }}
+        <div class="remark" v-if="clubInfo.remarks">
+          认证设备:{{ clubInfo.remarks }}
         </div>
       </div>
     </div>
@@ -16,6 +16,7 @@
       <div class="club-info">
         <div class="address" v-text="address"></div>
         <div class="mobile">{{ clubInfo.mobile | formatEmpty }}</div>
+        <div class="navigation">导航过去</div>
       </div>
       <!-- 列表标题 -->
       <div class="title">明星操作师</div>
@@ -50,6 +51,7 @@ export default {
   },
   data() {
     return {
+      authId: '',
       clubInfo: {},
     }
   },
@@ -67,13 +69,15 @@ export default {
     this.initData()
   },
   methods: {
-    toDetail() {
-      localStorage.setItem('doctorInfo', JSON.stringify(row))
+    toDetail(row) {
       const authUserId = this.$store.getters.authUserId
-      this.$router.push(`/${authUserId}/ldm/approve/personnel/operate/detail`)
+      this.$router.push(
+        `/${authUserId}/ldm/approve/personnel/operate/detail?id=${row.doctorId}`
+      )
     },
     // 初始化
     initData() {
+      this.authId = this.$route.query.id
       const clubInfo = localStorage.getItem('clubInfo')
       if (clubInfo) {
         this.clubInfo = JSON.parse(clubInfo)
@@ -83,8 +87,9 @@ export default {
     // 获取机构详细信息
     async fetchDetail() {
       try {
-        const authId = this.clubInfo.authId
-        const res = await this.$http.api.getAuthClubDetail({ authId })
+        const res = await this.$http.api.getAuthClubDetail({
+          authId: this.authId,
+        })
         this.clubInfo = { ...this.clubInfo, ...res.data } // 合并
       } catch (error) {
         console.log(error)
@@ -130,7 +135,7 @@ export default {
         height: 158px;
         margin: 0 auto;
         border-radius: 50%;
-        box-shadow: 0 4px 9px rgba(0, 0, 0, 0.34);
+        box-shadow: 0 4px 24px rgb(200, 200, 200, 0.4);
       }
       .name {
         font-size: 50px;
@@ -152,6 +157,7 @@ export default {
     // overflow-y: auto;
 
     .club-info {
+      position: relative;
       font-size: 19px;
       color: #000000;
       .address,
@@ -186,6 +192,19 @@ export default {
           background-image: url(https://static.caimei365.com/www/authentic/h5/ldm-icon-address.png);
         }
       }
+
+      .navigation {
+        position: absolute;
+        bottom: 36px;
+        right: 0;
+        font-size: 19px;
+        color: #0080ed;
+        cursor: pointer;
+        &::after {
+          content: '>';
+          margin-left: 8px;
+        }
+      }
     }
   }
 
@@ -279,7 +298,7 @@ export default {
         height: 29.5vw;
         margin: 0 auto;
         border-radius: 50%;
-        box-shadow: 0 0.4vw 0.9vw rgba(0, 0, 0, 0.34);
+        box-shadow: 0 0.4vw 0.9vw rgba(200, 200, 200, 0.4);
       }
       .name {
         font-size: 5vw;
@@ -297,6 +316,7 @@ export default {
 
   .page-content {
     .club-info {
+      position: relative;
       font-size: 3vw;
       color: #000000;
       padding: 6vw 3vw;
@@ -332,6 +352,18 @@ export default {
           background-image: url(https://static.caimei365.com/www/authentic/h5/ldm-icon-address.png);
         }
       }
+
+      .navigation {
+        position: absolute;
+        bottom: 10vw;
+        right: 5vw;
+        font-size: 3vw;
+        color: #0080ed;
+        &::after {
+          content: '>';
+          margin-left: 1vw;
+        }
+      }
     }
   }
 

+ 12 - 3
pages/_template/ldm/approve/club/index.vue

@@ -54,6 +54,7 @@
       ></SimpleEmpty>
       <!-- 页码 -->
       <SimplePagination
+        themeType="black"
         v-if="total > listQuery.pageSize"
         :total="total"
         :pageItems="listQuery.pageSize"
@@ -104,7 +105,9 @@ export default {
     toDetail(item) {
       localStorage.setItem('clubInfo', JSON.stringify(item))
       const authUserId = this.$store.getters.authUserId
-      this.$router.push(`/${authUserId}/ldm/approve/club/detail`)
+      this.$router.push(
+        `/${authUserId}/ldm/approve/club/detail?id=${item.authId}`
+      )
     },
     // 初始化页面数据
     async initData() {
@@ -211,6 +214,12 @@ export default {
     padding-bottom: 80px;
     margin: 0 auto;
     overflow: hidden;
+
+    .city{
+      position: relative;
+      z-index: 99;
+    }
+
     .search {
       width: 836px;
       position: relative;
@@ -304,7 +313,7 @@ export default {
           .line {
             height: 1px;
             margin: 14px 0;
-            background: rgba(0, 0, 0, 0.3);
+            background: rgba(0, 0, 0, 0.169);
           }
           .mobile,
           .address {
@@ -456,7 +465,7 @@ export default {
           .line {
             height: 0.1vw;
             margin: 2.8vw 0;
-            background: rgba(0, 0, 0, 0.3);
+            background: rgba(0, 0, 0, 0.169);
           }
           .mobile,
           .address {

+ 3 - 2
pages/_template/ldm/approve/index.vue

@@ -24,6 +24,7 @@
           >查询授权商家</nuxt-link
         >
         <nuxt-link
+          v-if="false"
           class="section"
           :to="`/${authUserId}/ldm/approve/personnel/training`"
           >查询官方培训师</nuxt-link
@@ -113,8 +114,8 @@ export default {
         font-size: 24px;
         cursor: pointer;
 
-        &:first-child {
-          margin-right: 197px;
+        &:nth-child(2) {
+          margin-left: 197px;
         }
       }
     }

+ 4 - 6
pages/_template/ldm/approve/personnel/operate/detail.vue

@@ -30,6 +30,7 @@ export default {
   layout: 'app-ldm',
   data() {
     return {
+      doctorId: '',
       doctorInfo: {
         tagList: [],
         paramList: [],
@@ -41,16 +42,13 @@ export default {
   },
   methods: {
     initData() {
-      const doctorInfo = localStorage.getItem('doctorInfo')
-      if (doctorInfo) {
-        this.doctorInfo = JSON.parse(doctorInfo)
-        this.fetchDetail()
-      }
+      this.doctorId = this.$route.query.id
+      this.fetchDetail()
     },
     async fetchDetail() {
       try {
         const res = await this.$http.api.fetchDoctorDetail({
-          doctorId: this.doctorInfo.doctorId,
+          doctorId: this.doctorId,
         })
         this.doctorInfo = { ...this.clubInfo, ...res.data }
       } catch (error) {

+ 1 - 0
pages/_template/ldm/approve/personnel/training/index.vue

@@ -24,6 +24,7 @@
       ></SimpleEmpty>
       <!-- 页码 -->
       <SimplePagination
+        themeType="black"
         v-if="total > listQuery.pageSize"
         :total="total"
         :pageItems="listQuery.pageSize"

+ 1 - 0
pages/_template/ldm/database/package.vue

@@ -31,6 +31,7 @@
       ></SimpleEmpty>
       <!-- 页码 -->
       <SimplePagination
+        themeType="black"
         v-if="total > listQuery.pageSize"
         :total="total"
         :pageItems="listQuery.pageSize"

+ 1 - 1
pages/_template/ldm/index.vue

@@ -41,7 +41,7 @@ export default {
       list: [
         {
           id: 0,
-          name: '授权认证',
+          name: '正品授权',
           image: 'ldm-icon-approve.png',
           path: '/ldm/approve',
         },