yuantianjiao 6 vuotta sitten
vanhempi
commit
5d9b6ee4bf

+ 22
- 20
src/pages/user/majorProjectsDetail/index.vue Näytä tiedosto

40
           <div class="flex-h">
40
           <div class="flex-h">
41
             <div class="flex-item">
41
             <div class="flex-item">
42
               <div class="img">
42
               <div class="img">
43
-                <router-link :to="{name: '', query: {}}">
43
+                <a @click="openMap">
44
                   <img v-if="courseDetail.CaseInfo !== undefined" :src="courseDetail.CaseInfo.CaseIcon" class="centerLabel cover" alt="">
44
                   <img v-if="courseDetail.CaseInfo !== undefined" :src="courseDetail.CaseInfo.CaseIcon" class="centerLabel cover" alt="">
45
                   <div class="flex-h">
45
                   <div class="flex-h">
46
                     <i class="iconfont icon-dingwei"></i>
46
                     <i class="iconfont icon-dingwei"></i>
50
                       </div>
50
                       </div>
51
                     </div>
51
                     </div>
52
                   </div>
52
                   </div>
53
-                </router-link>
53
+                </a>
54
               </div>
54
               </div>
55
             </div>
55
             </div>
56
           </div>
56
           </div>
127
         this.gray = true
127
         this.gray = true
128
       }
128
       }
129
       // console.log(JSON.stringify(res))
129
       // console.log(JSON.stringify(res))
130
-      wxsdk({ url: encodeURIComponent(window.location.href.split('#')[0]) }, {
131
-        title: '城的空间',
132
-        desc: '城的空间',
133
-        link: `${window.location.origin}${window.location.pathname}#/mainPage/indexPage`,
134
-        thu_image: `${window.location.origin}${window.location.pathname}${logo}`
135
-      }).then(() => {
136
-        let result = this.courseDetail.CaseInfo.Coordinate.split(",")
137
-        let latitude = parseFloat(result[0])
138
-        let longitude = parseFloat(result[1])
139
-        wx.openLocation({
140
-          latitude: latitude, // 纬度,浮点数,范围为90 ~ -90
141
-          longitude: longitude, // 经度,浮点数,范围为180 ~ -180。
142
-          name: this.courseDetail.CaseInfo.CaseName, // 位置名
143
-          // address: '', // 地址详情说明
144
-          // scale: 1, // 地图缩放级别,整形值,范围从1~28。默认为最大
145
-          // infoUrl: '' // 在查看位置界面底部显示的超链接,可点击跳转
146
-        })
147
-      })
148
     })
130
     })
149
   },
131
   },
150
   methods: {
132
   methods: {
174
       } else {
156
       } else {
175
         this.$router.push({ name: 'placeOrderForCourse', query: { id: this.courseDetail.CourseId } })
157
         this.$router.push({ name: 'placeOrderForCourse', query: { id: this.courseDetail.CourseId } })
176
       }
158
       }
159
+    },
160
+    openMap () {
161
+      wxsdk({ url: encodeURIComponent(window.location.href.split('#')[0]) }, {
162
+        title: '城的空间',
163
+        desc: '城的空间',
164
+        link: `${window.location.origin}${window.location.pathname}#/mainPage/indexPage`,
165
+        thu_image: `${window.location.origin}${window.location.pathname}${logo}`
166
+      }).then(() => {
167
+        let result = this.courseDetail.CaseInfo.Coordinate.split(",")
168
+        let latitude = parseFloat(result[0])
169
+        let longitude = parseFloat(result[1])
170
+        wx.openLocation({
171
+          latitude: latitude, // 纬度,浮点数,范围为90 ~ -90
172
+          longitude: longitude, // 经度,浮点数,范围为180 ~ -180。
173
+          name: this.courseDetail.CaseInfo.CaseName, // 位置名
174
+          // address: '', // 地址详情说明
175
+          // scale: 1, // 地图缩放级别,整形值,范围从1~28。默认为最大
176
+          // infoUrl: '' // 在查看位置界面底部显示的超链接,可点击跳转
177
+        })
178
+      })
177
     }
179
     }
178
   }
180
   }
179
 }
181
 }

+ 2
- 1
src/pages/user/placeOrderForCourse/index.vue Näytä tiedosto

164
         this.courseTimeList = arr.sort(function (a, b) { return new Date(a.BeginDate).getTime() > new Date(b.BeginDate).getTime() ? 1 : -1 })
164
         this.courseTimeList = arr.sort(function (a, b) { return new Date(a.BeginDate).getTime() > new Date(b.BeginDate).getTime() ? 1 : -1 })
165
         var id = this.$route.query.id, arr = [], nowDate = Date.now()
165
         var id = this.$route.query.id, arr = [], nowDate = Date.now()
166
         for (var n = 0; n < res.length; n++) {
166
         for (var n = 0; n < res.length; n++) {
167
-          if (res[n].Coupon.CouponType === 'coupon' && res[n].Status === 1) {
167
+          console.log(res[n])
168
+          if (res[n].Coupon.CouponType === 'course' && res[n].Status === 1) {
168
             if (res[n].Coupon.IsAll) {
169
             if (res[n].Coupon.IsAll) {
169
               this.couponList.push({
170
               this.couponList.push({
170
                 title: res[n].Coupon.CouponName,
171
                 title: res[n].Coupon.CouponName,