ソースを参照

商户端关注公众号微信认证

hmp 4 年 前
コミット
5a6f129301
3 ファイル変更64 行追加2 行削除
  1. 2 2
      assets/http/global.js
  2. 10 0
      pages.json
  3. 52 0
      pages/auth/auth.vue

+ 2 - 2
assets/http/global.js

@@ -1,9 +1,9 @@
 let global = {}
 
 
-// const application='prod'	
+const application='prod'	
 // const application='dev'
-const application='test'
+// const application='test'
 
 if (application == 'prod') {
 	//正式环境

+ 10 - 0
pages.json

@@ -112,6 +112,16 @@
             }
             
         }
+        ,{
+            "path" : "pages/auth/auth",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "微信认证",
+                "enablePullDownRefresh": false,
+				"navigationStyle":"custom"
+            }
+            
+        }
     ],
 	"subPackages": [{
 		//tarbar下mine的分包

+ 52 - 0
pages/auth/auth.vue

@@ -0,0 +1,52 @@
+<!-- 这个是商户端微信认证所需的h5页面,三个端只有用户端有h5,故把商户端的微信认证h5页面放在此处一起打包 -->
+<template>
+	<view>
+		<u-mask :show="show" >
+			<view class="warp" style="margin-top: -50rpx;">
+				<image :show-menu-by-longpress="true" @error="error" style="width: 70%;" :src="src" mode="widthFix">
+				</image>
+				<view class="text-white text-sm margin-top-20">
+					<text>长按二维码关注公众号认证信息</text>
+				</view>
+			</view>
+		</u-mask>
+	</view>
+</template>
+
+<script>
+	export default {
+		name: '',
+		data() {
+			return {
+				show: true,
+				src: ''
+			};
+		},
+		onLoad(options) {
+			this.src = options.src
+			if (this.$isEmpty(this.src)) {
+				this.$dialog.showModalAndBack('二维码获取失败')
+				return
+			}
+		},
+		methods: {
+			error() {
+				this.$dialog.showModalAndBack('二维码加载失败')
+			},
+			async saveImg() {
+				let res = await this.$mpi.downloadFile(this.src)
+				this.$mpi.saveImg(res)
+			}
+		}
+	};
+</script>
+
+<style lang="scss" scoped>
+	.warp {
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		flex-direction: column;
+		height: 100%;
+	}
+</style>