mirror of
https://gitee.com/java110/WechatOwnerService.git
synced 2026-02-23 21:36:38 +08:00
有坏吗
This commit is contained in:
parent
f412d880cf
commit
45c1cf93e3
@ -206,12 +206,11 @@ export function hasOwner(){
|
||||
let loginFlag = wx.getStorageSync(mapping.LOGIN_FLAG);
|
||||
let nowDate = new Date();
|
||||
//判断如果是APP
|
||||
|
||||
if (!loginFlag || loginFlag.expireTime < nowDate.getTime()) {
|
||||
return ;
|
||||
}
|
||||
let _ownerInfo = wx.getStorageSync(mapping.OWNER_INFO);
|
||||
if(_ownerInfo){
|
||||
if(!_ownerInfo){
|
||||
uni.showToast({
|
||||
icon:'none',
|
||||
title:'未查询到业主房产'
|
||||
@ -220,7 +219,6 @@ export function hasOwner(){
|
||||
}
|
||||
|
||||
let _memberId = _ownerInfo.memberId;
|
||||
|
||||
if(!_memberId){
|
||||
uni.showToast({
|
||||
icon:'none',
|
||||
@ -228,8 +226,7 @@ export function hasOwner(){
|
||||
})
|
||||
throw new Error('业主不存在');
|
||||
}
|
||||
|
||||
if(_memberId != '-1'){
|
||||
if(_memberId == '-1'){
|
||||
uni.showToast({
|
||||
icon:'none',
|
||||
title:'未查询到业主房产'
|
||||
|
||||
@ -36,6 +36,8 @@ import {getStorageSync,setStorageSync} from '../../utils/StorageUtil.js'
|
||||
|
||||
import {uuid} from '../../utils/SeqUtil.js'
|
||||
|
||||
import {getWAppId} from '../init/initApi.js'
|
||||
|
||||
const ACTION_NAVIGATE_TO = "navigateTo"; // 跳转
|
||||
const ACTION_REFRESH_TOKEN = "refreshToken";
|
||||
const ACTION_NAVIGATE_TO_PAGE = "navigateToPage";
|
||||
@ -75,23 +77,6 @@ export function getHcCode(_objData) {
|
||||
});
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 检查回话
|
||||
*/
|
||||
export function actionRefreshToken(that) {
|
||||
checkSession().then(function() {
|
||||
//这部分是 业主端回话有效的情况
|
||||
console.log('业主端回话有效');
|
||||
uni.navigateTo({
|
||||
url: '/pages/hcWebViewRefresh/hcWebViewRefresh?java110Id='+uuid()
|
||||
});
|
||||
}, function(error) { //回话过期
|
||||
console.log('回话已经过期');
|
||||
let _hasOwnerUrl = window.location.origin+'/#/pages/hcWebViewRefresh/hcWebViewRefresh?java110Id='+uuid();
|
||||
let _mallAuthUrl = conf.mallUrl+"/app/userAuth/mallUserRefreshToken?redirectUrl="+encodeURIComponent(_hasOwnerUrl)+"&errorUrl="+conf.mallUrl;
|
||||
wechatRefreshToken(_mallAuthUrl, '0', _hasOwnerUrl);
|
||||
});
|
||||
}
|
||||
|
||||
export function getCurrentPage() {
|
||||
let routes = getCurrentPages(); // 获取当前打开过的页面路由数组
|
||||
@ -205,8 +190,10 @@ export function reciveMessage(event, that) {
|
||||
});
|
||||
return;
|
||||
} else if (_data.action == ACTION_REFRESH_TOKEN) {
|
||||
//校验是否登录,如果没有登录跳转至温馨提示页面
|
||||
actionRefreshToken(that);
|
||||
//跳转登录
|
||||
uni.navigateTo({
|
||||
url:'/pages/showlogin/showlogin?wAppId='+getWAppId()
|
||||
})
|
||||
} else if (_data.action == ACTION_NAVIGATE_TO_PAGE) {
|
||||
//_data.url = encodeUrl(_data.url);
|
||||
window.location.href = _data.url;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user