소스 검색

fix: 修复了储值服务的自定义输入,输入除数字外的值提示内容有误

xuyunhui 2 년 전
부모
커밋
5793ac72b0

+ 12 - 4
myPages/recharge/index.vue

@@ -190,11 +190,17 @@
 				}
 
         if(!this.reqOrderParm.strategyId){
-          if(this.reqOrderParm.rechargeAmount <1 ||this.reqOrderParm.rechargeAmount>100){
-            console.log(1111111111)
+          if(parseFloat(this.reqOrderParm.rechargeAmount).toString() == "NaN" ){
             uni.showToast({
               icon: 'none',
-              title: '任意充金额须在1-100之间'
+              title: '请输入正确的金额'
+            });
+            return;
+          }
+          if(this.reqOrderParm.rechargeAmount <1 ||this.reqOrderParm.rechargeAmount>100 ){
+            uni.showToast({
+              icon: 'none',
+              title: '任意充金额须在1-100之间 并且必须为数字'
             });
             return;
           }
@@ -226,7 +232,9 @@
           that.reqPayParm.orderNo = res.data.data.orderNo;
           // 调用微信支付
           that.wechatPay();
-        })
+        }).catch((res)=>{
+          console.log(res,'222222')
+            })
       },
 
 			// 微信支付

+ 12 - 6
myPages/serviceObjectAllInfo/index.vue

