diff --git a/api/owner/ownerApi.js b/api/owner/ownerApi.js index f2c755f..75ddf0b 100755 --- a/api/owner/ownerApi.js +++ b/api/owner/ownerApi.js @@ -24,9 +24,17 @@ export function getCurOwner() { if (_ownerInfo) { resolve(_ownerInfo); } else { + //查询用户信息 + let _userInfo = wx.getStorageSync(mapping.USER_INFO); + if(!_userInfo){ + reject(); + return ; + } request({ url: url.queryAppUserBindingOwner, - data: {}, + data: { + openId:JSON.parse(_userInfo).openId + }, success: function(res) { let _json = res.data; if (_json.code == 0) { diff --git a/constant/AppConstant.js b/constant/AppConstant.js index d35deb3..ed7f644 100755 --- a/constant/AppConstant.js +++ b/constant/AppConstant.js @@ -11,7 +11,7 @@ class AppConstant { * 应用信息,主要是用来和后端服务交互时的时候用 */ // #ifdef MP-WEIXIN - static appId = "992020061452450002"; + static appId = "992019111758490006"; static appSecurity = ""; // #endif diff --git a/pages/my/my.vue b/pages/my/my.vue index 6a65016..a061222 100755 --- a/pages/my/my.vue +++ b/pages/my/my.vue @@ -65,14 +65,22 @@ //获取app实例 const app = getApp().globalData; import conf from '../../conf/config.js'; - import {getHcCode} from '../../api/webView/webViewApi.js' - - import {encodeUrl} from '../../utils/UrlUtil.js' - - import {getCurCommunity} from '../../api/community/communityApi.js' - - import {setStorageSync} from '../../utils/StorageUtil.js' - + import { + getHcCode + } from '../../api/webView/webViewApi.js' + + import { + encodeUrl + } from '../../utils/UrlUtil.js' + + import { + getCurCommunity + } from '../../api/community/communityApi.js' + + import { + setStorageSync + } from '../../utils/StorageUtil.js' + import mapping from '../../constant/MappingConstant.js' export default { data() { @@ -148,6 +156,8 @@ showLongModel: function() { this.vc.navigateTo({ url: '../login/login' + }, () => { + this.refreshPageLoginInfo(); }); }, ckeckUserInfo: function() { @@ -184,7 +194,7 @@ }); }, // 生活服务 - myServices: function(){ + myServices: function() { if (!this.ckeckUserInfo()) { this.vc.navigateTo({ url: '../showlogin/showlogin'