chengziding 1 year ago
parent
commit
5620a511b8
5 changed files with 66 additions and 0 deletions
  1. 9 0
      .hbuilderx/launch.json
  2. 7 0
      pages.json
  3. 49 0
      pages/payCentre.vue
  4. BIN
      static/payCentre/loading.gif
  5. 1 0
      utils/uni.webview.1.5.4.js

+ 9 - 0
.hbuilderx/launch.json

@@ -0,0 +1,9 @@
+{
+    "version" : "1.0",
+    "configurations" : [
+        {
+            "playground" : "standard",
+            "type" : "uni-app:app-android"
+        }
+    ]
+}

+ 7 - 0
pages.json

@@ -8,6 +8,13 @@
 				"navigationStyle": "custom"
 			}
 		},
+		{
+			"path": "pages/payCentre",
+			"style": {
+				"navigationBarTitleText": "支付中",
+				"navigationStyle": "custom"
+			}
+		},
 		// {
 		//   "path": "pages/index",
 		//   "style": {

+ 49 - 0
pages/payCentre.vue

@@ -0,0 +1,49 @@
+<template>
+	<view class="body">
+		<image src="/static/payCentre/loading.gif" mode=""></image>
+		<view>支付中</view>
+	</view>
+</template>
+
+<script>
+	import uniWeb from '@/utils/uni.webview.1.5.4.js'
+	export default {
+		data() {
+			return {
+
+			}
+		},
+		onLoad(options) {
+			// if(options.orderNo){
+			// 	this.goto(options.orderNo)
+			// }
+				this.goto('100712401150003')
+		},
+		methods: {
+			goto(orderNo) {
+				try {
+					uniWeb.webView.postMessage({
+						data: {
+							   action: 'pay',
+							   orderNo:orderNo
+						}
+					})
+				} catch (err) {
+					console.log('err==>', err)
+				}
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.body{
+		text-align: center;
+		padding-top: 300rpx;
+		color: #303133;
+		image{
+			width: 200rpx;
+			height: 200rpx;
+		}
+	}
+</style>

BIN
static/payCentre/loading.gif


File diff suppressed because it is too large
+ 1 - 0
utils/uni.webview.1.5.4.js