lex пре 2 година
родитељ
комит
e751e36797

+ 8 - 5
dist/index.html

@@ -34,7 +34,7 @@
   <meta name="apple-touch-fullscreen" content="yes" />
   <!-- windows phone 点击无高光 -->
   <meta name="msapplication-tap-highlight" content="no" />
-  <title>酷乐秀</title>
+  <title>管乐团</title>
   <script src="./flexible.js" charset="UTF-8"></script>
   <script type="text/javascript">
     window.paymentType = 'STUDENT'
@@ -42,15 +42,18 @@
   <script type="module" crossorigin src="./assets/index.14ce4599.js"></script>
   <link rel="modulepreload" href="./assets/index.879f7421.js">
   <link rel="stylesheet" href="./assets/index.6d794fa2.css">
-  <script type="module">!function(){try{new Function("m","return import(m)")}catch(o){console.warn("vite: loading legacy build because dynamic import is unsupported, syntax error above should be ignored");var e=document.getElementById("vite-legacy-polyfill"),n=document.createElement("script");n.src=e.src,n.onload=function(){System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))},document.body.appendChild(n)}}();</script>
+  <script
+    type="module">!function () { try { new Function("m", "return import(m)") } catch (o) { console.warn("vite: loading legacy build because dynamic import is unsupported, syntax error above should be ignored"); var e = document.getElementById("vite-legacy-polyfill"), n = document.createElement("script"); n.src = e.src, n.onload = function () { System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src')) }, document.body.appendChild(n) } }();</script>
 </head>
 
 <body>
   <div id="app"></div>
-  
-  <script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script>
+
+  <script
+    nomodule>!function () { var e = document, t = e.createElement("script"); if (!("noModule" in t) && "onbeforeload" in t) { var n = !1; e.addEventListener("beforeload", (function (e) { if (e.target === t) n = !0; else if (!e.target.hasAttribute("nomodule") || !n) return; e.preventDefault() }), !0), t.type = "module", t.src = ".", e.head.appendChild(t), t.remove() } }();</script>
   <script nomodule id="vite-legacy-polyfill" src="./assets/polyfills-legacy.3b4651af.js"></script>
-  <script nomodule id="vite-legacy-entry" data-src="./assets/index-legacy.fbc3f795.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
+  <script nomodule id="vite-legacy-entry"
+    data-src="./assets/index-legacy.fbc3f795.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
 </body>
 
 </html>

+ 8 - 5
dist/school.html

@@ -34,7 +34,7 @@
   <meta name="apple-touch-fullscreen" content="yes" />
   <!-- windows phone 点击无高光 -->
   <meta name="msapplication-tap-highlight" content="no" />
-  <title>酷乐秀</title>
+  <title>管乐团</title>
   <script src="./flexible.js" charset="UTF-8"></script>
   <script type="text/javascript">
     window.paymentType = 'SCHOOL'
@@ -42,15 +42,18 @@
   <script type="module" crossorigin src="./assets/school.c1e59d77.js"></script>
   <link rel="modulepreload" href="./assets/index.879f7421.js">
   <link rel="stylesheet" href="./assets/index.6d794fa2.css">
-  <script type="module">!function(){try{new Function("m","return import(m)")}catch(o){console.warn("vite: loading legacy build because dynamic import is unsupported, syntax error above should be ignored");var e=document.getElementById("vite-legacy-polyfill"),n=document.createElement("script");n.src=e.src,n.onload=function(){System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))},document.body.appendChild(n)}}();</script>
+  <script
+    type="module">!function () { try { new Function("m", "return import(m)") } catch (o) { console.warn("vite: loading legacy build because dynamic import is unsupported, syntax error above should be ignored"); var e = document.getElementById("vite-legacy-polyfill"), n = document.createElement("script"); n.src = e.src, n.onload = function () { System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src')) }, document.body.appendChild(n) } }();</script>
 </head>
 
 <body>
   <div id="app"></div>
-  
-  <script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script>
+
+  <script
+    nomodule>!function () { var e = document, t = e.createElement("script"); if (!("noModule" in t) && "onbeforeload" in t) { var n = !1; e.addEventListener("beforeload", (function (e) { if (e.target === t) n = !0; else if (!e.target.hasAttribute("nomodule") || !n) return; e.preventDefault() }), !0), t.type = "module", t.src = ".", e.head.appendChild(t), t.remove() } }();</script>
   <script nomodule id="vite-legacy-polyfill" src="./assets/polyfills-legacy.3b4651af.js"></script>
-  <script nomodule id="vite-legacy-entry" data-src="./assets/school-legacy.545ba943.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
+  <script nomodule id="vite-legacy-entry"
+    data-src="./assets/school-legacy.545ba943.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
 </body>
 
 </html>

+ 8 - 5
dist/teacher.html

@@ -34,7 +34,7 @@
   <meta name="apple-touch-fullscreen" content="yes" />
   <!-- windows phone 点击无高光 -->
   <meta name="msapplication-tap-highlight" content="no" />
-  <title>酷乐秀</title>
+  <title>管乐团</title>
   <script src="./flexible.js" charset="UTF-8"></script>
   <script type="text/javascript">
     window.paymentType = 'TEACHER'
@@ -42,15 +42,18 @@
   <script type="module" crossorigin src="./assets/teacher.8a138f88.js"></script>
   <link rel="modulepreload" href="./assets/index.879f7421.js">
   <link rel="stylesheet" href="./assets/index.6d794fa2.css">
-  <script type="module">!function(){try{new Function("m","return import(m)")}catch(o){console.warn("vite: loading legacy build because dynamic import is unsupported, syntax error above should be ignored");var e=document.getElementById("vite-legacy-polyfill"),n=document.createElement("script");n.src=e.src,n.onload=function(){System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))},document.body.appendChild(n)}}();</script>
+  <script
+    type="module">!function () { try { new Function("m", "return import(m)") } catch (o) { console.warn("vite: loading legacy build because dynamic import is unsupported, syntax error above should be ignored"); var e = document.getElementById("vite-legacy-polyfill"), n = document.createElement("script"); n.src = e.src, n.onload = function () { System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src')) }, document.body.appendChild(n) } }();</script>
 </head>
 
 <body>
   <div id="app"></div>
-  
-  <script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script>
+
+  <script
+    nomodule>!function () { var e = document, t = e.createElement("script"); if (!("noModule" in t) && "onbeforeload" in t) { var n = !1; e.addEventListener("beforeload", (function (e) { if (e.target === t) n = !0; else if (!e.target.hasAttribute("nomodule") || !n) return; e.preventDefault() }), !0), t.type = "module", t.src = ".", e.head.appendChild(t), t.remove() } }();</script>
   <script nomodule id="vite-legacy-polyfill" src="./assets/polyfills-legacy.3b4651af.js"></script>
-  <script nomodule id="vite-legacy-entry" data-src="./assets/teacher-legacy.e10aa72f.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
+  <script nomodule id="vite-legacy-entry"
+    data-src="./assets/teacher-legacy.e10aa72f.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
 </body>
 
 </html>

+ 2 - 2
public/project/initiation.html

@@ -385,7 +385,7 @@
             this.orchestraName = orchestraDetail.data.data.name || ''
 
             if (!orchestraDetail.data.data.canSignUp) {
-              vant.showToast('学校已关闭')
+              vant.showToast('乐团启蒙阶段已结束')
               this.canSignUp = orchestraDetail.data.data.canSignUp
               return
             }
@@ -480,7 +480,7 @@
         },
         async onSubmit() {
           if (!this.canSignUp) {
-            vant.showToast('学校已关闭')
+            vant.showToast('乐团启蒙阶段已结束')
             return
           }
           this.btnLoading = true

+ 2 - 2
public/project/preRegister.html

@@ -401,7 +401,7 @@
           if (orchestraDetail.data.code === 200) {
             this.orchestraName = orchestraDetail.data.data.name || ''
             if (!orchestraDetail.data.data.canSignUp) {
-              vant.showToast('学校已关闭')
+              vant.showToast('乐团预报名阶段已结束')
               this.canSignUp = orchestraDetail.data.data.canSignUp
               return
             }
@@ -534,7 +534,7 @@
         },
         async onSubmit() {
           if (!this.canSignUp) {
-            vant.showToast('学校已关闭')
+            vant.showToast('乐团预报名阶段已结束')
             return
           }
           this.btnLoading = true

+ 85 - 0
src/school/companion-teacher/companion-teacher-register.module.less

@@ -310,3 +310,88 @@ span {
 .fieldTitle {
   color: #fff !important;
 }
+
+.filterTitle {
+  font-size: 18px;
+  font-weight: 500;
+  color: #000000;
+  line-height: 25px;
+  text-align: center;
+  padding: 18px 0;
+}
+
+.searchResult {
+  padding: 0 16px;
+  overflow: hidden;
+  margin-bottom: 20px;
+  .searchTitle {
+    font-size: 16px;
+    color: #333333;
+    line-height: 22px;
+  }
+}
+
+.childContent {
+  display: flex;
+  flex-wrap: wrap;
+  text-align: center;
+  .item {
+    display: block;
+    margin-right: 5px;
+    margin-bottom: 10px;
+    min-width: 80px;
+    height: 32px;
+    &:nth-child(4n + 0) {
+      margin-right: 0;
+    }
+  }
+}
+
+.radio {
+  box-sizing: border-box;
+  :global {
+    .van-radio__icon,
+    .van-checkbox__icon {
+      display: none;
+    }
+    .van-checkbox__label {
+      margin-left: 0;
+    }
+    .van-tag--large {
+      // width: 94px;
+      // height: 30px;
+      font-size: 14px;
+      text-align: center;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+    }
+    .van-tag {
+      box-sizing: border-box;
+    }
+
+    .van-tag--primary {
+      color: #333333;
+      background-color: #fff;
+      border: #d8d8d8;
+    }
+    .van-tag--primary.van-tag--plain {
+      color: var(--van-primary-color);
+      background-color: #fff5f2;
+      border: var(--van-primary-color);
+    }
+
+    .van-tag--primary:before {
+      position: absolute;
+      top: 0;
+      right: 0;
+      bottom: 0;
+      left: 0;
+      border: 0.02667rem solid;
+      border-color: inherit;
+      border-radius: inherit;
+      content: '';
+      pointer-events: none;
+    }
+  }
+}

+ 65 - 28
src/school/companion-teacher/companion-teacher-register.tsx

@@ -16,7 +16,9 @@ import {
   closeToast,
   Picker,
   Popup,
-  CountDown
+  CountDown,
+  CheckboxGroup,
+  Sticky
 } from 'vant'
 import { defineComponent, onMounted, reactive, ref } from 'vue'
 import { useRoute } from 'vue-router'
@@ -51,6 +53,7 @@ export default defineComponent({
       pattern: /^1(3|4|5|6|7|8|9)\d{9}$/,
       columns: [] as any,
       pickerType: null, // 下拉类型
+      popupSelectSubjects: [] as any,
       selectSubjects: [] as any, // 选中的声部
       forms: {
         realName: '',
@@ -123,6 +126,7 @@ export default defineComponent({
     }
 
     const onSubjectRemove = (item: any, index: any) => {
+      console.log(item)
       showDialog({
         title: '提示',
         message: '您是否删除选中的声部',
@@ -130,36 +134,31 @@ export default defineComponent({
         showCancelButton: true
       }).then(() => {
         state.selectSubjects.splice(index, 1)
-        const tempSubjectIds: any = []
-        state.selectSubjects.forEach((subject: any) => {
-          tempSubjectIds.push(subject.value)
-        })
-        state.forms.subjectIds = tempSubjectIds
-        state.forms.showSubjectIds = tempSubjectIds.join(',')
+
+        const tIndex = state.popupSelectSubjects.findIndex((s: any) => s === item.value)
+        state.popupSelectSubjects.splice(tIndex, 1)
+
+        // const tempSubjectIds: any = []
+        // state.selectSubjects.forEach((subject: any) => {
+        //   tempSubjectIds.push(subject.value)
+        // })
+        state.forms.subjectIds = state.popupSelectSubjects
+        state.forms.showSubjectIds = state.popupSelectSubjects.join(',')
       })
     }
     // 选择声部
-    const onConfirmSubject = (val: any) => {
-      const selected = val.selectedOptions[0]
-      let isCheck = false
-      state.selectSubjects.forEach((subject: any) => {
-        if (subject.value === selected.value) {
-          isCheck = true
+    const onConfirmSubject = () => {
+      const tempSubjects: any = []
+      state.columnSubject.forEach((item: any) => {
+        if (state.popupSelectSubjects.includes(item.value)) {
+          tempSubjects.push(item)
         }
       })
-      // 判断是否有选择一样的数据
-      if (isCheck) {
-        state.showSubject = false
-        return
-      }
 
-      state.selectSubjects.push(val.selectedOptions[0])
-      const tempSubjectIds: any = []
-      state.selectSubjects.forEach((subject: any) => {
-        tempSubjectIds.push(subject.value)
-      })
-      state.forms.subjectIds = tempSubjectIds
-      state.forms.showSubjectIds = tempSubjectIds.join(',')
+      state.selectSubjects = tempSubjects
+      state.forms.subjectIds = state.popupSelectSubjects || []
+      state.forms.showSubjectIds = state.popupSelectSubjects.join(',')
+
       state.showSubject = false
     }
 
@@ -363,6 +362,7 @@ export default defineComponent({
         const subjects = data.subjectId
           ? data.subjectId.split(',').map((subject: any) => Number(subject))
           : []
+        state.popupSelectSubjects = subjects || []
         // 显示声部
         subjects.forEach((subject: any) => {
           const item = state.columnSubject.find((item: any) => item.value === subject)
@@ -700,13 +700,50 @@ export default defineComponent({
             columnsFieldNames={{ text: 'name', value: 'code', children: 'areas' }}
           />
         </Popup>
-        <Popup v-model:show={state.showSubject} position="bottom" round>
-          <Picker
+        <Popup
+          v-model:show={state.showSubject}
+          position="bottom"
+          round
+          safeAreaInsetBottom
+          closeable
+        >
+          {/* <Picker
             showToolbar
             columns={state.columnSubject}
             onCancel={() => (state.showSubject = false)}
             onConfirm={onConfirmSubject}
-          />
+          /> */}
+          <div class={styles.filterTitle}>全部声部</div>
+          <div class={styles.searchResult} style={{ maxHeight: '45vh', overflowY: 'auto' }}>
+            <CheckboxGroup
+              class={[styles.childContent, styles['radio-group']]}
+              modelValue={state.popupSelectSubjects}
+              onUpdate:modelValue={(val) => {
+                console.log(val)
+                state.popupSelectSubjects = val
+              }}
+            >
+              {state.columnSubject.map((item: any) => (
+                <Checkbox key={item.value} name={item.value} class={styles.radio}>
+                  <Tag
+                    class={[styles.item, 'van-ellipsis']}
+                    plain={state.popupSelectSubjects.includes(item.value)}
+                    type="primary"
+                    size="large"
+                  >
+                    {item.text}
+                  </Tag>
+                </Checkbox>
+              ))}
+            </CheckboxGroup>
+            <Sticky position="bottom" offsetBottom={0}>
+              <div class={['btnGroup']}>
+                <Button type="primary" round block onClick={onConfirmSubject}>
+                  确 认
+                </Button>
+              </div>
+            </Sticky>
+          </div>
         </Popup>
         {/* 学历 */}
         {/* 学历分为专科、本科、硕士、博士、其他 */}

+ 66 - 79
src/student/music-group/pre-apply/component/order.tsx

@@ -81,71 +81,71 @@ export default defineComponent({
       }
     }
 
-    const getDefaultParams = async () => {
-      try {
-        const { data } = await request.get('/api-student/sysParamConfig/queryByParamName', {
-          params: {
-            paramName: 'refund_reason'
-          }
-        })
-        const temp = data.paramValue.split('\n') || []
-        temp.forEach((item: any, index: number) => {
-          form.resionList.push({
-            text: item,
-            value: index + 1
-          })
-        })
-        form.resionList.push({
-          text: '其它原因',
-          value: 999
-        })
-        console.log(form.resionList, 'resionList')
-      } catch {
-        //
-      }
-    }
+    // const getDefaultParams = async () => {
+    //   try {
+    //     const { data } = await request.get('/api-student/sysParamConfig/queryByParamName', {
+    //       params: {
+    //         paramName: 'refund_reason'
+    //       }
+    //     })
+    //     const temp = data.paramValue.split('\n') || []
+    //     temp.forEach((item: any, index: number) => {
+    //       form.resionList.push({
+    //         text: item,
+    //         value: index + 1
+    //       })
+    //     })
+    //     form.resionList.push({
+    //       text: '其它原因',
+    //       value: 999
+    //     })
+    //     console.log(form.resionList, 'resionList')
+    //   } catch {
+    //     //
+    //   }
+    // }
 
-    // 确认退费
-    const onConfirmRefund = async () => {
-      try {
-        const status = form.checked === 999 && !form.resion
-        console.log(form.checked)
-        if (!form.checked) {
-          showToast('请选择原因')
-          return
-        } else if (status) {
-          showToast('请输入原因')
-          return
-        }
+    // // 确认退费
+    // const onConfirmRefund = async () => {
+    //   try {
+    //     const status = form.checked === 999 && !form.resion
+    //     console.log(form.checked)
+    //     if (!form.checked) {
+    //       showToast('请选择原因')
+    //       return
+    //     } else if (status) {
+    //       showToast('请输入原因')
+    //       return
+    //     }
 
-        const refundReason = form.resionList.find((item: any) => item.value === form.checked)
+    //     const refundReason = form.resionList.find((item: any) => item.value === form.checked)
 
-        console.log({
-          merOrderNo: form.refundSelect.orderNo,
-          refundReason: form.checked === 999 ? form.resion : refundReason.text
-        })
+    //     console.log({
+    //       merOrderNo: form.refundSelect.orderNo,
+    //       refundReason: form.checked === 999 ? form.resion : refundReason.text
+    //     })
 
-        await request.post('/api-student/userPaymentOrder/refundPayment', {
-          data: {
-            merOrderNo: form.refundSelect.orderNo,
-            refundReason: form.checked === 999 ? form.resion : refundReason.text
-          }
-        })
-        form.refundStatus = false
-        onSearch()
-      } catch {
-        //
-      }
-    }
+    //     await request.post('/api-student/userPaymentOrder/refundPayment', {
+    //       data: {
+    //         merOrderNo: form.refundSelect.orderNo,
+    //         refundReason: form.checked === 999 ? form.resion : refundReason.text
+    //       }
+    //     })
+    //     form.refundStatus = false
+    //     onSearch()
+    //   } catch {
+    //     //
+    //   }
+    // }
 
-    const onSearch = () => {
-      form.params.page = 1
-      form.list = []
-      form.listState.dataShow = true // 判断是否有数据
-      form.listState.loading = false
-      form.listState.finished = false
-      getList()
-    }
+    // const onSearch = () => {
+    //   form.params.page = 1
+    //   form.list = []
+    //   form.listState.dataShow = true // 判断是否有数据
+    //   form.listState.loading = false
+    //   form.listState.finished = false
+    //   getList()
+    // }
 
     // 查看详情
     const onDetails = (item: any) => {
@@ -158,7 +158,7 @@ export default defineComponent({
     }
 
     onMounted(() => {
-      getDefaultParams()
+      // getDefaultParams()
       getList()
     })
 
@@ -215,27 +215,14 @@ export default defineComponent({
                     )
                   }}
                 </Cell>
-                {item.refundable && (
+                {/* {item.refundable && (
                   <Cell class={styles.btnGroup} center>
                     {{
                       title: () => (
-                        <span class={styles.btnPrice}>
-                          {/* ¥{moneyFormat(item.currentPrice)} */}
-                        </span>
+                        <span class={styles.btnPrice}>¥{moneyFormat(item.currentPrice)}</span>
                       ),
                       value: () => (
                         <div class={styles.btns}>
-                          {/* {item.status === 'WAIT_PAY' && (
-                          <>
-                            <Button round plain color="#AAAAAA">
-                              修改订单
-                            </Button>
-                            <Button round plain color="#FF8057">
-                              继续支付
-                            </Button>
-                          </>
-                        )} */}
-                          {/* 订单成功 订单金额大于0 */}
                           <Button
                             round
                             plain
@@ -252,7 +239,7 @@ export default defineComponent({
                       )
                     }}
                   </Cell>
-                )}
+                )} */}
               </CellGroup>
             ))}
           </List>
@@ -260,7 +247,7 @@ export default defineComponent({
           <OEmpty btnStatus={false} tips="暂无订单" />
         )}
 
-        <Popup v-model:show={form.refundStatus} round style={{ width: '90%' }}>
+        {/* <Popup v-model:show={form.refundStatus} round style={{ width: '90%' }}>
           <div class={styles.container}>
             <div class={[styles.dialogTitle, styles.dialogRefund]}>
               <i></i>
@@ -316,7 +303,7 @@ export default defineComponent({
               </Button>
             </div>
           </div>
-        </Popup>
+        </Popup> */}
       </div>
     )
   }

+ 64 - 1
src/student/payment-result/index.module.less

@@ -58,7 +58,8 @@
   .buyDetail {
     display: flex;
     align-items: center;
-    padding: 18px 0 0 18px;
+    justify-content: space-between;
+    padding: 18px 18px 0;
     i {
       display: inline-block;
       margin-right: 6px;
@@ -71,6 +72,16 @@
     font-weight: 500;
     color: #333333;
     line-height: 22px;
+
+    .buyDetailTitle {
+      display: flex;
+      align-items: center;
+    }
+    .refundBtn {
+      font-size: 16px;
+      color: #777777;
+      line-height: 22px;
+    }
   }
 
   .buyImg {
@@ -81,3 +92,55 @@
     margin-right: 9px;
   }
 }
+
+.container {
+  :global {
+    .van-button {
+      font-size: 18px;
+      font-weight: 500;
+    }
+  }
+}
+
+.dialogTitle {
+  i {
+    display: inline-block;
+    width: 4px;
+    height: 14px;
+    background: #ff8057;
+    border-radius: 2px;
+    margin-right: 6px;
+  }
+
+  text-align: left;
+  font-size: 18px;
+  font-weight: 500;
+  color: #333333;
+  line-height: 25px;
+  padding: 20px 0 15px 25px;
+}
+
+.refundContent {
+  padding: 0 20px 25px;
+  .tips {
+    font-size: 15px;
+    color: #333333;
+    line-height: 21px;
+  }
+}
+
+.refundTitle {
+  padding-top: 25px;
+  font-size: 16px;
+  font-weight: 600;
+  color: #333333;
+  line-height: 22px;
+  span {
+    color: #f44541;
+  }
+}
+
+.phoneName {
+  background: #f2f2f2;
+  border-radius: 6px;
+}

+ 147 - 2
src/student/payment-result/index.tsx

@@ -1,6 +1,18 @@
 import OHeader from '@/components/o-header'
 import { defineComponent, onMounted, reactive, ref } from 'vue'
-import { Button, Cell, CellGroup, Image, showConfirmDialog, Tag } from 'vant'
+import {
+  Button,
+  Cell,
+  CellGroup,
+  Field,
+  Image,
+  Popup,
+  Radio,
+  RadioGroup,
+  showConfirmDialog,
+  showToast,
+  Tag
+} from 'vant'
 import styles from './index.module.less'
 import iconRefunding from './images/icon_refunding.png'
 import icon_success from './images/icon_success.png'
@@ -24,6 +36,13 @@ export default defineComponent({
       color: '#fff',
       backIconColor: 'white' as any
     })
+    const form = reactive({
+      resionList: [] as any,
+      refundStatus: false,
+      resion: null,
+      refundSelect: {} as any,
+      checked: null as any
+    })
     const getDetails = async () => {
       try {
         if (!route.query.orderNo) return
@@ -85,8 +104,62 @@ export default defineComponent({
       return temp[status]
     }
 
+    const getDefaultParams = async () => {
+      try {
+        const { data } = await request.get('/api-student/sysParamConfig/queryByParamName', {
+          params: {
+            paramName: 'refund_reason'
+          }
+        })
+        const temp = data.paramValue.split('\n') || []
+        temp.forEach((item: any, index: number) => {
+          form.resionList.push({
+            text: item,
+            value: index + 1
+          })
+        })
+        form.resionList.push({
+          text: '其它原因',
+          value: 999
+        })
+        console.log(form.resionList, 'resionList')
+      } catch {
+        //
+      }
+    }
+
+    // 确认退费
+    const onConfirmRefund = async () => {
+      try {
+        const status = form.checked === 999 && !form.resion
+        console.log(form.checked)
+        if (!form.checked) {
+          showToast('请选择原因')
+          return
+        } else if (status) {
+          showToast('请输入原因')
+          return
+        }
+
+        const refundReason = form.resionList.find((item: any) => item.value === form.checked)
+
+        await request.post('/api-student/userPaymentOrder/refundPayment', {
+          data: {
+            merOrderNo: route.query.orderNo,
+            refundReason: form.checked === 999 ? form.resion : refundReason.text
+          }
+        })
+
+        form.refundStatus = false
+        getDetails()
+      } catch {
+        //
+      }
+    }
+
     onMounted(() => {
       getDetails()
+      getDefaultParams()
       useEventListener(document, 'scroll', () => {
         const { y } = useWindowScroll()
         if (y.value > 52) {
@@ -148,7 +221,21 @@ export default defineComponent({
 
         <CellGroup inset class={styles.cellGroup}>
           <div class={styles.buyDetail}>
-            <i></i> 购买详情
+            <div class={styles.buyDetailTitle}>
+              <i></i> 购买详情
+            </div>
+            {state.orders.refundable ? (
+              <div
+                class={styles.refundBtn}
+                onClick={() => {
+                  form.refundStatus = true
+                }}
+              >
+                申请退费
+              </div>
+            ) : (
+              ''
+            )}
           </div>
           {state.goodsInfos.map((goods: any) => (
             <Cell>
@@ -179,6 +266,64 @@ export default defineComponent({
             </Button>
           </div>
         )}
+
+        <Popup v-model:show={form.refundStatus} round style={{ width: '90%' }}>
+          <div class={styles.container}>
+            <div class={styles.dialogTitle}>
+              <i></i>
+              申请退款
+            </div>
+
+            <div class={styles.refundContent}>
+              <div class={styles.tips}>
+                您将要发起退款,退款需承担千分之六的手续费,确认退款后款项将原路返还到您的付款账户中。
+              </div>
+
+              <div class={styles.refundTitle}>
+                <span>*</span>请选择您的退款原因
+              </div>
+
+              <RadioGroup v-model={form.checked}>
+                {form.resionList &&
+                  form.resionList.map((item: any) => (
+                    <Cell style="padding: 16px 0;" onClick={() => (form.checked = item.value)}>
+                      {{
+                        icon: () => <Radio name={item.value} />,
+                        title: () => <span style={'padding-left: 6px'}>{item.text}</span>
+                      }}
+                    </Cell>
+                  ))}
+              </RadioGroup>
+              {form.checked === 999 && (
+                <Field
+                  class={styles.phoneName}
+                  v-model={form.resion}
+                  placeholder="请输入原因"
+                  maxlength={50}
+                  type="textarea"
+                  rows={2}
+                />
+              )}
+            </div>
+
+            <div class={['van-hairline--top van-dialog__footer']}>
+              <Button
+                onClick={onConfirmRefund}
+                class={['van-button van-button--default van-button--large van-dialog__cancel']}
+              >
+                确认退款
+              </Button>
+              <Button
+                onClick={() => (form.refundStatus = false)}
+                class={[
+                  'van-button van-button--default van-button--large van-dialog__confirm van-hairline--left'
+                ]}
+              >
+                取消
+              </Button>
+            </div>
+          </div>
+        </Popup>
       </div>
     )
   }

+ 7 - 118
src/student/trade-record/component/paid-list.tsx

@@ -74,11 +74,12 @@ export default defineComponent({
     // REFUNDING: '退款中',
     // REFUNDED: '已退款'
 
-    const getList = async () => {
+    const getList = async (hideLoading = false) => {
       try {
         if (form.isClick) return
         form.isClick = true
         const res = await request.post('/api-student/userPaymentOrder/page', {
+          hideLoading: hideLoading,
           data: {
             ...form.params,
             orderType: form.currentType === 'ALL' ? null : form.currentType,
@@ -105,13 +106,13 @@ export default defineComponent({
       }
     }
 
-    const onSearch = () => {
+    const onSearch = (hideLoading = false) => {
       form.params.page = 1
       form.list = []
       form.listState.dataShow = true // 判断是否有数据
       form.listState.loading = false
       form.listState.finished = false
-      getList()
+      getList(hideLoading)
     }
 
     const formatOrderType = (orderType: string) => {
@@ -124,59 +125,6 @@ export default defineComponent({
       return select.text
     }
 
-    const getDefaultParams = async () => {
-      try {
-        const { data } = await request.get('/api-student/sysParamConfig/queryByParamName', {
-          params: {
-            paramName: 'refund_reason'
-          }
-        })
-        const temp = data.paramValue.split('\n') || []
-        temp.forEach((item: any, index: number) => {
-          form.resionList.push({
-            text: item,
-            value: index + 1
-          })
-        })
-        form.resionList.push({
-          text: '其它原因',
-          value: 999
-        })
-        console.log(form.resionList, 'resionList')
-      } catch {
-        //
-      }
-    }
-
-    // 确认退费
-    const onConfirmRefund = async () => {
-      try {
-        const status = form.checked === 999 && !form.resion
-        console.log(form.checked)
-        if (!form.checked) {
-          showToast('请选择原因')
-          return
-        } else if (status) {
-          showToast('请输入原因')
-          return
-        }
-
-        const refundReason = form.resionList.find((item: any) => item.value === form.checked)
-
-        await request.post('/api-student/userPaymentOrder/refundPayment', {
-          data: {
-            merOrderNo: form.refundSelect.orderNo,
-            refundReason: form.checked === 999 ? form.resion : refundReason.text
-          }
-        })
-
-        form.refundStatus = false
-        onSearch()
-      } catch {
-        //
-      }
-    }
-
     const onDetails = (item: any) => {
       router.push({
         path: 'payment-result',
@@ -188,7 +136,6 @@ export default defineComponent({
 
     onMounted(() => {
       getList()
-      getDefaultParams()
 
       Object.keys(orderType).forEach((key) => {
         form.typeArray.push({
@@ -221,7 +168,7 @@ export default defineComponent({
         {form.listState.dataShow ? (
           <OFullRefresh
             v-model:modelValue={form.listState.refreshing}
-            onRefresh={onSearch}
+            onRefresh={() => onSearch(true)}
             style={{
               minHeight: `calc(100vh - ${form.listState.height}px)`
             }}
@@ -254,7 +201,7 @@ export default defineComponent({
                       )
                     }}
                   </Cell>
-                  <Cell style={'padding: 0'}>
+                  {/* <Cell style={'padding: 0'}>
                     {{
                       title: () =>
                         item.refundable && (
@@ -271,7 +218,7 @@ export default defineComponent({
                           </Button>
                         )
                     }}
-                  </Cell>
+                  </Cell> */}
                 </CellGroup>
               ))}
             </List>
@@ -304,64 +251,6 @@ export default defineComponent({
             }}
           />
         </Popup>
-
-        <Popup v-model:show={form.refundStatus} round style={{ width: '90%' }}>
-          <div class={styles.container}>
-            <div class={styles.dialogTitle}>
-              <i></i>
-              申请退款
-            </div>
-
-            <div class={styles.refundContent}>
-              <div class={styles.tips}>
-                您将要发起退款,退款需承担千分之六的手续费,确认退款后款项将原路返还到您的付款账户中。
-              </div>
-
-              <div class={styles.refundTitle}>
-                <span>*</span>请选择您的退款原因
-              </div>
-
-              <RadioGroup v-model={form.checked}>
-                {form.resionList &&
-                  form.resionList.map((item: any) => (
-                    <Cell style="padding: 16px 0;" onClick={() => (form.checked = item.value)}>
-                      {{
-                        icon: () => <Radio name={item.value} />,
-                        title: () => <span style={'padding-left: 6px'}>{item.text}</span>
-                      }}
-                    </Cell>
-                  ))}
-              </RadioGroup>
-              {form.checked === 999 && (
-                <Field
-                  class={styles.phoneName}
-                  v-model={form.resion}
-                  placeholder="请输入原因"
-                  maxlength={50}
-                  type="textarea"
-                  rows={2}
-                />
-              )}
-            </div>
-
-            <div class={['van-hairline--top van-dialog__footer']}>
-              <Button
-                onClick={onConfirmRefund}
-                class={['van-button van-button--default van-button--large van-dialog__cancel']}
-              >
-                确认退款
-              </Button>
-              <Button
-                onClick={() => (form.refundStatus = false)}
-                class={[
-                  'van-button van-button--default van-button--large van-dialog__confirm van-hairline--left'
-                ]}
-              >
-                取消
-              </Button>
-            </div>
-          </div>
-        </Popup>
       </div>
     )
   }

+ 5 - 4
src/student/trade-record/component/refund-list.tsx

@@ -42,11 +42,12 @@ export default defineComponent({
       }
     })
 
-    const getList = async () => {
+    const getList = async (hideLoading = false) => {
       try {
         if (form.isClick) return
         form.isClick = true
         const res = await request.post('/api-student/userPaymentOrder/page', {
+          hideLoading: hideLoading,
           data: {
             ...form.params,
             orderType: form.currentType === 'ALL' ? null : form.currentType,
@@ -73,13 +74,13 @@ export default defineComponent({
       }
     }
 
-    const onSearch = () => {
+    const onSearch = (hideLoading = false) => {
       form.params.page = 1
       form.list = []
       form.listState.dataShow = true // 判断是否有数据
       form.listState.loading = false
       form.listState.finished = false
-      getList()
+      getList(hideLoading)
     }
 
     const formatOrderType = (orderType: string) => {
@@ -134,7 +135,7 @@ export default defineComponent({
         {form.listState.dataShow ? (
           <OFullRefresh
             v-model:modelValue={form.listState.refreshing}
-            onRefresh={onSearch}
+            onRefresh={() => onSearch(true)}
             style={{
               minHeight: `calc(100vh - ${form.listState.height}px)`
             }}

+ 5 - 4
src/student/trade-record/component/wait-pay.tsx

@@ -54,11 +54,12 @@ export default defineComponent({
       }
     })
 
-    const getList = async () => {
+    const getList = async (hideLoading = false) => {
       try {
         if (form.isClick) return
         form.isClick = true
         const res = await request.post('/api-student/userPaymentOrder/page', {
+          hideLoading: hideLoading,
           data: {
             ...form.params,
             orderType: form.currentType === 'ALL' ? null : form.currentType,
@@ -85,13 +86,13 @@ export default defineComponent({
       }
     }
 
-    const onSearch = () => {
+    const onSearch = (hideLoading = false) => {
       form.params.page = 1
       form.list = []
       form.listState.dataShow = true // 判断是否有数据
       form.listState.loading = false
       form.listState.finished = false
-      getList()
+      getList(hideLoading)
     }
 
     const formatOrderType = (orderType: string) => {
@@ -184,7 +185,7 @@ export default defineComponent({
         {form.listState.dataShow ? (
           <OFullRefresh
             v-model:modelValue={form.listState.refreshing}
-            onRefresh={onSearch}
+            onRefresh={() => onSearch(false)}
             style={{
               minHeight: `calc(100vh - ${form.listState.height}px)`
             }}

+ 5 - 10
src/views/unit-test/model/drag-question/index.tsx

@@ -84,16 +84,15 @@ export default defineComponent({
 
     // 返回选中的结果
     const onSelect = () => {
-      const options = state.options || []
+      // const options = state.options || []
       const list = state.list || []
       const result: any = []
 
       list.forEach((item: any, index: number) => {
-        const rightOption = options[index]
         result.push({
           answerId: item.index,
           answer: item.leftValue,
-          answerExtra: rightOption.rightValue
+          answerExtra: index + 1
         })
       })
       emit('update:value', result)
@@ -104,21 +103,17 @@ export default defineComponent({
       // 判断是否已经选中了
       if (item.checked) return
       const result: any = []
-      state.options.forEach((option: any) => {
-        const originOption = answers.value.find(
-          (child: any) => child.examinationQuestionAnswerId === option.rightIndex
-        )
+      state.options.forEach((option: any, index: any) => {
         result.push({
           answerId: option.index,
           answer: option.leftValue,
-          answerExtra: originOption.questionAnswer
+          answerExtra: index + 1
         })
       })
-      const rightOption = answers.value[state.options.length]
       result.push({
         answerId: item.examinationQuestionAnswerId,
         answer: item.questionAnswer,
-        answerExtra: rightOption.questionExtra
+        answerExtra: state.options.length + 1
       })
       emit('update:value', result)
 

+ 1 - 0
src/views/unit-test/practice-mode/index.tsx

@@ -130,6 +130,7 @@ export default defineComponent({
         const { data } = await request.post(
           '/api-student/studentUnitExamination/submitTrainingAnswer',
           {
+            hideLoading: true,
             data: result
           }
         )

+ 7 - 1
src/views/unit-test/unit-create/uni-last.tsx

@@ -20,6 +20,7 @@ import styles from './uni-last.module.less'
 import { useRoute, useRouter } from 'vue-router'
 import NewspaperItem from './modals/newspaper-item'
 import questIcon from '@/school/images/quest-icon.png'
+import { postMessage } from '@/helpers/native-message'
 // import { browser } from '@/helpers/utils'
 export default defineComponent({
   name: 'uni-test',
@@ -123,7 +124,12 @@ export default defineComponent({
         )
         showToast('创建成功')
         sessionStorage.removeItem('unit-create')
-        router.replace('/unit-list')
+        // 如果连接上面有班级编号,说明当前页面是从原生来的
+        if (route.query.classGroupId) {
+          postMessage({ api: 'back' })
+        } else {
+          router.replace('/unit-list')
+        }
       } catch (e) {
         console.log(e)
       }