rk
5 天以前 8caa1157044d2229e56a288cc5665fadf526dd45
small-program/pages/new-address/new-address.vue
@@ -10,7 +10,7 @@
         <view class="list-item">
            <view class="list-item-label">联系电话</view>
            <view class="list-item-input">
               <input type="text" placeholder="请输入联系电话" v-model="form.phone" />
               <input type="text" placeholder="请输入联系电话" v-model="form.phone" maxlength="11" />
            </view>
         </view>
         <view class="list-item" @click="show = true">
@@ -111,7 +111,8 @@
         chooseLocation() {
            uni.chooseLocation({
               success: (res) => {
                  this.form.addr = res.name
                  console.log(res,"============================")
                  this.form.addr = res.address
                  this.form.latitude = res.latitude
                  this.form.longitude = res.longitude
               },
@@ -145,6 +146,13 @@
               title: '联系电话不能为空!',
               icon: 'none'
            })
            const phoneReg = /^1\d{10}$/
            if (!phoneReg.test(this.form.phone)) {
               return uni.showToast({
                  title: '请输入正确的手机号格式',
                  icon: 'none'
               })
            }
            if (!this.form.areaName) return uni.showToast({
               title: '所在地区不能为空!',
               icon: 'none'