Parcourir la source

做了工作模式页面,更多菜谱,自定义菜谱,自定义菜谱

不夜浮尘 il y a 2 semaines
Parent
commit
d64e45b6a3
36 fichiers modifiés avec 812 ajouts et 76 suppressions
  1. 0 48
      sources/client/smart-cooker/.github/workflows/npm-publish.yml
  2. 7 3
      sources/client/smart-cooker/app.json
  3. BIN
      sources/client/smart-cooker/assets/images/xian/definemenu_bg.png
  4. BIN
      sources/client/smart-cooker/assets/images/xian/icon_larrow.png
  5. BIN
      sources/client/smart-cooker/assets/images/xian/icon_rarrow.png
  6. BIN
      sources/client/smart-cooker/assets/images/xian/icon_search.png
  7. BIN
      sources/client/smart-cooker/assets/images/xian/icon_star.png
  8. BIN
      sources/client/smart-cooker/assets/images/xian/icon_wrong.png
  9. BIN
      sources/client/smart-cooker/assets/images/xian/icon_yes.png
  10. BIN
      sources/client/smart-cooker/assets/images/xian/moremenu_img1.jpg
  11. 5 0
      sources/client/smart-cooker/components/navigation/index.js
  12. 3 0
      sources/client/smart-cooker/components/navigation/index.json
  13. 85 0
      sources/client/smart-cooker/components/navigation/index.less
  14. 1 0
      sources/client/smart-cooker/components/navigation/index.tyml
  15. 72 0
      sources/client/smart-cooker/pages/definemenu/index.js
  16. 9 0
      sources/client/smart-cooker/pages/definemenu/index.json
  17. 34 0
      sources/client/smart-cooker/pages/definemenu/index.tyml
  18. 20 0
      sources/client/smart-cooker/pages/definemenu/index.tyss
  19. 0 6
      sources/client/smart-cooker/pages/device/index.tyss
  20. 13 0
      sources/client/smart-cooker/pages/menudesc/index.js
  21. 10 0
      sources/client/smart-cooker/pages/menudesc/index.json
  22. 103 0
      sources/client/smart-cooker/pages/menudesc/index.tyml
  23. 33 0
      sources/client/smart-cooker/pages/menudesc/index.tyss
  24. 56 0
      sources/client/smart-cooker/pages/moremenu/index.js
  25. 12 0
      sources/client/smart-cooker/pages/moremenu/index.json
  26. 28 0
      sources/client/smart-cooker/pages/moremenu/index.tyml
  27. 16 0
      sources/client/smart-cooker/pages/moremenu/index.tyss
  28. 16 9
      sources/client/smart-cooker/pages/device/index.js
  29. 0 0
      sources/client/smart-cooker/pages/multifunctional/index.json
  30. 11 9
      sources/client/smart-cooker/pages/device/index.tyml
  31. 18 0
      sources/client/smart-cooker/pages/multifunctional/index.tyss
  32. 170 0
      sources/client/smart-cooker/pages/workstate/index.js
  33. 13 0
      sources/client/smart-cooker/pages/workstate/index.json
  34. 46 0
      sources/client/smart-cooker/pages/workstate/index.tyml
  35. 30 0
      sources/client/smart-cooker/pages/workstate/index.tyss
  36. 1 1
      sources/client/smart-cooker/project.tuya.json

+ 0 - 48
sources/client/smart-cooker/.github/workflows/npm-publish.yml

@@ -1,48 +0,0 @@
-# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
-# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
-
-name: release-please
-
-on:
-  push:
-    branches:
-      - main
-      - master
-
-jobs:
-  publish-npm:
-    runs-on: ubuntu-latest
-    steps:
-      - uses: actions/checkout@v3
-      - name: Configure committer
-        run: |
-          git config --global user.name "${{ github.actor }}"
-          git config --global user.email "${{ github.actor }}@users.noreply.github.com"
-      - uses: actions/setup-node@v3
-        with:
-          node-version: 16
-          registry-url: https://registry.npmjs.org/
-      - name: Bump Version
-        uses: qzb/standard-version-action@v1.0.5
-      - name: Npm publish
-        run: |
-          npm whoami
-          npm publish --access=public
-        env:
-          NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
-      - name: Push changes
-        uses: ad-m/github-push-action@master
-        with:
-          github_token: ${{ github.token }}
-          branch: ${{ github.ref }}
-      - name: cnpm sync
-        run: |
-          export PKG=$(cat package.json | grep "name" | cut -d'"' -f 4)
-          printf "\n"
-          echo "package name: $PKG"
-          curl -X PUT  https://registry-direct.npmmirror.com/$PKG/sync\?sync_upstream\=true
-          sleep 5
-          printf "\n"
-          echo "https://registry.npmmirror.com/$PKG"
-          printf "\n"
-          echo "https://npmmirror.com/$PKG"

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

