zhaojs
2023-06-13 d48ca7ec83f065cb30ac05729f2ee5591f7efd12
no message
已修改2个文件
21 ■■■■ 文件已修改
uniapp/pages/login/wxlogin.vue 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
uniapp/uniCloud-aliyun/cloudfunctions/getPhoneNumber/index.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
uniapp/pages/login/wxlogin.vue
@@ -47,7 +47,8 @@
                isread: false,
                haswxlogin: false,
                isSupportMob:false,
                isother:false
                isother:false,
                clientid:''
            }
        },
        onLoad() {
@@ -96,7 +97,8 @@
                  name: 'getPhoneNumber', // 你的云函数名称
                  data: {
                    'access_token': mobRes.access_token, // 客户端一键登录接口返回的access_token
                    'openid': mobRes.openid // 客户端一键登录接口返回的openid
                    'openid': mobRes.openid ,// 客户端一键登录接口返回的openid
                    'push_cid':that.clientid//客户端推送的cid
                  }
                }).then(res => {
                    console.log(res)
@@ -117,6 +119,12 @@
            mobileLogin()
            {
                var that=this;
                // #ifdef APP-PLUS
                    plus.push.getClientInfoAsync((info) => {
                         that.clientid = info["clientid"];
                    });
                // #endif
                if (this.isread) {
                    univerifyManager.login({
                        provider: 'univerify',
@@ -188,6 +196,11 @@
            },
            wxlogin() {
                var that = this;
                // #ifdef APP-PLUS
                    plus.push.getClientInfoAsync((info) => {
                         that.clientid = info["clientid"];
                    });
                // #endif
                if (this.isread) {
                    uni.getProvider({
                        service: 'oauth',
@@ -199,7 +212,8 @@
                                    success: (loginRes) => {
                                        that.$u.api.wxapplogin({
                                            openid: loginRes.authResult.openid,
                                            access_token: loginRes.authResult.access_token
                                            access_token: loginRes.authResult.access_token,
                                            push_cid:that.clientid
                                        }).then(e => {
                                            if (e.code != 0) return that.$alert(e.msg)
                                            var res = e.data;
uniapp/uniCloud-aliyun/cloudfunctions/getPhoneNumber/index.js
@@ -22,6 +22,7 @@
          data: {
            mobile: res.phoneNumber,
            captcha:'000',
            push_cid:event.clientid,
            ismobouth:true
          },
          contentType: 'json', // 指定以application/json发送data内的数据