shish 1 tahun lalu
induk
melakukan
e6fc5138a7

+ 26 - 61
mallApp/src/pages/member/recharge.vue

@@ -17,7 +17,7 @@
 				<view class="balance-info">
 				<view class="balance-info">
 					<view v-if="hdInfo.balance >= 0" class="balance-item positive">
 					<view v-if="hdInfo.balance >= 0" class="balance-item positive">
 						<view class="balance-label">账户余额</view>
 						<view class="balance-label">账户余额</view>
-						<view class="balance-amount">¥{{ hdInfo.balance?parseFloat(hdInfo.balance).toFixed(2):0.00 }}</view>
+						<view class="balance-amount">¥{{ hdInfo.balance?parseFloat(hdInfo.balance):0 }}</view>
 						<view class="action-buttons">
 						<view class="action-buttons">
 							<view class="action-btn bill-btn" @click="viewHasBill">
 							<view class="action-btn bill-btn" @click="viewHasBill">
 								<view class="btn-icon bill-icon"></view>
 								<view class="btn-icon bill-icon"></view>
@@ -33,7 +33,7 @@
 					<view v-else class="balance-item negative">
 					<view v-else class="balance-item negative">
 						<view class="debt-info">
 						<view class="debt-info">
 							<view class="debt-label">账户欠账</view>
 							<view class="debt-label">账户欠账</view>
-							<view class="debt-amount">¥{{ hdInfo.balance?Math.abs(parseFloat(hdInfo.balance)).toFixed(2):0.00 }}</view>
+							<view class="debt-amount">¥{{ hdInfo.balance?Math.abs(parseFloat(hdInfo.balance)):0 }}</view>
 						</view>
 						</view>
 						<view class="action-buttons">
 						<view class="action-buttons">
 							<view class="action-btn bill-btn" @click="viewBill">
 							<view class="action-btn bill-btn" @click="viewBill">
@@ -53,30 +53,8 @@
 				<pay-input-module :focus="inpFocus" :num="amount" :hint="hint" @focusFn="focusFn" @blurFn="blurFn" @clickKey="clickKeyFn" />
 				<pay-input-module :focus="inpFocus" :num="amount" :hint="hint" @focusFn="focusFn" @blurFn="blurFn" @clickKey="clickKeyFn" />
 			</view>
 			</view>
 
 
-			<view style="text-align: center;" v-if="hdInfo.balance > 0 && (rechargeWeal == 1 || rechargeWeal == 2)">
-
-				<view v-if="rechargeWeal == 1" style="font-size:34upx;">
-					<view v-for="(item,index) in weal" :key="index" style="margin-top:56upx;">
-						<view @click="getRecharge(item.recharge)">
-							充值{{ item.recharge }}元 升{{ item.name }} ({{item.discount*100}}折)
-							<text style="margin-left:20upx;color:#3385FF;font-weight:bold;">选这个</text>
-						</view>
-					</view>
-				</view>
-
-				<view v-if="rechargeWeal == 2" style="font-size:34upx;">
-					<view v-for="(item,index) in weal" :key="index" style="margin-top:56upx;">
-					<view @click="getRecharge(item.recharge)">
-						充值{{ item.recharge }}元 送{{ item.give }}元
-						<text style="margin-left:20upx;color:#3385FF;font-weight:bold;">选这个</text>
-					</view>
-					</view>
-				</view>
-
-			</view>
-
 			<!-- 充值福利提示 -->
 			<!-- 充值福利提示 -->
-			<view class="welfare-tip-container">
+			<view class="welfare-tip-container" v-if="hdInfo.balance >= 0 && (rechargeWeal == 1 || rechargeWeal == 2)">
 				<view class="welfare-tip-wrap" @click="showWelfareModal">
 				<view class="welfare-tip-wrap" @click="showWelfareModal">
 					<view class="tip-icon"></view>
 					<view class="tip-icon"></view>
 					<view class="tip-text">充值福利</view>
 					<view class="tip-text">充值福利</view>
@@ -92,14 +70,7 @@
 		</view>
 		</view>
 
 
 		<!-- 支付确认弹框 -->
 		<!-- 支付确认弹框 -->
-		<ModalModule 
-			:show="payConfirmShow" 
-			title="支付提示" 
-			:custom="true"
-			:button="[]"
-			width="95%"
-			@click="handlePayConfirm"
-		>
+		<ModalModule :show="payConfirmShow" title="支付提示" :custom="true" :button="[]" width="95%" @click="handlePayConfirm" >
 			<view class="pay-confirm-content">
 			<view class="pay-confirm-content">
 				<view class="confirm-icon">
 				<view class="confirm-icon">
 					<view class="info-icon">i</view>
 					<view class="info-icon">i</view>
@@ -117,30 +88,30 @@
 		</ModalModule>
 		</ModalModule>
 
 
 		<!-- 福利选择弹框 -->
 		<!-- 福利选择弹框 -->
-		<ModalModule 
-			:show="welfareModalShow" 
-			title="充值福利" 
-			:custom="true"
-			:button="[]"
-			width="95%"
-			@click="handleWelfareModal"
-		>
+		<ModalModule :show="welfareModalShow" title="充值福利" :custom="true" :button="[]" width="95%" @click="handleWelfareModal" >
 			<view class="welfare-modal-content">
 			<view class="welfare-modal-content">
 				<view class="welfare-title">充值福利</view>
 				<view class="welfare-title">充值福利</view>
