12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- <template>
- <view class="self-order">
- <view class="type-tabs">
- <u-tabs :scrollable="true" lineColor="#C30D23" :activeStyle="{ color: '#C30D23', fontWeight: 'bold' }" :list="types"
- @click="changeType" :current="current" />
- </view>
- <My_listbox ref="List" @getlist="getList" :bottomHeight="70">
- <List :list="list"></List>
- </My_listbox>
- </view>
- </template>
- <script>
- import { onLoad } from 'uview-ui/libs/mixin/mixin';
- import List from './list.vue'
- export default {
- components:{List},
- data () {
- return {
- current:0,
- content: {
- "pageNumber": 1,
- "pageSize": 20,
- "where": {
- "type": "",
- }
- },
- list:[],
- types:[]
- }
- },
- methods: {
- changeType (type) {
- this.current = type.index
- this.content.where.type = type.value
- this.getList(true)
- },
- getList(init = false) {
- return new Promise((resolve, reject) => {
- if (this.paging(this.content, init)) return resolve();
- this.$Http.basic({
- "id": "20240513162802",
- content: this.content
- }).then(res => {
- this.$refs.List.setHeight()
- this.$refs.List.RefreshToComplete()
- console.log("获取预约列表", res)
- resolve();
- if (this.cutoff(res.msg)) return;
- this.list = res.pageNumber == 1 ? res.data : this.list.concat(res.data);
- this.content = this.$refs.List.paging(this.content, res)
- })
- })
- },
- callPhoneFun (phonenumber) {
- this.callPhone(phonenumber)
- }
- },
- created() {
- this.getCustomClass('appointmenttype').then(res => {
- res.forEach(v => v.name = v.remarks)
- res.unshift({name:'全部',value:''})
- this.types = res
- console.log(this.types,'分类');
- })
- this.getList()
- },
- onLoad (option) {
- uni.setNavigationBarTitle({
- title:'我的预约',
- })
- }
- }
- </script>
- <style lang="scss">
-
- </style>
|