Browse Source

1.提交测试界面

FailedToRead 1 year ago
parent
commit
adda94f887
2 changed files with 12 additions and 12 deletions
  1. 11 11
      miniprogram/pages/index/index.js
  2. 1 1
      miniprogram/pages/index/index.wxml

+ 11 - 11
miniprogram/pages/index/index.js

@@ -65,12 +65,12 @@ Page({
 
 
 
-    lenovoInitSDK(){
+    lenovoInitSDK() {
         this.data.myPlugin.lenovoInitSDK({}, (res) => {
             console.log('res:', res)
             if (res === "success") {
                 console.log("初始化联想sdk成功")
-            }else{
+            } else {
                 console.log(res)
             }
         })
@@ -78,29 +78,29 @@ Page({
 
     lenovoLogin() {
         this.data.myPlugin.lenovoLogin({}, (res) => {
-            console.log('res:',res)
+            console.log('res:', res)
         })
     },
 
     lenovoLogout() {
         this.data.myPlugin.lenovoLogout({}, (res) => {
-            console.log('res:',res)
+            console.log('res:', res)
         })
     },
 
 
-    aliPayInit(){
-        this.data.myPlugin.aliPayInit({}, (res) => {
-            console.log('res:',res)
+
+    aliPay() {
+        this.data.myPlugin.aliPay({}, (res) => {
+            console.log('res:', res)
         })
     },
 
-    aliPay(){
-        this.data.myPlugin.aliPay({}, (res) => {
-            console.log('res:',res)
+    toHuaWei() {
+        this.data.myPlugin.HuaWeiLogin({}, (res) => {
+            console.log('res:', res)
         })
     }
 
-  
 
 })

+ 1 - 1
miniprogram/pages/index/index.wxml

@@ -6,6 +6,6 @@
     <button bind:tap="lenovoInitSDK">初始化联想插件</button>
     <button bindtap="lenovoLogin">联想登陆测试</button>
     <button bindtap="lenovoLogout">联想退出登陆测试</button>
-    <button bindtap="aliPayInit">初始化支付宝</button>
     <button bindtap="aliPay">支付宝支付</button>
+    <button bindtap="toHuaWei">跳转华为sdk</button>
 </view>