Commit 02262c8d by 赵雅纹

Merge branch 'dev_7.1.0' into fixbug-ZYW

parents 653f765b 9462e83a
......@@ -89,7 +89,7 @@ Component({
this.triggerEvent('getAuth', res);
},
handelToPage(event) {
utilLink.currentLinkRouter(event)
utilLink.currentLinkRouter(event, this)
}
}
})
......@@ -126,7 +126,7 @@ Component({
})
},
preview(event) {
utilLink.currentLinkRouter(event)
utilLink.currentLinkRouter(event, this)
}
}
})
......@@ -94,10 +94,9 @@ Component({
imagewidth: imageSize.imageWidth,
imageheight: imageSize.imageHeight
})
console.log('-----', imageSize)
},
preview(event) {
utilLink.currentLinkRouter(event)
utilLink.currentLinkRouter(event, this)
},
activeTocard(e) {
if (e.detail) {
......
......@@ -19,7 +19,7 @@
style="height:100%"
>
<image
class="pic-img hhh"
class="pic-img"
style="width: {{100}}%;"
src="{{utils.formateUrl(item.imageUrl,baseImgUrl)}}"
data-appid="{{item.link.appid}}"
......@@ -29,13 +29,12 @@
bindload="imageLoad"
bindtap='preview'
mode="widthFix"
/>
</button>
<image
wx:if="{{currentHasUserInfo}}"
class="pic-img yyyy"
class="pic-img"
style="width: {{100}}%;"
src="{{utils.formateUrl(item.imageUrl,baseImgUrl)}}"
data-appid="{{item.link.appid}}"
......@@ -50,7 +49,7 @@
</view>
<view wx:else>
<image
class="pic-img ttt"
class="pic-img"
style="width: {{100}}%;"
src="{{utils.formateUrl(item.imageUrl,baseImgUrl)}}"
data-appid="{{item.link.appid}}"
......
......@@ -31,31 +31,13 @@ wxService.page({
pageBackgroundColor: 0,
guidePageModalShow: false,
currHomePageId: '',
skuVOList:[]
skuVOList: []
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.setData(
{
pages: [],
groupLoadState: 'complete', // 活动分组加载标志
homeApiLoading: true,
render: null, // 渲染页面数据对象(安全渲染)
isLastPage: false, // 页面段落加载完成
renderPageOver: false, // 渲染页面结束
// isAuthorization: true,
outoHeigth: 500,
},
() => {
// this.loadMore()
}
)
handlerDataOnPage = new utils.HandlerDataOnPage()
renderPage = require('../../utils/renderPage').getRenderPage()
handlerDataOnPage.init(this, 'pages')
this.initPage(this.data.pageId)
this.initPage()
let memberId = options.memberId;
if (memberId) {
......@@ -186,14 +168,28 @@ wxService.page({
})
},
// page 信息
initPage(pageId) {
initPage() {
this.setData({
products: []
pages: [],
products: [],
groupLoadState: 'complete', // 活动分组加载标志
homeApiLoading: true,
render: null, // 渲染页面数据对象(安全渲染)
isLastPage: false, // 页面段落加载完成
renderPageOver: false, // 渲染页面结束
// isAuthorization: true,
outoHeigth: 500,
})
handlerDataOnPage = new utils.HandlerDataOnPage()
renderPage = require('../../utils/renderPage').getRenderPage()
handlerDataOnPage.init(this, 'pages')
this.initHomePage()
},
initHomePage() {
wx.showLoading({
title: '加载中'
})
// wxService.post(`/merchant/modelPage/getDetailById?pageId=${pageId}&brandId=${app.globalData.brandId}`).then(res => {
wxService.post(`/merchant/modelPage/mainSetting/mall?brandId=${app.globalData.brandId}`).then(res => {
if (!res) return false
const { result, data } = res.data
......
const wxService = require('./wxService')
const app = getApp()
function currentLinkRouter(event) {
function currentLinkRouter(event, _this) {
const ev = event.currentTarget.dataset;
let curItemType = ev.item
const userInfo = wx.getStorageSync('_baseUserInfo')
......@@ -12,11 +12,10 @@ function currentLinkRouter(event) {
if (curItemType.link.type == 1) {
// 触发父组件更新页面 外部小程序
} else if (curItemType.link.type == 2) {
// 触发父组件更新页面
wxService.nextTick(() => {
this.triggerEvent('updatePage', { pageId: currentClickType.url })
_this.triggerEvent('updatePage', { pageId: currentClickType.url })
})
} else if (curItemType.link.type == 3) {
// 预览
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment