|
@@ -5,11 +5,11 @@
|
5
|
5
|
<div class="header flex-h">
|
6
|
6
|
<div class="flex-item flex-h">
|
7
|
7
|
<i class="iconfont icon-sousuo"></i>
|
8
|
|
- <router-link
|
|
8
|
+ <a
|
9
|
9
|
class="flex-item"
|
10
|
10
|
style="line-height: .3rem;color: #ccc;"
|
11
|
|
- :to="{name: 'booksSearch', query: {caseid: currentCaseId}}"
|
12
|
|
- >书本名称</router-link>
|
|
11
|
+ @click="tosearch"
|
|
12
|
+ >书本名称</a>
|
13
|
13
|
</div>
|
14
|
14
|
<a @click="showDialog = true">
|
15
|
15
|
<i class="iconfont icon-dingwei"></i>
|
|
@@ -79,6 +79,7 @@ import toolClass from '../../../../util/util'
|
79
|
79
|
import { mapState, createNamespacedHelpers } from 'vuex'
|
80
|
80
|
const { mapActions: mapAppActions } = createNamespacedHelpers('app')
|
81
|
81
|
const { mapState: mapBookState, mapActions: mapBookActions } = createNamespacedHelpers('book')
|
|
82
|
+import { Toast } from '../../../../../node_modules/vant';
|
82
|
83
|
import wxsdk from '../../../../util/share'
|
83
|
84
|
const wx = require('weixin-js-sdk')
|
84
|
85
|
export default {
|
|
@@ -151,6 +152,17 @@ export default {
|
151
|
152
|
'updateRecommendBookLeftNum',
|
152
|
153
|
'setBookCase',
|
153
|
154
|
]),
|
|
155
|
+ tosearch () {
|
|
156
|
+ if (this.currentCaseId === '') {
|
|
157
|
+ Toast.fail({
|
|
158
|
+ duration: 2000, // 持续展示 toast
|
|
159
|
+ forbidClick: true, // 禁用背景点击
|
|
160
|
+ message: '请先选择案场'
|
|
161
|
+ })
|
|
162
|
+ return
|
|
163
|
+ }
|
|
164
|
+ this.$router.push({name: 'booksSearch', query: {caseid: this.currentCaseId}})
|
|
165
|
+ },
|
154
|
166
|
Location () {
|
155
|
167
|
let that = this
|
156
|
168
|
wxsdk({ url: encodeURIComponent(window.location.href.split('#')[0]) }, {
|
|
@@ -160,7 +172,6 @@ export default {
|
160
|
172
|
thu_image: `https://spaceofcheng.oss-cn-beijing.aliyuncs.com/indexlogo.jpg?x-oss-process=style/wxicon`
|
161
|
173
|
}).then(() => {
|
162
|
174
|
})
|
163
|
|
- console.log(this.bookcaseid)
|
164
|
175
|
if(this.bookcaseid === '') {
|
165
|
176
|
wx.getLocation({
|
166
|
177
|
type: 'gcj02', // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02'
|