css
This commit is contained in:
@@ -43,7 +43,7 @@ export default {
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.list = this.current == 1 ? res.data.records : [this.list, res.data.records].flat()
|
||||
this.pages = res.data.total
|
||||
this.pages = res.data.pages
|
||||
}
|
||||
}).finally(() => uni.hideLoading())
|
||||
},
|
||||
|
||||
@@ -1,12 +1,20 @@
|
||||
<template>
|
||||
<div class="AppStore">
|
||||
<u-navbar :is-back="false" title="门店" title-color="#000" title-width="300" title-size="32" :title-bold="true" :background="backgroundNavbar" :is-fixed="true" height="44"></u-navbar>
|
||||
<div class="tab">
|
||||
<u-tabs :list="tabList" :is-scroll="false" :current="tabIndex" @change="change" inactive-color="#222" active-color="#222"
|
||||
height="100" :bar-style="barStyle"></u-tabs>
|
||||
<div class="header">
|
||||
<div class="status-bar" :style="{height: statusBarHeight + 'px'}"></div>
|
||||
<div class="nav-bar" :style="{
|
||||
height: '44px',
|
||||
lineHeight: '44px'
|
||||
}">
|
||||
<h2>门店</h2>
|
||||
</div>
|
||||
<div class="tab">
|
||||
<u-tabs :list="tabList" :is-scroll="false" :current="tabIndex" @change="change" inactive-color="#222" active-color="#222"
|
||||
height="100" :bar-style="barStyle"></u-tabs>
|
||||
</div>
|
||||
</div>
|
||||
<Situation v-if="tabIndex != 1" @toStoreDetail="toStoreDetail"></Situation>
|
||||
<Evaluate v-else @toEvaluateForm="toEvaluateForm" @toStoreDetail="toStoreDetail" :tabHeight="tabHeight"></Evaluate>
|
||||
<Evaluate v-else @toEvaluateForm="toEvaluateForm" @toStoreDetail="toStoreDetail" ref="Evaluate"></Evaluate>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
@@ -19,22 +27,14 @@ export default {
|
||||
name: 'AppStore',
|
||||
appName: '门店',
|
||||
components: {Situation, Evaluate},
|
||||
navigationBarBackgroundColor: '#ffffff',
|
||||
navigationBarTextStyle: 'black',
|
||||
customNavigation: true,
|
||||
data() {
|
||||
return {
|
||||
tabList: [{name: '门店情况'}, {name: '我要评价'}],
|
||||
tabIndex: 0,
|
||||
barStyle: {
|
||||
'width': '20px',
|
||||
'height': '3px',
|
||||
'border-radius': '2px',
|
||||
'bottom': '-3px',
|
||||
'background': '#2D7DFF'
|
||||
},
|
||||
backgroundNavbar: {
|
||||
background: '#fff',
|
||||
},
|
||||
tabHeight: 0
|
||||
statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -44,30 +44,23 @@ export default {
|
||||
if(e.tabIndex) {
|
||||
this.tabIndex = e.tabIndex
|
||||
}
|
||||
let info = uni.createSelectorQuery().select(".tab");
|
||||
info.boundingClientRect((data)=> { //data - 各种参数
|
||||
this.tabHeight = data.height
|
||||
console.log(this.tabHeight)
|
||||
}).exec()
|
||||
},
|
||||
onShow() {
|
||||
|
||||
|
||||
|
||||
},
|
||||
methods: {
|
||||
change(e) {
|
||||
this.tabIndex = e
|
||||
},
|
||||
toEvaluateForm(e) {
|
||||
console.log(e)
|
||||
uni.navigateTo({url: `./EvaluateForm?shopId=${e.shopId}`})
|
||||
},
|
||||
toStoreDetail(e) {
|
||||
console.log(e)
|
||||
uni.navigateTo({url: `./StoreDetail?shopId=${e.shopId}`})
|
||||
},
|
||||
},
|
||||
onReachBottom() {
|
||||
if(this.tabIndex == 1) {
|
||||
this.$refs.Evaluate.getNextList()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
@@ -79,6 +72,27 @@ page{
|
||||
.AppStore {
|
||||
background-color: #F4F5FA;
|
||||
height: 100vh;
|
||||
.header {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 111;
|
||||
width: 100%;
|
||||
opacity: 1;
|
||||
transition: all 0.2s ease;
|
||||
.status-bar {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.nav-bar {
|
||||
position: relative;
|
||||
color: #000;
|
||||
font-size: 32px;
|
||||
font-weight: 600;
|
||||
background: #fff;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
.tab {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
|
||||
@@ -86,6 +86,8 @@ export default {
|
||||
name: 'EvaluateForm',
|
||||
appName: '我要评价',
|
||||
customNavigation: true,
|
||||
navigationBarBackgroundColor: '#ffffff',
|
||||
navigationBarTextStyle: 'black',
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
|
||||
@@ -70,6 +70,8 @@
|
||||
export default {
|
||||
name: 'StoreDetail',
|
||||
appName: '门店情况',
|
||||
navigationBarBackgroundColor: '#ffffff',
|
||||
navigationBarTextStyle: 'black',
|
||||
customNavigation: true,
|
||||
data() {
|
||||
return {
|
||||
@@ -130,7 +132,7 @@ export default {
|
||||
item.wxzStar = wxz <= 0 ? 0 : wxz
|
||||
})
|
||||
this.assessList = this.current == 1 ? res.data.records : [this.list, res.data.records].flat()
|
||||
this.pages = res.data.total
|
||||
this.pages = res.data.pages
|
||||
}
|
||||
}).finally(() => uni.hideLoading())
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="Evaluate">
|
||||
<div class="search" :style="{'top': navHeight+'px'}">
|
||||
<div class="Evaluate" :style="{paddingTop: (statusBarHeight + 94) + 'px'}">
|
||||
<div class="search">
|
||||
<div class="search-input">
|
||||
<u-search v-model="searchVal" :clearabled="true" placeholder="搜索门店名称" :show-action="false"
|
||||
bg-color="#F4F5FA" search-icon-color="#666" color="#222" height="72" @search="getListInit" @clear="getListInit">
|
||||
@@ -81,12 +81,7 @@ export default {
|
||||
searchStoreLevel: {},
|
||||
searchOperatorType: {},
|
||||
girdInfo: {gridName: ''},
|
||||
navHeight: ''
|
||||
}
|
||||
},
|
||||
props: {
|
||||
tabHeight: {
|
||||
type: String
|
||||
statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -97,13 +92,9 @@ export default {
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
mounted() {
|
||||
setTimeout(() => {
|
||||
this.navHeight = uni.getSystemInfoSync().statusBarHeight + Number(this.tabHeight) + 44
|
||||
}, 600)
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
console.log(this.current, this.pages)
|
||||
if(this.current > this.pages) return
|
||||
this.$loading()
|
||||
this.$instance.post(`/app/appshoparchives/list`, null, {
|
||||
@@ -123,10 +114,14 @@ export default {
|
||||
item.wxzStar = wxz <= 0 ? 0 : wxz
|
||||
})
|
||||
this.list = this.current == 1 ? res.data.records : [this.list, res.data.records].flat()
|
||||
this.pages = res.data.total
|
||||
this.pages = res.data.pages
|
||||
}
|
||||
}).finally(() => uni.hideLoading())
|
||||
},
|
||||
getNextList() {
|
||||
this.current ++
|
||||
this.getList()
|
||||
},
|
||||
confirmOperatorType(e) {
|
||||
this.searchOperatorType = e[0]
|
||||
this.getListInit()
|
||||
@@ -187,7 +182,7 @@ export default {
|
||||
}
|
||||
}
|
||||
.list-content {
|
||||
padding: 340px 32px 0;
|
||||
padding: 240px 32px 64px;
|
||||
box-sizing: border-box;
|
||||
.item {
|
||||
width: 100%;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="Situation" :style="{paddingTop: (statusBarHeight + 110) + 'px'}">
|
||||
<div class="Situation" :style="{paddingTop: (statusBarHeight + 94) + 'px'}">
|
||||
<div class="title">
|
||||
<div class="left">门店台账</div>
|
||||
</div>
|
||||
@@ -77,7 +77,8 @@ export default {
|
||||
month: '',
|
||||
monthText: '',
|
||||
table: [],
|
||||
numInfo: {}
|
||||
numInfo: {},
|
||||
statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -128,9 +129,9 @@ export default {
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.Situation {
|
||||
padding-top: 100px;
|
||||
height: calc(100% - 100px);
|
||||
height: 100%;
|
||||
background-color: #F4F5FA;
|
||||
box-sizing: border-box;
|
||||
.title {
|
||||
line-height: 40px;
|
||||
padding: 32px;
|
||||
|
||||
Reference in New Issue
Block a user