养老补贴

master
lion 7 days ago
parent 8e16350144
commit b13295c0f7

@ -57,6 +57,7 @@ let apiApp = {
serveHospitalForm:'/api/mobile/serve-hospital/forms', serveHospitalForm:'/api/mobile/serve-hospital/forms',
serveHospitalOrder:'/api/mobile/user/serve-hospital-form', serveHospitalOrder:'/api/mobile/user/serve-hospital-form',
serveHospitalOrderDetail:'/api/mobile/user/serve-hospital-form-detail', serveHospitalOrderDetail:'/api/mobile/user/serve-hospital-form-detail',
oldAgeAllowanceSubmit: '/api/mobile/user/old-age-allowance',
} }
@ -121,6 +122,7 @@ const install = (Vue, vm) => {
const serveHospitalForm = (params = {}) => vm.$u.get(apiApp.serveHospitalForm, params) const serveHospitalForm = (params = {}) => vm.$u.get(apiApp.serveHospitalForm, params)
const serveHospitalOrder = (params = {}) => vm.$u.get(apiApp.serveHospitalOrder, params) const serveHospitalOrder = (params = {}) => vm.$u.get(apiApp.serveHospitalOrder, params)
const serveHospitalOrderDetail = (params = {}) => vm.$u.get(apiApp.serveHospitalOrderDetail, params) const serveHospitalOrderDetail = (params = {}) => vm.$u.get(apiApp.serveHospitalOrderDetail, params)
const oldAgeAllowanceSubmit = (params = {}) => vm.$u.post(apiApp.oldAgeAllowanceSubmit, params)
// end // end
vm.$u.api = { vm.$u.api = {
@ -148,7 +150,9 @@ const install = (Vue, vm) => {
// 购物车 // 购物车
cartList, cartSave, cartShow, cartDestroy, cartList, cartSave, cartShow, cartDestroy,
//就医服务 //就医服务
serveHospital,serveHospitalDetail,serveHospitalForm,serveHospitalOrder,serveHospitalOrderDetail serveHospital,serveHospitalDetail,serveHospitalForm,serveHospitalOrder,serveHospitalOrderDetail,
// 养老补贴
oldAgeAllowanceSubmit
}; };
} }

@ -5,7 +5,7 @@
"versionName" : "1.0.0", "versionName" : "1.0.0",
"versionCode" : "100", "versionCode" : "100",
"transformPx" : false, "transformPx" : false,
"sassImplementationName": "node-sass", "sassImplementationName" : "node-sass",
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {
"usingComponents" : true, "usingComponents" : true,
@ -68,7 +68,7 @@
"desc" : "需要获取您的详细地址" "desc" : "需要获取您的详细地址"
} }
}, },
"requiredPrivateInfos" : [ "getLocation", "chooseAddress","chooseLocation" ], "requiredPrivateInfos" : [ "getLocation", "chooseAddress", "chooseLocation" ],
"optimization" : { "optimization" : {
"subPackages" : true "subPackages" : true
}, },

