真机调试,pages初始页调整和tab-bar部分页面注释

This commit is contained in:
minimaxagent1 2025-07-30 11:51:04 +08:00
parent 19bf72e848
commit a272a73b3a
2 changed files with 131 additions and 129 deletions

View File

@ -1,131 +1,131 @@
<template> <!--<template>-->
<view class="cont"> <!-- <view class="cont">-->
<div class="tab" @tap.stop="changeTabbar(0)"> <!-- <div class="tab" @tap.stop="changeTabbar(0)">-->
<image src="@/static/tabbar/home.png" mode="" v-show="indexs!=0"></image> <!-- <image src="@/static/tabbar/home.png" mode="" v-show="indexs!=0"></image>-->
<image src="@/static/tabbar/home-active.png" mode="" v-show="indexs==0"></image> <!-- <image src="@/static/tabbar/home-active.png" mode="" v-show="indexs==0"></image>-->
<div class="txt" :class="indexs==0?'act1':''">首页</div> <!-- <div class="txt" :class="indexs==0?'act1':''">首页</div>-->
</div> <!-- </div>-->
<div class="tab" @tap.stop="changeTabbar(1)"> <!-- <div class="tab" @tap.stop="changeTabbar(1)">-->
<image src="@/static/tabbar/tj.png" mode="" v-show="indexs!=1" style="width: 36rpx;height: 36rpx;"></image> <!-- <image src="@/static/tabbar/tj.png" mode="" v-show="indexs!=1" style="width: 36rpx;height: 36rpx;"></image>-->
<image src="@/static/tabbar/tj-active.png" mode="" v-show="indexs==1" style="width: 36rpx;height: 36rpx;"></image> <!-- <image src="@/static/tabbar/tj-active.png" mode="" v-show="indexs==1" style="width: 36rpx;height: 36rpx;"></image>-->
<div class="txt" :class="indexs==1?'act1':''">统计</div> <!-- <div class="txt" :class="indexs==1?'act1':''">统计</div>-->
</div> <!-- </div>-->
<div class="tab" @tap.stop="changeTabbar(2)"> <!-- <div class="tab" @tap.stop="changeTabbar(2)">-->
<image src="@/static/tabbar/my.png" mode="" v-show="indexs!=2" style="width: 28rpx;height: 36.4rpx;"></image> <!-- <image src="@/static/tabbar/my.png" mode="" v-show="indexs!=2" style="width: 28rpx;height: 36.4rpx;"></image>-->
<image src="@/static/tabbar/my-active.png" mode="" v-show="indexs==2" style="width: 28rpx;height: 36.4rpx;"></image> <!-- <image src="@/static/tabbar/my-active.png" mode="" v-show="indexs==2" style="width: 28rpx;height: 36.4rpx;"></image>-->
<div class="txt" :class="indexs==2?'act1':''">我的</div> <!-- <div class="txt" :class="indexs==2?'act1':''">我的</div>-->
</div> <!-- </div>-->
<!-- <view class="u-page"> <!-- &lt;!&ndash; <view class="u-page">-->
<!-- -->
</view> --> <!-- </view> &ndash;&gt;-->
<!-- 与包裹页面所有内容的元素u-page同级且在它的下方 --> <!-- &lt;!&ndash; 与包裹页面所有内容的元素u-page同级且在它的下方 &ndash;&gt;-->
<!-- <u-tabbar v-model="current" :list="list" icon-size='40rpx' active-color='#3996fd' inactive-color="#c8c7cb"></u-tabbar> --> <!-- &lt;!&ndash; <u-tabbar v-model="current" :list="list" icon-size='40rpx' active-color='#3996fd' inactive-color="#c8c7cb"></u-tabbar> &ndash;&gt;-->
</view> <!-- </view>-->
</template> <!--</template>-->
<script> <!--<script>-->
export default { <!-- export default {-->
props: { <!-- props: {-->
indexs: [Number, String], //id <!-- indexs: [Number, String], //id-->
}, <!-- },-->
data() { <!-- data() {-->
return { <!-- return {-->
currentTabbarIndex: 0, <!-- currentTabbarIndex: 0,-->
// <!-- // -->
tabberPageLoadFlag: [], <!-- tabberPageLoadFlag: [],-->
ispop: false, <!-- ispop: false,-->
} <!-- }-->
}, <!-- },-->
mounted() { <!-- mounted() {-->
this.currentTabbarIndex = this.indexs <!-- this.currentTabbarIndex = this.indexs-->
// const index = Number(this.indexs || 0) <!-- // const index = Number(this.indexs || 0)-->
// // tabbar <!-- // // tabbar-->
// for (let i = 0; i < 5; i++) { <!-- // for (let i = 0; i < 5; i++) {-->
// this.tabberPageLoadFlag.push(i === index) <!-- // this.tabberPageLoadFlag.push(i === index)-->
// } <!-- // }-->
// this.changeTabbar(index) <!-- // this.changeTabbar(index)-->
}, <!-- },-->
methods:{ <!-- methods:{-->
changeTabbar(index) { <!-- changeTabbar(index) {-->
<!-- -->
if (this.currentTabbarIndex === index) return <!-- if (this.currentTabbarIndex === index) return-->
// this._switchTabbarPage(index) <!-- // this._switchTabbarPage(index)-->
<!-- -->
if(index==0){ <!-- if(index==0){-->
uni.switchTab({ <!-- uni.switchTab({-->
url:'/pages/index/index', <!-- url:'/pages/index/index',-->
routeType: 'wx://modal', <!-- routeType: 'wx://modal',-->
success() { <!-- success() {-->
this.currentTabbarIndex = index <!-- this.currentTabbarIndex = index-->
} <!-- }-->
}) <!-- })-->
console.log('点击了',index); <!-- console.log('点击了',index);-->
}else if(index==1){ <!-- }else if(index==1){-->
uni.switchTab({ <!-- uni.switchTab({-->
url:'/pages/tj', <!-- url:'/pages/tj',-->
routeType: 'wx://modal', <!-- routeType: 'wx://modal',-->
success() { <!-- success() {-->
this.currentTabbarIndex = index <!-- this.currentTabbarIndex = index-->
} <!-- }-->
}) <!-- })-->
}else if(index==2){ <!-- }else if(index==2){-->
uni.switchTab({ <!-- uni.switchTab({-->
url:'/pages/my', <!-- url:'/pages/my',-->
routeType: 'wx://modal', <!-- routeType: 'wx://modal',-->
success() { <!-- success() {-->
this.currentTabbarIndex = index <!-- this.currentTabbarIndex = index-->
} <!-- }-->
}) <!-- })-->
} <!-- }-->
}, <!-- },-->
} <!-- }-->
} <!-- }-->
</script> <!--</script>-->
<style lang="scss" scoped> <!--<style lang="scss" scoped>-->
/deep/.u-tabbar__content__item__button { <!-- /deep/.u-tabbar__content__item__button {-->
top: 20rpx !important; <!-- top: 20rpx !important;-->
} <!-- }-->
/deep/.u-tabbar { <!-- /deep/.u-tabbar {-->
.u-tabbar__content__item:nth-child(2) { <!-- .u-tabbar__content__item:nth-child(2) {-->
.u-tabbar__content__item__button { <!-- .u-tabbar__content__item__button {-->
width: 32rpx !important; <!-- width: 32rpx !important;-->
} <!-- }-->
} <!-- }-->
} <!-- }-->
.cont { <!-- .cont {-->
position: fixed; <!-- position: fixed;-->
left: 60rpx; <!-- left: 60rpx;-->
bottom: 78rpx; <!-- bottom: 78rpx;-->
width: 632rpx; <!-- width: 632rpx;-->
height: 128rpx; <!-- height: 128rpx;-->
background: #FFFFFF; <!-- background: #FFFFFF;-->
box-shadow: 0rpx 16rpx 40rpx 0rpx rgba(53, 140, 255, 0.1); <!-- box-shadow: 0rpx 16rpx 40rpx 0rpx rgba(53, 140, 255, 0.1);-->
border-radius: 60rpx; <!-- border-radius: 60rpx;-->
display: flex; <!-- display: flex;-->
align-items: center; <!-- align-items: center;-->
justify-content: space-around; <!-- justify-content: space-around;-->
.tab{ <!-- .tab{-->
width: 44rpx; <!-- width: 44rpx;-->
display: flex; <!-- display: flex;-->
flex-wrap: wrap; <!-- flex-wrap: wrap;-->
justify-content: center; <!-- justify-content: center;-->
image{ <!-- image{-->
width: 30rpx; <!-- width: 30rpx;-->
height: 30rpx; <!-- height: 30rpx;-->
} <!-- }-->
.txt{ <!-- .txt{-->
margin-top: 10rpx; <!-- margin-top: 10rpx;-->
font-size: 20rpx; <!-- font-size: 20rpx;-->
font-family: HarmonyOS Sans SC, HarmonyOS Sans SC; <!-- font-family: HarmonyOS Sans SC, HarmonyOS Sans SC;-->
font-weight: 400; <!-- font-weight: 400;-->
color: #95989D; <!-- color: #95989D;-->
} <!-- }-->
.act1{ <!-- .act1{-->
color: #8883F0; <!-- color: #8883F0;-->
} <!-- }-->
} <!-- }-->
} <!-- }-->
</style> <!--</style>-->

View File

@ -3,8 +3,10 @@
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue" "^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
}, },
"lazyCodeLoading": "requiredComponents", "lazyCodeLoading": "requiredComponents",
"entryPagePath": "pages/login/index", //
"pages": [{ "pages": [{
"path": "pages/nearbystores/index", "path": "pages/nearbystores/index",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
@ -20,7 +22,7 @@
"navigationStyle": "custom" "navigationStyle": "custom"
} }
},{ },{
"path": "pages/login/login", "path": "pages/nearbystores/index",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,