Compare commits

...

1 Commits

Author SHA1 Message Date
  congzc 23891067b1 1 1 year ago
2 changed files with 52 additions and 36 deletions
Split View
  1. +1
    -1
      README.md
  2. +51
    -35
      src/pages/chooseStyle/index.vue

+ 1
- 1
README.md View File

@@ -1,4 +1,4 @@
# Suimang-wxapp
# Suimang大屏

# setStorageSync 键名



+ 51
- 35
src/pages/chooseStyle/index.vue View File

@@ -10,10 +10,12 @@
:activeStyle="{ color: '#ff4f00', fontsize: '30rpx' }"
:inactiveStyle="{ color: '#fff', fontsize: '30rpx' }"
@click="chooseTab"
@change="changeTabCurrent"
:current="CurrentNum"
></u-tabs>
<view class="moreTabs">
<!-- <view class="moreIcon" @click="showPopup = true"> 更多 </view> -->
<view class="moreIcon" @click="showPopup = true"> 更多 </view>
<view class="moreIcon" @click="showPopup = true"> 更多筛选 </view>
</view>
</view>
<!-- 更多tab弹出层 -->
@@ -95,8 +97,8 @@ const sex = ref(2);
const sexList = ref([
{ name: "女", id: 2 },
{ name: "男", id: 1 },
{ name: "单人", id: 3 },
{ name: "多人", id: 4 },
// { name: "单人", id: 3 },
// { name: "多人", id: 4 },
]);
const sexList2 = ref([
{ name: "女", id: 2 },
@@ -104,49 +106,63 @@ const sexList2 = ref([
]);

// 类型
const mouldType = ref("");
const mouldType = ref(1);
const mouldTypeList = ref([
{ name: "单人", id: 1 },
{ name: "多人", id: 2 },
]);
// 点击tab
function chooseTab(item) {
if (item.id < 3) {
sex.value = item.id;
mouldType.value = "";
} else if (item.id == 3) {
mouldType.value = 1;
sex.value = "";
} else if (item.id == 4) {
mouldType.value = 2;
sex.value = "";
}
sex.value = item.id;
// if (item.id < 3) {
// sex.value = item.id;
// mouldType.value = "";
// } else if (item.id == 3) {
// mouldType.value = 1;
// sex.value = "";
// } else if (item.id == 4) {
// mouldType.value = 2;
// sex.value = "";
// }
}
const CurrentNum = ref(0);
function changeTabCurrent(tabItem) {
console.log(tabItem.index);
CurrentNum.value = tabItem.index;
}
// 更多里的tab 性别
function chooseSex(item) {
if (sex.value == item.id) {
if (mouldType.value == "") {
return;
} else {
sex.value = "";
}
} else {
sex.value = item.id;
mouldType.value = "";
if (item.id == 2) {
CurrentNum.value = 0;
}
if (item.id == 1) {
CurrentNum.value = 1;
}
sex.value = item.id;
// if (sex.value == item.id) {
// if (mouldType.value == "") {
// return;
// } else {
// sex.value = "";
// }
// } else {
// sex.value = item.id;
// mouldType.value = "";
// }
}
// 更多里的tab 类型
function chooseMouldType(item) {
if (mouldType.value == item.id) {
if (sex.value == "") {
return;
} else {
mouldType.value = "";
}
} else {
mouldType.value = item.id;
sex.value = "";
}
mouldType.value = item.id;
// if (mouldType.value == item.id) {
// if (sex.value == "") {
// return;
// } else {
// mouldType.value = "";
// }
// } else {
// mouldType.value = item.id;
// sex.value = "";
// }
}
//#endregion

@@ -325,9 +341,9 @@ onUnload(() => {
background: linear-gradient(90deg, transparent 20%, #333 100%);
// background-color: red;
.moreIcon {
margin-left: 50rpx;
margin-left: 30rpx;
margin-top: 15rpx;
width: 130rpx;
width: 150rpx;
height: 60rpx;
border-radius: 40rpx;
background-color: #ff4f00;


Loading…
Cancel
Save