jufubao-base 1.0.28-beta99 → 1.0.28
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/package.json +2 -2
- package/src/common/getBusinessImageUrl.js +1 -1
- package/src/components/JfbBaseAddress/Attr.js +17 -13
- package/src/components/JfbBaseAddress/JfbBaseAddress.vue +92 -26
- package/src/components/JfbBaseAddress/XdAddress.vue +61 -9
- package/src/components/JfbBaseAfterOrderDetail/Attr.js +113 -84
- package/src/components/JfbBaseAfterOrderDetail/JfbBaseAfterOrderDetail.vue +223 -122
- package/src/components/JfbBaseAfterOrderDetail/Mock.js +46 -1
- package/src/components/JfbBaseAfterOrderList/Attr.js +150 -13
- package/src/components/JfbBaseAfterOrderList/JfbBaseAfterOrderList.vue +183 -41
- package/src/components/JfbBaseAfterOrderList/Mock.js +437 -1
- package/src/components/JfbBaseBlock/Attr.js +16 -135
- package/src/components/JfbBaseBlock/JfbBaseBlock.vue +4 -4
- package/src/components/JfbBaseCard/Api.js +15 -1
- package/src/components/JfbBaseCard/Attr.js +238 -10
- package/src/components/JfbBaseCard/JfbBaseCard.vue +222 -134
- package/src/components/JfbBaseCard/Mock.js +1 -0
- package/src/components/JfbBaseCardBind/JfbBaseCardBind.vue +5 -16
- package/src/components/JfbBaseCardDetail/Api.js +1 -1
- package/src/components/JfbBaseCardDetail/JfbBaseCardDetail.vue +121 -101
- package/src/components/JfbBaseCardDetail/Mock.js +1 -17
- package/src/components/JfbBaseCardDisabled/Api.js +34 -0
- package/src/components/JfbBaseCardDisabled/Attr.js +14 -0
- package/src/components/JfbBaseCardDisabled/JfbBaseCardDisabled.vue +277 -0
- package/src/components/JfbBaseCardDisabled/JfbBaseCardDisabledLess.less +80 -0
- package/src/components/JfbBaseCardDisabled/JfbBaseCardDisabledMixin.js +30 -0
- package/src/components/JfbBaseCardDisabled/Mock.js +5 -0
- package/src/components/JfbBaseCardInfo/JfbBaseCardInfo.vue +99 -61
- package/src/components/JfbBaseCardInfo/Mock.js +7 -5
- package/src/components/JfbBaseCardMerge/Api.js +61 -0
- package/src/components/JfbBaseCardMerge/Attr.js +237 -0
- package/src/components/JfbBaseCardMerge/JfbBaseCardMerge.vue +325 -0
- package/src/components/JfbBaseCardMerge/JfbBaseCardMergeLess.less +80 -0
- package/src/components/JfbBaseCardMerge/JfbBaseCardMergeMixin.js +30 -0
- package/src/components/JfbBaseCardMerge/Mock.js +5 -0
- package/src/components/JfbBaseCardShift/Api.js +15 -0
- package/src/components/JfbBaseCardShift/Attr.js +216 -0
- package/src/components/JfbBaseCardShift/JfbBaseCardShift.vue +35 -7
- package/src/components/JfbBaseCardSweepInfo/Api.js +47 -0
- package/src/components/JfbBaseCardSweepInfo/Attr.js +19 -0
- package/src/components/JfbBaseCardSweepInfo/JfbBaseCardSweepInfo.vue +325 -0
- package/src/components/JfbBaseCardSweepInfo/JfbBaseCardSweepInfoLess.less +80 -0
- package/src/components/JfbBaseCardSweepInfo/JfbBaseCardSweepInfoMixin.js +30 -0
- package/src/components/JfbBaseCardSweepInfo/Mock.js +18 -0
- package/src/components/JfbBaseCardV2/Api.js +35 -0
- package/src/components/JfbBaseCardV2/Attr.js +47 -0
- package/src/components/JfbBaseCardV2/JfbBaseCardV2.vue +317 -0
- package/src/components/JfbBaseCardV2/JfbBaseCardV2Less.less +80 -0
- package/src/components/JfbBaseCardV2/JfbBaseCardV2Mixin.js +30 -0
- package/src/components/JfbBaseCardV2/Mock.js +112 -0
- package/src/components/JfbBaseEntry/Api.js +14 -0
- package/src/components/JfbBaseEntry/Attr.js +51 -0
- package/src/components/JfbBaseEntry/JfbBaseEntry.vue +184 -0
- package/src/components/JfbBaseEntry/JfbBaseEntryLess.less +80 -0
- package/src/components/JfbBaseEntry/JfbBaseEntryMixin.js +30 -0
- package/src/components/JfbBaseEntry/Mock.js +139 -0
- package/src/components/JfbBaseExpressDetail/Attr.js +2 -96
- package/src/components/JfbBaseExpressDetail/JfbBaseExpressDetail.vue +16 -23
- package/src/components/JfbBaseExpressDetail/Mock.js +1 -1
- package/src/components/JfbBaseExpressDetail/XdExpressTimeLine/XdExpressTimeLine.vue +9 -9
- package/src/components/JfbBaseFastLink/Attr.js +183 -108
- package/src/components/JfbBaseFastLink/JfbBaseFastLink.vue +73 -25
- package/src/components/JfbBaseFooter/Attr.js +4 -11
- package/src/components/JfbBaseFooter/JfbBaseFooter.vue +14 -4
- package/src/components/JfbBaseHeader/Attr.js +187 -24
- package/src/components/JfbBaseHeader/JfbBaseHeader.vue +185 -68
- package/src/components/JfbBaseLogin/Api.js +1 -2
- package/src/components/JfbBaseLogin/Attr.js +446 -0
- package/src/components/JfbBaseLogin/JfbBaseLogin.vue +641 -543
- package/src/components/JfbBaseLogin/privacyMixins.js +0 -0
- package/src/components/JfbBaseLoginForgetPwd/Attr.js +10 -0
- package/src/components/JfbBaseLoginForgetPwd/JfbBaseLoginForgetPwd.vue +24 -21
- package/src/components/JfbBaseLoginSetPwd/JfbBaseLoginSetPwd.vue +7 -7
- package/src/components/JfbBaseMapOverlay/JfbBaseMapOverlay.vue +33 -42
- package/src/components/JfbBaseMapSearch/JfbBaseMapSearch.vue +9 -4
- package/src/components/JfbBaseMapSearch/MapSearchH5.vue +281 -268
- package/src/components/JfbBaseMultipleExpress/JfbBaseMultipleExpress.vue +133 -84
- package/src/components/JfbBaseMultipleExpress/Mock.js +79 -1
- package/src/components/JfbBaseNotice/Attr.js +0 -1
- package/src/components/JfbBaseNotice/JfbBaseNotice.vue +1 -0
- package/src/components/JfbBaseOrderDetail/Attr.js +421 -35
- package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +747 -366
- package/src/components/JfbBaseOrderDetail/bizMock.js +347 -0
- package/src/components/JfbBaseOrderList/Attr.js +186 -49
- package/src/components/JfbBaseOrderList/JfbBaseOrderList.vue +270 -87
- package/src/components/JfbBaseOrderList/Mock.js +166 -1
- package/src/components/JfbBasePay/Api.js +11 -0
- package/src/components/JfbBasePay/Attr.js +28 -22
- package/src/components/JfbBasePay/JfbBasePay.vue +217 -151
- package/src/components/JfbBasePay/Mock.js +13 -3
- package/src/components/JfbBasePhoneCollect/Attr.js +435 -0
- package/src/components/JfbBasePhoneCollect/JfbBasePhoneCollect.vue +232 -189
- package/src/components/JfbBasePhoneCollect/JfbBasePhoneCollectMixin.js +12 -0
- package/src/components/JfbBasePhoneLogin/Attr.js +435 -0
- package/src/components/JfbBasePhoneLogin/JfbBasePhoneLogin.vue +51 -9
- package/src/components/JfbBasePhoneLogin/JfbBasePhoneLoginMixin.js +12 -0
- package/src/components/JfbBasePoster/Attr.js +26 -25
- package/src/components/JfbBasePoster/JfbBasePoster.vue +16 -31
- package/src/components/JfbBasePoster/{FourScreen.vue → MoreScreen.vue} +24 -32
- package/src/components/JfbBasePosterType/Attr.js +54 -0
- package/src/components/JfbBasePosterType/FourScreen.vue +13 -6
- package/src/components/JfbBasePosterType/JfbBasePosterType.vue +16 -2
- package/src/components/JfbBaseRecharge/Attr.js +0 -8
- package/src/components/JfbBaseRecharge/JfbBaseRecharge.vue +51 -39
- package/src/components/JfbBaseRechargeOrder/Attr.js +135 -0
- package/src/components/JfbBaseRechargeOrder/JfbBaseRechargeOrder.vue +145 -64
- package/src/components/JfbBaseRechargeOrderDetail/JfbBaseRechargeOrderDetail.vue +11 -8
- package/src/components/JfbBaseRechargeSuccess/Api.js +4 -39
- package/src/components/JfbBaseRechargeSuccess/JfbBaseRechargeSuccess.vue +35 -28
- package/src/components/JfbBaseSetPwd/JfbBaseSetPwd.vue +52 -21
- package/src/components/JfbBaseSuccess/Api.js +1 -7
- package/src/components/JfbBaseSuccess/Attr.js +259 -66
- package/src/components/JfbBaseSuccess/JfbBaseSuccess.vue +529 -398
- package/src/components/JfbBaseSuccess/Mock.js +63 -1
- package/src/components/JfbBaseUserCenter/Attr.js +256 -131
- package/src/components/JfbBaseUserCenter/JfbBaseUserCenter.vue +83 -57
- package/src/components/JfbBaseUserInfo/Attr.js +176 -83
- package/src/components/JfbBaseUserInfo/JfbBaseUserInfo.vue +77 -25
- package/src/components/JfbBaseUserOrder/Attr.js +215 -123
- package/src/components/JfbBaseUserOrder/JfbBaseUserOrder.vue +85 -57
- package/src/components/JfbBaseWebview/JfbBaseWebview.vue +17 -2
- package/src/components/JfbBaseWxAuthorize/Api.js +11 -0
- package/src/components/JfbBaseWxAuthorize/Attr.js +244 -23
- package/src/components/JfbBaseWxAuthorize/JfbBaseWxAuthorize.vue +39 -16
- package/src/components/JfbBaseWxAuthorize/Mock.js +44 -3
- package/src/components/JfbBaseWxAuthorizeError/Api.js +29 -0
- package/src/components/JfbBaseWxAuthorizeError/Attr.js +261 -0
- package/src/components/JfbBaseWxAuthorizeError/JfbBaseWxAuthorizeError.vue +154 -0
- package/src/components/JfbBaseWxAuthorizeError/JfbBaseWxAuthorizeErrorLess.less +80 -0
- package/src/components/JfbBaseWxAuthorizeError/JfbBaseWxAuthorizeErrorMixin.js +30 -0
- package/src/components/JfbBaseWxAuthorizeError/Mock.js +5 -0
- package/src/components/JfbBasePoster/Screen.vue +0 -302
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jufubao-base",
|
|
3
|
-
"version": "1.0.28
|
|
3
|
+
"version": "1.0.28",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "聚福宝业务组件基础插件包",
|
|
6
6
|
"main": "index.js",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"core-js": "^2.6.5",
|
|
51
51
|
"flyio": "^0.6.2",
|
|
52
52
|
"gxd-commands-bussiness": "^1.0.12",
|
|
53
|
-
"gxd-uni-library-editx": "1.0.8-
|
|
53
|
+
"gxd-uni-library-editx": "1.0.8-beta60",
|
|
54
54
|
"jweixin-module": "^1.6.0",
|
|
55
55
|
"md5": "^2.3.0",
|
|
56
56
|
"path-to-regexp": "^6.2.1",
|
|
@@ -24,7 +24,7 @@ function stringToNumber(str) {
|
|
|
24
24
|
function getBusinessImageUrl(path, size = 'size8') {
|
|
25
25
|
if (Object.prototype.toString.call(path)!== '[object String]' || path === '') {
|
|
26
26
|
console.error('传入的路径(path)非字符串类型,请确认路径是否正确');
|
|
27
|
-
throw new Error('传入的路径(path)非字符串类型,请确认路径是否正确');
|
|
27
|
+
//throw new Error('传入的路径(path)非字符串类型,请确认路径是否正确');
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
let reg = /^(http:\/\/|https:\/\/|\/\/)+.+$/;
|
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
|
|
2
|
+
import StyleForm from "@/utils/StyleForm";
|
|
3
|
+
let styleForm = new StyleForm({border: null, shadow: null, spacing: '', bgColor:'', margin: null,}, null, 'list');
|
|
3
4
|
export default {
|
|
4
5
|
style: [],
|
|
5
6
|
advanced: [],
|
|
6
|
-
content:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
content: (data)=>{
|
|
8
|
+
return [
|
|
9
|
+
{
|
|
10
|
+
label: '选取地区路径:', //label
|
|
11
|
+
ele: 'xd-select-pages-path', //package 名称
|
|
12
|
+
valueKey: 'location_url', //form[valueKey]
|
|
13
|
+
placeholder: '请选择选取地区路径',
|
|
14
|
+
value: data.location_url || '',
|
|
15
|
+
setting: {
|
|
16
|
+
router: XdBus.getParentApi('getPagesTree'),
|
|
17
|
+
},
|
|
18
|
+
inline: false,
|
|
15
19
|
},
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
20
|
+
...styleForm.getForm(data, '内容配置')
|
|
21
|
+
].filter(i=>i)
|
|
22
|
+
},
|
|
19
23
|
}
|
|
@@ -22,10 +22,17 @@
|
|
|
22
22
|
:style="{ minHeight: layoutInfo.bodyMinHeightRpx + 'rpx' }"
|
|
23
23
|
>
|
|
24
24
|
<view
|
|
25
|
+
:style="{ margin: jfbListMarginComputed }"
|
|
25
26
|
class="jfb-base-address__body-address"
|
|
26
27
|
v-if="addressList && addressList.length > 0"
|
|
27
28
|
>
|
|
28
29
|
<view
|
|
30
|
+
:style="{
|
|
31
|
+
marginBottom: jfbListSpacing + 'rpx',
|
|
32
|
+
boxShadow: jfbListShadowComputed,
|
|
33
|
+
border: jfbListBorderComputed,
|
|
34
|
+
backgroundColor: jfbListBgColor,
|
|
35
|
+
}"
|
|
29
36
|
class="jfb-base-address__body-address-item"
|
|
30
37
|
v-for="(item, index) in addressList"
|
|
31
38
|
@click="handleSelectAddress(item)"
|
|
@@ -42,16 +49,16 @@
|
|
|
42
49
|
borderRadius: '4rpx',
|
|
43
50
|
marginRight: '20rpx',
|
|
44
51
|
}"
|
|
45
|
-
|
|
46
|
-
|
|
52
|
+
>默认</view
|
|
53
|
+
>
|
|
47
54
|
<view style="color: #999999">{{ item | getCodeName }}</view>
|
|
48
55
|
</view>
|
|
49
56
|
<view class="jfb-base-address__body-address-item-middle">
|
|
50
|
-
{{ item.address_detail }}
|
|
57
|
+
{{ item.address_detail }} {{ item.house_number }}
|
|
51
58
|
</view>
|
|
52
59
|
<view
|
|
53
60
|
:style="{
|
|
54
|
-
backgroundColor: item.is_select === 'Y' ? mainColor : '#
|
|
61
|
+
backgroundColor: item.is_select === 'Y' ? mainColor : '#CCC',
|
|
55
62
|
}"
|
|
56
63
|
class="jfb-base-address__body-address-item-bottom"
|
|
57
64
|
>
|
|
@@ -92,17 +99,17 @@
|
|
|
92
99
|
v-if="showAddress"
|
|
93
100
|
:show.sync="showAddress"
|
|
94
101
|
:z-index="2500"
|
|
95
|
-
:is-close="
|
|
96
|
-
:is-body-close="
|
|
102
|
+
:is-close="true"
|
|
103
|
+
:is-body-close="true"
|
|
97
104
|
:fullscreen="true"
|
|
98
105
|
>
|
|
99
106
|
<xd-address
|
|
100
107
|
v-if="showAddress"
|
|
101
108
|
@close="handleClose"
|
|
102
|
-
@getCity="handleGetCity"
|
|
103
109
|
@save="handleSave"
|
|
104
110
|
@onToLocation="handleToLocation"
|
|
105
111
|
@onAddressToCode="handleAddressToCode"
|
|
112
|
+
@getCity="handleGetCity"
|
|
106
113
|
:default-value="defaultValue"
|
|
107
114
|
:mainColor="mainColor"
|
|
108
115
|
></xd-address>
|
|
@@ -119,9 +126,26 @@ import XdDownDrawer from "@/components/XdDownDrawer/XdDownDrawer";
|
|
|
119
126
|
import XdAddress from "./XdAddress";
|
|
120
127
|
import { jfbRootExec } from "@/utils/xd.event";
|
|
121
128
|
import JfbBaseAddressMixin from "./JfbBaseAddressMixin";
|
|
122
|
-
|
|
123
|
-
|
|
129
|
+
import componentsMixins from "@/mixins/componentsMixins";
|
|
130
|
+
import extsMixins from "@/mixins/extsMixins";
|
|
131
|
+
import StyleForm from "@/utils/StyleForm";
|
|
124
132
|
import { getContainerPropsValue } from "@/utils/xd.base";
|
|
133
|
+
let styleForm = new StyleForm(
|
|
134
|
+
{
|
|
135
|
+
border: null,
|
|
136
|
+
shadow: null,
|
|
137
|
+
spacing: 24,
|
|
138
|
+
bgColor: "#FFFFFF",
|
|
139
|
+
margin: {
|
|
140
|
+
bottom: 20,
|
|
141
|
+
left: 20,
|
|
142
|
+
right: 20,
|
|
143
|
+
top: 20,
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
getContainerPropsValue,
|
|
147
|
+
"list"
|
|
148
|
+
);
|
|
125
149
|
|
|
126
150
|
export default {
|
|
127
151
|
name: "JfbBaseAddress",
|
|
@@ -131,7 +155,7 @@ export default {
|
|
|
131
155
|
XdDownDrawer,
|
|
132
156
|
XdAddress,
|
|
133
157
|
},
|
|
134
|
-
mixins: [componentsMixins,extsMixins,JfbBaseAddressMixin],
|
|
158
|
+
mixins: [componentsMixins, extsMixins, JfbBaseAddressMixin],
|
|
135
159
|
data() {
|
|
136
160
|
return {
|
|
137
161
|
showAddress: false,
|
|
@@ -139,6 +163,7 @@ export default {
|
|
|
139
163
|
backStatus: false,
|
|
140
164
|
location_url: "",
|
|
141
165
|
addressList: null,
|
|
166
|
+
...styleForm.getDataItem(),
|
|
142
167
|
};
|
|
143
168
|
},
|
|
144
169
|
filters: {
|
|
@@ -155,17 +180,19 @@ export default {
|
|
|
155
180
|
},
|
|
156
181
|
},
|
|
157
182
|
created() {
|
|
183
|
+
console.log(this, "dsadas");
|
|
158
184
|
this.init(this.container);
|
|
159
185
|
},
|
|
160
186
|
computed: {
|
|
161
187
|
prod_bottom() {
|
|
162
188
|
return this.fixedStyle({ height: 0, zIndex: 111 });
|
|
163
189
|
},
|
|
190
|
+
...styleForm.getComputedItem(),
|
|
164
191
|
},
|
|
165
192
|
methods: {
|
|
166
193
|
onJfbLoad(options) {
|
|
167
194
|
let { back } = options;
|
|
168
|
-
this.backStatus = back
|
|
195
|
+
this.backStatus = back;
|
|
169
196
|
this.getList();
|
|
170
197
|
},
|
|
171
198
|
/**
|
|
@@ -178,6 +205,7 @@ export default {
|
|
|
178
205
|
"content.location_url",
|
|
179
206
|
{ value: "" }
|
|
180
207
|
).value;
|
|
208
|
+
styleForm.getInitItem(this, value);
|
|
181
209
|
},
|
|
182
210
|
getList(callback) {
|
|
183
211
|
this.$xdShowLoading({});
|
|
@@ -241,9 +269,15 @@ export default {
|
|
|
241
269
|
* @description 打开地图定位
|
|
242
270
|
*/
|
|
243
271
|
handleToLocation() {
|
|
244
|
-
this
|
|
245
|
-
|
|
246
|
-
|
|
272
|
+
if (this.defaultValue) {
|
|
273
|
+
this.$xdUniHelper.navigateTo({
|
|
274
|
+
url: `${this.location_url}?latitude=${this.defaultValue.latitude}&longitude=${this.defaultValue.longitude}`,
|
|
275
|
+
});
|
|
276
|
+
} else {
|
|
277
|
+
this.$xdUniHelper.navigateTo({
|
|
278
|
+
url: this.location_url,
|
|
279
|
+
});
|
|
280
|
+
}
|
|
247
281
|
},
|
|
248
282
|
/**
|
|
249
283
|
* @description 保存事件
|
|
@@ -255,14 +289,15 @@ export default {
|
|
|
255
289
|
return;
|
|
256
290
|
}
|
|
257
291
|
let params = this.getParams(address);
|
|
292
|
+
console.log(params, "321321321");
|
|
258
293
|
params["tag"] = 0;
|
|
259
|
-
params["latitude"] = address.latitude + ""
|
|
260
|
-
params["longitude"] = address.longitude + ""
|
|
294
|
+
params["latitude"] = address.latitude ? address.latitude + "" : "";
|
|
295
|
+
params["longitude"] = address.longitude ? address.longitude + "" : "";
|
|
261
296
|
this.$xdShowLoading({});
|
|
262
297
|
if (params["address_nnid"]) {
|
|
263
298
|
params["is_select"] = "Y";
|
|
264
|
-
let address_nnid = params["address_nnid"]
|
|
265
|
-
delete params["address_nnid"]
|
|
299
|
+
let address_nnid = params["address_nnid"];
|
|
300
|
+
delete params["address_nnid"];
|
|
266
301
|
jfbRootExec("updateAddress", {
|
|
267
302
|
vm: this,
|
|
268
303
|
data: {
|
|
@@ -272,6 +307,7 @@ export default {
|
|
|
272
307
|
})
|
|
273
308
|
.then((res) => {
|
|
274
309
|
console.log(33333, params);
|
|
310
|
+
this.showAddress = false;
|
|
275
311
|
setTimeout(() => {
|
|
276
312
|
this.getList((list) => {
|
|
277
313
|
if (this.backStatus) {
|
|
@@ -295,6 +331,7 @@ export default {
|
|
|
295
331
|
},
|
|
296
332
|
})
|
|
297
333
|
.then((res) => {
|
|
334
|
+
this.showAddress = false;
|
|
298
335
|
setTimeout(() => {
|
|
299
336
|
this.getList((list) => {
|
|
300
337
|
if (this.backStatus) {
|
|
@@ -312,7 +349,6 @@ export default {
|
|
|
312
349
|
});
|
|
313
350
|
}
|
|
314
351
|
this.defaultValue = null;
|
|
315
|
-
this.showAddress = false;
|
|
316
352
|
},
|
|
317
353
|
/**
|
|
318
354
|
* @description 反解析地址获取数据
|
|
@@ -320,15 +356,37 @@ export default {
|
|
|
320
356
|
* @param callback 成功回调方法
|
|
321
357
|
*/
|
|
322
358
|
handleAddressToCode(address, callback) {
|
|
359
|
+
let { latitude, longitude } = address;
|
|
360
|
+
let { title, city, province } = address["sourceData"];
|
|
361
|
+
let prefix = `${province}${city}`;
|
|
362
|
+
if (province === city) {
|
|
363
|
+
prefix = province;
|
|
364
|
+
}
|
|
365
|
+
let lastTitle;
|
|
366
|
+
if (
|
|
367
|
+
province &&
|
|
368
|
+
city &&
|
|
369
|
+
address["sourceData"]["address"].indexOf(prefix) === 0
|
|
370
|
+
) {
|
|
371
|
+
lastTitle = address["sourceData"]["address"];
|
|
372
|
+
} else {
|
|
373
|
+
lastTitle = `${prefix}${title}${address["sourceData"]["address"]}`;
|
|
374
|
+
}
|
|
375
|
+
// 当原始title不在查询数据中 自动补全。
|
|
376
|
+
if (lastTitle.indexOf(title) === -1) {
|
|
377
|
+
lastTitle += title;
|
|
378
|
+
}
|
|
323
379
|
jfbRootExec("getJdCode", {
|
|
324
380
|
vm: this,
|
|
325
381
|
data: {
|
|
326
|
-
|
|
327
|
-
|
|
382
|
+
address: lastTitle,
|
|
383
|
+
latitude: latitude,
|
|
384
|
+
longitude: longitude,
|
|
328
385
|
},
|
|
329
386
|
})
|
|
330
387
|
.then((res) => {
|
|
331
388
|
console.log(res, "4545454545");
|
|
389
|
+
res.data.receipt_region_name = `${res.data.province_name}${res.data.city_name}${res.data.area_name}${res.data.street_name}`;
|
|
332
390
|
res.data.city_name = [
|
|
333
391
|
res.data.province_name,
|
|
334
392
|
res.data.city_name,
|
|
@@ -341,13 +399,20 @@ export default {
|
|
|
341
399
|
res.data.area_code,
|
|
342
400
|
res.data.street_code,
|
|
343
401
|
];
|
|
344
|
-
res.data.receipt_region_name = `${res.data.province_name}${res.data.city_name}${res.data.area_name}${res.data.street_name}`;
|
|
345
402
|
callback(res.data);
|
|
346
403
|
})
|
|
347
404
|
.catch(this.$xdLog.catch);
|
|
348
405
|
},
|
|
349
406
|
handleSelectAddress(item) {
|
|
350
407
|
console.log("handleSelectAddress", item);
|
|
408
|
+
if (item.is_valid === "N") {
|
|
409
|
+
this.$xdAlert({
|
|
410
|
+
content: "因版本升级,为了确保您能正常收货,请您重新编辑收货地址!",
|
|
411
|
+
zIndex: 3200,
|
|
412
|
+
isClose: false,
|
|
413
|
+
});
|
|
414
|
+
return;
|
|
415
|
+
}
|
|
351
416
|
item.is_select = "Y";
|
|
352
417
|
this.$xdShowLoading({});
|
|
353
418
|
jfbRootExec("selectAddress", {
|
|
@@ -401,6 +466,7 @@ export default {
|
|
|
401
466
|
id: item["address_nnid"],
|
|
402
467
|
latitude: item["latitude"] || null,
|
|
403
468
|
longitude: item["longitude"] || null,
|
|
469
|
+
house_number: item["house_number"],
|
|
404
470
|
};
|
|
405
471
|
|
|
406
472
|
console.log("handleEdit", item, this.defaultValue);
|
|
@@ -409,6 +475,7 @@ export default {
|
|
|
409
475
|
handleDel(item) {
|
|
410
476
|
console.log("handleDel", item);
|
|
411
477
|
this.$xdConfirm({
|
|
478
|
+
$vm: this,
|
|
412
479
|
content: "确定删除当前配送地址吗?",
|
|
413
480
|
width: "80%",
|
|
414
481
|
success: (res) => {
|
|
@@ -445,6 +512,7 @@ export default {
|
|
|
445
512
|
area_name: address["receipt_city_name"][2],
|
|
446
513
|
street_name: address["receipt_city_name"][3],
|
|
447
514
|
is_default: address["receipt_default"] ? "Y" : "N",
|
|
515
|
+
house_number: address["house_number"],
|
|
448
516
|
};
|
|
449
517
|
},
|
|
450
518
|
isCheck({
|
|
@@ -531,8 +599,6 @@ export default {
|
|
|
531
599
|
|
|
532
600
|
.jfb-base-address {
|
|
533
601
|
&__body {
|
|
534
|
-
margin: unit(20, rpx);
|
|
535
|
-
|
|
536
602
|
&-empty {
|
|
537
603
|
display: flex;
|
|
538
604
|
flex-direction: column;
|
|
@@ -560,7 +626,7 @@ export default {
|
|
|
560
626
|
display: flex;
|
|
561
627
|
align-items: center;
|
|
562
628
|
font-size: unit(28, rpx);
|
|
563
|
-
padding: unit(40, rpx);
|
|
629
|
+
padding: unit(40, rpx) unit(40, rpx) unit(24, rpx) unit(40, rpx);
|
|
564
630
|
}
|
|
565
631
|
|
|
566
632
|
&-middle {
|
|
@@ -592,7 +658,7 @@ export default {
|
|
|
592
658
|
right: 0;
|
|
593
659
|
padding-top: unit(20, rpx);
|
|
594
660
|
background: #fff;
|
|
595
|
-
height: unit(100,rpx);
|
|
661
|
+
height: unit(100, rpx);
|
|
596
662
|
}
|
|
597
663
|
}
|
|
598
664
|
}
|
|
@@ -57,26 +57,39 @@
|
|
|
57
57
|
receipt_region_name
|
|
58
58
|
}}</view>
|
|
59
59
|
</view>
|
|
60
|
-
<view @click="toLocation">
|
|
60
|
+
<!-- <view @click="toLocation">
|
|
61
61
|
<xd-font-icon
|
|
62
62
|
size="30"
|
|
63
63
|
icon="iconshouhuodizhi"
|
|
64
64
|
color="#999"
|
|
65
65
|
></xd-font-icon>
|
|
66
|
-
</view>
|
|
66
|
+
</view> -->
|
|
67
67
|
<view
|
|
68
68
|
class="xd-address__body-item-line"
|
|
69
69
|
:style="{ borderColor: styleMainColor, width: '95%' }"
|
|
70
70
|
></view>
|
|
71
71
|
</view>
|
|
72
72
|
<view class="xd-address__body-item">
|
|
73
|
+
<view class="xd-address__body-item-label">详细地址</view>
|
|
74
|
+
<view class="xd-address__body-item-input">
|
|
75
|
+
<view style="color: #bbb" v-if="!receipt_address">详细地址</view>
|
|
76
|
+
<view v-else class="xd-address__body-content">
|
|
77
|
+
{{ receipt_address }}
|
|
78
|
+
</view>
|
|
79
|
+
</view>
|
|
80
|
+
<view
|
|
81
|
+
class="xd-address__body-item-line"
|
|
82
|
+
:style="{ borderColor: styleMainColor }"
|
|
83
|
+
></view>
|
|
84
|
+
</view>
|
|
85
|
+
<!-- <view class="xd-address__body-item" v-else>
|
|
73
86
|
<view class="xd-address__body-item-label">详细地址</view>
|
|
74
87
|
<view class="xd-address__body-item-input">
|
|
75
88
|
<textarea
|
|
76
89
|
class="xd-address__body-item-input-textarea"
|
|
77
90
|
placeholder-class="xd-address__body-item-input-placeholder"
|
|
78
91
|
@confirm="doneInput"
|
|
79
|
-
placeholder="
|
|
92
|
+
placeholder="详细地址"
|
|
80
93
|
:adjust-position="false"
|
|
81
94
|
:focus="focus"
|
|
82
95
|
auto-height
|
|
@@ -84,6 +97,27 @@
|
|
|
84
97
|
:selection-start="focusNumber"
|
|
85
98
|
v-model="receipt_address"
|
|
86
99
|
></textarea>
|
|
100
|
+
</view>
|
|
101
|
+
<view
|
|
102
|
+
class="xd-address__body-item-line"
|
|
103
|
+
:style="{ borderColor: styleMainColor }"
|
|
104
|
+
></view>
|
|
105
|
+
</view> -->
|
|
106
|
+
<view class="xd-address__body-item">
|
|
107
|
+
<view class="xd-address__body-item-label">门牌号</view>
|
|
108
|
+
<view class="xd-address__body-item-input">
|
|
109
|
+
<textarea
|
|
110
|
+
class="xd-address__body-item-input-textarea"
|
|
111
|
+
placeholder-class="xd-address__body-item-input-placeholder"
|
|
112
|
+
@confirm="doneInput"
|
|
113
|
+
placeholder="如道路、门牌号、小区、楼栋号、单元室等"
|
|
114
|
+
:adjust-position="false"
|
|
115
|
+
:focus="focus"
|
|
116
|
+
auto-height
|
|
117
|
+
maxlength="100"
|
|
118
|
+
:selection-start="focusNumber"
|
|
119
|
+
v-model="house_number"
|
|
120
|
+
></textarea>
|
|
87
121
|
<div class="xd-address__body-item-input-tips" v-if="showTips">
|
|
88
122
|
记得完善门牌号
|
|
89
123
|
</div>
|
|
@@ -98,7 +132,11 @@
|
|
|
98
132
|
<view>设为默认地址</view>
|
|
99
133
|
<view>
|
|
100
134
|
<switch
|
|
101
|
-
@change="
|
|
135
|
+
@change="
|
|
136
|
+
(event) => {
|
|
137
|
+
receipt_default = event.detail.value;
|
|
138
|
+
}
|
|
139
|
+
"
|
|
102
140
|
:checked="receipt_default"
|
|
103
141
|
style="transform: scale(0.5)"
|
|
104
142
|
size="small"
|
|
@@ -201,6 +239,7 @@ export default {
|
|
|
201
239
|
receipt_region: {}, //所在地址
|
|
202
240
|
receipt_region_name: "", //城市地址
|
|
203
241
|
receipt_default: false, //是否默认
|
|
242
|
+
house_number: "", //门牌号
|
|
204
243
|
|
|
205
244
|
//切换添加收货地址与切换城市UI
|
|
206
245
|
isShowAddress: true, //是否显示添加地址
|
|
@@ -226,6 +265,8 @@ export default {
|
|
|
226
265
|
styleMainColor: "",
|
|
227
266
|
|
|
228
267
|
random: new Date().getTime(),
|
|
268
|
+
|
|
269
|
+
needHand: false, //是否需要手动选择所在地区
|
|
229
270
|
};
|
|
230
271
|
},
|
|
231
272
|
computed: {
|
|
@@ -242,6 +283,7 @@ export default {
|
|
|
242
283
|
region_name: this.receipt_region_name,
|
|
243
284
|
latitude: this.latitude,
|
|
244
285
|
longitude: this.longitude,
|
|
286
|
+
house_number: this.house_number,
|
|
245
287
|
};
|
|
246
288
|
},
|
|
247
289
|
},
|
|
@@ -257,7 +299,7 @@ export default {
|
|
|
257
299
|
this.location = location;
|
|
258
300
|
this.latitude = location["latitude"];
|
|
259
301
|
this.longitude = location["longitude"];
|
|
260
|
-
this.receipt_address = location["sourceData"]["
|
|
302
|
+
this.receipt_address = location["sourceData"]["title"]?location["sourceData"]["title"]:'';
|
|
261
303
|
|
|
262
304
|
this.handleParse(location);
|
|
263
305
|
this.showTips = true;
|
|
@@ -284,20 +326,29 @@ export default {
|
|
|
284
326
|
|
|
285
327
|
methods: {
|
|
286
328
|
handleRegion() {
|
|
287
|
-
if (
|
|
288
|
-
this.toLocation();
|
|
289
|
-
} else {
|
|
329
|
+
if (this.needHand) {
|
|
290
330
|
this.isShowAddress = !this.isShowAddress;
|
|
331
|
+
} else {
|
|
332
|
+
this.toLocation();
|
|
291
333
|
}
|
|
292
334
|
},
|
|
293
335
|
|
|
294
336
|
handleParse(location) {
|
|
295
337
|
this.$emit("onAddressToCode", location, (res) => {
|
|
296
|
-
console.log(res, "454545");
|
|
338
|
+
console.log(res, location, "454545");
|
|
297
339
|
this.city_name = res["city_name"] || [];
|
|
298
340
|
this.city_code = res["city_code"] || [];
|
|
299
341
|
this.city_selected_data = res["city_selected_data"] || [];
|
|
300
342
|
this.receipt_region_name = res["receipt_region_name"];
|
|
343
|
+
if (!res.province_code) {
|
|
344
|
+
this.$xdAlert({
|
|
345
|
+
content: "定位失败,请您手动选择!",
|
|
346
|
+
zIndex: 3200,
|
|
347
|
+
time: 2000,
|
|
348
|
+
isClose: false,
|
|
349
|
+
});
|
|
350
|
+
this.needHand = true;
|
|
351
|
+
}
|
|
301
352
|
});
|
|
302
353
|
},
|
|
303
354
|
|
|
@@ -413,6 +464,7 @@ export default {
|
|
|
413
464
|
* @description 保存事件
|
|
414
465
|
*/
|
|
415
466
|
save() {
|
|
467
|
+
console.log(this.getAddress, "this.getAddressthis.getAddress");
|
|
416
468
|
this.$emit("save", this.getAddress);
|
|
417
469
|
},
|
|
418
470
|
|