|
|
@@ -28,6 +28,7 @@ Page({
|
|
|
name: '',
|
|
|
phoneNumber: ''
|
|
|
},
|
|
|
+ userNote: '', // 购买人手机号
|
|
|
userBeneficiaryId: '', // 添加购买人信息
|
|
|
userBeneficiaryInfo: {
|
|
|
name: '',
|
|
|
@@ -331,13 +332,20 @@ Page({
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- if (!this.data.userBeneficiaryId) {
|
|
|
+ if (!this.data.userNote || !/^1[3456789]\d{9}$/.test(this.data.userNote)) {
|
|
|
wx.showToast({
|
|
|
- title: '请添加购买人',
|
|
|
- icon: 'none'
|
|
|
+ title: '请输入正确的手机号',
|
|
|
+ icon: "none"
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
+ // if (!this.data.userBeneficiaryId) {
|
|
|
+ // wx.showToast({
|
|
|
+ // title: '请添加购买人',
|
|
|
+ // icon: 'none'
|
|
|
+ // })
|
|
|
+ // return
|
|
|
+ // }
|
|
|
wx.showLoading({
|
|
|
mask: true,
|
|
|
title: "订单提交中...",
|
|
|
@@ -384,6 +392,7 @@ Page({
|
|
|
"goodsInfos": goodsInfos,
|
|
|
receiveAddress: this.data.receiveAddress,
|
|
|
userBeneficiaryId: this.data.userBeneficiaryId,
|
|
|
+ userNote: this.data.userNote,
|
|
|
"orderName": name,
|
|
|
"orderDesc": name
|
|
|
})
|