Sfoglia il codice sorgente

做了启动页,消息页,首页完善,添加设备页

不夜浮尘 2 settimane fa
parent
commit
a16fea3c91
35 ha cambiato i file con 308 aggiunte e 165 eliminazioni
  1. 5 1
      sources/client/smart-cooker/app.json
  2. BIN
      sources/client/smart-cooker/assets/images/xian/adddevice_img1.png
  3. BIN
      sources/client/smart-cooker/assets/images/xian/adddevice_img2.png
  4. BIN
      sources/client/smart-cooker/assets/images/xian/adddevice_img3.png
  5. BIN
      sources/client/smart-cooker/assets/images/xian/adddevice_img4.png
  6. BIN
      sources/client/smart-cooker/assets/images/xian/adddevice_img5.png
  7. BIN
      sources/client/smart-cooker/assets/images/xian/adddevice_scan1.png
  8. BIN
      sources/client/smart-cooker/assets/images/xian/adddevice_scan2.png
  9. BIN
      sources/client/smart-cooker/assets/images/xian/icon_close.png
  10. BIN
      sources/client/smart-cooker/assets/images/xian/icon_eyes.png
  11. BIN
      sources/client/smart-cooker/assets/images/xian/icon_start.png
  12. BIN
      sources/client/smart-cooker/assets/images/xian/nomessag_bg.png
  13. BIN
      sources/client/smart-cooker/assets/images/xian/start_bg.png
  14. BIN
      sources/client/smart-cooker/assets/images/xian/wifi_bg.png
  15. 64 0
      sources/client/smart-cooker/pages/adddevice/index.js
  16. 2 1
      sources/client/smart-cooker/pages/message1/index.json
  17. 48 0
      sources/client/smart-cooker/pages/adddevice/index.tyml
  18. 31 0
      sources/client/smart-cooker/pages/adddevice/index.tyss
  19. 1 1
      sources/client/smart-cooker/pages/home/index.js
  20. 3 4
      sources/client/smart-cooker/pages/home/index.tyml
  21. 3 37
      sources/client/smart-cooker/pages/message/index.js
  22. 1 0
      sources/client/smart-cooker/pages/message/index.json
  23. 9 18
      sources/client/smart-cooker/pages/message/index.tyml
  24. 3 23
      sources/client/smart-cooker/pages/message/index.tyss
  25. 0 54
      sources/client/smart-cooker/pages/message1/index.js
  26. 0 2
      sources/client/smart-cooker/pages/message1/index.tyml
  27. 0 24
      sources/client/smart-cooker/pages/message1/index.tyss
  28. 54 0
      sources/client/smart-cooker/pages/selectwifi/index.js
  29. 9 0
      sources/client/smart-cooker/pages/selectwifi/index.json
  30. 23 0
      sources/client/smart-cooker/pages/selectwifi/index.tyml
  31. 15 0
      sources/client/smart-cooker/pages/selectwifi/index.tyss
  32. 16 0
      sources/client/smart-cooker/pages/start/index.js
  33. 9 0
      sources/client/smart-cooker/pages/start/index.json
  34. 7 0
      sources/client/smart-cooker/pages/start/index.tyml
  35. 5 0
      sources/client/smart-cooker/pages/start/index.tyss

+ 5 - 1
sources/client/smart-cooker/app.json

