Browse Source

添加支付

lex 2 years ago
parent
commit
5ae3eb68ba
38 changed files with 1116 additions and 407 deletions
  1. 9 5
      public/project/companionTeacher.html
  2. 4 3
      public/project/manageTeacher.html
  3. 2 1
      src/components/o-header/index.tsx
  4. 26 22
      src/components/o-protocol/index.tsx
  5. 12 2
      src/components/o-qrcode/index.tsx
  6. 14 0
      src/router/routes-student.ts
  7. 14 5
      src/school/companion-teacher/companion-teacher-register.tsx
  8. 7 0
      src/school/companion-teacher/compontent/teacher.tsx
  9. 8 4
      src/school/companion-teacher/unbind.tsx
  10. 9 3
      src/school/manage-teacher/manage-teacher-register.tsx
  11. 1 1
      src/school/orchestra/compontent/information.module.less
  12. 38 22
      src/school/orchestra/compontent/information.tsx
  13. 11 11
      src/school/orchestra/compontent/plan.tsx
  14. 12 2
      src/school/orchestra/index.tsx
  15. BIN
      src/student/member-center/images/member_bg.png
  16. BIN
      src/student/member-center/images/vip_bg.png
  17. 32 92
      src/student/member-center/index.module.less
  18. 145 144
      src/student/member-center/index.tsx
  19. 3 3
      src/student/music-group/layout/utils.tsx
  20. 0 8
      src/student/music-group/pre-apply/component/apply.tsx
  21. 4 3
      src/student/music-group/pre-apply/component/payment.tsx
  22. BIN
      src/student/music-group/pre-apply/images/download.png
  23. 24 0
      src/student/music-group/pre-apply/order-detail.module.less
  24. 112 39
      src/student/music-group/pre-apply/order-detail.tsx
  25. 1 1
      src/student/music-group/request-music.ts
  26. 109 0
      src/student/my-orchestra/apply-withdrawal.module.less
  27. 86 0
      src/student/my-orchestra/apply-withdrawal.tsx
  28. BIN
      src/student/my-orchestra/images/bg.png
  29. BIN
      src/student/my-orchestra/images/icon_change.png
  30. 136 5
      src/student/my-orchestra/index.module.less
  31. 152 16
      src/student/my-orchestra/index.tsx
  32. 105 0
      src/student/my-orchestra/photo-detail.tsx
  33. 11 3
      src/student/payment-result/index.tsx
  34. 3 2
      src/student/trade-record/component/paid-list.tsx
  35. 12 2
      src/student/trade-record/component/refund-list.tsx
  36. 13 3
      src/student/trade-record/component/wait-pay.tsx
  37. 1 1
      src/views/adapay/pay-define/index.tsx
  38. 0 4
      src/views/adapay/payment/index.tsx

+ 9 - 5
public/project/companionTeacher.html

@@ -51,8 +51,9 @@
           name="realName" placeholder="请填写真实姓名" maxlength="50">
         </van-field>
 
-        <van-field required label="手机号码" v-model="forms.phone" :rules="[{ required: true, message: '请输入学校手机号码' }]"
-          name="phone" placeholder="请输入学校手机号码">
+        <van-field required label="手机号码" v-model="forms.phone" type="tel" maxlength="11" minlength="11"
+          :rules="[{ required: true, message: '请输入手机号码' },{ pattern, message: '输入手机号有误' }]" name="phone"
+          placeholder="请输入学校手机号码">
         </van-field>
         <div class="phoneTips">
           <van-icon name="warning" size="16" />
@@ -90,7 +91,7 @@
           </template>
         </van-field>
 
-        <van-field required label="声部(可多选)" v-model="forms.cityCodeName" readonly name="cityCodeName"
+        <van-field required label="声部(可多选)" v-model="forms.showSubjectIds" readonly name="showSubjectIds"
           @click="showSubject = true" :rules="[{ required: true, message: '请选择声部', trigger: 'onChange' }]"
           placeholder="请选择声部">
           <template #right-icon>
@@ -105,7 +106,7 @@
           </template>
         </van-field>
         <van-field required label="验证码" v-model="forms.smsValidCode" name="smsValidCode"
-          :rules="[{ required: true, message: '请选择声部', trigger: 'onChange' }]" placeholder="请输入验证码">
+          :rules="[{ required: true, message: '请输入验证码', trigger: 'onChange' }]" placeholder="请输入验证码">
           <template #button>
             <van-button type="primary" round size="small" color="#ff8057">发送验证码</van-button>
           </template>
@@ -171,8 +172,9 @@
             cityCode: null,
             cityCodeName: '',
             provinceCode: null,
+            showSubjectIds: '',
             subjectIds: [],
-            smsValidCode: null,
+            smsValidCode: '',
           },
           btnLoading: false,
           checkPhone: false,
@@ -292,6 +294,7 @@
               tempSubjectIds.push(subject.value)
             })
             this.forms.subjectIds = tempSubjectIds
+            this.forms.showSubjectIds = tempSubjectIds.join(',')
           })
         },
         // 选择声部
@@ -316,6 +319,7 @@
             tempSubjectIds.push(subject.value)
           })
           this.forms.subjectIds = tempSubjectIds
+          this.forms.showSubjectIds = tempSubjectIds.join(',')
           this.showSubject = false
         }
       }

+ 4 - 3
public/project/manageTeacher.html

@@ -53,10 +53,11 @@
 
         <div class="phoneTips">
           <van-icon name="warning" size="16" />
-          提示:手机号码将成为您管乐团管理端登录账
+          提示:手机号码将成为您管乐团登录账
         </div>
-        <van-field required label="手机号码" v-model="forms.phone" :rules="[{ required: true, message: '请输入学校手机号码' }]"
-          name="phone" placeholder="请输入学校手机号码">
+        <van-field required label="手机号码" v-model="forms.phone" type="tel" maxlength="11" minlength="11"
+          :rules="[{ required: true, message: '请输入手机号码' },{ pattern, message: '输入手机号有误' }]" name="phone"
+          placeholder="请输入学校手机号码">
         </van-field>
 
         <van-field required label="身份证号码" v-model="forms.idCardNo" :rules="[

+ 2 - 1
src/components/o-header/index.tsx

@@ -128,6 +128,7 @@ export default defineComponent({
       this.$router.back()
     },
     clickRight() {
+      console.log('111')
       this.onClickRight && this.onClickRight()
     }
   },
