shish 1 год назад
Родитель
Сommit
138b582f6b

+ 5 - 3
mallApp/src/api/recharge/index.js

@@ -16,9 +16,11 @@ export const updateShop = data => {
     return https.post('/shop/update', data)
 }
 
-/** *
- * 充值记录列表
- */
+//充值记录列表
 export const getRechargeList = data => {
     return https.get('/recharge/list', data)
+}
+
+export const cancelRecharge = data => {
+    return https.get('/recharge/cancel', data)
 }

+ 1 - 1
mallApp/src/pages/home/recent.vue

@@ -31,7 +31,7 @@
                   <view class="popup-overlay" @click="hideMoreOptions"></view>
                   <view class="popup-content">
                     <view class="popup-item" @click="toRechargeClear(item)">
-                      <text>充值结账</text>
+                      <text>充值</text>
                     </view>
                     <view class="popup-item" @click="getRechargeList(item)">
                       <text>充值记录</text>

+ 114 - 2
mallApp/src/pages/member/recharge.vue

@@ -77,11 +77,34 @@
 
 			<view class="btn-wrap">
 				<!-- #ifdef MP-WEIXIN -->
-				<button class="button-com green" @click="wexinPayFn">微信支付</button>
+				<button class="button-com green" @click="showPayConfirm">微信支付</button>
 				<!-- #endif -->
 			</view>
 		</view>
 
+		<!-- 支付确认弹框 -->
+		<ModalModule 
+			:show="payConfirmShow" 
+			title="支付提示" 
+			:custom="true"
+			:button="[]"
+			@click="handlePayConfirm"
+		>
+			<view class="pay-confirm-content">
+				<view class="confirm-icon">
+					<view class="info-icon">i</view>
+				</view>
+				<view class="confirm-text">
+					<view class="text-title">充值金额由门店收取和管理</view>
+					<view class="text-desc">保证余额安全是门店责任,与本小程序无关,小程序只是收款工具</view>
+				</view>
+				<view class="confirm-btn-wrap">
+					<button class="confirm-btn" @click="handleConfirmRecharge">知道了,继续充值</button>
+					<view class="tech-support">花掌柜小程序提供技术支持</view>
+				</view>
+			</view>
+		</ModalModule>
+
 		<wangCg :loginStyle.sync="globalLoginStyle" @goToLogin="loginTo()"></wangCg>
 
 	</view>
@@ -122,7 +145,9 @@ export default {
 			loginComeBack:0,
 			rechargeWeal:0,
 			weal:[],
-			hint:'请输入充值金额'
+			hint:'请输入充值金额',
+			// 支付确认弹框相关
+			payConfirmShow: false
 		}
 	},
 	watch: {
@@ -303,6 +328,20 @@ export default {
 		},
 		viewChange() {
 			this.pageTo({ url:'/pages/balance/changeList?id='+this.id+'&account='+this.account})
+		},
+		// 显示支付确认弹框
+		showPayConfirm() {
+			this.payConfirmShow = true
+		},
+		// 处理支付确认弹框点击
+		handlePayConfirm(e) {
+			// 点击遮罩层关闭弹框
+			this.payConfirmShow = false
+		},
+		// 确认充值
+		handleConfirmRecharge() {
+			this.payConfirmShow = false
+			this.wexinPayFn()
 		}
 	}
 }
@@ -736,4 +775,77 @@ export default {
 		}
 	}
 }