@@ -1,7 +1,7 @@
 {
   "themeLocation": "theme.json",
   "pages": [
-    "pages/device/index",  
+    "pages/menudesc/index",  
     "pages/home/index",
     "pages/cookbook/index",
     "pages/smartselection/index",
@@ -9,10 +9,14 @@
     "pages/login/index",
     "pages/start/index", 
     "pages/message/index",
-    "pages/adddevice/index",
+    "pages/adddevice/index", 
     "pages/selectwifi/index",
     "pages/connectdevice/index",
-    "pages/device/index" 
+    "pages/multifunctional/index",
+    "pages/workstate/index", 
+    "pages/definemenu/index",
+    "pages/moremenu/index",
+    "pages/menudesc/index"
   ],
   "tabBar": {
     "color": "@tabFontColor",

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


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


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


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


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


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


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


BIN
sources/client/smart-cooker/assets/images/xian/moremenu_img1.jpg


+ 5 - 0
sources/client/smart-cooker/components/navigation/index.js

@@ -0,0 +1,5 @@
+Component({
+  data: {
+    imageArr: [1, 2, 3, 4, 5],
+  },
+})

+ 3 - 0
sources/client/smart-cooker/components/navigation/index.json

@@ -0,0 +1,3 @@
+{
+  "component": true
+}

+ 85 - 0
sources/client/smart-cooker/components/navigation/index.less

@@ -0,0 +1,85 @@
+.list-wrap {
+  width: 100%;
+  padding: 0 16px 40px;
+  box-sizing: border-box;
+  &__drag {
+    width: 100%;
+    height: 40px;
+    line-height: 40px;
+    color: var(--opacity-3);
+  }
+  &__item {
+    border-top: 1px solid var(--opacity-1);
+  }
+  &__more {
+    height: 40px;
+    background: var(--opacity-bk);
+  }
+}
+ty-swiper-item {
+  overflow: auto;
+}
+
+.image-card {
+  width: 100%;
+  background-color: var(--plus-B1);
+  position: relative;
+  border-bottom: 1px solid #ececec;
+  &__like {
+    height: 14px;
+    position: absolute;
+    right: 0;
+    bottom: 16px;
+  }
+}
+.image-card__wrap {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  padding: 16px 0;
+  &__img {
+    width: 100px;
+    height: 100px;
+    margin-right: 12px;
+    border-radius: 8px;
+  }
+  &__cont {
+    flex: 1;
+    display: flex;
+    flex-direction: column;
+    justify-content: space-between;
+    &__top {
+      display: flex;
+      flex-direction: column;
+    }
+    &__tit {
+      font-size: 16px;
+      line-height: 22px;
+      font-weight: 600;
+      color: var(--opacity-9);
+      text-align: left;
+      margin-bottom: 3px;
+      word-break: break-all;
+    }
+    &__subtit {
+      font-size: 12px;
+      line-height: 17px;
+      font-weight: 400;
+      color: var(--opacity-5);
+      text-align: left;
+      word-break: break-all;
+    }
+    &__bot {
+      display: flex;
+      flex-direction: row;
+      justify-content: space-between;
+      height: 17px;
+      line-height: 17px;
+      font-weight: 400;
+      color: var(--opacity-3);
+    }
+    &__time {
+      font-size: 12px;
+    }
+  }
+}

+ 1 - 0
sources/client/smart-cooker/components/navigation/index.tyml

@@ -0,0 +1 @@
+<view >封装导航条组件</view>

+ 72 - 0
sources/client/smart-cooker/pages/definemenu/index.js

@@ -0,0 +1,72 @@
+Page({
+  data: {
+    cookdata: [
+      {
+        name: '新建食谱',
+        value: '',
+      },
+      {
+        name: '选择火力',
+        value: '小火加热',
+      },
+      {
+        name: '制作时长',
+        value: '1小时4分',
+      },
+    ], 
+    showDefinemenuDialog: true,
+    dialog_title: '选择火力',
+    hotList: [
+      {
+        name: '智能恒温',
+        value: '',
+        checked: false,
+      },
+      {
+        name: '小火加热',
+        value: '',
+        checked: false,
+      },
+      {
+        name: '中火加热',
+        value: '',
+        checked: true,
+      },
+      {
+        name: '大火加热',
+        value: '',
+        checked: false,
+      },
+      {
+        name: '全火加热',
+        value: '',
+        checked: false,
+      },
+    ],
+  },
+
+  onShow() {
+    this.setData({
+      // hasHiddenTabBar: true,
+      message_list: []
+    })
+    ty.hideMenuButton()     
+  },
+
+  radioChange: function (e) {
+    console.log(e);
+  },
+
+  closeDefinemenuDialog(e) {
+    this.setData({
+      showDefinemenuDialog: false,
+    });
+  },
+
+  onClickOverlay() {
+    this.setData({
+      showDefinemenuDialog: false,
+    });
+  },
+       
+})

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

@@ -0,0 +1,9 @@
+{
+  "navigationBarBackgroundColor": "#FFFFFF",
+  "navigationBarTextStyle": "black",
+  "navigationBarTitleText": "自定义食谱",
+  "backgroundColor": "#f2f4f6",
+  "backgroundTextStyle": "dark",
+  "enablePullDownRefresh": true,
+  "usingComponents": {}
+}

+ 34 - 0
sources/client/smart-cooker/pages/definemenu/index.tyml

@@ -0,0 +1,34 @@
+<view class="workmode definemenu">
+    <view class="definemenu_list">
+        <view class="definemenu_box create">
+            <view class="definemenu_box_headline">{{cookdata[0].name}}</view>
+            <view class="definemenu_box_row">
+                <input class="input" value="{{cookdata[0].value}}" placeholder="请输入食谱名称"/>
+            </view>
+        </view>
+        <view class="definemenu_box">
+            <view class="definemenu_box_title">{{cookdata[1].name}}</view>
+            <view class="definemenu_box_title">{{cookdata[1].value}}</view>
+            <view class="definemenu_box_switch" bind:tap="getHotList"></view>
+        </view>
+        <view class="definemenu_box">
+            <view class="definemenu_box_title">{{cookdata[2].name}}</view>
+            <view class="definemenu_box_title">{{cookdata[2].value}}</view>
+            <view class="definemenu_box_switch" bind:tap="getTime"></view>
+        </view>
+    </view> 
+</view>
+<page-container show="{{showDefinemenuDialog}}" duration="300" round="{{true}}" custom-style="border-radius: 16rpx 16rpx 0rpx 0rpx;" position="bottom" bind:clickoverlay="onClickOverlay">
+    <view class="definemenu_dialog">
+        <view class="dialog_title">{{dialog_title}}</view> 
+        <view class="dialog_delete" bindtap="closeDefinemenuDialog"></view> 
+        <radio-group class="radio-group dialog_list" bind:change="radioChange">
+            <view class="dialog_item {{item.checked ? 'checked' : ''}}" ty:for="{{hotList}}" ty:key="name">
+                <label >
+                    <view class="dialog_item_name">{{item.name}}</view>
+                    <radio class="dialog_item_radio" value="{{item.value}}" checked="{{item.checked}}"></radio>
+                </label>
+            </view>
+        </radio-group>
+    </view>
+</page-container>

+ 20 - 0
sources/client/smart-cooker/pages/definemenu/index.tyss

@@ -0,0 +1,20 @@
+page {background-color: #F6F7F8;}
+.definemenu {padding: 0 24rpx;box-sizing: border-box;}
+.definemenu .definemenu_list {overflow: hidden;}
+.definemenu .definemenu_list .definemenu_box {margin-top: 24rpx;display: flex;justify-content: space-between;align-items: center;padding: 24rpx;box-sizing: border-box;background: #FFFFFF;box-shadow: 0rpx 4rpx 16rpx 1rpx rgba(0,0,0,0.06);border-radius: 16rpx;position: relative;}
+.definemenu .definemenu_list .definemenu_box.create {display: block;background: linear-gradient( 180deg, #FFF3E0 0%, #FFFFFF 100%);border: 1rpx solid #FFFFFF;border: 1px dashed #cccccc;width: 100%;height: 270rpx;padding: 40rpx 24rpx;background: url(/assets/images/xian/definemenu_bg.png) no-repeat center;background-size: cover;}
+.definemenu .definemenu_list .definemenu_box .definemenu_box_headline {font-family: PingFang SC, PingFang SC;font-weight: 600;font-size: 36rpx;color: #150132;text-align: left;font-style: normal;text-transform: none;}
+.definemenu .definemenu_list .definemenu_box .definemenu_box_row {margin-top: 40rpx;}
+.definemenu .definemenu_list .definemenu_box .definemenu_box_row .input {background: #FFFFFF;border-radius: 16rpx;border: 1rpx solid #DDDDDD;font-family: PingFang SC, PingFang SC;font-weight: 400;font-size: 28rpx;color: #BFBFBF;text-align: left;font-style: normal;text-transform: none;width: 100%;height: 100rpx;line-height: 100rpx;text-indent: 30rpx;}
+.definemenu .definemenu_list .definemenu_box .definemenu_box_title {font-family: PingFang SC, PingFang SC;font-weight: 400;font-size: 28rpx;color: #150132;font-style: normal;text-transform: none;margin-right: 40rpx;}
+.definemenu .definemenu_list .definemenu_box .definemenu_box_switch {position: absolute;width: 32rpx;height: 32rpx;top: 50%;transform: translateY(-50%);right: 24rpx;background: url(/assets/images/xian/icon_rarrow.png) no-repeat center;background-size: cover;border: 1px dashed #cccccc;}
+
+.definemenu_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;position: relative;}
+.definemenu_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;}
+.definemenu_dialog .dialog_delete {position: absolute;width: 36rpx;height: 42.01rpx;background: url(/assets/images/xian/icon_wrong.png) no-repeat center;background-size: cover;top: 44rpx;right: 24rpx;z-index: 99;}
+.definemenu_dialog .dialog_list {margin-top: 40rpx;padding-bottom: 42rpx;box-sizing: border-box;}
+.definemenu_dialog .dialog_list .dialog_item {margin-bottom: 16rpx;position: relative;width: 100%;height: 88rpx;border-radius: 16rpx;}
+.definemenu_dialog .dialog_list .dialog_item.checked {/*background: #EE742F;opacity: 0.1;*/background-color: #FEF1E9;}
+.definemenu_dialog .dialog_list .dialog_item .dialog_item_name {font-family: PingFang SC, PingFang SC;font-weight: 400;font-size: 32rpx;color: #150132;text-align: center;font-style: normal;text-transform: none;width: 100%;height: 100%;line-height: 88rpx;position: relative;z-index: 99;}
+.definemenu_dialog .dialog_list .dialog_item.checked .dialog_item_name {color: #EE742F;}
+.definemenu_dialog .dialog_list .dialog_item .dialog_item_radio {position: absolute;z-index: 99;top: 50%;transform: translateY(-50%);right: 24rpx;width: 36rpx;height: 36rpx;background: linear-gradient( 180deg, #EE742F 0%, #F5BA4A 100%);border-radius: 50%;}

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

@@ -1,6 +0,0 @@
-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;}

+ 13 - 0
sources/client/smart-cooker/pages/menudesc/index.js

@@ -0,0 +1,13 @@
+Page({
+  data: {
+    imgUrl: '/assets/images/xian/device_action3.png',
+  },
+
+  onShow() {
+    this.setData({
+      // hasHiddenTabBar: true,
+      message_list: []
+    })
+    ty.hideMenuButton()     
+  },
+})

+ 10 - 0
sources/client/smart-cooker/pages/menudesc/index.json

@@ -0,0 +1,10 @@
+{
+  "navigationBarBackgroundColor": "#FFFFFF",
+  "navigationBarTextStyle": "black",
+  "navigationBarTitleText": "食谱详情",
+  "backgroundColor": "#F6F7F8",
+  "backgroundTextStyle": "dark",
+  "enablePullDownRefresh": true, 
+  "navigationStyle": "custom",
+  "usingComponents": {}
+}

+ 103 - 0
sources/client/smart-cooker/pages/menudesc/index.tyml

@@ -0,0 +1,103 @@
+<view class="menudesc">
+    <view class="menudesc_back"></view>
+    <view class="menudesc_img img_box">
+        <image class="image" src="{{imgUrl}}" mode="widthFix"></image>
+    </view>
+    <view class="menudesc_content">
+        <view class="menudesc_title">家庭版油焖大虾</view>
+        <view class="menudesc_text">虾含蛋白质含钙量高,外酥里嫩。关键做法也很简单哦!</view>
+        <view class="menudesc_info card">
+            <view class="menudesc_info_item">
+                <view class="menudesc_info_name">预计耗时</view>
+                <view class="menudesc_info_text">25分钟</view>
+                <view class="menudesc_info_line"></view>
+            </view>
+            <view class="menudesc_info_item">
+                <view class="menudesc_info_name">难易度</view>
+                <view class="menudesc_info_text">简单</view>
+                <view class="menudesc_info_line"></view>
+            </view>
+            <view class="menudesc_info_item">
+                <view class="menudesc_info_name">适合人数</view>
+                <view class="menudesc_info_text">3人</view>
+                <view class="menudesc_info_line"></view>
+            </view>
+        </view>
+        <view class="menudesc_materials card">
+            <view class="menudesc_materials_title">用料</view>
+            <view class="menudesc_materials_content">
+                <view class="menudesc_materials_item">
+                    <view class="menudesc_materials_text">虾</view>
+                    <view class="menudesc_materials_text">一斤</view>
+                </view>
+                <view class="menudesc_materials_item">
+                    <view class="menudesc_materials_text">葱</view>
+                    <view class="menudesc_materials_text">适量</view>
+                </view>
+                <view class="menudesc_materials_item">
+                    <view class="menudesc_materials_text">姜</view>
+                    <view class="menudesc_materials_text">少许</view>
+                </view>
+                <view class="menudesc_materials_item">
+                    <view class="menudesc_materials_text">蒜</view>
+                    <view class="menudesc_materials_text">5-6瓣</view>
+                </view>
+                <view class="menudesc_materials_item">
+                    <view class="menudesc_materials_text">料酒</view>
+                    <view class="menudesc_materials_text">1勺</view>
+                </view>
+                <view class="menudesc_materials_item">
+                    <view class="menudesc_materials_text">老抽</view>
+                    <view class="menudesc_materials_text">半勺</view>
+                </view>
+                   <view class="menudesc_materials_item">
+                    <view class="menudesc_materials_text">白糖</view>
+                    <view class="menudesc_materials_text">半勺</view>
+                </view>
+            </view>
+        </view>
+        <view class="menudesc_step card">
+            <view class="menudesc_step_item">
+                <view class="menudesc_step_title">步骤1</view>
+                <view class="menudesc_step_text">准备食材:虾、葱、姜、蒜。葱姜蒜切碎。处理好的虾头,去虾线,用一根牙签,在虾的2-3节处穿进去。把牙签拉上来,取出虾线,处理好的虾备用处理好的虾备用。</view>
+                <view class="menudesc_step_img img_box">
+                    <image class="image" src="/assets/images/xian/swiper1.png" mode="widthFix"></image>
+                </view>
+            </view>
+            <view class="menudesc_step_item">
+                <view class="menudesc_step_title">步骤2</view>
+                <view class="menudesc_step_text">一勺料酒、半勺老抽、一勺耗油、半勺白醋、一勺番茄酱、半勺白糖、4-5勺常温水,搅拌均匀。</view>
+                <view class="menudesc_step_img img_box">
+                    <image class="image" src="/assets/images/xian/swiper1.png" mode="widthFix"></image>
+                </view>
+            </view>
+            <view class="menudesc_step_item">
+                <view class="menudesc_step_title">步骤3</view>
+                <view class="menudesc_step_text">锅烧热,放油,爆香葱姜蒜末。放入虾翻炒至两面变红色。倒入调好的调料。盖上盖子焖2分钟左右。去掉盖子,收汁。</view>
+                <view class="menudesc_step_img img_box">
+                    <image class="image" src="/assets/images/xian/swiper1.png" mode="widthFix"></image>
+                </view>
+            </view>
+            <view class="menudesc_step_item">
+                <view class="menudesc_step_title">步骤4</view>
+                <view class="menudesc_step_text">美味的油焖大虾做好了,装盘。撒上香葱点缀。</view>
+                <view class="menudesc_step_img img_box">
+                    <image class="image" src="/assets/images/xian/swiper1.png" mode="widthFix"></image>
+                </view>
+            </view>
+        </view>
+        <view class="menudesc_tip card">
+            <view class="menudesc_tip_title">小贴士</view>
+            <view class="menudesc_tip_text">这是小贴士,这是小贴士,这是小贴士,这是小贴士,这是小贴士,这是小贴士,这是小贴士,这是小贴士,这是小贴士,这是小贴士,这是小贴士,这是小贴士,这是小贴士,这是小贴士</view>
+        </view>
+    </view>
+    <view class="menudesc_footer">
+        <view class="menudesc_footer_flag">
+            <view class="menudesc_footer_star img_box">
+                <image class="image" src="/assets/images/xian/icon_star.png" mode="widthFix"></image>
+            </view>
+            <view class="menudesc_footer_num">1.2w</view>
+        </view>
+        <view class="menudesc_footer_btn">开始烹饪</view>
+    </view>
+</view>

+ 33 - 0
sources/client/smart-cooker/pages/menudesc/index.tyss

@@ -0,0 +1,33 @@
+page {background-color: #F6F7F8;}
+.menudesc {position: relative;}
+.menudesc .menudesc_back {position: absolute;width: 36rpx;height: 36rpx;background: #FFFFFF;background: url(/assets/images/xian/icon_larrow.png) no-repeat center;background-size: contain;filter: brightness(0) invert(1);top: 114rpx;left: 30rpx;z-index: 99;}
+.menudesc .menudesc_img {padding-top: 560rpx;} 
+.menudesc .menudesc_footer {position: fixed;z-index: 99;bottom: 0;width: 100%;height: 100rpx;padding: 12rpx 24rpx;box-sizing: border-box;display: flex;justify-content: space-between;align-items: center;background: #FFFFFF; }
+.menudesc .menudesc_footer .menudesc_footer_flag {display: flex;align-items: center;}
+.menudesc .menudesc_footer .menudesc_footer_flag .menudesc_footer_star {width: 32rpx;padding-top: 32rpx;}
+.menudesc .menudesc_footer .menudesc_footer_flag .menudesc_footer_num {margin-left: 8rpx;font-family: PingFang SC, PingFang SC;font-weight: 400;font-size: 28rpx;color: #150132;text-align: left;font-style: normal;text-transform: none;}
+.menudesc .menudesc_footer .menudesc_footer_btn {width: 240rpx;height: 76rpx;line-height: 76rpx;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: 28rpx;color: #FFFFFF;text-align: center;font-style: normal;text-transform: none;}
+.menudesc .menudesc_content {padding: 0 24rpx;box-sizing: border-box ;}
+.menudesc .menudesc_content .menudesc_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: 40rpx;}
+.menudesc .menudesc_content .menudesc_text {font-family: PingFang SC, PingFang SC;font-weight: 600;font-size: 24rpx;color: #666666;text-align: left;font-style: normal;text-transform: none;margin-top: 16rpx;}
+.menudesc .menudesc_content .card {background: #FFFFFF;box-shadow: 0rpx 4rpx 16rpx 1rpx rgba(0,0,0,0.06);border-radius: 16rpx;}
+.menudesc .menudesc_content .menudesc_info {margin-top: 40rpx;display: flex;}
+.menudesc .menudesc_content .menudesc_info .menudesc_info_item {width: calc(100% / 3);padding: 40rpx 0;box-sizing: border-box;display: flex;flex-direction: column;justify-content: center;align-items: center;position: relative;}
+.menudesc .menudesc_content .menudesc_info .menudesc_info_item .menudesc_info_name {font-family: PingFang SC, PingFang SC;font-weight: 400;font-size: 22rpx;color: #666666;text-align: center;font-style: normal;text-transform: none;}
+.menudesc .menudesc_content .menudesc_info .menudesc_info_item .menudesc_info_text {font-family: PingFang SC, PingFang SC;font-weight: 400;font-size: 32rpx;color: #150132;text-align: center;font-style: normal;text-transform: none;margin-top: 8rpx;}
+.menudesc .menudesc_content .menudesc_info .menudesc_info_item .menudesc_info_line {position: absolute;width: 1rpx;height: 60rpx;right: 0;top: 50%;transform: translateY(-50%);background: #DDDDDD;}
+.menudesc .menudesc_content .menudesc_info .menudesc_info_item:last-child .menudesc_info_line {display: none;}
+.menudesc .menudesc_content .menudesc_materials {margin-top: 24rpx;padding: 0 24rpx;box-sizing: border-box;overflow: hidden;}
+.menudesc .menudesc_content .menudesc_materials .menudesc_materials_title {margin-top: 40rpx;font-family: PingFang SC, PingFang SC;font-weight: 600;font-size: 36rpx;color: #150132;text-align: left;font-style: normal;text-transform: none;}
+.menudesc .menudesc_content .menudesc_materials .menudesc_materials_content {margin-top: 24rpx;margin-bottom: 16rpx;}
+.menudesc .menudesc_content .menudesc_materials .menudesc_materials_content .menudesc_materials_item {padding: 24rpx 0;border-top: 1rpx solid #DDDDDD;display: flex;align-items: center;justify-content: space-between;}
+.menudesc .menudesc_content .menudesc_materials .menudesc_materials_content .menudesc_materials_item .menudesc_materials_text {font-family: PingFang SC, PingFang SC;font-weight: 400;font-size: 28rpx;color: #150132;text-align: left;font-style: normal;text-transform: none;}
+.menudesc .menudesc_content .menudesc_step {margin-top: 24rpx;padding: 40rpx 24rpx;box-sizing: border-box;overflow: hidden;}
+.menudesc .menudesc_content .menudesc_step .menudesc_step_item:first-child .menudesc_step_title {margin-top: 0;}
+.menudesc .menudesc_content .menudesc_step .menudesc_step_item .menudesc_step_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: 24rpx;}
+.menudesc .menudesc_content .menudesc_step .menudesc_step_item .menudesc_step_text {font-family: PingFang SC, PingFang SC;font-weight: 400;font-size: 28rpx;color: #150132;text-align: left;font-style: normal;text-transform: none;margin-top: 24rpx;}
+.menudesc .menudesc_content .menudesc_step .menudesc_step_item .menudesc_step_img {margin-top: 24rpx;width: 100%;padding-top: 416rpx;border-radius: 16rpx;}
+.menudesc .menudesc_content .menudesc_tip {margin-top: 24rpx;padding: 24rpx;box-sizing: border-box;margin-bottom: 92rpx;margin-bottom: 192rpx;}
+.menudesc .menudesc_content .menudesc_tip .menudesc_tip_title {font-family: PingFang SC, PingFang SC;font-weight: 600;font-size: 36rpx;color: #150132;text-align: left;font-style: normal;text-transform: none;}
+.menudesc .menudesc_content .menudesc_tip .menudesc_tip_text {font-family: PingFang SC, PingFang SC;font-weight: 400;font-size: 24rpx;color: #666666;text-align: left;font-style: normal;text-transform: none;margin-top: 24rpx;border-top: 1rpx solid #DDDDDD;padding-top: 24rpx;box-sizing: border-box;}
+

+ 56 - 0
sources/client/smart-cooker/pages/moremenu/index.js

@@ -0,0 +1,56 @@
+Page({
+  data: {
+    menuList: [
+      {
+        name: '香滑皮蛋瘦肉粥十五分钟快...',
+        imgUrl: '/assets/images/xian/moremenu_img1.jpg',
+        text: '十五分钟快手之香滑皮蛋瘦肉粥,香滑皮蛋瘦肉粥十五分钟快手之香滑皮蛋',
+        num: '202',
+        collect: '100',
+      },
+      {
+        name: '网红芝士烤牛奶',
+        imgUrl: '/assets/images/xian/home_device1.png',
+        text: '网红芝士烤牛奶/哄娃神器系列',
+        num: '1.2w',
+        collect: '234',
+      }, 
+      {
+        name: '奶香豆沙',
+        imgUrl: '/assets/images/xian/home_device1.png',
+        text: '奶香豆沙小馒头,仅需一次松弛',
+        num: '1246',
+        collect: '574',
+      },
+      {
+        name: '爆好吃的卤鸡腿!卤蛋(电饭煲)',
+        imgUrl: '/assets/images/xian/home_device1.png',
+        text: '晚上做好,剩下的汤汁不要倒掉',
+        num: '1.4w',
+        collect: '2526',
+      },
+      {
+        name: '糖醋鸡胸肉',
+        imgUrl: '/assets/images/xian/home_device1.png',
+        text: '酸酸甜甜的糖醋鸡胸肉,小朋友的最爱!',
+        num: '1.4w',
+        collect: '2526',
+      },
+      {
+        name: '家庭版油焖大虾',
+        imgUrl: '/assets/images/xian/home_device1.png',
+        text: '虾含蛋白质含钙量高,外酥里嫩。关键做法…',
+        num: '2.4w',
+        collect: '1.2w',
+      },
+    ], 
+  },
+
+  onShow() {
+    this.setData({
+      // hasHiddenTabBar: true,
+      message_list: []
+    })
+    ty.hideMenuButton()     
+  },
+})

+ 12 - 0
sources/client/smart-cooker/pages/moremenu/index.json

@@ -0,0 +1,12 @@
+{
+  "navigationBarBackgroundColor": "#FFFFFF",
+  "navigationBarTextStyle": "black",
+  "navigationBarTitleText": "更多食谱",
+  "backgroundColor": "#FFFFFF",
+  "backgroundTextStyle": "dark",
+  "enablePullDownRefresh": true,
+  "navigationStyle": "custom",
+  "usingComponents": {
+    "navigation": "/components/navigation/index"
+  }
+}

+ 28 - 0
sources/client/smart-cooker/pages/moremenu/index.tyml

@@ -0,0 +1,28 @@
+<view class="workmode moremenu">
+    <!-- <navigation></navigation> -->
+    <view class="moremenu_header"></view>
+    <view class="moremenu_header">
+        <view class="navigator-btn">
+            <navigator url="pages/multifunctional/index" class="link" open-type="navigateBack" hover-class="other-navigator-hover"></navigator>
+        </view>
+        <view class="moremenu_search">
+            <input class="moremenu_input" name="cookname" placeholder="搜索食谱/菜谱" />
+            <view class="moremenu_icon"></view>
+        </view>
+    </view>
+    <view class="moremenu_list" ty:if="{{menuList.length > 0}}">
+        <view class="moremenu_box" ty:for="{{menuList}}" ty:key="{{index}}">
+            <view class="moremenu_box_img img_box">
+                <image class="image" src="{{item.imgUrl}}" mode="widthFix"></image>
+            </view>
+            <view class="moremenu_box_content">
+                <view class="moremenu_box_title">{{item.name}}</view>
+                <view class="moremenu_box_text">{{item.text}}</view>
+                <view class="moremenu_box_type">
+                    <view class="moremenu_box_num">{{item.num}}做过</view>
+                    <view class="moremenu_box_num">{{item.collect}}收藏</view>
+                </view>
+            </view>
+        </view>
+    </view>
+</view>

+ 16 - 0
sources/client/smart-cooker/pages/moremenu/index.tyss

@@ -0,0 +1,16 @@
+page {background-color: #FFFFFF;}
+.moremenu .moremenu_header {height: 88rpx;padding: 6rpx 24rpx;box-sizing: border-box;display: flex;justify-content: space-between;align-items: center;}
+.moremenu .moremenu_header .navigator-btn {margin-left: 6rpx;width: 20rpx;height: 36rpx;width: 36rpx;height: 36rpx;}
+.moremenu .moremenu_header .navigator-btn .link {width: 100%;height: 100%;background: #181818;background: url(/assets/images/xian/icon_larrow.png) no-repeat center;background-size: contain;display: inline-block;}
+.moremenu .moremenu_header .moremenu_search {position: relative;}
+.moremenu .moremenu_header .moremenu_search .moremenu_input {width: 652rpx;height: 76rpx;background: #F6F7F8;border-radius: 38rpx;border: 1rpx solid #DDDDDD;text-indent: 24rpx;}
+.moremenu .moremenu_header .moremenu_search .moremenu_icon {position: absolute;width: 36rpx;height: 36rpx;background: url(/assets/images/xian/icon_search.png) no-repeat center;background-size: contain;top: 50%;transform: translateY(-50%);right: 24rpx;} 
+.moremenu .moremenu_list {padding: 0 24rpx;box-sizing: border-box;margin-top: 40rpx;margin-bottom: 25rpx;}
+.moremenu .moremenu_list .moremenu_box {display: flex;justify-content: space-between;align-items: center;margin-bottom: 41rpx;}
+.moremenu .moremenu_list .moremenu_box .moremenu_box_img {width: 238rpx;padding-top: 178rpx;box-sizing: border-box;border-radius: 16rpx;overflow: hidden;}
+.moremenu .moremenu_list .moremenu_box .moremenu_box_content {width: calc(100% - 238rpx);padding-left: 24rpx;box-sizing: border-box;}
+.moremenu .moremenu_list .moremenu_box .moremenu_box_content .moremenu_box_title {font-family: PingFang SC, PingFang SC;font-weight: 400;font-size: 32rpx;color: #150132;text-align: left;font-style: normal;text-transform: none;margin-top: 4rpx;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;}
+.moremenu .moremenu_list .moremenu_box .moremenu_box_content .moremenu_box_text {font-family: PingFang SC, PingFang SC;font-weight: 400;font-size: 22rpx;color: #999999;text-align: left;font-style: normal;text-transform: none;margin-top: 8rpx;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 2;text-overflow: ellipsis;overflow: hidden;}
+.moremenu .moremenu_list .moremenu_box .moremenu_box_content .moremenu_box_type {display: flex;align-items: center;margin-top: 26rpx;}
+.moremenu .moremenu_list .moremenu_box .moremenu_box_content .moremenu_box_type .moremenu_box_num {font-family: PingFang SC, PingFang SC;font-weight: 400;font-size: 22rpx;color: #666666;text-align: left;font-style: normal;text-transform: none;}
+.moremenu .moremenu_list .moremenu_box .moremenu_box_content .moremenu_box_type .moremenu_box_num:last-child {margin-left: 24rpx;}

+ 16 - 9
sources/client/smart-cooker/pages/device/index.js

@@ -9,37 +9,37 @@ Page({
         name: '煮粥',
         imgUrl: '/assets/images/xian/device_action2.png',
       },
-      {
+      { 
         name: '热饭',
         imgUrl: '/assets/images/xian/device_action3.png',
       },
       {
         name: '蒸煮',
-        imgUrl: '/assets/images/xian/device_action3.png',
+        imgUrl: '/assets/images/xian/device_action4.png',
       },
       {
         name: '煲汤',
-        imgUrl: '/assets/images/xian/device_action3.png',
+        imgUrl: '/assets/images/xian/device_action5.png',
       },
       {
         name: '酸奶',
-        imgUrl: '/assets/images/xian/device_action3.png',
+        imgUrl: '/assets/images/xian/device_action6.png',
       },
     ],
     define_list: [
       {
         name: '自定义食谱',
-        imgUrl: '/assets/images/xian/device_action1.png',
+        imgUrl: '/assets/images/xian/device_img1.png',
       },
       {
         name: 'XXXX菜谱',
-        imgUrl: '/assets/images/xian/device_action2.png',
+        imgUrl: '/assets/images/xian/device_img2.png',
       },
       {
         name: '家庭版油焖大虾',
         imgUrl: '/assets/images/xian/device_action3.png',
       },
-    ],
+    ], 
   },
 
   onShow() {
@@ -49,7 +49,14 @@ Page({
     })
     ty.hideMenuButton()
   },
+  goAction() {
+    ty.navigateTo({url: '/pages/workstate/index'})
+  },
   goAddDevice() {},
-  goDefinemenu() {}
-
+  goDefinemenu() {
+    ty.navigateTo({url: '/pages/definemenu/index'})
+  },
+  goMoremenu() {
+    ty.navigateTo({url: '/pages/moremenu/index'})
+  }
 })

sources/client/smart-cooker/pages/device/index.json → sources/client/smart-cooker/pages/multifunctional/index.json


+ 11 - 9
sources/client/smart-cooker/pages/device/index.tyml

@@ -1,19 +1,20 @@
-<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">
+<view class="workmode multifunctional">
+    <view class="multifunctional_action">
+        <view class="multifunctional_action_item" ty:for="{{da_list}}" ty:key="{{index}}" bindtap="goAction">
+            <view class="multifunctional_action_img img_box">
                 <image mode="widthFix" lazy-load="true" src="{{item.imgUrl}}" />
-            </view>
-            <view class="device_action_text">{{item.name}}</view>
+            </view> 
+            <view class="multifunctional_action_text">{{item.name}}</view>
         </view> 
     </view>
-    <view class="device_definemenu">
+    <view class="multifunctional_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 " />
+                <image mode="widthFix" lazy-load="true" src="/assets/images/xian/icon_delete.png" />
             </view> 
-        </view>
+        </view> 
+        <view class="definemenu_line"></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">
@@ -24,4 +25,5 @@
             </view>
         </view>
     </view>
+    <view class="multifunctional_cookbook" bind:tap="goMoremenu">更多食谱</view>
 </view>

+ 18 - 0
sources/client/smart-cooker/pages/multifunctional/index.tyss

@@ -0,0 +1,18 @@
+page {background-color: #F6F7F8;}
+.multifunctional {padding: 24rpx;box-sizing: border-box;}
+.multifunctional .multifunctional_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;}
+.multifunctional .multifunctional_action .multifunctional_action_item {display: flex;flex-direction: column;justify-content: flex-start;align-items: center;margin-top: 40rpx;margin-right: 71rpx;}
+.multifunctional .multifunctional_action .multifunctional_action_item:nth-child(3n) {margin-right: 0rpx;}
+.multifunctional .multifunctional_action .multifunctional_action_item .multifunctional_action_img {width: 160rpx;padding-top: 160rpx;border: 1px dashed #cccccc;box-sizing: border-box;}
+.multifunctional .multifunctional_definemenu {padding: 24rpx;box-sizing: border-box;background: #FFFFFF;box-shadow: 0rpx 4rpx 16rpx 1rpx rgba(0,0,0,0.06);border-radius: 16rpx;margin-top: 24rpx;} 
+.multifunctional .multifunctional_definemenu .definemenu_header {display: flex;justify-content: space-between;align-items: center;margin-top: 16rpx;padding-right: 16rpx;box-sizing: border-box;} 
+.multifunctional .multifunctional_definemenu .definemenu_header .definemenu_title {font-family: PingFang SC, PingFang SC;font-weight: 600;font-size: 36rpx;color: #150132;text-align: left;font-style: normal;text-transform: none;} 
+.multifunctional .multifunctional_definemenu .definemenu_header .definemenu_delete {width: 36rpx;padding-top: 36rpx;box-sizing: border-box;} 
+.multifunctional .multifunctional_definemenu .definemenu_line {width: 100%;height: 1rpx;background: #DDDDDD;margin-top: 24rpx;}
+.multifunctional .multifunctional_definemenu .definemenu_list {margin-top: 24rpx;}
+.multifunctional .multifunctional_definemenu .definemenu_list .definemenu_box {display: flex;align-items: center;margin-bottom: 16rpx;padding: 24rpx;box-sizing: border-box;background: #F6F7F8;border-radius: 16rpx;position: relative;}
+.multifunctional .multifunctional_definemenu .definemenu_list .definemenu_box:first-child {margin-top: 0rpx;}
+.multifunctional .multifunctional_definemenu .definemenu_list .definemenu_box .definemenu_box_img {width: 64rpx;padding-top: 64rpx;box-sizing: border-box;border: 1px dashed #cccccc;}
+.multifunctional .multifunctional_definemenu .definemenu_list .definemenu_box .definemenu_box_title {margin-left: 24rpx;}
+.multifunctional .multifunctional_definemenu .definemenu_list .definemenu_box .definemenu_box_switch {width: 32rpx;height: 32rpx;background: url(/assets/images/xian/icon_rarrow.png) no-repeat center;background-size: contain;position: absolute;top: 50%;transform: translateY(-50%);right: 24rpx;border: 1px dashed #cccccc;box-sizing: border-box;}
+.multifunctional .multifunctional_cookbook {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: auto;margin-top: 159rpx;}

+ 170 - 0
sources/client/smart-cooker/pages/workstate/index.js

@@ -0,0 +1,170 @@
+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: 'dsasfaf',
+      },
+      {
+        name: 'password',
+        value: '15151',
+      },
+    ],
+    rules: [
+      {
+        name: 'wifi',
+        rules: { required: true, message: 'wifi is required' },
+      },
+      {
+        name: 'password',
+        rules: { required: true, message: 'password is required' },
+      },
+    ],
+  },
+
+  onShow() {
+    this.setData({
+      hasHiddenTabBar: true
+      // wifiData: [],
+    })
+    ty.hideMenuButton();
+  },
+
+  formInputChange(e) {
+    const { field } = e.currentTarget.dataset
+    this.setData({
+      [`wifiData.${field}`]: e.detail.value,
+    })
+  },
+
+  handleSubmit(ev) {
+    const value = ev.detail.value;
+    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({
+      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,
+    })
+  },
+
+  onClosSelectWifi() {
+    this.setData({
+      showwifiDialog: false,
+    })
+  },
+  inputfocus() {
+    this.setData({
+      focus: 'orange',
+    })
+  },
+  inputBlur() {
+    this.setData({
+      focus: '',
+    })
+  },
+
+  changeEyes() {
+    this.setData({
+      eyes: !this.data.eyes
+    })
+  },
+
+})

+ 13 - 0
sources/client/smart-cooker/pages/workstate/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"
+  }
+}

+ 46 - 0
sources/client/smart-cooker/pages/workstate/index.tyml

@@ -0,0 +1,46 @@
+<view class="selectwifi_bg"></view>
+<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">
+        <mpform id="wifiform" rules="{{rules}}" models="{{wifiData}}" >
+            <view class="row">
+                <!-- <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 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 type="primary" class="submit-btn" bindtap="submitForm">下一步</button>
+            </view>
+        </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>

+ 30 - 0
sources/client/smart-cooker/pages/workstate/index.tyss

@@ -0,0 +1,30 @@
+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 #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;}
+
+
+

+ 1 - 1
sources/client/smart-cooker/project.tuya.json

@@ -1,5 +1,5 @@
 {
-  "projectname": "miniapp",
+  "projectname": "smart-cooker",
   "i18n": true,
   "description": "",
   "baseversion": "2.14.2",