Commit 02262c8d by 赵雅纹

Merge branch 'dev_7.1.0' into fixbug-ZYW

parents 653f765b 9462e83a
...@@ -89,7 +89,7 @@ Component({ ...@@ -89,7 +89,7 @@ Component({
this.triggerEvent('getAuth', res); this.triggerEvent('getAuth', res);
}, },
handelToPage(event) { handelToPage(event) {
utilLink.currentLinkRouter(event) utilLink.currentLinkRouter(event, this)
} }
} }
}) })
...@@ -126,7 +126,7 @@ Component({ ...@@ -126,7 +126,7 @@ Component({
}) })
}, },
preview(event) { preview(event) {
utilLink.currentLinkRouter(event) utilLink.currentLinkRouter(event, this)
} }
} }
}) })
...@@ -94,10 +94,9 @@ Component({ ...@@ -94,10 +94,9 @@ Component({
imagewidth: imageSize.imageWidth, imagewidth: imageSize.imageWidth,
imageheight: imageSize.imageHeight imageheight: imageSize.imageHeight
}) })
console.log('-----', imageSize)
}, },
preview(event) { preview(event) {
utilLink.currentLinkRouter(event) utilLink.currentLinkRouter(event, this)
}, },
activeTocard(e) { activeTocard(e) {
if (e.detail) { if (e.detail) {
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
style="height:100%" style="height:100%"
> >
<image <image
class="pic-img hhh" class="pic-img"
style="width: {{100}}%;" style="width: {{100}}%;"
src="{{utils.formateUrl(item.imageUrl,baseImgUrl)}}" src="{{utils.formateUrl(item.imageUrl,baseImgUrl)}}"
data-appid="{{item.link.appid}}" data-appid="{{item.link.appid}}"
...@@ -29,13 +29,12 @@ ...@@ -29,13 +29,12 @@
bindload="imageLoad" bindload="imageLoad"
bindtap='preview' bindtap='preview'
mode="widthFix" mode="widthFix"
/> />
</button> </button>
<image <image
wx:if="{{currentHasUserInfo}}" wx:if="{{currentHasUserInfo}}"
class="pic-img yyyy" class="pic-img"
style="width: {{100}}%;" style="width: {{100}}%;"
src="{{utils.formateUrl(item.imageUrl,baseImgUrl)}}" src="{{utils.formateUrl(item.imageUrl,baseImgUrl)}}"
data-appid="{{item.link.appid}}" data-appid="{{item.link.appid}}"
...@@ -50,7 +49,7 @@ ...@@ -50,7 +49,7 @@
</view> </view>
<view wx:else> <view wx:else>
<image <image
class="pic-img ttt" class="pic-img"
style="width: {{100}}%;" style="width: {{100}}%;"
src="{{utils.formateUrl(item.imageUrl,baseImgUrl)}}" src="{{utils.formateUrl(item.imageUrl,baseImgUrl)}}"
data-appid="{{item.link.appid}}" data-appid="{{item.link.appid}}"
......
...@@ -31,31 +31,13 @@ wxService.page({ ...@@ -31,31 +31,13 @@ wxService.page({
pageBackgroundColor: 0, pageBackgroundColor: 0,
guidePageModalShow: false, guidePageModalShow: false,
currHomePageId: '', currHomePageId: '',
skuVOList:[] skuVOList: []
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
this.setData( this.initPage()
{
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)
let memberId = options.memberId; let memberId = options.memberId;
if (memberId) { if (memberId) {
...@@ -89,7 +71,7 @@ wxService.page({ ...@@ -89,7 +71,7 @@ wxService.page({
*/ */
onShow() { onShow() {
let tentacleInfo = wx.getStorageSync('TENTACLE_CONTENT'); let tentacleInfo = wx.getStorageSync('TENTACLE_CONTENT');
// 取会员卡号 // 取会员卡号
const baseUserInfo = wx.getStorageSync('_baseUserInfo') const baseUserInfo = wx.getStorageSync('_baseUserInfo')
const cardMember = wx.getStorageSync('_cardMember') const cardMember = wx.getStorageSync('_cardMember')
...@@ -186,14 +168,28 @@ wxService.page({ ...@@ -186,14 +168,28 @@ wxService.page({
}) })
}, },
// page 信息 // page 信息
initPage(pageId) { initPage() {
this.setData({ 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({ wx.showLoading({
title: '加载中' 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 => { wxService.post(`/merchant/modelPage/mainSetting/mall?brandId=${app.globalData.brandId}`).then(res => {
if (!res) return false if (!res) return false
const { result, data } = res.data const { result, data } = res.data
...@@ -259,7 +255,7 @@ wxService.page({ ...@@ -259,7 +255,7 @@ wxService.page({
wx.hideLoading() wx.hideLoading()
}) })
}, },
// 获取plus购买信息 // 获取plus购买信息
// getPlusPurchase() { // getPlusPurchase() {
// wxService.get(`/sale/premium/query`).then(res => { // wxService.get(`/sale/premium/query`).then(res => {
......
const wxService = require('./wxService') const wxService = require('./wxService')
const app = getApp() const app = getApp()
function currentLinkRouter(event) { function currentLinkRouter(event, _this) {
const ev = event.currentTarget.dataset; const ev = event.currentTarget.dataset;
let curItemType = ev.item let curItemType = ev.item
const userInfo = wx.getStorageSync('_baseUserInfo') const userInfo = wx.getStorageSync('_baseUserInfo')
...@@ -12,11 +12,10 @@ function currentLinkRouter(event) { ...@@ -12,11 +12,10 @@ function currentLinkRouter(event) {
if (curItemType.link.type == 1) { if (curItemType.link.type == 1) {
// 触发父组件更新页面 外部小程序 // 触发父组件更新页面 外部小程序
} else if (curItemType.link.type == 2) { } else if (curItemType.link.type == 2) {
// 触发父组件更新页面 // 触发父组件更新页面
wxService.nextTick(() => { wxService.nextTick(() => {
this.triggerEvent('updatePage', { pageId: currentClickType.url }) _this.triggerEvent('updatePage', { pageId: currentClickType.url })
}) })
} else if (curItemType.link.type == 3) { } 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