+
+// 支付确认弹框样式
+.pay-confirm-content {
+	padding: 40upx 20upx;
+	text-align: center;
+	
+	.confirm-icon {
+		margin-bottom: 30upx;
+		
+		.info-icon {
+			width: 80upx;
+			height: 80upx;
+			background: #4a90e2;
+			color: #fff;
+			border-radius: 50%;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			font-size: 36upx;
+			font-weight: bold;
+			margin: 0 auto;
+		}
+	}
+	
+	.confirm-text {
+		margin-bottom: 40upx;
+		
+		.text-title {
+			font-size: 32upx;
+			font-weight: bold;
+			color: #333;
+			margin-bottom: 16upx;
+			line-height: 1.4;
+		}
+		
+		.text-desc {
+			font-size: 28upx;
+			color: #3f3e3e;
+			line-height: 1.4;
+		}
+	}
+	
+	.confirm-btn-wrap {
+		.confirm-btn {
+			width: 60%;
+			height: 80upx;
+			background: linear-gradient(135deg, #07c160 0%, #10ad6a 100%);
+			color: #fff;
+			border: none;
+			border-radius: 40upx;
+			font-size: 30upx;
+			font-weight: bold;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			box-shadow: 0 4upx 12upx rgba(7, 193, 96, 0.3);
+			transition: all 0.3s ease;
+			margin: 0 auto 20upx;
+			
+			&:active {
+				transform: scale(0.98);
+				box-shadow: 0 2upx 8upx rgba(7, 193, 96, 0.4);
+			}
+		}
+		
+		.tech-support {
+			font-size: 24upx;
+			color: #999;
+			text-align: center;
+			line-height: 1.4;
+		}
+	}
+}
 </style>

+ 2 - 2
mallApp/src/pages/recharge/detail.vue

@@ -23,11 +23,11 @@
               <view class="label">充值状态</view>
               <view class="value">{{ data.status==0?'待付款':data.status == 1?'已充值':'已取消' }}</view>
             </view>
-            <view class="msg-list">
+            <view class="msg-list" v-if="data.payStatus == 1">
               <view class="label">支付渠道</view>
               <view class="value">{{ data.onlinePay==1?'线下':'线上' }}</view>
             </view>
-            <view class="msg-list">
+            <view class="msg-list" v-if="data.payStatus == 1">
               <view class="label">支付方式</view>
               <view class="value">{{ data.payWay==0?'微信支付':data.status == 1?'支付宝':data.status==4?'现金':'银行卡' }}</view>
             </view>

+ 3 - 3
mallApp/src/pages/recharge/list.vue

@@ -10,7 +10,7 @@
 
     <block v-if="!$util.isEmpty(list.data)">
     <view class="pay_list">
-        <OrderItem v-for="(item, index) in list.data" :key="index" :info="item" @click="goToDetail"></OrderItem>
+        <OrderItem v-for="(item, index) in list.data" :key="index" :info="item" @goDetail="goDetail"></OrderItem>
     </view>
     </block>
     <block v-else>
@@ -26,7 +26,7 @@ import AppTabs from "@/components/plugin/tabs";
 import OrderItem from "./rechargeItem";
 import { list } from "@/mixins";
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
-import { getRechargeList } from "@/api/recharge";
+import { getRechargeList,cancelRecharge } from "@/api/recharge";
 import DateSelect from "@/components/module/dateSelect";
 export default {
   components: {
@@ -143,7 +143,7 @@ export default {
         }
       })
     },
-    goToDetail (val) {
+    goDetail (val) {
       uni.navigateTo({ url: '/pages/recharge/detail?id=' + val.id })
     }
   }

+ 3 - 38
mallApp/src/pages/recharge/rechargeItem.vue

@@ -1,5 +1,5 @@
 <template>
-  <view class="order-item-view" @click="clickItemEvent">
+  <view class="order-item-view" @click="getDetail">
     <view class="item-header">
       <view class="title">
         <image class="icon" :src="info.hdSmallAvatar" alt="" />
@@ -39,11 +39,6 @@
         <text class="iconfont iconxiangyou"></text>
       </view>
     </view>
-    
-    <!-- 操作按钮区域 -->
-    <view class="item-actions" @click.stop>
-      <button class="action-btn" v-if="info.status == 0" @click="handlePay" > 取消 </button>
-    </view>
   </view>
 </template>
 <script>
@@ -78,12 +73,8 @@ export default {
     }
   },
   methods: {
-    clickItemEvent () {
-      this.$emit("click", this.info);
-    },
-    // 支付操作
-    handlePay () {
-      this.$emit("pay", this.info);
+    getDetail () {
+      this.$emit("goDetail", this.info)
     }
   }
 };
@@ -169,31 +160,5 @@ export default {
       }
     }
   }
-  
-  .item-actions {
-    position: relative;
-    padding: 12upx 20upx;
-    margin-top: 35upx;
-    border-top: 1upx solid #f5f5f5;
-    width: 100%;
-    box-sizing: border-box;
-    height: 80upx;
-    
-    .action-btn {
-      position: absolute;
-      right: 35upx;
-      top: 68%;
-      transform: translateY(-50%);
-      padding: 0upx 50upx;
-      border-radius: 10upx;
-      font-size: 26upx;
-      border: none;
-      outline: none;
-      min-width: 140upx;
-      text-align: center;
-      background-color: #FF2842;
-      color: #fff;
-    }
-  }
 }
 </style>