liujd %!s(int64=6) %!d(string=hai) anos
pai
achega
d06903af29

+ 1 - 1
mobile-code/src/pages/callback/index.vue

@@ -225,7 +225,7 @@
 				alert('支付失败!')
 			},
 			balancePayFn() {
-				if (this.merchantInfo.hasPayPwd == 0) {
+				if (this.shopUser.hasPayPwd == 0) {
 					this.setPassModal = true
 				} else {
 					this.passwordModal = true

+ 22 - 4
mobile-code/src/pages/pay/index.vue

@@ -95,6 +95,12 @@
 		</modal-module>
 		<!-- 阿里支付 -->
 		<div class="al-pay" v-html="aliPayHtml" ref="alipayWap"></div>
+		<!-- 未设置支付密码弹窗 -->
+		<alert-module :show="setPassModal" btnText="去设置" btnColor="#FF2842" padding="66rpx 24rpx 66rpx 24rpx" @click="hideAlert">
+			<div class="go-login-module">
+				<div>暂未设置密码,去设置密码!</div>
+			</div>
+		</alert-module>
 	</div>
 </template>
 
@@ -107,6 +113,7 @@
 	import wexinPay from '@/utils/pay/wxPay'
 	import ModalModule from '@/components/plugin/modal'
 	import AppCouponSel from '@/components/app-coupon-sel'
+	import AlertModule from '@/components/plugin/alert'
 	import { isLogin } from '@/utils/util'
 	import { isWxBrowser } from '@/utils/common'
 	import { share } from '@/mixins'
@@ -122,7 +129,8 @@
 			PayInputModule,
 			AppDeliveryModule,
 			ModalModule,
-			AppCouponSel
+			AppCouponSel,
+			AlertModule
 		},
 		mixins: [share],
 		data() {
@@ -162,7 +170,9 @@
 				},
 				payCallData: null,
 				// 优惠折扣
-				discountArr: false
+				discountArr: false,
+				// 未设置密码
+				setPassModal: false
 			}
 		},
 		computed: {
@@ -306,10 +316,18 @@
 				this.form.payWay = 0
 				this._pay()
 			},
+			// 暂未设置密码
+			hideAlert() {
+				this.$util.pageTo('/pages/user/password')
+			},
 			// 余额支付
 			balancePayFn() {
-				this.form.payWay = 2
-				this.passwordModal = true
+				if (this.$util.isEmpty(this.shopUser) && this.shopUser.hasPayPwd == 0) {
+					this.setPassModal = true
+				} else {
+					this.form.payWay = 2
+					this.passwordModal = true
+				}
 			},
 			passwordModalClick(e) {
 				if (e.index === 0) {