浏览代码

修改问题

lex 1 年之前
父节点
当前提交
3c8e291bfd

+ 11 - 10
src/components/col-search/index.tsx

@@ -121,16 +121,17 @@ export default defineComponent({
                 搜索
               </Button>
             ),
-            action: () => (
-              <Icon
-                name={iconFilter}
-                size={28}
-                dot={this.filterDot}
-                onClick={() => {
-                  this.onFilter()
-                }}
-              />
-            )
+            action: () =>
+              (this.$slots.action && this.$slots.action()) || (
+                <Icon
+                  name={iconFilter}
+                  size={28}
+                  dot={this.filterDot}
+                  onClick={() => {
+                    this.onFilter()
+                  }}
+                />
+              )
           }}
         />
       </div>

二进制
src/tenant/activation-code/bg-image.png


+ 2 - 2
src/tenant/activation-code/index.module.less

@@ -11,7 +11,7 @@
 .sticky {
   :global {
     .van-sticky {
-      background: url('../images/bg-image.png') no-repeat top center;
+      background: url('./bg-image.png') no-repeat top center;
       background-size: 100% 214px;
     }
   }
@@ -26,7 +26,7 @@
   .codeInput {
     background: #FFFFFF;
     border-radius: 10px;
-    border: 2px solid rgba(255, 60, 129, 1);
+    border: 1px solid rgba(255, 60, 129, 1);
     // border-image: linear-gradient(270deg, rgba(255, 60, 129, 1), rgba(255, 118, 166, 1)) 2 2;
     height: 48px;
     width: 100%;

+ 1 - 1
src/tenant/activation-code/index.tsx

@@ -2,7 +2,7 @@ import TheSticky from '@/components/the-sticky'
 import { defineComponent, onMounted, reactive } from 'vue'
 import styles from './index.module.less'
 import ColHeader from '@/components/col-header'
-import bgImg from '../images/bg-image.png'
+import bgImg from './bg-image.png'
 import { Button, List, Row, Col, Toast } from 'vant'
 import icon1 from './icon-1.png'
 import request from '@/helpers/request'

+ 1 - 1
src/tenant/music/music-detail/new-index.module.less

@@ -293,7 +293,7 @@
   padding: 0;
   z-index: 12;
   border-radius: 16px;
-  padding-top: 12px;
+  padding-top: 26px;
 
   &::after {
     content: ' ';

+ 21 - 0
src/tenant/music/search/header.tsx

@@ -235,6 +235,12 @@ export default defineComponent({
     // 首先调用默认收起的方法
     if (route.path === '/music-songbook/search') defaultClose()
 
+    onMounted(() => {
+      postMessage({
+        api: 'backIconChange',
+        content: { backIconHide: true }
+      })
+    })
     return () => {
       return (
         <div class={styles.search}>
@@ -244,6 +250,7 @@ export default defineComponent({
               <Search
                 modelValue={keyword.value}
                 background="transparent"
+                showAction
                 onInput={(val: any) => {
                   keyword.value = val
                   if (val) {
@@ -278,6 +285,20 @@ export default defineComponent({
                         color="#333"
                       />
                     </div>
+                  ),
+                  action: () => (
+                    <span
+                      class={styles.searchCancel}
+                      onClick={() => {
+                        if (browser().isApp) {
+                          postMessage({ api: 'back' })
+                        } else {
+                          router.back()
+                        }
+                      }}
+                    >
+                      取消
+                    </span>
                   )
                 }}
               />

+ 10 - 1
src/tenant/music/search/index.module.less

@@ -4,7 +4,7 @@
   --van-cell-text-color: #333;
   --van-cell-value-color: #999;
   --van-cell-icon-size: 10px;
-  --van-nav-bar-height: 20px;
+  --van-nav-bar-height: 0px;
 
   --base-bg: #f6f8f9;
 
@@ -17,11 +17,20 @@
       background-color: var(--base-bg);
     }
 
+    .searchCancel {
+      font-size: 15px;
+      color: #000000;
+    }
+
     :global {
       .van-search__content {
         border: 1px solid #fff !important;
         box-sizing: border-box;
       }
+
+      .van-search__action {
+        padding-right: 0;
+      }
     }
   }
 

+ 4 - 2
src/tenant/music/train-tool/index.tsx

@@ -75,7 +75,8 @@ export default defineComponent({
       ensembleCounts: false,
       musicCounts: false,
       subjectCounts: false,
-      tenantAlbumStatus: 0 as any
+      tenantAlbumStatus: 0 as any,
+      ablumStatus: false
     })
     const params = reactive({
       page: 1,
@@ -94,6 +95,7 @@ export default defineComponent({
         const { data } = await request.post(url)
         state.details = data || {}
         state.tenantAlbumStatus = data.tenantAlbumStatus
+        state.ablumStatus = data.status
         state.buyList.forEach((item: any, index: number) => {
           item.salePrice = (index + 1) * data.salePrice
           item.costPrice = (index + 1) * data.costPrice
@@ -260,7 +262,7 @@ export default defineComponent({
 
     return () => (
       <div class={styles.trainTool}>
-        {state.tenantAlbumStatus === 0 ? (
+        {state.tenantAlbumStatus === 0 || !state.ablumStatus ? (
           <>
             <TheSticky position="top">
               <ColHeader border={false} isFixed={false} />

+ 5 - 2
src/tenant/trade/index.tsx

@@ -51,6 +51,7 @@ export default defineComponent({
       searchName: '全部',
       params: {
         status: '',
+        keyword: '',
         page: 1,
         rows: 20
       },
@@ -64,6 +65,7 @@ export default defineComponent({
           ...state.params,
           searchDate: dayjs(state.currentSearchDate).format('YYYY-MM')
         }
+        console.log(state.params, 'state.params')
 
         const url =
           state.type === 'buy'
@@ -105,12 +107,13 @@ export default defineComponent({
       state.timeStatus = false
       onSearch()
     }
-    const onSearch = () => {
+    const onSearch = (val?: any) => {
       state.dataShow = true
       state.loading = false
       state.finished = false
       state.list = []
       state.params.page = 1
+      state.params.keyword = val
       getList()
     }
     const onCancelPay = async (item: any) => {
@@ -278,7 +281,7 @@ export default defineComponent({
                                 )}
                               </div>
 
-                              {orderDetail.bizInfo?.bizMusicCount && (
+                              {orderDetail.bizInfo?.bizMusicCount > 0 && (
                                 <span class={styles.songLength}>
                                   共{orderDetail.bizInfo?.bizMusicCount}首
                                 </span>

+ 41 - 31
src/views/tenantStudentRejest/index.tsx

@@ -73,38 +73,48 @@ export default defineComponent({
       maxDate: new Date()
     })
     const handleSubmit = async () => {
-      console.log(forms, 'forms')
-      if (!forms.name) {
-        Toast('请输入姓名')
-      }
-      if (!forms.gender) {
-        Toast('请选择性别')
-      }
-      if (!forms.phone) {
-        Toast('请输入手机号')
-      }
-      if (!forms.birthdate) {
-        Toast('请选择出生年月')
-      }
-      if (!forms.code) {
-        Toast('请输入验证码')
-      }
-      if (!forms.subjectId) {
-        Toast('请选择声部')
-      }
+      try {
+        console.log(forms, 'forms')
+        if (!forms.name) {
+          Toast('请输入姓名')
+          return
+        }
+        if (!forms.gender) {
+          Toast('请选择性别')
+          return
+        }
+        if (!forms.phone) {
+          Toast('请输入手机号')
+          return
+        }
+        if (!forms.birthdate) {
+          Toast('请选择出生年月')
+          return
+        }
+        if (!forms.code) {
+          Toast('请输入验证码')
+          return
+        }
+        if (!forms.subjectId) {
+          Toast('请选择声部')
+          return
+        }
 
-      const res = await request.post('/api-tenant/open/student/save', {
-        data: { ...forms },
-        hideLoading: true
-      })
-      console.log(res)
-      if (res.code == 200) {
-        data.showSuccess = true
-      }
+        const res = await request.post('/api-tenant/open/student/save', {
+          data: { ...forms },
+          hideLoading: true
+        })
+        console.log(res)
+        if (res.code == 200) {
+          data.showSuccess = true
+        }
 
-      if (res.code == 5004) {
-        data.secondConfirm = true
-        data.userSchoolName = res.msg
+        if (res.code == 5004) {
+          data.secondConfirm = true
+          data.userSchoolName = res.msg
+        }
+      } catch {
+        //
       }
     }
     const getSubjectList = async () => {
@@ -229,7 +239,7 @@ export default defineComponent({
                       inputAlign="right"
                       label="姓名"
                       placeholder="请输入姓名"
-                      maxlength={20}
+                      maxlength={14}
                       v-model={forms.name}
 
                       // onUpdate: modelValue={(val: string) => {

+ 7 - 1
src/views/tenantTeacherRejest/index.tsx

@@ -68,21 +68,27 @@ export default defineComponent({
       console.log(forms, 'forms')
       if (!forms.username) {
         Toast('请输入老师昵称')
+        return
       }
       if (!forms.phone) {
         Toast('请输入手机号')
+        return
       }
       if (!forms.code) {
         Toast('请输入验证码')
+        return
       }
       if (!forms.realName) {
         Toast('请输入真实姓名')
+        return
       }
       if (!forms.idCardNo) {
         Toast('请输入身份证号')
+        return
       }
       if (data.choiceSubjectIds.length < 1) {
         Toast('请选择声部')
+        return
       }
       try {
         const res = await request.post('/api-tenant/open/teacher/submit', {
@@ -204,7 +210,7 @@ export default defineComponent({
                       inputAlign="right"
                       label="老师昵称"
                       placeholder="请输入老师昵称"
-                      maxlength={20}
+                      maxlength={12}
                       v-model={forms.username}
 
                       // onUpdate: modelValue={(val: string) => {

+ 1 - 1
vite.config.ts

@@ -12,7 +12,7 @@ function resolve(dir: string) {
 // https://vitejs.dev/config/
 // https://github.com/vitejs/vite/issues/1930 .env
 // const proxyUrl = 'https://online.colexiu.com/';
-const proxyUrl = 'https://dev.colexiu.com/'
+const proxyUrl = 'https://test.colexiu.com/'
 // const proxyUrl = 'http://192.168.3.143:8000/'
 export default defineConfig({
   base: './',