mirror of
https://gitee.com/java110/WechatOwnerService.git
synced 2026-02-23 21:36:38 +08:00
加入家政入口
This commit is contained in:
parent
4fa2d9e9ca
commit
eb0d7a6dc2
14
pages.json
14
pages.json
@ -530,6 +530,16 @@
|
||||
}
|
||||
|
||||
}
|
||||
,{
|
||||
"path" : "pages/homemaking/homemaking",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "家政服务",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle":"custom"
|
||||
}
|
||||
|
||||
}
|
||||
],
|
||||
"tabBar": {
|
||||
"color": "#272636",
|
||||
@ -543,8 +553,8 @@
|
||||
"selectedIconPath": "static/images/home-selected.png"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/rentHouse/rentHouse",
|
||||
"text": "房源",
|
||||
"pagePath": "pages/homemaking/homemaking",
|
||||
"text": "家政",
|
||||
"iconPath": "static/images/rent.png",
|
||||
"selectedIconPath": "static/images/rent-selected.png"
|
||||
},
|
||||
|
||||
63
pages/homemaking/homemaking.vue
Normal file
63
pages/homemaking/homemaking.vue
Normal file
@ -0,0 +1,63 @@
|
||||
<template>
|
||||
<view class="h5-html">
|
||||
<web-view ref="webview" :src="url" @onPostMessage="onReciveMessage"></web-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import conf from '../../conf/config.js'
|
||||
import {
|
||||
reciveMessage,getHcCode
|
||||
} from '../../api/webView/webViewApi.js'
|
||||
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
url: '',
|
||||
communityId: ''
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// #ifdef H5
|
||||
window.addEventListener("message", this.onReciveMessage);
|
||||
// #endif
|
||||
},
|
||||
onLoad(options) {
|
||||
let _that = this;
|
||||
let _url = options.url;
|
||||
|
||||
//刷新hcCode
|
||||
this.vc.getCurCommunity()
|
||||
.then(function(_communityInfo) {
|
||||
_that.communityId = _communityInfo.communityId;
|
||||
})
|
||||
.then(function() {
|
||||
_that._getHcCode(_url);
|
||||
})
|
||||
|
||||
},
|
||||
methods: {
|
||||
_getHcCode: function(_url) {
|
||||
let _that =this;
|
||||
if (_url) {
|
||||
this.url = conf.mallUrl + _url;
|
||||
} else {
|
||||
getHcCode().then(_data => {
|
||||
_that.url = conf.mallUrl+"#/pages/homemaking/index?mallFrom=HC&hcCommunityId="+_that.communityId+"&hcCode="+_data.hcCode;
|
||||
});
|
||||
}
|
||||
},
|
||||
onReciveMessage: function(event) {
|
||||
reciveMessage(event);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.h5-html {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue
Block a user