Browse Source

Merge branch 'iteration-courseware-search' into jenkins-main

lex-xin 2 months ago
parent
commit
b0a2d039c9

+ 1 - 0
src/components/o-search/index.module.less

@@ -86,6 +86,7 @@
     :global {
       .van-button__text {
         padding-top: 1px;
+        font-weight: bold;
       }
     }
   }

+ 6 - 5
src/views/courseList/index.module.less

@@ -82,23 +82,24 @@
   justify-content: space-between;
   padding: 20px 20px 12px;
   .searchGroup {
-    padding: 2px 10px 2px 7px;
+    padding: 3px 10px 2px 7px;
     border-radius: 19px;
     border: 1px solid rgba(255,128,87,0.5);
-    font-size: 14px;
-    color: rgba(0,0,0,0.4);
-    line-height: 20px;
     display: flex;
     align-items: center;
     cursor: pointer;
+    font-size: 0;
     .iconSearch {
       flex-shrink: 0;
       margin-right: 5px;
       height: 12px;
-
+      margin-top: -2px;
     }
     span {
       flex-shrink: 0;
+      line-height: 20px;
+      font-size: 14px;
+      color: rgba(0,0,0,0.4);
     }
   }
 }

+ 11 - 5
src/views/coursewarePlay/index.tsx

@@ -16,7 +16,7 @@ import iconBack from './image/back.png'
 import styles from './index.module.less'
 import 'plyr/dist/plyr.css'
 import request from '@/helpers/request'
-import { state } from '@/state'
+import { setLogin, state } from '@/state'
 import { useRoute } from 'vue-router'
 import { listenerMessage, postMessage, promisefiyPostMessage } from '@/helpers/native-message'
 import qs from 'query-string'
@@ -58,14 +58,20 @@ export default defineComponent({
         }
         if (value === "visible") {
           if(data.source === 'search') {
-            getSearchDetail({
-              type: 'visible',
-              search: data.search
-            })
+            getUserInfo()
           }
         }
       }
     )
+    const getUserInfo = async () => {
+      try {
+        // 重新初始化用户信息
+        const userCash = await request.get(state.platformApi + '/user/getUserInfo')
+        setLogin(userCash.data)
+      } catch {
+        //
+      }
+    }
     /** 设置播放容器 16:9 */
     const parentContainer = reactive({
       width: '100vw'