Commit 8c5ff8baee5b86cb5e318296e19ab3310b273446

Authored by “wangming”
1 parent 290144e9

updatemap

components/qj-fuzzy-search/index2.vue 0 → 100644
  1 +<template>
  2 + <cover-view class="index">
  3 + <cover-view class="search" v-if="show">
  4 + <cover-view v-for="item in list" :key="item[valueName]" class="item" :style="[setItemStyle]"
  5 + hover-class="item-hover" hover-start-time="0" hover-stay-time="100" @click="click(item)">
  6 + <cover-view class="item" style="padding-left: 10rpx;"
  7 + @click="click(item)">{{ item[labelName] }}</cover-view>
  8 + </cover-view>
  9 + <!-- <cover-view class="empty" v-else>{{ noData }}</cover-view> -->
  10 + </cover-view>
  11 + </cover-view>
  12 +</template>
  13 +
  14 +<script>
  15 + export default {
  16 + props: {
  17 + /** 展示整体组件 */
  18 + show: {
  19 + type: Boolean,
  20 + default: false
  21 + },
  22 + /** 需要展示的列表 */
  23 + list: {
  24 + type: Array,
  25 + default: () => []
  26 + },
  27 + /** 自定义label */
  28 + labelName: {
  29 + type: String,
  30 + default: 'label'
  31 + },
  32 + /** 自定义value */
  33 + valueName: {
  34 + type: String,
  35 + default: 'value'
  36 + },
  37 + /** 无内容时显示的内容 */
  38 + noData: {
  39 + type: String,
  40 + default: '暂无匹配企业...'
  41 + },
  42 + /** item的对齐样式 */
  43 + align: {
  44 + type: String,
  45 + default: 'left',
  46 + validator: value => {
  47 + return ['left', 'center', 'right'].includes(value);
  48 + }
  49 + },
  50 + /** 自定义item展示样式 */
  51 + customStyle: {
  52 + type: Object,
  53 + default: () => ({})
  54 + }
  55 + },
  56 + computed: {
  57 + /** 设置item的样式 */
  58 + setItemStyle() {
  59 + const {
  60 + align,
  61 + customStyle
  62 + } = this;
  63 + return {
  64 + textAlign: align,
  65 + ...customStyle
  66 + };
  67 + }
  68 + },
  69 + methods: {
  70 + /** item点击事件 */
  71 + click(item) {
  72 + this.$emit('select', {
  73 + ...item
  74 + });
  75 + },
  76 + /** 触底加载下一页 */
  77 + scrolltolower() {
  78 + this.$emit('scrolltolower');
  79 + }
  80 + }
  81 + };
  82 +</script>
  83 +
  84 +<style lang="scss" scoped>
  85 + .index {
  86 + width: 99%;
  87 + position: absolute;
  88 + z-index: 9;
  89 +
  90 +
  91 + }
  92 +
  93 + .search {
  94 + height: 500rpx;
  95 +
  96 + overflow-x: hidden;
  97 +
  98 + .item {
  99 + font-size: 26rpx;
  100 + height: 60rpx;
  101 + line-height: 60rpx;
  102 + background-color: #fff;
  103 +
  104 + &-hover {
  105 + background-color: #f5f5f5;
  106 + }
  107 + }
  108 + }
  109 +</style>
0 110 \ No newline at end of file
... ...
node_modules/.package_versions.json 0 → 100644
  1 +{}
0 2 \ No newline at end of file
... ...
pages.json
... ... @@ -4,7 +4,7 @@
4 4 "^ncc-(.*)": "@/components/ncc/ncc-$1/index.vue"
5 5 },
6 6 "pages": [
7   -
  7 +
8 8 {
9 9 "path": "pages/home/home",
10 10 "style": {
... ... @@ -34,33 +34,33 @@
34 34 "navigationBarTitleText": "需求详情",
35 35 "navigationBarBackgroundColor": "#FFFFFF"
36 36 }
37   - },
  37 + },
38 38 {
39 39 "path": "pages/supply/supply",
40 40 "style": {
41 41 "navigationBarTitleText": "供应中心",
42 42 "navigationBarBackgroundColor": "#FFFFFF"
43 43 }
44   - },
  44 + },
