Jelajahi Sumber

做了wifi页面和添加设备的6个状态页

不夜浮尘 2 minggu lalu
induk
melakukan
c20af1b25d
30 mengubah file dengan 404 tambahan dan 38 penghapusan
  1. 6 3
      sources/client/smart-cooker/app.json
  2. TEMPAT SAMPAH
      sources/client/smart-cooker/assets/images/xian/connectdevice_bg.png
  3. TEMPAT SAMPAH
      sources/client/smart-cooker/assets/images/xian/connectdevice_img.png
  4. TEMPAT SAMPAH
      sources/client/smart-cooker/assets/images/xian/connectdevice_lanyaerror.png
  5. TEMPAT SAMPAH
      sources/client/smart-cooker/assets/images/xian/connectdevice_unfound.png
  6. TEMPAT SAMPAH
      sources/client/smart-cooker/assets/images/xian/connectdevice_wifierror.png
  7. TEMPAT SAMPAH
      sources/client/smart-cooker/assets/images/xian/device_action1.png
  8. TEMPAT SAMPAH
      sources/client/smart-cooker/assets/images/xian/device_action2.png
  9. TEMPAT SAMPAH
      sources/client/smart-cooker/assets/images/xian/device_action3.png
  10. TEMPAT SAMPAH
      sources/client/smart-cooker/assets/images/xian/device_action4.png
  11. TEMPAT SAMPAH
      sources/client/smart-cooker/assets/images/xian/device_action5.png
  12. TEMPAT SAMPAH
      sources/client/smart-cooker/assets/images/xian/device_action6.png
  13. TEMPAT SAMPAH
      sources/client/smart-cooker/assets/images/xian/device_bg.png
  14. TEMPAT SAMPAH
      sources/client/smart-cooker/assets/images/xian/device_img1.png
  15. TEMPAT SAMPAH
      sources/client/smart-cooker/assets/images/xian/device_img2.png
  16. TEMPAT SAMPAH
      sources/client/smart-cooker/assets/images/xian/icon_delete.png
  17. TEMPAT SAMPAH
      sources/client/smart-cooker/assets/images/xian/icon_larrow.png
  18. TEMPAT SAMPAH
      sources/client/smart-cooker/assets/images/xian/icon_wifi.png
  19. 40 0
      sources/client/smart-cooker/pages/connectdevice/index.js
  20. 13 0
      sources/client/smart-cooker/pages/connectdevice/index.json
  21. 18 0
      sources/client/smart-cooker/pages/connectdevice/index.tyml
  22. 37 0
      sources/client/smart-cooker/pages/connectdevice/index.tyss
  23. 55 0
      sources/client/smart-cooker/pages/device/index.js
  24. 9 0
      sources/client/smart-cooker/pages/device/index.json
  25. 27 0
      sources/client/smart-cooker/pages/device/index.tyml
  26. 6 0
      sources/client/smart-cooker/pages/device/index.tyss
  27. 136 20
      sources/client/smart-cooker/pages/selectwifi/index.js
  28. 5 1
      sources/client/smart-cooker/pages/selectwifi/index.json
  29. 29 6
      sources/client/smart-cooker/pages/selectwifi/index.tyml
  30. 23 8
      sources/client/smart-cooker/pages/selectwifi/index.tyss

+ 6 - 3
sources/client/smart-cooker/app.json

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

TEMPAT SAMPAH
sources/client/smart-cooker/assets/images/xian/connectdevice_bg.png


TEMPAT SAMPAH
sources/client/smart-cooker/assets/images/xian/connectdevice_img.png


TEMPAT SAMPAH
sources/client/smart-cooker/assets/images/xian/connectdevice_lanyaerror.png


TEMPAT SAMPAH
sources/client/smart-cooker/assets/images/xian/connectdevice_unfound.png


TEMPAT SAMPAH
sources/client/smart-cooker/assets/images/xian/connectdevice_wifierror.png


TEMPAT SAMPAH
sources/client/smart-cooker/assets/images/xian/device_action1.png


TEMPAT SAMPAH
sources/client/smart-cooker/assets/images/xian/device_action2.png


