yuantianjiao 6 年前
父节点
当前提交
0f92672e77
共有 2 个文件被更改,包括 29 次插入17 次删除
  1. 19
    16
      src/pages/user/library/borrowedRecord/index.vue
  2. 10
    1
      src/pages/user/mainPage/libraryIndex/index.vue

+ 19
- 16
src/pages/user/library/borrowedRecord/index.vue 查看文件

39
       <div class="borrowedRecordContent flex-h" @click="showDialog = false">
39
       <div class="borrowedRecordContent flex-h" @click="showDialog = false">
40
         <div class="img">
40
         <div class="img">
41
           <a>
41
           <a>
42
-            <img :src="currentItem.BookImg" class="centerLabel" alt>
42
+            <img
43
+              :src="currentItem.BookImg"
44
+              class="centerLabel"
45
+              style="width: 100%;
46
+                height: 100%;
47
+                object-fit: cover"
48
+            >
43
           </a>
49
           </a>
44
         </div>
50
         </div>
45
         <div class="flex-item">
51
         <div class="flex-item">
71
       showDialog: false,
77
       showDialog: false,
72
       status: '1',
78
       status: '1',
73
       page: 1,
79
       page: 1,
74
-      pagesize: 10,
80
+      pagesize: 10000,
75
       reserveBooks: {},
81
       reserveBooks: {},
76
       borrowBooks: {},
82
       borrowBooks: {},
77
       currentItem: {},
83
       currentItem: {},
84
     this.getList('2')
90
     this.getList('2')
85
   },
91
   },
86
   computed: {
92
   computed: {
87
-    myBookStatus() {
93
+    myBookStatus () {
88
       let status = ''
94
       let status = ''
89
-      switch(this.currentItem.BorrowStatus) {
95
+      switch (this.currentItem.BorrowStatus) {
90
         case '4':
96
         case '4':
91
           status = '已预约'
97
           status = '已预约'
92
           break
98
           break
130
       this.getMineBook({
136
       this.getMineBook({
131
         page: this.page,
137
         page: this.page,
132
         pagesize: this.pagesize,
138
         pagesize: this.pagesize,
133
-        status: status == '1'?'1,3,2,0':'4',
139
+        status: status == '1' ? '1,3,2,0' : '4',
134
       }).then((res) => {
140
       }).then((res) => {
135
-        if(status == '1') {
141
+        if (status == '1') {
136
           _that.borrowBooks = res
142
           _that.borrowBooks = res
137
           _that.borrowshow = true
143
           _that.borrowshow = true
138
         } else {
144
         } else {
164
         width: 0.7rem;
170
         width: 0.7rem;
165
         display: block;
171
         display: block;
166
         margin: 0 auto;
172
         margin: 0 auto;
167
-        .centerLabel{
168
-          
169
-        }
170
       }
173
       }
171
       span {
174
       span {
172
         width: 100%;
175
         width: 100%;
237
           text-align: right;
240
           text-align: right;
238
           span {
241
           span {
239
             display: inline-block;
242
             display: inline-block;
240
-            line-height: .24rem;
241
-            font-size: .12rem;
242
-            color: #869EC3;
243
+            line-height: 0.24rem;
244
+            font-size: 0.12rem;
245
+            color: #869ec3;
243
             background: #f2f4f7;
246
             background: #f2f4f7;
244
-            padding: 0 .1rem 0 .15rem;
245
-            border-radius: .15rem 0 0 .15rem;
246
-            margin-right: -.12rem;
247
+            padding: 0 0.1rem 0 0.15rem;
248
+            border-radius: 0.15rem 0 0 0.15rem;
249
+            margin-right: -0.12rem;
247
           }
250
           }
248
-          .active{
251
+          .active {
249
             background-color: #fc5534;
252
             background-color: #fc5534;
250
             color: #fff;
253
             color: #fff;
251
           }
254
           }

+ 10
- 1
src/pages/user/mainPage/libraryIndex/index.vue 查看文件

166
               let latitude2 = parseFloat(result[0])
166
               let latitude2 = parseFloat(result[0])
167
               let longitude2 = parseFloat(result[1])
167
               let longitude2 = parseFloat(result[1])
168
               if (that.toolClass.getGreatCircleDistance(latitude1, longitude1, latitude2, longitude2) < 500) {
168
               if (that.toolClass.getGreatCircleDistance(latitude1, longitude1, latitude2, longitude2) < 500) {
169
-
170
                 that.currentCaseId = that.CaseList[i].CaseId
169
                 that.currentCaseId = that.CaseList[i].CaseId
171
                 that.currentCaseName = that.CaseList[i].CaseName
170
                 that.currentCaseName = that.CaseList[i].CaseName
172
               }
171
               }
176
               that.currentCaseName = ((that.CaseList || [])[0] || {}).CaseName
175
               that.currentCaseName = ((that.CaseList || [])[0] || {}).CaseName
177
             }
176
             }
178
             that.init()
177
             that.init()
178
+          },
179
+          cancel: function () {
180
+            that.currentCaseId = ((that.CaseList || [])[0] || {}).CaseId
181
+            that.currentCaseName = ((that.CaseList || [])[0] || {}).CaseName
182
+            that.init()
183
+          },
184
+          fail: function () {
185
+            that.currentCaseId = ((that.CaseList || [])[0] || {}).CaseId
186
+            that.currentCaseName = ((that.CaseList || [])[0] || {}).CaseName
187
+            that.init()
179
           }
188
           }
180
         })
189
         })
181
       })
190
       })