@@ -166,7 +167,7 @@ export default defineComponent({
                 rightText={this.rightText}
                 fixed={this.isFixed}
                 border={this.border}
-                onClick-right={this.clickRight}
+                onClick-right={() => this.clickRight()}
                 onClick-left={this.onClickLeft}
                 v-slots={{
                   right: () => (this.$slots.right && this.$slots.right()) || this.rightText,

+ 26 - 22
src/components/o-protocol/index.tsx

@@ -4,11 +4,10 @@ import styles from './index.module.less'
 import activeButtonIcon from '@common/images/icon_checkbox.png'
 import inactiveButtonIcon from '@common/images/icon_checkbox_default.png'
 import ColHeader from '../o-header'
-import { state } from '@/state'
 import request from '@/helpers/request'
 const protocolText = {
-  BUY_ORDER: '《酷乐秀平台服务协议》',
-  REGISTER: '《酷乐秀平台注册协议》'
+  BUY_ORDER: '《管乐团平台服务协议》',
+  REGISTER: '《管乐团平台注册协议》'
 }
 export default defineComponent({
   name: 'o-protocol',
@@ -32,22 +31,26 @@ export default defineComponent({
       checked: this.modelValue,
       popupStatus: false,
       protocolHTML: '',
-      protocolPopup: null as any,
-      baseUrl: state.platformType === 'STUDENT' ? '/api-student' : '/api-teacher'
+      protocolPopup: null as any
     }
   },
   async mounted() {
     try {
-      const res = await request.get(this.baseUrl + '/sysUserContractRecord/checkContractSign', {
-        params: {
-          contractType: this.prototcolType
-        }
-      })
+      // const res = await request.get(
+      //   '/api-student/schoolContractTemplate/queryLatestContractTemplate',
+      //   {
+      //     params: {
+      //       contractType: this.prototcolType
+      //     }
+      //   }
+      // )
       // console.log(res)
-      this.exists = res.data
-      this.checked = this.checked || this.exists
-      this.$emit('update:modelValue', this.checked || this.exists)
-    } catch {}
+      // this.exists = res.data
+      // this.checked = this.checked || this.exists
+      // this.$emit('update:modelValue', this.checked || this.exists)
+    } catch {
+      //
+    }
     this.checked = this.modelValue
     // this.getContractDetail()
     window.addEventListener('hashchange', this.onHash, false)
@@ -63,16 +66,17 @@ export default defineComponent({
   methods: {
     async getContractDetail() {
       try {
-        console.log('getContractDetail')
         // 判断是否有协议内容
         if (!this.protocolHTML) {
-          const res = await request.get(this.baseUrl + '/sysUserContractRecord/queryContract', {
-            params: {
-              contractType: this.prototcolType
+          const { data } = await request.get(
+            '/api-student/schoolContractTemplate/queryLatestContractTemplate',
+            {
+              params: {
+                contractType: this.prototcolType
+              }
             }
-          })
-          this.protocolHTML = res.data
-          console.log(res)
+          )
+          this.protocolHTML = data.contractTemplateContent
         }
         this.onPopupClose()
       } catch {}
@@ -131,7 +135,7 @@ export default defineComponent({
           position="bottom"
           style={{ height: '100%' }}
         >
-          {this.showHeader && <ColHeader title="酷乐秀平台服务协议" />}
+          {this.showHeader && <ColHeader title="管乐团平台服务协议" />}
           {this.popupStatus && (
             <div class={styles.protocolContent} id="mProtocol">
               <div class={styles.protocolContent} v-html={this.protocolHTML}></div>

+ 12 - 2
src/components/o-qrcode/index.tsx

@@ -1,4 +1,4 @@
-import { defineComponent, onMounted, ref } from 'vue'
+import { defineComponent, onMounted, ref, watch } from 'vue'
 import logo from '@common/images/logo.png'
 import QRCode from 'qrcode'
 import styles from './index.module.less'
@@ -16,7 +16,8 @@ export default defineComponent({
   },
   setup(props) {
     const canvas = ref()
-    onMounted(() => {
+
+    const init = () => {
       QRCode.toCanvas(
         canvas.value,
         props.text,
@@ -28,6 +29,15 @@ export default defineComponent({
           console.log('success')
         }
       )
+    }
+    watch(
+      () => props.text,
+      () => {
+        init()
+      }
+    )
+    onMounted(() => {
+      init()
     })
     return () => (
       <div class={styles.qrcode} style={{ width: props.size, height: props.size }}>

+ 14 - 0
src/router/routes-student.ts

@@ -65,6 +65,20 @@ export default [
         meta: {
           title: '我的乐团'
         }
+      }, {
+        path: '/photo-detail',
+        name: 'photo-detail',
+        component: () => import('@/student/my-orchestra/photo-detail'),
+        meta: {
+          title: '相片'
+        }
+      }, {
+        path: '/apply-withdrawal',
+        name: 'apply-withdrawal',
+        component: () => import('@/student/my-orchestra/apply-withdrawal'),
+        meta: {
+          title: '申请退团'
+        }
       }
     ]
   },

+ 14 - 5
src/school/companion-teacher/companion-teacher-register.tsx

@@ -52,6 +52,7 @@ export default defineComponent({
         cityCode: null,
         cityCodeName: '',
         provinceCode: null,
+        showSubjectIds: '',
         subjectIds: [],
         smsValidCode: '',
         educationBackground: '', // 学历
@@ -113,6 +114,7 @@ export default defineComponent({
           tempSubjectIds.push(subject.value)
         })
         state.forms.subjectIds = tempSubjectIds
+        state.forms.showSubjectIds = tempSubjectIds.join(',')
       })
     }
     // 选择声部
@@ -136,6 +138,7 @@ export default defineComponent({
         tempSubjectIds.push(subject.value)
       })
       state.forms.subjectIds = tempSubjectIds
+      state.forms.showSubjectIds = tempSubjectIds.join(',')
       state.showSubject = false
     }
 
@@ -242,18 +245,24 @@ export default defineComponent({
               required
               label="手机号码"
               v-model={state.forms.phone}
-              rules={[{ required: true, message: '请输入手机号码' }]}
+              rules={[
+                { required: true, message: '请输入手机号码' },
+                { pattern: state.pattern, message: '输入手机号码有误' }
+              ]}
               name="phone"
               placeholder="请输入手机号码"
+              maxlength={11}
+              type="tel"
             ></Field>
             <Field
               required
               label="验证码"
               v-model={state.forms.smsValidCode}
               name="smsValidCode"
-              rules={[{ required: true, message: '请选择声部', trigger: 'onChange' }]}
+              rules={[{ required: true, message: '请输入验证码', trigger: 'onChange' }]}
               placeholder="请输入验证码"
               maxlength={6}
+              type="tel"
             >
               {{
                 button: () =>
@@ -417,9 +426,9 @@ export default defineComponent({
             <Field
               required
               label="声部(可多选)"
-              v-model={state.forms.cityCodeName}
+              v-model={state.forms.showSubjectIds}
               readonly
-              name="cityCodeName"
+              name="showSubjectIds"
               onClick={() => (state.showSubject = true)}
               rules={[{ required: true, message: '请选择声部', trigger: 'onChange' }]}
               placeholder="请选择声部"
@@ -542,7 +551,7 @@ export default defineComponent({
               <p class={styles['submit-o']}>
                 {state.name} <span>【伴学老师】</span>
               </p>
-              <p class={styles['submit-tips']}>请下载管乐团管理端APP进行授课</p>
+              <p class={styles['submit-tips']}>请下载管乐团老师端APP进行授课</p>
               <Button
                 type="primary"
                 color="#FF8057"

+ 7 - 0
src/school/companion-teacher/compontent/teacher.tsx

@@ -11,6 +11,12 @@ import OEmpty from '@/components/o-empty'
 
 export default defineComponent({
   name: 'teacher',
+  props: {
+    teacherId: {
+      type: String,
+      default: ''
+    }
+  },
   emits: ['close', 'select'],
   setup(props, { slots, attrs, emit }) {
     const form = reactive({
@@ -35,6 +41,7 @@ export default defineComponent({
           data: {
             ...form.params,
             schoolId: state.user.data.school.id,
+            removeTeacherId: props.teacherId,
             delFlag: false
           }
         })

+ 8 - 4
src/school/companion-teacher/unbind.tsx

@@ -17,14 +17,14 @@ export default defineComponent({
     const state = reactive({
       teacherStatus: false,
       classList: [] as any,
-      selectTeacher: {} as any
+      selectTeacher: {} as any,
+      teacherId: route.query.id
     })
     const getClassDetail = async () => {
       try {
-        const query = route.query
         const { data } = await request.post('/api-school/classGroup/page', {
           data: {
-            teacherId: query.id,
+            teacherId: state.teacherId,
             schoolId: baseState.user.data.school.id,
             page: 1,
             rows: 100
@@ -137,7 +137,11 @@ export default defineComponent({
         </OSticky>
 
         <OPopup v-model:modelValue={state.teacherStatus}>
-          <Teacher onClose={() => (state.teacherStatus = false)} onSelect={onSelectItem} />
+          <Teacher
+            teacherId={state.teacherId as any}
+            onClose={() => (state.teacherStatus = false)}
+            onSelect={onSelectItem}
+          />
         </OPopup>
       </>
     )

+ 9 - 3
src/school/manage-teacher/manage-teacher-register.tsx

@@ -175,18 +175,24 @@ export default defineComponent({
               required
               label="手机号码"
               v-model={state.forms.phone}
-              rules={[{ required: true, message: '请输入手机号码' }]}
+              rules={[
+                { required: true, message: '请输入手机号码' },
+                { pattern: state.pattern, message: '输入手机号码有误' }
+              ]}
               name="phone"
               placeholder="请输入手机号码"
+              maxlength={11}
+              type="tel"
             ></Field>
             <Field
               required
               label="验证码"
               v-model={state.forms.smsValidCode}
               name="smsValidCode"
-              rules={[{ required: true, message: '请选择声部', trigger: 'onChange' }]}
+              rules={[{ required: true, message: '请输入验证码', trigger: 'onChange' }]}
               placeholder="请输入验证码"
               maxlength={6}
+              type="tel"
             >
               {{
                 button: () =>
@@ -309,7 +315,7 @@ export default defineComponent({
               <p class={styles['submit-o']}>
                 {state.name} <span>【管理老师】</span>
               </p>
-              <p class={styles['submit-tips']}>请下载管乐团管理端APP进行授课</p>
+              <p class={styles['submit-tips']}>请下载管乐团管理端APP</p>
               <Button
                 type="primary"
                 color="#64A9FF"

+ 1 - 1
src/school/orchestra/compontent/information.module.less

@@ -95,7 +95,7 @@
 
     .codeTitle {
       text-align: center;
-      padding-top: 13px;
+      padding-top: 14px;
       font-size: 24px;
       font-weight: bold;
       color: #ffffff;

+ 38 - 22
src/school/orchestra/compontent/information.tsx

@@ -28,6 +28,7 @@ export default defineComponent({
       check: [],
       checkboxRefs: [] as any,
       showQrcode: false,
+      qrcodeUrl: '',
       isLoading: false,
       list: [] as any,
       listState: {
@@ -37,11 +38,13 @@ export default defineComponent({
       },
 
       params: {
-        startTime: dayjs().year() + '-03-01 00:00:00',
-        endTime: dayjs().year() + '-09-01 00:00:00',
+        startTime: dayjs().year() - 1 + '-09-01 00:00:00',
+        endTime: dayjs().year() + '-03-01 00:00:00',
         page: 1,
         rows: 20
-      }
+      },
+
+      orchestraInfo: {} as any // 乐团详情
     })
 
     // 选择学期
@@ -55,12 +58,12 @@ export default defineComponent({
       state.actionType = val.value
 
       if (val.value === 'up') {
-        state.params.startTime = state.currentData[0] + '-03-01 00:00:00'
-        state.params.endTime = state.currentData[0] + '-09-01 00:00:00'
+        state.params.startTime = Number(state.currentData[0]) - 1 + '-09-01 00:00:00'
+        state.params.endTime = state.currentData[0] + '-03-01 00:00:00'
       } else if (val.value === 'down') {
         console.log(dayjs().add(1, 'year'), 'dayjs().add(1, ')
-        state.params.startTime = state.currentData[0] + '-09-01 00:00:00'
-        state.params.endTime = Number(state.currentData[0]) + 1 + '-03-01 00:00:00'
+        state.params.startTime = state.currentData[0] + '-03-01 00:00:00'
+        state.params.endTime = Number(state.currentData[0]) + '-09-01 00:00:00'
       }
       onSearch()
     }
@@ -68,11 +71,11 @@ export default defineComponent({
     const onConfirmDate = (date: any) => {
       state.currentData = date.selectedValues
       if (state.actionType == 'up') {
-        state.params.startTime = date.selectedValues[0] + '-03-01 00:00:00'
-        state.params.endTime = date.selectedValues[0] + '-09-01 00:00:00'
+        state.params.startTime = Number(date.selectedValues[0]) - 1 + '-09-01 00:00:00'
+        state.params.endTime = date.selectedValues[0] + '-03-01 00:00:00'
       } else if (state.actionType == 'down') {
-        state.params.startTime = date.selectedValues[0] + '-09-01 00:00:00'
-        state.params.endTime = Number(date.selectedValues[0]) + 1 + '-03-01 00:00:00'
+        state.params.startTime = date.selectedValues[0] + '-03-01 00:00:00'
+        state.params.endTime = Number(date.selectedValues[0]) + '-09-01 00:00:00'
       }
       state.timeShow = false
       onSearch()
@@ -81,7 +84,7 @@ export default defineComponent({
     const getDetails = async () => {
       try {
         const { data } = await request.get('/api-school/orchestra/detail/' + route.query.id)
-        // console.log(data)
+        state.orchestraInfo = data || {}
       } catch {
         //
       }
@@ -216,7 +219,7 @@ export default defineComponent({
                     <p class={styles.name}>在读学生</p>
                   </GridItem>
                   <GridItem>
-                    <p class={[styles.title, styles.teacher]}>{item.teacherName || '/'}</p>
+                    <p class={[styles.title, styles.teacher]}>{item.teacherName || '-'}</p>
                     <p class={styles.name}>伴学指导</p>
                   </GridItem>
                   <GridItem>
@@ -233,13 +236,26 @@ export default defineComponent({
           <OEmpty btnStatus={false} classImgSize="SMALL" tips="暂无班级" />
         )}
 
-        <OSticky position="bottom">
-          <div class={'btnGroup'}>
-            <Button round block type="primary" onClick={() => (state.showQrcode = true)}>
-              报名二维码
-            </Button>
-          </div>
-        </OSticky>
+        {/*  */}
+        {state.orchestraInfo.type === 'DELIVERY' &&
+          ['REGISTER', 'DOING', 'DONE'].includes(state.orchestraInfo.status) && (
+            <OSticky position="bottom">
+              <div class={'btnGroup'}>
+                <Button
+                  round
+                  block
+                  type="primary"
+                  onClick={() => {
+                    state.showQrcode = true
+                    state.qrcodeUrl =
+                      window.location.origin + '/orchestra-student/#/preApply?id=' + route.query.id
+                  }}
+                >
+                  报名二维码
+                </Button>
+              </div>
+            </OSticky>
+          )}
 
         <Popup
           v-model:show={state.showQrcode}
@@ -251,10 +267,10 @@ export default defineComponent({
             <div class={styles.codeImg}>
               <div class={styles.codeContent}>
                 <h2 class={styles.codeTitle}>乐团报名</h2>
-                <div class={styles.codeName}>武汉小学2022上学期团武汉小学</div>
+                <div class={[styles.codeName, 'van-ellipsis']}>{state.orchestraInfo.name}</div>
 
                 <div class={styles.codeQr}>
-                  <OQrcode text="http://ponline.dayaedu.com/" size={'400'} />
+                  <OQrcode text={state.qrcodeUrl} size={'400'} />
                 </div>
                 <div style={{ textAlign: 'center' }}>
                   <span class={styles.codeBtnText}>扫描上方二维码完成资料填写</span>

+ 11 - 11
src/school/orchestra/compontent/plan.tsx

@@ -34,8 +34,8 @@ export default defineComponent({
       },
 
       params: {
-        startTime: dayjs().year() + '-03-01 00:00:00',
-        endTime: dayjs().year() + '-09-01 00:00:00',
+        startTime: dayjs().year() - 1 + '-09-01 00:00:00',
+        endTime: dayjs().year() + '-03-01 00:00:00',
         page: 1,
         rows: 20
       }
@@ -51,12 +51,12 @@ export default defineComponent({
       state.actionType = val.value
 
       if (val.value === 'up') {
-        state.params.startTime = state.currentData[0] + '-03-01 00:00:00'
-        state.params.endTime = state.currentData[0] + '-09-01 00:00:00'
+        state.params.startTime = Number(state.currentData[0]) - 1 + '-09-01 00:00:00'
+        state.params.endTime = state.currentData[0] + '-03-01 00:00:00'
       } else if (val.value === 'down') {
         console.log(dayjs().add(1, 'year'), 'dayjs().add(1, ')
-        state.params.startTime = state.currentData[0] + '-09-01 00:00:00'
-        state.params.endTime = Number(state.currentData[0]) + 1 + '-03-01 00:00:00'
+        state.params.startTime = state.currentData[0] + '-03-01 00:00:00'
+        state.params.endTime = Number(state.currentData[0]) + '-09-01 00:00:00'
       }
       onSearch()
     }
@@ -64,11 +64,11 @@ export default defineComponent({
     const onConfirmDate = (date: any) => {
       state.currentData = date.selectedValues
       if (state.actionType == 'up') {
-        state.params.startTime = date.selectedValues[0] + '-03-01 00:00:00'
-        state.params.endTime = date.selectedValues[0] + '-09-01 00:00:00'
+        state.params.startTime = Number(date.selectedValues[0]) - 1 + '-09-01 00:00:00'
+        state.params.endTime = date.selectedValues[0] + '-03-01 00:00:00'
       } else if (state.actionType == 'down') {
-        state.params.startTime = date.selectedValues[0] + '-09-01 00:00:00'
-        state.params.endTime = Number(date.selectedValues[0]) + 1 + '-03-01 00:00:00'
+        state.params.startTime = date.selectedValues[0] + '-03-01 00:00:00'
+        state.params.endTime = Number(date.selectedValues[0]) + '-09-01 00:00:00'
       }
       state.timeShow = false
       onSearch()
@@ -193,7 +193,7 @@ export default defineComponent({
                     ),
                     value: () => (
                       <>
-                        <p class={styles.courseware}>{item.newestLessonPlanDetailName || '/'}</p>
+                        <p class={styles.courseware}>{item.newestLessonPlanDetailName || '-'}</p>
                         <p class={styles.teacherDesc}>最新课件</p>
                       </>
                     )

+ 12 - 2
src/school/orchestra/index.tsx

@@ -34,6 +34,15 @@ export default defineComponent({
       }
     })
 
+    const formatType = (type: any) => {
+      const template = {
+        DELIVERY: '交付团',
+        PROMOTION: '晋升团'
+      }
+
+      return template[type] || '全部乐团'
+    }
+
     const onSelect = (val: any) => {
       form.actions.forEach((item: any) => {
         item.color = null
@@ -118,7 +127,8 @@ export default defineComponent({
               {{
                 reference: () => (
                   <div class={styles.searchBand}>
-                    全部乐团 <Icon name={form.showPopover ? 'arrow-up' : 'arrow-down'} />
+                    {formatType(form.params.type)}
+                    <Icon name={form.showPopover ? 'arrow-up' : 'arrow-down'} />
                   </div>
                 )
               }}
@@ -150,7 +160,7 @@ export default defineComponent({
                       </Tag>
                     </div>
                   ),
-                  label: () => <p>学生人数:{item.currentStudentNum}人</p>
+                  label: () => <p>学生人数:{item.currentStudentNum || 0}人</p>
                 }}
               </Cell>
             ))}

BIN
src/student/member-center/images/member_bg.png


BIN
src/student/member-center/images/vip_bg.png


+ 32 - 92
src/student/member-center/index.module.less

@@ -22,7 +22,7 @@
         content: ' ';
         width: 4px;
         height: 17px;
-        background: #01c1b5;
+        background: var(--van-primary-color);
         display: inline-block;
         margin-right: 7px;
         border-radius: 8px;
@@ -161,44 +161,56 @@
   .system-item {
     display: flex;
     flex-direction: column;
-    align-items: center;
-    justify-content: center;
+    // align-items: center;
+    // justify-content: center;
     flex: 1 0 auto;
-    width: 96px;
+    // width: 96px;
     min-height: 120px;
     box-sizing: border-box;
     background: #ffffff;
     border-radius: 12px;
     border: 1px solid #e5e5e5;
-    margin-left: 10px;
-    &:first-child {
-      margin-left: 0;
-    }
     .title {
-      font-size: 14px;
       font-weight: 500;
-      color: #333333;
+      font-size: 14px;
+      color: #814014 !important;
       line-height: 20px;
+      span {
+        color: #814014 !important;
+      }
+      padding: 11px 0 9px;
+      margin: 0 11px;
+      // border-bottom: 1px solid #b1652e;
+      &::after {
+        border-color: rgba(177, 101, 46, 0.27);
+      }
+    }
+
+    .priceGroup {
+      display: flex;
+      align-items: baseline;
+      padding: 19px 12px 9px;
     }
     .price {
-      color: #dc9362;
-      font-size: 25px;
-      line-height: 1.5;
+      font-size: 36px;
+      font-weight: 500;
+      color: #b1652e;
       span {
         font-size: 16px;
       }
     }
     .originalPrice {
-      color: #937059;
-      font-size: 13px;
+      margin-left: 8px;
+      font-size: 24px;
+      color: #c59575 !important;
+      line-height: 16px;
+      font-weight: 300;
     }
 
     &.active {
-      background: linear-gradient(
-        215deg,
-        #ffe7c4 0%,
-        rgba(250, 211, 156, 0.21) 100%
-      );
+      // background: linear-gradient(215deg, #ffe7c4 0%, rgba(250, 211, 156, 0.21) 100%);
+      background: url('./images/vip_bg.png') no-repeat center center;
+      background-size: cover;
       border: 1px solid #b1652e;
       position: relative;
       .title {
@@ -300,75 +312,3 @@
     height: 29px;
   }
 }
-
-.discountItem {
-  height: 14px;
-  padding-bottom: 2px;
-  img {
-    height: 100%;
-  }
-}
-
-.discountBuy {
-  height: 18px;
-  padding-bottom: 0;
-  margin-left: 8px;
-}
-
-.shareBtn {
-  display: flex;
-  align-items: flex-start;
-  color: #666;
-  font-size: 14px;
-  line-height: 20px !important;
-  :global(.van-image) {
-    width: 18px;
-    height: 18px;
-    margin-right: 6px;
-  }
-}
-
-.shareVip {
-  position: relative;
-  margin-top: 50px;
-  display: flex;
-  flex: 1;
-  align-items: center;
-  padding: 11px 6px 11px;
-  background: #ffffff;
-  border-radius: 10px;
-
-  .icon {
-    width: 36px;
-    height: 36px;
-    border-radius: 10px;
-  }
-  .info {
-    margin-left: 6px;
-    flex: 1;
-    word-break: break-all;
-    > h4 {
-      color: var(--music-list-item-title-color);
-      font-size: 14px;
-      font-weight: 600;
-    }
-    > p {
-      color: var(--music-list-item-mate-color);
-      line-height: 17px;
-    }
-  }
-}
-
-.tagDiscount {
-  position: absolute;
-  top: -23px;
-  left: 15px;
-  padding: 0 10px;
-  height: 23px;
-  background: linear-gradient(180deg, #ffb635 0%, #ff4e18 100%);
-  border-radius: 8px 8px 0px 0px;
-  font-size: 14px;
-  font-weight: 600;
-  color: #ffffff;
-  line-height: 24px;
-}

+ 145 - 144
src/student/member-center/index.tsx

@@ -1,4 +1,4 @@
-import { Button, Cell, Icon, Image, Popup, Toast } from 'vant'
+import { Button, Cell, Icon, Image, Popup, showConfirmDialog, Toast } from 'vant'
 import { defineComponent } from 'vue'
 import styles from './index.module.less'
 import request from '@/helpers/request'
@@ -24,29 +24,21 @@ export default defineComponent({
   data() {
     const query = this.$route.query
     return {
-      activityId: query.activityId,
-      recomUserId: query.recomUserId,
-      apiSuffix: state.platformType === 'STUDENT' ? '/api-student' : '/api-teacher',
-      agreeStatus: false,
-      functionList: [],
-      memberList: [],
+      functionList: [] as any,
       selectMember: {} as any,
-      params: {
-        page: 1,
-        rows: 20
-      }
+      users: {} as any
     }
   },
   computed: {
     userInfo() {
-      const users = state.user.data
+      const users = this.users
+
       return {
-        username: users?.username,
-        phone: users?.phone,
-        avatar: users?.heardUrl,
-        id: users?.userId,
-        memberRankSettingId: users?.memberRankSettingId,
-        isVip: users?.isVip,
+        username: users?.nickname || '',
+        phone: users?.phone || '',
+        avatar: users?.avatar,
+        id: users?.id,
+        isVip: users?.vipMember,
         membershipDays: users?.membershipDays,
         membershipEndTime: users?.membershipEndTime
       }
@@ -54,58 +46,86 @@ export default defineComponent({
   },
   async mounted() {
     try {
-      const userInfo = await request.get(
-        state.platformType === 'TEACHER'
-          ? '/api-teacher/teacher/queryUserInfo'
-          : '/api-student/student/queryUserInfo'
-      )
-      setLogin(userInfo.data)
-
-      const res = await request.post(`${this.apiSuffix}/memberPriceSettings/vipPermissions`)
-      const result = res.data || []
-      this.functionList = result.map((item: any) => {
-        return {
-          title: item.paramName,
-          icon: getAssetsHomeFile(`${item.paramValue}.png`)
+      const userInfo = await request.get('/api-student/student/member')
+      this.users = userInfo.data || {}
+      this.functionList = [
+        {
+          title: '五线谱<br />跟播',
+          icon: getAssetsHomeFile(`1.png`)
+        },
+        {
+          title: '演奏指法<br />跟播',
+          icon: getAssetsHomeFile(`2.png`)
+        },
+        {
+          title: '原声/伴奏<br />切换',
+          icon: getAssetsHomeFile(`3.png`)
+        },
+        {
+          title: '播放速度<br />调整',
+          icon: getAssetsHomeFile(`4.png`)
+        },
+        {
+          title: '五线谱选段<br />播放',
+          icon: getAssetsHomeFile(`5.png`)
+        },
+        {
+          title: '智能评测',
+          icon: getAssetsHomeFile(`6.png`)
+        },
+        {
+          title: '评测报告',
+          icon: getAssetsHomeFile(`7.png`)
+        },
+        {
+          title: '评测音视频<br />云储存',
+          icon: getAssetsHomeFile(`8.png`)
         }
-      })
-
-      const setting = await request.post(`${this.apiSuffix}/memberPriceSettings/list`, {
-        data: {
-          activityId: Number(this.activityId),
-          userId: this.recomUserId
-        }
-      })
-      const { list, ...more } = setting.data
-      const settingResult = list || []
-      let settingList: any = []
-      settingResult.forEach((item: any) => {
-        const tempItem = {
-          title: '',
-          salePrice: item.salePrice,
-          originalPrice: item.originalPrice,
-          period: item.period,
-          id: item.id,
-          discount: item.discount,
-          discountPrice: item.discountPrice,
-          status: false
-        }
-
-        tempItem.title = memberType[item.period]
+      ]
 
-        item.period !== 'DAY' && settingList.push(tempItem)
-      })
+      const { data } = await request.post(`/api-student/cityFeeSetting/member`)
+      this.selectMember = data
 
-      settingList = settingList ? settingList.reverse() : []
-      if (settingList.length > 0) {
-        settingList[0].status = true
-        this.selectMember = settingList[0]
-      }
-      console.log(settingList)
-      this.memberList = settingList
-    } catch {}
+      this.paymentOrderUnpaid()
+    } catch {
+      //
+    }
+    //
   },
   methods: {
+    // 查询未支付订单
+    async paymentOrderUnpaid() {
+      try {
+        const { data } = await request.get('/api-student/userPaymentOrder/unpaid')
+        // 判断是否有待支付订单
+        if (data.id) {
+          showConfirmDialog({
+            message: '您有待支付的订单,是否继续支付',
+            cancelButtonText: '取消订单',
+            confirmButtonText: '继续支付'
+          })
+            .then(() => {
+              const paymentConfig = data.paymentConfig
+              this.$router.push({
+                path: '/orderDetail',
+                query: {
+                  config: JSON.stringify(paymentConfig.paymentConfig),
+                  orderNo: paymentConfig.orderNo
+                }
+              })
+            })
+            .catch(async () => {
+              try {
+                await request.post('/api-student/userPaymentOrder/cancelPayment/' + data.orderNo)
+              } catch {
+                //
+              }
+            })
+        }
+      } catch {
+        //
+      }
+    },
     calcSalePrice(item: any) {
       // discount
       if (item.discount === 1) {
@@ -114,48 +134,44 @@ export default defineComponent({
       }
       return item.salePrice
     },
-    onSubmit() {
-      const member: any = this.selectMember
-      // 判断是否有会员
-      const startTime = this.userInfo.isVip
-        ? dayjs(this.userInfo.membershipEndTime).toDate()
-        : new Date()
-      let endTime = new Date()
-      if (member.period === 'MONTH') {
-        endTime = dayjs(startTime).add(1, 'month').toDate()
-      } else if (member.period === 'QUARTERLY') {
-        endTime = dayjs(startTime).add(3, 'month').toDate()
-      } else if (member.period === 'YEAR_HALF') {
-        endTime = dayjs(startTime).add(6, 'month').toDate()
-      } else if (member.period === 'YEAR') {
-        endTime = dayjs(startTime).add(1, 'year').toDate()
-      }
+    // 购买
+    async onSubmit() {
+      try {
+        const selectMember = this.selectMember
+        const params: any = [
+          {
+            goodsId: selectMember.id,
+            goodsNum: 1,
+            goodsType: 'VIP',
+            paymentCashAmount: selectMember.salePrice, // 现金支付金额
+            paymentCouponAmount: 0 // 优惠券金额
+          }
+        ] // 支付参数
 
-      // orderStatus.orderObject.orderType = 'VIP'
-      // orderStatus.orderObject.orderName = '小酷Ai' + member.title
-      // orderStatus.orderObject.orderDesc = '小酷Ai' + member.title
-      // orderStatus.orderObject.actualPrice = this.calcSalePrice(member)
-      // orderStatus.orderObject.recomUserId = this.recomUserId
-      // orderStatus.orderObject.activityId = this.activityId
-      // orderStatus.orderObject.orderNo = ''
-      // orderStatus.orderObject.orderList = [
-      //   {
-      //     orderType: 'VIP',
-      //     goodsName: '小酷Ai' + member.title,
-      //     id: member.id,
-      //     title: member.title,
-      //     price: this.calcSalePrice(member),
-      //     startTime: dayjs(startTime).format('YYYY-MM-DD'),
-      //     endTime: dayjs(endTime).format('YYYY-MM-DD'),
-      //     recomUserId: this.recomUserId
-      //   }
-      // ]
-      this.$router.push({
-        path: '/orderDetail',
-        query: {
-          orderType: 'VIP'
-        }
-      })
+        // 创建订单
+        const { data } = await request.post('/api-student/userPaymentOrder/executeOrder', {
+          data: {
+            orderType: 'VIP',
+            paymentCashAmount: this.selectMember.salePrice || 0,
+            paymentCouponAmount: 0,
+            goodsInfos: params,
+            orderName: '团练宝购买',
+            orderDesc: '团练宝购买'
+          }
+        })
+
+        console.log(data)
+        this.$router.push({
+          path: '/orderDetail',
+          query: {
+            config: JSON.stringify(data.paymentConfig),
+            orderNo: data.orderNo
+          }
+        })
+      } catch (e: any) {
+        //
+        console.log(e)
+      }
     }
   },
   render() {
@@ -185,7 +201,9 @@ export default defineComponent({
                       src="https://daya.ks3-cn-beijing.ksyun.com/202107/ScSTL1D.png"
                     />
                   )}
-                  <span class={styles.phone} v-html={`(${this.userInfo.phone})`}></span>
+                  {this.userInfo.phone && (
+                    <span class={styles.phone} v-html={`(${this.userInfo.phone})`}></span>
+                  )}
                 </div>
               ),
               label: () => (
@@ -211,30 +229,21 @@ export default defineComponent({
             </div>
 
             <div class={styles['system-list']}>
-              {this.memberList.map((item: any) => (
-                <div
-                  class={[styles['system-item'], item.status && styles.active]}
-                  onClick={() => {
-                    this.memberList.forEach((item: any) => {
-                      item.status = false
-                    })
-                    item.status = true
-                    this.selectMember = item
-                  }}
-                >
-                  <div class={styles.discountItem}>
-                    {item.discount == 1 && <img src={iconDiscount} />}
-                  </div>
-                  <p class={styles.title}>{item.title}</p>
+              <div class={[styles['system-item'], styles.active]}>
+                <p class={[styles.title, 'van-hairline--bottom']}>
+                  {memberType[this.selectMember.cardType]}
+                  <span>(6个月)</span>
+                </p>
+                <div class={styles.priceGroup}>
                   <p class={styles.price}>
                     <span>¥</span>
-                    {moneyFormat(this.calcSalePrice(item), '0,0[.]00')}
+                    {moneyFormat(this.selectMember.salePrice)}
                   </p>
                   <del class={styles.originalPrice}>
-                    ¥{moneyFormat(item.originalPrice, '0,0[.]00')}
+                    ¥{moneyFormat(this.selectMember.originalPrice)}
                   </del>
                 </div>
-              ))}
+              </div>
             </div>
           </div>
 
@@ -246,26 +255,18 @@ export default defineComponent({
             </p>
           </div>
 
-          {this.functionList.length > 0 && (
-            <div class={styles.memberItem}>
-              <div class={styles.title}>会员功能</div>
+          <div class={styles.memberItem}>
+            <div class={styles.title}>会员功能</div>
 
-              <div class={styles.member_function}>
-                {this.functionList.map((item: any) => (
-                  <div class={styles.function_item}>
-                    <Icon name={item.icon} size={34} />
-                    <div class={styles.function_text} v-html={item.title}></div>
-                  </div>
-                ))}
-              </div>
+            <div class={styles.member_function}>
+              {this.functionList.map((item: any) => (
+                <div class={styles.function_item}>
+                  <Icon name={item.icon} size={34} />
+                  <div class={styles.function_text} v-html={item.title}></div>
+                </div>
+              ))}
             </div>
-          )}
-
-          {/* <ColProtocol
-            v-model={this.agreeStatus}
-            showHeader
-            style={{ paddingLeft: 0, paddingRight: 0, marginBottom: '64px' }}
-          /> */}
+          </div>
         </div>
         <div class={styles.btnGroup}>
           <div class={styles.priceSection}>
@@ -288,7 +289,7 @@ export default defineComponent({
             class={styles.btn}
             onClick={this.onSubmit}
           >
-            立即支付
+            立即开通
           </Button>
         </div>
       </div>

+ 3 - 3
src/student/music-group/layout/utils.tsx

@@ -2,7 +2,7 @@
  * 删除token
  */
 export const removeAuth = () => {
-  sessionStorage.removeItem('AuthorizationMusic')
+  sessionStorage.removeItem('Authorization')
 }
 
 /**
@@ -11,12 +11,12 @@ export const removeAuth = () => {
  * @returns {void}
  */
 export const setAuth = (token: any) => {
-  sessionStorage.setItem('AuthorizationMusic', token)
+  sessionStorage.setItem('Authorization', token)
 }
 
 /**
  * 获取token
  */
 export const getAuth = () => {
-  sessionStorage.getItem('AuthorizationMusic')
+  sessionStorage.getItem('Authorization')
 }

+ 0 - 8
src/student/music-group/pre-apply/component/apply.tsx

@@ -183,14 +183,6 @@ export default defineComponent({
               v-model={forms.username}
               maxlength={15}
               rules={[{ validator, message }]}
-              // onBlur={() => {
-              //   setTimeout(function () {
-              //     const scrollHeight =
-              //       document.documentElement.scrollTop || document.body.scrollTop || 0
-
-              //     window.scrollTo(0, Math.max(scrollHeight - 1, 0))
-              //   }, 100)
-              // }}
             />
             <Field
               required

+ 4 - 3
src/student/music-group/pre-apply/component/payment.tsx

@@ -57,6 +57,7 @@ export default defineComponent({
               router.push({
                 path: '/orderDetail',
                 query: {
+                  pm: 1, // h5乐团报名
                   config: JSON.stringify(paymentConfig.paymentConfig),
                   orderNo: paymentConfig.orderNo
                 }
@@ -243,8 +244,8 @@ export default defineComponent({
             paymentCashAmount: state.orderInfo.needPrice || 0,
             paymentCouponAmount: 0,
             goodsInfos: params,
-            orderName: '订单详情',
-            orderDesc: '订单详情'
+            orderName: '会员购买',
+            orderDesc: '会员购买'
           }
         })
 
@@ -252,6 +253,7 @@ export default defineComponent({
         router.push({
           path: '/orderDetail',
           query: {
+            pm: 1, // h5乐团报名
             config: JSON.stringify(data.paymentConfig),
             orderNo: data.orderNo
           }
@@ -260,7 +262,6 @@ export default defineComponent({
         //
         console.log(e)
       }
-      // router.push('/orderDetail')
     }
 
     onMounted(() => {

BIN
src/student/music-group/pre-apply/images/download.png


+ 24 - 0
src/student/music-group/pre-apply/order-detail.module.less

@@ -93,6 +93,15 @@
   }
 }
 
+.popupCode {
+  :global {
+    .van-popup__close-icon {
+      color: #fff;
+      right: 24px;
+    }
+  }
+}
+
 .codeContainer {
   position: relative;
   .codeClose {
@@ -218,3 +227,18 @@
     line-height: 20px;
   }
 }
+
+.freight {
+  margin-top: 12px;
+  background: #ffffff;
+  border-radius: 10px;
+  overflow: hidden;
+  padding: 15px 12px;
+  font-size: 16px;
+  color: #333;
+  :global {
+    .van-cell__value {
+      color: #ff4e19;
+    }
+  }
+}

+ 112 - 39
src/student/music-group/pre-apply/order-detail.tsx

@@ -1,25 +1,15 @@
 import OHeader from '@/components/o-header'
-import { defineComponent, onMounted, reactive, ref } from 'vue'
+import { computed, defineComponent, onMounted, reactive, ref } from 'vue'
 import styles from './order-detail.module.less'
 import Addres from './component/addres'
 import OSticky from '@/components/o-sticky'
-import {
-  Button,
-  Cell,
-  CellGroup,
-  Image,
-  Popup,
-  showConfirmDialog,
-  showDialog,
-  showToast,
-  Tag
-} from 'vant'
+import { Button, Cell, CellGroup, Image, Popup, showConfirmDialog, showToast, Tag } from 'vant'
 import Payment from '@/views/adapay/payment'
 import { useRoute, useRouter } from 'vue-router'
 import OQrcode from '@/components/o-qrcode'
-import request from '../request-music'
+import request from '@/helpers/request'
 import { browser, moneyFormat } from '@/helpers/utils'
-import { state as baseState } from '@/state'
+import OProtocol from '@/components/o-protocol'
 
 export default defineComponent({
   name: 'order-detail',
@@ -35,7 +25,15 @@ export default defineComponent({
       orderNo: route.query.orderNo,
       orderInfo: {} as any, // 订单信息
       goodsInfos: [] as any, // 订单信息列表
-      config: route.query.config ? JSON.parse(route.query.config as any) : {}
+      config: route.query.config ? JSON.parse(route.query.config as any) : {},
+      hasFreight: route.query.hf ? false : true, // 是否显示
+      freight: '', // 运费
+
+      agreeStatus: false //是否勾选协议
+    })
+
+    const orderType = computed(() => {
+      return state.orderInfo.orderType
     })
 
     const addressDetails = ref<any>({})
@@ -43,12 +41,19 @@ export default defineComponent({
     const getOrderDetails = async () => {
       try {
         const { data } = await request.get('/api-student/userPaymentOrder/detail/' + state.orderNo)
-        console.log(data)
         const goodsInfos = data.goodsInfos || []
         state.orderInfo = data
+        let hasInstrument = false // 是否有乐器
+        let hasTextbook = false // 是否购买教材
         goodsInfos.forEach((item: any) => {
           const img = item.goodsUrl ? item.goodsUrl.split(',')[0] : ''
           item.goodsUrl = img
+
+          if (item.goodsType === 'REPAIR') {
+            hasInstrument = true
+          } else if (item.goodsType === 'INSTRUMENTS') {
+            hasTextbook = true
+          }
         })
         state.goodsInfos = goodsInfos
 
@@ -56,6 +61,14 @@ export default defineComponent({
           addressDetails.value = data.addresses || {}
         }
 
+        // 判断运费状态
+        // 如果没有购买商品,有购买教材则『到付』 其它则免运费
+        if (!hasInstrument && hasTextbook) {
+          state.freight = '到付'
+        } else {
+          state.freight = '免运费'
+        }
+
         // 判断订单状态,如果不是待支付则返回
         // WAIT_PAY: '待支付',
         // PAYING: '支付中',
@@ -100,7 +113,6 @@ export default defineComponent({
           }
         })
       } else {
-        console.log(baseState.user)
         state.qrCodeUrl =
           window.location.origin +
           '/orchestra-student/#/payDefine?pay_channel=' +
@@ -188,6 +200,49 @@ export default defineComponent({
     }
 
     const onSubmit = async () => {
+      if (orderType.value === 'VIP') {
+        // onCallback()
+        buyVip(onCallback)
+      } else {
+        buyOrchestra(onCallback)
+      }
+    }
+    const onCallback = () => {
+      const pt = state.pay_channel
+      // 判断是否有支付方式
+      if (pt) {
+        beforeSubmit()
+      } else {
+        state.paymentStatus = true
+      }
+    }
+
+    const buyVip = async (callback?: any) => {
+      try {
+        const { data } = await request.get('/api-student/userPaymentOrder/detail/' + state.orderNo)
+        console.log(data)
+        state.pay_channel = data.paymentChannel
+        if (data.status === 'PAID') {
+          showConfirmDialog({
+            message: '该订单已支付成功',
+            showCancelButton: false
+          }).then(() => {
+            router.replace({
+              path: '/payment-result',
+              query: {
+                orderNo: state.orderNo
+              }
+            })
+          })
+        } else {
+          callback && callback()
+        }
+      } catch {
+        //
+      }
+    }
+
+    const buyOrchestra = async (callback: any) => {
       // 请选择收货地址
       if (!addressDetails.value.id) {
         showToast('请选择收货地址')
@@ -202,33 +257,31 @@ export default defineComponent({
             receiveAddress: addressDetails.value.id
           }
         })
-
+        state.pay_channel = data.paymentChannel
         if (data.status === 'PAID') {
-          router.replace({
-            path: '/payment-result',
-            query: {
-              orderNo: state.orderNo
-            }
+          showConfirmDialog({
+            message: '该订单已支付成功',
+            showCancelButton: false
+          }).then(() => {
+            router.replace({
+              path: '/payment-result',
+              query: {
+                orderNo: state.orderNo
+              }
+            })
           })
         } else {
-          const pt = state.config.paymentChannel
-          // 判断是否有支付方式
-          if (pt) {
-            beforeSubmit()
-          } else {
-            state.paymentStatus = true
-          }
+          callback && callback()
         }
       } catch {
         //
       }
     }
 
+    // 放弃支付时,则取消订单
     const onBackOut = async () => {
-      // api-student/userPaymentOrder/cancelPayment/{orderNo}
       try {
         await request.post('/api-student/userPaymentOrder/cancelPayment/' + state.orderNo)
-
         router.back()
       } catch {
         //
@@ -248,9 +301,12 @@ export default defineComponent({
       <>
         {browser().isApp && <OHeader border={false} />}
         <div class={styles.cartConfirm}>
-          <div class={styles.cartConfirmBox}>
-            <Addres item={addressDetails.value} />
-          </div>
+          {/* 只有乐团购买的时候显示收货地址 */}
+          {orderType.value === 'ORCHESTRA' && (
+            <div class={styles.cartConfirmBox}>
+              <Addres item={addressDetails.value} />
+            </div>
+          )}
 
           <CellGroup style={{ margin: 0 }}>
             {state.goodsInfos &&
@@ -262,18 +318,30 @@ export default defineComponent({
                       <div class={styles.goodsContent}>
                         <h2>{goods.goodsName}</h2>
                         <Tag type="primary">{goods.brandName}</Tag>
-                        <p class={styles.goodsNum}>x 1</p>
+                        <p class={styles.goodsNum}>{goods.goodsType === 'VIP' ? '6个月' : 'x 1'}</p>
                       </div>
                     ),
                     value: () => (
                       <span class={styles.cellPrice}>
-                        {goods.currentPrice > 0 ? moneyFormat(goods.currentPrice) : '赠送'}
+                        {goods.currentPrice > 0 ? '¥' + moneyFormat(goods.currentPrice) : '赠送'}
                       </span>
                     )
                   }}
                 </Cell>
               ))}
           </CellGroup>
+
+          {orderType.value === 'ORCHESTRA' && (
+            <Cell class={styles.freight} title="运费" value={state.freight}></Cell>
+          )}
+
+          <div class={styles.protocol}>
+            <OProtocol
+              v-model:modelValue={state.agreeStatus}
+              showHeader
+              style={{ paddingLeft: 0, paddingRight: 0 }}
+            />
+          </div>
         </div>
 
         <OSticky position="bottom" background="white">
@@ -314,12 +382,17 @@ export default defineComponent({
 
         <Popup
           v-model:show={state.showQrcode}
-          // position="bottom"
           style={{ background: 'transparent', overflow: 'initial' }}
           safeAreaInsetBottom={true}
+          class={styles.popupCode}
+          closeable
+          onClose={() => {
+            // 二维码关闭时清除订单器
+            clearInterval(state.orderTimer)
+          }}
         >
           <div class={styles.codeContainer}>
-            <i class={styles.codeClose} onClick={() => (state.showQrcode = false)}></i>
+            {/* <i class={styles.codeClose} onClick={() => (state.showQrcode = false)}></i> */}
             <div class={styles.codeImg}>
               <div class={styles.codeContent}>
                 <h2 class={styles.codeTitle}>乐团报名</h2>

+ 1 - 1
src/student/music-group/request-music.ts

@@ -34,7 +34,7 @@ request.interceptors.request.use(
     }
 
     initRequest = options.initRequest || false
-    const Authorization = sessionStorage.getItem('AuthorizationMusic') || ''
+    const Authorization = sessionStorage.getItem('Authorization') || ''
     const authHeaders: any = {}
     if (
       Authorization &&

+ 109 - 0
src/student/my-orchestra/apply-withdrawal.module.less

@@ -0,0 +1,109 @@
+.headers {
+  // min-height: 250px;
+  // background: linear-gradient(180deg, #ff9156 0%, #ff6d3e 100%);
+  min-height: 293px;
+  background: url('./images/bg.png') no-repeat center center;
+  background-size: cover;
+}
+
+.userInfo {
+  text-align: center;
+  padding-top: 22px;
+  .img {
+    padding: 4px;
+    background-color: #fff;
+    width: 67px;
+    height: 67px;
+    border-radius: 50%;
+    overflow: hidden;
+  }
+
+  .userName {
+    padding-top: 6px;
+    font-size: 18px;
+    font-weight: 500;
+    color: #ffffff;
+    line-height: 25px;
+  }
+
+  .timer {
+    padding: 15px 13px 0;
+    font-size: 16px;
+    color: #ffffff;
+    line-height: 22px;
+    span {
+      font-size: 20px;
+      font-weight: bold;
+      padding: 0 6px;
+    }
+  }
+}
+
+.content {
+  margin: -18px 13px 12px;
+  padding: 15px 18px;
+  font-size: 14px;
+  color: #777777;
+  line-height: 22px;
+  background: #ffffff;
+  border-radius: 10px;
+  span {
+    font-weight: 600;
+  }
+}
+
+.resion {
+  margin: 0 13px 12px;
+  background: #ffffff;
+  border-radius: 10px;
+  overflow: hidden;
+}
+
+.title {
+  display: flex;
+  justify-content: space-between;
+  padding: 13px 16px 3px;
+  .name {
+    display: flex;
+    align-items: center;
+    font-size: 16px;
+    font-weight: 600;
+    color: #333333;
+    line-height: 22px;
+    i {
+      display: inline-block;
+      width: 4px;
+      height: 14px;
+      background: #ff8057;
+      border-radius: 2px;
+      margin-right: 6px;
+    }
+    span {
+      color: #f44541;
+    }
+  }
+  .nums {
+    font-size: 14px;
+    color: #777777;
+    line-height: 20px;
+  }
+}
+
+.dialogTitle {
+  i {
+    display: inline-block;
+    width: 4px;
+    height: 14px;
+    background: #ff8057;
+    border-radius: 2px;
+    margin-right: 6px;
+  }
+
+  padding-left: 25px;
+  text-align: left;
+  font-size: 18px;
+  font-weight: 500;
+  color: #333333;
+  line-height: 25px;
+  padding-bottom: 12px;
+}

+ 86 - 0
src/student/my-orchestra/apply-withdrawal.tsx

@@ -0,0 +1,86 @@
+import OHeader from '@/components/o-header'
+import { defineComponent, onMounted, reactive, ref } from 'vue'
+import iconStudent from '@common/images/icon_student.png'
+import styles from './apply-withdrawal.module.less'
+import { Button, Dialog, Field, Image } from 'vant'
+import OSticky from '@/components/o-sticky'
+
+export default defineComponent({
+  name: 'apply-withdrawal',
+  setup() {
+    const headColor = reactive({
+      headBg: 'transparent',
+      textColor: '#fff'
+    })
+    const state = reactive({
+      status: false
+    })
+
+    const onSubmit = async () => {
+      state.status = true
+    }
+    return () => (
+      <>
+        <div class={styles.headers}>
+          <OHeader
+            background={headColor.headBg}
+            color={headColor.textColor}
+            border={false}
+            backIconColor="white"
+          />
+
+          <div class={styles.userInfo}>
+            <Image src={iconStudent} class={styles.img} />
+            <div class={styles.userName}>宋小泽 同学</div>
+            <div class={styles.timer}>
+              您已在武汉小学2022标小学2022标准团训练<span>142</span>天
+            </div>
+          </div>
+        </div>
+        <div class={styles.content}>
+          <span>在乐团训练的日子里,</span>
+          有付出有汗水,用从0到1的喜悦也有攻克难关的坚持。你的付出为你带来成长,你的成长让老师感到欣喜。
+        </div>
+
+        <div class={styles.resion}>
+          <div class={styles.title}>
+            <div class={styles.name}>
+              <i></i>退团原因<span>*</span>
+            </div>
+            <div class={styles.nums}>0/400</div>
+          </div>
+          <Field placeholder="请输入退团详细原因" type="textarea" rows={3} />
+        </div>
+
+        <OSticky position="bottom">
+          <div class={'btnGroup'}>
+            <Button block round size="large" type="primary" onClick={onSubmit}>
+              确定
+            </Button>
+          </div>
+        </OSticky>
+
+        <Dialog
+          v-model:show={state.status}
+          message={'确定要提交退团申请吗?'}
+          messageAlign="left"
+          confirmButtonText="确定"
+          cancelButtonText="取消"
+          showCancelButton
+          onConfirm={() => {
+            console.log('223')
+          }}
+        >
+          {{
+            title: () => (
+              <div class={styles.dialogTitle}>
+                <i></i>
+                提示
+              </div>
+            )
+          }}
+        </Dialog>
+      </>
+    )
+  }
+})

BIN
src/student/my-orchestra/images/bg.png


BIN
src/student/my-orchestra/images/icon_change.png


+ 136 - 5
src/student/my-orchestra/index.module.less

@@ -1,10 +1,61 @@
 .myOrchestra {
+  .oList {
+    margin-top: 12px;
+    background: #ffffff;
+    border-radius: 10px;
+    overflow: hidden;
+    :global {
+      .van-cell__title {
+        flex: 0 auto;
+      }
+    }
+
+    .orchestra {
+      display: flex;
+      align-items: center;
+      font-size: 16px;
+      font-weight: 600;
+      color: #333333;
+      line-height: 22px;
+      span {
+        max-width: 200px;
+      }
+      i {
+        display: inline-block;
+        width: 4px;
+        height: 14px;
+        background: #ff8057;
+        border-radius: 2px;
+        margin-right: 7px;
+      }
+    }
+
+    .iconChange {
+      display: flex;
+      align-items: center;
+      justify-content: flex-end;
+      font-size: 14px;
+      color: #777777;
+      line-height: 20px;
+      .img {
+        width: 16px;
+        height: 16px;
+        margin-left: 10px;
+      }
+    }
+  }
+
   :global {
     .van-nav-bar__right {
       color: var(--van-primary-color);
     }
   }
 
+  .messageImg {
+    width: 24px;
+    height: 24px;
+  }
+
   .gridContainer {
     margin: 12px 13px 12px;
 
@@ -105,10 +156,90 @@
       }
     }
   }
+}
+
+.title {
+  padding: 6px 24px 12px;
+  display: flex;
+  align-items: center;
+  font-size: 16px;
+  font-weight: 500;
+  color: #333333;
+  line-height: 22px;
+  i {
+    width: 4px;
+    height: 14px;
+    background: #ff8057;
+    border-radius: 2px;
+    display: inline-block;
+    margin-right: 4px;
+  }
+}
+
+.phoneContainer {
+  display: flex;
+  justify-content: space-between;
+  flex-wrap: wrap;
+  margin: 0 13px 12px;
+  .item {
+    position: relative;
+    padding-top: 12px;
+    .more {
+      display: inline-block;
+      position: absolute;
+      top: 18px;
+      right: 6px;
+      background: url('../images/icon_more.png') center center no-repeat;
+      background-size: contain;
+      width: 24px;
+      height: 24px;
+      z-index: 9;
+    }
+    .img {
+      width: 170px;
+      height: 170px;
+      border-radius: 10px;
+      overflow: hidden;
+    }
+    .default {
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      background: #eaeaea;
+      .defaultImg {
+        width: 41px;
+      }
+    }
+    .name {
+      padding: 6px 0 4px;
+      font-size: 16px;
+      font-weight: 500;
+      color: #333333;
+      max-width: 168px;
+    }
+    .num {
+      font-size: 12px;
+      color: #777777;
+      line-height: 17px;
+    }
+  }
+}
 
-  // .classCellGroup {
-  //   margin-bottom: 12px;
-  //   border-radius: 10px;
-  //   overflow: hidden;
-  // }
+.phoneDetail {
+  .phoneContainer {
+    display: flex;
+    justify-content: space-between;
+    flex-wrap: wrap;
+    margin: 0 13px 12px;
+    .item {
+      position: relative;
+      .img {
+        width: 170px;
+        height: 170px;
+        border-radius: 10px;
+        overflow: hidden;
+        position: relative;
+      }
+    }
+  }
 }

+ 152 - 16
src/student/my-orchestra/index.tsx

@@ -1,28 +1,132 @@
 import OHeader from '@/components/o-header'
-import { Cell, CellGroup, Grid, GridItem, Image, Tag } from 'vant'
-import { defineComponent } from 'vue'
-import { useRouter } from 'vue-router'
+import { Cell, CellGroup, Grid, GridItem, Image, List, Tag } from 'vant'
+import { defineComponent, onMounted, reactive } from 'vue'
+import { useRoute, useRouter } from 'vue-router'
 import styles from './index.module.less'
 import iconTeacher from '@common/images/icon_teacher.png'
+import iconMessage from '@common/images/icon-message.png'
+import iconPhoneDefaut from '@/school/orchestra/images/icon-photo-default.png'
+import iconChange from './images/icon_change.png'
+import request from '@/helpers/request'
+import OEmpty from '@/components/o-empty'
 
 export default defineComponent({
   name: 'my-orchestra',
   setup() {
     const router = useRouter()
+    const route = useRoute()
+    const state = reactive({
+      isLoading: false,
+      list: [] as any,
+      listState: {
+        dataShow: true, // 判断是否有数据
+        loading: false,
+        finished: false
+      },
+      params: {
+        page: 1,
+        rows: 20
+      },
+      selectItem: {} as any,
+      selectType: 'add'
+    })
+    const onSearch = () => {
+      state.params.page = 1
+      state.list = []
+      state.listState.dataShow = true // 判断是否有数据
+      state.listState.loading = false
+      state.listState.finished = false
+      getList()
+    }
 
+    // 班级列表
+    const getList = async () => {
+      try {
+        if (state.isLoading) return
+        state.isLoading = true
+        const res = await request.post('/api-student/orchestraPhotoAlbum/page', {
+          data: {
+            ...state.params,
+            orchestraId: route.query.id
+          }
+        })
+        state.listState.loading = false
+        const result = res.data || {}
+        // 处理重复请求数据
+        if (state.list.length > 0 && result.current === 1) {
+          return
+        }
+        const rows = result.rows || []
+        state.list = state.list.concat(rows)
+        state.listState.finished = result.current >= result.pages
+        state.params.page = result.current + 1
+        state.listState.dataShow = state.list.length > 0
+        state.isLoading = false
+      } catch {
+        state.listState.dataShow = false
+        state.listState.finished = true
+        state.isLoading = false
+      }
+    }
+
+    const onDetail = (item: any) => {
+      router.push({
+        path: '/photo-detail',
+        query: {
+          photoId: item.id,
+          name: item.name
+        }
+      })
+    }
+
+    onMounted(() => {
+      getList()
+    })
     return () => (
       <div class={styles.myOrchestra}>
         <OHeader
-          rightText="申请退团"
-          onClickRight={() => {
-            console.log('111')
+          v-slots={{
+            right: () => (
+              <span
+                onClick={() => {
+                  router.push('/apply-withdrawal')
+                }}
+              >
+                申请退团
+              </span>
+            )
           }}
         />
 
+        <CellGroup inset class={styles.oList}>
+          <Cell center clickable>
+            {{
+              title: () => (
+                <div class={styles.orchestra}>
+                  <i></i>
+                  <span class="van-ellipsis">
+                    武汉小学2022标准团武汉小学2022标准团武汉小学2022标准团
+                  </span>
+                </div>
+              ),
+              value: () => (
+                <div class={styles.iconChange}>
+                  切换乐团 <Image src={iconChange} class={styles.img} />
+                </div>
+              )
+            }}
+          </Cell>
+        </CellGroup>
+
         <div class={[styles.gridContainer, styles.gridClass]}>
           {[1, 2].map((item: any) => (
             <CellGroup class={styles.classCellGroup}>
-              <Cell center titleStyle={{ flex: '0 auto' }} valueClass={styles.classCheckbox}>
+              <Cell
+                center
+                titleStyle={{ flex: '0 auto' }}
+                valueClass={styles.classCheckbox}
+                border={false}
+              >
                 {{
                   icon: () => <Image src={iconTeacher} class={styles.img} />,
                   title: () => (
@@ -31,28 +135,60 @@ export default defineComponent({
                         1211212 <Tag type="primary">长笛班</Tag>
                       </div>
                     </div>
-                  )
+                  ),
+                  value: () => <Image class={styles.messageImg} src={iconMessage} />
                 }}
               </Cell>
               <Grid border={false} columnNum={3}>
                 <GridItem>
-                  <p class={styles.title}>{item.preStudentNum}</p>
-                  <p class={styles.name}>学生人数</p>
+                  <p class={styles.title}>1/2</p>
+                  <p class={styles.name}>课程</p>
                 </GridItem>
                 <GridItem>
-                  <p class={[styles.title]}>
-                    {item.courseScheduleNum - item.completeCourseScheduleNum}
-                  </p>
-                  <p class={styles.name}>剩余课时</p>
+                  <p class={[styles.title]}>1/2</p>
+                  <p class={styles.name}>课后练习</p>
                 </GridItem>
                 <GridItem>
-                  <p class={styles.title}>{item.courseScheduleNum}</p>
-                  <p class={styles.name}>总课时</p>
+                  <p class={styles.title}>1/2</p>
+                  <p class={styles.name}>单元测试</p>
                 </GridItem>
               </Grid>
             </CellGroup>
           ))}
         </div>
+
+        <div class={styles.title}>
+          <i></i>训练照片
+        </div>
+
+        {state.listState.dataShow ? (
+          <List
+            v-model:loading={state.listState.loading}
+            finished={state.listState.finished}
+            finishedText=" "
+            onLoad={getList}
+            immediateCheck={false}
+          >
+            <div class={styles.phoneContainer}>
+              {state.list.map((item: any) => (
+                <div class={styles.item} onClick={() => onDetail(item)}>
+                  {item.coverUrl ? (
+                    <Image class={styles.img} src={item.coverUrl} />
+                  ) : (
+                    <div class={[styles.img, styles.default]}>
+                      <Image src={iconPhoneDefaut} class={styles.defaultImg} />
+                    </div>
+                  )}
+
+                  <p class={[styles.name, 'van-ellipsis']}>{item.name}</p>
+                  <p class={styles.num}>{item.photoCount}张</p>
+                </div>
+              ))}
+            </div>
+          </List>
+        ) : (
+          <OEmpty btnStatus={false} classImgSize="SMALL" tips="暂无相册" />
+        )}
       </div>
     )
   }

+ 105 - 0
src/student/my-orchestra/photo-detail.tsx

@@ -0,0 +1,105 @@
+import OEmpty from '@/components/o-empty'
+import OHeader from '@/components/o-header'
+import request from '@/helpers/request'
+import { Image, List, showImagePreview } from 'vant'
+import { defineComponent, onMounted, reactive } from 'vue'
+import { useRoute } from 'vue-router'
+import styles from './index.module.less'
+
+export default defineComponent({
+  name: 'photo-detail',
+  setup() {
+    const route = useRoute()
+    const state = reactive({
+      isEdit: false,
+      isLoading: false,
+      list: [] as any,
+      listState: {
+        dataShow: true, // 判断是否有数据
+        loading: false,
+        finished: false
+      },
+      params: {
+        page: 1,
+        rows: 20
+      }
+    })
+
+    const getList = async () => {
+      try {
+        if (state.isLoading) return
+        state.isLoading = true
+        const res = await request.post('/api-school/orchestraPhoto/page', {
+          data: {
+            ...state.params,
+            orchestraPhotoAlbumId: route.query.photoId
+          }
+        })
+        state.listState.loading = false
+        const result = res.data || {}
+        // 处理重复请求数据
+        if (state.list.length > 0 && result.current === 1) {
+          return
+        }
+        const rows = result.rows || []
+        state.list = state.list.concat(rows)
+        state.listState.finished = result.current >= result.pages
+        state.params.page = result.current + 1
+        state.listState.dataShow = state.list.length > 0
+        state.isLoading = false
+      } catch {
+        state.listState.dataShow = false
+        state.listState.finished = true
+        state.isLoading = false
+      }
+    }
+
+    // 预览图片
+    const onShowImage = (index: number) => {
+      const files = state.list.map((file: any) => {
+        return file.fileUrl
+      })
+
+      showImagePreview({
+        images: files,
+        startPosition: index,
+        closeable: true
+      })
+    }
+
+    onMounted(() => {
+      getList()
+    })
+
+    return () => (
+      <div class={styles.phoneDetail}>
+        <OHeader title={(route.query.name as any) || ''}></OHeader>
+
+        {state.listState.dataShow ? (
+          <List
+            v-model:loading={state.listState.loading}
+            finished={state.listState.finished}
+            finishedText=" "
+            onLoad={getList}
+            immediateCheck={false}
+          >
+            <div class={styles.phoneContainer}>
+              {state.list.map((item: any, index: number) => (
+                <div
+                  class={[styles.item]}
+                  onClick={() => {
+                    onShowImage(index)
+                  }}
+                >
+                  <Image class={styles.img} src={item.fileUrl} />
+                </div>
+              ))}
+            </div>
+          </List>
+        ) : (
+          <OEmpty btnStatus={false} classImgSize="SMALL" tips="暂无相片" />
+        )}
+      </div>
+    )
+  }
+})

+ 11 - 3
src/student/payment-result/index.tsx

@@ -1,6 +1,6 @@
 import OHeader from '@/components/o-header'
 import { defineComponent, onMounted, reactive } from 'vue'
-import { Button, Cell, CellGroup, Image, Tag } from 'vant'
+import { Button, Cell, CellGroup, Image, showConfirmDialog, Tag } from 'vant'
 import styles from './index.module.less'
 import iconRefunded from './images/icon_refunded.png'
 import iconRefunding from './images/icon_refunding.png'
@@ -40,8 +40,16 @@ export default defineComponent({
     }
 
     const onRefund = async () => {
-      // try {
-      // } catch {}
+      showConfirmDialog({
+        message: '您是否确定退款'
+      }).then(async () => {
+        try {
+          await request.post('/api-student/userPaymentOrder/cancelRefund/' + route.query.orderNo)
+          getDetails()
+        } catch {
+          //
+        }
+      })
     }
 
     const formatImg = (type: any) => {

+ 3 - 2
src/student/trade-record/component/paid-list.tsx

@@ -227,7 +227,7 @@ export default defineComponent({
                     value: () => <span class={styles.status}>{orderStatus[item.status]}</span>
                   }}
                 </Cell>
-                <Cell isLink center titleStyle={{ flex: '0 auto' }}>
+                <Cell isLink center clickable={false} titleStyle={{ flex: '0 auto' }}>
                   {{
                     icon: () => <Image class={styles.img} src={iconOrder} />,
                     title: () => <span class={styles.name}>{orderType[item.orderType]}</span>,
@@ -242,7 +242,8 @@ export default defineComponent({
                 <Cell style={'padding: 0'}>
                   {{
                     title: () =>
-                      item.status === 'PAID' && (
+                      item.status === 'PAID' &&
+                      item.paymentCashAmount > 0 && (
                         <Button
                           block
                           class={styles.refundBtn}

+ 12 - 2
src/student/trade-record/component/refund-list.tsx

@@ -7,6 +7,7 @@ import request from '@/helpers/request'
 import OEmpty from '@/components/o-empty'
 import { orderStatus, orderType } from '@/constant'
 import { moneyFormat } from '@/helpers/utils'
+import { useRouter } from 'vue-router'
 
 export default defineComponent({
   name: 'wait_pay',
@@ -17,6 +18,7 @@ export default defineComponent({
     }
   },
   setup(props) {
+    const router = useRouter()
     const form = reactive({
       isClick: false,
       timeShow: false,
@@ -84,6 +86,14 @@ export default defineComponent({
       })
       return select.text
     }
+    const onDetails = (item: any) => {
+      router.push({
+        path: 'payment-result',
+        query: {
+          orderNo: item.orderNo
+        }
+      })
+    }
 
     onMounted(() => {
       getList()
@@ -123,14 +133,14 @@ export default defineComponent({
             immediateCheck={false}
           >
             {form.list.map((item: any) => (
-              <CellGroup inset class={styles.cellGroup}>
+              <CellGroup inset class={styles.cellGroup} onClick={() => onDetails(item)}>
                 <Cell center titleClass={styles.times}>
                   {{
                     title: () => <span class={styles.times}>{item.createTime}</span>,
                     value: () => <span class={styles.status}>{orderStatus[item.status]}</span>
                   }}
                 </Cell>
-                <Cell isLink center titleStyle={{ flex: '0 auto' }}>
+                <Cell isLink clickable={false} center titleStyle={{ flex: '0 auto' }}>
                   {{
                     icon: () => <Image class={styles.img} src={iconOrder} />,
                     title: () => <span class={styles.name}>{orderType[item.orderType]}</span>,

+ 13 - 3
src/student/trade-record/component/wait-pay.tsx

@@ -19,6 +19,7 @@ import request from '@/helpers/request'
 import OEmpty from '@/components/o-empty'
 import { orderStatus, orderType } from '@/constant'
 import { moneyFormat } from '@/helpers/utils'
+import { useRouter } from 'vue-router'
 
 export default defineComponent({
   name: 'wait_pay',
@@ -29,6 +30,7 @@ export default defineComponent({
     }
   },
   setup(props) {
+    const router = useRouter()
     const form = reactive({
       isClick: false,
       timeShow: false,
@@ -105,7 +107,6 @@ export default defineComponent({
       }).then(async () => {
         try {
           await request.post('/api-student/userPaymentOrder/cancelPayment/' + item.orderNo)
-
           onSearch()
         } catch {
           //
@@ -115,6 +116,15 @@ export default defineComponent({
 
     const onConfirmOrder = async (item: any) => {}
 
+    const onDetails = (item: any) => {
+      router.push({
+        path: 'payment-result',
+        query: {
+          orderNo: item.orderNo
+        }
+      })
+    }
+
     onMounted(() => {
       getList()
 
@@ -153,14 +163,14 @@ export default defineComponent({
             immediateCheck={false}
           >
             {form.list.map((item: any) => (
-              <CellGroup inset class={styles.cellGroup}>
+              <CellGroup inset class={styles.cellGroup} onClick={() => onDetails(item)}>
                 <Cell center titleClass={styles.times}>
                   {{
                     title: () => <span class={styles.times}>{item.createTime}</span>,
                     value: () => <span class={styles.status}>{orderStatus[item.status]}</span>
                   }}
                 </Cell>
-                <Cell isLink center titleStyle={{ flex: '0 auto' }}>
+                <Cell isLink center clickable={false} titleStyle={{ flex: '0 auto' }}>
                   {{
                     icon: () => <Image class={styles.img} src={iconOrder} />,
                     title: () => <span class={styles.name}>{orderType[item.orderType]}</span>,

+ 1 - 1
src/views/adapay/pay-define/index.tsx

@@ -179,7 +179,7 @@ export default defineComponent({
               <Cell title="实付金额" value={`¥${moneyFormat(state.price)}元`}></Cell>
             </CellGroup>
 
-            <Button type="primary" block size="large" onClick={getPayment} round color="#01C1B5">
+            <Button type="primary" block size="large" onClick={getPayment} round>
               立即支付
             </Button>
           </div>

+ 0 - 4
src/views/adapay/payment/index.tsx

@@ -1,10 +1,6 @@
-import request from '@/helpers/request'
-import { listenerMessage, postMessage, removeListenerMessage } from '@/helpers/native-message'
 import { Button, Cell, CellGroup, Icon, RadioGroup, Radio, showConfirmDialog } from 'vant'
 import { defineComponent, reactive } from 'vue'
-
 import styles from './index.module.less'
-import { state } from '@/state'
 import { browser, moneyFormat } from '@/helpers/utils'
 
 export default defineComponent({