| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154 |
- <template>
- <view class="container">
- <view class="navigation-bar">燃脂功能训练帮手</view>
- <view class="block">
- <view class="item" style="background-color: rgb(255,61,104);" @click="onClick(0, $event)">基础代谢率</view>
- <view class="item" style="background-color: rgb(250,157,153);" @click="onClick(1, $event)">每天消耗总热量</view>
- </view>
- <view class="block">
- <view class="item" style="background-color: rgb(250,204,177);" @click="onClick(2, $event)">有氧运动心律</view>
- <view class="item" style="background-color: rgb(201,199,171);" @click="onClick(3, $event)">体脂率</view>
- </view>
- <!-- <view class="block">
- <view class="item" style="background-color: rgb(132,175,155);" @click="onClick(4, $event)">E</view>
- <view class="item" style="background-color: rgb(46,32,52);" @click="onClick(5, $event)">F</view>
- </view> -->
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- // block-color:
- }
- },
- onLoad() {
-
- },
- methods: {
- onClick: function(id,e) {
- // console.log(id); // 1
- // console.log(e); // 事件对象
-
- switch (id){
- case 0:
- {
- uni.navigateTo({
- url: "/pages/basalMetabolism/basalMetabolism",
- });
- }
- break;
- case 1:
- {
- uni.navigateTo({
- url: "/pages/dayCalorie/dayCalorie",
- });
- }
- break;
- case 2:
- {
- uni.navigateTo({
- url: "/pages/heartRhythms/heartRhythms",
- });
- }
- break;
- case 3:
- {
- uni.navigateTo({
- url: "/pages/bodyFatRatio/bodyFatRatio",
- });
- }
- break;
-
- default:
- break;
- }
- },
- }
- }
- </script>
- <style lang="scss">
- .container {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
-
- height: 100%;
- width:100%;
-
- // 测试
- // border: 1px solid rgb(255,0,0);
- // box-shadow: 3px 0px 6px 0px rgba(0, 0, 0, 1);
- // border-bottom: 1px solid #DDDDDD;
- }
-
- .navigation-bar
- {
- display: flex;
- align-items: center;
- justify-content: center;
-
- width:100%;
- height: 15%;
-
- font-weight: 700;
- color: white;
-
- background-color: rgb(115,164,164);
- }
-
- .block{
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content: center;
-
- width:100%;
- height: 100%;
-
- // 测试
- // margin: 10rpx;
- // border: 3px solid rgb(144,238,144);
- }
- .item{
- display: flex;
- align-items: center;
- justify-content: center;
-
- height: 100%;
- width: 100%;
- color: white;
- // 测试
- // margin: 10rpx;
- // border: 1px solid rgb(0,0,255);
- }
-
- /* 解决⼩程序和app滚动条的问题 */
- /* #ifdef MP-WEIXIN || APP-PLUS */
- ::-webkit-scrollbar {
- display: none;
- width: 0 !important;
- height: 0 !important;
- -webkit-appearance: none;
- background: transparent;
- color: transparent;
- }
- /* #endif */
- /* 解决H5 的问题 */
- /* #ifdef H5 */
- uni-scroll-view .uni-scroll-view::-webkit-scrollbar {
- /* 隐藏滚动条,但依旧具备可以滚动的功能 */
- display: none;
- width: 0 !important;
- height: 0 !important;
- -webkit-appearance: none;
- background: transparent;
- color: transparent;
- }
- /* #endif */
- </style>
|