Files
pupil/packageMy/memberCenter/memberCenter.vue
2023-01-05 21:57:51 +08:00

87 lines
2.2 KiB
Vue

<template>
<view>
<u-navbar :autoBack="true" title="会员中心"></u-navbar>
<u--image src="/static/my/wo_icon_hyzxbj.png" width="750rpx" height="349rpx" :lazy-load="true">
</u--image>
<myAvatar :center="show"></myAvatar>
<myForm ref="nameAndphone"></myForm>
<view class="commitment">
{{commitment}}
</view>
<u-button type="success" text="升级VIP" color="#0EBB5B" @click="showModal()"></u-button>
<u-modal :show="showM" closeOnClickOverlay confirmText="确定" @confirm="confirm" @close="close">
<rich-text :nodes="content"></rich-text>
</u-modal>
</view>
</template>
<script>
export default {
data() {
return {
name: '',
phone: '',
showM: false,
//会员中心的用户名旁边不显示edit图标
show: false,
content: `请保持手机畅通<br>
客服会及时联系您`,
commitment: '承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置'
}
},
onLoad() {
this.name = this.$refs.nameAndphone.model.userInfo.name
this.phone = this.$refs.nameAndphone.model.userInfo.phone
},
methods: {
// 联系客服模态框
showModal() {
this.showM = true
},
confirm() {
this.showM = false
this.$apiServe.bindComponyAndUpdate({
uid: 1,
type: 2,
companyPhone: this.phone,
companyName: this.name
}).then(res => {
console.log('升级VIP', res);
}).finally(_ => {})
},
cancel() {
this.showM = false
},
close() {
this.showM = false
},
}
}
</script>
<style lang="scss">
.commitment {
font-size: 26rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #C8C8C8;
line-height: 28rpx;
margin: 40rpx 66rpx;
}
.u-button {
width: 644rpx !important;
height: 86rpx !important;
background: #0EBB5B;
border-radius: 20rpx !important;
}
.u-modal__content {
padding: 43rpx 104rpx !important;
text-indent: 14rpx;
}
</style>