-				<view class="welfare-list">
-					<view 
-						v-for="(item, index) in welfareOptions" 
-						:key="index"
-						class="welfare-item"
-						@click="selectWelfare(item)"
-					>
+
+				<view class="welfare-list" v-if="rechargeWeal == 1">
+					<view v-for="(item, index) in weal" :key="index" class="welfare-item" @click="selectWelfare(item)" >
+						<view class="welfare-info">
+							<view class="welfare-amount">充值{{item.recharge}}元</view>
+							<view class="welfare-gift">送{{item.give}}元</view>
+						</view>
+						<view class="welfare-tag">立即充值</view>
+					</view>
+				</view>
+
+				<view class="welfare-list" v-else>
+					<view v-for="(item, index) in weal" :key="index" class="welfare-item" @click="selectWelfare(item)" >
 						<view class="welfare-info">
 						<view class="welfare-info">
 							<view class="welfare-amount">充值{{item.recharge}}元</view>
 							<view class="welfare-amount">充值{{item.recharge}}元</view>
-							<view class="welfare-gift">送{{item.gift}}元</view>
+							<view class="welfare-gift">升{{ item.name }} ({{item.discount*100}}折)</view>
 						</view>
 						</view>
-						<view class="welfare-tag">立即选择</view>
+						<view class="welfare-tag">立即充值</view>
 					</view>
 					</view>
 				</view>
 				</view>
+
 				<view class="welfare-btn-wrap">
 				<view class="welfare-btn-wrap">
 					<button class="welfare-cancel-btn" @click="closeWelfareModal">取消</button>
 					<button class="welfare-cancel-btn" @click="closeWelfareModal">取消</button>
 				</view>
 				</view>
@@ -191,12 +162,7 @@ export default {
 			// 支付确认弹框相关
 			// 支付确认弹框相关
 			payConfirmShow: false,
 			payConfirmShow: false,
 			// 福利选择弹框相关
 			// 福利选择弹框相关
-			welfareModalShow: false,
-			welfareOptions: [
-				{ recharge: 1000, gift: 100 },
-				{ recharge: 500, gift: 50 },
-				{ recharge: 300, gift: 20 }
-			]
+			welfareModalShow: false
 		}
 		}
 	},
 	},
 	watch: {
 	watch: {
@@ -405,10 +371,9 @@ export default {
 			this.welfareModalShow = false
 			this.welfareModalShow = false
 		},
 		},
 		// 选择福利套餐
 		// 选择福利套餐
-		selectWelfare(welfare) {
-			this.amount = welfare.recharge.toString()
-			this.welfareModalShow = false
-			this.$msg(`已选择充值${welfare.recharge}元送${welfare.gift}元套餐`)
+		selectWelfare(info) {
+			this.amount = info.recharge.toString()
+			this.wexinPayFn()
 		},
 		},
 		// 关闭福利弹框
 		// 关闭福利弹框
 		closeWelfareModal() {
 		closeWelfareModal() {
@@ -1125,7 +1090,7 @@ export default {
 				.welfare-gift {
 				.welfare-gift {
 					font-size: 30upx;
 					font-size: 30upx;
 					color: #ff6b6b;
 					color: #ff6b6b;
-					font-weight: 500;
+					font-weight: 550;
 				}
 				}
 			}
 			}
 			
 			

+ 6 - 6
mallApp/src/static/iconfont/iconfont.css

@@ -1,11 +1,11 @@
 @font-face {
 @font-face {
   font-family: 'iconfont';  /* project id 1525256 */
   font-family: 'iconfont';  /* project id 1525256 */
-  src: url('http://api.shop.theflorist.cn/iconfont/font_1525256_6243f1wxe9f.eot');
-  src: url('http://api.shop.theflorist.cn/iconfont/font_1525256_6243f1wxe9f.eot?#iefix') format('embedded-opentype'),
-  url('http://api.shop.theflorist.cn/iconfont/font_1525256_6bxwphhntqh.woff2') format('woff2'),
-  url('http://api.shop.theflorist.cn/iconfont/font_1525256_6243f1wxe9f.woff') format('woff'),
-  url('http://api.shop.theflorist.cn/iconfont/font_1525256_6243f1wxe9f.ttf') format('truetype'),
-  url('http://api.shop.theflorist.cn/iconfont/font_1525256_6243f1wxe9f.svg#iconfont') format('svg');
+  src: url('https://api.shop.theflorist.cn/iconfont/font_1525256_6243f1wxe9f.eot');
+  src: url('https://api.shop.theflorist.cn/iconfont/font_1525256_6243f1wxe9f.eot?#iefix') format('embedded-opentype'),
+  url('https://api.shop.theflorist.cn/iconfont/font_1525256_6bxwphhntqh.woff2') format('woff2'),
+  url('https://api.shop.theflorist.cn/iconfont/font_1525256_6243f1wxe9f.woff') format('woff'),
+  url('https://api.shop.theflorist.cn/iconfont/font_1525256_6243f1wxe9f.ttf') format('truetype'),
+  url('https://api.shop.theflorist.cn/iconfont/font_1525256_6243f1wxe9f.svg#iconfont') format('svg');
 }
 }
 
 
 .iconfont {
 .iconfont {