45 45 {
46 46 "path": "pages/datain/datain",
47 47 "style": {
48 48 "navigationBarTitleText": "数据填报",
49 49 "navigationBarBackgroundColor": "#FFFFFF"
50 50 }
51   - },{
  51 + }, {
52 52 "path": "pages/policy/policy",
53 53 "style": {
54 54 "navigationBarTitleText": "政策法规",
55 55 "navigationBarBackgroundColor": "#FFFFFF"
56 56 }
57   - },{
  57 + }, {
58 58 "path": "pages/notice/notice",
59 59 "style": {
60 60 "navigationBarTitleText": "公示公告",
61 61 "navigationBarBackgroundColor": "#FFFFFF"
62 62 }
63   - },{
  63 + }, {
64 64 "path": "pages/construct/construct",
65 65 "style": {
66 66 "navigationBarTitleText": "党的建设",
... ... @@ -73,49 +73,49 @@
73 73 "navigationBarTitleText": "",
74 74 "navigationBarBackgroundColor": "#FFFFFF"
75 75 }
76   - },{
  76 + }, {
77 77 "path": "pages/data/data",
78 78 "style": {
79 79 "navigationBarTitleText": "数据填报",
80 80 "navigationBarBackgroundColor": "#FFFFFF"
81 81 }
82   - },{
  82 + }, {
83 83 "path": "pages/Feedback/Feedback",
84 84 "style": {
85 85 "navigationBarTitleText": "我要办事",
86 86 "navigationBarBackgroundColor": "#FFFFFF"
87 87 }
88   - },{
  88 + }, {
89 89 "path": "pages/map/map",
90 90 "style": {
91 91 "navigationBarTitleText": "企业地图",
92 92 "navigationBarBackgroundColor": "#FFFFFF"
93 93 }
94   - },{
  94 + }, {
95 95 "path": "pages/demand/demand",
96 96 "style": {
97 97 "navigationBarTitleText": "需求中心",
98 98 "navigationBarBackgroundColor": "#FFFFFF"
99 99 }
100   - },{
  100 + }, {
101 101 "path": "pages/official/official",
102 102 "style": {
103 103 "navigationBarTitleText": "公文办理",
104 104 "navigationBarBackgroundColor": "#FFFFFF"
105 105 }
106   - },{
  106 + }, {
107 107 "path": "pages/neighbor/neighbor",
108 108 "style": {
109 109 "navigationBarTitleText": "邻居计划",
110 110 "navigationBarBackgroundColor": "#FFFFFF"
111 111 }
112   - },{
  112 + }, {
113 113 "path": "pages/talent/talent",
114 114 "style": {
115 115 "navigationBarTitleText": "人才服务",
116 116 "navigationBarBackgroundColor": "#FFFFFF"
117 117 }
118   - },{
  118 + }, {
119 119 "path": "pages/equip/equip",
120 120 "style": {
121 121 "navigationBarTitleText": "机构",
... ... @@ -239,158 +239,139 @@
239 239 "path": "pages/form/index"
240 240 },
241 241 {
242   - "path" : "pages/policyDetail/policyDetail",
243   - "style" :
244   - {
245   - "navigationBarTitleText" : "政策详情",
246   - "enablePullDownRefresh" : false
  242 + "path": "pages/policyDetail/policyDetail",
  243 + "style": {
  244 + "navigationBarTitleText": "政策详情",
  245 + "enablePullDownRefresh": false
247 246 }
248 247 },
249 248 {
250   - "path" : "pages/newsDetail/newsDetail",
251   - "style" :
252   - {
253   - "navigationBarTitleText" : "新闻详情",
254   - "enablePullDownRefresh" : false
  249 + "path": "pages/newsDetail/newsDetail",
  250 + "style": {
  251 + "navigationBarTitleText": "新闻详情",
  252 + "enablePullDownRefresh": false
255 253 }
256 254 },
257 255 {
258   - "path" : "pages/talentDetail/talentDetail",
259   - "style" :
260   - {
261   - "navigationBarTitleText" : "职位详情",
262   - "enablePullDownRefresh" : false
  256 + "path": "pages/talentDetail/talentDetail",
  257 + "style": {
  258 + "navigationBarTitleText": "职位详情",
  259 + "enablePullDownRefresh": false
263 260 }
264 261 },
265 262 {
266   - "path" : "pages/allCompany/allCompany",
267   - "style" :
268   - {
269   - "navigationBarTitleText" : "企业",
270   - "enablePullDownRefresh" : false
  263 + "path": "pages/allCompany/allCompany",
  264 + "style": {
  265 + "navigationBarTitleText": "企业",
  266 + "enablePullDownRefresh": false
271 267 }
272 268 },
273 269 {
274   - "path" : "pages/companyDetail/companyDetail",
275   - "style" :
276   - {
277   - "navigationBarTitleText" : "企业详情",
278   - "enablePullDownRefresh" : false
  270 + "path": "pages/companyDetail/companyDetail",
  271 + "style": {
  272 + "navigationBarTitleText": "企业详情",
  273 + "enablePullDownRefresh": false
279 274 }
280 275 },
281 276 {
282   - "path" : "pages/postTalent/postTalent",
283   - "style" :
284   - {
285   - "navigationBarTitleText" : "人才招聘发布",
286   - "enablePullDownRefresh" : false
  277 + "path": "pages/postTalent/postTalent",
  278 + "style": {
  279 + "navigationBarTitleText": "人才招聘发布",
  280 + "enablePullDownRefresh": false
287 281 }
288 282 },
289 283 {
290   - "path" : "pages/fileLook/fileLook",
291   - "style" :
292   - {
293   - "navigationBarTitleText" : "信息回执",
294   - "enablePullDownRefresh" : false
  284 + "path": "pages/fileLook/fileLook",
  285 + "style": {
  286 + "navigationBarTitleText": "信息回执",
  287 + "enablePullDownRefresh": false
295 288 }
296 289 },
297 290 {
298   - "path" : "pages/postProduct/postProduct",
299   - "style" :
300   - {
301   - "navigationBarTitleText" : "发布产品",
302   - "enablePullDownRefresh" : false
  291 + "path": "pages/postProduct/postProduct",
  292 + "style": {
  293 + "navigationBarTitleText": "发布产品",
  294 + "enablePullDownRefresh": false
303 295 }
304 296 },
305 297 {
306   - "path" : "pages/postDemand/postDemand",
307   - "style" :
308   - {
309   - "navigationBarTitleText" : "发布需求",
310   - "enablePullDownRefresh" : false
  298 + "path": "pages/postDemand/postDemand",
  299 + "style": {
  300 + "navigationBarTitleText": "发布需求",
  301 + "enablePullDownRefresh": false
311 302 }
312 303 },
313 304 {
314   - "path" : "pages/postCon/postCon",
315   - "style" :
316   - {
317   - "navigationBarTitleText" : "党的建设发布",
318   - "enablePullDownRefresh" : false
  305 + "path": "pages/postCon/postCon",
  306 + "style": {
  307 + "navigationBarTitleText": "党的建设发布",
  308 + "enablePullDownRefresh": false
319 309 }
320 310 },
321 311 {
322   - "path" : "pages/my/myPro/myPro",
323   - "style" :
324   - {
325   - "navigationBarTitleText" : "发布产品列表",
326   - "enablePullDownRefresh" : false
  312 + "path": "pages/my/myPro/myPro",
  313 + "style": {
  314 + "navigationBarTitleText": "发布产品列表",
  315 + "enablePullDownRefresh": false
327 316 }
328 317 },
329 318 {
330   - "path" : "pages/my/myDemand/myDemand",
331   - "style" :
332   - {
333   - "navigationBarTitleText" : "发布需求列表",
334   - "enablePullDownRefresh" : false
  319 + "path": "pages/my/myDemand/myDemand",
  320 + "style": {
  321 + "navigationBarTitleText": "发布需求列表",
  322 + "enablePullDownRefresh": false
335 323 }
336 324 },
337 325 {
338   - "path" : "pages/my/myZhao/myZhao",
339   - "style" :
340   - {
341   - "navigationBarTitleText" : "发布招聘列表",
342   - "enablePullDownRefresh" : false
  326 + "path": "pages/my/myZhao/myZhao",
  327 + "style": {
  328 + "navigationBarTitleText": "发布招聘列表",
  329 + "enablePullDownRefresh": false
343 330 }
344 331 },
345 332 {
346   - "path" : "pages/postNotice/postNotice",
347   - "style" :
348   - {
349   - "navigationBarTitleText" : "公式公告发布",
350   - "enablePullDownRefresh" : false
  333 + "path": "pages/postNotice/postNotice",
  334 + "style": {
  335 + "navigationBarTitleText": "公式公告发布",
  336 + "enablePullDownRefresh": false
351 337 }
352 338 },
353 339 {
354   - "path" : "pages/postNews/postNews",
355   - "style" :
356   - {
357   - "navigationBarTitleText" : "新闻发布",
358   - "enablePullDownRefresh" : false
  340 + "path": "pages/postNews/postNews",
  341 + "style": {
  342 + "navigationBarTitleText": "新闻发布",
  343 + "enablePullDownRefresh": false
359 344 }
360 345 },
361 346 {
362   - "path" : "pages/postPolicy/postPolicy",
363   - "style" :
364   - {
365   - "navigationBarTitleText" : "政策发布",
366   - "enablePullDownRefresh" : false
  347 + "path": "pages/postPolicy/postPolicy",
  348 + "style": {
  349 + "navigationBarTitleText": "政策发布",
  350 + "enablePullDownRefresh": false
367 351 }
368 352 },
369 353 {
370   - "path" : "pages/recommend/recommend",
371   - "style" :
372   - {
373   - "navigationBarTitleText" : "人才推介",
374   - "enablePullDownRefresh" : false
  354 + "path": "pages/recommend/recommend",
  355 + "style": {
  356 + "navigationBarTitleText": "人才推介",
  357 + "enablePullDownRefresh": false
375 358 }
376 359 },
377 360 {
378   - "path" : "pages/recommend/postRecommend/postRecommend",
379   - "style" :
380   - {
381   - "navigationBarTitleText" : "人才推介发布",
382   - "enablePullDownRefresh" : false
  361 + "path": "pages/recommend/postRecommend/postRecommend",
  362 + "style": {
  363 + "navigationBarTitleText": "人才推介发布",
  364 + "enablePullDownRefresh": false
383 365 }
384 366 },
385 367 {
386   - "path" : "pages/recommend/recommendInfo/recommendInfo",
387   - "style" :
388   - {
389   - "navigationBarTitleText" : "人才信息",
390   - "enablePullDownRefresh" : false
  368 + "path": "pages/recommend/recommendInfo/recommendInfo",
  369 + "style": {
  370 + "navigationBarTitleText": "人才信息",
  371 + "enablePullDownRefresh": false
391 372 }
392 373 }
393   -
  374 +
394 375 // {
395 376 // "path" : "apis/supply/supply",
396 377 // "style" :
... ... @@ -584,14 +565,12 @@
584 565 "ly-tree-node": "/components/ly-tree/ly-tree-node"
585 566 }
586 567 },
587   - "condition" : { //模式配置,仅开发期间生效
  568 + "condition": { //模式配置,仅开发期间生效
588 569 "current": 0, //当前激活的模式(list 的索引项)
589   - "list": [
590   - {
591   - "name": "", //模式名称
592   - "path": "", //启动页面,必选
593   - "query": "" //启动参数,在页面的onLoad函数里面得到
594   - }
595   - ]
  570 + "list": [{
  571 + "name": "", //模式名称
  572 + "path": "", //启动页面,必选
  573 + "query": "" //启动参数,在页面的onLoad函数里面得到
  574 + }]
596 575 }
597 576 -}
  577 +}
598 578 \ No newline at end of file
... ...
pages/map/map copy.vue 0 → 100644
  1 +<template>
  2 + <view class="page">
  3 + <view class="content">
  4 + <cover-view></cover-view>
  5 + <view class="bg">
  6 + <!-- <web-view src="../../static/html/map.html" style="width: 100%;height: 100%; position: absolute; z-index: 0;"></web-view> -->
  7 + <map style="width: 100%;height: 70%;position: relative;top: 190rpx;" :latitude="latitude"
  8 + :longitude="longitude" :markers="covers" :show-location="true"></map>
  9 + </view>
  10 + <view class="map-content" style="position: relative;z-index: 1000;">
  11 + <!-- 搜索 -->
  12 + <view class="search-head">
  13 + <view class="search">
  14 + <image src="../../static/fdj1.png"></image>
  15 + <text></text>
  16 + <input type="text" v-model="selectName" placeholder="搜索关键词" @input="getCompanyList" />
  17 + </view>
  18 + <!-- 显示公司选项 -->
  19 + <view class="btn" @click="getCompanyDetail">
  20 + <text>搜索</text>
  21 + </view>
  22 + </view>
  23 + <mo-hu-search :show="selectShow" :list="comList" @select="select" label-name="name"
  24 + value-name="id"></mo-hu-search>
  25 + </view>
  26 +
  27 + <view class="bottom">
  28 + <view class="invitation-data">
  29 + <view class="invitation-show">
  30 + <view class="icon" v-show="show">
  31 + <image :src=" baseUrl + logo.url"></image>
  32 + </view>
  33 + <view class="item">
  34 + <view class="title-btn">
  35 + <view class="title">
  36 + <text class="bt">{{this.companyName}}</text>
  37 + </view>
  38 + </view>
  39 + <view class="describe">
  40 + <text>{{this.dizhi}}</text>
  41 + </view>
  42 + <view class="describe">
  43 + <text>电话:{{getData.fuzerendianhua}}</text>
  44 + <image src="../../static/map1.png"></image>
  45 + </view>
  46 + <view class="describe">
  47 + <text>营业时间:10:00-20:00</text>
  48 + </view>
  49 + </view>
  50 + <view class="right">
  51 + <view class="red-btn" @click.stop="handleNavigation">
  52 + <image src="../../static/dh.png"></image>
  53 + <text>导航</text>
  54 + </view>
  55 + </view>
  56 + </view>
  57 + </view>
  58 + </view>
  59 + </view>
  60 + </view>
  61 +</template>
  62 +
  63 +<script>
  64 + import request from '@/utils/request.js'
  65 + // import moHuSearch from '../../components/qj-fuzzy-search/index.vue'
  66 + import moHuSearch from '../../components/qj-fuzzy-search/index.vue'
  67 + export default {
  68 + components: {
  69 + moHuSearch
  70 + },
  71 + data() {
  72 + return {
  73 + keyword: '',
  74 + id: 0, // 使用 marker点击事件 需要填写id
  75 + title: 'map',
  76 + // latitude: 30.602494,
  77 + // longitude: 104.073004,
  78 + latitude: 30.926786,
  79 + longitude: 104.294514,
  80 + covers: [{
  81 + latitude: 30.926786,
  82 + longitude: 104.294514,
  83 + iconPath: '../../static/map_red.png',
  84 + // width:20,
  85 + // height:26,
  86 + },
  87 + // {
  88 + // latitude: 39.90,
  89 + // longitude: 116.39,
  90 + // iconPath: '../../../static/wuganda.png'
  91 + // },
  92 + ],
  93 + getData: {},
  94 + show: false,
  95 + selectShow: false,
  96 + selectName: '',
  97 + selectId: '',
  98 + logo: {},
  99 + baseUrl: 'http://deyanggaoxin.fengshiyun.com',
  100 + comList: [],
  101 + companyName: '德阳高新区管委会',
  102 + dizhi: '广汉市聆湖西路一段一号',
  103 + // 我自己的位置经纬度(百度地图需要传入自己的经纬度进行导航)
  104 + selfLocation: {
  105 + latitude: '',
  106 + longitude: ''
  107 + }
  108 + }
  109 + },
  110 + onLoad() {
  111 + // this.getCompanyDetail()
  112 + },
  113 + methods: {
  114 + // 获取公司列表
  115 + getCompanyList() {
  116 + this.selectShow = true
  117 + // this.$refs.sou.open()
  118 + request({
  119 + url: '/api/permission/organize/GetSelectList',
  120 + method: 'get',
  121 + data: {
  122 + keyword: this.selectName
  123 + }
  124 + }).then(res => {
  125 + if (res.code === 200) {
  126 + // console.log(res)
  127 + this.comList = res.data.list.map(it => {
  128 + return {
  129 + id: it.id,
  130 + name: it.fullName
  131 + }
  132 + })
  133 + // console.log(this.comList)
  134 + this.comList = JSON.parse(JSON.stringify(this.comList))
  135 + }
  136 + })
  137 + },
  138 + select(item) {
  139 + this.selectShow = false;
  140 + this.selectName = item.name;
  141 + this.selectId = item.id
  142 + },
  143 + // 查询公司
  144 + getCompanyDetail() {
  145 + request({
  146 + url: `/api/permission/organize/${this.selectId}`,
  147 + method: 'get',
  148 + data: {}
  149 + }).then(res => {
  150 + if (res.code === 200) {
  151 + console.log(res)
  152 + // console.log(res.data.list)
  153 + if (res.data.latlong !== null) {
  154 + let position = res.data.latlong.split(',')
  155 + this.latitude = position[1]
  156 + this.longitude = position[0]
  157 + this.covers[0].latitude = position[1]
  158 + this.covers[0].longitude = position[0]
  159 + console.log(position)
  160 + }
  161 +
  162 + this.getData = res.data
  163 + this.companyName = this.getData.fullName
  164 + this.dizhi = this.getData.dizhi
  165 + // console.log(this.getData.F_Logo.length)
  166 + if (this.getData.logo.length > 0) {
  167 + this.show = true
  168 + this.logo = this.getData.logo[0]
  169 + console.log(this.logo)
  170 +
  171 + }
  172 + }
  173 + })
  174 + },
  175 +
  176 + // 点击跳转到本机地图软件
  177 + handleNavigation() {
  178 + // console.log('导航')
  179 + const _this = this
  180 + if (!this.latitude || !this.longitude || !this.companyName) return
  181 + uni.getLocation({
  182 + type: 'wgs84',
  183 + success: function(res) {
  184 + console.log('当前位置的经度:' + res.longitude);
  185 + console.log('当前位置的纬度:' + res.latitude);
  186 + this.selfLocation.longitude = res.longitude
  187 + this.selfLocation.latitude = res.latitude
  188 + }
  189 + });
  190 + // 微信
  191 + // #ifdef MP-WEIXIN
  192 + let _obj = {
  193 + latitude: parseFloat(this.latitude),
  194 + longitude: parseFloat(this.longitude),
  195 + name: this.companyName,
  196 + }
  197 + if (this.dizhi) {
  198 + _obj['dizhi'] = this.dizhi
  199 + }
  200 + uni.openLocation({
  201 + ..._obj,
  202 + success: function(res) {
  203 + console.log('打开系统位置地图成功')
  204 + },
  205 + fail: function(error) {
  206 + console.log(error)
  207 + }
  208 + })
  209 + // #endif
  210 +
  211 + // #ifdef APP-PLUS
  212 + // 判断系统安装的地图应用有哪些, 并生成菜单按钮
  213 + let _mapName = [{
  214 + title: '高德地图',
  215 + name: 'amap',
  216 + androidName: 'com.autonavi.minimap',
  217 + iosName: 'iosamap://'
  218 + },
  219 + {
  220 + title: '百度地图',
  221 + name: 'baidumap',
  222 + androidName: 'com.baidu.BaiduMap',
  223 + iosName: 'baidumap://'
  224 + },
  225 + {
  226 + title: '腾讯地图',
  227 + name: 'qqmap',
  228 + androidName: 'com.tencent.map',
  229 + iosName: 'qqmap://'
  230 + },
  231 + ]
  232 + // 根据真机有的地图软件 生成的 操作菜单
  233 + let buttons = []
  234 + let platform = uni.getSystemInfoSync().platform
  235 + platform === 'android' && _mapName.forEach(item => {
  236 + if (plus.runtime.isApplicationExist({
  237 + pname: item.androidName
  238 + })) {
  239 + buttons.push(item)
  240 + }
  241 + })
  242 + platform === 'ios' && _mapName.forEach(item => {
  243 + console.log(item.iosName)
  244 + if (plus.runtime.isApplicationExist({
  245 + action: item.iosName
  246 + })) {
  247 + buttons.push(item)
  248 + }
  249 + })
  250 + if (buttons.length) {
  251 + plus.nativeUI.actionSheet({ //选择菜单
  252 + title: "选择地图应用",
  253 + cancel: "取消",
  254 + buttons: buttons
  255 + }, function(e) {
  256 + let _map = buttons[e.index - 1]
  257 + _this.openURL(_map, platform)
  258 + })
  259 + } else {
  260 + uni.showToast({
  261 + title: '请安装地图软件',
  262 + icon: 'none'
  263 + })
  264 + return
  265 + }
  266 + // #endif
  267 + },
  268 +
  269 + // 打开第三方程序实际应用
  270 + openURL(map, platform) {
  271 + let _defaultUrl = {
  272 + android: {
  273 + "amap": `amapuri://route/plan/?sid=&did=&dlat=${this.latitude}&dlon=${this.longitude}&dname=${this.companyName}&dev=0&t=0`,
  274 + 'qqmap': `qqmap://map/routeplan?type=drive&to=${this.companyName}&tocoord=${this.latitude},${this.longitude}&referer=fuxishan_uni_client`,
  275 + 'baidumap': `baidumap://map/direction?origin=${this.selfLocation.latitude},${this.selfLocation.longitude}&destination=name:${this.companyName}|latlng:${this.latitude},${this.longitude}&coord_type=wgs84&mode=driving&src=andr.baidu.openAPIdemo"`
  276 + },
  277 + ios: {
  278 + "amap": `iosamap://path?sourceApplication=fuxishan_uni_client&dlat=${this.latitude}&dlon=${this.longitude}&dname=${this.companyName}&dev=0&t=0`,
  279 + 'qqmap': `qqmap://map/routeplan?type=drive&to=${this.companyName}&tocoord=${this.latitude},${this.longitude}&referer=fuxishan_uni_client`,
  280 + 'baidumap': `baidumap://map/direction?origin=${this.selfLocation.latitude},${this.selfLocation.longitude}&destination=name:${this.companyName}|latlng:${this.latitude},${this.longitude}&mode=driving&src=ios.baidu.openAPIdemo`
  281 + }
  282 + }
  283 + let newurl = encodeURI(_defaultUrl[platform][map.name]);
  284 + console.log(newurl)
  285 + plus.runtime.openURL(newurl, function(res) {
  286 + console.log(res)
  287 + uni.showModal({
  288 + content: res.message
  289 + })
  290 + }, map.androidName ? map.androidName : '');
  291 + }
  292 +
  293 + }
  294 + }
  295 +</script>
  296 +
  297 +<style scoped lang="scss">
  298 + @import 'map.scss';
  299 +</style>
0 300 \ No newline at end of file
... ...
pages/map/map.nvue 0 → 100644
  1 +<template>
  2 + <view class="page">
  3 + <view class="content">
  4 + <cover-view></cover-view>
  5 + <view class="bg">
  6 + <!-- <web-view src="../../static/html/map.html" style="width: 100%;height: 100%; position: absolute; z-index: 0;"></web-view> -->
  7 + <map style="width: 100%;height: 70%;position: relative;top: 190rpx;" :latitude="latitude"
  8 + :longitude="longitude" :markers="covers" :show-location="true"></map>
  9 + </view>
  10 + <view class="map-content" style="position: relative;z-index: 1000;">
  11 + <!-- 搜索 -->
  12 + <view class="search-head">
  13 + <view class="search">
  14 + <image src="../../static/fdj1.png"></image>
  15 + <text></text>
  16 + <input type="text" v-model="selectName" placeholder="搜索关键词" @input="getCompanyList" />
  17 + </view>
  18 + <!-- 显示公司选项 -->
  19 + <view class="btn" @click="getCompanyDetail">
  20 + <text>搜索11</text>
  21 + </view>
  22 + </view>
  23 + <mo-hu-search :show="selectShow" :list="comList" @select="select" label-name="name"
  24 + value-name="id"></mo-hu-search>
  25 + </view>
  26 +
  27 + <view class="bottom">
  28 + <view class="invitation-data">
  29 + <view class="invitation-show">
  30 + <view class="icon" v-show="show">
  31 + <image :src=" baseUrl + logo.url"></image>
  32 + </view>
  33 + <view class="item">
  34 + <view class="title-btn">
  35 + <view class="title">
  36 + <text class="bt">{{this.companyName}}</text>
  37 + </view>
  38 + </view>
  39 + <view class="describe">
  40 + <text>{{this.dizhi}}</text>
  41 + </view>
  42 + <view class="describe">
  43 + <text>电话:{{getData.fuzerendianhua}}</text>
  44 + <image src="../../static/map1.png"></image>
  45 + </view>
  46 + <view class="describe">
  47 + <text>营业时间:10:00-20:00</text>
  48 + </view>
  49 + </view>
  50 + <view class="right">
  51 + <view class="red-btn" @click.stop="handleNavigation">
  52 + <image src="../../static/dh.png"></image>
  53 + <text>导航</text>
  54 + </view>
  55 + </view>
  56 + </view>
  57 + </view>
  58 + </view>
  59 + </view>
  60 + </view>
  61 +</template>
  62 +
  63 +<script>
  64 + import request from '@/utils/request.js'
  65 + // import moHuSearch from '../../components/qj-fuzzy-search/index.vue'
  66 + import moHuSearch from '../../components/qj-fuzzy-search/index.vue'
  67 + export default {
  68 + components: {
  69 + moHuSearch
  70 + },
  71 + data() {
  72 + return {
  73 + keyword: '',
  74 + id: 0, // 使用 marker点击事件 需要填写id
  75 + title: 'map',
  76 + // latitude: 30.602494,
  77 + // longitude: 104.073004,
  78 + latitude: 30.926786,
  79 + longitude: 104.294514,
  80 + covers: [{
  81 + latitude: 30.926786,
  82 + longitude: 104.294514,
  83 + iconPath: '../../static/map_red.png',
  84 + // width:20,
  85 + // height:26,
  86 + },
  87 + // {
  88 + // latitude: 39.90,
  89 + // longitude: 116.39,
  90 + // iconPath: '../../../static/wuganda.png'
  91 + // },
  92 + ],
  93 + getData: {},
  94 + show: false,
  95 + selectShow: false,
  96 + selectName: '',
  97 + selectId: '',
  98 + logo: {},
  99 + baseUrl: 'http://deyanggaoxin.fengshiyun.com',
  100 + comList: [],
  101 + companyName: '德阳高新区管委会',
  102 + dizhi: '广汉市聆湖西路一段一号',
  103 + // 我自己的位置经纬度(百度地图需要传入自己的经纬度进行导航)
  104 + selfLocation: {
  105 + latitude: '',
  106 + longitude: ''
  107 + }
  108 + }
  109 + },
  110 + onLoad() {
  111 + // this.getCompanyDetail()
  112 + },
  113 + methods: {
  114 + // 获取公司列表
  115 + getCompanyList() {
  116 + this.selectShow = true
  117 + // this.$refs.sou.open()
  118 + request({
  119 + url: '/api/permission/organize/GetSelectList',
  120 + method: 'get',
  121 + data: {
  122 + keyword: this.selectName
  123 + }
  124 + }).then(res => {
  125 + if (res.code === 200) {
  126 + // console.log(res)
  127 + this.comList = res.data.list.map(it => {
  128 + return {
  129 + id: it.id,
  130 + name: it.fullName
  131 + }
  132 + })
  133 + // console.log(this.comList)
  134 + this.comList = JSON.parse(JSON.stringify(this.comList))
  135 + }
  136 + })
  137 + },
  138 + select(item) {
  139 + this.selectShow = false;
  140 + this.selectName = item.name;
  141 + this.selectId = item.id
  142 + },
  143 + // 查询公司
  144 + getCompanyDetail() {
  145 + request({
  146 + url: `/api/permission/organize/${this.selectId}`,
  147 + method: 'get',
  148 + data: {}
  149 + }).then(res => {
  150 + if (res.code === 200) {
  151 + console.log(res)
  152 + // console.log(res.data.list)
  153 + if (res.data.latlong !== null) {
  154 + let position = res.data.latlong.split(',')
  155 + this.latitude = position[1]
  156 + this.longitude = position[0]
  157 + this.covers[0].latitude = position[1]
  158 + this.covers[0].longitude = position[0]
  159 + console.log(position)
  160 + }
  161 +
  162 + this.getData = res.data
  163 + this.companyName = this.getData.fullName
  164 + this.dizhi = this.getData.dizhi
  165 + // console.log(this.getData.F_Logo.length)
  166 + if (this.getData.logo.length > 0) {
  167 + this.show = true
  168 + this.logo = this.getData.logo[0]
  169 + console.log(this.logo)
  170 +
  171 + }
  172 + }
  173 + })
  174 + },
  175 +
  176 + // 点击跳转到本机地图软件
  177 + handleNavigation() {
  178 + // console.log('导航')
  179 + const _this = this
  180 + if (!this.latitude || !this.longitude || !this.companyName) return
  181 + uni.getLocation({
  182 + type: 'wgs84',
  183 + success: function(res) {
  184 + console.log('当前位置的经度:' + res.longitude);
  185 + console.log('当前位置的纬度:' + res.latitude);
  186 + this.selfLocation.longitude = res.longitude
  187 + this.selfLocation.latitude = res.latitude
  188 + }
  189 + });
  190 + // 微信
  191 + // #ifdef MP-WEIXIN
  192 + let _obj = {
  193 + latitude: parseFloat(this.latitude),
  194 + longitude: parseFloat(this.longitude),
  195 + name: this.companyName,
  196 + }
  197 + if (this.dizhi) {
  198 + _obj['dizhi'] = this.dizhi
  199 + }
  200 + uni.openLocation({
  201 + ..._obj,
  202 + success: function(res) {
  203 + console.log('打开系统位置地图成功')
  204 + },
  205 + fail: function(error) {
  206 + console.log(error)
  207 + }
  208 + })
  209 + // #endif
  210 +
  211 + // #ifdef APP-PLUS
  212 + // 判断系统安装的地图应用有哪些, 并生成菜单按钮
  213 + let _mapName = [{
  214 + title: '高德地图',
  215 + name: 'amap',
  216 + androidName: 'com.autonavi.minimap',
  217 + iosName: 'iosamap://'
  218 + },
  219 + {
  220 + title: '百度地图',
  221 + name: 'baidumap',
  222 + androidName: 'com.baidu.BaiduMap',
  223 + iosName: 'baidumap://'
  224 + },
  225 + {
  226 + title: '腾讯地图',
  227 + name: 'qqmap',
  228 + androidName: 'com.tencent.map',
  229 + iosName: 'qqmap://'
  230 + },
  231 + ]
  232 + // 根据真机有的地图软件 生成的 操作菜单
  233 + let buttons = []
  234 + let platform = uni.getSystemInfoSync().platform
  235 + platform === 'android' && _mapName.forEach(item => {
  236 + if (plus.runtime.isApplicationExist({
  237 + pname: item.androidName
  238 + })) {
  239 + buttons.push(item)
  240 + }
  241 + })
  242 + platform === 'ios' && _mapName.forEach(item => {
  243 + console.log(item.iosName)
  244 + if (plus.runtime.isApplicationExist({
  245 + action: item.iosName
  246 + })) {
  247 + buttons.push(item)
  248 + }
  249 + })
  250 + if (buttons.length) {
  251 + plus.nativeUI.actionSheet({ //选择菜单
  252 + title: "选择地图应用",
  253 + cancel: "取消",
  254 + buttons: buttons
  255 + }, function(e) {
  256 + let _map = buttons[e.index - 1]
  257 + _this.openURL(_map, platform)
  258 + })
  259 + } else {
  260 + uni.showToast({
  261 + title: '请安装地图软件',
  262 + icon: 'none'
  263 + })
  264 + return
  265 + }
  266 + // #endif
  267 + },
  268 +
  269 + // 打开第三方程序实际应用
  270 + openURL(map, platform) {
  271 + let _defaultUrl = {
  272 + android: {
  273 + "amap": `amapuri://route/plan/?sid=&did=&dlat=${this.latitude}&dlon=${this.longitude}&dname=${this.companyName}&dev=0&t=0`,
  274 + 'qqmap': `qqmap://map/routeplan?type=drive&to=${this.companyName}&tocoord=${this.latitude},${this.longitude}&referer=fuxishan_uni_client`,
  275 + 'baidumap': `baidumap://map/direction?origin=${this.selfLocation.latitude},${this.selfLocation.longitude}&destination=name:${this.companyName}|latlng:${this.latitude},${this.longitude}&coord_type=wgs84&mode=driving&src=andr.baidu.openAPIdemo"`
  276 + },
  277 + ios: {
  278 + "amap": `iosamap://path?sourceApplication=fuxishan_uni_client&dlat=${this.latitude}&dlon=${this.longitude}&dname=${this.companyName}&dev=0&t=0`,
  279 + 'qqmap': `qqmap://map/routeplan?type=drive&to=${this.companyName}&tocoord=${this.latitude},${this.longitude}&referer=fuxishan_uni_client`,
  280 + 'baidumap': `baidumap://map/direction?origin=${this.selfLocation.latitude},${this.selfLocation.longitude}&destination=name:${this.companyName}|latlng:${this.latitude},${this.longitude}&mode=driving&src=ios.baidu.openAPIdemo`
  281 + }
  282 + }
  283 + let newurl = encodeURI(_defaultUrl[platform][map.name]);
  284 + console.log(newurl)
  285 + plus.runtime.openURL(newurl, function(res) {
  286 + console.log(res)
  287 + uni.showModal({
  288 + content: res.message
  289 + })
  290 + }, map.androidName ? map.androidName : '');
  291 + }
  292 +
  293 + }
  294 + }
  295 +</script>
  296 +
  297 +<style scoped lang="scss">
  298 + @import 'map.scss';
  299 +</style>
0 300 \ No newline at end of file
... ...
pages/map/map.scss
... ... @@ -9,21 +9,22 @@
9 9 display: flex;
10 10 justify-content: center;
11 11 align-items: center;
12   - width: 90%;
  12 + width: 100%;
  13 + height: 84rpx;
13 14 margin: 0 auto;
14 15 // #ifdef APP-PLUS */
15 16 // height: calc(120rpx + var(--status-bar-height));
16 17 // /* #endif
17 18 // padding: 20rpx;
18   - box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
19   - margin-top:8rpx;
20   - border-radius: 100rpx;
  19 + //box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
  20 + border: 6rpx solid #efefef;
  21 + margin-top:20rpx;
21 22 background-color: #FFFFFF;
22 23 .search {
23 24 display: flex;
24 25 align-items: center;
25 26 width: 100%;
26   - height: 80rpx;
  27 + height: 78rpx;
27 28 // background: rgba(255, 255, 255, 1);
28 29 border: 0;
29 30 margin-left: 30rpx;
... ... @@ -55,10 +56,11 @@
55 56 align-items: center;
56 57 justify-content: center;
57 58 position: absolute;
58   - right: 60rpx;
  59 + right: 20rpx;
59 60 background-color: #D32D25;
60   - border-radius: 100rpx;
61   - padding: 12rpx 25rpx;
  61 + border-radius: 10rpx;
  62 + width: 120rpx;;
  63 + padding: 12rpx;
62 64 text {
63 65 font-size: 28rpx;
64 66 color: #fff;
... ... @@ -128,16 +130,20 @@
128 130 margin: 0;
129 131 }
130 132 }
131   -.invitation-data{
  133 +
132 134 .invitation-show{
  135 + position: absolute;
  136 + bottom: 60px;
133 137 display: flex;
134 138 align-items: center;
135   - width: 100%;
136   - margin: 20rpx auto;
  139 + width: 95%;
137 140 background-color: #FFFFFF;
138 141 box-shadow: 0 0 10rpx rgba(0,0,0,0.1);
139 142 border-radius: 20rpx;
  143 + left: 50%;
  144 + transform: translateX(-50%);
140 145 padding: 20rpx;
  146 + height: 230rpx;
141 147 .icon{
142 148 display: flex;
143 149 justify-content: center;
... ... @@ -149,7 +155,7 @@
149 155 }
150 156 }
151 157 .item{
152   - width: 60%;
  158 + width: 70%;
153 159 height: 80%;
154 160 padding-left: 20rpx;
155 161 padding-right: 20rpx;
... ... @@ -170,7 +176,8 @@
170 176 .describe{
171 177 display: flex;
172 178 align-items: center;
173   - margin-bottom: 6rpx;
  179 + height: 46rpx;
  180 + line-height: 46rpx;
174 181 text{
175 182 font-size: 24rpx;
176 183 color: #959595;
... ... @@ -183,7 +190,7 @@
183 190 }
184 191 }
185 192 }
186   -}
  193 +
187 194 // .amap-marker{
188 195 // margin-top: -5px !important;
189 196 // }
... ... @@ -197,7 +204,7 @@
197 204 }
198 205 }
199 206 .right {
200   - width: 20%;
  207 + width: 30%;
201 208 text-align: right;
202 209 color: #878787;
203 210 }
... ... @@ -207,10 +214,12 @@
207 214 justify-content: center;
208 215 width: 160rpx;
209 216 height: 50rpx;
210   - background: linear-gradient(to bottom,#E60012,#E60012);
  217 + background: #D32D25 !important;
211 218 border-radius: 60rpx;
212 219 float: right;
213   - margin-top: 90rpx;
  220 + margin-top: 126rpx;
  221 + margin-right: 10rpx;
  222 + z-index: 999;
214 223 image {
215 224 width: 24rpx;
216 225 height: 24rpx;
... ...
pages/map/map.vue
1 1 <template>
2 2 <view class="page">
  3 + <view class="map-content" style="position: relative;z-index: 1000;">
  4 + <!-- 搜索 -->
  5 + <view class="search-head">
  6 + <view class="search">
  7 + <image src="../../static/fdj1.png"></image>
  8 + <text></text>
  9 + <input type="text" v-model="selectName" placeholder="搜索关键词" @input="getCompanyList" />
  10 + </view>
  11 + <!-- 显示公司选项 -->
  12 + <view class="btn" @click="getCompanyDetail">
  13 + <text>搜索</text>
  14 + </view>
  15 + </view>
  16 + <mo-hu-search :show="selectShow" :list="comList" @select="select" label-name="name"
  17 + value-name="id"></mo-hu-search>
  18 + </view>
3 19 <view class="content">
4   - <cover-view></cover-view>
5   - <view class="bg">
  20 + <view class="bg" style="z-index: 9;">
6 21 <!-- <web-view src="../../static/html/map.html" style="width: 100%;height: 100%; position: absolute; z-index: 0;"></web-view> -->
7   - <map style="width: 100%;height: 70%;position: relative;top: 190rpx;" :latitude="latitude"
8   - :longitude="longitude" :markers="covers" :show-location="true"></map>
  22 + <map style="width: 100%;height: 100%" :latitude="latitude" :longitude="longitude" :markers="covers"
  23 + :show-location="true">
  24 +
  25 +
  26 + <cover-view class="invitation-show">
  27 + <cover-view class="icon" v-show="show">
  28 + <cover-image :src=" baseUrl + logo.url"></cover-image>
  29 + </cover-view>
  30 + <cover-view class="item">
  31 + <cover-view class="title-btn">
  32 + <cover-view class="title">
  33 + <cover-view class="bt">{{this.companyName}}</cover-view>
  34 + </cover-view>
  35 + </cover-view>
  36 + <cover-view class="describe">
  37 + {{this.dizhi}}
  38 + </cover-view>
  39 + <cover-view class="describe">
  40 + <cover-view>电话:{{getData.fuzerendianhua}}</cover-view>
  41 + <cover-image style="width: 30rpx;height: 30rpx;;" src="../../static/map1.png"
  42 + @click.stop="callPhone(getData.fuzerendianhua)"></cover-image>
  43 + </cover-view>
  44 + <cover-view class="describe">
  45 + 营业时间:10:00-20:00
  46 + </cover-view>
  47 + </cover-view>
  48 + <cover-view class="right">
  49 + <cover-view class="red-btn" @click.stop="handleNavigation">
  50 + <cover-image style="width: 24rpx;height: 24rpx;" src="../../static/dh.png"
  51 + @click.stop="handleNavigation"></cover-image>
  52 + <cover-view style="color: #fff;" @click.stop="handleNavigation">导航</cover-view>
  53 + </cover-view>
  54 + </cover-view>
  55 + </cover-view>
  56 +
  57 + </map>
9 58 </view>
10 59 <view class="map-content" style="position: relative;z-index: 1000;">
11 60 <!-- 搜索 -->
12   - <view class="search-head">
13   - <view class="search">
14   - <image src="../../static/fdj1.png"></image>
15   - <text></text>
16   - <input type="text" v-model="selectName" placeholder="搜索关键词" @input="getCompanyList" />
17   - </view>
18   - <!-- 显示公司选项 -->
19   - <view class="btn" @click="getCompanyDetail">
20   - <text>搜索</text>
21   - </view>
22   - </view>
23   - <mo-hu-search :show="selectShow" :list="comList" @select="select" label-name="name"
24   - value-name="id"></mo-hu-search>
25   - </view>
26 61  
27   - <view class="bottom">
28   - <view class="invitation-data">
29   - <view class="invitation-show">
30   - <view class="icon" v-show="show">
31   - <image :src=" baseUrl + logo.url"></image>
32   - </view>
33   - <view class="item">
34   - <view class="title-btn">
35   - <view class="title">
36   - <text class="bt">{{this.companyName}}</text>
37   - </view>
38   - </view>
39   - <view class="describe">
40   - <text>{{this.dizhi}}</text>
41   - </view>
42   - <view class="describe">
43   - <text>电话:{{getData.fuzerendianhua}}</text>
44   - <image src="../../static/map1.png"></image>
45   - </view>
46   - <view class="describe">
47   - <text>营业时间:10:00-20:00</text>
48   - </view>
49   - </view>
50   - <view class="right">
51   - <view class="red-btn" @click.stop="handleNavigation">
52   - <image src="../../static/dh.png"></image>
53   - <text>导航</text>
54   - </view>
55   - </view>
56   - </view>
57   - </view>
58 62 </view>
  63 +
59 64 </view>
60 65 </view>
61 66 </template>
... ... @@ -63,7 +68,7 @@
63 68 <script>
64 69 import request from '@/utils/request.js'
65 70 // import moHuSearch from '../../components/qj-fuzzy-search/index.vue'
66   - import moHuSearch from '../../components/qj-fuzzy-search/index.vue'
  71 + import moHuSearch from '../../components/qj-fuzzy-search/index2.vue'
67 72 export default {
68 73 components: {
69 74 moHuSearch
... ... @@ -111,6 +116,11 @@
111 116 // this.getCompanyDetail()
112 117 },
113 118 methods: {
  119 + callPhone(phoneNum) {
  120 + uni.makePhoneCall({
  121 + phoneNumber: phoneNum //仅为示例
  122 + });
  123 + },
114 124 // 获取公司列表
115 125 getCompanyList() {
116 126 this.selectShow = true
... ... @@ -119,7 +129,9 @@
119 129 url: '/api/permission/organize/GetSelectList',
120 130 method: 'get',
121 131 data: {
122   - keyword: this.selectName
  132 + keyword: this.selectName,
  133 + currentPage: 1,
  134 + pageSize: 8
123 135 }
124 136 }).then(res => {
125 137 if (res.code === 200) {
... ...