1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
| <template>
| <view class="content">
| <u-swiper class="swiper-item" :list="list5" @change="e=>current = e.current" :autoplay="true">
| <view slot="indicator" class="indicator">
| <view class="indicator__dot" v-for="(item, index) in list5" :key="index"
| :class="[index === current && 'indicator__dot--active']">
| </view>
| </view>
| </u-swiper>
|
| <u--text type="primary" class="infoText" text="功能列表"></u--text>
| <view class="grid-box">
| <u-grid :border="true" col="3" @click="gridClick">
| <u-grid-item v-for="(listItem,listIndex) in gridList" :key="listIndex">
| <u-icon :customStyle="{paddingTop:80+'rpx'}" :name="listItem.name" :size="33"></u-icon>
| <text class="grid-text">{{listItem.title}}</text>
| </u-grid-item>
| </u-grid>
| </view>
| </view>
| </template>
|
| <script>
| export default {
| data() {
| return {
| current: 0,
| list5: [
| '/static/swiper/swiper1.png',
| '/static/swiper/swiper2.png',
| '/static/swiper/swiper3.png',
| ],
| gridList: [{
| name: 'photo',
| title: '资产领用'
| },
| {
| name: 'lock',
| title: '资产借用'
| },
| {
| name: 'star',
| title: '资产归还'
| },
| {
| name: 'hourglass',
| title: '资产报修'
| },
| {
| name: 'star',
| title: '资产报废'
| },
| {
| name: 'star',
| title: '资产清单'
| },
| ],
| }
| },
| onLoad() {
|
| },
| methods: {
| login(){
|
| },
|
| gridClick(index) {
| console.log(index);
| switch (index) {
| case 0: {
| this.navTo("../assets/use");
| break;
| }
| case 1: {
| this.navTo("../assets/borrow");
| break;
| }
| case 2: {
| this.navTo("../assets/return");
| break;
| }
| case 3: {
| this.navTo("../assets/repair");
| break;
| }
| case 4: {
| this.navTo("../assets/scrapped");
| break;
| }
| case 5: {
| this.navTo("../assets/list");
| break;
| }
|
| default:
| break;
| };
|
| },
| navTo(Url) {
| uni.navigateTo({
| url: Url
| })
| }
|
| }
| }
| </script>
|
| <style lang="scss">
| .swiper-item {
| border-radius: 0rpx;
| }
|
| .indicator {
| @include flex(row);
| justify-content: center;
|
| &__dot {
| height: 6px;
| width: 6px;
| border-radius: 100px;
| background-color: rgba(255, 255, 255, 0.35);
| margin: 0 5px;
| transition: background-color 0.3s;
|
| &--active {
| background-color: #ffffff;
| }
| }
| }
|
| .indicator-num {
| padding: 2px 0;
| background-color: rgba(0, 0, 0, 0.35);
| border-radius: 100px;
| width: 35px;
| @include flex;
| justify-content: center;
|
| &__text {
| color: #FFFFFF;
| font-size: 12px;
| }
| }
|
| .infoText {
| // border: 1rpx red solid;
| padding: 20rpx 0 20rpx 20rpx;
|
| }
|
| .grid-text {
| font-size: 14px;
| color: #909399;
| padding: 10rpx 0 50rpx 0rpx;
| /* #ifndef APP-PLUS */
| box-sizing: border-box;
| /* #endif */
| }
| </style>
|
|