|
@@ -99,14 +99,14 @@
|
|
|
<view class="order-body">
|
|
<view class="order-body">
|
|
|
<view class="form-feedbak">
|
|
<view class="form-feedbak">
|
|
|
<view class="title"><text>*</text>姓名</view>
|
|
<view class="title"><text>*</text>姓名</view>
|
|
|
- <view class="form-textarea">
|
|
|
|
|
- <input v-model="addressForm.nickname" placeholder="请输入" class="u-input" />
|
|
|
|
|
|
|
+ <view class="form-textarea">
|
|
|
|
|
+ <input :value="addressForm.nickname" @blur="handleBlur" data-field="nickname" placeholder="请输入" class="u-input" />
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="form-feedbak">
|
|
<view class="form-feedbak">
|
|
|
<view class="title"><text>*</text>手机号码</view>
|
|
<view class="title"><text>*</text>手机号码</view>
|
|
|
- <view class="form-textarea">
|
|
|
|
|
- <input v-model="addressForm.mobile" placeholder="请填写手机号码" class="u-input" />
|
|
|
|
|
|
|
+ <view class="form-textarea">
|
|
|
|
|
+ <input :value="addressForm.mobile" @blur="handleBlur" data-field="mobile" placeholder="请输入" class="u-input" />
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="form-feedbak">
|
|
<view class="form-feedbak">
|
|
@@ -118,8 +118,8 @@
|
|
|
</view>
|
|
</view>
|
|
|
<view class="form-feedbak">
|
|
<view class="form-feedbak">
|
|
|
<view class="title"><text>*</text>详细地址</view>
|
|
<view class="title"><text>*</text>详细地址</view>
|
|
|
- <view class="form-textarea">
|
|
|
|
|
- <input v-model="addressForm.address" placeholder="请输入" class="u-input" />
|
|
|
|
|
|
|
+ <view class="form-textarea">
|
|
|
|
|
+ <input :value="addressForm.address" @blur="handleBlur" data-field="address" placeholder="请输入" class="u-input" />
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -274,6 +274,14 @@ export default {
|
|
|
// this.videoPlayer.context = uni.createVideoContext('videoPlayer', this);
|
|
// this.videoPlayer.context = uni.createVideoContext('videoPlayer', this);
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ handleBlur(event){
|
|
|
|
|
+ // 通过 data-field 获取字段名
|
|
|
|
|
+ const field = event.currentTarget.dataset.field;
|
|
|
|
|
+ // 在失焦时,将输入框的最终值赋给数据
|
|
|
|
|
+ this.addressForm[field] = event.detail.value;
|
|
|
|
|
+ // 可以在这里执行校验等后续操作
|
|
|
|
|
+ console.log(`字段 ${field} 的最终值为:`, this.addressForm[field]);
|
|
|
|
|
+ },
|
|
|
initPush(){
|
|
initPush(){
|
|
|
var _this = this;
|
|
var _this = this;
|
|
|
this.pushObj = new Push({
|
|
this.pushObj = new Push({
|
|
@@ -307,6 +315,7 @@ export default {
|
|
|
formData.order = JSON.stringify(this.addressData);
|
|
formData.order = JSON.stringify(this.addressData);
|
|
|
this.submitState = true;
|
|
this.submitState = true;
|
|
|
Api.address(formData).then((res)=>{
|
|
Api.address(formData).then((res)=>{
|
|
|
|
|
+ this.submitState = false;
|
|
|
if (res.code == 0) {
|
|
if (res.code == 0) {
|
|
|
return this.$dialog.showSuccess(res.msg);
|
|
return this.$dialog.showSuccess(res.msg);
|
|
|
}
|
|
}
|
|
@@ -385,7 +394,7 @@ export default {
|
|
|
return ;
|
|
return ;
|
|
|
}
|
|
}
|
|
|
this.orderLoading = true;
|
|
this.orderLoading = true;
|
|
|
- Api.order({"size":this.size,"page":this.orderPage}).then((res)=>{
|
|
|
|
|
|
|
+ Api.order({"size":this.size,"page":this.orderPage,"status":2}).then((res)=>{
|
|
|
this.orderLoading = false;
|
|
this.orderLoading = false;
|
|
|
if (res.code == 0) {
|
|
if (res.code == 0) {
|
|
|
return this.$dialog.showSuccess(res.msg)
|
|
return this.$dialog.showSuccess(res.msg)
|
|
@@ -751,7 +760,8 @@ export default {
|
|
|
},
|
|
},
|
|
|
blured(){
|
|
blured(){
|
|
|
this.isFocus = false;
|
|
this.isFocus = false;
|
|
|
- this.keyboardHeight = 0
|
|
|
|
|
|
|
+ this.keyboardHeight = 0
|
|
|
|
|
+ // this.text = event.detail.value;
|
|
|
},
|
|
},
|
|
|
// 获取焦点
|
|
// 获取焦点
|
|
|
focus(e) {
|
|
focus(e) {
|