@cloudbase/weda-ui 0.2.15 → 1.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -169
- package/package.json +28 -15
- package/src/configs/components/calendar.json +78 -0
- package/src/configs/components/carousel.json +273 -0
- package/src/configs/components/chart/bar.json +724 -0
- package/src/configs/components/chart/line.json +679 -0
- package/src/configs/components/chart/pie.json +497 -0
- package/src/configs/components/chart/statisticsCard.json +379 -0
- package/src/configs/components/container.json +7 -2
- package/src/configs/components/dataView.json +154 -0
- package/src/configs/components/form/checkbox.json +97 -5
- package/src/configs/components/form/location.json +152 -0
- package/src/configs/components/form/radio.json +96 -4
- package/src/configs/components/form/select.json +245 -11
- package/src/configs/components/form/uploaderFile.json +2 -1
- package/src/configs/components/graphicCard.json +410 -0
- package/src/configs/components/image.json +7 -2
- package/src/configs/components/link.json +20 -4
- package/src/configs/components/listView.json +277 -0
- package/src/configs/components/modal.json +37 -5
- package/src/configs/components/navLayout.json +362 -0
- package/src/configs/components/navigationBar.json +59 -0
- package/src/configs/components/richtextview.json +4 -1
- package/src/configs/components/scrollVeiw.json +74 -22
- package/src/configs/components/swiper.json +6 -3
- package/src/configs/components/tabs.json +51 -8
- package/src/configs/components/text.json +33 -25
- package/src/configs/components/wxOpenApi/phone.json +141 -0
- package/src/configs/components/wxOpenApi/phoneCode.json +121 -0
- package/src/configs/components/wxOpenApi/share.json +167 -0
- package/src/configs/components/wxOpenApi/userInfo.json +174 -0
- package/src/configs/index.js +34 -0
- package/src/mp/components/button/index.js +12 -13
- package/src/mp/components/button/index.wxml +1 -1
- package/src/mp/components/calendar/arrowright--line.svg +11 -0
- package/src/mp/components/calendar/index.js +238 -0
- package/src/mp/components/calendar/index.json +4 -0
- package/src/mp/components/calendar/index.wxml +37 -0
- package/src/mp/components/calendar/index.wxss +178 -0
- package/src/mp/components/carousel/index.js +88 -0
- package/src/mp/components/carousel/index.json +7 -0
- package/src/mp/components/carousel/index.wxml +6 -0
- package/src/mp/components/chart/bar/index.js +258 -0
- package/src/mp/components/chart/bar/index.json +6 -0
- package/src/mp/components/chart/bar/index.wxml +3 -0
- package/src/mp/components/chart/bar/index.wxss +9 -0
- package/src/mp/components/chart/common/config/bar.js +50 -0
- package/src/mp/components/chart/common/config/global.js +16 -0
- package/src/mp/components/chart/common/config/line.js +48 -0
- package/src/mp/components/chart/common/config/pie.js +36 -0
- package/src/mp/components/chart/common/core/eChartBar.js +263 -0
- package/src/mp/components/chart/common/core/eChartBase.js +375 -0
- package/src/mp/components/chart/common/core/eChartLine.js +229 -0
- package/src/mp/components/chart/common/core/eChartPie.js +166 -0
- package/src/mp/components/chart/common/lib/echarts.min.js +18 -0
- package/src/mp/components/chart/ec-canvas/ec-canvas.js +277 -0
- package/src/mp/components/chart/ec-canvas/ec-canvas.json +4 -0
- package/src/mp/components/chart/ec-canvas/ec-canvas.wxml +4 -0
- package/src/mp/components/chart/ec-canvas/ec-canvas.wxss +4 -0
- package/src/mp/components/chart/ec-canvas/wx-canvas.js +107 -0
- package/src/mp/components/chart/line/index.js +247 -0
- package/src/mp/components/chart/line/index.json +6 -0
- package/src/mp/components/chart/line/index.wxml +3 -0
- package/src/mp/components/chart/line/index.wxss +9 -0
- package/src/mp/components/chart/pie/index.js +182 -0
- package/src/mp/components/chart/pie/index.json +6 -0
- package/src/mp/components/chart/pie/index.wxml +4 -0
- package/src/mp/components/chart/pie/index.wxss +9 -0
- package/src/mp/components/chart/statisticsCard/index.js +253 -0
- package/src/mp/components/chart/statisticsCard/index.json +4 -0
- package/src/mp/components/chart/statisticsCard/index.wxml +9 -0
- package/src/mp/components/chart/statisticsCard/index.wxss +45 -0
- package/src/mp/components/dataView/index.js +34 -0
- package/src/mp/components/dataView/index.json +7 -0
- package/src/mp/components/dataView/index.wxml +15 -0
- package/src/mp/components/dataView/index.wxss +0 -0
- package/src/mp/components/form/checkbox/index.js +41 -2
- package/src/mp/components/form/checkbox/index.wxml +1 -1
- package/src/mp/components/form/input/index.js +1 -1
- package/src/mp/components/form/location/components/mapChoose/index.js +201 -0
- package/src/mp/components/form/location/components/mapChoose/index.json +4 -0
- package/src/mp/components/form/location/components/mapChoose/index.wxml +42 -0
- package/src/mp/components/form/location/components/mapChoose/index.wxss +188 -0
- package/src/mp/components/form/location/index.js +382 -0
- package/src/mp/components/form/location/index.json +6 -0
- package/src/mp/components/form/location/index.wxml +25 -0
- package/src/mp/components/form/location/index.wxss +91 -0
- package/src/mp/components/form/radio/index.js +38 -0
- package/src/mp/components/form/select/index.js +360 -40
- package/src/mp/components/form/select/index.wxml +21 -6
- package/src/mp/components/form/select/region/index.js +98 -0
- package/src/mp/components/form/textarea/index.wxml +6 -5
- package/src/mp/components/form/uploader/index.js +84 -48
- package/src/mp/components/form/uploader/index.wxml +15 -3
- package/src/mp/components/form/uploaderFile/index.js +106 -27
- package/src/mp/components/graphicCard/chevron-right.svg +3 -0
- package/src/mp/components/graphicCard/index.js +203 -0
- package/src/mp/components/graphicCard/index.json +4 -0
- package/src/mp/components/graphicCard/index.wxml +29 -0
- package/src/mp/components/graphicCard/index.wxss +157 -0
- package/src/mp/components/image/index.js +0 -1
- package/src/mp/components/listView/arrow-right-line.svg +3 -0
- package/src/mp/components/listView/index.js +285 -0
- package/src/mp/components/listView/index.json +4 -0
- package/src/mp/components/listView/index.wxml +40 -0
- package/src/mp/components/listView/index.wxss +155 -0
- package/src/mp/components/listView/more-line.svg +3 -0
- package/src/mp/components/navLayout/index.js +123 -0
- package/src/mp/components/navLayout/index.json +7 -0
- package/src/mp/components/navLayout/index.wxml +25 -0
- package/src/mp/components/navLayout/index.wxss +1193 -0
- package/src/mp/components/navigationBar/index.js +193 -0
- package/src/mp/components/navigationBar/index.json +6 -0
- package/src/mp/components/navigationBar/index.wxml +88 -0
- package/src/mp/components/navigationBar/index.wxss +1257 -0
- package/src/mp/components/swiper/index.wxml +2 -0
- package/src/mp/components/tabs/index.js +7 -2
- package/src/mp/components/tabs/index.wxml +2 -1
- package/src/mp/components/text/index.js +0 -25
- package/src/mp/components/text/index.wxml +3 -3
- package/src/mp/components/wxOpenApi/phone/index.js +117 -0
- package/src/mp/components/wxOpenApi/phone/index.json +4 -0
- package/src/mp/components/wxOpenApi/phone/index.wxml +15 -0
- package/src/mp/components/wxOpenApi/phone/index.wxss +22 -0
- package/src/mp/components/wxOpenApi/phoneCode/index.js +89 -0
- package/src/mp/components/wxOpenApi/phoneCode/index.json +4 -0
- package/src/mp/components/wxOpenApi/phoneCode/index.wxml +15 -0
- package/src/mp/components/wxOpenApi/phoneCode/index.wxss +22 -0
- package/src/mp/components/wxOpenApi/share/index.js +117 -0
- package/src/mp/components/wxOpenApi/share/index.json +4 -0
- package/src/mp/components/wxOpenApi/share/index.wxml +15 -0
- package/src/mp/components/wxOpenApi/share/index.wxss +22 -0
- package/src/mp/components/wxOpenApi/userInfo/index.js +88 -0
- package/src/mp/components/wxOpenApi/userInfo/index.json +4 -0
- package/src/mp/components/wxOpenApi/userInfo/index.wxml +14 -0
- package/src/mp/components/wxOpenApi/userInfo/index.wxss +22 -0
- package/src/mp/index.json +18 -2
- package/src/mp/style/weda-ui.wxss +2 -0
- package/src/mp/utils/debounce.js +133 -0
- package/src/mp/utils/destr.js +48 -0
- package/src/mp/utils/dr_square_point.js +25 -0
- package/src/mp/utils/platform.js +25 -0
- package/src/mp/utils/qqmap-wx-jssdk1.2/qqmap-wx-jssdk.js +1336 -0
- package/src/mp/utils/spark-md5.js +776 -0
- package/src/mp/utils/tcb.js +62 -0
- package/src/setupTests.js +2 -1
- package/src/web/components/button/index.css +8 -1
- package/src/web/components/button/index.tsx +3 -2
- package/src/web/components/calendar/index.css +382 -0
- package/src/web/components/calendar/index.jsx +312 -0
- package/src/web/components/calendar/util.js +90 -0
- package/src/web/components/carousel/index.css +119 -0
- package/src/web/components/carousel/index.tsx +417 -0
- package/src/web/components/chart/bar/index.tsx +140 -0
- package/src/web/components/chart/common/config/bar.js +49 -0
- package/src/web/components/chart/common/config/global.js +16 -0
- package/src/web/components/chart/common/config/line.js +50 -0
- package/src/web/components/chart/common/config/pie.js +37 -0
- package/src/web/components/chart/common/core/eChartBar.js +265 -0
- package/src/web/components/chart/common/core/eChartBase.ts +383 -0
- package/src/web/components/chart/common/core/eChartLine.js +231 -0
- package/src/web/components/chart/common/core/eChartPie.js +170 -0
- package/src/web/components/chart/common/core/type.ts +34 -0
- package/src/web/components/chart/common/echart.css +106 -0
- package/src/web/components/chart/common/echarts.ts +33 -0
- package/src/web/components/chart/common/useChart.tsx +69 -0
- package/src/web/components/chart/line/index.tsx +136 -0
- package/src/web/components/chart/pie/index.tsx +99 -0
- package/src/web/components/chart/statisticsCard/index.css +62 -0
- package/src/web/components/chart/statisticsCard/index.tsx +307 -0
- package/src/web/components/chart/statisticsCard/interface.ts +14 -0
- package/src/web/components/dataView/index.tsx +20 -0
- package/src/web/components/dataView/interface.ts +6 -0
- package/src/web/components/form/checkbox/index.tsx +55 -23
- package/src/web/components/form/location/common/mapChoose.css +178 -0
- package/src/web/components/form/location/common/mapChoose.jsx +343 -0
- package/src/web/components/form/location/common/mapView.jsx +190 -0
- package/src/web/components/form/location/common/propsConfig.js +54 -0
- package/src/web/components/form/location/common/selectModal.css +44 -0
- package/src/web/components/form/location/common/selectModal.jsx +82 -0
- package/src/web/components/form/location/common/useLocationInfo.js +100 -0
- package/src/web/components/form/location/components/LocationH5/index.css +243 -0
- package/src/web/components/form/location/components/LocationH5/location.h5.jsx +403 -0
- package/src/web/components/form/location/components/LocationPC/Header.jsx +109 -0
- package/src/web/components/form/location/components/LocationPC/index.css +44 -0
- package/src/web/components/form/location/components/LocationPC/location.PC.jsx +323 -0
- package/src/web/components/form/location/constants.js +4 -0
- package/src/web/components/form/location/index.css +0 -0
- package/src/web/components/form/location/index.jsx +25 -0
- package/src/web/components/form/radio/index.tsx +84 -53
- package/src/web/components/form/select/h5.tsx +389 -71
- package/src/web/components/form/select/index.css +10 -0
- package/src/web/components/form/select/index.tsx +404 -144
- package/src/web/components/form/select/region/index.ts +122 -31
- package/src/web/components/form/select/time.jsx +90 -0
- package/src/web/components/form/select/year.tsx +170 -0
- package/src/web/components/form/uploader/uploader.h5.tsx +19 -4
- package/src/web/components/form/uploader/uploader.pc.tsx +8 -7
- package/src/web/components/form/uploaderFile/uploadFile.h5.tsx +132 -113
- package/src/web/components/form/uploaderFile/uploadFile.pc.tsx +16 -11
- package/src/web/components/graphicCard/index.css +159 -0
- package/src/web/components/graphicCard/index.tsx +310 -0
- package/src/web/components/image/image.tsx +1 -2
- package/src/web/components/image/index.tsx +1 -1
- package/src/web/components/index.js +24 -2
- package/src/web/components/link/index.tsx +6 -3
- package/src/web/components/listView/arrow-right-line.svg +3 -0
- package/src/web/components/listView/index.css +143 -0
- package/src/web/components/listView/index.tsx +359 -0
- package/src/web/components/listView/interface.ts +98 -0
- package/src/web/components/modal/index.tsx +3 -1
- package/src/web/components/navLayout/index.css +332 -0
- package/src/web/components/navLayout/index.tsx +247 -0
- package/src/web/components/navigationBar/chevron-right--double.svg +3 -0
- package/src/web/components/navigationBar/common.tsx +198 -0
- package/src/web/components/navigationBar/h5Menu.tsx +179 -0
- package/src/web/components/navigationBar/horizontalMenu.tsx +200 -0
- package/src/web/components/navigationBar/index.css +762 -0
- package/src/web/components/navigationBar/index.tsx +231 -0
- package/src/web/components/navigationBar/type.d.ts +111 -0
- package/src/web/components/navigationBar/verticalMenu.tsx +81 -0
- package/src/web/components/phone/index.css +0 -0
- package/src/web/components/phone/index.tsx +22 -0
- package/src/web/components/phoneCode/index.css +0 -0
- package/src/web/components/phoneCode/index.tsx +22 -0
- package/src/web/components/richTextView/index.tsx +3 -5
- package/src/web/components/share/index.css +0 -0
- package/src/web/components/share/index.tsx +38 -0
- package/src/web/components/tabs/index.tsx +4 -2
- package/src/web/components/tabs/tabs.h5.tsx +50 -37
- package/src/web/components/tabs/tabs.pc.tsx +23 -10
- package/src/web/components/text/index.tsx +6 -14
- package/src/web/components/uploaderFileView/index.css +9 -9
- package/src/web/components/uploaderFileView/index.jsx +32 -23
- package/src/web/components/userInfo/index.css +0 -0
- package/src/web/components/userInfo/index.tsx +30 -0
- package/src/web/types.d.ts +15 -14
- package/src/web/utils/debounce.js +98 -0
- package/src/web/utils/platform.js +40 -0
- package/src/web/utils/tcb.js +49 -0
- package/src/web/utils/tmap.js +4 -0
- package/src/web/weda-ui.css +2 -0
- package/CHANGELOG.md +0 -240
- package/src/.DS_Store +0 -0
- package/src/configs/.DS_Store +0 -0
- package/src/mp/.gitignore +0 -10
- package/src/web/.DS_Store +0 -0
- package/src/web/components/form/select/region/cities.ts +0 -2410
- package/src/web/components/form/select/region/provinces.ts +0 -240
- package/src/web/components/form/select/region/regions.ts +0 -20645
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import debounce from '../../../../../utils/debounce';
|
|
2
|
+
import dr_square_point from '../../../../../utils/dr_square_point';
|
|
3
|
+
let QQMapWX = require('../../../../../utils/qqmap-wx-jssdk1.2/qqmap-wx-jssdk');
|
|
4
|
+
let qqmapsdk;
|
|
5
|
+
|
|
6
|
+
// components/mapChoose/index.js
|
|
7
|
+
Component({
|
|
8
|
+
/**
|
|
9
|
+
* 组件的属性列表
|
|
10
|
+
*/
|
|
11
|
+
properties: {
|
|
12
|
+
location: {
|
|
13
|
+
type: Object,
|
|
14
|
+
value: {
|
|
15
|
+
latitude: 39.984104,
|
|
16
|
+
longitude: 116.307503,
|
|
17
|
+
poiname: '',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
APIKEY: {
|
|
21
|
+
type: String,
|
|
22
|
+
value: '',
|
|
23
|
+
},
|
|
24
|
+
range: {
|
|
25
|
+
type: Number,
|
|
26
|
+
value: 1000,
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
lifetimes: {
|
|
31
|
+
attached: function () {
|
|
32
|
+
let location = this.properties.location;
|
|
33
|
+
let marker = {
|
|
34
|
+
id: 'id-marker',
|
|
35
|
+
latitude: location.latitude,
|
|
36
|
+
longitude: location.longitude,
|
|
37
|
+
width: 25,
|
|
38
|
+
height: 35,
|
|
39
|
+
};
|
|
40
|
+
this.setData({
|
|
41
|
+
markers: [marker],
|
|
42
|
+
originMarker: {
|
|
43
|
+
...marker,
|
|
44
|
+
id: 'origin',
|
|
45
|
+
},
|
|
46
|
+
choosedLocation: location,
|
|
47
|
+
});
|
|
48
|
+
// 实例化API核心类
|
|
49
|
+
qqmapsdk = new QQMapWX({
|
|
50
|
+
key: this.properties.APIKEY,
|
|
51
|
+
});
|
|
52
|
+
},
|
|
53
|
+
detached: function () {
|
|
54
|
+
// 在组件实例被从页面节点树移除时执行
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* 组件的初始数据
|
|
60
|
+
*/
|
|
61
|
+
data: {
|
|
62
|
+
searchValue: '',
|
|
63
|
+
isSearch: false,
|
|
64
|
+
exploreList: [],
|
|
65
|
+
searchList: [],
|
|
66
|
+
choosedLocation: {
|
|
67
|
+
latitude: null,
|
|
68
|
+
longitude: null,
|
|
69
|
+
},
|
|
70
|
+
originMarker: {},
|
|
71
|
+
markers: [],
|
|
72
|
+
},
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* 组件的方法列表
|
|
76
|
+
*/
|
|
77
|
+
methods: {
|
|
78
|
+
regionchange(event) {
|
|
79
|
+
let {
|
|
80
|
+
type,
|
|
81
|
+
detail: { centerLocation },
|
|
82
|
+
} = event;
|
|
83
|
+
if (type === 'begin') return;
|
|
84
|
+
let marker = {
|
|
85
|
+
id: 'id-marker',
|
|
86
|
+
latitude: centerLocation.latitude,
|
|
87
|
+
longitude: centerLocation.longitude,
|
|
88
|
+
width: 25,
|
|
89
|
+
height: 35,
|
|
90
|
+
};
|
|
91
|
+
this.setData({
|
|
92
|
+
markers: [marker, this.data.originMarker],
|
|
93
|
+
});
|
|
94
|
+
this.searchLocation('路', 20, centerLocation, this, 'exploreList');
|
|
95
|
+
},
|
|
96
|
+
comfirm(event) {
|
|
97
|
+
this.triggerEvent('setIsSelectMapVisible');
|
|
98
|
+
if (
|
|
99
|
+
this.data.choosedLocation.latitude &&
|
|
100
|
+
event.currentTarget.dataset.value
|
|
101
|
+
) {
|
|
102
|
+
this.triggerEvent('changeLocation', this.data.choosedLocation);
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
changeInput(e) {
|
|
106
|
+
this.setData({
|
|
107
|
+
searchValue: e.detail.value,
|
|
108
|
+
});
|
|
109
|
+
if (!e.detail.value) {
|
|
110
|
+
setTimeout(() => {
|
|
111
|
+
this.setData({
|
|
112
|
+
searchList: [],
|
|
113
|
+
});
|
|
114
|
+
}, 1000);
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
this.searchLocation(
|
|
118
|
+
e.detail.value,
|
|
119
|
+
10,
|
|
120
|
+
this.data.markers[0],
|
|
121
|
+
this,
|
|
122
|
+
'searchList'
|
|
123
|
+
);
|
|
124
|
+
},
|
|
125
|
+
focusInput() {
|
|
126
|
+
this.setData({
|
|
127
|
+
isSearch: true,
|
|
128
|
+
});
|
|
129
|
+
},
|
|
130
|
+
cancleSearch() {
|
|
131
|
+
this.setData({
|
|
132
|
+
isSearch: false,
|
|
133
|
+
searchValue: '',
|
|
134
|
+
});
|
|
135
|
+
},
|
|
136
|
+
searchLocation: debounce((value, page_size, location, _this, type) => {
|
|
137
|
+
let range = _this.properties.range / 1000;
|
|
138
|
+
let { leftBottom, rightTop } = dr_square_point(
|
|
139
|
+
location.longitude,
|
|
140
|
+
location.latitude,
|
|
141
|
+
range
|
|
142
|
+
);
|
|
143
|
+
qqmapsdk.search({
|
|
144
|
+
keyword: value,
|
|
145
|
+
page_size,
|
|
146
|
+
rectangle: `${leftBottom[0]},${leftBottom[1]},${rightTop[0]},${rightTop[1]}`,
|
|
147
|
+
success: (res) => {
|
|
148
|
+
_this.setData({
|
|
149
|
+
[type]: res.data,
|
|
150
|
+
});
|
|
151
|
+
},
|
|
152
|
+
fail: function (err) {
|
|
153
|
+
console.log('err search', err);
|
|
154
|
+
if (
|
|
155
|
+
err.message ===
|
|
156
|
+
'getLocation:fail 频繁调用会增加电量损耗,可考虑使用 wx.onLocationChange 监听地理位置变化'
|
|
157
|
+
) {
|
|
158
|
+
wx.showToast({
|
|
159
|
+
title:
|
|
160
|
+
'获取周边信息接口并发限制 高频调用请前往腾讯地图后台申请配额',
|
|
161
|
+
icon: 'none',
|
|
162
|
+
duration: 2000,
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
});
|
|
167
|
+
}, 500),
|
|
168
|
+
chooseSite(event) {
|
|
169
|
+
let { title, location, id } = event.currentTarget.dataset.location;
|
|
170
|
+
let type = event.currentTarget.dataset.type;
|
|
171
|
+
location = {
|
|
172
|
+
latitude: location.lat,
|
|
173
|
+
longitude: location.lng,
|
|
174
|
+
poiname: title,
|
|
175
|
+
id,
|
|
176
|
+
};
|
|
177
|
+
if (type === 'search') {
|
|
178
|
+
let marker = {
|
|
179
|
+
id: 'id-marker',
|
|
180
|
+
latitude: location.latitude,
|
|
181
|
+
longitude: location.longitude,
|
|
182
|
+
width: 25,
|
|
183
|
+
height: 35,
|
|
184
|
+
};
|
|
185
|
+
let originMarker = this.data.originMarker;
|
|
186
|
+
this.setData({
|
|
187
|
+
isSearch: false,
|
|
188
|
+
searchList: [],
|
|
189
|
+
searchValue: '',
|
|
190
|
+
choosedLocation: location,
|
|
191
|
+
markers: [marker, originMarker],
|
|
192
|
+
});
|
|
193
|
+
this.searchLocation('路', 20, location, this, 'exploreList');
|
|
194
|
+
} else {
|
|
195
|
+
this.setData({
|
|
196
|
+
choosedLocation: location,
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
},
|
|
201
|
+
});
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<!--components/mapChoose/index.wxml-->
|
|
2
|
+
<view class="map-choose">
|
|
3
|
+
<view class="map-choose-header">
|
|
4
|
+
<view class="map-choose-header_title">选择地理位置</view>
|
|
5
|
+
<view class="cross" bindtap="comfirm" ></view>
|
|
6
|
+
</view>
|
|
7
|
+
<view class="map-choose-body">
|
|
8
|
+
<view class="map-choose-body-saerch {{isSearch?'map-choose-header_search_input_value':''}}">
|
|
9
|
+
<view class="map-choose-header_search_input">
|
|
10
|
+
<input type="text" value="{{searchValue}}" bindinput="changeInput" bindfocus="focusInput" />
|
|
11
|
+
<view class="map-choose-header_search_place" wx:if="{{!isSearch}}">
|
|
12
|
+
<image src="https://qcloudimg.tencent-cloud.cn/raw/388c48cdcbe9ca07f5682fb10d05ebdd.png"></image>
|
|
13
|
+
<text>搜索地点</text>
|
|
14
|
+
</view>
|
|
15
|
+
</view>
|
|
16
|
+
<view class="map-choose-header_search_input_cancle" wx:if="{{isSearch}}" bindtap="cancleSearch">取消</view>
|
|
17
|
+
</view>
|
|
18
|
+
<view class="map-choose-search" wx:if="{{isSearch}}">
|
|
19
|
+
<view class="map-choose-explore_ul map-choose-search_ul">
|
|
20
|
+
<view class="map-choose-explore_li" wx:for="{{searchList}}" wx:key="index" data-location="{{item}}" bindtap="chooseSite" data-type="search">
|
|
21
|
+
<view class="map-choose-explore_li_con" style="font-size: 14px;">{{item.title}} </view>
|
|
22
|
+
<view class="map-choose-explore_li_con" style="color: rgb(146, 148, 150);">{{item.address}}</view>
|
|
23
|
+
<view class="map-choose-explore_li_arow" />
|
|
24
|
+
</view>
|
|
25
|
+
</view>
|
|
26
|
+
</view>
|
|
27
|
+
<view class="map-choose-explore" wx:if="{{!isSearch}}">
|
|
28
|
+
<map id="choose-map" longitude="{{choosedLocation.longitude}}" latitude="{{choosedLocation.latitude}}" scale="14" style="width: 100%; height: 200px;" bindregionchange="regionchange" markers="{{markers}}" ></map>
|
|
29
|
+
<view class="map-choose-explore_ul">
|
|
30
|
+
<view class="map-choose-explore_li {{choosedLocation.id==item.id?'map-choose-explore_li_choosed':''}} " wx:for="{{exploreList}}" wx:key="index" data-location="{{item}}" bindtap="chooseSite">
|
|
31
|
+
<view class="map-choose-explore_li_con" style="font-size: 14px;">{{item.title}} </view>
|
|
32
|
+
<view class="map-choose-explore_li_con" style="color: rgb(146, 148, 150);">{{item.address}}</view>
|
|
33
|
+
<view class="map-choose-explore_li_arow" />
|
|
34
|
+
</view>
|
|
35
|
+
</view>
|
|
36
|
+
</view>
|
|
37
|
+
</view>
|
|
38
|
+
<view class="map-choose-footer">
|
|
39
|
+
<button data-value="true" bindtap="comfirm">确认</button>
|
|
40
|
+
<button bindtap="comfirm">取消</button>
|
|
41
|
+
</view>
|
|
42
|
+
</view>
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
/* components/mapChoose/index.wxss */
|
|
2
|
+
.map-choose {
|
|
3
|
+
position: fixed;
|
|
4
|
+
z-index: 100;
|
|
5
|
+
width: 100vw;
|
|
6
|
+
height: 100vh;
|
|
7
|
+
background-color: #fff;
|
|
8
|
+
left: 0;
|
|
9
|
+
top: 0;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.map-choose-footer {
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: self-start;
|
|
15
|
+
justify-content: center;
|
|
16
|
+
height: 60px;
|
|
17
|
+
padding-top: 8px;
|
|
18
|
+
left: 0;
|
|
19
|
+
bottom: 0;
|
|
20
|
+
position: absolute;
|
|
21
|
+
width: 100%;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.map-choose-footer button {
|
|
25
|
+
width: 90px;
|
|
26
|
+
margin: 0 10px;
|
|
27
|
+
font-weight: normal;
|
|
28
|
+
color: #006eff;
|
|
29
|
+
font-size: 14px;
|
|
30
|
+
border-radius: 0;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.map-choose-footer button:nth-child(1) {
|
|
34
|
+
background-color: #006eff;
|
|
35
|
+
color: #fff;
|
|
36
|
+
}
|
|
37
|
+
.map-choose-footer button:nth-child(2) {
|
|
38
|
+
border: 1px solid #cfd5de;
|
|
39
|
+
background-color: #fff;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.map-choose-header {
|
|
43
|
+
height: 30px;
|
|
44
|
+
margin: 0 20px;
|
|
45
|
+
line-height: 30px;
|
|
46
|
+
font-weight: 700;
|
|
47
|
+
position: relative;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.cross {
|
|
51
|
+
width: 20px;
|
|
52
|
+
height: 20px;
|
|
53
|
+
position: absolute;
|
|
54
|
+
top: 51%;
|
|
55
|
+
right: 0;
|
|
56
|
+
transform: translate(0, -48%);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.cross::before,
|
|
60
|
+
.cross::after {
|
|
61
|
+
content: '';
|
|
62
|
+
width: 2px;
|
|
63
|
+
height: 18px;
|
|
64
|
+
background: #93979b;
|
|
65
|
+
position: absolute;
|
|
66
|
+
right: 10px;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.cross::before {
|
|
70
|
+
transform: rotate(45deg);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.cross::after {
|
|
74
|
+
transform: rotate(-45deg);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.map-choose-body {
|
|
78
|
+
height: calc(100% - 98px);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.map-choose-body-saerch {
|
|
82
|
+
padding: 8px 20px;
|
|
83
|
+
position: relative;
|
|
84
|
+
border-bottom: 1px solid #d3d3d3;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.map-choose-header_search_input {
|
|
88
|
+
height: 30px;
|
|
89
|
+
background-color: #ebebeb;
|
|
90
|
+
padding-left: 10px;
|
|
91
|
+
padding-right: 10px;
|
|
92
|
+
color: #b4b4b4;
|
|
93
|
+
font-size: 15px;
|
|
94
|
+
line-height: 31px;
|
|
95
|
+
border-radius: 5px;
|
|
96
|
+
overflow: hidden;
|
|
97
|
+
white-space: nowrap;
|
|
98
|
+
text-overflow: ellipsis;
|
|
99
|
+
position: relative;
|
|
100
|
+
display: flex;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.map-choose-header_search_input_value {
|
|
104
|
+
padding-right: 60px;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.map-choose-header_search_input input {
|
|
108
|
+
height: 30px;
|
|
109
|
+
line-height: 30px;
|
|
110
|
+
width: 100%;
|
|
111
|
+
position: relative;
|
|
112
|
+
z-index: 1;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.map-choose-header_search_input_cancle {
|
|
116
|
+
color: #006eff;
|
|
117
|
+
position: absolute;
|
|
118
|
+
height: 30px;
|
|
119
|
+
line-height: 30px;
|
|
120
|
+
top: 8px;
|
|
121
|
+
right: 20px;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.map-choose-header_search_place {
|
|
125
|
+
position: absolute;
|
|
126
|
+
top: 0;
|
|
127
|
+
left: 50%;
|
|
128
|
+
display: flex;
|
|
129
|
+
align-items: center;
|
|
130
|
+
transform: translate(-50%, 0);
|
|
131
|
+
}
|
|
132
|
+
.map-choose-header_search_place image {
|
|
133
|
+
width: 14px;
|
|
134
|
+
height: 14px;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.map-choose-search,
|
|
138
|
+
.map-choose-explore {
|
|
139
|
+
width: 100%;
|
|
140
|
+
height: calc(100% - 47px);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.map-choose-explore_ul {
|
|
144
|
+
height: calc(100% - 200px);
|
|
145
|
+
overflow-y: scroll;
|
|
146
|
+
padding: 0 20px;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.map-choose-search_ul {
|
|
150
|
+
height: 100%;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.map-choose-explore_li {
|
|
154
|
+
width: 100%;
|
|
155
|
+
height: 46px;
|
|
156
|
+
padding-top: 6px;
|
|
157
|
+
position: relative;
|
|
158
|
+
border-bottom: 1px solid #d3d3d3;
|
|
159
|
+
cursor: pointer;
|
|
160
|
+
position: relative;
|
|
161
|
+
font-size: 12px;
|
|
162
|
+
padding-bottom: 3px;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.map-choose-explore_li_arow {
|
|
166
|
+
display: none;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.map-choose-explore_li_choosed .map-choose-explore_li_arow {
|
|
170
|
+
display: block;
|
|
171
|
+
position: absolute;
|
|
172
|
+
right: 20px;
|
|
173
|
+
top: 50%;
|
|
174
|
+
transform: translate(0, -50%);
|
|
175
|
+
width: 16px;
|
|
176
|
+
height: 16px;
|
|
177
|
+
display: block !important;
|
|
178
|
+
background-image: url('https://qcloudimg.tencent-cloud.cn/raw/354c15c0cb845120ac3e9c474e6737b3.png');
|
|
179
|
+
background-size: 100% 100%;
|
|
180
|
+
background-repeat: no-repeat;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.map-choose-explore_li_con {
|
|
184
|
+
width: 98%;
|
|
185
|
+
text-overflow: ellipsis;
|
|
186
|
+
white-space: nowrap;
|
|
187
|
+
overflow: hidden;
|
|
188
|
+
}
|