From 796977e24baa7c1d3a333e2c1c8e06ca73fd9a56 Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期三, 19 十一月 2025 18:08:35 +0800
Subject: [PATCH] 优惠劵
---
pages/mine/address/add.vue | 27 ++++++++++++++++++++-------
1 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/pages/mine/address/add.vue b/pages/mine/address/add.vue
index 2237280..85f14ea 100644
--- a/pages/mine/address/add.vue
+++ b/pages/mine/address/add.vue
@@ -3,16 +3,16 @@
<div class="uForm">
<u-form :border-bottom="false" :model="form" ref="uForm" :error-type="['toast']" :rule="rules">
<!-- #ifndef H5 -->
- <view class="selectAddress" @click="clickUniMap">
+<!-- <view class="selectAddress" @click="clickUniMap">
閫夋嫨鏀惰揣鍦板潃
- </view>
+ </view> -->
<!-- #endif -->
<u-form-item class="border" label="鏀惰揣浜�" label-width="130" prop="name">
<u-input v-model="form.name" clearable placeholder="璇疯緭鍏ユ敹璐т汉濮撳悕" />
</u-form-item>
<u-form-item label="鎵嬫満鍙风爜" label-width="130" prop="mobile">
- <u-input v-model="form.mobile" type="number" maxlength="11" placeholder="璇疯緭鍏ユ敹璐т汉鎵嬫満鍙风爜" />
+ <u-input v-model="form.mobile" type="number" maxlength="15" placeholder="璇疯緭鍏ユ敹璐т汉鎵嬫満鍙风爜" />
</u-form-item>
<u-form-item label="鎵�鍦ㄥ尯鍩�" label-width="130" prop="___path">
<div @click="showPicker" >
@@ -43,8 +43,8 @@
import '@/components/uview-components/uview-ui';
import { addAddress, editAddress, getAddressDetail } from "@/api/address.js";
-import city from "@/components/m-city/m-city.vue";
-import uniMap from "@/components/uniMap";
+import city from "@/pages/mine/m-city/m-city.vue";
+import uniMap from "@/pages/mine/uniMap.vue";
import permision from "@/js_sdk/wa-permission/permission.js";
export default {
components: {
@@ -55,6 +55,11 @@
// 鍒ゆ柇褰撳墠绯荤粺鏉冮檺瀹氫綅鏄惁寮�鍚�
},
methods: {
+ changePhone(e) {
+ console.log('-------------------->鎵嬫満鍙风爜淇敼', e);
+ // 鍘婚櫎绌烘牸
+ this.form.mobile = this.form.mobile.replace(/\s/g, '');
+ },
// 鍏抽棴鍦板浘
closeMap() {
this.mapFlag = false;
@@ -125,7 +130,6 @@
// 閫夋嫨鍦板潃鍚庢暟鎹殑鍥炶皟
callBackAddress(val) {
- console.log(val)
uni.showLoading({
title: "鍔犺浇涓�",
});
@@ -146,6 +150,7 @@
// 淇濆瓨褰撳墠 鍦板潃
save() {
+ this.$refs.uForm.setRules(this.rules);
this.$refs.uForm.validate((valid) => {
if (valid) {
let pages = getCurrentPages(); //鑾峰彇椤甸潰鏍�
@@ -288,8 +293,16 @@
},
// 鍒濆鍖杛ules蹇呴』瑕佸湪onReady鐢熷懡鍛ㄦ湡锛屽洜涓簅nLoad鐢熷懡鍛ㄦ湡缁勪欢鍙兘灏氭湭鍒涘缓瀹屾瘯
onReady() {
- this.$refs.uForm.setRules(this.rules);
+ // this.$refs.uForm.setRules(this.rules);
},
+ watch:{
+ 'form.mobile': function(newVal, oldVal) {
+ // 褰撴墜鏈哄彿鍙樺寲鏃讹紝鑷姩鍘婚櫎绌烘牸
+ if (newVal && typeof newVal === 'string') {
+ this.form.mobile = newVal.replace(/\s/g, '');
+ }
+ }
+ }
};
</script>
<style scoped lang="scss">
--
Gitblit v1.8.0