Commit 5a03e7fe by luyt

fix:调整滚动时长,海报下载为jpg格式

1 parent 58704443
...@@ -281,6 +281,7 @@ Page({ ...@@ -281,6 +281,7 @@ Page({
}) })
let _this = this let _this = this
console.log('imgPath',imgPath)
wx.getImageInfo({ wx.getImageInfo({
src: imgPath, src: imgPath,
success: async respp => { success: async respp => {
...@@ -309,7 +310,8 @@ Page({ ...@@ -309,7 +310,8 @@ Page({
y: pradH, y: pradH,
width: imgW, width: imgW,
height: imgH, height: imgH,
url: `https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/longpic${actNum + 1}.png` url: `https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/longpic${actNum + 1}.jpg`
// url: `https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/longpic${actNum + 1}.webp`
}, },
{ {
// x: 245 * 2, // x: 245 * 2,
...@@ -353,6 +355,9 @@ Page({ ...@@ -353,6 +355,9 @@ Page({
} }
// _this.modelcloseFn(); // _this.modelcloseFn();
wx.hideLoading() wx.hideLoading()
},
fail:(err)=>{
console.log(err)
} }
}) })
}, },
...@@ -375,9 +380,10 @@ Page({ ...@@ -375,9 +380,10 @@ Page({
}) })
let _this = this let _this = this
wx.getImageInfo({ wx.getImageInfo({
src: `https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/longpic${actNum + 1}.png`, src: `https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/longpic${actNum + 1}.jpg`,
// src: `https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/longpic${actNum + 1}.png`,
success: async res => { success: async res => {
console.log('res: ', res) // console.log('res图片信息: ', res)
wx.hideLoading() wx.hideLoading()
wx.nextTick(() => { wx.nextTick(() => {
...@@ -386,6 +392,9 @@ Page({ ...@@ -386,6 +392,9 @@ Page({
imgPath: res.path imgPath: res.path
}) })
}) })
},
fail:(err) => {
console.log('err: ', err);
} }
}) })
}, },
......
...@@ -702,6 +702,20 @@ Page({ ...@@ -702,6 +702,20 @@ Page({
// console.log(userInfo) // console.log(userInfo)
!userInfo.isSuper && this.getSharePost(userInfo.subLoginUser.merchantId) !userInfo.isSuper && this.getSharePost(userInfo.subLoginUser.merchantId)
}, },
// 节流函数
throttle(fn, gaptime) {
if (gaptime == null || gaptime == undefined) {
gaptime = 200
}
let _lastTime = null
return function() {
let _nowTime = +new Date()
if (_nowTime - _lastTime > gaptime || !_lastTime) {
fn.apply(this, arguments)
_lastTime = _nowTime
}
}
},
onPageScroll: (function () { onPageScroll: (function () {
let timer = null let timer = null
return function (e) { return function (e) {
...@@ -711,7 +725,7 @@ Page({ ...@@ -711,7 +725,7 @@ Page({
timer = setTimeout(() => { timer = setTimeout(() => {
// console.log("滚动结束"); // console.log("滚动结束");
wx.$eventbus.emit('evt_page_scroll', { scrollTop: e.scrollTop }) wx.$eventbus.emit('evt_page_scroll', { scrollTop: e.scrollTop })
}, 500) }, 300)
} }
})(), })(),
// 上拉刷新 // 上拉刷新
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!