Merge branch 'dev' of http://git.sinoecare.com/sinoecare/digital_village_v2/dvcp_v2_wxcp_app into dev
This commit is contained in:
@@ -5,12 +5,12 @@
|
|||||||
<img src="https://cdn.cunwuyun.cn/dvcp/credit/head.png" alt="">
|
<img src="https://cdn.cunwuyun.cn/dvcp/credit/head.png" alt="">
|
||||||
<div class="headerDataPane" flex>
|
<div class="headerDataPane" flex>
|
||||||
<div class="headerItem top">
|
<div class="headerItem top">
|
||||||
<div v-text="`个人积分`"/>
|
<div v-text="`积分余额`"/>
|
||||||
<b v-text="info.historyIntegralTotal||0"/>
|
<b v-text="info.nowIntegral||0"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="headerItem">
|
<div class="headerItem">
|
||||||
<div v-text="`剩余积分`"/>
|
<div v-text="`历史累计积分`"/>
|
||||||
<b v-text="info.nowIntegral||0"/>
|
<b v-text="info.historyIntegralTotal||0"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="divider"/>
|
<div class="divider"/>
|
||||||
<div class="headerItem">
|
<div class="headerItem">
|
||||||
@@ -122,7 +122,7 @@ export default {
|
|||||||
line-height: 50px;
|
line-height: 50px;
|
||||||
color: #000;
|
color: #000;
|
||||||
font-size: 36px;
|
font-size: 36px;
|
||||||
font-family: DIN,DINAlternate-Bold, DINAlternate;
|
font-family: DIN, DINAlternate-Bold, DINAlternate;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ export default {
|
|||||||
value: {
|
value: {
|
||||||
immediate: true,
|
immediate: true,
|
||||||
handler(v) {
|
handler(v) {
|
||||||
v && !this.areaName && this.getAreaName(this.value)
|
v && this.getAreaName(this.value)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
fullArea(v) {
|
fullArea(v) {
|
||||||
@@ -104,17 +104,18 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
getInfo(areaId) {
|
getInfo(areaId) {
|
||||||
return areaId && this.$http.post('/admin/area/getAllParentAreaId', null, {
|
return areaId ? this.$http.post('/admin/area/getAllParentAreaId', null, {
|
||||||
withoutToken: true,
|
withoutToken: true,
|
||||||
params: {areaId},
|
params: {areaId},
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res?.data) {
|
if (res?.data) {
|
||||||
return res.data.reverse()
|
return res.data.reverse()
|
||||||
}
|
}
|
||||||
})
|
}) : Promise.reject()
|
||||||
},
|
},
|
||||||
getFullArea(areaId) {
|
getFullArea(areaId) {
|
||||||
return this.fullArea?.length > 0 ? Promise.resolve(this.fullArea) : this.getInfo(areaId).then(meta => {
|
const current = this.fullArea.slice(-1)?.[0]?.id
|
||||||
|
return current && current == areaId ? Promise.resolve(this.fullArea) : this.getInfo(areaId).then(meta => {
|
||||||
if (meta.length > 1) {
|
if (meta.length > 1) {
|
||||||
this.fullArea = meta.slice(this.dataRange)
|
this.fullArea = meta.slice(this.dataRange)
|
||||||
} else {
|
} else {
|
||||||
@@ -148,13 +149,15 @@ export default {
|
|||||||
uni.navigateTo({url})
|
uni.navigateTo({url})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getAreaName(area, name) {
|
getAreaName(area) {
|
||||||
name ? this.areaName = name :
|
if (this.multiple) {
|
||||||
this.multiple ? this.areaName = !![area].toString() ? `已选择${[area].flat().length}个` : '' :
|
this.areaName = `已选择${[area].flat().filter(Boolean)?.length}个`.replace('已选择0个', '')
|
||||||
this.getFullArea(area).then(list => {
|
} else {
|
||||||
let arr = JSON.parse(JSON.stringify(list))
|
this.getFullArea(area).then(list => {
|
||||||
this.areaName = arr?.reverse()?.[0]?.name || ""
|
let arr = JSON.parse(JSON.stringify(list))
|
||||||
})
|
this.areaName = arr?.reverse()?.[0]?.name || ""
|
||||||
|
}).catch(() => this.areaName = '')
|
||||||
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user