mirror of
https://gitee.com/java110/WechatOwnerService.git
synced 2026-02-24 05:46:04 +08:00
优化代码
This commit is contained in:
parent
9715b2a317
commit
6ec55159da
@ -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) {
|
||||
|
||||
@ -11,7 +11,7 @@ class AppConstant {
|
||||
* 应用信息,主要是用来和后端服务交互时的时候用
|
||||
*/
|
||||
// #ifdef MP-WEIXIN
|
||||
static appId = "992020061452450002";
|
||||
static appId = "992019111758490006";
|
||||
static appSecurity = "";
|
||||
// #endif
|
||||
|
||||
|
||||
@ -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'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user