浏览代码

feature: 增加关于我们的分包处理

332777428@qq.com 4 月之前
父节点
当前提交
a7947fcb34

+ 6 - 0
app.json

@@ -30,6 +30,12 @@
       ]
     },
     {
+      "root": "pages/pageC/",
+      "pages": [
+        "about/about"
+      ]
+    },
+    {
       "root": "pages/pageD/",
       "pages": [
         "webview/webview"

+ 2 - 9
pages/about/about.js

@@ -5,16 +5,9 @@ Page({
    * 页面的初始数据
    */
   data: {
-    nvabarData: {
-      showCapsule: 1, //是否显示左上角图标   1表示显示    0表示不显示
-      title: '关于我们', //导航栏 中间的标题
-    },
-  },
-  go(e) {
-    wx.navigateTo({
-      url: './../aboutInfo/aboutInfo?type=' + e.currentTarget.dataset.index,
-    })
+
   },
+
   /**
    * 生命周期函数--监听页面加载
    */

+ 0 - 5
pages/about/about.json

@@ -1,5 +0,0 @@
-{
-  "usingComponents": {
-    "nav-bar": "./../../components/navbar/navbar"
-  }
-}

+ 1 - 14
pages/about/about.wxml

@@ -1,15 +1,2 @@
 <!--pages/about/about.wxml-->
-<view class="about">
-  <nav-bar bind:goBack="_goBack" nav-bgc-class="ex-nav-bgc-class" nav-title-class="ex-nav-title-class" ex-back-pre="ex-back-pre" navbar-data='{{nvabarData}}'>
-  </nav-bar>
-  <view class="page-view">
-    <view class="about-li" data-index="0" bindtap="go">
-      <text>猫王用户协议</text>
-      <image class="j" mode="heightFix" src="./../../img/b.png"></image>
-    </view>
-    <view class="about-li" data-index="1" bindtap="go">
-      <text>猫王隐私政策</text>
-      <image class="j" mode="heightFix" src="./../../img/b.png"></image>
-    </view>
-  </view>
-</view>
+<text>pages/about/about.wxml</text>

+ 16 - 0
pages/pageC/about/about.js

@@ -0,0 +1,16 @@
+Page({
+
+  data: {
+    nvabarData: {
+      showCapsule: 1, //是否显示左上角图标   1表示显示    0表示不显示
+      title: '关于我们', //导航栏 中间的标题
+    },
+  },
+
+  go(e) {
+    wx.navigateTo({
+      url: './../aboutInfo/aboutInfo?type=' + e.currentTarget.dataset.index,
+    })
+  },
+
+})

+ 5 - 0
pages/pageC/about/about.json

@@ -0,0 +1,5 @@
+{
+  "usingComponents": {
+    "nav-bar": "./../../../components/navbar/navbar"
+  }
+}

+ 15 - 0
pages/pageC/about/about.wxml

@@ -0,0 +1,15 @@
+<!--pages/about/about.wxml-->
+<view class="about">
+  <nav-bar bind:goBack="_goBack" nav-bgc-class="ex-nav-bgc-class" nav-title-class="ex-nav-title-class" ex-back-pre="ex-back-pre" navbar-data='{{nvabarData}}'>
+  </nav-bar>
+  <view class="page-view">
+    <view class="about-li" data-index="0" bindtap="go">
+      <text>猫王用户协议</text>
+      <image class="j" mode="heightFix" src="./../../../img/b.png"></image>
+    </view>
+    <view class="about-li" data-index="1" bindtap="go">
+      <text>猫王隐私政策</text>
+      <image class="j" mode="heightFix" src="./../../../img/b.png"></image>
+    </view>
+  </view>
+</view>

pages/about/about.wxss → pages/pageC/about/about.wxss


+ 5 - 4
utils/routePath.js

@@ -12,6 +12,9 @@ const deviceConnect2 = "../../pageB/deviceConnect2/deviceConnect2";
 const deviceConnect3 = "../../pageB/deviceConnect3/deviceConnect3";
 const deviceConnect4 = "../../pageB/deviceConnect4/deviceConnect4";
 
+/// C
+const about = "../../pageC/about/about";
+
 /// pageD
 const webview = "../../pageD/webview/webview";
 
@@ -19,8 +22,6 @@ const webview = "../../pageD/webview/webview";
 const cropper = "../../piano/cropper/cropper";
 const wallpaper = "../../piano/wallpaper/wallpaper";
 const deviceDetail = "../../piano/deviceDetail/deviceDetail";
-
-const about = "../about/about";
 const setWifi = "../setWifi/setWifi";
 
 /// 抽奖记录
@@ -38,6 +39,8 @@ module.exports = {
   deviceConnect2: deviceConnect2,
   deviceConnect3: deviceConnect3,
   deviceConnect4: deviceConnect4,
+  /// C
+  about: about,
   /// D
   webview: webview,
 
@@ -45,8 +48,6 @@ module.exports = {
   cropper: cropper,
   wallpaper: wallpaper,
   deviceDetail: deviceDetail,
-
-  about: about,
   connectMode: connectMode,
   connectBle: connectBle,
   setWifi: setWifi,