@ -0,0 +1,250 @@
<template>
<view class="container">
<image class="bg" src="/static/ylbtbg.png" mode="widthFix"></image>
<view class="content">
<image class="title" src="/static/ylbttitle.png" mode="widthFix"></image>
<view class="steps">
<image class="step-icon" src="/static/ylbticon1.png" mode="aspectFit"></image>
<image class="step-icon" src="/static/ylbticon2.png" mode="aspectFit"></image>
<image class="step-icon" src="/static/ylbticon3.png" mode="aspectFit"></image>
</view>
<view class="benefit-text">
<view class="line1"><text>专属福利</text>您家60岁以上失能老人</view>
<view class="line2">每月最高领<text>800</text></view>
</view>
<view class="form-card">
<view class="form-row">
<text class="required">*</text>
<text class="label">手机号:</text>
<input
class="mobile-input"
type="number"
maxlength="11"
placeholder="请填写您的联系电话"
v-model="form.mobile"
/>
</view>
<view class="divider"></view>
<textarea
class="content-input"
v-model="form.content"
maxlength="500"
placeholder="请简单描述您要咨询内容(内容加密保护)"
/>
</view>
<view class="submit-btn" @click="submit"></view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
form: {
mobile: '',
content: ''
},
submitting: false
}
},
computed: {
token() {
return this.vuex_token || uni.getStorageSync('lifeData')?.vuex_token
}
},
onShow() {
this.initMobile()
},
methods: {
async initMobile() {
if (this.vuex_user?.mobile) {
this.form.mobile = this.vuex_user.mobile
return
}
if (!this.token) return
try {
const { user } = await this.$u.api.getUserInfo()
if (user) {
this.$u.vuex('vuex_user', user)
this.form.mobile = user.mobile || ''
}
} catch (err) {
console.error(err)
}
},
validateForm() {
if (!this.form.mobile) {
this.$u.toast('请填写手机号')
return false
}
if (!/^1[3-9]\d{9}$/.test(this.form.mobile)) {
this.$u.toast('手机号格式不正确')
return false
}
if (!this.form.content || !this.form.content.trim()) {
this.$u.toast('请填写咨询内容')
return false
}
return true
},
async submit() {
if (this.submitting) return
if (!this.token) {
this.$u.route({
url: '/pages/login/login',
type: 'redirect'
})
return
}
if (!this.validateForm()) return
this.submitting = true
try {
await this.$u.api.oldAgeAllowanceSubmit({
mobile: this.form.mobile,
content: this.form.content.trim()
})
this.$u.toast('提交成功')
this.form.content = ''
setTimeout(() => {
uni.switchTab({
url: '/pages/index/index'
})
}, 1500)
} catch (err) {
console.error(err)
} finally {
this.submitting = false
}
}
}
}
</script>
<style scoped lang="scss">
.container {
min-height: 100vh;
background: #f7cfa7;
position: relative;
}
.bg {
width: 100%;
position: absolute;
left: 0;
top: 0;
z-index: 0;
}
.content {
position: relative;
z-index: 1;
padding: 36rpx 38rpx 80rpx;
}
.title {
display: block;
width: 620rpx;
margin: 40rpx auto 0;
margin-top:120rpx;
margin-bottom:120rpx;
}
.steps {
margin-top: 34rpx;
display: flex;
justify-content: space-between;
margin-bottom:70rpx;
}
.step-icon {
width: 200rpx;
height: 200rpx;
}
.form-card {
margin-top: 34rpx;
background: #fff;
border-radius: 16rpx;
padding: 32rpx 26rpx 26rpx;
box-shadow: 0 6rpx 20rpx rgba(0, 0, 0, 0.06);
}
.benefit-text {
margin-top: 25rpx;
text-align: center;
color: #d43c40;
.line1 {
font-size: 34rpx;
margin-bottom:25rpx;
}
.line2 {
font-size: 27rpx;
margin-bottom:100rpx;
& > text {
font-size: 52rpx;
font-weight: 700;
color:#d43c40
}
}
}
.form-row {
display: flex;
align-items: center;
font-size: 32rpx;
color: #222;
}
.required {
color: #dd8b31;
margin-right: 8rpx;
font-weight: 700;
}
.label {
margin-right: 18rpx;
}
.mobile-input {
flex: 1;
font-size: 30rpx;
height: 64rpx;
text-align:right;
}
.divider {
height: 2rpx;
background: #efefef;
margin: 12rpx 0 24rpx;
}
.content-input {
width: 100%;
height: 220rpx;
font-size: 28rpx;
background: #fafafa;
border: 2rpx solid #ededed;
border-radius: 8rpx;
padding: 20rpx;
box-sizing: border-box;
}
.submit-btn {
margin: 70rpx auto 0;
width: 460rpx;
height: 86rpx;
line-height: 86rpx;
text-align: center;
color: #fff;
font-size: 34rpx;
border-radius: 43rpx;
background: linear-gradient(90deg, #df0000 0%, #f1556d 100%);
}
</style>

@ -205,6 +205,12 @@
"navigationBarTitleText": "公益服务", "navigationBarTitleText": "公益服务",
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
},
{
"path": "pages/OldAgeAllowance/OldAgeAllowance",
"style": {
"navigationBarTitleText": "养老补贴"
}
} }
] ]
} }

