Browse Source

Merge branch 'dev' into 'test'

Dev

See merge request quanshu/mp-ui-user!68
世轩 2 năm trước cách đây
mục cha
commit
a649e8c830
2 tập tin đã thay đổi với 13 bổ sung15 xóa
  1. 13 13
      src/pages/index/payExternal.vue
  2. 0 2
      src/utils/request.js

+ 13 - 13
src/pages/index/payExternal.vue

@@ -1,29 +1,29 @@
 <template>
 	<view class="">
-		<web-view :src='info'></web-view>
+		<!-- <web-view :src='info'></web-view> -->
 	</view>
-
 </template>
 
 <script>
 	export default {
 		data() {
 			return {
-				info: '',
+				info: 'https://openapi.ysepay.com/gateway.do?',
+			}
+		},
+		onLoad(opthios) {
+			if(opthios.viewUrl){
+				let data = JSON.parse(decodeURIComponent(opthios.viewUrl))
+				// this.info = 'https://openapi.ysepay.com/gateway.do?'
+				Object.keys(data).forEach(item=>{
+					this.info = this.info + item + '=' + encodeURIComponent(data[item]) + '&'
+				})
 			}
-		},
-		onLoad(opthios) {
-			if(opthios.viewUrl){
-				let data = JSON.parse(decodeURIComponent(opthios.viewUrl))
-				this.info = 'https://openapi.ysepay.com/gateway.do?'
-				Object.keys(data).forEach(item=>{
-					this.info = this.info + item + '=' + encodeURIComponent(data[item]) + '&'
-				})
-			}
+			location.href =  this.info
 		},
 	}
 </script>
 
 <style>
 
-</style>
+</style>

+ 0 - 2
src/utils/request.js

@@ -102,11 +102,9 @@ const $put = (url, data) => {
 			name: 'file',
 
 			success: res => {
-
 				reslove(res.data)
 			},
 			fail: () => {
-
 				reject()
 			}
 		})