mirror of
https://gitee.com/java110/WechatOwnerService.git
synced 2026-06-11 06:07:24 +08:00
优化代码
This commit is contained in:
parent
abf54b5a9a
commit
8863129d0e
@ -24,7 +24,7 @@
|
|||||||
},
|
},
|
||||||
// 高度,单位upx,默认180upx
|
// 高度,单位upx,默认180upx
|
||||||
height: {
|
height: {
|
||||||
default: 160
|
default: 140
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
|||||||
@ -25,7 +25,7 @@ import {getCurCommunity,recoveryCommunityInfo} from '../api/community/communityA
|
|||||||
// 页面初始化相关
|
// 页面初始化相关
|
||||||
import {onLoad,getWAppId} from '../api/init/initApi.js'
|
import {onLoad,getWAppId} from '../api/init/initApi.js'
|
||||||
|
|
||||||
import {navigateTo,navigateBack} from './vcRoute.js'
|
import {navigateTo,navigateBack,navigateToMall} from './vcRoute.js'
|
||||||
|
|
||||||
import {isEmpty} from '../utils/StringUtil.js'
|
import {isEmpty} from '../utils/StringUtil.js'
|
||||||
|
|
||||||
|
|||||||
@ -66,13 +66,13 @@ export function navigateTo(_param, callback = () => {}) {
|
|||||||
let noLoginFlag = false;
|
let noLoginFlag = false;
|
||||||
url.NEED_NOT_LOGIN_PAGE.forEach(item => {
|
url.NEED_NOT_LOGIN_PAGE.forEach(item => {
|
||||||
if (item == _tempUrl) {
|
if (item == _tempUrl) {
|
||||||
console.log('item=>',item,_tempUrl)
|
console.log('item=>', item, _tempUrl)
|
||||||
uni.navigateTo(_param);
|
uni.navigateTo(_param);
|
||||||
noLoginFlag = true;
|
noLoginFlag = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if(noLoginFlag){
|
if (noLoginFlag) {
|
||||||
return ;
|
return;
|
||||||
}
|
}
|
||||||
debug('vcRoute', 'navigateTo', _param);
|
debug('vcRoute', 'navigateTo', _param);
|
||||||
//校验是否登录,如果没有登录跳转至温馨提示页面
|
//校验是否登录,如果没有登录跳转至温馨提示页面
|
||||||
@ -105,6 +105,19 @@ export function navigateTo(_param, callback = () => {}) {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 跳转功能封装
|
||||||
|
* @param {Object} _param 跳转入参
|
||||||
|
*/
|
||||||
|
export function navigateToMall(_param) {
|
||||||
|
//参数中刷入wAppId
|
||||||
|
let _url = _param.url;
|
||||||
|
uni.setStorageSync(mapping.HC_MALL_CUR_URL,_url)
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/hcWebView/hcWebView?wAppId=' + getWAppId()
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 返回上层页面
|
* 返回上层页面
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -93,9 +93,9 @@
|
|||||||
selectType(index) {
|
selectType(index) {
|
||||||
let shopTypeId = this.navList[index].shopTypeId;
|
let shopTypeId = this.navList[index].shopTypeId;
|
||||||
this.shopTypeId = shopTypeId;
|
this.shopTypeId = shopTypeId;
|
||||||
this.vc.navigateTo({
|
this.vc.navigateToMall({
|
||||||
url: '/pages/market/market?typeId=' + shopTypeId
|
url: '/pages/market/market?typeId=' + shopTypeId
|
||||||
}, true)
|
})
|
||||||
},
|
},
|
||||||
_getCategoryList() {
|
_getCategoryList() {
|
||||||
let _that = this
|
let _that = this
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user