From b8452670a1e2b3f415f8111a3c179f3a9a838b11 Mon Sep 17 00:00:00 2001 From: peng <peng.com> Date: 星期二, 16 九月 2025 10:52:17 +0800 Subject: [PATCH] 页面调整 --- pages/order/myOrder.vue | 2 +- pages/passport/wechatMPLogin.vue | 4 ++-- pages/mine/address/add.vue | 18 ++++++++++++++++-- pages/tabbar/index/home.vue | 2 +- pages/commodity-square/commoditySquare.vue | 8 ++++---- 5 files changed, 24 insertions(+), 10 deletions(-) diff --git a/pages/commodity-square/commoditySquare.vue b/pages/commodity-square/commoditySquare.vue index ec242c5..3d23697 100644 --- a/pages/commodity-square/commoditySquare.vue +++ b/pages/commodity-square/commoditySquare.vue @@ -51,10 +51,10 @@ <view class="goodsContent" style="font-size: 24rpx;"> {{item.sellingPoint}} </view> - <view v-if="item.goodsType !=='VIRTUAL_GOODS'" - style="display: flex; justify-content: space-between;align-items:center; 100%;width: 100%;"> - <view class="goodsPrice">锟{item.price}}</view> - <view class="addCard" style="display: flex; align-items: center;"> + <view + style="display: flex; justify-content: space-between;align-items:center;height: 100%;width: 100%;"> + <view class="goodsPrice" style="padding: 20rpx 0;">锟{item.price}}</view> + <view class="addCard" style="display: flex; align-items: center;" v-if="item.goodsType !=='VIRTUAL_GOODS'"> <view style="padding: 20rpx 0 20rpx 20rpx;" v-show="item.cardNum && item.cardNum>0" @click.stop="miousCardNum($event,item.id)"> <uni-icons type="minus" size="30" color="#96a6bc"></uni-icons> diff --git a/pages/mine/address/add.vue b/pages/mine/address/add.vue index 8ba510b..85f14ea 100644 --- a/pages/mine/address/add.vue +++ b/pages/mine/address/add.vue @@ -12,7 +12,7 @@ </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" > @@ -55,6 +55,11 @@ // 鍒ゆ柇褰撳墠绯荤粺鏉冮檺瀹氫綅鏄惁寮�鍚� }, methods: { + changePhone(e) { + console.log('-------------------->鎵嬫満鍙风爜淇敼', e); + // 鍘婚櫎绌烘牸 + this.form.mobile = this.form.mobile.replace(/\s/g, ''); + }, // 鍏抽棴鍦板浘 closeMap() { this.mapFlag = false; @@ -145,6 +150,7 @@ // 淇濆瓨褰撳墠 鍦板潃 save() { + this.$refs.uForm.setRules(this.rules); this.$refs.uForm.validate((valid) => { if (valid) { let pages = getCurrentPages(); //鑾峰彇椤甸潰鏍� @@ -287,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"> diff --git a/pages/order/myOrder.vue b/pages/order/myOrder.vue index 31ac614..c55c741 100644 --- a/pages/order/myOrder.vue +++ b/pages/order/myOrder.vue @@ -107,7 +107,7 @@ shape="circle" class="cancel-btn" size="mini" - v-if="order.couponFlag === 'COUPON'" + v-if="order.couponFlag === 'COUPON'&& order.orderStatus ==='COMPLETED'" @click="openCouponPackage(order)" > 浼樻儬鍒稿崱鍖� diff --git a/pages/passport/wechatMPLogin.vue b/pages/passport/wechatMPLogin.vue index 3732606..f42635d 100644 --- a/pages/passport/wechatMPLogin.vue +++ b/pages/passport/wechatMPLogin.vue @@ -134,8 +134,8 @@ whetherNavigate("wx"); }, backToHome() { - uni.switchTab({ - url: `/pages/tabbar/home/index`, + uni.redirectTo({ + url: `/pages/tabbar/index/home`, }); }, diff --git a/pages/tabbar/index/home.vue b/pages/tabbar/index/home.vue index 2933c58..23cbbdf 100644 --- a/pages/tabbar/index/home.vue +++ b/pages/tabbar/index/home.vue @@ -61,7 +61,7 @@ <!-- 鎮寕鍟嗗搧閾炬帴灞� --> - <view class="goods-link-warp" v-if="item.goodsList.length > 0"> + <view class="goods-link-warp" :style="{ bottom: marginBottom + 55 + 'px' }" v-if="item.goodsList.length > 0"> <view class="goods-link"> <swiper @change="goodsChange" :autoplay="true" :interval="4000" style="height: 120rpx;"> <swiper-item v-for="goods in item.goodsList" :key="goods.goodsId"> -- Gitblit v1.8.0