Bläddra i källkod

用户支付未授权时获取授权

hwb0 3 år sedan
förälder
incheckning
650141f8e6

+ 9 - 0
components/pay-popup/pay-popup.vue

@@ -45,13 +45,19 @@
 				</view>
 			</view>
 		</u-popup>
+		
+		<auth :auth-show="authShow" @close="authShow = false" />
 	</view>
 </template>
 
 <script>
 	import $http from '@/utils/request.js'
+	import Auth from '../../components/auth/auth.vue'
 	export default {
 		name: "pay-popup",
+		components: {
+			Auth
+		},
 		props: {
 			payShow: {
 				type: [Boolean],
@@ -65,6 +71,7 @@
 		data() {
 			return {
 				checked: true,
+				authShow: false,
 			};
 		},
 		
@@ -138,6 +145,8 @@
 											_this.close()
 										}
 									})
+								} else if (ele.code == 1005) {
+									_this.authShow = true
 								} else {
 									payIng = false
 									_this.close()

+ 10 - 1
packageGoods/order/detail.vue

@@ -89,7 +89,7 @@
 		</view>
 
 		<!-- 操作按钮 -->
-		<view class="footer-fixed" v-if="status.value == 2 || status.value == 3">
+		<view class="footer-fixed" v-if="status.value == 2 || status.value == 3 || status.value == 0">
 			<view class="btn flex">
 				<view class="btn-item flex logistics" v-if="status.value == 2 || status.value == 3"  @click="getLogistics"><text>查看物流</text></view>
 				<view class="btn-item flex pay" v-if="status.value == 2"  @click="confirmOne"><text>确认收货</text></view>
@@ -97,13 +97,19 @@
 				<view class="btn-item flex pay"v-if="status.value == 0"  @click="payOrder"><text>去支付</text></view>
 			</view>
 		</view>
+		
+		<auth :auth-show="authShow" @close="authShow = false" />
 	</view>
 </template>
 
 <script>
 	import env from '../../config/env.js'
 	import $http from '@/utils/request.js'
+	import Auth from '../../components/auth/auth.vue'
 	export default {
+		components: {
+			Auth
+		},
 		data() {
 			return {
 				orderId: '',
@@ -113,6 +119,7 @@
 				list: [],
 				deliverList: [],
 				autoConfirmTime: '',
+				authShow: false,
 			};
 		},
 		onLoad(opthios) {
@@ -208,6 +215,8 @@
 								payIng = false
 							}
 						})
+					} else if (ele.code == 1005) {
+						_this.authShow = true
 					} else {
 						payIng = false
 						uni.$u.toast('支付失败!');

+ 9 - 0
packageGoods/order/index.vue

@@ -55,13 +55,19 @@
 				<!-- <u-empty text="还没有订单" mode="order" /> -->
 			</view>
 		</view>
+		
+		<auth :auth-show="authShow" @close="authShow = false" />
 	</view>
 </template>
 
 <script>
 	import env from '../../config/env.js'
 	import $http from '@/utils/request.js'
+	import Auth from '../../components/auth/auth.vue'
 	export default {
+		components: {
+			Auth
+		},
 		data() {
 			return {
 				loading: false,
@@ -80,6 +86,7 @@
 				}, {
 					name: '已完成'
 				}, ],
+				authShow: false,
 			};
 		},
 		onLoad(opthios) {},
@@ -186,6 +193,8 @@
 								payIng = false
 							}
 						})
+					} else if (ele.code == 1005) {
+						_this.authShow = true
 					} else {
 						payIng = false
 						uni.$u.toast('支付失败!');

+ 8 - 1
packageGoods/order/settlement.vue

@@ -101,6 +101,8 @@
 		</view>
 
 		<area-picker :area-show="areaShow" @cancel="cancel" @confirmArea="confirmArea" />
+		
+		<auth :auth-show="authShow" @close="authShow = false" />
 	</view>
 </template>
 
@@ -108,9 +110,11 @@
 	import env from '../../config/env.js'
 	import $http from '@/utils/request.js'
 	import AreaPicker from '../../components/area-picker/area-picker.vue'
+	import Auth from '../../components/auth/auth.vue'
 	export default {
 		components: {
-			AreaPicker
+			AreaPicker,
+			Auth
 		},
 		data() {
 			return {
@@ -138,6 +142,7 @@
 				
 				wxAddress: {},
 				payment: '',
+				authShow: false,
 			}
 		},
 		onLoad(opthios) {
@@ -209,6 +214,8 @@
 											}, 500)
 										}
 									})
+								} else if (ele.code == 1005) {
+									_this.authShow = true
 								} else {
 									payIng = false
 									uni.$u.toast('支付失败!');