wangfei 6 年前
父节点
当前提交
91a0485078

+ 2
- 1
src/components/libraryListItem/index.vue 查看文件

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

+ 2
- 2
src/pages/user/library/booksList/index.vue 查看文件

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

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

@@ -156,37 +156,37 @@ export default {
156 156
         link: `${window.location.origin}${window.location.pathname}#/mainPage/indexPage`,
157 157
         thu_image: `https://spaceofcheng.oss-cn-beijing.aliyuncs.com/indexlogo.jpg?x-oss-process=style/wxicon`
158 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 175
             that.currentCaseId = ((that.CaseList || [])[0] || {}).CaseId
186 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 192
     selectCaseId () { // 选择案场