guangchao.xu | 070005a | 2020-12-07 09:56:40 +0800 | [diff] [blame] | 1 | <template> |
| 2 | <view class="life"> |
guangchao.xu | 6cdd45e | 2021-04-16 17:44:30 +0800 | [diff] [blame^] | 3 | <view class="life-item" v-for="(v,i) in list" :key="i"> |
| 4 | <view v-if="v.isShow"> |
| 5 | <view class="life-item-title"> |
| 6 | <view class="life-item-title-box"></view> |
| 7 | <text>{{v.name}}</text> |
| 8 | </view> |
| 9 | <view class="life-item-con"> |
| 10 | <!-- #ifndef MP-WEIXIN --> |
| 11 | <view class="life-item-con-item" v-for="(item,index) in v.list" :key="index" @click="toPath(`${item.path}?id=${item.id}`)"> |
| 12 | <u-image :src="item.src" width="50rpx" height="50rpx" mode="aspectFit"></u-image> |
| 13 | <text>{{item.title}}</text> |
| 14 | </view> |
| 15 | <!-- #endif --> |
| 16 | <!-- #ifdef MP-WEIXIN --> |
| 17 | <view class="life-item-con-item" v-for="(item,index) in v.list" :key="index" @click="toast"> |
| 18 | <u-image :src="item.src" width="50rpx" height="50rpx" mode="aspectFit"></u-image> |
| 19 | <text>{{item.title}}</text> |
| 20 | </view> |
| 21 | <!-- #endif --> |
| 22 | </view> |
guangchao.xu | 070005a | 2020-12-07 09:56:40 +0800 | [diff] [blame] | 23 | </view> |
| 24 | </view> |
guangchao.xu | 070005a | 2020-12-07 09:56:40 +0800 | [diff] [blame] | 25 | <u-tabbar :list="vuex_tabbar" :mid-button="true" active-color="#2FA8E1" inactive-color="#999999" @change="changeTabbar"></u-tabbar> |
| 26 | </view> |
| 27 | </template> |
| 28 | |
| 29 | <script> |
| 30 | export default { |
| 31 | data() { |
| 32 | return { |
guangchao.xu | 6cdd45e | 2021-04-16 17:44:30 +0800 | [diff] [blame^] | 33 | list: [{ |
| 34 | name: '医疗就诊', |
| 35 | isShow: true, |
| 36 | list: [ |
| 37 | // { |
| 38 | // title: "预约挂号", |
| 39 | // src: "/static/images/index/wyjf.png", |
| 40 | // path:"" |
| 41 | // }, |
| 42 | { |
| 43 | title: "医疗缴费", |
| 44 | src: "/static/images/index/smkhd.png", |
| 45 | path: "/pages/sub_medical/hospital", |
| 46 | id: 'toBills' |
| 47 | }, |
| 48 | { |
| 49 | title: "报告查询", |
| 50 | src: "/static/images/index/wyjf.png", |
| 51 | path: "/pages/sub_medical/hospital", |
| 52 | id: "toReports" |
| 53 | } |
| 54 | ], |
| 55 | }, { |
| 56 | name: '生活缴费', |
| 57 | isShow: false, |
| 58 | list: [{ |
| 59 | title: "物业缴费", |
| 60 | src: "/static/images/index/wyjf.png", |
| 61 | path: "" |
| 62 | }, { |
| 63 | title: "电费", |
| 64 | src: "/static/images/index/df.png", |
| 65 | path: "" |
| 66 | }, { |
| 67 | title: "加油卡充值", |
| 68 | src: "/static/images/index/jykcz.png", |
| 69 | path: "" |
| 70 | }, { |
| 71 | title: "宽带费", |
| 72 | src: "/static/images/index/kdf.png", |
| 73 | path: "" |
| 74 | }, { |
| 75 | title: "手机缴费", |
| 76 | src: "/static/images/index/sjjf.png", |
| 77 | path: "" |
| 78 | }, { |
| 79 | title: "固话充值", |
| 80 | src: "/static/images/index/ghcz.png", |
| 81 | path: "" |
| 82 | }, { |
| 83 | title: "违章查询", |
| 84 | src: "/static/images/index/wzcx.png", |
| 85 | path: "" |
| 86 | }, { |
| 87 | title: "全部", |
| 88 | src: "/static/images/index/all.png", |
| 89 | path: "" |
| 90 | }], |
guangchao.xu | 070005a | 2020-12-07 09:56:40 +0800 | [diff] [blame] | 91 | }] |
| 92 | } |
| 93 | }, |
| 94 | methods: { |
guangchao.xu | 6cdd45e | 2021-04-16 17:44:30 +0800 | [diff] [blame^] | 95 | // #ifdef MP-WEIXIN |
| 96 | toast(){ |
| 97 | uni.showToast({ |
| 98 | title:'暂不支持小程序,请前往app使用', |
| 99 | icon:'none' |
| 100 | }) |
| 101 | } |
| 102 | // #endif |
guangchao.xu | 070005a | 2020-12-07 09:56:40 +0800 | [diff] [blame] | 103 | } |
| 104 | } |
| 105 | </script> |
| 106 | |
| 107 | <style lang="scss" scoped> |
guangchao.xu | 6cdd45e | 2021-04-16 17:44:30 +0800 | [diff] [blame^] | 108 | .life { |
| 109 | padding: 0 30rpx; |
| 110 | font-family: "PingFang-SC-Medium"; |
guangchao.xu | 070005a | 2020-12-07 09:56:40 +0800 | [diff] [blame] | 111 | overflow: hidden; |
guangchao.xu | 6cdd45e | 2021-04-16 17:44:30 +0800 | [diff] [blame^] | 112 | |
| 113 | &-item { |
guangchao.xu | 070005a | 2020-12-07 09:56:40 +0800 | [diff] [blame] | 114 | display: flex; |
guangchao.xu | 6cdd45e | 2021-04-16 17:44:30 +0800 | [diff] [blame^] | 115 | width: 100%; |
| 116 | flex-direction: column; |
| 117 | margin: 30rpx 0; |
| 118 | |
| 119 | &-title { |
| 120 | display: flex; |
| 121 | align-items: center; |
guangchao.xu | 070005a | 2020-12-07 09:56:40 +0800 | [diff] [blame] | 122 | margin-bottom: 30rpx; |
guangchao.xu | 6cdd45e | 2021-04-16 17:44:30 +0800 | [diff] [blame^] | 123 | |
| 124 | &-box { |
| 125 | width: 6rpx; |
| 126 | height: 30rpx; |
| 127 | background-image: linear-gradient(#7DD2F9, #30A8E1); |
| 128 | margin-right: 20rpx; |
| 129 | } |
| 130 | |
| 131 | text { |
| 132 | font-size: 32rpx; |
| 133 | color: #343434; |
| 134 | } |
| 135 | } |
| 136 | |
| 137 | &-con { |
| 138 | display: flex; |
| 139 | // justify-content: space-between; |
| 140 | align-items: center; |
| 141 | background-color: #FFFFFF; |
| 142 | border-radius: 20rpx; |
| 143 | flex-wrap: wrap; |
| 144 | |
| 145 | &-item { |
| 146 | width: 25%; |
| 147 | display: flex; |
| 148 | flex-direction: column; |
| 149 | justify-content: center; |
| 150 | align-items: center; |
| 151 | padding: 20rpx 0; |
| 152 | |
| 153 | text { |
| 154 | margin-top: 20rpx; |
| 155 | } |
guangchao.xu | 070005a | 2020-12-07 09:56:40 +0800 | [diff] [blame] | 156 | } |
| 157 | } |
| 158 | } |
| 159 | } |
guangchao.xu | 070005a | 2020-12-07 09:56:40 +0800 | [diff] [blame] | 160 | </style> |