refactor(home): 调整首页养老服务位置
- 将养老服务模块从生活娱乐前面移动到后面 - 优化代码格式,添加缺失的逗号和换行
This commit is contained in:
@@ -10,33 +10,33 @@ export default {
|
|||||||
components: {
|
components: {
|
||||||
VanImage,
|
VanImage,
|
||||||
VanIcon: Icon,
|
VanIcon: Icon,
|
||||||
SwiperBanner: Swiper
|
SwiperBanner: Swiper,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
bannerList: [
|
bannerList: [
|
||||||
{
|
{
|
||||||
imgUrl: require('./img/swiper-image.svg')
|
imgUrl: require('./img/swiper-image.svg'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
imgUrl: require('./img/swiper-image.svg')
|
imgUrl: require('./img/swiper-image.svg'),
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
name: '',
|
name: '',
|
||||||
sex: '',
|
sex: '',
|
||||||
type: '',
|
type: '',
|
||||||
permission: {
|
permission: {
|
||||||
goNext: true
|
goNext: true,
|
||||||
},
|
},
|
||||||
titleSrc: require('@/assets/images/logo.png'),
|
titleSrc: require('@/assets/images/logo.png'),
|
||||||
bannerSrc: 'http://ncc.ebiz-digits.com:39527/gsc/IHRHN5/7b/04/63/7b0463aa135f4a1f922b5171bcec1d14/images/主页/u44.svg'
|
bannerSrc: 'http://ncc.ebiz-digits.com:39527/gsc/IHRHN5/7b/04/63/7b0463aa135f4a1f922b5171bcec1d14/images/主页/u44.svg',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
title() {
|
title() {
|
||||||
if (!Number(this.type)) return '亲爱的客户'
|
if (!Number(this.type)) return '亲爱的客户'
|
||||||
return `亲爱的${this.name}${Number(this.sex) === 1 ? '女士' : Number(this.sex) === 0 ? '先生' : ''}`
|
return `亲爱的${this.name}${Number(this.sex) === 1 ? '女士' : Number(this.sex) === 0 ? '先生' : ''}`
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
goEcosystem(ecosystem, swe) {
|
goEcosystem(ecosystem, swe) {
|
||||||
@@ -44,20 +44,20 @@ export default {
|
|||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: 'service',
|
name: 'service',
|
||||||
params: {
|
params: {
|
||||||
ecosystem: getEcosystem(ecosystem)
|
ecosystem: getEcosystem(ecosystem),
|
||||||
},
|
},
|
||||||
query: {
|
query: {
|
||||||
swe: swe
|
swe: swe,
|
||||||
}
|
},
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
showErrorDialog(msg) {
|
showErrorDialog(msg) {
|
||||||
Dialog({
|
Dialog({
|
||||||
message: msg
|
message: msg,
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.$router.go(-1)
|
this.$router.go(-1)
|
||||||
})
|
})
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
const params = getParamsFromUrl(globalThis.location.href)
|
const params = getParamsFromUrl(globalThis.location.href)
|
||||||
@@ -66,7 +66,7 @@ export default {
|
|||||||
if (token || stoken) {
|
if (token || stoken) {
|
||||||
globalThis.sessionStorage.setItem('token', token || stoken)
|
globalThis.sessionStorage.setItem('token', token || stoken)
|
||||||
fetchUserInfo()
|
fetchUserInfo()
|
||||||
.then(res => {
|
.then((res) => {
|
||||||
const { content } = res.content
|
const { content } = res.content
|
||||||
this.name = content.name
|
this.name = content.name
|
||||||
this.sex = Number(content.sex)
|
this.sex = Number(content.sex)
|
||||||
@@ -76,7 +76,7 @@ export default {
|
|||||||
this.showErrorDialog('您的登录已过期,请退出重试')
|
this.showErrorDialog('您的登录已过期,请退出重试')
|
||||||
})
|
})
|
||||||
} else this.showErrorDialog('页面访问有误,请重试')
|
} else this.showErrorDialog('页面访问有误,请重试')
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -119,14 +119,6 @@ export default {
|
|||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="flex service-row">
|
<div class="flex service-row">
|
||||||
<div class="service-item old">
|
|
||||||
<div>
|
|
||||||
<h4>养老服务</h4>
|
|
||||||
<p>暖心相伴</p>
|
|
||||||
<p>颐养天年</p>
|
|
||||||
</div>
|
|
||||||
<button class="go-btn" @click="goEcosystem(28)">去看看</button>
|
|
||||||
</div>
|
|
||||||
<div class="service-item life">
|
<div class="service-item life">
|
||||||
<div>
|
<div>
|
||||||
<!-- <h4>生活娱乐</h4>-->
|
<!-- <h4>生活娱乐</h4>-->
|
||||||
@@ -138,6 +130,14 @@ export default {
|
|||||||
</div>
|
</div>
|
||||||
<button class="go-btn" @click="goEcosystem(1, true)">去看看</button>
|
<button class="go-btn" @click="goEcosystem(1, true)">去看看</button>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="service-item old">
|
||||||
|
<div>
|
||||||
|
<h4>养老服务</h4>
|
||||||
|
<p>暖心相伴</p>
|
||||||
|
<p>颐养天年</p>
|
||||||
|
</div>
|
||||||
|
<button class="go-btn" @click="goEcosystem(28)">去看看</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="ecosy-container pt10 flex">
|
<div class="ecosy-container pt10 flex">
|
||||||
|
|||||||
Reference in New Issue
Block a user