Browse Source

修改样式

lex 2 years ago
parent
commit
734170e4d3

BIN
src/common/svg/arrow-active.png


BIN
src/common/svg/arrow.png


+ 6 - 6
src/styles/index.less

@@ -113,7 +113,7 @@
 }
 
 body {
-  background-color: #f6f8f9;
+  background-color: #f6f6f6;
   user-select: none;
   margin-top: 0 !important;
 }
@@ -372,7 +372,7 @@ input {
   .searchItem {
     display: inline-block;
     font-size: 14px;
-    font-weight: 600;
+    font-weight: 400;
     color: #333333;
     // display: flex;
     // align-items: center;
@@ -383,9 +383,9 @@ input {
     &.searchItem-active {
       color: var(--van-primary);
       .arrow {
-        transform: rotateX(180deg);
+        // transform: rotateX(180deg);
         margin-top: -1px;
-        background: url('../common/svg/arrow-active.svg') no-repeat center center;
+        background: url('../common/svg/arrow-active.png') no-repeat center center;
         background-size: 100%;
       }
     }
@@ -409,8 +409,8 @@ input {
 
   .arrow {
     display: inline-block;
-    background-size: 100%;
-    background: url('../common/svg/arrow.svg') no-repeat center center;
+    background: url('../common/svg/arrow.png') no-repeat center center;
+    background-size: contain;
     width: 9px;
     height: 5px;
     margin-left: 3px;

+ 1 - 0
src/views/exercise-record/exercis-detail.module.less

@@ -73,6 +73,7 @@
         margin-bottom: 7px;
         font-family: 'DINA';
         font-weight: 400;
+        text-align: center;
         span {
           margin-left: 2px;
           font-size: 12px;

+ 1 - 1
src/views/exercise-record/modals/detail-item.module.less

@@ -20,7 +20,7 @@
         margin-bottom: 6px;
       }
       .itemTopSub {
-        font-size: 12px;
+        font-size: 12px !important;
         font-weight: 400;
         color: #777777;
         line-height: 17px;

+ 2 - 0
src/views/information/information-detail.module.less

@@ -27,6 +27,8 @@
 
   .content {
     padding-top: 24px;
+    word-wrap: break-word;
+    word-break: break-all;
 
     img {
       width: 100%;

BIN
src/views/mine-orchestra/images/icon-new.png


+ 3 - 1
src/views/mine-orchestra/index.module.less

@@ -39,7 +39,9 @@
   }
 }
 .content {
-  height: calc(100vh - 57px - var(--van-tabs-line-height) - var(--header-height));
+  height: calc(
+    100vh - 57px - var(--van-tabs-line-height) - var(--header-height) - var(--footer-height)
+  );
   overflow: hidden;
   overflow-y: auto;
 }

+ 40 - 34
src/views/mine-orchestra/index.tsx

@@ -2,7 +2,7 @@ import OHeader from '@/components/o-header'
 import OSticky from '@/components/o-sticky'
 import request from '@/helpers/request'
 import { state } from '@/state'
-import { Cell, CellGroup, Picker, Popup, Tab, Tabs } from 'vant'
+import { Button, Cell, CellGroup, Picker, Popup, Tab, Tabs } from 'vant'
 import { defineComponent, nextTick, onMounted, reactive, ref } from 'vue'
 import styles from './index.module.less'
 import iconOrchestra from './images/icon-or.png'
@@ -95,38 +95,7 @@ export default defineComponent({
             document.documentElement.style.setProperty('--header-height', height + 'px')
           }}
         >
-          <OHeader
-            title="我的乐团"
-            v-slots={{
-              right: () => (
-                <>
-                  {state.platformType == 'STUDENT' && (
-                    <>
-                      {(modelData.orchestra?.status === 'REGISTER' ||
-                        modelData.orchestra?.status === 'LEARNING') && (
-                        <span
-                          style={{ color: 'var(--van-primary)' }}
-                          onClick={() => {
-                            router.push({
-                              path: '/apply-withdrawal',
-                              query: {
-                                id: modelData.orchestra?.orchestraId
-                              }
-                            })
-                          }}
-                        >
-                          申请退团
-                        </span>
-                      )}
-                      {modelData.orchestra?.status === 'AUTH' && (
-                        <span style={{ color: 'red' }}>申请退团中</span>
-                      )}
-                    </>
-                  )}
-                </>
-              )
-            }}
-          />
+          <OHeader title="我的乐团" />
         </OSticky>
         <OFullRefresh
           v-model:modelValue={data.loading}
@@ -137,7 +106,7 @@ export default defineComponent({
               getData()
             })
           }}
-          style="min-height: calc(100vh - var(--van-nav-bar-height) - var(--header-height))"
+          style="min-height: calc(100vh - var(--van-nav-bar-height) - var(--header-height) - var(--footer-height))"
         >
           {!data.loading && !!data.orchestraList.length && (
             <>
@@ -161,6 +130,8 @@ export default defineComponent({
                 background="transparent"
                 animated
                 swipeable
+                lineWidth={16}
+                lineHeight={4}
               >
                 <Tab name="course" title="我的班级">
                   <div class={styles.content}>
@@ -193,6 +164,41 @@ export default defineComponent({
           )}
         </OFullRefresh>
 
+        {state.platformType == 'STUDENT' && (
+          <OSticky
+            position="bottom"
+            onGetHeight={(height: any) => {
+              document.documentElement.style.setProperty('--footer-height', height + 'px')
+            }}
+          >
+            <div class="btnGroup" style="padding-top: 12px">
+              {(modelData.orchestra?.status === 'REGISTER' ||
+                modelData.orchestra?.status === 'LEARNING') && (
+                <Button
+                  type="primary"
+                  round
+                  block
+                  onClick={() => {
+                    router.push({
+                      path: '/apply-withdrawal',
+                      query: {
+                        id: modelData.orchestra?.orchestraId
+                      }
+                    })
+                  }}
+                >
+                  申请退团
+                </Button>
+              )}
+              {modelData.orchestra?.status === 'AUTH' && (
+                <Button type="primary" round block disabled>
+                  申请退团中
+                </Button>
+              )}
+            </div>
+          </OSticky>
+        )}
+
         <Popup
           v-model:show={modelData.orchestraStatus}
           position="bottom"

+ 8 - 2
src/views/mine-orchestra/my-class/index.module.less

@@ -26,7 +26,7 @@
     border-radius: 4px;
     color: #fff;
     font-size: 12px;
-    margin-left: 6px;
+    margin-right: 6px;
   }
   :global {
     .van-cell {
@@ -39,7 +39,7 @@
       .van-cell__label {
         color: #777;
       }
-      .van-cell__title{
+      .van-cell__title {
         width: 60vw;
       }
       .van-cell__value {
@@ -57,9 +57,15 @@
     font-size: 24px;
     color: #333;
     margin-bottom: 4px;
+    font-family: DINA;
   }
   .name {
     font-size: 12px;
     color: #777;
   }
+  :global {
+    .van-grid-item__content {
+      padding-bottom: 20px;
+    }
+  }
 }

+ 2 - 2
src/views/mine-orchestra/my-class/index.tsx

@@ -101,11 +101,11 @@ export default defineComponent({
                 }}
               </Cell>
               <Grid border={false} columnNum={3} class={styles.grid}>
-                <GridItem>
+                <GridItem class={'gridBorderRight'}>
                   <p class={styles.title}>{item.studentNum || 0}</p>
                   <p class={styles.name}>学生人数</p>
                 </GridItem>
-                <GridItem>
+                <GridItem class={'gridBorderRight'}>
                   <p class={[styles.title]}>{item.notStartCourseNum || 0}</p>
                   <p class={styles.name}>剩余课时</p>
                 </GridItem>

+ 16 - 2
src/views/mine-orchestra/my-photo/index.module.less

@@ -18,12 +18,13 @@
   width: 49%;
   margin-bottom: 12px;
   .gridImg {
+    position: relative;
     display: flex;
     justify-content: center;
     align-items: center;
     height: calc(100vw / 2);
     width: 100%;
-    border-radius: 10px;
+    border-radius: 4px;
     overflow: hidden;
     position: relative;
     background-color: #eaeaea;
@@ -31,6 +32,16 @@
     background-position: center;
     background-image: url('../images/icon-photo-default.png');
   }
+  .iconNew {
+    position: absolute;
+    top: 6px;
+    right: 6px;
+    background: url('../images/icon-new.png') no-repeat center center;
+    background-size: 100%;
+    display: inline-block;
+    width: 44px;
+    height: 17px;
+  }
   .iconImage {
     display: flex;
     justify-content: center;
@@ -38,10 +49,13 @@
   .gridName {
     font-size: 16px;
     color: #333;
-    padding: 6px 0 4px 0;
+    line-height: 22px;
+    padding: 8px 0 4px 0;
   }
   .gridDes {
     color: #777;
+    line-height: 17px;
+    padding-left: 1px;
     font-size: 12px;
   }
 }

+ 15 - 10
src/views/mine-orchestra/my-photo/index.tsx

@@ -127,14 +127,16 @@ export default defineComponent({
           }}
         >
           <OHeader />
-          <CellGroup inset class={styles.cellGroup}>
-            <Cell class={styles.select} center isLink onClick={() => (data.schoolStatus = true)}>
-              {{
-                icon: () => <img class={styles.icon} src={iconOrchestra} />,
-                title: () => <div class="van-ellipsis">{data.school.name}</div>
-              }}
-            </Cell>
-          </CellGroup>
+          {data.schoolList.length > 0 && (
+            <CellGroup inset class={styles.cellGroup}>
+              <Cell class={styles.select} center isLink onClick={() => (data.schoolStatus = true)}>
+                {{
+                  icon: () => <img class={styles.icon} src={iconOrchestra} />,
+                  title: () => <div class="van-ellipsis">{data.school.name}</div>
+                }}
+              </Cell>
+            </CellGroup>
+          )}
         </OSticky>
         <OFullRefresh v-model={data.refreshing} onRefresh={() => getList()}>
           <div class={[styles.phoneDetail]}>
@@ -154,7 +156,8 @@ export default defineComponent({
                         router.push({
                           path: '/photo-list',
                           query: {
-                            id: item.id
+                            id: item.id,
+                            name: item.name
                           }
                         })
                       }}
@@ -166,7 +169,9 @@ export default defineComponent({
                             ? { backgroundImage: `url(${item.coverUrl})`, backgroundSize: 'cover' }
                             : ''
                         }
-                      ></div>
+                      >
+                        {item.newFlag ? <i class={styles.iconNew}></i> : ''}
+                      </div>
 
                       <div class={styles.gridName}>{item.name}</div>
                       <div class={styles.gridDes}>{item.photoCount}张</div>

+ 4 - 5
src/views/mine-orchestra/photo-list/detail.tsx

@@ -97,7 +97,7 @@ export default defineComponent({
         >
           <div class={styles.phoneListDetailWrap}>
             <List
-              loading={data.loading}
+              // loading={data.loading}
               loadingText=" "
               finished={data.finished}
               finishedText=" "
@@ -115,11 +115,10 @@ export default defineComponent({
                       <OImage class={styles.gridImg} src={item.fileUrl} />
                     </div>
                   ))}
-
-                  {!data.loading && !data.list.length && (
-                    <OEmpty key="OEmpty1" btnStatus={false} tips="暂无照片" />
-                  )}
                 </TransitionGroup>
+                {!data.loading && !data.list.length && (
+                  <OEmpty key="OEmpty1" btnStatus={false} tips="暂无照片" />
+                )}
               </div>
             </List>
           </div>

+ 4 - 1
src/views/mine-orchestra/photo-list/index.module.less

@@ -34,14 +34,17 @@
   .gridName {
     font-size: 16px;
     color: #333;
+    line-height: 22px;
     padding: 8px 0 4px 0;
   }
   .gridDes {
     color: #777;
+    line-height: 17px;
+    padding-left: 1px;
     font-size: 12px;
   }
 }
-.phoneListDetailWrap{
+.phoneListDetailWrap {
   min-height: calc(100vh - var(--header-height));
 }
 .phoneListDetail {

+ 3 - 3
src/views/mine-orchestra/photo-list/index.tsx

@@ -75,15 +75,15 @@ export default defineComponent({
     return () => (
       <div>
         <OSticky>
-          <OHeader />
+          <OHeader title={(route.query.name as any) || '相册'} />
         </OSticky>
         <div class={styles.phoneDetail}>
           {!data.loading && !!data.list.length && (
             <List
-              loading={data.loading}
+              // loading={data.loading}
               loadingText=" "
               finished={data.finished}
-              finishedText="没有更多数据"
+              finishedText=" "
               onLoad={getList}
               immediateCheck={false}
             >

+ 13 - 1
src/views/preview-protocol/index.tsx

@@ -12,7 +12,19 @@ export default defineComponent({
     }
   },
   async mounted() {
-    const type = this.$route.query.type
+    let type = 'REGISTER'
+    const queryType = this.$route.query.type
+
+    if (queryType) {
+      type = queryType.toString()
+    } else {
+      if (state.platformType === 'STUDENT') {
+        type = 'REGISTER'
+      } else {
+        type = 'REGISTER_TEACHER'
+      }
+    }
+
     try {
       // 判断是否有协议内容
       if (!this.protocolHTML) {