yuantianjiao 6 anos atrás
pai
commit
85090f1dcf

+ 7
- 5
src/pages/bodyCheck/index/index.vue Ver arquivo

@@ -1,5 +1,5 @@
1 1
 <template>
2
-  <div class="mainPage">
2
+  <div class="mainPage" v-if="showPage">
3 3
     <img :src="title" class="title" alt="">
4 4
     <div v-if="result && result.length">
5 5
       <div class="userInfo flex-h">
@@ -29,8 +29,6 @@
29 29
     <div v-else class="nodata">
30 30
         暂无体检数据 .
31 31
     </div>
32
-
33
-
34 32
     <div class="bg-white" :hidden="ishidden">
35 33
     </div>
36 34
   </div>
@@ -45,7 +43,8 @@ export default {
45 43
   data() {
46 44
     return {
47 45
       title,
48
-      ishidden: true
46
+      ishidden: true,
47
+      showPage: false
49 48
     }
50 49
   },
51 50
   computed: {
@@ -56,6 +55,7 @@ export default {
56 55
     })
57 56
   },
58 57
   methods:{
58
+    ...mapBodyCheckActions(['getBodyCheck']),
59 59
     linkTo(url){
60 60
       window.location.href=url
61 61
     },
@@ -71,7 +71,9 @@ export default {
71 71
     // Indicator.open()
72 72
   },
73 73
   created() {
74
-    
74
+    this.getBodyCheck().then(() => {
75
+      this.showPage = true
76
+    })
75 77
   }
76 78
 }
77 79
 </script>

+ 31
- 39
src/pages/user/mainPage/coffeeIndex/index.vue Ver arquivo

@@ -427,45 +427,37 @@ export default {
427 427
       window.location.href = this.getUrl('customerSearch')
428 428
     },
