This commit is contained in:
liuye
2022-02-18 15:21:34 +08:00
parent 741b58acd3
commit 17601dc953
3 changed files with 26 additions and 17 deletions

View File

@@ -22,7 +22,7 @@
</div> </div>
</AiTopFixed> </AiTopFixed>
<div class="line-bg"></div> <div class="line-bg"></div>
<div v-if="list.length"> <div v-if="info['列表'] && info['列表'].length">
<div class="ranking-content" v-if="info['列表'] && info['列表'].length"> <div class="ranking-content" v-if="info['列表'] && info['列表'].length">
<div class="item" v-if="info['列表'].length > 1"> <div class="item" v-if="info['列表'].length > 1">
<img <img
@@ -133,6 +133,7 @@ export default {
}; };
}, },
onLoad() { onLoad() {
this.areaId = this.user.areaId
this.areaName = this.user.areaName || '' this.areaName = this.user.areaName || ''
this.getInfo(); this.getInfo();
}, },
@@ -151,9 +152,7 @@ export default {
// 积分排行 // 积分排行
getInfo() { getInfo() {
this.info = {}; this.info = {};
// var url = `/app/appresident/rank?id=00255e188d1225f3fe022cb4eed44a84&type=${this.tabIndex}` //积分排行 this.$http.post(`/app/appresident/rank-qw?type=${this.tabIndex}&areaId=${this.areaId}`).then((res) => {
var url = `/app/appresident/rank?id=${this.user.residentId}&type=${this.tabIndex}&areaId=${this.areaId}`; //积分排行
this.$http.post(url).then((res) => {
if (res.code === 0) { if (res.code === 0) {
this.info = res.data; this.info = res.data;
} }
@@ -171,7 +170,7 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
.page { .page {
width: 100%; width: 100%;
background-color: #f3f6f9; // background-color: #f3f6f9;
.credit-points { .credit-points {
.bg-blue { .bg-blue {
width: 100%; width: 100%;

View File

@@ -1,12 +1,12 @@
<template> <template>
<div class="AppSupermarket"> <div class="AppSupermarket">
<AiTopFixed> <AiTopFixed>
<div class="header-top"> <div class="area-content">
<div>区域选择</div> <AiAreaPicker :areaId="user.areaId" :value="areaId" @select="areaSelect" :name.sync="areaName">
<AiAreaPicker v-model="areaId" :areaId="user.areaId" @select="areaSelect" :name.sync="areaName"> <img src="./components/img/local-icon.png" alt="">
<span class="label" v-if="areaName">{{ areaName }}</span> <span class="label" v-if="areaName">{{ areaName }}</span>
<span v-else>请选择</span> <span v-else>请选择</span>
<u-icon name="arrow-right" color="#666" size="24" style="margin-left:4px;" /> <u-icon name="arrow-down" color="#666" size="24"/>
</AiAreaPicker> </AiAreaPicker>
</div> </div>
</AiTopFixed> </AiTopFixed>
@@ -38,7 +38,8 @@
</div> </div>
</div> </div>
</div> </div>
<AiEmpty v-else /> <AiEmpty description="此页面暂无数据,请选择区域到村级" v-if="!isAreaId && !numList.length"/>
<AiEmpty description="暂无数据" v-if="isAreaId && !numList.length" />
<div class="goods-footer" v-if="numList.length"> <div class="goods-footer" v-if="numList.length">
<div class="goods-footer__bottom"> <div class="goods-footer__bottom">
<div class="goods-footer__bottom__left"> <div class="goods-footer__bottom__left">
@@ -75,6 +76,7 @@ export default {
areaName: "", areaName: "",
userInfo: {}, userInfo: {},
propAreaId: "", propAreaId: "",
isAreaId: false
}; };
}, },
@@ -137,9 +139,10 @@ export default {
areaSelect(e) { areaSelect(e) {
if(/[^0]0{0,2}$/.test(e)) { if(/[^0]0{0,2}$/.test(e)) {
this.areaId = e this.areaId = e
this.isAreaId = true
this.getList() this.getList()
}else { }else {
this.$u.toast('请选择到村级') this.isAreaId = false
} }
}, },
getList() { getList() {
@@ -208,12 +211,19 @@ export default {
height: 100%; height: 100%;
background-color: #fff; background-color: #fff;
} }
.header-top { .area-content {
display: flex; width: 100%;
background: #fff; line-height: 64px;
justify-content: space-between;
align-items: center; img {
padding-top: 16px; width: 42px;
vertical-align: middle;
margin-right: 16px;
}
.u-icon {
margin-left: 6px;
}
} }
.item-bottom { .item-bottom {
display: flex; display: flex;

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB