【类 型】:feat

【原  因】:主页点击 ”商品购买按钮“ 跳转页面时候跳转到 指定的'shop'标签的导航的高度位置
【过  程】:
【影  响】:

# 类型 包含:
# feat:新功能(feature)
# fix:修补bug
# docs:文档(documentation)
# style: 格式(不影响代码运行的变动)
# refactor:重构(即不是新增功能,也不是修改bug的代码变动)
# test:增加测试
# chore:构建过程或辅助工具的变动
This commit is contained in:
szdot 2025-05-12 03:02:58 +08:00
parent 1cd4d15bac
commit 754963fe17
2 changed files with 15 additions and 1 deletions

View File

@ -33,7 +33,7 @@
<view class="flex mse" style="margin-top: 30rpx;">
<mainBut url="/pages/shop/list" bg="#D43030" imgSrc="/static/icons/ordernow.svg" butBt="开始点餐"
butSt="Order Now" />
<mainBut url="/pages/shop/list" bg="#FF8D1A" imgSrc="/static/icons/buggoods.svg" butBt="购买商品"
<mainBut url="/pages/shop/list?tag=shop" bg="#FF8D1A" imgSrc="/static/icons/buggoods.svg" butBt="购买商品"
butSt="Buy Goods" />
<!-- <mainBut bg="#FFC300" imgSrc="/static/icons/franchise.svg" butBt="项目介绍" butSt="Introduction" /> -->
</view>

View File

@ -97,8 +97,22 @@
scrollingTiemout: null, //timeout
}
},
onLoad(options) {
//getshop
if (options.tag === 'shop') {
this.$nextTick(() => {
setTimeout(() => {
const index = this.menuList.findIndex(item => item.tag === 'shop')
if (index !== -1) {
this.swichMenu(index)
}
}, 300) // 300msmenuList
})
}
},
onReady() {
this.getMenuItemTop()
//this.swichMenu(this.menuList.length - 1) //
},
onShow() {
// tabber