Skip to content

Commit

Permalink
商品详情界面点击tab会跳到下一个tab EastWorld#278
Browse files Browse the repository at this point in the history
  • Loading branch information
gooking committed Feb 21, 2022
1 parent cf745ea commit 35072e8
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 6 deletions.
4 changes: 2 additions & 2 deletions config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
version: '12.12.0',
note: '快递拆分包裹后显示所有的快递单信息', // 这个为版本描述,无需修改
version: '12.12.1',
note: '商品详情界面点击tab会跳到下一个tab #278', // 这个为版本描述,无需修改
subDomain: 'tz', // liu123 此处改成你自己的专属域名。什么是专属域名?请看教程 https://www.it120.cc/help/qr6l4m.html
merchantId: 951, // 商户ID,可在后台工厂设置-->商户信息查看
sdkAppID: 1400450467, // 腾讯实时音视频应用编号,请看教程 https://www.it120.cc/help/nxoqsl.html
Expand Down
11 changes: 10 additions & 1 deletion packageCps/pages/goods-details/cps-jd.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ Page({
shopType: "addShopCar", //购物类型,加入购物车或立即购买,默认为加入购物车
},
bindscroll(e) {
if (this.data.tabclicked) {
return
}
//计算页面 轮播图、详情、评价(砍价)view 高度
this.getTopHeightFunction()
var tabsHeight = this.data.tabsHeight //顶部距离(tabs高度)
Expand Down Expand Up @@ -706,8 +709,14 @@ Page({
onTabsChange(e) {
var index = e.detail.index
this.setData({
toView: this.data.tabs[index].view_id
toView: this.data.tabs[index].view_id,
tabclicked: true
})
setTimeout(() => {
this.setData({
tabclicked: false
})
}, 1000);
},
backToHome() {
wx.switchTab({
Expand Down
11 changes: 10 additions & 1 deletion pages/goods-details/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ Page({
shopType: "addShopCar", //购物类型,加入购物车或立即购买,默认为加入购物车
},
bindscroll(e) {
if (this.data.tabclicked) {
return
}
//计算页面 轮播图、详情、评价(砍价)view 高度
this.getTopHeightFunction()
var tabsHeight = this.data.tabsHeight //顶部距离(tabs高度)
Expand Down Expand Up @@ -1020,8 +1023,14 @@ Page({
onTabsChange(e) {
var index = e.detail.index
this.setData({
toView: this.data.tabs[index].view_id
toView: this.data.tabs[index].view_id,
tabclicked: true
})
setTimeout(() => {
this.setData({
tabclicked: false
})
}, 1000);
},
backToHome() {
wx.switchTab({
Expand Down
11 changes: 10 additions & 1 deletion pages/goods-details/vop.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ Page({
shopType: "addShopCar", //购物类型,加入购物车或立即购买,默认为加入购物车
},
bindscroll(e) {
if (this.data.tabclicked) {
return
}
//计算页面 轮播图、详情、评价(砍价)view 高度
this.getTopHeightFunction()
var tabsHeight = this.data.tabsHeight //顶部距离(tabs高度)
Expand Down Expand Up @@ -818,8 +821,14 @@ Page({
onTabsChange(e) {
var index = e.detail.index
this.setData({
toView: this.data.tabs[index].view_id
toView: this.data.tabs[index].view_id,
tabclicked: true
})
setTimeout(() => {
this.setData({
tabclicked: false
})
}, 1000);
},
backToHome() {
wx.switchTab({
Expand Down
3 changes: 2 additions & 1 deletion project.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
"disableUseStrict": false,
"minifyWXML": true,
"showES6CompileOption": false,
"useCompilerPlugins": false
"useCompilerPlugins": false,
"ignoreUploadUnusedFiles": true
},
"compileType": "miniprogram",
"libVersion": "2.20.0",
Expand Down

0 comments on commit 35072e8

Please sign in to comment.