Pārlūkot izejas kodu

客户地址修改

xiaohaizhao 3 gadi atpakaļ
vecāks
revīzija
eabbcc6409

+ 11 - 9
packageA/setclient/modules/address/add/index.js

@@ -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

+ 3 - 0
packageA/setclient/modules/address/list/index.wxml

@@ -1,6 +1,9 @@
 <van-radio-group value="{{ radio }}" bind:change="radioChange">
     <view class="add-box" wx:for="{{list}}" wx:key="changeuserid">
         <view class="detail">
+            <view class="label" style="padding-left: 42rpx;">
+                {{item.name}} {{item.phonenumber}}
+            </view>
             <view class="label">
                 <text class="iconfont icon-a-wodemendianxinxidizhi" style="color: #3874F6;" /> {{item.province + item.city + item.county + item.address}}
             </view>