|
@@ -252,13 +252,16 @@
|
|
|
}
|
|
|
},
|
|
|
goBack() {
|
|
|
- const jpuid = getUrlParam('unionid');
|
|
|
- if(jpuid){
|
|
|
- //window.location.href=process.car.BACK_URL
|
|
|
- //document.referrer
|
|
|
-
|
|
|
- window.history.back()
|
|
|
- //'https://xpgj.hbjp.com.cn/prod/jp-property-platform/index/#/master/'
|
|
|
+
|
|
|
+ if ('prodv4'==process.car.NODE_ENV) {
|
|
|
+
|
|
|
+ if (typeof this.customBack === 'function') {
|
|
|
+ // 在微信,支付宝等环境(H5正常),会导致父组件定义的customBack()函数体中的this变成子组件的this
|
|
|
+ // 通过bind()方法,绑定父组件的this,让this.customBack()的this为父组件的上下文
|
|
|
+ this.customBack.bind(this.$u.$parent.call(this))();
|
|
|
+ } else {
|
|
|
+ window.history.back()
|
|
|
+ }
|
|
|
}else{
|
|
|
// 如果自定义了点击返回按钮的函数,则执行,否则执行返回逻辑
|
|
|
if (typeof this.customBack === 'function') {
|