From 5f3922cb7573c208d1a9fc5577178f8d8e2747c3 Mon Sep 17 00:00:00 2001
From: 石广澎 <shiguangpeng@163.com>
Date: 星期一, 05 八月 2024 10:55:19 +0800
Subject: [PATCH] feat(支付): 支持C扫B动态码支付

---
 App.vue |   37 +++++++++++++++++++++++++++++++++++--
 1 files changed, 35 insertions(+), 2 deletions(-)

diff --git a/App.vue b/App.vue
index 6d4c20d..7d6db53 100644
--- a/App.vue
+++ b/App.vue
@@ -1,7 +1,36 @@
 <script>
+import {
+  config,
+} from 'common/config.js';
+import Vconsole from 'vconsole';
+import {
+  getPlat
+} from 'common/util.js';
 	export default {
-		onLaunch: function() {
-			console.log('App Launch')
+		onLaunch: function(opt) {
+      uni.setStorageSync('DEBUG', opt.query?.debug == 'true');
+      if (uni.getStorageSync('DEBUG')) {
+        new Vconsole();
+      }
+      /*console.log(opt)
+      let platform = 2
+      const redirect_uri = encodeURIComponent(`${config.webURL}/pay/scanpay?cid=${opt.query.cid}`)
+      console.log('OPENID'+platform,!!uni.getStorageSync('OPENID'+platform))
+      if(!!uni.getStorageSync('OPENID'+platform)){
+        window.location.href = redirect_uri
+        return
+      }
+      return
+      if(!opt.query.code && !opt.query.auth_code){
+        console.log('auth',platform, !opt.query.code && !opt.query.auth_code)
+        if (platform == 2) {
+          window.location.href =redirect_uri+'&code=sadfkhnadsmuk'
+              //`https://open.weixin.qq.com/connect/oauth2/authorize?appid=${config.wx_appid}&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect`
+        } else if (platform == 5) {
+          window.location.href =redirect_uri
+              //`https://openauth.alipay.com/oauth2/publicAppAuthorize.htm?app_id=${config.ali_appid}&scope=auth_base&redirect_uri=${redirect_uri}&state=STATE`
+        }
+      }*/
 		},
 		onShow: function() {
 			console.log('App Show')
@@ -47,6 +76,10 @@
 		color: #DE2D35;
 	}
 
+	.color-green {
+		color: #3fde2d;
+	}
+
 	.font-bold {
 		font-weight: bolder;
 	}

--
Gitblit v1.9.1