任一存 1 gadu atpakaļ
vecāks
revīzija
fe1c8690cd
6 mainītis faili ar 26 papildinājumiem un 10 dzēšanām
  1. 1 1
      .env.dev
  2. 1 1
      .env.test
  3. 1 1
      package.json
  4. 14 0
      src/api.js
  5. 8 7
      src/views/CommonDrawList.vue
  6. 1 0
      src/views/HomeView.vue

+ 1 - 1
.env.dev

@@ -2,4 +2,4 @@ VUE_APP_CLI_MODE=dev
 NODE_ENV=development
 PUBLIC_PATH=/
 VUE_APP_OUTER_ASSETS_PREFIX=https://culture.4dage.com/LiangZhu/
-VUE_APP_API_PREFIX=http://192.168.20.61:8056/api/show/
+VUE_APP_API_PREFIX=https://sit-liangzhubwg.4dage.com/api/show/

+ 1 - 1
.env.test

@@ -2,4 +2,4 @@ VUE_APP_CLI_MODE=test
 NODE_ENV=production
 PUBLIC_PATH=./
 VUE_APP_OUTER_ASSETS_PREFIX=/LiangZhu/
-VUE_APP_API_PREFIX=http://192.168.20.61:8056/api/show/
+VUE_APP_API_PREFIX=https://sit-liangzhubwg.4dage.com/api/show/

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "my-app",
-  "version": "2.3.0",
+  "version": "2.4.1",
   "private": true,
   "scripts": {
     "serve": "vue-cli-service serve --mode dev",

+ 14 - 0
src/api.js

@@ -40,4 +40,18 @@ export default {
       },
     })
   },
+  getLikeCount(idx) {
+    return axios({
+      method: 'get',
+      url: `${process.env.VUE_APP_API_PREFIX}visit/detail/${idx}`,
+      headers: {
+        "Content-Type": "application/json",
+      },
+      data: {
+        // id: idx,
+      },
+    }).then((res) => {
+      return res.data.data.pcsStar
+    })
+  }
 }

+ 8 - 7
src/views/CommonDrawList.vue

@@ -164,9 +164,9 @@ api.reportVisit(Number(route.query.idx)).then((res) => {
 })
 
 const likeCount = ref(null)
-// api.getLikeCount(route.query.idx - 1).then((res) => {
-//   likeCount.value = res
-// })
+api.getLikeCount(route.query.idx).then((res) => {
+  likeCount.value = res
+})
 const hasLiked = computed(() => {
   return likeRecord.value[route.query.idx - 1]
 })
@@ -175,7 +175,8 @@ function onClickLike(e) {
     return
   }
   likeRecord.value[route.query.idx - 1] = true
-  api.like(route.query.idx - 1)
+  api.like(route.query.idx)
+  likeCount.value++ // 从接口拿到的数据不会立刻变化
   setTimeout(() => {
     utils.animateCSS(e.target, 'heartBeat')
   }, 100)
@@ -313,14 +314,14 @@ function onGroupUlWheel(e) {
     border-radius: 50%;
   }
   >ul.group-list{
-    width: 100%;
     padding-left: calc(19 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
-    padding-right: calc(180 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
+    margin-right: calc(170 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
     padding-bottom: calc(5 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
     display: flex;
     align-items: center;
     overflow: auto;
-    &::-webkit-scrollbar { height: 0; };
+    &::-webkit-scrollbar { background: #fbf0d8; width: calc(4 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef')); height: calc(4 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef')); } /*宽度是对垂直滚动条而言,高度是对水平滚动条而言*/
+    &::-webkit-scrollbar-thumb { background: rgba(215, 173, 13, 1); border-radius: calc(2 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef')); }
     >li{
       flex: 0 0 auto;
       display: flex;

+ 1 - 0
src/views/HomeView.vue

@@ -5,6 +5,7 @@
       autoplay
       playsinline
       webkit-playsinline="true"
+      x5-video-player-type="h5"
       muted
     />
     <Transition name="fade-in">