|
@@ -20,6 +20,9 @@ import { defineComponent, onMounted, reactive } from 'vue'
|
|
|
import { useRoute, useRouter } from 'vue-router'
|
|
|
import styles from './photo.module.less'
|
|
|
import iconPhoneDefaut from '../images/icon-photo-default.png'
|
|
|
+import iconOrchestra from '@/views/mine-orchestra/images/icon-or.png'
|
|
|
+import OSticky from '@/components/o-sticky'
|
|
|
+import OHeader from '@/components/o-header'
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'phone',
|
|
@@ -139,28 +142,28 @@ export default defineComponent({
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- const getSchoolList = async () => {
|
|
|
- try {
|
|
|
- const res = await request.post('/api-school/school/page', {
|
|
|
- data: {
|
|
|
- page: 1,
|
|
|
- rows: 999
|
|
|
- }
|
|
|
- })
|
|
|
- if (Array.isArray(res.data?.rows)) {
|
|
|
- state.schoolList = res.data.rows.map((n: any) => {
|
|
|
- return {
|
|
|
- name: n.name || '',
|
|
|
- id: n.id || ''
|
|
|
- }
|
|
|
- })
|
|
|
- const tmpSchool = sessionStorage.getItem('school-photo')
|
|
|
- state.school = tmpSchool ? JSON.parse(tmpSchool) : state.schoolList[0] || {}
|
|
|
- }
|
|
|
- } catch {
|
|
|
- //
|
|
|
- }
|
|
|
- }
|
|
|
+ // const getSchoolList = async () => {
|
|
|
+ // try {
|
|
|
+ // const res = await request.post('/api-school/school/page', {
|
|
|
+ // data: {
|
|
|
+ // page: 1,
|
|
|
+ // rows: 999
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // if (Array.isArray(res.data?.rows)) {
|
|
|
+ // state.schoolList = res.data.rows.map((n: any) => {
|
|
|
+ // return {
|
|
|
+ // name: n.name || '',
|
|
|
+ // id: n.id || ''
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // const tmpSchool = sessionStorage.getItem('school-photo')
|
|
|
+ // state.school = tmpSchool ? JSON.parse(tmpSchool) : state.schoolList[0] || {}
|
|
|
+ // }
|
|
|
+ // } catch {
|
|
|
+ // //
|
|
|
+ // }
|
|
|
+ // }
|
|
|
|
|
|
const onDetail = (item: any) => {
|
|
|
sessionStorage.setItem('orchestra-detail-tab', 'photo')
|
|
@@ -198,13 +201,6 @@ export default defineComponent({
|
|
|
}
|
|
|
})
|
|
|
onSearch()
|
|
|
- // setTimeout(() => {
|
|
|
- // showToast('删除成功')
|
|
|
- // }, 100)
|
|
|
-
|
|
|
- // setTimeout(() => {
|
|
|
- // onSearch()
|
|
|
- // }, 1100)
|
|
|
} catch {
|
|
|
//
|
|
|
}
|
|
@@ -212,7 +208,7 @@ export default defineComponent({
|
|
|
}
|
|
|
|
|
|
onMounted(async () => {
|
|
|
- await getSchoolList()
|
|
|
+ // await getSchoolList()
|
|
|
await getList()
|
|
|
})
|
|
|
return () => (
|
|
@@ -220,25 +216,31 @@ export default defineComponent({
|
|
|
class={[styles.phone, !state.listState.dataShow && 'emptyRootContainer']}
|
|
|
style={{ minHeight: `calc(100vh - ${props.height}px)` }}
|
|
|
>
|
|
|
- <Sticky position="top" offsetTop={props.height} style={{ width: '100%' }}>
|
|
|
+ <OSticky position="top">
|
|
|
+ <OHeader>
|
|
|
+ {{
|
|
|
+ right: () => (
|
|
|
+ <span
|
|
|
+ class={styles.addPhotoTop}
|
|
|
+ onClick={() => {
|
|
|
+ state.status = true
|
|
|
+ state.selectType = 'add'
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 添加相册
|
|
|
+ </span>
|
|
|
+ )
|
|
|
+ }}
|
|
|
+ </OHeader>
|
|
|
+ </OSticky>
|
|
|
+ {/* <Sticky position="top" offsetTop={props.height} style={{ width: '100%' }}>
|
|
|
<Cell class={styles.select} center isLink onClick={() => (state.schoolStatus = true)}>
|
|
|
{{
|
|
|
- // icon: () => <img class={styles.icon} src={iconOrchestra} />,
|
|
|
+ icon: () => <img class={styles.icon} src={iconOrchestra} />,
|
|
|
title: () => <div class="van-ellipsis">{state.school.name}</div>
|
|
|
}}
|
|
|
</Cell>
|
|
|
- <Button
|
|
|
- icon="plus"
|
|
|
- block
|
|
|
- class={styles.addPhone}
|
|
|
- onClick={() => {
|
|
|
- state.status = true
|
|
|
- state.selectType = 'add'
|
|
|
- }}
|
|
|
- >
|
|
|
- 新建相册
|
|
|
- </Button>
|
|
|
- </Sticky>
|
|
|
+ </Sticky> */}
|
|
|
|
|
|
{state.listState.dataShow ? (
|
|
|
<List
|
|
@@ -324,7 +326,7 @@ export default defineComponent({
|
|
|
]}
|
|
|
/>
|
|
|
|
|
|
- <Popup v-model:show={state.schoolStatus} position="bottom" round>
|
|
|
+ {/* <Popup v-model:show={state.schoolStatus} position="bottom" round>
|
|
|
<Picker
|
|
|
columns={state.schoolList}
|
|
|
columnsFieldNames={{ text: 'name', value: 'id' }}
|
|
@@ -341,7 +343,7 @@ export default defineComponent({
|
|
|
onSearch()
|
|
|
}}
|
|
|
/>
|
|
|
- </Popup>
|
|
|
+ </Popup> */}
|
|
|
</div>
|
|
|
)
|
|
|
}
|