|
|
@@ -1,28 +1,27 @@
|
|
|
const _Http = getApp().globalData.http;
|
|
|
Page({
|
|
|
data: {
|
|
|
- /* {
|
|
|
+ form: [{
|
|
|
label: "联系人",
|
|
|
error: false,
|
|
|
errMsg: "",
|
|
|
type: "text",
|
|
|
value: "",
|
|
|
- placeholder: "请填写",
|
|
|
+ placeholder: "联系人",
|
|
|
valueName: "name",
|
|
|
required: true,
|
|
|
checking: "base"
|
|
|
}, {
|
|
|
- label: "手机号",
|
|
|
+ label: "联系方式",
|
|
|
error: false,
|
|
|
errMsg: "",
|
|
|
type: "number",
|
|
|
value: "",
|
|
|
- placeholder: "收货人手机号码",
|
|
|
+ placeholder: "联系方式",
|
|
|
valueName: "phonenumber",
|
|
|
required: true,
|
|
|
checking: "phone"
|
|
|
- }, */
|
|
|
- form: [{
|
|
|
+ }, {
|
|
|
label: "省市县",
|
|
|
error: false,
|
|
|
errMsg: "",
|
|
|
@@ -30,7 +29,7 @@ Page({
|
|
|
value: [],
|
|
|
placeholder: "省,市,县",
|
|
|
valueName: "region",
|
|
|
- required: false
|
|
|
+ required: true
|
|
|
}, {
|
|
|
label: "详细地址",
|
|
|
error: false,
|
|
|
@@ -65,14 +64,17 @@ Page({
|
|
|
})
|
|
|
if (options.data) {
|
|
|
let item = JSON.parse(options.data)
|
|
|
+ console.log(item)
|
|
|
this.setData({
|
|
|
content: {
|
|
|
...this.data.content,
|
|
|
...item
|
|
|
},
|
|
|
"content.isdefault": item.isdefault,
|
|
|
- 'form[0].value': [item.province, item.city, item.county],
|
|
|
- 'form[1].value': item.address,
|
|
|
+ 'form[0].value': item.name,
|
|
|
+ 'form[1].value': item.phonenumber,
|
|
|
+ 'form[2].value': [item.province, item.city, item.county],
|
|
|
+ 'form[3].value': item.address,
|
|
|
tags: item.tag,
|
|
|
'content.isdefault': item.isdefault,
|
|
|
"disabled": false
|