浏览代码

feature: 添加测试蓝牙类

Damon 8 月之前
父节点
当前提交
d3c3fd2c27
共有 5 个文件被更改,包括 366 次插入0 次删除
  1. 237 0
      .idea/workspace.xml
  2. 123 0
      pages/blueDemos/blueDemos.js
  3. 3 0
      pages/blueDemos/blueDemos.json
  4. 2 0
      pages/blueDemos/blueDemos.wxml
  5. 1 0
      pages/blueDemos/blueDemos.wxss

+ 237 - 0
.idea/workspace.xml

@@ -0,0 +1,237 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="AutoImportSettings">
+    <option name="autoReloadType" value="NONE" />
+  </component>
+  <component name="ChangeListManager">
+    <list default="true" id="420a40af-e4b9-41e7-b569-424cfc67e65d" name="Changes" comment="feature: 整理数据">
+      <change beforePath="$PROJECT_DIR$/app.json" beforeDir="false" afterPath="$PROJECT_DIR$/app.json" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/devices/ble_manager.js" beforeDir="false" afterPath="$PROJECT_DIR$/devices/ble_manager.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/devices/bt_helper.js" beforeDir="false" afterPath="$PROJECT_DIR$/devices/bt_helper.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/pages/connectBle/connectBle.js" beforeDir="false" afterPath="$PROJECT_DIR$/pages/connectBle/connectBle.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/project.private.config.json" beforeDir="false" afterPath="$PROJECT_DIR$/project.private.config.json" afterDir="false" />
+    </list>
+    <option name="SHOW_DIALOG" value="false" />
+    <option name="HIGHLIGHT_CONFLICTS" value="true" />
+    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
+    <option name="LAST_RESOLUTION" value="IGNORE" />
+  </component>
+  <component name="Git.Settings">
+    <option name="RECENT_BRANCH_BY_REPOSITORY">
+      <map>
+        <entry key="$PROJECT_DIR$" value="dev" />
+      </map>
+    </option>
+    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
+  </component>
+  <component name="GitToolBoxStore">
+    <option name="recentBranches">
+      <RecentBranches>
+        <option name="branchesForRepo">
+          <list>
+            <RecentBranchesForRepo>
+              <option name="branches">
+                <list>
+                  <RecentBranch>
+                    <option name="branchName" value="develop/3.2.4" />
+                    <option name="lastUsedInstant" value="1732779850" />
+                  </RecentBranch>
+                  <RecentBranch>
+                    <option name="branchName" value="dev" />
+                    <option name="lastUsedInstant" value="1732778372" />
+                  </RecentBranch>
+                </list>
+              </option>
+              <option name="repositoryRootUrl" value="file://$PROJECT_DIR$" />
+            </RecentBranchesForRepo>
+          </list>
+        </option>
+      </RecentBranches>
+    </option>
+  </component>
+  <component name="MarkdownSettingsMigration">
+    <option name="stateVersion" value="1" />
+  </component>
+  <component name="ProjectId" id="2pT45QITA0yk2vO5tz5tGtwXStK" />
+  <component name="ProjectViewState">
+    <option name="hideEmptyMiddlePackages" value="true" />
+    <option name="showLibraryContents" value="true" />
+  </component>
+  <component name="PropertiesComponent">{
+  &quot;keyToString&quot;: {
+    &quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;,
+    &quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
+    &quot;RunOnceActivity.cidr.known.project.marker&quot;: &quot;true&quot;,
+    &quot;cidr.known.project.marker&quot;: &quot;true&quot;,
+    &quot;dart.analysis.tool.window.visible&quot;: &quot;false&quot;,
+    &quot;show.migrate.to.gradle.popup&quot;: &quot;false&quot;
+  }
+}</component>
+  <component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
+  <component name="TaskManager">
+    <task active="true" id="Default" summary="Default task">
+      <changelist id="420a40af-e4b9-41e7-b569-424cfc67e65d" name="Changes" comment="" />
+      <created>1732776547610</created>
+      <option name="number" value="Default" />
+      <option name="presentableId" value="Default" />
+      <updated>1732776547610</updated>
+    </task>
+    <task id="LOCAL-00001" summary="feature: 频繁切换登录问题">
+      <created>1732778047409</created>
+      <option name="number" value="00001" />
+      <option name="presentableId" value="LOCAL-00001" />
+      <option name="project" value="LOCAL" />
+      <updated>1732778047409</updated>
+    </task>
+    <task id="LOCAL-00002" summary="feature: 解决一开始登录显示列表">
+      <created>1732781221671</created>
+      <option name="number" value="00002" />
+      <option name="presentableId" value="LOCAL-00002" />
+      <option name="project" value="LOCAL" />
+      <updated>1732781221671</updated>
+    </task>
+    <task id="LOCAL-00003" summary="feature: 未登录和登录状态列表数据在线与被选中问题">
+      <created>1732783327915</created>
+      <option name="number" value="00003" />
+      <option name="presentableId" value="LOCAL-00003" />
+      <option name="project" value="LOCAL" />
+      <updated>1732783327916</updated>
+    </task>
+    <task id="LOCAL-00004" summary="feature: 蓝牙和wifi仅仅关闭上层页面,不替换当前页面">
+      <created>1732787339484</created>
+      <option name="number" value="00004" />
+      <option name="presentableId" value="LOCAL-00004" />
+      <option name="project" value="LOCAL" />
+      <updated>1732787339484</updated>
+    </task>
+    <task id="LOCAL-00005" summary="feature: 解决回到首页直接替换首页的问题">
+      <created>1732789238802</created>
+      <option name="number" value="00005" />
+      <option name="presentableId" value="LOCAL-00005" />
+      <option name="project" value="LOCAL" />
+      <updated>1732789238802</updated>
+    </task>
+    <task id="LOCAL-00006" summary="feature: 蓝牙设备和wifi设备选择连接处理">
+      <created>1732794387919</created>
+      <option name="number" value="00006" />
+      <option name="presentableId" value="LOCAL-00006" />
+      <option name="project" value="LOCAL" />
+      <updated>1732794387919</updated>
+    </task>
+    <task id="LOCAL-00007" summary="feature: 处理加载图片失败的问题">
+      <created>1732846678881</created>
+      <option name="number" value="00007" />
+      <option name="presentableId" value="LOCAL-00007" />
+      <option name="project" value="LOCAL" />
+      <updated>1732846678881</updated>
+    </task>
+    <task id="LOCAL-00008" summary="feature: 处理跳转,摧毁当前界面的问题">
+      <created>1732858514564</created>
+      <option name="number" value="00008" />
+      <option name="presentableId" value="LOCAL-00008" />
+      <option name="project" value="LOCAL" />
+      <updated>1732858514564</updated>
+    </task>
+    <task id="LOCAL-00009" summary="feature: 删除无用代码,整理描述">
+      <created>1732858749312</created>
+      <option name="number" value="00009" />
+      <option name="presentableId" value="LOCAL-00009" />
+      <option name="project" value="LOCAL" />
+      <updated>1732858749312</updated>
+    </task>
+    <task id="LOCAL-00010" summary="feature: 加入登录界面路由">
+      <created>1732858823167</created>
+      <option name="number" value="00010" />
+      <option name="presentableId" value="LOCAL-00010" />
+      <option name="project" value="LOCAL" />
+      <updated>1732858823167</updated>
+    </task>
+    <task id="LOCAL-00011" summary="feature: 处理几个异常跳转问题">
+      <created>1732861180258</created>
+      <option name="number" value="00011" />
+      <option name="presentableId" value="LOCAL-00011" />
+      <option name="project" value="LOCAL" />
+      <updated>1732861180258</updated>
+    </task>
+    <task id="LOCAL-00012" summary="feature: 整理数据">
+      <created>1732867831888</created>
+      <option name="number" value="00012" />
+      <option name="presentableId" value="LOCAL-00012" />
+      <option name="project" value="LOCAL" />
+      <updated>1732867831888</updated>
+    </task>
+    <option name="localTasksCounter" value="13" />
+    <servers />
+  </component>
+  <component name="Vcs.Log.History.Properties">
+    <option name="COLUMN_ID_ORDER">
+      <list>
+        <option value="Default.Root" />
+        <option value="Default.Author" />
+        <option value="Default.Date" />
+        <option value="Default.Subject" />
+      </list>
+    </option>
+  </component>
+  <component name="Vcs.Log.Tabs.Properties">
+    <option name="TAB_STATES">
+      <map>
+        <entry key="1a034e41-8762-402a-b1af-00f4e50b1778">
+          <value>
+            <State>
+              <option name="SHOW_ONLY_AFFECTED_CHANGES" value="true" />
+              <option name="FILTERS">
+                <map>
+                  <entry key="branch">
+                    <value>
+                      <list>
+                        <option value="HEAD" />
+                      </list>
+                    </value>
+                  </entry>
+                  <entry key="roots">
+                    <value>
+                      <list>
+                        <option value="$PROJECT_DIR$" />
+                      </list>
+                    </value>
+                  </entry>
+                </map>
+              </option>
+            </State>
+          </value>
+        </entry>
+        <entry key="981fcae1-61d2-4a62-90f2-dfe5416597ef">
+          <value>
+            <State />
+          </value>
+        </entry>
+        <entry key="MAIN">
+          <value>
+            <State />
+          </value>
+        </entry>
+      </map>
+    </option>
+    <option name="OPEN_GENERIC_TABS">
+      <map>
+        <entry key="1a034e41-8762-402a-b1af-00f4e50b1778" value="TOOL_WINDOW" />
+      </map>
+    </option>
+  </component>
+  <component name="VcsManagerConfiguration">
+    <MESSAGE value="feature: 频繁切换登录问题" />
+    <MESSAGE value="feature: 解决一开始登录显示列表" />
+    <MESSAGE value="feature: 未登录和登录状态列表数据在线与被选中问题" />
+    <MESSAGE value="feature: 蓝牙和wifi仅仅关闭上层页面,不替换当前页面" />
+    <MESSAGE value="feature: 解决回到首页直接替换首页的问题" />
+    <MESSAGE value="feature: 蓝牙设备和wifi设备选择连接处理" />
+    <MESSAGE value="feature: 处理加载图片失败的问题" />
+    <MESSAGE value="feature: 处理跳转,摧毁当前界面的问题" />
+    <MESSAGE value="feature: 删除无用代码,整理描述" />
+    <MESSAGE value="feature: 加入登录界面路由" />
+    <MESSAGE value="feature: 处理几个异常跳转问题" />
+    <MESSAGE value="feature: 整理数据" />
+    <option name="LAST_COMMIT_MESSAGE" value="feature: 整理数据" />
+  </component>
+</project>

