Commit b3a6044e by shibukun

商品列表

parent 1f55765a
{ {
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{ {
"path" : "pages/home/home", "path": "pages/home/home",
"style" : "style": {
{ "navigationBarTitleText": "懒人企业福利社",
"navigationBarTitleText": "懒人企业福利社", "enablePullDownRefresh": false
"enablePullDownRefresh": false }
}
}, {
} "path": "pages/order/order",
,{ "style": {
"path" : "pages/order/order", "navigationBarTitleText": "",
"style" : "enablePullDownRefresh": false
{ }
"navigationBarTitleText": "",
"enablePullDownRefresh": false }, {
} "path": "pages/mine/mine",
"style": {
} "navigationBarTitleText": "",
,{ "enablePullDownRefresh": false,
"path" : "pages/mine/mine", "navigationStyle": "custom",
"style" : "backgroundColor": "#F5F5F5"
{ }
"navigationBarTitleText": "",
"enablePullDownRefresh": false, }
"navigationStyle": "custom", ],
"backgroundColor":"#F5F5F5" "subPackages": [{
} "root": "pagesA",
"pages": [{
} "path": "login/login",
], "style": {
"subPackages": [{ "navigationBarTitleText": "登录",
"root":"pagesA", "enablePullDownRefresh": false
"pages":[ }
{ }, {
"path": "login/login", "path": "integral/integral",
"style": { "style": {
"navigationBarTitleText": "登录", "navigationBarTitleText": "",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
},{
"path" : "integral/integral", }, {
"style" : "path": "selectAccount/selectAccount",
{ "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
} },
,{ {
"path" : "selectAccount/selectAccount", "path": "GoodSkuList/GoodSkuList",
"style" : "style": {
{ "navigationBarTitleText": "",
"navigationBarTitleText": "", "enablePullDownRefresh": false
"enablePullDownRefresh": false }
}
}]
} }],
] "preloadRule": {
}], "pagesA/login/login": {
"preloadRule":{ "network": "all",
"pagesA/login/login": { "packages": ["__APP__"]
"network": "all", }
"packages": ["__APP__"]
}
}, },
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app", "navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#F8F8F8", "navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8" "backgroundColor": "#F8F8F8"
}, },
"tabBar": { "tabBar": {
"color": "#686868", "color": "#686868",
"selectedColor": "#FF0520", "selectedColor": "#FF0520",
"borderStyle": "black", "borderStyle": "black",
"backgroundColor": "#ffffff", "backgroundColor": "#ffffff",
"list": [{ "list": [{
"pagePath": "pages/home/home", "pagePath": "pages/home/home",
"iconPath": "static/tabbar/home.png", "iconPath": "static/tabbar/home.png",
"selectedIconPath": "static/tabbar/home_h.png", "selectedIconPath": "static/tabbar/home_h.png",
"text": "首页" "text": "首页"
}, { }, {
"pagePath": "pages/order/order", "pagePath": "pages/order/order",
"iconPath": "static/tabbar/order.png", "iconPath": "static/tabbar/order.png",
"selectedIconPath": "static/tabbar/order_h.png", "selectedIconPath": "static/tabbar/order_h.png",
"text": "订单" "text": "订单"
}, { }, {
"pagePath": "pages/mine/mine", "pagePath": "pages/mine/mine",
"iconPath": "static/tabbar/mine.png", "iconPath": "static/tabbar/mine.png",
"selectedIconPath": "static/tabbar/mine_h.png", "selectedIconPath": "static/tabbar/mine_h.png",
"text": "我的" "text": "我的"
}] }]
} }
} }
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<view class="header-top"> <view class="header-top">
<text v-if="isLogin" class="header-name">你好,{{ name }}</text> <text v-if="isLogin" class="header-name">你好,{{ name }}</text>
<text v-else class="header-login" @click="goLogin()">请登录</text> <text v-else class="header-login" @click="goLogin()">请登录</text>
<view class="integral-detail">积分明细 ></view> <view class="integral-detail" @click="goIntegralDetail">积分明细 ></view>
</view> </view>
<view class="header-center"> <view class="header-center">
<view class="header-integral">{{ integralCount }}</view> <view class="header-integral">{{ integralCount }}</view>
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</view> </view>
</view> </view>
<view class="list"> <view class="list">
<view class="item" v-for="(item, index) in brandList" :key="index"> <view class="item" v-for="(item, index) in brandList" :key="index" @click="goToGoodDetail(item.brandNo)">
<view class="item-layout"> <view class="item-layout">
<image class="icon" mode="aspectFill" :src="item.imgPath"></image> <image class="icon" mode="aspectFill" :src="item.imgPath"></image>
<view class="item-right"> <view class="item-right">
...@@ -72,6 +72,7 @@ export default { ...@@ -72,6 +72,7 @@ export default {
if (res.data.list.length > 0) { if (res.data.list.length > 0) {
this.brandList = this.brandList.concat(res.data.list).concat(res.data.list).concat(res.data.list).concat(res.data.list).concat(res.data.list).concat(res.data.list).concat(res.data.list).concat(res.data.list).concat(res.data.list).concat(res.data.list).concat(res.data.list).concat(res.data.list).concat(res.data.list); this.brandList = this.brandList.concat(res.data.list).concat(res.data.list).concat(res.data.list).concat(res.data.list).concat(res.data.list).concat(res.data.list).concat(res.data.list).concat(res.data.list).concat(res.data.list).concat(res.data.list).concat(res.data.list).concat(res.data.list).concat(res.data.list);
this.page += 1
} }
this.loadingType = res.data.list.length < this.pageSize ? 'noMore' : 'more'; this.loadingType = res.data.list.length < this.pageSize ? 'noMore' : 'more';
console.log(this.loadingType) console.log(this.loadingType)
...@@ -79,12 +80,24 @@ export default { ...@@ -79,12 +80,24 @@ export default {
.catch(err => { .catch(err => {
console.log(err); console.log(err);
}); });
},
goToGoodDetail(brandNo) {
if (!this.isLogin) {
this.goLogin()
}
this.$router.push('GoodSkuList', {brandNo: brandNo})
},
goIntegralDetail() {
if (!this.isLogin) {
this.goLogin()
}
} }
} }
}; };
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.layout { .layout {
width: 100%; width: 100%;
height: 100%; height: 100%;
......
...@@ -5,7 +5,8 @@ const routers = { ...@@ -5,7 +5,8 @@ const routers = {
'Home': '/pages/home/home', 'Home': '/pages/home/home',
'Order': '/pages/order/order', 'Order': '/pages/order/order',
'Mine': '/pages/mine/mine', 'Mine': '/pages/mine/mine',
'SelectAccount': '/pagesA/selectAccount/selectAccount' 'SelectAccount': '/pagesA/selectAccount/selectAccount',
'GoodSkuList': '/pagesA/GoodSkuList/GoodSkuList'
} }
export function push(routerName, params, events) { export function push(routerName, params, events) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment