添加新品页面
This commit is contained in:
parent
68383c9beb
commit
2941176f64
30
pages.json
30
pages.json
@ -39,6 +39,17 @@
|
|||||||
"navigationBarTitleText": "店铺街"
|
"navigationBarTitleText": "店铺街"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/new_goods/index",
|
||||||
|
"name": "new_goods",
|
||||||
|
"meta": {
|
||||||
|
"auth": false,
|
||||||
|
"keepScroll": true
|
||||||
|
},
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "新品"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/community/community",
|
"path": "pages/community/community",
|
||||||
"name": "community",
|
"name": "community",
|
||||||
@ -85,6 +96,7 @@
|
|||||||
"enablePullDownRefresh": true
|
"enablePullDownRefresh": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"path": "pages/login/login",
|
"path": "pages/login/login",
|
||||||
"meta": {
|
"meta": {
|
||||||
@ -1207,18 +1219,24 @@
|
|||||||
"selectedIconPath": "/static/images/tab_home_s.png",
|
"selectedIconPath": "/static/images/tab_home_s.png",
|
||||||
"text": "首页"
|
"text": "首页"
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
"pagePath": "pages/goods_cate/goods_cate",
|
// "pagePath": "pages/goods_cate/goods_cate",
|
||||||
"iconPath": "/static/images/tab_sort.png",
|
// "iconPath": "/static/images/tab_sort.png",
|
||||||
"selectedIconPath": "/static/images/tab_sort_s.png",
|
// "selectedIconPath": "/static/images/tab_sort_s.png",
|
||||||
"text": "分类"
|
// "text": "分类"
|
||||||
},
|
// },
|
||||||
// {
|
// {
|
||||||
// "pagePath": "pages/community/community",
|
// "pagePath": "pages/community/community",
|
||||||
// "iconPath": "/static/images/tab-community.png",
|
// "iconPath": "/static/images/tab-community.png",
|
||||||
// "selectedIconPath": "/static/images/tab-community_s.png",
|
// "selectedIconPath": "/static/images/tab-community_s.png",
|
||||||
// "text": "种草"
|
// "text": "种草"
|
||||||
// },
|
// },
|
||||||
|
{
|
||||||
|
"pagePath": "pages/new_goods/index",
|
||||||
|
"iconPath": "/static/images/tab_new.png",
|
||||||
|
"selectedIconPath": "/static/images/tab_new_s.png",
|
||||||
|
"text": "新品"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"pagePath": "pages/shop_cart/shop_cart",
|
"pagePath": "pages/shop_cart/shop_cart",
|
||||||
"iconPath": "/static/images/tab_shoppingcar.png",
|
"iconPath": "/static/images/tab_shoppingcar.png",
|
||||||
|
|||||||
70
pages/new_goods/index.vue
Normal file
70
pages/new_goods/index.vue
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<view class="hot-list">
|
||||||
|
<mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback">
|
||||||
|
<view class="main">
|
||||||
|
<goods-list :list="goodsList" type="double" :price-type="price_type"></goods-list>
|
||||||
|
</view>
|
||||||
|
</mescroll-body>
|
||||||
|
<tabbar></tabbar>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
getNewGoods
|
||||||
|
} from '@/api/store';
|
||||||
|
import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins";
|
||||||
|
export default {
|
||||||
|
mixins: [MescrollMixin],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
upOption: {
|
||||||
|
empty: {
|
||||||
|
icon: "https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/goods_null.png",
|
||||||
|
tip: "暂无商品~"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
hotList: [],
|
||||||
|
goodsList: [],
|
||||||
|
type: '',
|
||||||
|
price_type: 0
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
upCallback(page) {
|
||||||
|
let pageNum = page.num;
|
||||||
|
let pageSize = page.size;
|
||||||
|
const params = {
|
||||||
|
page_no: pageNum,
|
||||||
|
page_size: pageSize,
|
||||||
|
p_id: this.$store.getters.hasPid,
|
||||||
|
set: this.$store.getters.hasSetId
|
||||||
|
}
|
||||||
|
|
||||||
|
params.type = 'all'
|
||||||
|
getNewGoods(params).then(res => {
|
||||||
|
if (res.code == 1) {
|
||||||
|
this.price_type = 0;
|
||||||
|
let curPageData = res.data.lists;
|
||||||
|
let curPageLen = curPageData.length;
|
||||||
|
let hasNext = !!res.data.more;
|
||||||
|
if (page.num == 1) {
|
||||||
|
this.goodsList = [];
|
||||||
|
}
|
||||||
|
this.goodsList = this.goodsList.concat(curPageData);
|
||||||
|
this.mescroll.endSuccess(curPageLen, hasNext);
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
this.mescroll.endErr()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss">
|
||||||
|
.list-title {
|
||||||
|
margin: 27rpx 0 30rpx;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
BIN
static/images/tab_new.png
Normal file
BIN
static/images/tab_new.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 910 B |
BIN
static/images/tab_new_s.png
Normal file
BIN
static/images/tab_new_s.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 910 B |
Loading…
Reference in New Issue
Block a user