Sfoglia il codice sorgente

feature: 添加首页和登录分包

332777428@qq.com 6 mesi fa
parent
commit
0a38f07eac

+ 4 - 2
app.json

@@ -1,7 +1,8 @@
 {
   "pages": [
-    "pages/index/index",
-    "pages/login/login",
+    "pages/pageA/index/index",
+    "pages/pageA/login/login",
+    
     "pages/about/about",
     "pages/repeat/repeat",
     "pages/deviceWake/deviceWake",
@@ -22,6 +23,7 @@
     "pages/piano/cropper/cropper",
     "pages/setWifi/setWifi"
   ],
+
   "window": {
     "backgroundTextStyle": "light",
     "navigationBarBackgroundColor": "#fff",

+ 0 - 5
pages/index/index.json

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

+ 0 - 5
pages/login/login.json

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

+ 89 - 87
pages/index/index.js

@@ -2,31 +2,31 @@ const app = getApp();
 const {
   login,
   listByDevice
-} = require('../../utils/api.js');
+} = require('../../../utils/api.js');
 
-import timeUtil from '../../utils/time_util.js';
-import strings from '../../utils/strings.js';
-import store from '../../utils/store.js';
-import route_constant from '../../utils/route_constant.js';
-import route_util from '../../utils/route_util.js';
+import timeUtil from '../../../utils/time_util.js';
+import strings from '../../../utils/strings.js';
+import store from '../../../utils/store.js';
+import route_constant from '../../../utils/route_constant.js';
+import route_util from '../../../utils/route_util.js';
 
 /// 乐鑫相关
-import lexin_util from '../../utils/lexin/util.js';
-import lexin_jump from '../../utils/lexin/jump.js';
-import lexin_add from '../../utils/lexin/add.js';
-import lexin_scan from '../../utils/lexin/scan.js';
-
-import lexin_subscribe from '../../utils/lexin/subscribe.js';
-import lexin_connect from '../../utils/lexin/connect.js';
-import lexin_message from '../../utils/lexin/message.js';
+import lexin_util from '../../../utils/lexin/util.js';
+import lexin_jump from '../../../utils/lexin/jump.js';
+import lexin_add from '../../../utils/lexin/add.js';
+import lexin_scan from '../../../utils/lexin/scan.js';
+
+import lexin_subscribe from '../../../utils/lexin/subscribe.js';
+import lexin_connect from '../../../utils/lexin/connect.js';
+import lexin_message from '../../../utils/lexin/message.js';
 import {
   BtHelper
-} from '../../devices/bt_helper.js';
-import event_bus from '../../utils/event_bus.js';
+} from '../../../devices/bt_helper.js';
+import event_bus from '../../../utils/event_bus.js';
 import {
   EnumCmdEvent,
   CmdEvent
-} from '../../devices/cmd_key_event';
+} from '../../../devices/cmd_key_event';
 
 Page({
   data: {
@@ -41,11 +41,11 @@ Page({
     isLogin: false,
     greeting: "",
     bannerList: [{
-      "pic": "https://music-play.oss-cn-shenzhen.aliyuncs.com/device/20241028142233669038262.png"
-    },
-    {
-      "pic": "https://music-play.oss-cn-shenzhen.aliyuncs.com/device/20240823145816541223911.png"
-    }
+        "pic": "https://music-play.oss-cn-shenzhen.aliyuncs.com/device/20241028142233669038262.png"
+      },
+      {
+        "pic": "https://music-play.oss-cn-shenzhen.aliyuncs.com/device/20240823145816541223911.png"
+      }
     ],
     autoplay: true,
     interval: 3000, // 切换时间间隔
@@ -80,67 +80,6 @@ Page({
     deviceListSelect: null,
     deviceList: [],
     _willConnectBle: true,
-    // deviceList: [{
-    //   "connectType": 3,
-    //   "devName": "猫王小王子OTR-X",
-    //   "state": "online",
-    //   "name": "BLUFI_7cdfa1fcbb24",
-    //   "deviceId": "BLUFI_7cdfa1fcbb24",
-    //   "mac": "BLUFI_7cdfa1fcbb24",
-    //   "imageUrl": "https://music-play.oss-cn-shenzhen.aliyuncs.com/device/20230310100319641863705.png",
-    //   "ProdModel": "MW-2AX(WIFI-N)",
-    //   "offlineImg": "https://music-play.oss-cn-shenzhen.aliyuncs.com/device/20230310100323674404211.png"
-    // }, {
-    //   "connectType": 3,
-    //   "devName": "猫王小王子OTR-X",
-    //   "state": "online",
-    //   "name": "BLUFI_7cdfa1fcbb24",
-    //   "deviceId": "BLUFI_7cdfa1fcbb24",
-    //   "mac": "BLUFI_7cdfa1fcbb24",
-    //   "imageUrl": "https://music-play.oss-cn-shenzhen.aliyuncs.com/device/20230310100319641863705.png",
-    //   "ProdModel": "MW-2AX(WIFI-N)",
-    //   "offlineImg": "https://music-play.oss-cn-shenzhen.aliyuncs.com/device/20230310100323674404211.png"
-    // }, {
-    //   "connectType": 3,
-    //   "devName": "猫王小王子OTR-X",
-    //   "state": "online",
-    //   "name": "BLUFI_7cdfa1fcbb24",
-    //   "deviceId": "BLUFI_7cdfa1fcbb24",
-    //   "mac": "BLUFI_7cdfa1fcbb24",
-    //   "imageUrl": "https://music-play.oss-cn-shenzhen.aliyuncs.com/device/20230310100319641863705.png",
-    //   "ProdModel": "MW-2AX(WIFI-N)",
-    //   "offlineImg": "https://music-play.oss-cn-shenzhen.aliyuncs.com/device/20230310100323674404211.png"
-    // }, {
-    //   "connectType": 3,
-    //   "devName": "猫王小王子OTR-X",
-    //   "state": "online",
-    //   "name": "BLUFI_7cdfa1fcbb24",
-    //   "deviceId": "BLUFI_7cdfa1fcbb24",
-    //   "mac": "BLUFI_7cdfa1fcbb24",
-    //   "imageUrl": "https://music-play.oss-cn-shenzhen.aliyuncs.com/device/20230310100319641863705.png",
-    //   "ProdModel": "MW-2AX(WIFI-N)",
-    //   "offlineImg": "https://music-play.oss-cn-shenzhen.aliyuncs.com/device/20230310100323674404211.png"
-    // }, {
-    //   "connectType": 3,
-    //   "devName": "猫王小王子OTR-X",
-    //   "state": "online",
-    //   "name": "BLUFI_7cdfa1fcbb24",
-    //   "deviceId": "BLUFI_7cdfa1fcbb24",
-    //   "mac": "BLUFI_7cdfa1fcbb24",
-    //   "imageUrl": "https://music-play.oss-cn-shenzhen.aliyuncs.com/device/20230310100319641863705.png",
-    //   "ProdModel": "MW-2AX(WIFI-N)",
-    //   "offlineImg": "https://music-play.oss-cn-shenzhen.aliyuncs.com/device/20230310100323674404211.png"
-    // }, {
-    //   "connectType": 3,
-    //   "devName": "猫王小王子OTR-X",
-    //   "state": "online",
-    //   "name": "BLUFI_7cdfa1fcbb24",
-    //   "deviceId": "BLUFI_7cdfa1fcbb24",
-    //   "mac": "BLUFI_7cdfa1fcbb24",
-    //   "imageUrl": "https://music-play.oss-cn-shenzhen.aliyuncs.com/device/20230310100319641863705.png",
-    //   "ProdModel": "MW-2AX(WIFI-N)",
-    //   "offlineImg": "https://music-play.oss-cn-shenzhen.aliyuncs.com/device/20230310100323674404211.png"
-    // }],
     connectDeviceIding: "",
   },
 
@@ -317,7 +256,7 @@ Page({
       case "connect":
         lexin_subscribe.subscribeAllDevice();
         break;
-      ///再走有在线
+        ///再走有在线
       case "message_onoffline":
         lexin_connect.searchOnlineDevice(payloads, function (list) {
           that.updateDeviceList(list, false, false);
@@ -690,7 +629,9 @@ Page({
     });
     console.log("断开蓝牙连接", deviceId)
 
-    BtHelper.getInstance().disconnect({ "deviceId": deviceId });
+    BtHelper.getInstance().disconnect({
+      "deviceId": deviceId
+    });
 
     store.setStore("deviceList", deviceList);
     var indexPage = that.data.indexPage;
@@ -768,7 +709,6 @@ Page({
         console.log("断开连接", disDevice)
         that.updateDeviceList(that.data.deviceList, false, false);
       }
-
     });
   },
 
@@ -1043,4 +983,66 @@ Page({
     app.globalData.client = null;
 
   },
-})
+})
+
+// deviceList: [{
+//   "connectType": 3,
+//   "devName": "猫王小王子OTR-X",
+//   "state": "online",
+//   "name": "BLUFI_7cdfa1fcbb24",
+//   "deviceId": "BLUFI_7cdfa1fcbb24",
+//   "mac": "BLUFI_7cdfa1fcbb24",
+//   "imageUrl": "https://music-play.oss-cn-shenzhen.aliyuncs.com/device/20230310100319641863705.png",
+//   "ProdModel": "MW-2AX(WIFI-N)",
+//   "offlineImg": "https://music-play.oss-cn-shenzhen.aliyuncs.com/device/20230310100323674404211.png"
+// }, {
+//   "connectType": 3,
+//   "devName": "猫王小王子OTR-X",
+//   "state": "online",
+//   "name": "BLUFI_7cdfa1fcbb24",
+//   "deviceId": "BLUFI_7cdfa1fcbb24",
+//   "mac": "BLUFI_7cdfa1fcbb24",
+//   "imageUrl": "https://music-play.oss-cn-shenzhen.aliyuncs.com/device/20230310100319641863705.png",
+//   "ProdModel": "MW-2AX(WIFI-N)",
+//   "offlineImg": "https://music-play.oss-cn-shenzhen.aliyuncs.com/device/20230310100323674404211.png"
+// }, {
+//   "connectType": 3,
+//   "devName": "猫王小王子OTR-X",
+//   "state": "online",
+//   "name": "BLUFI_7cdfa1fcbb24",
+//   "deviceId": "BLUFI_7cdfa1fcbb24",
+//   "mac": "BLUFI_7cdfa1fcbb24",
+//   "imageUrl": "https://music-play.oss-cn-shenzhen.aliyuncs.com/device/20230310100319641863705.png",
+//   "ProdModel": "MW-2AX(WIFI-N)",
+//   "offlineImg": "https://music-play.oss-cn-shenzhen.aliyuncs.com/device/20230310100323674404211.png"
+// }, {
+//   "connectType": 3,
+//   "devName": "猫王小王子OTR-X",
+//   "state": "online",
+//   "name": "BLUFI_7cdfa1fcbb24",
+//   "deviceId": "BLUFI_7cdfa1fcbb24",
+//   "mac": "BLUFI_7cdfa1fcbb24",
+//   "imageUrl": "https://music-play.oss-cn-shenzhen.aliyuncs.com/device/20230310100319641863705.png",
+//   "ProdModel": "MW-2AX(WIFI-N)",
+//   "offlineImg": "https://music-play.oss-cn-shenzhen.aliyuncs.com/device/20230310100323674404211.png"
+// }, {
+//   "connectType": 3,
+//   "devName": "猫王小王子OTR-X",
+//   "state": "online",
+//   "name": "BLUFI_7cdfa1fcbb24",
+//   "deviceId": "BLUFI_7cdfa1fcbb24",
+//   "mac": "BLUFI_7cdfa1fcbb24",
+//   "imageUrl": "https://music-play.oss-cn-shenzhen.aliyuncs.com/device/20230310100319641863705.png",
+//   "ProdModel": "MW-2AX(WIFI-N)",
+//   "offlineImg": "https://music-play.oss-cn-shenzhen.aliyuncs.com/device/20230310100323674404211.png"
+// }, {
+//   "connectType": 3,
+//   "devName": "猫王小王子OTR-X",
+//   "state": "online",
+//   "name": "BLUFI_7cdfa1fcbb24",
+//   "deviceId": "BLUFI_7cdfa1fcbb24",
+//   "mac": "BLUFI_7cdfa1fcbb24",
+//   "imageUrl": "https://music-play.oss-cn-shenzhen.aliyuncs.com/device/20230310100319641863705.png",
+//   "ProdModel": "MW-2AX(WIFI-N)",
+//   "offlineImg": "https://music-play.oss-cn-shenzhen.aliyuncs.com/device/20230310100323674404211.png"
+// }],

+ 5 - 0
pages/pageA/index/index.json

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

+ 26 - 26
pages/index/index.wxml

@@ -29,7 +29,7 @@
       </view> -->
 
       <view class="add_device_public" bind:tap="jumpToAddDevice">
-        <image mode="heightFix" src="./../../img/add_device.png" style="width: 48rpx;height: 48rpx;"></image>
+        <image mode="heightFix" src="../../../img/add_device.png" style="width: 48rpx;height: 48rpx;"></image>
         <view style="color: white; margin-left: 8rpx; font-size: 32rpx;">添加设备</view>
       </view>
 
@@ -53,13 +53,13 @@
                     </view>
 
                     <view style="width: 48rpx; height: 48rpx;">
-                      <image mode="aspectFit" src="./../../img/add_device_arrow.png" style="width: 48rpx; height: 48rpx; opacity: {{item.state && item.state === 'online'&&deviceListSelect === index ? '1' : '0'}}; "></image>
+                      <image mode="aspectFit" src="../../../img/add_device_arrow.png" style="width: 48rpx; height: 48rpx; opacity: {{item.state && item.state === 'online'&&deviceListSelect === index ? '1' : '0'}}; "></image>
                     </view>
 
                   </view>
 
                   <view style="color: #666666; font-size: 24rpx;display: flex; flex-direction: row; align-items: center;">
-                    <image mode="heightFix" src="{{item.connectType==3?'./../../images/device/wifi_black.png':'./../../images/device/blue_black.png'}}" style="width: 28rpx;height: 28rpx; padding-right: 10rpx; opacity: {{item.state && item.state === 'online' ? '1' : '0.7'}};"></image>
+                    <image mode="heightFix" src="{{item.connectType==3?'../../../images/device/wifi_black.png':'../../../images/device/blue_black.png'}}" style="width: 28rpx;height: 28rpx; padding-right: 10rpx; opacity: {{item.state && item.state === 'online' ? '1' : '0.7'}};"></image>
                     <view style="white-space: nowrap;"> {{item.state && item.state === "online" ? (item.connectType==3?"Wifi在线":"蓝牙在线") : "离线"}} </view>
                   </view>
 
@@ -81,13 +81,13 @@
       <view wx:if="{{indexPage==1&&deviceListSelect!=null&&deviceList.length>deviceListSelect&&deviceList[deviceListSelect].connectType===3}}" class="mair" style="height: calc(100vh - 105rpx - {{safeBottomHeight}}rpx - 22rpx - {{navBarHeight}}px);">
         <view class="play-info">
           <view class="info">
-            <image src="./../../img/blak.png" class="black" mode="scaleToFill"></image>
-            <image src="./../../img/mm.png" class="mode" mode="widthFix"></image>
-            <image class="logo" mode="heightFix" src="./../../img/logo.png"></image>
+            <image src="../../../img/blak.png" class="black" mode="scaleToFill"></image>
+            <image src="../../../img/mm.png" class="mode" mode="widthFix"></image>
+            <image class="logo" mode="heightFix" src="../../../img/logo.png"></image>
             <view wx:if="{{actionIndex !== null}}" style="opacity: 0.8; text-shadow:0px 0px 4px #6D00FF;" class="fm">
               FM.{{actionIndex !== null ? (actionIndex + 1 < 10 ? "0" + (actionIndex + 1) : actionIndex + 1) : 00}} </view>
                 <view wx:if="{{actionIndex !== null}}" style="opacity: 1;" class="fm">
-                  FM.{{actionIndex !== null ? (actionIndex + 1 < 10 ? "0" + (actionIndex + 1) : actionIndex + 1) : 00}} <image class="gochnnalList" mode="heightFix" src="./../../img/a6.png">
+                  FM.{{actionIndex !== null ? (actionIndex + 1 < 10 ? "0" + (actionIndex + 1) : actionIndex + 1) : 00}} <image class="gochnnalList" mode="heightFix" src="../../../img/a6.png">
                     </image>
                 </view>
                 <view class="fmMod" bindtap="onTapToChannel"></view>
@@ -99,40 +99,40 @@
                     </view>
                   </view>
                 </view>
-                <image src="{{'./../../img/dl' + battery + '.png'}}" class="battery" mode="scaleToFill"></image>
+                <image src="{{'../../../img/dl' + battery + '.png'}}" class="battery" mode="scaleToFill"></image>
             </view>
             <view class="wakeMode" bindtap="goWake">
-              <image src="./../../img/woak.png" class="mode" mode="scaleToFill"></image>
-              <image class="wake" mode="heightFix" src="{{isSetWake ? './../../img/n24.png' : './../../img/n23.png' }}"></image>
+              <image src="../../../img/woak.png" class="mode" mode="scaleToFill"></image>
+              <image class="wake" mode="heightFix" src="{{isSetWake ? '../../../img/n24.png' : '../../../img/n23.png' }}"></image>
               <text>定时</text>
             </view>
           </view>
           <scroll-view class="pd" scroll-y="true">
             <view class="conm" wx:if="{{channelData && channelData.length > 0}}">
-              <image mode="scaleToFill" class="cz" src="./../../img/cz.png"></image>
+              <image mode="scaleToFill" class="cz" src="../../../img/cz.png"></image>
               <view class="musicList">
                 <view wx:for="{{channelData}}" class="li {{index === actionIndex ? 'action' : ' '}}">
-                  <image mode="scaleToFill" wx:if="{{index === actionIndex}}" class="zz" src="./../../img/zz.png"></image>
+                  <image mode="scaleToFill" wx:if="{{index === actionIndex}}" class="zz" src="../../../img/zz.png"></image>
                   <text class="lm">{{luoma[index]}}</text>
                   <view class="musicInfo" data-index="{{index}}" bindtap="onTapChannelIndex">
-                    <image mode="scaleToFill" class="pic" src="{{item.channelPic ? item.channelPic : './../../img/head_pic.png'}}"></image>
+                    <image mode="scaleToFill" class="pic" src="{{item.channelPic ? item.channelPic : '../../../img/head_pic.png'}}"></image>
                     <text>{{item.channelName}}</text>
-                    <image mode="scaleToFill" wx:if="{{index === actionIndex}}" class="svg" src="./../../svg/audio.svg"></image>
+                    <image mode="scaleToFill" wx:if="{{index === actionIndex}}" class="svg" src="../../../svg/audio.svg"></image>
                   </view>
                 </view>
               </view>
-              <!-- <image src="./../../svg/audio.svg"></image> -->
+              <!-- <image src="../../../svg/audio.svg"></image> -->
             </view>
           </scroll-view>
           <!-- 登录启用以下版本 -->
           <view class="gologin" wx:if="{{showLogin}}">
             <view class="model">
               <view bindtap="goLogin" style="position: none; height: auto;" class="loginPic">
-                <image style="margin: 20rpx 0 20rpx 0; width: 100vw;" mode="widthFix" src="./../../img/BG_long.png"></image>
+                <image style="margin: 20rpx 0 20rpx 0; width: 100vw;" mode="widthFix" src="../../../img/BG_long.png"></image>
               </view>
               <view style="position: none; height: calc(100% - 224rpx); overflow: auto;" class="BG_PD">
                 <view>
-                  <image style="margin: 0; width: 100vw;" mode="widthFix" src="./../../img/BG_PD.png"></image>
+                  <image style="margin: 0; width: 100vw;" mode="widthFix" src="../../../img/BG_PD.png"></image>
                 </view>
               </view>
             </view>
@@ -140,11 +140,11 @@
           <view class="gologin goruter" wx:if="{{!showLogin && deviceList && deviceList.length === 0}}">
             <view class="model">
               <view bindtap="goDeviceConnect" style="position: none; height: auto;" class="loginPic">
-                <image style="margin: 20rpx 0 20rpx 0; width: 100vw;" mode="widthFix" src="./../../img/BG_LJ.png"></image>
+                <image style="margin: 20rpx 0 20rpx 0; width: 100vw;" mode="widthFix" src="../../../img/BG_LJ.png"></image>
               </view>
               <view style="position: none; height: calc(100% - 224rpx); overflow: auto;" class="BG_PD">
                 <view>
-                  <image style="margin: 0; width: 100vw;" mode="widthFix" src="./../../img/BG_PD.png"></image>
+                  <image style="margin: 0; width: 100vw;" mode="widthFix" src="../../../img/BG_PD.png"></image>
                 </view>
               </view>
             </view>
@@ -161,20 +161,20 @@
           <view class="list">
             <view class="li">
               <view class="icon">
-                <image mode="widthFix" style="width: 40rpx; height: 40rpx;" src="./../../img/o.png"></image>
+                <image mode="widthFix" style="width: 40rpx; height: 40rpx;" src="../../../img/o.png"></image>
               </view>
               <view class="button">
                 <button open-type="feedback">建议与反馈</button>
-                <image class="j" src="./../../img/b.png"></image>
+                <image class="j" src="../../../img/b.png"></image>
               </view>
             </view>
             <view class="li">
               <view class="icon">
-                <image mode="widthFix" style="width: 40rpx; height: 40rpx;" src="./../../img/q.png"></image>
+                <image mode="widthFix" style="width: 40rpx; height: 40rpx;" src="../../../img/q.png"></image>
               </view>
               <view class="button" bindtap="jumpToAboutUs">
                 <text>关于我们</text>
-                <image class="j" src="./../../img/b.png"></image>
+                <image class="j" src="../../../img/b.png"></image>
               </view>
             </view>
           </view>
@@ -193,7 +193,7 @@
       <view style="flex: 1; text-align: center; display: flex;align-items: center;">
         <!-- 首页 -->
         <view class="bottom_view" data-index="0" bind:tap="onTapIndex">
-          <image class="bottom_image" mode="widthFix" src="{{indexPage==0?'./../../img/index_action.png':'./../../img/index_unaction.png'}}"></image>
+          <image class="bottom_image" mode="widthFix" src="{{indexPage==0?'../../../img/index_action.png':'../../../img/index_unaction.png'}}"></image>
           <view style="font-size: 20rpx;color: {{indexPage==0?'#A4D099':'black'}}; padding-top: 0rpx;margin-top: 0rpx;">
             首页
           </view>
@@ -201,13 +201,13 @@
 
         <!-- 频道 -->
         <view wx:if="{{deviceListSelect!=null&&deviceList.length>deviceListSelect&&deviceList[deviceListSelect].connectType===3}}" class="bottom_view" data-index="1" bind:tap="onTapIndex">
-          <image class="bottom_image" mode="widthFix" src="{{indexPage==1?'./../../img/channel_action.png':'./../../img/channel_unaction.png'}}"></image>
+          <image class="bottom_image" mode="widthFix" src="{{indexPage==1?'../../../img/channel_action.png':'../../../img/channel_unaction.png'}}"></image>
           <view style="font-size: 20rpx;color: {{indexPage==1?'#A4D099':'black'}};">频道</view>
         </view>
 
         <!-- 我的 -->
         <view class="bottom_view" data-index="2" bind:tap="onTapIndex">
-          <image class="bottom_image" mode="widthFix" src="{{indexPage==2?'./../../img/me_action.png':'./../../img/me_unaction.png'}}"></image>
+          <image class="bottom_image" mode="widthFix" src="{{indexPage==2?'../../../img/me_action.png':'../../../img/me_unaction.png'}}"></image>
           <view style="font-size: 20rpx;color: {{indexPage==2?'#A4D099':'black'}};">我的</view>
         </view>
       </view>

pages/index/index.wxss → pages/pageA/index/index.wxss


+ 3 - 3
pages/login/login.js

@@ -1,10 +1,10 @@
 const {
   login,
   register
-} = require('./../../utils/api.js')
+} = require('../../../utils/api.js')
 
-import route_constant from '../../utils/route_constant.js';
-import route_util from '../../utils/route_util.js';
+import route_constant from '../../../utils/route_constant.js';
+import route_util from '../../../utils/route_util.js';
 
 Page({
 

+ 5 - 0
pages/pageA/login/login.json

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

+ 2 - 2
pages/login/login.wxml

@@ -3,13 +3,13 @@
   <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="mair">
-    <image mode="widthFix" src="./../../img/k.png"></image>
+    <image mode="widthFix" src="../../../img/k.png"></image>
     <view class="loginbut">
       <view class="mode" wx:if="{{!isAgree}}" catchtap="notlogin"></view>
       <button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">手机号快速登录</button>
     </view>
     <view class="ys">
-      <image bindtap="egree" mode="aspectFill" src="./../../img/{{isAgree ? 'h' : 'j'}}.png"></image>
+      <image bindtap="egree" mode="aspectFill" src="../../../img/{{isAgree ? 'h' : 'j'}}.png"></image>
       <view>我已阅读并同意<text data-index="0"  bindtap="goabout">《猫王妙播用户服务协议》</text>
         <text data-index="1"  bindtap="goabout">《猫王妙播用户隐私协议》</text></view>
     </view>

pages/login/login.wxss → pages/pageA/login/login.wxss


+ 1 - 1
project.private.config.json

@@ -24,7 +24,7 @@
         },
         {
           "name": "",
-          "pathName": "pages/index/index",
+          "pathName": "pages/pageA/index/index",
           "query": "",
           "launchMode": "default",
           "scene": null

+ 1 - 1
utils/route_constant.js

@@ -1,5 +1,5 @@
 ///路由
-const indexRoot = "pages/index/index";
+const indexRoot = "pages/pageA/index/index";
 const loginRoot = "pages/login/login";
 const connectBleRoot = "pages/connectBle/connectBle";