TEMPAT SAMPAH
sources/client/smart-cooker/assets/images/xian/device_action3.png


TEMPAT SAMPAH
sources/client/smart-cooker/assets/images/xian/device_action4.png


TEMPAT SAMPAH
sources/client/smart-cooker/assets/images/xian/device_action5.png


TEMPAT SAMPAH
sources/client/smart-cooker/assets/images/xian/device_action6.png


TEMPAT SAMPAH
sources/client/smart-cooker/assets/images/xian/device_bg.png


TEMPAT SAMPAH
sources/client/smart-cooker/assets/images/xian/device_img1.png


TEMPAT SAMPAH
sources/client/smart-cooker/assets/images/xian/device_img2.png


TEMPAT SAMPAH
sources/client/smart-cooker/assets/images/xian/icon_delete.png


TEMPAT SAMPAH
sources/client/smart-cooker/assets/images/xian/icon_larrow.png


TEMPAT SAMPAH
sources/client/smart-cooker/assets/images/xian/icon_wifi.png


+ 40 - 0
sources/client/smart-cooker/pages/connectdevice/index.js

@@ -0,0 +1,40 @@
+Page({
+  data: {
+    bgImg: '/assets/images/xian/connectdevice_bg.png',
+    flag: 'unfound',
+    // title: '连接设备…',
+    // title: '扫描中...',
+    // title: '多功能电饭煲',
+    title: '未找到该设备',
+    // text: '',
+    text: '多功能电饭煲',
+    // text: '连通电源。长按“开始”键3秒, 听到“滴”提示音表示设置成功, 电饭煲进入等待连接状态.',
+    // img: '/assets/images/xian/connectdevice_img.png',
+    // img: '/assets/images/xian/connectdevice_lanyaerror.png',
+    // img: '/assets/images/xian/connectdevice_wifierror.png',
+    img: '/assets/images/xian/connectdevice_unfound.png',
+    // progress: '33%',
+    progress: '',
+    // state: '正在连接设备',
+    // state: '连接设备失败!',
+    // state: '正在扫描设备,请稍候…',
+    // state: '',
+    state: '未扫描到附近设备,请确认设备连通电源后,重新尝试扫描',
+    // tip: '请保持手机蓝牙开启并将手机尽量靠近设备',
+    // tip: '请重启手机蓝牙并靠近设备后重试',
+    // tip: '请检查WiFi密码是否正确',
+    tip: '',
+    btn_text: '重新连接',
+    btn_text: '下一步',
+    btn_text: '重新扫描',
+   },
+
+  onShow() {
+    this.setData({
+      hasHiddenTabBar: true
+      // wifiData: [],
+    })
+    ty.hideMenuButton();
+  },
+
+})

+ 13 - 0
sources/client/smart-cooker/pages/connectdevice/index.json

@@ -0,0 +1,13 @@
+{
+  "navigationBarBackgroundColor": "#FEF4E2",
+  "navigationBarTextStyle": "black",
+  "navigationBarTitleText": "",
+  "backgroundColor": "#f2f4f6",
+  "backgroundTextStyle": "dark", 
+  "enablePullDownRefresh": true,
+  "usingComponents": {
+    "mptoptips": "@tuya-miniapp/miniapp-components-plus/toptips/index",
+    "mpform": "@tuya-miniapp/miniapp-components-plus/formEx/index",
+    "mphalfScreenDialog": "@tuya-miniapp/miniapp-components-plus/halfScreenDialog/index"
+  }
+}

+ 18 - 0
sources/client/smart-cooker/pages/connectdevice/index.tyml

