fanfan 10 months ago
commit 65f487ba89
  1. 20
      pages/activity/newsshop.vue
  2. 9
      pages/category/index.vue
  3. 2
      pages/index/index.vue

@ -2,7 +2,10 @@
<view class="newsshop" :style="{backgroundImage:'url('+shopItem.index_icon+')'}">
<view class="newsshop-navbar">
<u-navbar :title="shopItem.title" back-icon-color="#fff" :border-bottom="false" title-color="#fff"
:background="background"></u-navbar>
:background="{
background: 'url('+shopItem.index_icon+') center top no-repeat',
backgroundSize: '100% auto',
}"></u-navbar>
</view>
<view class="newsshop-hd">
</view>
@ -31,7 +34,7 @@
</view>
</view>
</view>
<u-empty text="暂无活动数据显示哦~" v-else mode="list"></u-empty>
<u-empty text="暂无活动数据显示哦~" v-if="isShow" mode="list"></u-empty>
</view>
</template>
@ -44,6 +47,10 @@
shopItem: '',
shopList: [],
type: 2,
isShow: false,
background: {
},
}
},
onLoad(op) {
@ -97,6 +104,7 @@
} else {
this.shopList = []
}
this.isShow = this.shopList.length == 0?true:false
})
.finally()
},
@ -105,9 +113,9 @@
</script>
<style lang="scss" scoped>
::v-deep .u-navbar-fixed {
background: none !important;
}
// ::v-deep .u-navbar-fixed {
// background: none !important;
// }
::v-deep .u-empty {
padding: 150rpx 0;
}
@ -116,7 +124,7 @@
overflow: hidden;
min-height: 100vh;
background-size: 100% auto;
background-repeat: no-repeat;
&-hd {
height: 380rpx;
}

@ -85,17 +85,16 @@
if (index == this.current) return;
this.scrollRightTop = this.oldScrollTop;
this.$nextTick(function() {
// this.current = index;
this.current = index;
this.scrollRightTop = this.arr[index];
this.leftMenuStatus(index);
})
},
getGoodsTypeList() {
const that = this;
console.log(cstegory.list(), '接口地址')
return new Promise((resolve, reject) => {
cstegory.list({
is_hot: 0
// is_hot: 0
})
.then(res => {
//
@ -147,9 +146,9 @@
await this.getElRect('menu-scroll-view', 'menuHeight');
await this.getElRect('u-tab-item', 'menuItemHeight');
}
this.current = index;
// item
this.scrollTop = index * this.menuItemHeight + this.menuItemHeight / 2 - this.menuHeight / 2;
this.current = index-1;
},
// item
@ -166,7 +165,7 @@
}
rects.forEach((rect) => {
// rects[0].top()
this.arr.push(rect.top - rects[0].top + 5);
this.arr.push(rect.top - rects[0].top);
resolve();
})
}).exec()

@ -660,7 +660,7 @@
},
getTypeList() {
GoodsApi.typeList({
is_in_store: this.current == 0 ? 0 : 1
// is_in_store: this.current == 0 ? 0 : 1
}).then(res => {
if (res.status == 200) {
this.tabList = res.data.list;

Loading…
Cancel
Save