|
@@ -5,68 +5,53 @@
|
|
|
</config>
|
|
</config>
|
|
|
<template>
|
|
<template>
|
|
|
<div>
|
|
<div>
|
|
|
- <!-- <van-field
|
|
|
|
|
- type="text"
|
|
|
|
|
- clearable
|
|
|
|
|
- placeholder="请输入..."
|
|
|
|
|
- :value="message"
|
|
|
|
|
- focus
|
|
|
|
|
- @input="message = $event.detail"
|
|
|
|
|
- @comfirm="message = $event.detail"
|
|
|
|
|
- /> -->
|
|
|
|
|
- <van-cell-group>
|
|
|
|
|
- <van-field
|
|
|
|
|
- :value="form.name"
|
|
|
|
|
- @input="form.name = $event.detail"
|
|
|
|
|
- placeholder="请填写您的姓名"
|
|
|
|
|
- label="联系人"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <van-cell-group :border="false">
|
|
|
|
|
+ <van-field :value="name" @input="name = $event.detail" placeholder="请填写您的姓名" label="联系人" />
|
|
|
<van-field
|
|
<van-field
|
|
|
type="number"
|
|
type="number"
|
|
|
- :value="form.phone"
|
|
|
|
|
- @input="form.phone = $event.detail"
|
|
|
|
|
|
|
+ :value="phone"
|
|
|
|
|
+ :border="false"
|
|
|
|
|
+ class="aa"
|
|
|
|
|
+ @input="phone = $event.detail"
|
|
|
placeholder="请填写您的手机号码"
|
|
placeholder="请填写您的手机号码"
|
|
|
label="手机号"
|
|
label="手机号"
|
|
|
/>
|
|
/>
|
|
|
</van-cell-group>
|
|
</van-cell-group>
|
|
|
- <div class="submit">
|
|
|
|
|
- <van-button type="primary" block @click="submit"> 保存</van-button>
|
|
|
|
|
|
|
+ <div class="bottom">
|
|
|
|
|
+ <div class="submit">
|
|
|
|
|
+ <van-button type="primary" block @click="submit"> 确定</van-button>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
|
+import { mapState } from 'vuex';
|
|
|
export default {
|
|
export default {
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
name: '',
|
|
name: '',
|
|
|
phone: '',
|
|
phone: '',
|
|
|
- key: 'nickname'
|
|
|
|
|
|
|
+ key: 'nickname',
|
|
|
|
|
+ key2: 'phone'
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
|
|
+ computed: {
|
|
|
|
|
+ ...mapState(['userInfo'])
|
|
|
|
|
+ },
|
|
|
onShow() {
|
|
onShow() {
|
|
|
- let eventChannel = this.$mp.page.getOpenerEventChannel();
|
|
|
|
|
- if (eventChannel && eventChannel.on) {
|
|
|
|
|
- eventChannel.on('message', data => {
|
|
|
|
|
- this.message = data;
|
|
|
|
|
- });
|
|
|
|
|
- eventChannel.on('title', data => {
|
|
|
|
|
- wx.setNavigationBarTitle({
|
|
|
|
|
- title: data.title
|
|
|
|
|
- });
|
|
|
|
|
- this.key = data.key;
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ this.name = this.userInfo.nickname;
|
|
|
|
|
+ this.phone = this.userInfo.phone;
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
submit() {
|
|
submit() {
|
|
|
let pages = getCurrentPages();
|
|
let pages = getCurrentPages();
|
|
|
let prevPage = pages[pages.length - 2];
|
|
let prevPage = pages[pages.length - 2];
|
|
|
-
|
|
|
|
|
wx.navigateBack({
|
|
wx.navigateBack({
|
|
|
success: res => {
|
|
success: res => {
|
|
|
prevPage.rootVM.updateInfo({
|
|
prevPage.rootVM.updateInfo({
|
|
|
- [this.key]: this.message
|
|
|
|
|
|
|
+ [this.key]: this.name,
|
|
|
|
|
+ [this.key2]: this.phone
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
@@ -83,8 +68,6 @@ export default {
|
|
|
/deep/ .van-cell {
|
|
/deep/ .van-cell {
|
|
|
--cell-vertical-padding: 23px;
|
|
--cell-vertical-padding: 23px;
|
|
|
--cell-horizontal-padding: 20px;
|
|
--cell-horizontal-padding: 20px;
|
|
|
- --field-label-color: #000000;
|
|
|
|
|
- --cell-text-color: #000;
|
|
|
|
|
.van-field__label,
|
|
.van-field__label,
|
|
|
.van-cell__title {
|
|
.van-cell__title {
|
|
|
font-weight: bold;
|
|
font-weight: bold;
|
|
@@ -97,12 +80,17 @@ export default {
|
|
|
.van-cell__value {
|
|
.van-cell__value {
|
|
|
text-align: left;
|
|
text-align: left;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
&::after {
|
|
&::after {
|
|
|
- left: 100px !important;
|
|
|
|
|
|
|
+ left: 0 !important;
|
|
|
|
|
+ right: 0 !important;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-.submit {
|
|
|
|
|
- margin: 81px 43px 100px;
|
|
|
|
|
|
|
+.bottom {
|
|
|
|
|
+ background: #f5f7fa;
|
|
|
|
|
+ min-height: 590px;
|
|
|
|
|
+ .submit {
|
|
|
|
|
+ margin: 0px 43px;
|
|
|
|
|
+ padding-top: 62px;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|