mirror of
https://gitee.com/java110/WechatOwnerService.git
synced 2026-02-23 21:36:38 +08:00
优化返回
This commit is contained in:
parent
7cbcb9d692
commit
b089996df9
@ -42,6 +42,8 @@ const ACTION_NAVIGATE_TO_PAGE = "navigateToPage";
|
||||
const ACTION_PAY_ORDER = "payOrder";
|
||||
const ACTION_SET_TITLE = "setTitle";
|
||||
const ACTION_NAVIGATE_HOME = "navigateHome";
|
||||
const ACTION_NAVIGATE_BACK = "navigateBack";
|
||||
|
||||
|
||||
|
||||
|
||||
@ -217,4 +219,13 @@ export function reciveMessage(event, that) {
|
||||
title:_data.title
|
||||
})
|
||||
}
|
||||
else if (_data.action == ACTION_NAVIGATE_BACK) {
|
||||
//_data.url = encodeUrl(_data.url);
|
||||
setStorageSync('_go_back_refresh',1);
|
||||
uni.navigateBack({
|
||||
delta:1
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -32,6 +32,15 @@
|
||||
_that.url = conf.mallUrl+"#/pages/homemaking/index?mallFrom=HC&hcCommunityId="+_that.communityId;
|
||||
})
|
||||
|
||||
},
|
||||
onShow() {
|
||||
let _goBackRefresh = getStorageSync('_go_back_refresh');
|
||||
if(_goBackRefresh == 1){
|
||||
let wv = this.$refs.webview
|
||||
wv.reload(true);
|
||||
}
|
||||
setStorageSync('_go_back_refresh',0)
|
||||
|
||||
},
|
||||
methods: {
|
||||
onReciveMessage: function(event) {
|
||||
|
||||
@ -10,7 +10,10 @@
|
||||
reciveMessage,
|
||||
getHcCode
|
||||
} from '../../api/webView/webViewApi.js'
|
||||
|
||||
import {
|
||||
getStorageSync,
|
||||
setStorageSync
|
||||
} from '../../utils/StorageUtil.js'
|
||||
import {
|
||||
decodeUrl
|
||||
} from '../../utils/UrlUtil.js';
|
||||
@ -27,8 +30,6 @@
|
||||
let _that = this;
|
||||
let _url = options.url;
|
||||
_url = decodeUrl(_url);
|
||||
|
||||
|
||||
//刷新hcCode
|
||||
this.vc.getCurCommunity()
|
||||
.then(function(_communityInfo) {
|
||||
@ -38,6 +39,15 @@
|
||||
_that.url = conf.mallUrlIndexPage + "&hcCommunityId=" + _that.communityId;
|
||||
})
|
||||
|
||||
},
|
||||
onShow() {
|
||||
let _goBackRefresh = getStorageSync('_go_back_refresh');
|
||||
if (_goBackRefresh == 1) {
|
||||
let wv = this.$refs.webview
|
||||
wv.currentWebview().reload(true);
|
||||
}
|
||||
setStorageSync('_go_back_refresh', 0);
|
||||
|
||||
},
|
||||
methods: {
|
||||
onReciveMessage: function(event) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user