wangfei 6 years ago
parent
commit
91a0485078

+ 2
- 1
src/components/libraryListItem/index.vue View File

2
   <div class="libraryListItem flex-h" @click="itemClick(data)">
2
   <div class="libraryListItem flex-h" @click="itemClick(data)">
3
     <div class="img">
3
     <div class="img">
4
       <a>
4
       <a>
5
-        <img :src="data.BookImg" class="centerLabel cover" alt>
5
+        <img :src="data.BookImg || defaultimg" class="centerLabel cover" alt>
6
       </a>
6
       </a>
7
       <span v-if="type === 1" :class="data.BorrowStatus=='0'?'active':''">{{myBookStatus}}</span>
7
       <span v-if="type === 1" :class="data.BorrowStatus=='0'?'active':''">{{myBookStatus}}</span>
8
     </div>
8
     </div>
61
   props: ['data', 'type', 'status'],
61
   props: ['data', 'type', 'status'],
62
   data () {
62
   data () {
63
     return {
63
     return {
64
+      defaultimg: 'https://spaceofcheng.oss-cn-beijing.aliyuncs.com/voting/yttj_banner.png',
64
     }
65
     }
65
   },
66
   },
66
   computed: {
67
   computed: {

+ 2
- 2
src/pages/user/library/booksList/index.vue View File

44
       showAppointmentDialog: false,
44
       showAppointmentDialog: false,
45
       query: {
45
       query: {
46
         caseid: '',
46
         caseid: '',
47
-        bookType: '',
47
+        booktype: '',
48
         page: 1,
48
         page: 1,
49
         pagesize: 10,
49
         pagesize: 10,
50
       },
50
       },
56
     }
56
     }
57
   },
57
   },
58
   created () {
58
   created () {
59
-    this.query.bookType = this.$route.query.type
59
+    this.query.booktype = this.$route.query.type
60
     this.query.caseid = this.$route.query.caseid
60
     this.query.caseid = this.$route.query.caseid
61
     this.$nextTick(() => {
61
     this.$nextTick(() => {
62
       this.onInfinite()
62
       this.onInfinite()

+ 27
- 27
src/pages/user/mainPage/libraryIndex/index.vue View File

156
         link: `${window.location.origin}${window.location.pathname}#/mainPage/indexPage`,
156
         link: `${window.location.origin}${window.location.pathname}#/mainPage/indexPage`,
157
         thu_image: `https://spaceofcheng.oss-cn-beijing.aliyuncs.com/indexlogo.jpg?x-oss-process=style/wxicon`
157
         thu_image: `https://spaceofcheng.oss-cn-beijing.aliyuncs.com/indexlogo.jpg?x-oss-process=style/wxicon`
158
       }).then(() => {
158
       }).then(() => {
159
-        wx.getLocation({
160
-          type: 'gcj02', // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02'
161
-          success: function (res) {
162
-            let latitude1 = res.latitude // 纬度,浮点数,范围为90 ~ -90
163
-            let longitude1 = res.longitude // 经度,浮点数,范围为180 ~ -180。
164
-            for (let i = 0; i < that.CaseList.length; i++) {
165
-              let result = that.CaseList[i].Coordinate.split(",")
166
-              let latitude2 = parseFloat(result[0])
167
-              let longitude2 = parseFloat(result[1])
168
-              if (that.toolClass.getGreatCircleDistance(latitude1, longitude1, latitude2, longitude2) < 500) {
169
-                that.currentCaseId = that.CaseList[i].CaseId
170
-                that.currentCaseName = that.CaseList[i].CaseName
171
-              }
172
-            }
173
-            if (!that.currentCaseId || !that.currentCaseName) {
174
-              that.currentCaseId = ((that.CaseList || [])[0] || {}).CaseId
175
-              that.currentCaseName = ((that.CaseList || [])[0] || {}).CaseName
159
+      })
160
+      wx.getLocation({
161
+        type: 'gcj02', // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02'
162
+        success: function (res) {
163
+          let latitude1 = res.latitude // 纬度,浮点数,范围为90 ~ -90
164
+          let longitude1 = res.longitude // 经度,浮点数,范围为180 ~ -180。
165
+          for (let i = 0; i < that.CaseList.length; i++) {
166
+            let result = that.CaseList[i].Coordinate.split(",")
167
+            let latitude2 = parseFloat(result[0])
168
+            let longitude2 = parseFloat(result[1])
169
+            if (that.toolClass.getGreatCircleDistance(latitude1, longitude1, latitude2, longitude2) < 500) {
170
+              that.currentCaseId = that.CaseList[i].CaseId
171
+              that.currentCaseName = that.CaseList[i].CaseName
176
             }
172
             }
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 () {
173
+          }
174
+          if (!that.currentCaseId || !that.currentCaseName) {
185
             that.currentCaseId = ((that.CaseList || [])[0] || {}).CaseId
175
             that.currentCaseId = ((that.CaseList || [])[0] || {}).CaseId
186
             that.currentCaseName = ((that.CaseList || [])[0] || {}).CaseName
176
             that.currentCaseName = ((that.CaseList || [])[0] || {}).CaseName
187
-            that.init()
188
           }
177
           }
189
-        })
178
+          that.init()
179
+        },
180
+        cancel: function () {
181
+          that.currentCaseId = ((that.CaseList || [])[0] || {}).CaseId
182
+          that.currentCaseName = ((that.CaseList || [])[0] || {}).CaseName
183
+          that.init()
184
+        },
185
+        fail: function () {
186
+          that.currentCaseId = ((that.CaseList || [])[0] || {}).CaseId
187
+          that.currentCaseName = ((that.CaseList || [])[0] || {}).CaseName
188
+          that.init()
189
+        }
190
       })
190
       })
191
     },
191
     },
192
     selectCaseId () { // 选择案场
192
     selectCaseId () { // 选择案场