Forráskód Böngészése

Merge remote-tracking branch 'origin/master'

zxy 3 éve
szülő
commit
5db4545d28

+ 2 - 0
light-application-wx/pages/chat-room/chat-room.js

@@ -572,6 +572,8 @@ Page({
                             }
                         }
                     });
+                } else {
+                    util.toast('请扫描群聊小程序码');
                 }
             },
             fail: (err) => {

+ 65 - 55
light-application-wx/pages/index/index.js

@@ -308,70 +308,80 @@ Page({
             onlyFromCamera: true,
             scanType: 'qrCode',
             success: (res) => {
-                console.info(res);
-                if (res.result.indexOf('WIFI') < 0) {
-                    util.toast('请扫描WIFI二维码');
-                    return;
-                }
-                wx.showLoading({
-                    title: '加载中...',
-                    mask: true
-                });
-                try {
-                    let a = res.result.split(',');
-                    wifi = a[0].split(':')[1];
-                    pass = a[1].split(':')[1];
-                } catch (error) {
-                    util.toast('请扫描WIFI二维码');
-                    return;
-                }
-                // 获取设备系统类型
-                wx.getSystemInfo({
-                    success: (res) => {
-                        console.info(res);
-                        if (!res.wifiEnabled) {
-                            wx.hideLoading();
-                            util.toast('请打开WIFI功能');
-                            return;
-                        }
-                        // 1、初始化Wi-Fi模块
-                        wx.startWifi({
-                            success: (res) => {
-                                console.info('startWifi', res)
-                                if (res.errMsg == 'startWifi:ok') {
-                                    // 4、连接Wi-Fi
-                                    wx.connectWifi({
-                                        SSID: wifi,
-                                        password: pass,
+                console.info('scanCode', res);
+                if (res.path) {
+                    let scene = res.path.split('=')[1];
+                    util.get({
+                        url: '/api/wechat/getQrCodeParams?key=' + scene,
+                        success: (res) => {
+                            console.info('getQrCodeParams', res);
+                            if (res.data.code != 200) {
+                                wx.hideLoading();
+                                util.toast(res.data.msg);
+                            } else {
+                                if ('GROUP' == res.data.data.type) {
+                                    let wifi = res.data.data.wifi;
+                                    let password = res.data.data.password;
+                                    // 获取设备系统类型
+                                    wx.getSystemInfo({
                                         success: (res) => {
-                                            wx.hideLoading();
-                                            console.info('connectWifi', res);
-                                            if (res.errMsg == 'connectWifi:ok') {
-                                                util.toast('WIFI连接成功', 'success');
-                                            } else {
-                                                util.toast(res.errMsg);
+                                            console.info(res);
+                                            if (!res.wifiEnabled) {
+                                                wx.hideLoading();
+                                                util.toast('请打开WIFI功能');
+                                                return;
                                             }
+                                            // 1、初始化Wi-Fi模块
+                                            wx.startWifi({
+                                                success: (res) => {
+                                                    console.info('startWifi', res);
+                                                    if (res.errMsg == 'startWifi:ok') {
+                                                        // 4、连接Wi-Fi
+                                                        wx.connectWifi({
+                                                            SSID: wifi,
+                                                            password: password,
+                                                            success: (res) => {
+                                                                wx.hideLoading();
+                                                                console.info('connectWifi', res);
+                                                                if (res.errMsg == 'connectWifi:ok') {
+                                                                    util.toast('WIFI连接成功', 'success');
+                                                                } else {
+                                                                    util.toast(res.errMsg);
+                                                                }
+                                                            },
+                                                            fail: (e) => {
+                                                                wx.hideLoading();
+                                                                console.info(e);
+                                                                util.toast('WIFI连接失败');
+                                                            }
+                                                        });
+                                                    } else {
+                                                        wx.hideLoading();
+                                                        util.toast(res.errMsg);
+                                                    }
+                                                },
+                                                fail: (e) => {
+                                                    wx.hideLoading();
+                                                    console.info(e);
+                                                    util.toast('初始化WiFi模块失败');
+                                                }
+                                            });
                                         },
                                         fail: (e) => {
-                                            console.info(e);
-                                            util.toast('WIFI连接失败');
+                                            wx.hideLoading();
+                                            util.toast('获取设备系统类型失败');
                                         }
                                     });
                                 } else {
-                                    util.toast(res.errMsg);
+                                    wx.hideLoading();
+                                    util.toast('请扫描WIFI小程序码');
                                 }
-                            },
-                            fail: (e) => {
-                                console.info(e);
-                                util.toast('初始化WiFi模块失败');
                             }
-                        });
-                    },
-                    fail: (e) => {
-                        util.toast('获取设备系统类型失败');
-                        return;
-                    }
-                });
+                        }
+                    });
+                } else {
+                    util.toast('请扫描WIFI小程序码');
+                }
             },
             fail: (e) => {
                 console.info('chooseImage fail', e)

+ 5 - 5
light-application-wx/pages/index/index.wxss

@@ -156,9 +156,9 @@ image.next-line {
 
 
 .next-row {
-    margin-top: 15rpx;
-    margin-bottom: 15rpx;
-    font-size: 22rpx;
+    margin-top: 12rpx;
+    margin-bottom: 12rpx;
+    font-size: 26rpx;
     margin-left: 42rpx;
     display: flex;
     align-items: center;
@@ -167,11 +167,11 @@ image.next-line {
 
 .next-row .next-title {
     color: #B7B7B7;
-    font-size: 22rpx;
+    font-size: 26rpx;
 }
 
 .next-row .next-content {
-    font-size: 22rpx;
+    font-size: 26rpx;
 }
 
 

+ 4 - 1
light-application-wx/pages/information-release/information-release.wxss

@@ -18,8 +18,11 @@ page {
     box-sizing: border-box;
 }
 
+.page-section-title {
+    color: #777777;
+}
+
 .weui-input {
-    color: #999999;
     padding: 10rpx;
 }
 

+ 54 - 6
light-application-wx/pages/login/login.js

@@ -28,17 +28,14 @@ Page({
             util.get({
                 url: '/api/wechat/getQrCodeParams?key=' + options.scene,
                 success: (res) => {
-                    wx.hideLoading();
                     console.info(res);
                     if (res.data.code != 200) {
+                        wx.hideLoading();
                         util.toast(res.data.msg);
                     } else {
-                        // 判断时间戳是否过期(无需判断)
-                        // let timestamp = res.data.data.timeStamp;
-                        // let now = new Date().getTime();
-                        // console.info(timestamp, now);
                         // 扫码加群
                         if ('GROUP' == res.data.data.type) {
+                            wx.hideLoading();
                             wx.setStorageSync('groupId', res.data.data.groupId);
                             // util.toast('登录成功后方可加入群聊');
                             wx.showModal({
@@ -48,7 +45,58 @@ Page({
                         }
                         // 扫码连接WIFI
                         else if ('WIFI' == res.data.data.type) {
-                            // 连接WIFI代码
+                            let wifi = res.data.data.wifi;
+                            let password = res.data.data.password;
+                            // 获取设备系统类型
+                            wx.getSystemInfo({
+                                success: (res) => {
+                                    console.info(res);
+                                    if (!res.wifiEnabled) {
+                                        wx.hideLoading();
+                                        util.toast('请打开WIFI功能');
+                                        return;
+                                    }
+                                    // 1、初始化Wi-Fi模块
+                                    wx.startWifi({
+                                        success: (res) => {
+                                            console.info('startWifi', res);
+                                            if (res.errMsg == 'startWifi:ok') {
+                                                // 4、连接Wi-Fi
+                                                wx.connectWifi({
+                                                    SSID: wifi,
+                                                    password: password,
+                                                    success: (res) => {
+                                                        wx.hideLoading();
+                                                        console.info('connectWifi', res);
+                                                        if (res.errMsg == 'connectWifi:ok') {
+                                                            util.toast('WIFI连接成功', 'success');
+                                                        } else {
+                                                            util.toast(res.errMsg);
+                                                        }
+                                                    },
+                                                    fail: (e) => {
+                                                        wx.hideLoading();
+                                                        console.info(e);
+                                                        util.toast('WIFI连接失败');
+                                                    }
+                                                });
+                                            } else {
+                                                wx.hideLoading();
+                                                util.toast(res.errMsg);
+                                            }
+                                        },
+                                        fail: (e) => {
+                                            wx.hideLoading();
+                                            console.info(e);
+                                            util.toast('初始化WiFi模块失败');
+                                        }
+                                    });
+                                },
+                                fail: (e) => {
+                                    wx.hideLoading();
+                                    util.toast('获取设备系统类型失败');
+                                }
+                            });
                         }
                     }
                 }

+ 8 - 0
light-application-wx/pages/meeting-inspection-abnormal/meeting-inspection-abnormal.wxss

@@ -18,6 +18,10 @@ page {
     justify-content: space-between;
 }
 
+.toolBar text {
+    color: #777777;
+}
+
 .upload-icon {
     width: 40rpx;
     height: 38rpx;
@@ -53,6 +57,10 @@ page {
     padding: 30rpx;
 }
 
+.result-desc text {
+    color: #777777;
+}
+
 .desc {
     margin-top: 20rpx;
     width: 100%;