From 8863129d0ee574265a4d2a7c7d9ff16b11d32e16 Mon Sep 17 00:00:00 2001 From: java110 <928255095@qq.com> Date: Tue, 30 Nov 2021 19:54:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/vc-ads/vc-ads.vue | 2 +- core/vcFramework.js | 2 +- core/vcRoute.js | 19 ++++++++++++++++--- pages/mall/mall.vue | 4 ++-- 4 files changed, 20 insertions(+), 7 deletions(-) diff --git a/components/vc-ads/vc-ads.vue b/components/vc-ads/vc-ads.vue index 2cf1549..9d057db 100644 --- a/components/vc-ads/vc-ads.vue +++ b/components/vc-ads/vc-ads.vue @@ -24,7 +24,7 @@ }, // 高度,单位upx,默认180upx height: { - default: 160 + default: 140 } }, data() { diff --git a/core/vcFramework.js b/core/vcFramework.js index d06b979..c38ee7f 100755 --- a/core/vcFramework.js +++ b/core/vcFramework.js @@ -25,7 +25,7 @@ import {getCurCommunity,recoveryCommunityInfo} from '../api/community/communityA // 页面初始化相关 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' diff --git a/core/vcRoute.js b/core/vcRoute.js index 6451d02..5baec34 100755 --- a/core/vcRoute.js +++ b/core/vcRoute.js @@ -66,13 +66,13 @@ export function navigateTo(_param, callback = () => {}) { let noLoginFlag = false; url.NEED_NOT_LOGIN_PAGE.forEach(item => { if (item == _tempUrl) { - console.log('item=>',item,_tempUrl) + console.log('item=>', item, _tempUrl) uni.navigateTo(_param); noLoginFlag = true; } }); - if(noLoginFlag){ - return ; + if (noLoginFlag) { + return; } 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() + }); +}; + /** * 返回上层页面 */ diff --git a/pages/mall/mall.vue b/pages/mall/mall.vue index 46f4535..b20e165 100644 --- a/pages/mall/mall.vue +++ b/pages/mall/mall.vue @@ -93,9 +93,9 @@ selectType(index) { let shopTypeId = this.navList[index].shopTypeId; this.shopTypeId = shopTypeId; - this.vc.navigateTo({ + this.vc.navigateToMall({ url: '/pages/market/market?typeId=' + shopTypeId - }, true) + }) }, _getCategoryList() { let _that = this