jufubao-base 1.0.31 → 1.0.32-beta2
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 +1 -1
- package/src/components/JfbBaseCard/JfbBaseCard.vue +52 -56
- package/src/components/JfbBaseHeader/Attr.js +10 -0
- package/src/components/JfbBaseHeader/JfbBaseHeader.vue +19 -1
- package/src/components/JfbBasePay/JfbBasePay.vue +5 -13
- package/src/components/JfbBasePhoneCollect/JfbBasePhoneCollect.vue +3 -3
package/package.json
CHANGED
|
@@ -345,61 +345,60 @@ export default {
|
|
|
345
345
|
handleScan() {
|
|
346
346
|
console.log(getApp().globalData, "pageAtrr");
|
|
347
347
|
this.$xdShowLoading({});
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
.then((res) => {
|
|
354
|
-
this.$xdHideLoading();
|
|
355
|
-
if (this.jwxSDK !== null) {
|
|
356
|
-
setTimeout(() => {
|
|
357
|
-
// #ifdef H5
|
|
358
|
-
this.jwxSDK.scanQRCode({
|
|
359
|
-
needResult: 1,
|
|
360
|
-
scanType: ["qrCode"],
|
|
361
|
-
success: (res) => {
|
|
362
|
-
this.$xdUniHelper.navigateTo({
|
|
363
|
-
url: `${this.confirmUrl}?qrcode=${encodeURIComponent(
|
|
364
|
-
res.resultStr
|
|
365
|
-
)}`,
|
|
366
|
-
});
|
|
367
|
-
},
|
|
368
|
-
});
|
|
369
|
-
// #endif
|
|
370
|
-
// #ifdef MP
|
|
371
|
-
uni.scanCode({
|
|
372
|
-
success: (res) => {
|
|
373
|
-
console.log("scanCode", res);
|
|
374
|
-
this.$xdUniHelper.navigateTo({
|
|
375
|
-
url: `${this.confirmUrl}?qrcode=${encodeURIComponent(
|
|
376
|
-
res.resultStr
|
|
377
|
-
)}`,
|
|
378
|
-
});
|
|
379
|
-
},
|
|
380
|
-
});
|
|
381
|
-
// #endif
|
|
382
|
-
}, 100);
|
|
383
|
-
}
|
|
348
|
+
try {
|
|
349
|
+
//#ifdef H5
|
|
350
|
+
jfbRootExec("getH5WxAuthorize", {
|
|
351
|
+
vm: this,
|
|
352
|
+
data: {site_id: "wx_pub" },
|
|
384
353
|
})
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
354
|
+
.then((res) => {
|
|
355
|
+
this.$xdHideLoading();
|
|
356
|
+
if (this.jwxSDK !== null) {
|
|
357
|
+
setTimeout(() => {
|
|
358
|
+
this.jwxSDK.scanQRCode({
|
|
359
|
+
needResult: 1,
|
|
360
|
+
scanType: ["qrCode"],
|
|
361
|
+
success: (res) => {
|
|
362
|
+
this.$xdUniHelper.navigateTo({
|
|
363
|
+
url: `${this.confirmUrl}?qrcode=${encodeURIComponent(
|
|
364
|
+
res.resultStr
|
|
365
|
+
)}`,
|
|
366
|
+
});
|
|
367
|
+
},
|
|
368
|
+
fail:(error)=>{
|
|
369
|
+
this.setARMSError(error)
|
|
370
|
+
}
|
|
371
|
+
});
|
|
372
|
+
}, 100);
|
|
373
|
+
}
|
|
374
|
+
})
|
|
375
|
+
.catch((err) => {
|
|
376
|
+
this.$xdHideLoading();
|
|
377
|
+
this.$xdAlert({
|
|
378
|
+
content: err,
|
|
379
|
+
});
|
|
380
|
+
this.setARMSError(err)
|
|
389
381
|
});
|
|
382
|
+
//#endif
|
|
383
|
+
//#ifdef MP-WEIXIN
|
|
384
|
+
uni.scanCode({
|
|
385
|
+
scanType: ["qrCode"],
|
|
386
|
+
success: (res) => {
|
|
387
|
+
this.$xdHideLoading();
|
|
388
|
+
this.$xdUniHelper.navigateTo({
|
|
389
|
+
url: `${this.confirmUrl}?qrcode=${encodeURIComponent(res.result)}`,
|
|
390
|
+
});
|
|
391
|
+
},
|
|
392
|
+
fail: (error) => {
|
|
393
|
+
this.setARMSError(error)
|
|
394
|
+
this.$xdHideLoading();
|
|
395
|
+
},
|
|
390
396
|
});
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
this.$xdUniHelper.navigateTo({
|
|
397
|
-
url: `${this.confirmUrl}?qrcode=${encodeURIComponent(res.result)}`,
|
|
398
|
-
});
|
|
399
|
-
},
|
|
400
|
-
fail: () => {},
|
|
401
|
-
});
|
|
402
|
-
//#endif
|
|
397
|
+
//#endif
|
|
398
|
+
} catch (err) {
|
|
399
|
+
this.$xdHideLoading();
|
|
400
|
+
this.setARMSError(err)
|
|
401
|
+
}
|
|
403
402
|
},
|
|
404
403
|
|
|
405
404
|
handleToDisabled() {
|
|
@@ -526,10 +525,7 @@ export default {
|
|
|
526
525
|
return false;
|
|
527
526
|
});
|
|
528
527
|
this.changeList = this.cardList.filter((item) => {
|
|
529
|
-
|
|
530
|
-
return true;
|
|
531
|
-
}
|
|
532
|
-
return false;
|
|
528
|
+
return item["is_exchange"] === "Y";
|
|
533
529
|
});
|
|
534
530
|
this.showList = this.cardList;
|
|
535
531
|
this.$xdHideLoading();
|
|
@@ -28,6 +28,16 @@ export default {
|
|
|
28
28
|
{label: "不显示", value: "N"}
|
|
29
29
|
]
|
|
30
30
|
},
|
|
31
|
+
{
|
|
32
|
+
label: "定位地址非当前城市时",
|
|
33
|
+
ele: "xd-radio",
|
|
34
|
+
valueKey: "showSwitchCity",
|
|
35
|
+
value: data.showSwitchCity || "N",
|
|
36
|
+
list: [
|
|
37
|
+
{label: "弹框提示切换", value: "Y"},
|
|
38
|
+
{label: "不提示", value: "N"}
|
|
39
|
+
]
|
|
40
|
+
},
|
|
31
41
|
data.showLocation==='Y' && {
|
|
32
42
|
label: '选择城市路径:', //label
|
|
33
43
|
ele: 'xd-select-pages-path', //package 名称
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
:getCityInfoByLocation="getCityInfoByLocation"
|
|
38
38
|
@done="handleCityDone"
|
|
39
39
|
@onChange="handleCityChange"
|
|
40
|
+
@alertChange="handleAlertChange"
|
|
40
41
|
:color="textColor"
|
|
41
42
|
:icon="locationIcon"
|
|
42
43
|
:bgColor="locationBackgroundColor"
|
|
@@ -77,7 +78,7 @@
|
|
|
77
78
|
import { getContainerPropsValue } from "@/utils/xd.base";
|
|
78
79
|
import getServiceUrl from "@/common/getServiceUrl";
|
|
79
80
|
import storage from "@/common/storage";
|
|
80
|
-
import {mapState} from 'vuex';
|
|
81
|
+
import {mapState, mapMutations } from 'vuex';
|
|
81
82
|
export default {
|
|
82
83
|
name: "JfbBaseHeader",
|
|
83
84
|
components: {
|
|
@@ -154,6 +155,7 @@
|
|
|
154
155
|
this.init(this.container);
|
|
155
156
|
},
|
|
156
157
|
methods: {
|
|
158
|
+
...mapMutations(['setShowSwitchCity', 'setCityInfo']),
|
|
157
159
|
onJfbLoad(options) {
|
|
158
160
|
this.loaded = true;
|
|
159
161
|
},
|
|
@@ -170,6 +172,8 @@
|
|
|
170
172
|
this.useSearch = getContainerPropsValue(container, "content.useSearch", "Y");
|
|
171
173
|
this.searchPagePath = getContainerPropsValue(container, "content.searchPagePath", {value:""}).value;
|
|
172
174
|
this.choseCityPath = getContainerPropsValue(container, "content.choseCityPath", {value:""}).value;
|
|
175
|
+
this.showSwitchCity = getContainerPropsValue(container, "content.showSwitchCity", "N");
|
|
176
|
+
this.setShowSwitchCity(this.showSwitchCity=="Y")
|
|
173
177
|
|
|
174
178
|
|
|
175
179
|
//基础
|
|
@@ -236,6 +240,20 @@
|
|
|
236
240
|
storage.set(this.saveKey, city);
|
|
237
241
|
jfbRootFnExec(this, 'onCustomEvent')("baseHeader@city", city);
|
|
238
242
|
},
|
|
243
|
+
handleAlertChange(cityInfo){
|
|
244
|
+
this.$xdConfirm({
|
|
245
|
+
$vm: this,
|
|
246
|
+
width: '90%',
|
|
247
|
+
content: `当前显示您在${cityInfo.city_name},是否切换到该城市?`,
|
|
248
|
+
success: (res) => {
|
|
249
|
+
if (res.confirm) {
|
|
250
|
+
this.setCityInfo(cityInfo);
|
|
251
|
+
}else{
|
|
252
|
+
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
})
|
|
256
|
+
},
|
|
239
257
|
|
|
240
258
|
handleCityChange() {
|
|
241
259
|
console.log('handleCityChange');
|
|
@@ -349,20 +349,12 @@ export default {
|
|
|
349
349
|
},
|
|
350
350
|
})
|
|
351
351
|
.then((res) => {
|
|
352
|
-
if (this.type === "recharge") {
|
|
353
|
-
|
|
354
|
-
url:
|
|
355
|
-
this.rechargeSuccessPath +
|
|
356
|
-
`?order_id=${this.main_order_id}`,
|
|
357
|
-
});
|
|
358
|
-
} else {
|
|
359
|
-
this.$xdUniHelper.redirectTo({
|
|
360
|
-
url:
|
|
361
|
-
this.paySuccessPath + `?order_id=${this.main_order_id}`,
|
|
362
|
-
});
|
|
363
|
-
}
|
|
352
|
+
if (this.type === "recharge") this.$xdUniHelper.redirectTo({url: this.rechargeSuccessPath + `?order_id=${this.main_order_id}`,});
|
|
353
|
+
this.$xdUniHelper.redirectTo({url: this.paySuccessPath + `?order_id=${this.main_order_id}`});
|
|
364
354
|
})
|
|
365
|
-
.catch(
|
|
355
|
+
.catch(error=>{
|
|
356
|
+
this.$xdLog.setARMSCustomError('update_loading_fail', {options: this.options, error});
|
|
357
|
+
});
|
|
366
358
|
});
|
|
367
359
|
})
|
|
368
360
|
.catch((err) => this.$xdHideLoading());
|
|
@@ -169,9 +169,9 @@ export default {
|
|
|
169
169
|
* @description 监听事件变化
|
|
170
170
|
* @param container {object} 业务组件对象自己
|
|
171
171
|
*/
|
|
172
|
-
init(
|
|
173
|
-
//this.bgcolor = getContainerPropsValue(
|
|
174
|
-
//this.height = getContainerPropsValue(
|
|
172
|
+
init(container) {
|
|
173
|
+
//this.bgcolor = getContainerPropsValue(container, 'content.bgcolor', '#fff');
|
|
174
|
+
//this.height = getContainerPropsValue(container, 'content.height', 10);
|
|
175
175
|
},
|
|
176
176
|
reGetCode() {
|
|
177
177
|
if (this.time > 0) return;
|