@ -61,9 +61,9 @@
</u-grid> --> </u-grid> -->
</view> </view>
<!-- <view class="img1"> <view class="img1" @click="showYlbtMask = true">
<image src="~@/static/index/ask-png.png" alt="" mode="aspectFit"></image> <image src="~@/static/ylbt.png" alt="" mode="aspectFit"></image>
</view> --> </view>
<view class="hospitals"> <view class="hospitals">
<view class="hospitals__title">热门医院</view> <view class="hospitals__title">热门医院</view>
@ -153,6 +153,21 @@
<tabbar /> <tabbar />
<PrivacyPopup /> <PrivacyPopup />
<floatPhone></floatPhone> <floatPhone></floatPhone>
<!-- 养老补贴弹层全屏半透明底 + 中间活动图 -->
<view v-if="showYlbtMask" class="ylbt-mask" @click="closeYlbtMask">
<view class="ylbt-mask__box" @click.stop>
<view class="ylbt-mask__close" @click="closeYlbtMask">
<u-icon name="close" color="#ffffff" size="44"></u-icon>
</view>
<image
class="ylbt-mask__img"
src="/static/ylbtmask.png"
mode="widthFix"
@click="goOldAgeAllowanceFromMask"
></image>
</view>
</view>
</view> </view>
</template> </template>
@ -167,6 +182,7 @@
}, },
data() { data() {
return { return {
showYlbtMask: false,
isShowSite: false, isShowSite: false,
list_site: [{ list_site: [{
id: '', id: '',
@ -211,8 +227,8 @@
{ {
text: "智能AI", text: "智能AI",
icon: "/static/index/index6.png", icon: "/static/index/index6.png",
to: "/pages/aichat/index", upgrade: true,
}, }
], ],
hospitals: [], hospitals: [],
@ -248,6 +264,17 @@
}, },
}, },
methods: { methods: {
closeYlbtMask() {
this.showYlbtMask = false
},
goOldAgeAllowanceFromMask() {
this.closeYlbtMask()
this.$u.throttle(
this.$u.route({
url: '/package_sub/pages/OldAgeAllowance/OldAgeAllowance'
})
)
},
goSwiper(e){ goSwiper(e){
var data = this.banners[e] var data = this.banners[e]
if(data.jump_type==1 && data.jump_url){ if(data.jump_type==1 && data.jump_url){
@ -284,6 +311,10 @@
// this.getPhotos() // this.getPhotos()
}, },
goLinks(item) { goLinks(item) {
if (item.upgrade) {
this.$u.toast('功能升级中')
return
}
if (item.to) { if (item.to) {
this.$u.throttle( this.$u.throttle(
this.$u.route({ this.$u.route({
@ -413,7 +444,6 @@
margin-left: 18rpx; margin-left: 18rpx;
} }
&__icon {}
} }
.search-sticky { .search-sticky {
@ -536,8 +566,8 @@
font-size: 0; font-size: 0;
&>image { &>image {
width: 700rpx; width: 100%;
height: 169rpx; height: 223rpx;
} }
} }
@ -853,4 +883,41 @@
} }
} }
} }
.ylbt-mask {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.6);
z-index: 100000;
display: flex;
align-items: center;
justify-content: center;
padding: 48rpx 40rpx;
box-sizing: border-box;
}
.ylbt-mask__box {
position: relative;
width: 100%;
}
.ylbt-mask__close {
position: absolute;
top: -29rpx;
right: -21rpx;
z-index: 2;
padding: 10rpx;
line-height: 1;
background: rgba(0, 0, 0, 0.4);
border-radius: 50%;
}
.ylbt-mask__img {
width: 100%;
display: block;
border-radius: 16rpx;
}
</style> </style>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Loading…
Cancel
Save