From 04102f7237efefa744090ed7c25f7b5d0807b679 Mon Sep 17 00:00:00 2001
From: quanwei <419654421@qq.com>
Date: Thu, 05 Feb 2026 18:11:57 +0800
Subject: [PATCH] 完成运营中心提现和运营中心权限管理
---
mobile/pages2/login/mplogin.vue | 27 +++++++++++++++++++++++----
1 files changed, 23 insertions(+), 4 deletions(-)
diff --git a/mobile/pages2/login/mplogin.vue b/mobile/pages2/login/mplogin.vue
index 0f51050..1c8b513 100644
--- a/mobile/pages2/login/mplogin.vue
+++ b/mobile/pages2/login/mplogin.vue
@@ -1,6 +1,6 @@
<template>
<view class="login-container" v-if="!loadding">
-
+
<view class="wechatapp">
<view class="header">
<text class="icon iconfont icon-xuanze"></text>
@@ -11,7 +11,7 @@
<view class="login-btn">
<button class="btn-normal" @click="closeWindow">关闭页面</button>
</view>
-
+
</view>
</template>
@@ -29,9 +29,11 @@
/*获取个人中心数据*/
this.getData();
},
- onLoad(){
+ onLoad(options){
let self = this;
+
//#ifdef MP-WEIXIN
+ console.log('开始微信授权');
wx.login({
success(res) {
// 发送用户信息
@@ -43,6 +45,13 @@
}
});
//#endif
+
+ //#ifdef H5
+ // H5环境直接显示成功页面
+ setTimeout(() => {
+ self.loadding = false;
+ }, 1000);
+ //#endif
},
methods: {
/*获取数据*/
@@ -52,13 +61,23 @@
self._get('user.index/detail', {
url: self.url
}, function(res) {
+ uni.showToast({
+ title:res.msg
+ });
self.loadding = false;
uni.stopPullDownRefresh();
self.isloadding = false;
});
},
closeWindow() {
- WeixinJSBridge.call('closeWindow');
+ if (typeof WeixinJSBridge !== 'undefined') {
+ WeixinJSBridge.call('closeWindow');
+ } else {
+ uni.showToast({
+ title: '请在微信浏览器中使用',
+ icon: 'none'
+ });
+ }
}
}
}
--
Gitblit v1.9.2