Bladeren bron

开发多端支付组件

bayi 1 jaar geleden
bovenliggende
commit
a547bc7f55

+ 1 - 2
app.js

@@ -51,7 +51,6 @@ App({
             }
             this.login(shareUid, userChannelCode)
         }
-        this.initPlugin()
     },
     async login(shareUid, userChannelCode = '3001') {
         let uid = wx.getStorageSync('uid')
@@ -214,7 +213,7 @@ App({
         console.log("插件ID:" + miniAppPluginId)
         wx.miniapp.loadNativePlugin({
             pluginId: miniAppPluginId,
-            success: (plugin) => {
+            success: (plugin) => { 
                 console.log('load plugin success', plugin)
                 plugin.initPlugin(({}), (res) => {
                     if (res === "success") {

+ 25 - 0
components/donutBuy/index.js

@@ -0,0 +1,25 @@
+Component({
+    /**
+     * 组件的属性列表
+     */
+    properties: {
+
+    },
+    data: {
+
+    },
+    methods: {
+        showTranscript() {
+            this.getTabBar().setData({
+                mask: true
+            })
+            this.selectComponent("#popUp").showModal()
+        },
+        closeTranscript() {
+            this.getTabBar().setData({
+                mask: false
+            })
+            this.selectComponent("#popUp").hideModal()
+        },
+    }
+})

+ 6 - 0
components/donutBuy/index.json

@@ -0,0 +1,6 @@
+{
+    "component": true,
+    "usingComponents": {
+        "popUp": "/components/popUp/index"
+    }
+}

+ 1 - 0
components/donutBuy/index.less

@@ -0,0 +1 @@
+/* components/donutBuy/index.wxss */

+ 4 - 0
components/donutBuy/index.wxml

@@ -0,0 +1,4 @@
+<popUp id="popUp">
+    <view class="popBox">
+    </view>
+</popUp>

+ 1 - 2
components/popUp/index.less

@@ -5,8 +5,7 @@
     position: fixed;
     top: 0;
     left: 0;
-    background: #000;
-    opacity: 0.4;
+    background: rgba(0, 0, 0, 0.7);
     overflow: hidden;
     z-index: 99;
     color: #fff;

+ 1 - 2
components/popUp/index.wxss

@@ -5,8 +5,7 @@
   position: fixed;
   top: 0;
   left: 0;
-  background: #000;
-  opacity: 0.4;
+  background: rgba(0, 0, 0, 0.7);
   overflow: hidden;
   z-index: 99;
   color: #fff;

+ 1 - 0
pages/my/index.js

@@ -249,6 +249,7 @@ Page({
             })
         }
     },
+    
     // 分享配置
     onShareAppMessage(res) {
         // #if MP