细节帮助中心

version/0412
fanfan 11 months ago
parent 4e8ad1860e
commit c00826bc7c
  1. 37
      pages/news1/help.vue
  2. 6
      pages/user/vip/goods.vue

@ -61,15 +61,18 @@
that.itemList = res.data.list; that.itemList = res.data.list;
that.itemList.map(item => { that.itemList.map(item => {
if (item.child.length > 0) { if (item.child.length > 0) {
if (parseInt(item.child.length % 4) == 1) { if (parseInt(item.child.length % 4) == 1 && item.child.length < 3) {
item.child.push({}, {}, {}) item.child.push({}, {}, {})
} }
if (parseInt(item.child.length % 4) == 2) { if (parseInt(item.child.length % 4) == 2 && item.child.length < 3) {
item.child.push({}, {}) item.child.push({}, {})
} }
if (parseInt(item.child.length % 4) == 3) { if (parseInt(item.child.length % 4) == 3) {
item.child.push({}) item.child.push({})
} }
if (parseInt(item.child.length % 4) == 1 && item.child.length > 4) {
item.child.push({})
}
} }
item.childArr = [] item.childArr = []
item.childArr = item.child.slice(0, 9) item.childArr = item.child.slice(0, 9)
@ -111,6 +114,7 @@
color: #000000; color: #000000;
padding: 20upx 0; padding: 20upx 0;
font-weight: bold; font-weight: bold;
// border-bottom: 3upx solid #dfdbdb;
} }
.border { .border {
@ -135,6 +139,7 @@
align-items: center; align-items: center;
flex-direction: column; flex-direction: column;
position: relative; position: relative;
// border-bottom: 1px solid #dfdbdb;
.titleIcon { .titleIcon {
width: 50upx; width: 50upx;
@ -164,6 +169,7 @@
.mainItem { .mainItem {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
// align-items: center;
width: calc(100% - 90px); width: calc(100% - 90px);
margin: 20rpx 20rpx 20rpx 40rpx; margin: 20rpx 20rpx 20rpx 40rpx;
@ -173,6 +179,7 @@
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
text-align: center; text-align: center;
// padding: 24upx 16upx;
height: 90upx; height: 90upx;
line-height: 90upx; line-height: 90upx;
padding: 0 10upx; padding: 0 10upx;
@ -187,11 +194,37 @@
.itemText:nth-child(1) { .itemText:nth-child(1) {
border-top: 0; border-top: 0;
padding-right: 1px; padding-right: 1px;
// border-right: 1px solid #dfdbdb;
} }
.itemText:nth-child(2) { .itemText:nth-child(2) {
border-top: 0; border-top: 0;
// border-left: none;
} }
// .itemText:nth-last-child(odd):last-of-type {
// border-bottom: none;
// border-right: 1px solid #dfdbdb;
// }
// .itemText:nth-last-child(2){
// border-bottom: none;
// }
// :first-child {
// border-right: 1px solid #dfdbdb;
// }
// :nth-child(2n) {
// border-left: 1px solid #dfdbdb;
// }
// :last-child {
// border-left: 1px solid #dfdbdb;
// }
// :nth-child(3) {
// border-right: 1px solid #dfdbdb;
// }
} }
} }
} }

@ -97,7 +97,7 @@
.then(result => { .then(result => {
app.categoryList = result.data.list; app.categoryList = result.data.list;
app.categoryChildren = result.data.list[0].children; app.categoryChildren = result.data.list[0].children;
this.getBrandList(result.data.list[0].children.category_id) this.getBrandList(result.data.list[0].category_id)
}) })
.finally(() => app.isLoading = false) .finally(() => app.isLoading = false)
}, },
@ -105,7 +105,7 @@
getBrandList(categoryId) { getBrandList(categoryId) {
const app = this; const app = this;
let pamars = { let pamars = {
store_id: 10001, // store_id: 10001,
page: 1, page: 1,
is_brand: 1, is_brand: 1,
is_new: 0, is_new: 0,
@ -128,10 +128,12 @@
.finally(() => app.isLoading = false) .finally(() => app.isLoading = false)
}, },
tabItem(index, item) { tabItem(index, item) {
console.log(item,'1')
this.tabIndex = index; this.tabIndex = index;
this.getBrandList(item.category_id) this.getBrandList(item.category_id)
}, },
tabItem1(item, index) { tabItem1(item, index) {
console.log(item,'2')
this.tabIndex1 = index; this.tabIndex1 = index;
let app = this; let app = this;
app.categoryChildren = []; app.categoryChildren = [];

Loading…
Cancel
Save