|
@@ -5,7 +5,7 @@
|
|
|
<view class="force-login__content y-f">
|
|
|
<view class="logo">
|
|
|
<view class="logo-img">
|
|
|
- <image src="../../static/logo.png"></image>
|
|
|
+ <image src="https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20250310/aeb776c6aa174d7c94181e5fd212e0f1.png"></image>
|
|
|
</view>
|
|
|
<view class="title">芳华佳选</view>
|
|
|
</view>
|
|
@@ -84,12 +84,15 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
handleAgree(){
|
|
|
+ console.log(123)
|
|
|
+
|
|
|
if(!this.isAgreement){
|
|
|
uni.showToast({
|
|
|
icon:'none',
|
|
|
title: "请先同意协议后再登录",
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
},
|
|
|
|
|
|
checkWeixin(){
|
|
@@ -110,13 +113,28 @@ export default {
|
|
|
//在微信公众号请求用户网页授权之前,开发者需要先到公众平台官网中的“开发 - 接口权限 - 网页服务 - 网页帐号 - 网页授权获取用户基本信息”的配置选项中,修改授权回调域名。请注意,这里填写的是域名(是一个字符串),而不是URL,因此请勿加 http:// 等协议头;
|
|
|
//http://shequ.natapp1.cc/#/pages/index/index?deviceId=8
|
|
|
var appId="wx19c8813ffc33d1cb";
|
|
|
- var url="http://192.168.10.122:7014";
|
|
|
+ var url="https://api.zxfh.cdwjyyh.com";
|
|
|
window.location.href ='https://open.weixin.qq.com/connect/oauth2/authorize?appid='+appId+'&redirect_uri=' +encodeURIComponent(url+"/#/pages/auth/wxLogin") +'&response_type=code&scope=snsapi_userinfo&state=JeffreySu-954&connect_redirect=1#wechat_redirect';
|
|
|
//console.log('https://open.weixin.qq.com/connect/oauth2/authorize?appid='+appId+'&redirect_uri=' +encodeURIComponent("http://shequ.natapp1.cc/#/pages/index/index?deviceId="+this.deviceId) +'&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect')
|
|
|
// redirect_uri是授权成功后,跳转的url地址,微信会帮我们跳转到该链接,并且通过?的形式拼接code
|
|
|
},
|
|
|
handleAgreement(){
|
|
|
this.isAgreement=!this.isAgreement;
|
|
|
+ console.log(545454)
|
|
|
+ uni.requestSubscribeMessage({
|
|
|
+ tmplIds: ['K0RUbGggwYz7V4yjtJjFVXtthnx4hOJgHvr7RNOyRSE','5ZSzz2nPmJo9EuenZa78mQPScoOMc84LnEfEpV0-i04'], // 模板ID列表,从微信公众平台获取
|
|
|
+ success(res) {
|
|
|
+ console.log('订阅消息成功', res);
|
|
|
+ if(res.errMsg=='requestSubscribeMessage:ok'){
|
|
|
+ console.log('订阅消息成功11111');
|
|
|
+ }
|
|
|
+ // 根据返回的 res 处理后续逻辑,例如显示成功消息给用户
|
|
|
+ },
|
|
|
+ fail(err) {
|
|
|
+ console.error('订阅消息失败', err);
|
|
|
+ // 处理失败情况,例如提示用户重新尝试或检查权限设置
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
openH5(url){
|
|
|
var requestPath = uni.getStorageSync('requestPath');
|
|
@@ -222,6 +240,7 @@ export default {
|
|
|
},
|
|
|
// 微信用户手机号登录
|
|
|
phoneLogin(e) {
|
|
|
+
|
|
|
var that=this;
|
|
|
if(!this.isAgreement){
|
|
|
uni.showToast({
|