提交 79a701cd authored 作者: pengxiaohui's avatar pengxiaohui

修复bug

上级 d01f5cc0
<template> <template>
<div class="app-wrapper"> <div class="app-wrapper">
<app-main /> <app-main />
<van-tabbar v-model="tabActive" @change="tabChange" route> <van-tabbar v-model="tabActive" route>
<van-tabbar-item icon="shop-collect-o" to="/shop">商品</van-tabbar-item> <van-tabbar-item icon="shop-collect-o" name="shop" to="/shop">商品</van-tabbar-item>
<van-tabbar-item icon="user-o" to="/my">我的</van-tabbar-item> <van-tabbar-item icon="user-o" name="my" to="/my">我的</van-tabbar-item>
</van-tabbar> </van-tabbar>
</div> </div>
</template> </template>
...@@ -12,19 +12,10 @@ import AppMain from './main' ...@@ -12,19 +12,10 @@ import AppMain from './main'
export default { export default {
data() { data() {
return { return {
tabActive: '/shop' tabActive: 'shop'
} }
}, },
components: { AppMain }, components: { AppMain }
methods: {
tabChange() {
// const query = {}
if (this.tabActive === '/shop') {
// 设置shop_id
}
// this.$router.push({ path: this.tabActive, query })
}
}
} }
</script> </script>
<style scoped> <style scoped>
......
...@@ -48,10 +48,10 @@ export default { ...@@ -48,10 +48,10 @@ export default {
return this.$route.query return this.$route.query
}, },
shop_id() { shop_id() {
return this.query.shop_id || '6800681447305773056' return this.query.shop_id || window.localStorage.getItem('shop_id') || '6800681447305773056'
}, },
group_id() { group_id() {
return this.query.group_id || '' return this.query.group_id || window.localStorage.getItem('group_id') || ''
} }
}, },
methods: { methods: {
...@@ -86,6 +86,8 @@ export default { ...@@ -86,6 +86,8 @@ export default {
} }
}, },
beforeMount() { beforeMount() {
window.localStorage.setItem('shop_id', this.shop_id)
window.localStorage.setItem('group_id', this.group_id)
this.fetchGetList() this.fetchGetList()
} }
} }
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<van-tab title="全部" name=""></van-tab> <van-tab title="全部" name=""></van-tab>
<van-tab title="待付款" name="1"></van-tab> <van-tab title="待付款" name="1"></van-tab>
<van-tab title="待发货" name="2"></van-tab> <van-tab title="待发货" name="2"></van-tab>
<van-tab title="已完成" name="3"></van-tab> <van-tab title="已完成" name="4"></van-tab>
</van-tabs> </van-tabs>
</van-sticky> </van-sticky>
<ul class="order-list"> <ul class="order-list">
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<div class="sum_pay">需付款¥{{item.payment_money}}</div> <div class="sum_pay">需付款¥{{item.payment_money}}</div>
</div> </div>
</div> </div>
<div class="pay_bar" v-if="false && item.order_status === '1'"> <div class="pay_bar" v-if="item.order_status === '1'">
<p><span>更多</span></p> <p><span>更多</span></p>
<van-button plain round type="primary" size="mini" color="#C01540">付款</van-button> <van-button plain round type="primary" size="mini" color="#C01540">付款</van-button>
</div> </div>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论