@cloudbase/weda-ui 0.2.15 → 0.2.16

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.
Files changed (112) hide show
  1. package/package.json +10 -7
  2. package/src/configs/components/calendar.json +75 -0
  3. package/src/configs/components/carousel.json +273 -0
  4. package/src/configs/components/chart/statisticsCard.json +331 -0
  5. package/src/configs/components/dataView.json +139 -0
  6. package/src/configs/components/form/location.json +152 -0
  7. package/src/configs/components/form/uploaderFile.json +2 -1
  8. package/src/configs/components/graphicCard.json +399 -0
  9. package/src/configs/components/link.json +2 -2
  10. package/src/configs/components/listView.json +230 -0
  11. package/src/configs/components/navLayout.json +350 -0
  12. package/src/configs/components/swiper.json +3 -3
  13. package/src/configs/index.js +16 -0
  14. package/src/mp/components/button/index.js +12 -13
  15. package/src/mp/components/button/index.wxml +1 -1
  16. package/src/mp/components/calendar/arrowright--line.svg +11 -0
  17. package/src/mp/components/calendar/index.js +238 -0
  18. package/src/mp/components/calendar/index.json +4 -0
  19. package/src/mp/components/calendar/index.wxml +37 -0
  20. package/src/mp/components/calendar/index.wxss +178 -0
  21. package/src/mp/components/carousel/index.js +88 -0
  22. package/src/mp/components/carousel/index.json +7 -0
  23. package/src/mp/components/carousel/index.wxml +6 -0
  24. package/src/mp/components/chart/statisticsCard/index.js +226 -0
  25. package/src/mp/components/chart/statisticsCard/index.json +4 -0
  26. package/src/mp/components/chart/statisticsCard/index.wxml +9 -0
  27. package/src/mp/components/chart/statisticsCard/index.wxss +45 -0
  28. package/src/mp/components/dataView/index.js +34 -0
  29. package/src/mp/components/dataView/index.json +7 -0
  30. package/src/mp/components/dataView/index.wxml +15 -0
  31. package/src/mp/components/dataView/index.wxss +0 -0
  32. package/src/mp/components/form/location/components/mapChoose/index.js +201 -0
  33. package/src/mp/components/form/location/components/mapChoose/index.json +4 -0
  34. package/src/mp/components/form/location/components/mapChoose/index.wxml +42 -0
  35. package/src/mp/components/form/location/components/mapChoose/index.wxss +188 -0
  36. package/src/mp/components/form/location/index.js +341 -0
  37. package/src/mp/components/form/location/index.json +6 -0
  38. package/src/mp/components/form/location/index.wxml +25 -0
  39. package/src/mp/components/form/location/index.wxss +91 -0
  40. package/src/mp/components/form/uploader/index.js +39 -35
  41. package/src/mp/components/form/uploaderFile/index.js +61 -14
  42. package/src/mp/components/graphicCard/chevron-right.svg +3 -0
  43. package/src/mp/components/graphicCard/index.js +205 -0
  44. package/src/mp/components/graphicCard/index.json +4 -0
  45. package/src/mp/components/graphicCard/index.wxml +29 -0
  46. package/src/mp/components/graphicCard/index.wxss +157 -0
  47. package/src/mp/components/image/index.js +0 -1
  48. package/src/mp/components/listView/arrow-right-line.svg +3 -0
  49. package/src/mp/components/listView/index.js +286 -0
  50. package/src/mp/components/listView/index.json +4 -0
  51. package/src/mp/components/listView/index.wxml +40 -0
  52. package/src/mp/components/listView/index.wxss +150 -0
  53. package/src/mp/components/listView/more-line.svg +3 -0
  54. package/src/mp/components/navLayout/index.js +123 -0
  55. package/src/mp/components/navLayout/index.json +7 -0
  56. package/src/mp/components/navLayout/index.wxml +25 -0
  57. package/src/mp/components/navLayout/index.wxss +1193 -0
  58. package/src/mp/components/swiper/index.wxml +2 -0
  59. package/src/mp/index.json +9 -1
  60. package/src/mp/utils/debounce.js +133 -0
  61. package/src/mp/utils/dr_square_point.js +25 -0
  62. package/src/mp/utils/qqmap-wx-jssdk1.2/qqmap-wx-jssdk.js +1336 -0
  63. package/src/mp/utils/spark-md5.js +776 -0
  64. package/src/mp/utils/tcb.js +18 -0
  65. package/src/web/components/calendar/index.css +382 -0
  66. package/src/web/components/calendar/index.jsx +312 -0
  67. package/src/web/components/calendar/util.js +90 -0
  68. package/src/web/components/carousel/index.css +119 -0
  69. package/src/web/components/carousel/index.tsx +417 -0
  70. package/src/web/components/chart/statisticsCard/index.css +62 -0
  71. package/src/web/components/chart/statisticsCard/index.tsx +286 -0
  72. package/src/web/components/chart/statisticsCard/interface.ts +14 -0
  73. package/src/web/components/dataView/index.tsx +20 -0
  74. package/src/web/components/dataView/interface.ts +6 -0
  75. package/src/web/components/form/location/common/mapChoose.css +178 -0
  76. package/src/web/components/form/location/common/mapChoose.jsx +343 -0
  77. package/src/web/components/form/location/common/mapView.jsx +190 -0
  78. package/src/web/components/form/location/common/propsConfig.js +54 -0
  79. package/src/web/components/form/location/common/selectModal.css +44 -0
  80. package/src/web/components/form/location/common/selectModal.jsx +82 -0
  81. package/src/web/components/form/location/common/useLocationInfo.js +100 -0
  82. package/src/web/components/form/location/components/LocationH5/index.css +243 -0
  83. package/src/web/components/form/location/components/LocationH5/location.h5.jsx +403 -0
  84. package/src/web/components/form/location/components/LocationPC/Header.jsx +109 -0
  85. package/src/web/components/form/location/components/LocationPC/index.css +44 -0
  86. package/src/web/components/form/location/components/LocationPC/location.PC.jsx +323 -0
  87. package/src/web/components/form/location/constants.js +4 -0
  88. package/src/web/components/form/location/index.css +0 -0
  89. package/src/web/components/form/location/index.jsx +25 -0
  90. package/src/web/components/form/uploader/uploader.h5.tsx +16 -10
  91. package/src/web/components/form/uploader/uploader.pc.tsx +15 -11
  92. package/src/web/components/form/uploaderFile/uploadFile.h5.tsx +122 -107
  93. package/src/web/components/form/uploaderFile/uploadFile.pc.tsx +22 -19
  94. package/src/web/components/graphicCard/index.css +163 -0
  95. package/src/web/components/graphicCard/index.tsx +309 -0
  96. package/src/web/components/image/image.tsx +0 -1
  97. package/src/web/components/index.js +12 -0
  98. package/src/web/components/listView/arrow-right-line.svg +3 -0
  99. package/src/web/components/listView/index.css +139 -0
  100. package/src/web/components/listView/index.tsx +354 -0
  101. package/src/web/components/listView/interface.ts +98 -0
  102. package/src/web/components/navLayout/index.css +332 -0
  103. package/src/web/components/navLayout/index.tsx +247 -0
  104. package/src/web/components/tabs/index.tsx +2 -2
  105. package/src/web/components/tabs/tabs.h5.tsx +7 -4
  106. package/src/web/components/uploaderFileView/index.css +9 -9
  107. package/src/web/components/uploaderFileView/index.jsx +32 -23
  108. package/src/web/types.d.ts +15 -14
  109. package/src/web/utils/debounce.js +98 -0
  110. package/src/web/utils/platform.js +31 -0
  111. package/src/web/utils/tcb.js +35 -0
  112. package/src/web/utils/tmap.js +4 -0