+ 123 - 0
pages/blueDemos/blueDemos.js

@@ -0,0 +1,123 @@
+// pages/blueDemos/blueDemos.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+
+  },
+
+  onLoad(options) {
+    console.log("gadsfadfqwerqr====00==");
+    wx.getSetting({
+      success(res) {
+        console.log("gadsfadfqwerqr====00==" + JSON.stringify(res));
+        if (res.authSetting['scope.userInfo']) {
+          // 已经授权,可以直接调用 getUserInfo 获取头像昵称
+          wx.getUserInfo({
+            success: function (res) {
+              console.log("获取用户信息成功", res.userInfo)
+            }
+          })
+        } else {
+          // 否则,先通过 wx.createUserInfoButton 接口发起授权
+          let button = wx.createUserInfoButton({
+            type: 'text',
+            text: '获取用户信息',
+            style: {
+              left: 10,
+              top: 160,
+              width: 200,
+              height: 40,
+              lineHeight: 40,
+              backgroundColor: '#ff0000',
+              color: '#ffffff',
+              textAlign: 'center',
+              fontSize: 16,
+              borderRadius: 4
+            }
+          })
+          button.onTap((res) => {
+            console.log(res)
+          })
+        }
+      },
+      fail(err) {
+        console.log("gadsfadfqwerqr====11==" + JSON.stringify(err));
+        console.log("获取用户信息失败", err)
+      }
+    });
+
+    ///获取定位权限  
+    wx.authorize({
+      scope: 'scope.userFuzzyLocation',
+      success(res) {
+        console.log("gadsfadfqwerqr====22==" + JSON.stringify(res));
+      },
+      fail(err) {
+        console.log("gadsfadfqwerqr====333==" + JSON.stringify(err));
+      }
+    });
+
+    ///获取蓝牙权限
+    wx.authorize({
+      scope: 'scope.bluetooth',
+      success(res) {
+        console.log("gadsfadfqwerqr====444==" + JSON.stringify(res));
+      },
+      fail(err) {
+        console.log("gadsfadfqwerqr====555==" + JSON.stringify(err));
+      }
+    });
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 3 - 0
pages/blueDemos/blueDemos.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 2 - 0
pages/blueDemos/blueDemos.wxml

@@ -0,0 +1,2 @@
+<!--pages/blueDemos/blueDemos.wxml-->
+<text>pages/blueDemos/blueDemos.wxml</text>

+ 1 - 0
pages/blueDemos/blueDemos.wxss

@@ -0,0 +1 @@
+/* pages/blueDemos/blueDemos.wxss */