429 429
     locationMapping () {
430
-      // wxsdk({ url: encodeURIComponent(window.location.href.split('#')[0]) }, {
431
-      //   title: '城的空间',
432
-      //   desc: '城的空间',
433
-      //   link: `${window.location.origin}${window.location.pathname}/user.html#/mainPage/indexPage`,
434
-      //   thu_image: `${window.location.origin}${window.location.pathname}${logo}`
435
-      // }).then(() => {
436
-      //   wx.getLocation({
437
-      //     type: 'gcj02', // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02'
438
-      //     success: function (res) {
439
-      //       let latitude1 = res.latitude // 纬度,浮点数,范围为90 ~ -90
440
-      //       let longitude1 = res.longitude // 经度,浮点数,范围为180 ~ -180。
441
-      //       for (let i = 0; i < this.CaseList.length; i++) {
442
-      //         let result = this.CaseList[i].Coordinate.split(",")
443
-      //         let latitude2 = parseFloat(result[0])
444
-      //         let longitude2 = parseFloat(result[1])
445
-      //         if (this.toolClass.getGreatCircleDistance(latitude1, longitude1, latitude2, longitude2) < 500) {
446
-      //           this.topCaseInfoData.caseName = this.CaseList[i].CaseName
447
-      //           this.topCaseInfoData.caseId = this.CaseList[i].CaseId
448
-      //           this.getCaseTableList({
449
-      //             caseid: this.topCaseInfoData.caseId
450
-      //           })
451
-      //           this.getCaseTotal({
452
-      //             caseid: this.topCaseInfoData.caseId
453
-      //           })
454
-      //         }
455
-      //       }
456
-      //       if (!this.topCaseInfoData.caseId || !this.topCaseInfoData.caseName){
457
-      //         this.topCaseInfoData.caseName = '当前位置无案场'
458
-      //       }
459
-      //     }
460
-      //   })
461
-      // })
462
-      this.topCaseInfoData.caseName = this.CaseList[0].CaseName
463
-      this.topCaseInfoData.caseId = this.CaseList[0].CaseId
464
-      this.getCaseTableList({
465
-        caseid: this.topCaseInfoData.caseId
466
-      })
467
-      this.getCaseTotal({
468
-        caseid: this.topCaseInfoData.caseId
430
+      wxsdk({ url: encodeURIComponent(window.location.href.split('#')[0]) }, {
431
+        title: '城的空间',
432
+        desc: '城的空间',
433
+        link: `${window.location.origin}${window.location.pathname}/user.html#/mainPage/indexPage`,
434
+        thu_image: `${window.location.origin}${window.location.pathname}${logo}`
435
+      }).then(() => {
436
+        wx.getLocation({
437
+          type: 'gcj02', // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02'
438
+          success: function (res) {
439
+            let latitude1 = res.latitude // 纬度,浮点数,范围为90 ~ -90
440
+            let longitude1 = res.longitude // 经度,浮点数,范围为180 ~ -180。
441
+            for (let i = 0; i < this.CaseList.length; i++) {
442
+              let result = this.CaseList[i].Coordinate.split(",")
443
+              let latitude2 = parseFloat(result[0])
444
+              let longitude2 = parseFloat(result[1])
445
+              if (this.toolClass.getGreatCircleDistance(latitude1, longitude1, latitude2, longitude2) < 500) {
446
+                this.topCaseInfoData.caseName = this.CaseList[i].CaseName
447
+                this.topCaseInfoData.caseId = this.CaseList[i].CaseId
448
+                this.getCaseTableList({
449
+                  caseid: this.topCaseInfoData.caseId
450
+                })
451
+                this.getCaseTotal({
452
+                  caseid: this.topCaseInfoData.caseId
453
+                })
454
+              }
455
+            }
456
+            if (!this.topCaseInfoData.caseId || !this.topCaseInfoData.caseName){
457
+              this.topCaseInfoData.caseName = '当前位置无案场'
458
+            }
459
+          }
460
+        })
469 461
       })
470 462
     },
471 463
     beforeClose (action, done) {

+ 21
- 3
src/pages/user/majorProjectsDetail/index.vue Ver arquivo

@@ -112,18 +112,36 @@ export default {
112 112
   created () {
113 113
     this.getCourseDetailInfo({ id: this.$route.query.id }).then((res) => {
114 114
       var arr = res.CourseDetail
115
-      if(arr === null){
115
+      if (arr === null) {
116 116
         arr = []
117 117
       }
118 118
       this.courseTimeList = arr.sort(function (a, b) { return new Date(a.BeginDate).getTime() > new Date(b.BeginDate).getTime() ? 1 : -1 })
119 119
       // console.log(JSON.stringify(res))
120
+      wxsdk({ url: encodeURIComponent(window.location.href.split('#')[0]) }, {
121
+        title: '城的空间',
122
+        desc: '城的空间',
123
+        link: `${window.location.origin}${window.location.pathname}/user.html#/mainPage/indexPage`,
124
+        thu_image: `${window.location.origin}${window.location.pathname}${logo}`
125
+      }).then(() => {
126
+        let result = this.courseDetail.CaseInfo.Coordinate.split(",")
127
+        let latitude = parseFloat(result[0])
128
+        let longitude = parseFloat(result[1])
129
+        wx.openLocation({
130
+          latitude: latitude, // 纬度,浮点数,范围为90 ~ -90
131
+          longitude: longitude, // 经度,浮点数,范围为180 ~ -180。
132
+          name: this.courseDetail.CaseInfo.CaseName, // 位置名
133
+          // address: '', // 地址详情说明
134
+          // scale: 1, // 地图缩放级别,整形值,范围从1~28。默认为最大
135
+          // infoUrl: '' // 在查看位置界面底部显示的超链接,可点击跳转
136
+        })
137
+      })
120 138
     })
121 139
   },
122 140
   methods: {
123 141
     ...mapProjectActions([
124 142
       'getCourseDetailInfo',
125 143
     ]),
126
-    returnCourseTime (val,endVal) { // 返回课时时间
144
+    returnCourseTime (val, endVal) { // 返回课时时间
127 145
       val = new Date(val)
128 146
       endVal = new Date(endVal)
129 147
       return this.returnNum(val.getMonth() + 1) + '/' + this.returnNum(val.getDate()) + ' 周' + '日一二三四五六'.split('')[new Date(val).getDay()] + ' ' + this.returnNum(val.getHours()) + ':' + this.returnNum(val.getMinutes()) + '~' + this.returnNum(endVal.getHours()) + ':' + this.returnNum(endVal.getMinutes())
@@ -144,5 +162,5 @@ export default {
144 162
 
145 163
 <!-- Add "scoped" attribute to limit CSS to this component only -->
146 164
 <style lang="scss" scoped>
147
-@import "page.scss";
165
+@import 'page.scss';
148 166
 </style>

+ 8
- 11
src/store/bodyCheck/index.js Ver arquivo

@@ -16,17 +16,14 @@ export default {
16 16
   actions: {
17 17
     getBodyCheck (context, data) {
18 18
       return new Promise((resolve) => {
19
-        // Ajax(api.user.gymCard.url, {
20
-        //   method: api.user.gymCard.method,
21
-        //   queryData: {
22
-        //     ...data
23
-        //   }
24
-        // }).then(res => {
25
-        //   context.commit('setgymCardList', res)
26
-        //   resolve(res)
27
-        // }).catch((err) => {
28
-        //   reject(err)
29
-        // })
19
+        Ajax({
20
+          ...api.bodyCheck.bodyCheck
21
+        }).then(res => {
22
+          context.commit('setgymCardList', res)
23
+          resolve(res)
24
+        }).catch((err) => {
25
+          reject(err)
26
+        })
30 27
       })
31 28
     }
32 29
   }

+ 7
- 1
src/util/api.js Ver arquivo

@@ -230,6 +230,12 @@ const $api = {
230 230
       method: 'post',
231 231
       url: `${baseUrl}${wechat}/channel/coupon/:id`
232 232
     }
233
-  }
233
+  },
234
+  bodyCheck: {
235
+    bodyCheck: {
236
+      method: 'get',
237
+      url: `${baseUrl}${wechat}/GetCheckByUser`
238
+    }
239
+  },
234 240
 }
235 241
 export default $api

+ 2
- 2
vue.config.js Ver arquivo

@@ -25,9 +25,9 @@ module.exports = {
25 25
       // '/api-v2': {
26 26
       '/api': {
27 27
         // target: 'https://dp.huiju360.com.cn/hj_operations',
28
-        target: 'http://192.168.0.62:8080', // wf
28
+        // target: 'http://192.168.0.62:8080', // wf
29 29
         // target: 'http://192.168.0.125:8080', // hyq
30
-        // target: 'http://192.168.0.11', // ys
30
+        target: 'http://192.168.0.11', // ys
31 31
         // target: 'http://dev.ycjcjy.com', // frp
32 32
         changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
33 33
         // pathRewrite: {