优化页面

This commit is contained in:
pengxiaolong
2025-06-11 22:16:44 +08:00
parent 3c2d7e5959
commit 931d867c09
806 changed files with 87462 additions and 331 deletions

View File

@@ -0,0 +1,131 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const components_VerifyLogin = require("../VerifyLogin.js");
if (!Math) {
NewAddedPk();
}
const NewAddedPk = () => "../../pages/NewAddedPk/NewAddedPk2.js";
const _sfc_main = {
__name: "tabBar",
props: {
tabIndex: Number
},
setup(__props) {
let showMiddleButton = common_vendor.ref(false);
let tabList = common_vendor.reactive([
{
iconPath: "https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Pk.png",
selectedIconPath: "https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/PKClick.png",
text: "PK",
pagePath: "/pages/Home/Home",
middleClass: ""
},
{
iconPath: "https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Forum.png",
selectedIconPath: "https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Forumclick.png",
text: "论坛",
pagePath: "/pages/Forum/Forum",
middleClass: ""
},
{
iconPath: "https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/jiahao.png",
selectedIconPath: "https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/jiahao.png",
text: "",
pagePath: "/pages/c/c",
middleClass: ""
},
{
iconPath: "https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Message.png",
selectedIconPath: "https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Messageclick.png",
text: "消息"
},
{
iconPath: "https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Mine.png",
selectedIconPath: "https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Mineclick.png",
text: "我的",
pagePath: "/pages/Mine/Mine",
middleClass: ""
}
]);
common_vendor.onMounted(() => {
setTabBar();
});
common_vendor.index.getSystemInfo({
success: function(res) {
common_vendor.index.__f__("log", "at components/tabBar/tabBar.vue:83", "机型", res.deviceType);
if (res.safeArea.top > 40) {
common_vendor.index.__f__("log", "at components/tabBar/tabBar.vue:85", "苹果的底部栏大小", res.safeArea.top);
}
}
});
function setTabBar() {
let tabLength = tabList.length;
if (tabLength % 2) {
showMiddleButton.value = true;
let middleIndex = Math.floor(tabLength / 2);
tabList[middleIndex].middleClass = "mid-button";
}
}
const createModule = common_vendor.ref();
function openPopupQuantity() {
createModule.value.open();
}
const disabledScroll = () => {
return false;
};
function handlePush(item, index) {
if (index === 3) {
components_VerifyLogin.VerifyLogin().then((res) => {
if (res) {
common_vendor.index.navigateTo({
url: "/TUIKit/components/TUIConversation/index",
animationType: "none"
});
}
});
} else if (index === 2) {
components_VerifyLogin.VerifyLogin().then((res) => {
if (res) {
openPopupQuantity();
return;
}
});
} else if (index === 4) {
components_VerifyLogin.VerifyLogin().then((res) => {
if (res) {
common_vendor.index.switchTab({
url: "/pages/Mine/Mine",
animationType: "none"
});
}
});
} else {
common_vendor.index.switchTab({
url: item.pagePath
});
}
}
return (_ctx, _cache) => {
return {
a: common_vendor.f(common_vendor.unref(tabList), (item, index, i0) => {
return {
a: __props.tabIndex == index ? item.selectedIconPath : item.iconPath,
b: common_vendor.t(item.text),
c: __props.tabIndex == index ? "#1DD2F9" : "#A7A3A3",
d: common_vendor.n("list-item flex flex-column flex-middle " + item.middleClass),
e: common_vendor.o$1(($event) => handlePush(item, index), index),
f: index
};
}),
b: common_vendor.n(common_vendor.unref(showMiddleButton) === true ? "tab-list-middle" : "tab-list-default"),
c: common_vendor.o$1(disabledScroll),
d: common_vendor.sr(createModule, "c497a889-0", {
"k": "createModule"
})
};
};
}
};
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-c497a889"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/components/tabBar/tabBar.js.map

View File

@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"new-added-pk": "../../pages/NewAddedPk/NewAddedPk"
}
}

View File

@@ -0,0 +1 @@
<view class="tab-block data-v-c497a889"><view class="{{['tab-list', 'flex', 'flex-center', 'data-v-c497a889', b]}}"><view wx:for="{{a}}" wx:for-item="item" wx:key="f" class="{{['data-v-c497a889', item.d]}}" bindtap="{{item.e}}"><view class="item-img-box data-v-c497a889"><image class="item-img data-v-c497a889" src="{{item.a}}"/></view><view class="item-text font-20 data-v-c497a889" style="{{'color:' + item.c}}">{{item.b}}</view></view></view><view class="data-v-c497a889" catchtouchmove="{{c}}"></view><new-added-pk class="createModule r data-v-c497a889" u-r="createModule" u-i="c497a889-0" bind:__l="__l"></new-added-pk></view>

View File

@@ -0,0 +1,114 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.flex.data-v-c497a889 {
display: flex;
flex-flow: row wrap;
}
.flex-center.data-v-c497a889 {
align-items: center;
justify-content: center;
}
.flex-column.data-v-c497a889 {
flex-direction: column;
align-items: center;
}
.flex-middle.data-v-c497a889 {
align-items: center;
}
.font-20.data-v-c497a889 {
font-size: 20rpx;
}
.tab-block.data-v-c497a889 {
position: relative;
position: fixed;
bottom: 0;
z-index: 999;
background-size: contain;
width: 100vw;
background-color: #ffffff;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
}
.tab-block .tab-list.data-v-c497a889 {
height: 100rpx;
padding: 0;
z-index: 0;
}
.tab-block .createModule.data-v-c497a889 {
position: fixed;
bottom: 0;
right: 0;
z-index: 998;
width: 100vw;
}
.tab-block .tab-list-default.data-v-c497a889 {
background-color: #ffffff;
border-top: 1px #dddddd solid;
}
.tab-block .tab-list-middle.data-v-c497a889 {
position: relative;
background-size: cover;
}
.tab-block .list-item.data-v-c497a889 {
flex: 1;
}
.tab-block .list-item .item-img-box.data-v-c497a889 {
width: 38rpx;
height: 38rpx;
margin-bottom: 9rpx;
position: relative;
}
.tab-block .list-item .item-img.data-v-c497a889 {
width: 38rpx;
height: 38rpx;
color: red;
}
.tab-block .mid-button.data-v-c497a889 {
position: relative;
}
.tab-block .mid-button .item-img-box.data-v-c497a889 {
width: 150rpx;
height: 150rpx;
margin-bottom: 9rpx;
position: absolute;
z-index: 10;
top: -104rpx;
}
.tab-block .mid-button .item-img.data-v-c497a889 {
width: 150rpx;
height: 150rpx;
}
.tab-block .mid-button .item-text.data-v-c497a889 {
font-size: 20rpx;
position: absolute;
z-index: 1002;
bottom: -40rpx;
color: #393a41;
}
.tab-block .tab-bar.data-v-c497a889 {
height: 30rpx;
background-color: #ffffff;
}