|
@@ -1,4 +1,4 @@
|
|
|
-import { useEventTracking } from '@/helpers/hooks'
|
|
|
+// import { useEventTracking } from '@/helpers/hooks'
|
|
|
import request from '@/helpers/request'
|
|
|
import { state } from '@/state'
|
|
|
import { Tab, Tabs } from 'vant'
|
|
@@ -19,16 +19,15 @@ export default defineComponent({
|
|
|
async mounted() {
|
|
|
try {
|
|
|
// 判断是哪个端
|
|
|
- const url =
|
|
|
- state.platformType === 'STUDENT' ? '/api-student' : '/api-teacher'
|
|
|
+ const url = state.platformType === 'STUDENT' ? '/api-student' : '/api-teacher'
|
|
|
const res = await request.get(`${url}/couponInfo/statInfo`)
|
|
|
const result = res.data || []
|
|
|
- this.couponCount = result.find(result => result.useState === 'USABLE')
|
|
|
- console.log(result.find(result => result.useState === 'USABLE'))
|
|
|
+ this.couponCount = result.find((result) => result.useState === 'USABLE')
|
|
|
+ console.log(result.find((result) => result.useState === 'USABLE'))
|
|
|
} catch {
|
|
|
// TODO: handle
|
|
|
}
|
|
|
- useEventTracking('优惠券')
|
|
|
+ // useEventTracking('优惠券')
|
|
|
},
|
|
|
render() {
|
|
|
return (
|
|
@@ -36,9 +35,7 @@ export default defineComponent({
|
|
|
<Tabs color="#2DC7AA" lineWidth={44} sticky>
|
|
|
<Tab
|
|
|
title={`可使用${
|
|
|
- this.couponCount.total > 0
|
|
|
- ? '(' + this.couponCount.total + '张)'
|
|
|
- : ''
|
|
|
+ this.couponCount.total > 0 ? '(' + this.couponCount.total + '张)' : ''
|
|
|
}`}
|
|
|
>
|
|
|
<List />
|