@@ -331,9 +331,12 @@
                         })
                         setTimeout(()=>{
                             this.requestStatus=false
-                            uni.redirectTo({
-                                url: '/myPages/ServiceObjectManagement/index'
-                            });
+                            // uni.reLaunch({
+                            //     url: '/myPages/ServiceObjectManagement/index'
+                            // });
+                          uni.navigateBack({
+                            delta: 1
+                          });
                         },2000)
 
                     }).catch(()=>{
@@ -350,9 +353,12 @@
                         })
                         setTimeout(()=>{
                             this.requestStatus=false
-                            uni.redirectTo({
-                                url: '/myPages/ServiceObjectManagement/index'
-                            });
+                            // uni.reLaunch({
+                            //     url: '/myPages/ServiceObjectManagement/index'
+                            // });
+                          uni.navigateBack({
+                            delta: 1
+                          });
                         },2000)
 
                     }).catch(()=>{

+ 12 - 6
myPages/serviceObjectInfo/index.vue

@@ -162,9 +162,12 @@
                         // 去服务对象列表页
                         setTimeout(()=>{
                             this.requestStatus=false
-                            uni.redirectTo({
-                                url: '/myPages/ServiceObjectManagement/index',
-                            })
+                            // uni.reLaunch({
+                            //     url: '/myPages/ServiceObjectManagement/index',
+                            // })
+                          uni.navigateBack({
+                            delta: 1
+                          });
                         },3000)
                     }).catch(()=>{
                         this.requestStatus=false
@@ -178,9 +181,12 @@
                         // 去服务对象列表页
                         setTimeout(()=>{
                             this.requestStatus=false
-                            uni.redirectTo({
-                                url: '/myPages/ServiceObjectManagement/index',
-                            })
+                            // uni.redirectTo({
+                            //     url: '/myPages/ServiceObjectManagement/index',
+                            // })
+                          uni.navigateBack({
+                            delta: 1
+                          });
                         },3000)
                     }).catch(()=>{
                         this.requestStatus=false

+ 1 - 2
myPages/setting/setting-telphone.vue

@@ -86,8 +86,7 @@
         <view style="height:10px"></view>
         <view class="button-popup">
           <button class="h-btn" style="background-color: #EEEEEE;" @click="popupClose()">取消</button>
-          <view class="h-btn" style="background-color: #FFE05C;" @click="getPhoneCode()"
-                :disabled="currentStep === steps.length - 1">
+          <view class="h-btn" style="background-color: #FFE05C;" @click="getPhoneCode()">
             <text>确定</text>
           </view>
         </view>

+ 25 - 6
myPages/transactionRecord/index.vue

@@ -15,7 +15,7 @@
             <view class="statistics flex-row justify-between ">
 
 
-                <picker class="picker" @change="sureChooseDate" mode='date' fields="month"  range-key="label" >
+                <picker class="picker" :end="endDate" @change="sureChooseDate" mode='date' fields="month"  range-key="label" >
                     <view class="left flex-row">
                         <text>{{dataTime || '全部'}}</text>
                         <image class="xialaImage" src="/static/transaction/u5.png"></image>
@@ -23,13 +23,13 @@
                 </picker>
 
                 <view v-if="dataTime" class="left flex-row" @click="showDate">
-                    <text> 全部</text>
+                    <text>全部</text>
                 </view>
 
                 <view class="right flex-row justify-around">
-                    <text>新增{{tranFlowstatistic.rechargeAmount || 0}}</text>
-                    <text>消费-{{tranFlowstatistic.consumeAmount || 0 }}</text>
-                    <text>退款-{{tranFlowstatistic.refundAmount || 0 }}</text>
+                    <text>新增:{{tranFlowstatistic.rechargeAmount || 0}}</text>
+                    <text>消费:{{tranFlowstatistic.consumeAmount || 0 }}</text>
+                    <text>退款:{{tranFlowstatistic.refundAmount || 0 }}</text>
                 </view>
             </view>
 
@@ -89,8 +89,27 @@
             // 查询交流流水统计
             this.transactionFlowstatistic();
         },
+      computed: {
+        endDate() {
+          return this.getDate('end');
+        }
+      },
         methods: {
-
+          getDate(type) {
+            const date = new Date();
+            let year = date.getFullYear();
+            let month = date.getMonth() + 1;
+            let day = date.getDate();
+
+            if (type === 'start') {
+              year = year - 60;
+            } else if (type === 'end') {
+              year = year ;
+            }
+            month = month > 9 ? month : '0' + month;
+            day = day > 9 ? day : '0' + day;
+            return `${year}-${month}-${day}`;
+          },
             clickTab(e){
                 this.tabIndex = e.index
             },

+ 1 - 1
myPages/transactionRecord/module/mescrollUni-item.vue

@@ -11,7 +11,7 @@
 
 			<view class="item" v-for="(item,index) in list" :key="index">
 				<view class="flex-row justify-between" @click="goOrderDetail(item)">
-					<view class="leftText" :class="{'backColor1':item.tradeNoType == '1','backColor2':item.tradeNoType == '2','backColor3':item.tradeNoType == '3','backColor4':item.tradeNoType == '4' }">
+					<view class="leftText" :class="{'backColor1':item.tradeNoType == '1','backColor2':item.tradeNoType == '2','backColor3':item.tradeNoType == '3','backColor4':item.tradeNoType == '4','backColor2':item.tradeNoType == '5' }">
 						<text v-if="item.tradeType == '1'">增加</text>
 						<text v-if="item.tradeType == '2'">减少</text>
 					</view>

+ 30 - 8
myPages/userInfo/index.vue

@@ -45,7 +45,7 @@
 				<view class="key flex-col justify-center ">
 					<text>生日</text>
 				</view>
-				<picker class="picker" @change="birthdayChange" mode='date'  range-key="label" >
+				<picker class="picker" :end="endDate" @change="birthdayChange" mode='date'  range-key="label" >
 					<view class="flex-row justify-end groupItemContent">
 						<text>{{userInfo.birthday || '请选择出生日期' }}</text>
 						<u-icon name="arrow-right" color="#666" size="18"></u-icon>
@@ -98,19 +98,41 @@ export default {
 	},
 	mounted() {
 	},
+  onLoad(){
+    // 用户信息
+    this.userInfo = uni.getStorageSync('userInfo')
+
+    if (this.userInfo.selfPhoto){
+      this.getImgUrlByOssId(this.userInfo.selfPhoto)
+    }
+  },
 	onShow() {
 
-		// 用户信息
-		this.userInfo = uni.getStorageSync('userInfo')
-
-		if (this.userInfo.selfPhoto){
-			this.getImgUrlByOssId(this.userInfo.selfPhoto)
-		}
+    this.userInfo.phone = uni.getStorageSync('userInfo').phone
 
 
 	},
+  computed: {
+    endDate() {
+      return this.getDate('end');
+    }
+  },
 	methods: {
-
+    getDate(type) {
+      const date = new Date();
+      let year = date.getFullYear();
+      let month = date.getMonth() + 1;
+      let day = date.getDate();
+
+      if (type === 'start') {
+        year = year - 60;
+      } else if (type === 'end') {
+        year = year ;
+      }
+      month = month > 9 ? month : '0' + month;
+      day = day > 9 ? day : '0' + day;
+      return `${year}-${month}-${day}`;
+    },
 		settingTelphone(){
 			uni.navigateTo({
 				url:'/myPages/setting/setting-telphone'

+ 0 - 1
storePages/store/store-choose.vue

@@ -8,7 +8,6 @@
                  :latitude="latitude"
                  :longitude="longitude"
                  :scale="scale"
-                 :show-location="true"
                  :enable-building="true"
                  :markers="markers"
                  :show-location="false"