许成详 6 лет назад
Родитель
Сommit
413590ee4f
3 измененных файлов: 44 добавлений и 199 удалений
  1. 7
    5
      src/components/slideTabH/index.vue
  2. 7
    7
      src/pages/user/App.vue
  3. 30
    187
      src/store/library/index.js

+ 7
- 5
src/components/slideTabH/index.vue Просмотреть файл

@@ -90,7 +90,7 @@ export default {
90 90
     this.activeIndex = this.initIndex || 0
91 91
     var aLeft = (document.body.clientWidth / this.data.length).toFixed(0)
92 92
     this.data.map((item, index) => {
93
-      this.widthArr.push(item.value.length * (this.fontSize || 15))
93
+      this.widthArr.push((item.value.length / 2).toFixed(2) * (this.fontSize || 15))
94 94
       this.leftArr.push((aLeft * index - 0) + ((aLeft / 2).toFixed(0) - 0) - this.widthArr[index] / 2)
95 95
     })
96 96
     this.activeWidth = this.widthArr[this.activeIndex]
@@ -135,7 +135,7 @@ export default {
135 135
   .tabNav {
136 136
     background: #fff;
137 137
     position: relative;
138
-    overflow: hidden;
138
+    overflow: visible;
139 139
     box-shadow: 0 0 0.1rem 0.02rem rgba(0, 0, 0, 0.05);
140 140
     z-index: 100;
141 141
     > a {
@@ -143,15 +143,17 @@ export default {
143 143
       text-align: center;
144 144
       color: #333;
145 145
       position: relative;
146
-      z-index: 1;
146
+      z-index: 1001;
147
+      background: #fff;
147 148
     }
148 149
     .activeLine {
149 150
       height: 0.02rem;
150 151
       background: #f9064b;
151 152
       position: absolute;
152 153
       left: 0;
153
-      bottom: 0;
154
-      z-index: 2;
154
+      bottom: -.02rem;
155
+      z-index: 1000;
156
+      box-shadow: 0 0 .1rem .01rem rgba(249, 6, 75, 0.9);
155 157
     }
156 158
   }
157 159
   > .flex-item {

+ 7
- 7
src/pages/user/App.vue Просмотреть файл

@@ -23,14 +23,14 @@ export default {
23 23
     })
24 24
   },
25 25
   created () {
26
-    // if (location.search && this.toolClass.UrlSearch(location.search).code) {
27
-    //   this.code = this.toolClass.UrlSearch(location.search).code
28
-    // } else {
29
-    //   this.code = null
30
-    // }
31
-    // this.getUserInfo({ org: this.org, code: this.code }).then(() => {
26
+    if (location.search && this.toolClass.UrlSearch(location.search).code) {
27
+      this.code = this.toolClass.UrlSearch(location.search).code
28
+    } else {
29
+      this.code = null
30
+    }
31
+    this.getUserInfo({ org: this.org, code: this.code }).then(() => {
32 32
       this.showPage = true
33
-    //})
33
+    })
34 34
   },
35 35
   methods: {
36 36
     ...actions(['getUserInfo'])

+ 30
- 187
src/store/library/index.js Просмотреть файл

@@ -1,6 +1,31 @@
1 1
 import Ajax from '../../util/ajax'
2 2
 import api from '../../util/api'
3 3
 
4
+var booksData = [],
5
+  recordData = [],
6
+  aTarget = {
7
+    img: '',
8
+    name: '书名',
9
+    id: '',
10
+    status: '状态',
11
+    author: '作者',
12
+    publishingHouses: '出版社',
13
+    stock: '10'
14
+  },
15
+  bTarget = {
16
+    img: '',
17
+    name: '书名',
18
+    id: '',
19
+    status: '状态',
20
+    author: '作者',
21
+    publishingHouses: '出版社',
22
+    stock: '10'
23
+  }
24
+for (var n = 0; n < 10; n++) {
25
+  booksData.push(aTarget)
26
+  recordData.push(bTarget)
27
+}
28
+
4 29
 export default {
5 30
   namespaced: true,
6 31
   state: {
@@ -38,193 +63,11 @@ export default {
38 63
       name: '更多',
39 64
       id: 'more'
40 65
     }],
41
-    bookList: [{ // 图书馆首页推荐书籍
42
-      img: '',
43
-      name: '书名',
44
-      id: '',
45
-      status: '状态',
46
-      author: '作者',
47
-      publishingHouses: '出版社',
48
-      stock: '10'
49
-    }, {
50
-      img: '',
51
-      name: '书名',
52
-      id: '',
53
-      status: '状态',
54
-      author: '作者',
55
-      publishingHouses: '出版社',
56
-      stock: '10'
57
-    }, {
58
-      img: '',
59
-      name: '书名',
60
-      id: '',
61
-      status: '状态',
62
-      author: '作者',
63
-      publishingHouses: '出版社',
64
-      stock: '10'
65
-    }, {
66
-      img: '',
67
-      name: '书名',
68
-      id: '',
69
-      status: '状态',
70
-      author: '作者',
71
-      publishingHouses: '出版社',
72
-      stock: '10'
73
-    }, {
74
-      img: '',
75
-      name: '书名',
76
-      id: '',
77
-      status: '状态',
78
-      author: '作者',
79
-      publishingHouses: '出版社',
80
-      stock: '10'
81
-    }],
82
-    bookTypeList: [{ // 分类书籍列表
83
-      img: '',
84
-      name: '书名',
85
-      id: '',
86
-      status: '状态',
87
-      author: '作者',
88
-      publishingHouses: '出版社',
89
-      stock: '10'
90
-    }, {
91
-      img: '',
92
-      name: '书名',
93
-      id: '',
94
-      status: '状态',
95
-      author: '作者',
96
-      publishingHouses: '出版社',
97
-      stock: '10'
98
-    }, {
99
-      img: '',
100
-      name: '书名',
101
-      id: '',
102
-      status: '状态',
103
-      author: '作者',
104
-      publishingHouses: '出版社',
105
-      stock: '10'
106
-    }, {
107
-      img: '',
108
-      name: '书名',
109
-      id: '',
110
-      status: '状态',
111
-      author: '作者',
112
-      publishingHouses: '出版社',
113
-      stock: '10'
114
-    }, {
115
-      img: '',
116
-      name: '书名',
117
-      id: '',
118
-      status: '状态',
119
-      author: '作者',
120
-      publishingHouses: '出版社',
121
-      stock: '10'
122
-    }, {
123
-      img: '',
124
-      name: '书名',
125
-      id: '',
126
-      status: '状态',
127
-      author: '作者',
128
-      publishingHouses: '出版社',
129
-      stock: '10'
130
-    }, {
131
-      img: '',
132
-      name: '书名',
133
-      id: '',
134
-      status: '状态',
135
-      author: '作者',
136
-      publishingHouses: '出版社',
137
-      stock: '10'
138
-    }, {
139
-      img: '',
140
-      name: '书名',
141
-      id: '',
142
-      status: '状态',
143
-      author: '作者',
144
-      publishingHouses: '出版社',
145
-      stock: '10'
146
-    }, {
147
-      img: '',
148
-      name: '书名',
149
-      id: '',
150
-      status: '状态',
151
-      author: '作者',
152
-      publishingHouses: '出版社',
153
-      stock: '10'
154
-    }],
155
-    searchBooksList: [{ // 搜索书籍列表
156
-      img: '',
157
-      name: '书名',
158
-      id: '',
159
-      status: '状态',
160
-      author: '作者',
161
-      publishingHouses: '出版社',
162
-      stock: '10'
163
-    }, {
164
-      img: '',
165
-      name: '书名',
166
-      id: '',
167
-      status: '状态',
168
-      author: '作者',
169
-      publishingHouses: '出版社',
170
-      stock: '10'
171
-    }, {
172
-      img: '',
173
-      name: '书名',
174
-      id: '',
175
-      status: '状态',
176
-      author: '作者',
177
-      publishingHouses: '出版社',
178
-      stock: '10'
179
-    }, {
180
-      img: '',
181
-      name: '书名',
182
-      id: '',
183
-      status: '状态',
184
-      author: '作者',
185
-      publishingHouses: '出版社',
186
-      stock: '10'
187
-    }, {
188
-      img: '',
189
-      name: '书名',
190
-      id: '',
191
-      status: '状态',
192
-      author: '作者',
193
-      publishingHouses: '出版社',
194
-      stock: '10'
195
-    }, {
196
-      img: '',
197
-      name: '书名',
198
-      id: '',
199
-      status: '状态',
200
-      author: '作者',
201
-      publishingHouses: '出版社',
202
-      stock: '10'
203
-    }, {
204
-      img: '',
205
-      name: '书名',
206
-      id: '',
207
-      status: '状态',
208
-      author: '作者',
209
-      publishingHouses: '出版社',
210
-      stock: '10'
211
-    }, {
212
-      img: '',
213
-      name: '书名',
214
-      id: '',
215
-      status: '状态',
216
-      author: '作者',
217
-      publishingHouses: '出版社',
218
-      stock: '10'
219
-    }, {
220
-      img: '',
221
-      name: '书名',
222
-      id: '',
223
-      status: '状态',
224
-      author: '作者',
225
-      publishingHouses: '出版社',
226
-      stock: '10'
227
-    }]
66
+    bookList: booksData, // 图书馆首页推荐书籍
67
+    bookTypeList: booksData, // 分类书籍列表
68
+    searchBooksList: booksData, // 搜索书籍列表
69
+    borrowedRecordList: recordData, // 借阅记录列表
70
+    appointmentList: recordData // 线上预约列表
228 71
   },
229 72
   mutations: {
230 73
     setIndexSearchKey (state, data) { // 赋值图书首页搜索关键词