@@ -0,0 +1,226 @@
1
+ import { callDataSource, callWedaApi } from '../../../utils/tcb';
2
+
3
+ const DEFAULT_VAL = 1000;
4
+
5
+ Component({
6
+ properties: {
7
+ className: {
8
+ type: String,
9
+ value: '',
10
+ },
11
+ style: {
12
+ type: String,
13
+ value: '',
14
+ },
15
+ dataSource: {
16
+ // 数据源
17
+ type: Object,
18
+ },
19
+ filterData: {
20
+ // 数据筛选
21
+ type: Array,
22
+ value: [],
23
+ },
24
+ field: {
25
+ // 字段选择
26
+ type: Object,
27
+ },
28
+ operationType: {
29
+ // 统计方式
30
+ type: String,
31
+ },
32
+ label: {
33
+ // 字段展示名称
34
+ type: String,
35
+ value: '今日活跃用户数',
36
+ },
37
+ isCountEmpty: {
38
+ // 是否统计空值
39
+ type: Boolean,
40
+ value: false,
41
+ },
42
+ isShowUnit: {
43
+ // 是否显示单位
44
+ type: Boolean,
45
+ value: true,
46
+ },
47
+ unit: {
48
+ // 单位
49
+ type: Number,
50
+ value: 1,
51
+ },
52
+ decimalDigits: {
53
+ // 小数位数
54
+ type: Number,
55
+ value: 0,
56
+ },
57
+ suffix: {
58
+ // 后缀
59
+ type: String,
60
+ value: '个',
61
+ },
62
+ },
63
+ data: {
64
+ count: DEFAULT_VAL,
65
+ },
66
+ methods: {
67
+ scientificToNumber: function (num) {
68
+ const str = num;
69
+ const reg = /^([-]?\d+\.?\d*)(e)([-|+]?\d+)$/;
70
+ let zero = '';
71
+ if (!reg.test(str)) {
72
+ return num;
73
+ }
74
+ const arr = reg.exec(str);
75
+ const len = Math.abs(arr[3]) - 1;
76
+ for (let i = 0; i < len; i += 1) {
77
+ zero += '0';
78
+ }
79
+ if (arr[1].indexOf('-') === 0) {
80
+ return `-0.${zero}${arr[1].replace('-', '').replace('.', '')}`;
81
+ }
82
+ return `0.${zero}${arr[1].replace('.', '')}`;
83
+ },
84
+ padEnd: function (source, targetLength) {
85
+ targetLength = Math.floor(targetLength); //floor if number or convert non-number to 0;
86
+ if (source.length > targetLength) {
87
+ return source;
88
+ } else {
89
+ targetLength = targetLength - source.length;
90
+ return source + '0'.repeat(targetLength);
91
+ }
92
+ },
93
+ customToFixed: function (num, digit = 0) {
94
+ const pow = Math.pow(10, digit);
95
+ let value = `${num}`;
96
+ // 如果是小数,四舍五入进行转化处理确保精度正确
97
+ if (!Number.isInteger(num)) {
98
+ if (num > 0) {
99
+ value = (Math.round((num + Number.EPSILON) * pow) / pow).toString();
100
+ } else if (num < 0) {
101
+ value = (Math.round((num - Number.EPSILON) * pow) / pow).toString();
102
+ }
103
+ }
104
+ value = this.scientificToNumber(value);
105
+ const [integer, decimal = ''] = value.split('.');
106
+ if (digit > 0) {
107
+ return `${integer}.${this.padEnd(decimal, digit)}`;
108
+ }
109
+ return integer;
110
+ },
111
+ formatNumber: function (val, digits = 0) {
112
+ return isNaN(val)
113
+ ? val
114
+ : Intl
115
+ ? Intl.NumberFormat('en-US', {
116
+ maximumFractionDigits: 10,
117
+ minimumFractionDigits: digits,
118
+ }).format(this.customToFixed(val, digits))
119
+ : val;
120
+ },
121
+ getSourceData: async function (
122
+ dataSource,
123
+ filterData,
124
+ field,
125
+ operationType,
126
+ isCountEmpty
127
+ ) {
128
+ const where = filterData?.map
129
+ ? filterData.map((val) => {
130
+ let arrLogicData = val.logicData;
131
+ if (val.logicData && val.logicData.length > 0) {
132
+ arrLogicData = val.logicData.map((mval) => {
133
+ return {
134
+ Key: mval.key,
135
+ Rel: mval.rel,
136
+ Value: mval.value,
137
+ Logic: mval.logic,
138
+ };
139
+ });
140
+ }
141
+ return {
142
+ GroupLogic: val.groupLogic,
143
+ LogicData: arrLogicData,
144
+ };
145
+ })
146
+ : [];
147
+ const params = {
148
+ dataSourceName: dataSource?.name,
149
+ where,
150
+ value: [
151
+ {
152
+ Key: field?.name,
153
+ OperationType: operationType,
154
+ IsCountEmpty: isCountEmpty,
155
+ },
156
+ ],
157
+ };
158
+ try {
159
+ if (dataSource?.type === 'database') {
160
+ return await callWedaApi({
161
+ action: 'DescribeChartCardData',
162
+ data: params,
163
+ });
164
+ }
165
+ return await callDataSource({
166
+ dataSourceName: dataSource?.name,
167
+ methodName: dataSource?.methodName,
168
+ });
169
+ } catch {
170
+ return [];
171
+ }
172
+ },
173
+ _fetchData: async function () {
174
+ if (
175
+ (this.properties.dataSource?.type === 'database' &&
176
+ this.properties.field &&
177
+ this.properties.operationType) ||
178
+ (this.properties.dataSource &&
179
+ this.properties.dataSource?.type !== 'database')
180
+ ) {
181
+ let data = await this.getSourceData(
182
+ this.properties.dataSource,
183
+ this.properties.filterData,
184
+ this.properties.field,
185
+ this.properties.operationType,
186
+ this.properties.isCountEmpty
187
+ );
188
+ // 自定义连接器 返回处理
189
+ if (this.properties.dataSource?.type !== 'database' && data?.result) {
190
+ data = data?.result;
191
+ }
192
+ if (data?.length) {
193
+ const val = isNaN(data[0]?.Value) ? 0 : data[0]?.Value;
194
+ this.setData({
195
+ count: this.properties.isShowUnit
196
+ ? this.formatNumber(
197
+ val / this.properties.unit,
198
+ this.properties.decimalDigits
199
+ )
200
+ : val,
201
+ });
202
+ } else {
203
+ // 返回数据为空 使用 0
204
+ this.setData({
205
+ count: this.formatNumber(0, this.properties.decimalDigits),
206
+ });
207
+ }
208
+ } else {
209
+ // 没有配置数据使用默认数据
210
+ this.setData({
211
+ count: this.setData({
212
+ count: this.formatNumber(
213
+ DEFAULT_VAL,
214
+ this.properties.decimalDigits
215
+ ),
216
+ }),
217
+ });
218
+ }
219
+ },
220
+ },
221
+ lifetimes: {
222
+ attached() {
223
+ this._fetchData();
224
+ },
225
+ },
226
+ });
@@ -0,0 +1,4 @@
1
+ {
2
+ "component": true,
3
+ "styleIsolation": "shared"
4
+ }
@@ -0,0 +1,9 @@
1
+ <view class="weda-statistics-card weda-ui {{className}}" style="{{style}}" bind:tap="tap">
2
+ <view class="weda-statistics-card__wrapper">
3
+ <view class="weda-statistics-card__title">{{label}}</view>
4
+ <view class="weda-statistics-card__detail">
5
+ <text class="weda-statistics-card__count">{{count}}</text>
6
+ <text class="weda-statistics-card__unit">{{suffix}}</text>
7
+ </view>
8
+ </view>
9
+ </view>
@@ -0,0 +1,45 @@
1
+ .weda-statistics-card {
2
+ background: #ffffff;
3
+ border: 1px solid #f1f2f5;
4
+ box-sizing: border-box;
5
+ box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.1);
6
+ border-radius: 6px;
7
+ box-sizing: border-box;
8
+ max-width: 100%;
9
+ min-height: 140px;
10
+ }
11
+
12
+ .weda-statistics-card .weda-statistics-card__wrapper {
13
+ width: 100%;
14
+ padding: 40px 24px;
15
+ box-sizing: border-box;
16
+ }
17
+
18
+ .weda-statistics-card .weda-statistics-card__title {
19
+ font-size: 14px;
20
+ line-height: 22px;
21
+ color: rgba(0, 0, 0, 0.6);
22
+ }
23
+
24
+ .weda-statistics-card .weda-statistics-card__detail {
25
+ margin-top: 4px;
26
+ font-size: 28px;
27
+ line-height: 34px;
28
+ color: rgba(0, 0, 0, 0.9);
29
+ word-break: break-all;
30
+ }
31
+
32
+ .weda-statistics-card .weda-statistics-card__count {
33
+ font-size: 28px;
34
+ line-height: 34px;
35
+ color: rgba(0, 0, 0, 0.9);
36
+ word-break: break-all;
37
+ }
38
+
39
+ .weda-statistics-card .weda-statistics-card__unit {
40
+ font-size: 14px;
41
+ line-height: 22px;
42
+ color: rgba(0, 0, 0, 0.4);
43
+ margin-left: 4px;
44
+ vertical-align: middle;
45
+ }
@@ -0,0 +1,34 @@
1
+ Component({
2
+ options: {
3
+ virtualHost: true,
4
+ },
5
+ properties: {
6
+ className: {
7
+ type: String,
8
+ value: '',
9
+ },
10
+ style: {
11
+ type: String,
12
+ value: '',
13
+ },
14
+ datasource: {
15
+ type: Object,
16
+ value: {},
17
+ },
18
+ where: {
19
+ type: Array,
20
+ value: [],
21
+ },
22
+ },
23
+ data: {
24
+ innerBeforeDataChange: function (values) {
25
+ return values?.[0];
26
+ },
27
+ },
28
+ methods: {
29
+ handleEvent: function (params) {
30
+ const { type, detail } = params || {};
31
+ type && this.triggerEvent(type, detail);
32
+ },
33
+ },
34
+ });
@@ -0,0 +1,7 @@
1
+ {
2
+ "component": true,
3
+ "styleIsolation": "shared",
4
+ "usingComponents": {
5
+ "list-view": "../listView"
6
+ }
7
+ }
@@ -0,0 +1,15 @@
1
+ <list-view
2
+ className="weda-data-view__containor {{className}}"
3
+ style="{{style}}"
4
+ datasource="{{datasource}}"
5
+ where="{{where}}"
6
+ pageSize="{{1}}"
7
+ pagination="none"
8
+ beforeDataChange="{{innerBeforeDataChange}}"
9
+ bindonDataChange="handleEvent"
10
+ bindqueryFail="handleEvent"
11
+ bindqueryEmpty="handleEvent"
12
+ bindquerySuccess="handleEvent"
13
+ >
14
+ <slot></slot>
15
+ </list-view>
File without changes
@@ -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,4 @@
1
+ {
2
+ "component": true,
3
+ "usingComponents": {}
4
+ }
@@ -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>