lex 2 سال پیش
والد
کامیت
2125b05ba3

+ 8 - 0
src/router/routes-common.ts

@@ -65,6 +65,14 @@ export const router: RouteRecordRaw[] = [
     meta: {
       title: '公告详情'
     }
+  },
+  {
+    path: '/help-center',
+    name: 'help-center',
+    component: () => import('@/views/information/help-center'),
+    meta: {
+      title: '帮助中心'
+    }
   }
 ]
 

+ 3 - 2
src/student/music-group/pre-apply/component/order.tsx

@@ -119,15 +119,16 @@ export default defineComponent({
         }
 
         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
         })
-        // return
+
         await request.post('/api-student/userPaymentOrder/refundPayment', {
           data: {
             merOrderNo: form.refundSelect.orderNo,
-            refundReason: refundReason.text
+            refundReason: form.checked === 999 ? form.resion : refundReason.text
           }
         })
         form.refundStatus = false

+ 5 - 0
src/views/information/help-center/index.module.less

@@ -0,0 +1,5 @@
+.title {
+  font-size: 16px;
+  color: #333333;
+  line-height: 22px;
+}

+ 96 - 0
src/views/information/help-center/index.tsx

@@ -0,0 +1,96 @@
+import OEmpty from '@/components/o-empty'
+import OSearch from '@/components/o-search'
+import OSticky from '@/components/o-sticky'
+import request from '@/helpers/request'
+import { forms } from '@/school/train-planning/create'
+import { state } from '@/state'
+import { Cell, CellGroup, List } from 'vant'
+import { defineComponent, onMounted, reactive } from 'vue'
+import styles from './index.module.less'
+
+export default defineComponent({
+  name: 'help-center',
+  setup() {
+    const form = reactive({
+      isClick: false,
+      list: [] as any,
+      listState: {
+        dataShow: true, // 判断是否有数据
+        loading: false,
+        finished: false
+      },
+      params: {
+        keyword: null,
+        status: true,
+        page: 1,
+        rows: 20
+      }
+    })
+
+    const getList = async () => {
+      try {
+        if (form.isClick) return
+        form.isClick = true
+        const res = await request.post(state.platformApi + '/helpCenterContent/page', {
+          data: {
+            ...form.params,
+            catalogType: state.platformType
+          }
+        })
+        form.listState.loading = false
+        const result = res.data || {}
+        // 处理重复请求数据
+        if (form.list.length > 0 && result.current === 1) {
+          return
+        }
+        form.list = form.list.concat(result.rows || [])
+        form.listState.finished = result.current >= result.pages
+        form.params.page = result.current + 1
+        form.listState.dataShow = form.list.length > 0
+        form.isClick = false
+      } catch {
+        form.listState.dataShow = false
+        form.listState.finished = true
+        form.isClick = false
+      }
+    }
+
+    const onSearch = (val: any) => {
+      form.params.keyword = val
+      form.params.page = 1
+      form.list = []
+      form.listState.dataShow = true // 判断是否有数据
+      form.listState.loading = false
+      form.listState.finished = false
+      getList()
+    }
+
+    onMounted(() => {
+      getList()
+    })
+    return () => (
+      <>
+        <OSticky position="top">
+          <OSearch onSearch={onSearch} />
+        </OSticky>
+
+        {form.listState.dataShow ? (
+          <List
+            v-model:loading={form.listState.loading}
+            finished={form.listState.finished}
+            finishedText=" "
+            class={[styles.liveList]}
+            onLoad={getList}
+            immediateCheck={false}
+          >
+            {form.list.map((item: any) => (
+              <Cell titleClass={[styles.title, 'van-ellipsis']} title={'ijijii'} isLink></Cell>
+            ))}
+          </List>
+        ) : (
+          <OEmpty btnStatus={false} classImgSize="SMALL" tips="暂无数据" />
+        )}
+      </>
+    )
+  }
+})