@@ -1,11 +1,15 @@
 {
   "themeLocation": "theme.json",
   "pages": [
+    "pages/selectwifi/index",
     "pages/home/index",
     "pages/cookbook/index",
     "pages/smartselection/index",
     "pages/my/index",
-    "pages/message/index"
+    "pages/start/index",
+    "pages/message/index",
+    "pages/adddevice/index",
+    "pages/selectwifi/index"
   ],
   "tabBar": {
     "color": "@tabFontColor",

BIN
sources/client/smart-cooker/assets/images/xian/adddevice_img1.png


BIN
sources/client/smart-cooker/assets/images/xian/adddevice_img2.png


BIN
sources/client/smart-cooker/assets/images/xian/adddevice_img3.png


BIN
sources/client/smart-cooker/assets/images/xian/adddevice_img4.png


BIN
sources/client/smart-cooker/assets/images/xian/adddevice_img5.png


BIN
sources/client/smart-cooker/assets/images/xian/adddevice_scan1.png


BIN
sources/client/smart-cooker/assets/images/xian/adddevice_scan2.png


BIN
sources/client/smart-cooker/assets/images/xian/icon_close.png


BIN
sources/client/smart-cooker/assets/images/xian/icon_eyes.png


BIN
sources/client/smart-cooker/assets/images/xian/icon_start.png


BIN
sources/client/smart-cooker/assets/images/xian/nomessag_bg.png


BIN
sources/client/smart-cooker/assets/images/xian/start_bg.png


BIN
sources/client/smart-cooker/assets/images/xian/wifi_bg.png


+ 64 - 0
sources/client/smart-cooker/pages/adddevice/index.js

@@ -0,0 +1,64 @@
+Page({
+  data: {
+    scan_list: [
+      {
+        name: '智能电饭煲',
+        imgUrl: '/assets/images/xian/adddevice_scan1.png',
+        checked : true,
+      },
+      {
+        name: '智能电饭煲2',
+        imgUrl: '/assets/images/xian/adddevice_scan2.png',
+        checked : false,
+      },
+    ],
+    device_list: [
+      {
+        category: '厨房电器',
+        device: [
+          {
+            name: '智能电饭煲',
+            imgUrl: '/assets/images/xian/adddevice_img1.png',
+          },
+          {
+            name: '电热水壶',
+            imgUrl: '/assets/images/xian/adddevice_img2.png',
+          },
+          {
+            name: '空气炸锅',
+            imgUrl: '/assets/images/xian/adddevice_img3.png',
+          },
+          {
+            name: '破壁料理机',
+            imgUrl: '/assets/images/xian/adddevice_img4.png',
+          },
+        ]
+      },
+      {
+        category: '清洁电器',
+        device: [
+          {
+            name: '扫地机器人',
+            imgUrl: '/assets/images/xian/adddevice_img5.png',
+          }
+        ]
+      },
+    ],
+  },
+
+  onShow() {
+    this.setData({
+      // hasHiddenTabBar: true,
+      // scan_list: []
+    })
+    ty.hideMenuButton()
+  },
+
+  goSelectWifi() { 
+    ty.navigateTo({
+      url: '/pages/selectwifi/index',
+    })
+  }
+
+
+})

+ 2 - 1
sources/client/smart-cooker/pages/message1/index.json

@@ -1,6 +1,7 @@
 {
+  "navigationBarBackgroundColor": "rgba(255, 243, 224, 1)",
   "navigationBarTextStyle": "black",
-  "navigationBarTitleText": "index",
+  "navigationBarTitleText": "添加设备",
   "backgroundColor": "#f2f4f6",
   "backgroundTextStyle": "dark",
   "enablePullDownRefresh": true,

+ 48 - 0
sources/client/smart-cooker/pages/adddevice/index.tyml

@@ -0,0 +1,48 @@
+<view class="adddevice_bg"></view>
+<view class="adddevice">
+    <view class="adddevice_card">
+        <view class="card_title">扫描附近设备</view>
+        <view class="card_message" ty:if="{{scan_list.length > 0}}">发现以下设备,请点击联网</view>
+        <view class="card_message" ty:else>持续自动搜索中…</view>
+        <view class="card_list" ty:if="{{scan_list.length > 0}}">
+            <view class="card_item {{item.checked ? 'checked' : ''}}" ty:for="{{scan_list}}" ty:key="index" bind:tap="goSelectWifi"> 
+                <view class="card_item_img img_box">
+                    <image src="{{item.imgUrl}}" mode="widthFix"></image>
+                </view>
+                <view class="card_item_text">{{item.name}}</view>
+            </view>
+        </view>
+        <view class="card_box" ty:else>
+            <view class="card_scan">
+                <view class="scan_round1">
+                    <view class="scan_round2 radius_absolute">
+                        <view class="scan_round3 radius_absolute">
+                            <view class="scan_round4 radius_absolute">
+                                <view class="scan_round5 radius_absolute"></view>
+                            </view>
+                        </view>
+                    </view>
+                </view>
+            </view>
+            <view class="card_text">请将手机尽量靠近要添加的设备</view>
+            <view class="card_tip">未发现设备,可在下面的列表中选择添加</view>
+        </view>
+    </view>
+    <view class="adddevice_card">
+        <view class="card_title">手动添加设备</view>
+        <view class="card_category">
+            <view class="card_category_list" ty:for="{{device_list}}" ty:key="{{index}}">
+                <view class="card_category_name">{{item.category}}</view>
+                <view class="card_category_item">
+                    <view class="card_category_box" ty:for="{{item.device}}" ty:key="{{index}}">
+                        <view class="card_category_img img_box">
+                            <image src="{{item.imgUrl}}" mode="widthFix"></image>
+                        </view>
+                        <view class="device_box_title">{{item.name}}</view>
+                    </view>
+                </view>
+            </view>
+        </view>
+    </view>
+
+</view>

+ 31 - 0
sources/client/smart-cooker/pages/adddevice/index.tyss

@@ -0,0 +1,31 @@
+page {background-color: #F6F7F8;}
+.adddevice_bg {position: fixed;width: 750rpx;height: 600rpx;background: linear-gradient( 180deg, #FFF3E0 0%, rgba(255,243,224,0) 100%);}
+.adddevice {padding: 24rpx;box-sizing: border-box;position: relative;}
+.adddevice .adddevice_card {background: #FFFFFF;box-shadow: 0rpx 4rpx 16rpx 1rpx rgba(0,0,0,0.06);border-radius: 16rpx;padding: 24rpx;box-sizing: border-box;margin-bottom: 24rpx;}
+.adddevice .adddevice_card .card_title {font-family: PingFang SC, PingFang SC;font-weight: 600;font-size: 36rpx;color: #150132;text-align: left;font-style: normal;text-transform: none;margin-top: 16rpx;}
+.adddevice .adddevice_card .card_message {font-family: PingFang SC, PingFang SC;font-weight: 400;font-size: 24rpx;color: #999999;text-align: left;font-style: normal;text-transform: none;margin-top: 8rpx;}
+.adddevice .adddevice_card .card_box {margin-top: 16rpx;display: flex;flex-direction: column;justify-content: start;align-items: center;}
+.radius_absolute {border-radius: 50%;position: absolute;top: 0;right: 0;bottom: 0;left: 0;margin: auto;}
+.adddevice .adddevice_card .card_box .card_scan .scan_round1 {width: 240rpx;height: 240rpx;background: #FFEEBF;opacity: 0.2;z-index: 1;position: relative;border-radius: 50%;}
+.adddevice .adddevice_card .card_box .card_scan .scan_round1 .scan_round2 {width: 160rpx;height: 160rpx;background: #FFEEBF;opacity: 0.3;z-index: 2;}
+.adddevice .adddevice_card .card_box .card_scan .scan_round1 .scan_round2 .scan_round3 {width: 120rpx;height: 120rpx;background: #FFEEBF;opacity: 0.6;z-index: 3;}
+.adddevice .adddevice_card .card_box .card_scan .scan_round1 .scan_round2 .scan_round3 .scan_round4 {width: 80rpx;height: 80rpx;background: conic-gradient( from 225deg at 50% 50%, rgba(255,214,136,0) 0%, rgba(255,215,126,0) 26%, #FF9D3B 100%);z-index: 4;}
+.adddevice .adddevice_card .card_box .card_scan .scan_round1 .scan_round2 .scan_round3 .scan_round4 .scan_round5 {width: 8rpx;height: 8rpx;background: #EE742F;z-index: 5;}
+.adddevice .adddevice_card .card_box .card_text {margin-top: 16rpx;font-family: PingFang SC, PingFang SC;font-weight: 400;font-size: 28rpx;color: #666666;text-align: center;font-style: normal;text-transform: none;}
+.adddevice .adddevice_card .card_box .card_tip {font-family: PingFang SC, PingFang SC;font-weight: 400;font-size: 24rpx;color: #EE742F;text-align: center;font-style: normal;text-transform: none;margin: 16rpx auto;}
+
+.adddevice .adddevice_card .card_list {padding: 40rpx 0 17rpx;box-sizing: border-box;display: grid;grid-template-columns: repeat(2, 1fr);grid-gap: 26rpx;}
+
+.adddevice .adddevice_card .card_list .card_item {width: 314rpx;height: 320rpx;background: #F6F7F8;border-radius: 16rpx;display: flex;flex-direction: column;justify-content: center;align-items: center;}
+.adddevice .adddevice_card .card_list .card_item.checked {background: rgba(238,116,47,0.1);border: 2rpx solid #EE742F;}
+.adddevice .adddevice_card .card_list .card_item .card_item_img {width: 160rpx;padding-top: 160rpx;border: 1px dashed #cccccc ;}
+.adddevice .adddevice_card .card_list .card_item .card_item_text {margin-top: 40rpx;font-family: PingFang SC, PingFang SC;font-weight: 400;font-size: 24rpx;color: #150132;text-align: center;font-style: normal;text-transform: none;}
+.adddevice .adddevice_card .card_list .card_item.checked .card_item_text {color: #EE742F;}
+
+.adddevice .adddevice_card .card_category {margin-top: 20rpx;}
+.adddevice .adddevice_card .card_category .card_category_list {padding: 20rpx 0;box-sizing: border-box;}
+.adddevice .adddevice_card .card_category .card_category_list .card_category_name {font-family: PingFang SC, PingFang SC;font-weight: 400;font-size: 24rpx;color: #666666;text-align: left;font-style: normal;text-transform: none;}
+.adddevice .adddevice_card .card_category .card_category_list .card_category_item {display: grid;grid-template-columns: repeat(2, 1fr);grid-gap: 24rpx;}
+.adddevice .adddevice_card .card_category .card_category_list .card_category_item .card_category_box {margin-top: 24rpx;width: 314rpx;height: 112rpx;background: #F6F7F8;border-radius: 16rpx;padding: 24rpx;box-sizing: border-box;display: flex;justify-content: flex-start;align-items: center;}
+.adddevice .adddevice_card .card_category .card_category_list .card_category_item .card_category_box .card_category_img {width: 64rpx;padding-top: 64rpx;}
+.adddevice .adddevice_card .card_category .card_category_list .card_category_item .card_category_box .device_box_title {margin-left: 16rpx;font-family: PingFang SC, PingFang SC;font-weight: 400;font-size: 24rpx;color: #150132;text-align: left;font-style: normal;text-transform: none;}

+ 1 - 1
sources/client/smart-cooker/pages/home/index.js

@@ -39,7 +39,7 @@ Page({
   },
 
   goAddDevice() {
-   console.log('goAddDevice')
+    ty.navigateTo({url: '/pages/adddevice/index'})
   },
 
   handleSwitch(e) {

+ 3 - 4
sources/client/smart-cooker/pages/home/index.tyml

@@ -16,15 +16,14 @@
                 </block>
             </swiper>
         </view>
-    </view>
+    </view> 
     <view class="home_device">
         <view class="device_header">
             <view class="device_title">所有设备</view>
             <view class="device_add img_box" bind:tap="goAddDevice">
-                <image mode="widthFix" lazy-load="true" src="/assets/images/xian/icon_add.png" />
-            </view>
+                <image mode="widthFix" lazy-load="true" src="/assets/images/xian/icon_add.png " />
+            </view> 
         </view>
-        
         <view class="device_list" ty:if="{{device_list.length > 0}}">
             <view class="device_box" ty:for="{{device_list}}" ty:key="{{index}}">
                 <view class="device_box_img img_box">

+ 3 - 37
sources/client/smart-cooker/pages/message/index.js

@@ -1,48 +1,14 @@
 Page({
   data: {
-    resultData: [
-      {
-        name: 'input',
-        value: '',
-      },
-      {
-        name: 'input',
-        value: '',
-      },
-      {
-        name: 'text',
-        value: '忘记密码?新用户注册',
-      },
-      {
-        name: 'textarea',
-        value: '',
-      },
-    ],
+    message_list: ['1', '2', '3'],
   },
 
   onShow() {
     this.setData({
-      hasHiddenTabBar: true
+      // hasHiddenTabBar: true,
+      message_list: []
     })
     ty.hideMenuButton()
   },
 
-  handleSubmit(ev) {
-    const value = ev.detail.value;
-    const resultData = [];
-    for (let name in value) {
-      resultData.push({
-        name,
-        value: value[name],
-      });
-    }
-    this.setData({
-      resultData,
-    });
-  },
-
-  getRegister() {
-    ty.navigateTo('/home')
-  },
-
 })

+ 1 - 0
sources/client/smart-cooker/pages/message/index.json

@@ -1,4 +1,5 @@
 {
+  "navigationBarBackgroundColor": "#FFFFFF",
   "navigationBarTextStyle": "black",
   "navigationBarTitleText": "通知",
   "backgroundColor": "#f2f4f6",

+ 9 - 18
sources/client/smart-cooker/pages/message/index.tyml

@@ -1,20 +1,11 @@
-<view class="home">
-    <view class="home_top">
-        <view class="home_header">
-            <view class="index_title">早上好, 嘟嘟</view>
-            <view slot="message" class="index_message" bind:tap="goMessage">
-                <image mode="widthFix" lazy-load="true" src="/assets/images/xian/icon_message.png" />
-                <mpbadge ext-class="mpbadge" content="99+" />
-            </view>
-        </view>
-        <view class="home_swiper">
-            <swiper style="height: 100%" indicator-dots="{{indicatorDots}}" indicator-color="{{indicatorColor}}" indicator-active-color="{{indicatorActiveColor}}" autoplay="{{autoplay}}" circular="{{circular}}" interval="{{interval}}" duration="{{duration}}">
-                <block ty:for="{{background}}" ty:key="*this">
-                    <swiper-item>
-                        <image src="{{item}}" mode="widthFix" lazy-load="true"></image>
-                    </swiper-item>
-                </block>
-            </swiper>
-        </view>
+<view class="message">
+    <view class="message_list" ty:if="{{message_list.length > 0}}">
+        消息列表
+    </view>
+    <view class="nomessage" ty:else>
+       <view class="nomessage_img img_box">
+            <image class="image" src="/assets/images/xian/nomessag_bg.png" mode="widthFix"></image>
+       </view>
+       <view class="nomessage_text">暂无消息</view>
     </view>
 </view>

+ 3 - 23
sources/client/smart-cooker/pages/message/index.tyss

@@ -1,24 +1,4 @@
 page {background-color: #F6F7F8;}
-.home {background-color: #F6F7F8;}
-.home .home_top {width: 750rpx;height: 600rpx;background: url(/assets/images/xian/home_bg.png) no-repeat center;background-size: cover;padding: 0 24rpx;padding-top: 88rpx;box-sizing: border-box;}
-.home .home_top .home_header {display: flex;justify-content: space-between;align-items: center;padding: 28rpx 0 10rpx;box-sizing: border-box;}
-.home .home_top .home_header .index_title {font-family: PingFang SC, PingFang SC;font-weight: 500;font-size: 36rpx;color: #150132;line-height: 50rpx;text-align: left;font-style: normal;text-transform: none;font-weight: bold;}
-.home .home_top .home_header .index_message {position: relative;width: 36rpx;height: 36rpx;}
-.home .home_top .home_header .index_message image {width: 100%;height: 100%;display: inline-block;}
-.home .home_top .home_header .index_message .mpbadge {position: absolute;top: -50%;left: -50%;display: none;}
-.home .home_top .home_swiper {margin-top: 74rpx;margin-bottom: 10rpx;width: 702rpx;height: 340rpx;border-radius: 16rpx;overflow: hidden;}
-.home .home_top .home_swiper image {width: 100%;display: inline-block;}
-
-.home .home_device {padding: 0 24rpx;box-sizing: border-box;}
-.home .home_device .device_header {margin-top: 30rpx;display: flex;justify-content: space-between;align-items: center;}
-.home .home_device .device_header .device_title {font-family: PingFang SC, PingFang SC;font-weight: 600;font-size: 32rpx;color: #150132;line-height: 45rpx;text-align: left;font-style: normal;text-transform: none;}
-.home .home_device .device_header .device_add {width: 32rpx;height: 32rpx;padding-top: 32rpx;box-sizing: border-box;}
-.home .home_device .device_list {margin-top: 24rpx;display: flex;flex-wrap: wrap;justify-content: flex-start;display: grid;grid-template-columns: repeat(2, 1fr);grid-gap: 22rpx;}
-.home .home_device .device_list .device_box {width: 340rpx;height: 200rpx;background: #FFFFFF;box-shadow: 0rpx 4rpx 16rpx 1rpx rgba(0,0,0,0.06);border-radius: 16rpx;padding: 24rpx;box-sizing: border-box;position: relative;}
-.home .home_device .device_list .device_box .device_box_img {width: 88rpx;padding-top: 88rpx;}
-.home .home_device .device_list .device_box .device_box_title {font-family: PingFang SC, PingFang SC;font-weight: 500;font-size: 24rpx;color: #150132;line-height: 33rpx;text-align: left;font-style: normal;text-transform: none;margin-top: 24rpx;display: inline-block;width: 100%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;}
-.home .home_device .device_list .device_box .device_box_switch {position: absolute;width: 60rpx;height: 60rpx;background: url(/assets/images/xian/icon_off.png) no-repeat center;background-size: contain;top: 24rpx;right: 24rpx;}
-.home .home_device .nodevice {display: flex;flex-direction: column;align-items: center;margin-top: 28rpx;}
-.home .home_device .nodevice .nodevice_img {width: 250rpx;padding-top: 250rpx;}
-.home .home_device .nodevice .nodevice_text {margin-top: 28rpx;font-family: PingFang SC, PingFang SC;font-weight: 400;font-size: 24rpx;color: #666666;text-align: center;font-style: normal;text-transform: none;width: 360rpx;}
-.home .home_device .nodevice .nodevice_btn {width: 360rpx;height: 100rpx;background: #EE742F;box-shadow: 0rpx 10rpx 20rpx 1rpx rgba(238,116,47,0.5);border-radius: 50rpx;font-family: PingFang SC, PingFang SC;font-weight: 400;font-size: 36rpx;color: #FFFFFF;line-height: 100rpx;text-align: center;font-style: normal;text-transform: none;margin-top: 100rpx;}
+.message .nomessage {display: flex;flex-direction: column;align-items: center;margin-top: 100rpx;}
+.message .nomessage .nomessage_img {width: 250rpx;padding-top: 250rpx;}
+.message .nomessage .nomessage_text {margin-top: 28rpx;font-family: PingFang SC, PingFang SC;font-weight: 400;font-size: 24rpx;color: #666666;text-align: center;font-style: normal;text-transform: none;}

+ 0 - 54
sources/client/smart-cooker/pages/message1/index.js

@@ -1,54 +0,0 @@
-Page({
-  data: {
-    background: ['/assets/images/godzilla.png', '/assets/images/godzilla.png', '/assets/images/xian/swiper1.png'],
-    indicatorDots: true,
-    indicatorColor: '#FFFFFF',
-    indicatorActiveColor: '#EE742F',
-    autoplay: false,
-    circular: true,
-    interval: 2000,
-    duration: 500,
-    device_list: [
-      {
-        name: '智能电饭煲1',
-        imgUrl: '/assets/images/xian/home_device1.png',
-        switch : true,
-      },
-      {
-        name: '电热水壶',
-        imgUrl: '/assets/images/xian/home_device2.png',
-        switch : false,
-      },
-      {
-        name: '智能电饭煲2',
-        imgUrl: '/assets/images/xian/home_device3.png',
-        switch : true,
-      },
-    ]
-  },
-
-  onShow() {
-    this.setData({
-      
-    })
-    ty.hideMenuButton()
-  },
-
-  goMessage() {
-    ty.navigateTo({url: '/pages/message/index'})
-  },
-
-  goAddDevice() {
-   console.log('goAddDevice')
-  },
-
-  handleSwitch(e) {
-    const index = e.currentTarget.dataset.id;
-    let list = this.data.device_list
-    list[index].switch = !list[index].switch
-    this.setData({
-      device_list: list
-    })
-  }
-
-})

+ 0 - 2
sources/client/smart-cooker/pages/message1/index.tyml

@@ -1,2 +0,0 @@
-
-

+ 0 - 24
sources/client/smart-cooker/pages/message1/index.tyss

@@ -1,24 +0,0 @@
-page {background-color: #F6F7F8;}
-.home {background-color: #F6F7F8;}
-.home .home_top {width: 750rpx;height: 600rpx;background: url(/assets/images/xian/home_bg.png) no-repeat center;background-size: cover;padding: 0 24rpx;padding-top: 88rpx;box-sizing: border-box;}
-.home .home_top .home_header {display: flex;justify-content: space-between;align-items: center;padding: 28rpx 0 10rpx;box-sizing: border-box;}
-.home .home_top .home_header .index_title {font-family: PingFang SC, PingFang SC;font-weight: 500;font-size: 36rpx;color: #150132;line-height: 50rpx;text-align: left;font-style: normal;text-transform: none;font-weight: bold;}
-.home .home_top .home_header .index_message {position: relative;width: 36rpx;height: 36rpx;}
-.home .home_top .home_header .index_message image {width: 100%;height: 100%;display: inline-block;}
-.home .home_top .home_header .index_message .mpbadge {position: absolute;top: -50%;left: -50%;display: none;}
-.home .home_top .home_swiper {margin-top: 74rpx;margin-bottom: 10rpx;width: 702rpx;height: 340rpx;border-radius: 16rpx;overflow: hidden;}
-.home .home_top .home_swiper image {width: 100%;display: inline-block;}
-
-.home .home_device {padding: 0 24rpx;box-sizing: border-box;}
-.home .home_device .device_header {margin-top: 30rpx;display: flex;justify-content: space-between;align-items: center;}
-.home .home_device .device_header .device_title {font-family: PingFang SC, PingFang SC;font-weight: 600;font-size: 32rpx;color: #150132;line-height: 45rpx;text-align: left;font-style: normal;text-transform: none;}
-.home .home_device .device_header .device_add {width: 32rpx;height: 32rpx;padding-top: 32rpx;box-sizing: border-box;}
-.home .home_device .device_list {margin-top: 24rpx;display: flex;flex-wrap: wrap;justify-content: flex-start;display: grid;grid-template-columns: repeat(2, 1fr);grid-gap: 22rpx;}
-.home .home_device .device_list .device_box {width: 340rpx;height: 200rpx;background: #FFFFFF;box-shadow: 0rpx 4rpx 16rpx 1rpx rgba(0,0,0,0.06);border-radius: 16rpx;padding: 24rpx;box-sizing: border-box;position: relative;}
-.home .home_device .device_list .device_box .device_box_img {width: 88rpx;padding-top: 88rpx;}
-.home .home_device .device_list .device_box .device_box_title {font-family: PingFang SC, PingFang SC;font-weight: 500;font-size: 24rpx;color: #150132;line-height: 33rpx;text-align: left;font-style: normal;text-transform: none;margin-top: 24rpx;display: inline-block;width: 100%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;}
-.home .home_device .device_list .device_box .device_box_switch {position: absolute;width: 60rpx;height: 60rpx;background: url(/assets/images/xian/icon_off.png) no-repeat center;background-size: contain;top: 24rpx;right: 24rpx;}
-.home .home_device .nodevice {display: flex;flex-direction: column;align-items: center;margin-top: 28rpx;}
-.home .home_device .nodevice .nodevice_img {width: 250rpx;padding-top: 250rpx;}
-.home .home_device .nodevice .nodevice_text {margin-top: 28rpx;font-family: PingFang SC, PingFang SC;font-weight: 400;font-size: 24rpx;color: #666666;text-align: center;font-style: normal;text-transform: none;width: 360rpx;}
-.home .home_device .nodevice .nodevice_btn {width: 360rpx;height: 100rpx;background: #EE742F;box-shadow: 0rpx 10rpx 20rpx 1rpx rgba(238,116,47,0.5);border-radius: 50rpx;font-family: PingFang SC, PingFang SC;font-weight: 400;font-size: 36rpx;color: #FFFFFF;line-height: 100rpx;text-align: center;font-style: normal;text-transform: none;margin-top: 100rpx;}

+ 54 - 0
sources/client/smart-cooker/pages/selectwifi/index.js

@@ -0,0 +1,54 @@
+Page({
+  data: {
+    wifiData: [
+      {
+        name: 'wifi',
+        value: 'wifi',
+      },
+      {
+        name: 'password',
+        value: '123456',
+      },
+    ],
+    eyes: false,
+  },
+
+  onShow() {
+    this.setData({
+      hasHiddenTabBar: true
+      // wifiData: [],
+    })
+    ty.hideMenuButton();
+  },
+
+  handleSubmit(ev) {
+    const value = ev.detail.value;
+    const wifiData = [];
+    for (let name in value) {
+      resultData.push({
+        name,
+        value: value[name],
+      });
+    }
+    this.setData({
+      resultData,
+    });
+    console.log(resultData)
+  },
+
+  selectWifi() {
+    console.log('selectWifi')
+    console.log('half Screen Dialog')
+  },
+
+  changeEyes() {
+    this.setData({
+      eyes: !this.data.eyes
+    })
+  },
+
+  goAddDevice() {
+    ty.navigateTo({url: '/pages/adddevice/index'})
+  },
+
+})

+ 9 - 0
sources/client/smart-cooker/pages/selectwifi/index.json

@@ -0,0 +1,9 @@
+{
+  "navigationBarBackgroundColor": "#FEF4E2",
+  "navigationBarTextStyle": "black",
+  "navigationBarTitleText": "",
+  "backgroundColor": "#f2f4f6",
+  "backgroundTextStyle": "dark", 
+  "enablePullDownRefresh": true,
+  "usingComponents": {}
+}

+ 23 - 0
sources/client/smart-cooker/pages/selectwifi/index.tyml

@@ -0,0 +1,23 @@
+<view class="selectwifi_bg"></view>
+<view class="selectwifi">
+    <view class="selectwifi_title">选择WI-FI</view>
+    <view class="selectwifi_text">此设备只支持使用2.4GHz Wi-Fi连接使用</view>
+    <view class="selectwifi_form">
+        <form bind:submit="handleSubmit" id="formwifi" >
+            <view class="row">
+                <input class="row_input" name="wifi" placeholder="请输入Wi-Fi名称" />
+                <view class="row_button" bind:tap="selectWifi">选择Wi-Fi</view>
+            </view>
+            <view class="row">
+                <input class="row_input" name="password" type="{{eyes ? 'text' : 'password'}}" placeholder="请输入密码" />
+                <view class="row_icon img_box" bind:tap="changeEyes">
+                    <image mode="widthFix" lazy-load="true" src="{{eyes ? '/assets/images/xian/icon_eyes.png' : '/assets/images/xian/icon_close.png'}}" />
+                </view>
+            </view>
+            <view class="row_tip">Wi-Fi密码输入错误是最常见的失败原因之一, 请仔细检查Wi-Fi密码。</view>
+            <view class="row_btn">
+                <button form-type="submit" id="triggerBtn" data-info="下一步" type="primary" class="submit-btn">下一步</button>
+            </view>
+        </form>
+    </view>
+</view>

+ 15 - 0
sources/client/smart-cooker/pages/selectwifi/index.tyss

@@ -0,0 +1,15 @@
+page {background-color: #F6F7F8;}
+.selectwifi_bg {position: fixed;width: 750rpx;height: 600rpx;background: url(/assets/images/xian/wifi_bg.png) no-repeat center;background-size: cover;top: -176rpx;}
+.selectwifi {padding: 24rpx;box-sizing: border-box;position: relative;}
+.selectwifi .selectwifi_title {font-family: PingFang SC, PingFang SC;font-weight: 500;font-size: 54rpx;color: #150132;text-align: left;font-style: normal;text-transform: none;margin-top: 50rpx;}
+.selectwifi .selectwifi_text {margin-top: 24rpx;font-family: PingFang SC, PingFang SC;font-weight: 400;font-size: 24rpx;color: #666666;text-align: left;font-style: normal;text-transform: none;}
+.selectwifi .selectwifi_form {margin-top: 98rpx;display: flex;flex-direction: column;align-items: center;}
+.selectwifi .selectwifi_form form {width: 600rpx;}
+.selectwifi .selectwifi_form form .row {width: 100%;height: 100rpx;background: #FFFFFF;border-radius: 16rpx;border: 1rpx solid #DDDDDD;margin-bottom: 40rpx;position: relative;}
+.selectwifi .selectwifi_form form .row .row_input {width: 100%;height: 100%;text-indent: 30rpx;font-family: PingFang SC, PingFang SC;font-weight: 400;font-size: 28rpx;color: #BFBFBF;text-align: left;font-style: normal;text-transform: none;}
+.selectwifi .selectwifi_form form .row .row_button {position: absolute;top: 50%;right: 24rpx;transform: translateY(-50%);width: 160rpx;height: 64rpx;line-height: 64rpx;background: rgba(238,116,47,0.1);border-radius: 64rpx;border: 1rpx solid #EE742F;font-family: PingFang SC, PingFang SC;font-weight: 500;font-size: 24rpx;color: #EE742F;text-align: center;font-style: normal;text-transform: none;z-index: 99;box-sizing: border-box;}
+.selectwifi .selectwifi_form form .row .row_icon {position: absolute;top: 50%;right: 36rpx;transform: translateY(-50%);width: 36rpx;padding-top: 36rpx;z-index: 99;}
+.selectwifi .selectwifi_form form .row_tip {font-family: PingFang SC, PingFang SC;font-weight: 400;font-size: 24rpx;color: #999999;text-align: left;font-style: normal;text-transform: none;}
+.selectwifi .selectwifi_form form .row_btn {margin-top: 300rpx;}
+.selectwifi .selectwifi_form form .row_btn button {width: 600rpx;height: 100rpx;line-height: 100rpx;background: #EE742F;box-shadow: 0rpx 10rpx 20rpx 1rpx rgba(238,116,47,0.5);border-radius: 50rpx;font-family: PingFang SC, PingFang SC;font-weight: 400;font-size: 36rpx;color: #FFFFFF;text-align: center;font-style: normal;text-transform: none;margin: 0;padding: 0;}
+

+ 16 - 0
sources/client/smart-cooker/pages/start/index.js

@@ -0,0 +1,16 @@
+Page({
+  data: {
+  },
+
+  onShow() {
+    this.setData({
+      // hasHiddenTabBar: true
+    })
+    ty.hideMenuButton()
+
+    setTimeout(() => {
+      ty.switchTab({url: '/pages/home/index'})
+    }, 1000)
+  },
+
+})

+ 9 - 0
sources/client/smart-cooker/pages/start/index.json

@@ -0,0 +1,9 @@
+{
+  "navigationBarTextStyle": "black",
+  "navigationBarTitleText": "start",
+  "backgroundColor": "#f2f4f6",
+  "backgroundTextStyle": "dark",
+  "enablePullDownRefresh": true,
+  "usingComponents": {},
+  "navigationStyle": "custom"
+}

+ 7 - 0
sources/client/smart-cooker/pages/start/index.tyml

@@ -0,0 +1,7 @@
+<view class="start">
+    <view class="start_img img_box">
+        <image class="image" src="/assets/images/xian/icon_start.png" mode="widthFix"></image>
+    </view>
+    <view class="start_text">智能电饭煲</view>
+</view>
+

+ 5 - 0
sources/client/smart-cooker/pages/start/index.tyss

@@ -0,0 +1,5 @@
+.start {background: url(/assets/images/xian/start_bg.png) no-repeat center;background-size: contain;overflow: hidden;width: 750rpx;height: 1624rpx;height: 100%;background-size: cover;display: flex;flex-direction: column;justify-content: flex-start;align-items: center;}
+.start .start_img {width: 160rpx;padding-top: 160rpx;margin-top: 400rpx;background: linear-gradient( 180deg, #EE742F 0%, #F5BA4A 100%);box-shadow: 0rpx 8rpx 16rpx 1rpx rgba(238,116,47,0.3);border-radius: 24rpx;}
+.start .start_text {font-family: PingFang SC, PingFang SC;font-weight: 600;font-size: 46rpx;color: #150132;text-align: center;font-style: normal;text-transform: none;margin-top: 60rpx;}
+
+