Merge pull request '罗世杰:合并首页部分api' (#48) from lj into master

Reviewed-on: http://git.feashow.cn/odjbin/city-store-transfer/pulls/48
This commit is contained in:
luojie
2023-11-15 13:52:58 +00:00
2 changed files with 19 additions and 27 deletions

View File

@@ -8,9 +8,9 @@
/> />
</view> </view>
<text class="text1">累计用户</text> <text class="text1">累计用户</text>
<text class="num1">{{ totalUser }}</text> <text class="num1">{{ statNum.all_user_num }}</text>
<view class="border border1"></view> <view class="border border1"></view>
<text class="num11">昨日新增{{ yesterdayUser }}</text> <text class="num11">昨日新增{{ statNum.yesterday_user_num }}</text>
</view> </view>
<view class="right"> <view class="right">
@@ -22,9 +22,9 @@
/> />
</view> </view>
<text class="text2">累计转店</text> <text class="text2">累计转店</text>
<text class="num2">{{ totalTrans }}</text> <text class="num2">{{ statNum.all_trans_num }}</text>
<view class="border border2"></view> <view class="border border2"></view>
<text class="num21">昨日新增{{ yesterdayTrans }}</text> <text class="num21">昨日新增{{ statNum.yesterday_trans_num }}</text>
</view> </view>
<view class="right2"> <view class="right2">
@@ -35,9 +35,9 @@
/> />
</view> </view>
<text class="text3">累计找店</text> <text class="text3">累计找店</text>
<text class="num3">{{ totalSearch }}</text> <text class="num3">{{ statNum.all_find_num }}</text>
<view class="border border3"></view> <view class="border border3"></view>
<text class="num22">昨日新增{{ yesterdaySearch }}</text> <text class="num22">昨日新增{{ statNum.yesterday_find_num }}</text>
</view> </view>
</view> </view>
@@ -47,27 +47,18 @@
</template> </template>
<script> <script>
export default { export default {
props:{ props:{
totalUser:{ statNum :{
type:Number type:Object,
}, default(){
yesterdayUser:{ return {
type:Number
}, }
totalTrans:{ }
type:Number
},
yesterdayTrans:{
type:Number
},
totalSearch:{
type:Number
},
yesterdaySearch:{
type:Number
} }
}, }
} }
</script> </script>

View File

@@ -7,7 +7,7 @@
</view> </view>
<HomeNavCard></HomeNavCard> <HomeNavCard></HomeNavCard>
<HomeNoticeBar :text="notice" /> <HomeNoticeBar :text="notice" />
<Statistics :data="statisticsNum" /> <Statistics :statNum="statNum"/>
<view class="show-and-search"> <view class="show-and-search">
<view class="show-tab list-tab" :class="{ 'tab-activate': chooseIndex === 0 }" @click="this.chooseIndex=0"> <view class="show-tab list-tab" :class="{ 'tab-activate': chooseIndex === 0 }" @click="this.chooseIndex=0">
<text>店铺列表</text> <text>店铺列表</text>
@@ -38,7 +38,7 @@
return { return {
notice: [], notice: [],
chooseIndex: 0, chooseIndex: 0,
statisticsNum: [231753, 1345], statNum: {},
swiperList:[] swiperList:[]
} }
}, },
@@ -62,7 +62,8 @@
}, },
getStat(){ getStat(){
this.$api.getStat().then(res=>{ this.$api.getStat().then(res=>{
this.statisticsNum = res.data.data this.statNum = res.data.data
console.log(res.data.data);
}) })
}, },
getRegionList() { getRegionList() {