@@ -0,0 +1,18 @@
+<view class="connectdevice_bg" style="background-image:url({{bgImg}}"></view>
+<view class="connectdevice {{flag}}">
+    <view class="connectdevice_head">
+        <view class="connectdevice_title">{{title}}</view> 
+        <view ty:if="{{text}}" class="connectdevice_text">{{text}}</view>
+    </view> 
+    <!-- <progress percent="{{70}}" showInfo="{{true}}" fontSize="{{12}}"activeColor="lightgreen" strokeWidth="{{16}}" active="{{true}}" data-info="info..." bindactiveend="handleActiveEnd" /> -->
+    <view class="connectdevice_content">
+        <view class="connectdevice_img img_box">
+            <image mode="widthFix" lazy-load="true" src="{{img}}" />
+        </view>
+        <view class="connectdevice_progress">{{progress}}</view>
+        <view class="connectdevice_state">{{state}}</view>
+        <view class="connectdevice_tip">{{tip}}</view>
+        <view class="connectdevice_button">{{btn_text}}</view>
+    </view>
+    
+</view>

+ 37 - 0
sources/client/smart-cooker/pages/connectdevice/index.tyss

@@ -0,0 +1,37 @@
+page {background-color: #F6F7F8;}
+.connectdevice_bg {position: fixed;width: 750rpx;height: 600rpx;background: url(/assets/images/xian/connectdevice_bg.png) no-repeat center;background-size: cover;top: -176rpx;}
+.connectdevice {padding: 24rpx;box-sizing: border-box;position: relative;}
+.connectdevice .connectdevice_head {margin-top: 50rpx;margin-bottom: 299rpx;}
+.connectdevice .connectdevice_head .connectdevice_title {font-family: PingFang SC, PingFang SC;font-weight: 500;font-size: 54rpx;color: #150132;text-align: left;font-style: normal;text-transform: none;}
+.connectdevice .connectdevice_head .connectdevice_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;padding-right: 261rpx;box-sizing: border-box;} 
+.connectdevice .connectdevice_content {display: flex;flex-direction: column;align-items: center;justify-content: flex-start;}
+.connectdevice .connectdevice_content .connectdevice_img {width: 160rpx;padding-top: 160rpx;border: 1px dashed #cccccc;}
+.connectdevice .connectdevice_content .connectdevice_progress {font-family: PingFang SC, PingFang SC;font-weight: 600;font-size: 54rpx;color: #88C161;text-align: left;font-style: normal;text-transform: none;padding: 40rpx;box-sizing: border-box;}
+.connectdevice .connectdevice_content .connectdevice_state {font-family: PingFang SC, PingFang SC;font-weight: 400;font-size: 32rpx;color: #150132;text-align: center;font-style: normal;text-transform: none;}
+.connectdevice .connectdevice_content .connectdevice_tip {margin-top: 16rpx;font-family: PingFang SC, PingFang SC;font-weight: 400;font-size: 24rpx;color: #999999;text-align: center;font-style: normal;text-transform: none;}
+.connectdevice .connectdevice_content .connectdevice_button {display: none;margin-top: 402rpx;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;} 
+
+.connectdevice.error .connectdevice_content .connectdevice_progress {height: 80rpx;}
+.connectdevice.error .connectdevice_content .connectdevice_state {font-weight: 500;color: #EE742F;}
+.connectdevice.error .connectdevice_content .connectdevice_button {display: block;}
+
+.connectdevice.scaning .connectdevice_head {margin-bottom: 242rpx;}
+.connectdevice.scaning .connectdevice_content .connectdevice_img {width: 180rpx;padding-top: 180rpx;}
+.connectdevice.scaning .connectdevice_content .connectdevice_progress {padding: 30rpx;padding-bottom: 24rpx;}
+
+/* 设备 */
+.connectdevice.device .connectdevice_head {margin-bottom: 176rpx;}
+.connectdevice.device .connectdevice_content .connectdevice_img {width: 456rpx;padding-top: 456rpx;}
+.connectdevice.device .connectdevice_content .connectdevice_button {display: block;margin-top: 256rpx;}
+.connectdevice.device .connectdevice_content .connectdevice_progress {padding: 0rpx;} 
+
+.connectdevice.unfound .connectdevice_head {margin-bottom: 242rpx;}
+.connectdevice.unfound .connectdevice_content .connectdevice_img {width: 180rpx;padding-top: 180rpx;}
+.connectdevice.unfound .connectdevice_content .connectdevice_progress {padding: 0rpx;} 
+.connectdevice.unfound .connectdevice_content .connectdevice_state {margin-top: 60rpx;}
+.connectdevice.unfound .connectdevice_content .connectdevice_button {display: block;margin-top: 416rpx;}
+
+
+ 
+
+

+ 55 - 0
sources/client/smart-cooker/pages/device/index.js

@@ -0,0 +1,55 @@
+Page({
+  data: {
+    da_list: [
+      {
+        name: '煮饭',
+        imgUrl: '/assets/images/xian/device_action1.png',
+      },
+      {
+        name: '煮粥',
+        imgUrl: '/assets/images/xian/device_action2.png',
+      },
+      {
+        name: '热饭',
+        imgUrl: '/assets/images/xian/device_action3.png',
+      },
+      {
+        name: '蒸煮',
+        imgUrl: '/assets/images/xian/device_action3.png',
+      },
+      {
+        name: '煲汤',
+        imgUrl: '/assets/images/xian/device_action3.png',
+      },
+      {
+        name: '酸奶',
+        imgUrl: '/assets/images/xian/device_action3.png',
+      },
+    ],
+    define_list: [
+      {
+        name: '自定义食谱',
+        imgUrl: '/assets/images/xian/device_action1.png',
+      },
+      {
+        name: 'XXXX菜谱',
+        imgUrl: '/assets/images/xian/device_action2.png',
+      },
+      {
+        name: '家庭版油焖大虾',
+        imgUrl: '/assets/images/xian/device_action3.png',
+      },
+    ],
+  },
+
+  onShow() {
+    this.setData({
+      // hasHiddenTabBar: true,
+      message_list: []
+    })
+    ty.hideMenuButton()
+  },
+  goAddDevice() {},
+  goDefinemenu() {}
+
+})

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

@@ -0,0 +1,9 @@
+{
+  "navigationBarBackgroundColor": "#FFFFFF",
+  "navigationBarTextStyle": "black",
+  "navigationBarTitleText": "多功能电饭煲",
+  "backgroundColor": "#f2f4f6",
+  "backgroundTextStyle": "dark",
+  "enablePullDownRefresh": true,
+  "usingComponents": {}
+}

+ 27 - 0
sources/client/smart-cooker/pages/device/index.tyml

@@ -0,0 +1,27 @@
+<view class="device">
+    <view class="device_action">
+        <view class="device_action_item" ty:for="{{da_list}}" ty:key="{{index}}">
+            <view class="device_action_img img_box">
+                <image mode="widthFix" lazy-load="true" src="{{item.imgUrl}}" />
+            </view>
+            <view class="device_action_text">{{item.name}}</view>
+        </view> 
+    </view>
+    <view class="device_definemenu">
+        <view class="definemenu_header">
+            <view class="definemenu_title">自定义食谱</view>
+            <view class="definemenu_delete img_box" bind:tap="goAddDevice">
+                <image mode="widthFix" lazy-load="true" src="/assets/images/xian/icon_delete.png " />
+            </view> 
+        </view>
+        <view class="definemenu_list" ty:if="{{define_list.length > 0}}">
+            <view class="definemenu_box" ty:for="{{define_list}}" ty:key="{{index}}">
+                <view class="definemenu_box_img img_box">
+                    <image class="image" src="{{item.imgUrl}}" mode="widthFix"></image>
+                </view>
+                <view class="definemenu_box_title">{{item.name}}</view>
+                <view class="definemenu_box_switch" data-id="{{index}}" bind:tap="goDefinemenu"></view>
+            </view>
+        </view>
+    </view>
+</view>

+ 6 - 0
sources/client/smart-cooker/pages/device/index.tyss

@@ -0,0 +1,6 @@
+page {background-color: #F6F7F8;}
+.device {padding: 24rpx;box-sizing: border-box;}
+.device .device_action {padding: 40rpx;padding-top: 0rpx;box-sizing: border-box;background: #FFFFFF;box-shadow: 0rpx 4rpx 16rpx 1rpx rgba(0,0,0,0.06);border-radius: 16rpx;display: flex;flex-wrap: wrap;}
+.device .device_action .device_action_item {display: flex;flex-direction: column;justify-content: flex-start;align-items: center;margin-top: 40rpx;margin-right: 71rpx;}
+.device .device_action .device_action_item:nth-child(3n) {margin-right: 71rpx;}
+.device .device_action .device_action_item .device_action_img {width: 160rpx;padding-top: 160rpx;}

+ 136 - 20
sources/client/smart-cooker/pages/selectwifi/index.js

@@ -1,16 +1,66 @@
 Page({
   data: {
+    eyes: false,
+    isSelected: false,
+    showwifiDialog: false,
+    focus: '',
+    wifiList: [
+      {
+        "BSSID": '28:01:1c8034:99',
+        "SSID": 'ChinaNet-tcGJ-5G',
+        "frequency": 5240,
+        "secure": 'false',
+        "signalStrength": 0,
+      },
+      {
+        "BSSID": '28:01:1c8034:99',
+        "SSID": 'ChinaNet-tcGJ-5G',
+        "frequency": 5240,
+        "secure": 'false',
+        "signalStrength": 1,
+      },
+      {
+        "BSSID": '28:01:1c8034:99',
+        "SSID": '心灵之境',
+        "frequency": 5240,
+        "secure": 'false',
+        "signalStrength": 4,
+      },
+      {
+        "BSSID": '28:01:1c8034:99',
+        "SSID": 'ChinaNet-tcGJ-5G',
+        "frequency": 5240,
+        "secure": 'false',
+        "signalStrength": 2,
+      },
+      {
+        "BSSID": '28:01:1c8034:99',
+        "SSID": 'ChinaNet-tcGJ-5G',
+        "frequency": 5240,
+        "secure": 'false',
+        "signalStrength": 3,
+      },
+    ],
     wifiData: [
       {
         name: 'wifi',
-        value: 'wifi',
+        value: 'dsasfaf',
       },
       {
         name: 'password',
-        value: '123456',
+        value: '15151',
+      },
+    ],
+    rules: [
+      {
+        name: 'wifi',
+        rules: { required: true, message: 'wifi is required' },
+      },
+      {
+        name: 'password',
+        rules: { required: true, message: 'password is required' },
       },
     ],
-    eyes: false,
   },
 
   onShow() {
@@ -21,24 +71,94 @@ Page({
     ty.hideMenuButton();
   },
 
+  formInputChange(e) {
+    const { field } = e.currentTarget.dataset
+    this.setData({
+      [`wifiData.${field}`]: e.detail.value,
+    })
+  },
+
   handleSubmit(ev) {
     const value = ev.detail.value;
-    const wifiData = [];
-    for (let name in value) {
-      resultData.push({
-        name,
-        value: value[name],
-      });
-    }
+    console.log("test")
+    // if(!value.wifi || !value.password) {
+    //   ty.showToast({
+    //     title: '请输入wifi和密码',
+    //     icon: 'none',
+    //   })
+    //   return;
+    // }
+    // const wifiData = [];
+    // for (let name in value) {
+    //   resultData.push({
+    //     name,
+    //     value: value[name],
+    //   });
+    // }
+    // this.setData({
+    //   resultData,
+    // });
+    // console.log(resultData)
+  },
+
+  submitForm() {
+    // this.selectComponent('#wifiform').validate((valid, errors) => {
+    //   if (!valid) {
+    //     const firstError = Object.keys(errors)
+    //     if (firstError.length) {
+    //       this.setData({
+    //         error: errors[firstError[0]].message,
+    //       })
+    //     }
+    //   } else {
+    //     this.setData({
+    //       isSelected: !this.data.isSelected,
+    //       focus: 'green'
+    //     })
+    //     ty.showToast({
+    //       title: 'Check passed',
+    //     })
+    //   }
+    // })
+    // this.selectComponent('#form').validateField('mobile', (valid, errors) => {
+    //     console.log('valid', valid, errors)
+    // })
+    ty.navigateTo({url: '/pages/connectdevice/index'})
+  },
+
+  getWifi() {
+    // ty.getWifiList()
+    var wifiList = this.data.wifiList;
     this.setData({
-      resultData,
-    });
-    console.log(resultData)
+      isSelected: !this.data.isSelected,
+      showwifiDialog: true,
+    })
+  },
+  selectWifiItem(e) {
+    const index = e.currentTarget.dataset.index;
+    let wifiList = this.data.wifiList
+    let wifiData = this.data.wifiData
+    wifiData[0].value = wifiList[index].SSID
+    this.setData({
+      wifiData: wifiData,
+      showwifiDialog: false,
+    })
   },
 
-  selectWifi() {
-    console.log('selectWifi')
-    console.log('half Screen Dialog')
+  onClosSelectWifi() {
+    this.setData({
+      showwifiDialog: false,
+    })
+  },
+  inputfocus() {
+    this.setData({
+      focus: 'orange',
+    })
+  },
+  inputBlur() {
+    this.setData({
+      focus: '',
+    })
   },
 
   changeEyes() {
@@ -47,8 +167,4 @@ Page({
     })
   },
 
-  goAddDevice() {
-    ty.navigateTo({url: '/pages/adddevice/index'})
-  },
-
 })

+ 5 - 1
sources/client/smart-cooker/pages/selectwifi/index.json

@@ -5,5 +5,9 @@
   "backgroundColor": "#f2f4f6",
   "backgroundTextStyle": "dark", 
   "enablePullDownRefresh": true,
-  "usingComponents": {}
+  "usingComponents": {
+    "mptoptips": "@tuya-miniapp/miniapp-components-plus/toptips/index",
+    "mpform": "@tuya-miniapp/miniapp-components-plus/formEx/index",
+    "mphalfScreenDialog": "@tuya-miniapp/miniapp-components-plus/halfScreenDialog/index"
+  }
 }

+ 29 - 6
sources/client/smart-cooker/pages/selectwifi/index.tyml

@@ -2,22 +2,45 @@
 <view class="selectwifi">
     <view class="selectwifi_title">选择WI-FI</view>
     <view class="selectwifi_text">此设备只支持使用2.4GHz Wi-Fi连接使用</view>
+    <mptoptips msg="{{error}}" type="error" show="{{error}}"></mptoptips>
     <view class="selectwifi_form">
-        <form bind:submit="handleSubmit" id="formwifi" >
+        <mpform id="wifiform" rules="{{rules}}" models="{{wifiData}}" >
             <view class="row">
-                <input class="row_input" name="wifi" placeholder="请输入Wi-Fi名称" />
-                <view class="row_button" bind:tap="selectWifi">选择Wi-Fi</view>
+                <!-- <input class="row_input" name="wifi" placeholder="请输入Wi-Fi名称" /> -->
+                <input bindinput="formInputChange" data-field="wifi" class="row_input" type="text" value="{{wifiData[0].value}}" placeholder="请输入Wi-Fi名称" />
+                <view class="row_button {{isSelected ? 'selected' : ''}}" bind:tap="getWifi">选择Wi-Fi</view>
             </view>
             <view class="row">
-                <input class="row_input" name="password" type="{{eyes ? 'text' : 'password'}}" placeholder="请输入密码" />
+                <!-- <input class="row_input" name="password" type="{{eyes ? 'text' : 'password'}}" placeholder="请输入密码" /> -->
+                <input bindinput="formInputChange" bind:focus="inputfocus" bind:blur="inputBlur" data-field="password" class="row_input {{focus}}" type="{{eyes ? 'text' : 'password'}}" value="{{wifiData[1].value}}" 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>
+                <button type="primary" class="submit-btn" bindtap="submitForm">下一步</button>
             </view>
-        </form>
+        </mpform>
     </view>
 </view>
+<!-- <mphalfScreenDialog show="{{showwifiDialog}}" closabled="{{false}}" bindclose="onClosSelectWifi">
+    <view slot="title">{{i18n.t('hsd_2')}}</view>
+    <view slot="desc">{{i18n.t('hsd_3')}}</view>
+    <button slot="footer" type="default" class="weui-btn">operation one</button>
+    <button slot="footer" type="primary" class="weui-btn">operation two</button>
+</mphalfScreenDialog> -->
+<page-container show="{{showwifiDialog}}" duration="300" round="{{true}}" custom-style="border-radius: 16rpx 16rpx 0rpx 0rpx;" position="bottom">
+    <view class="wifi_dialog">
+        <view class="dialog_title" slot="title">选择Wi-Fi</view>
+        <view class="dialog_text">可添加设备的<text>Wi-Fi(2.4G) </text></view>
+        <view class="dialog_list">
+            <view class="dialog_item" ty:for="{{wifiList}}" ty:key="index" bindtap="selectWifiItem" data-index="{{index}}">
+                <view class="dialog_item_name">{{item.SSID}}</view>
+                <view class="dialog_item_icon img_box {{item.selected ? 'selected' : ''}}">
+                    <image mode="widthFix" lazy-load="true" src="/assets/images/xian/icon_wifi.png" />
+                </view>
+            </view>
+        </view>
+    </view>
+</page-container>

+ 23 - 8
sources/client/smart-cooker/pages/selectwifi/index.tyss

@@ -4,12 +4,27 @@ page {background-color: #F6F7F8;}
 .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;}
+.selectwifi .selectwifi_form #wifiform {width: 600rpx;}
+.selectwifi .selectwifi_form #wifiform .row {width: 100%;height: 100rpx;/*background: #FFFFFF;border-radius: 16rpx;border: 1rpx solid #DDDDDD;*/margin-bottom: 40rpx;position: relative;}
+.selectwifi .selectwifi_form #wifiform .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;border: 1rpx solid #DDDDDD;border-radius: 16rpx;background: #FFFFFF;}
+.selectwifi .selectwifi_form #wifiform .row .row_input.orange {color: #150132;background: #FFFFFF;border: 2rpx solid #EE742F;}
+.selectwifi .selectwifi_form #wifiform .row .row_input.green {color: #150132;background: #FFFFFF;border: 2rpx solid #88C161;}
+.selectwifi .selectwifi_form #wifiform .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 #wifiform .row .row_button.selected {color: #88C161;background: rgba(136,193,97,0.1);border: 1rpx solid #88C161;}
+.selectwifi .selectwifi_form #wifiform .row .row_icon {position: absolute;top: 50%;right: 36rpx;transform: translateY(-50%);width: 36rpx;padding-top: 36rpx;z-index: 99;}
+.selectwifi .selectwifi_form #wifiform .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 #wifiform .row_btn {margin-top: 300rpx;}
+.selectwifi .selectwifi_form #wifiform .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;}
+
+.wifi_dialog {background: #FFFFFF;box-shadow: 0rpx 4rpx 16rpx 1rpx rgba(0,0,0,0.06);border-radius: 16rpx 16rpx 0rpx 0rpx;padding: 40rpx;box-sizing: border-box;}
+.wifi_dialog .dialog_title {font-family: PingFang SC, PingFang SC;font-weight: 600;font-size: 36rpx;color: #150132;text-align: left;font-style: normal;text-transform: none;}
+.wifi_dialog .dialog_text {margin-top: 40rpx;font-family: PingFang SC, PingFang SC;font-weight: 400;font-size: 24rpx;color: #666666;text-align: left;font-style: normal;text-transform: none;}
+.wifi_dialog .dialog_text text {color: #EE742F;}
+.wifi_dialog .dialog_list {margin-top: 24rpx;}
+.wifi_dialog .dialog_list .dialog_item {margin-top: 16rpx;background: #F6F7F8;border-radius: 16rpx;width: 100%;height: 88rpx;padding: 24rpx;box-sizing: border-box;display: flex;align-items: center;position: relative;}
+.wifi_dialog .dialog_list .dialog_item:first-child {margin-top: 0;}
+.wifi_dialog .dialog_list .dialog_item .dialog_item_name {font-family: PingFang SC, PingFang SC;font-weight: 400;font-size: 24rpx;color: #150132;text-align: left;font-style: normal;text-transform: none;}
+.wifi_dialog .dialog_list .dialog_item .dialog_item_icon {width: 36rpx;padding-top: 36rpx;top: 50%;transform: translateY(-50%);right: 24rpx;position: absolute;border: 1px dashed #cccccc;}
+
+