修改ui设计错误
BIN
android/app/src/main/res/mipmap-ldpi/ic_launchermh.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
1
assets/img/icon/address.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="42" height="42" viewBox="0 0 42 42"><g><g></g><g><g><path d="M25.644967968750002,29.875938671875Q32.21486796875,21.836238671875,32.21486796875,17.409138671875Q32.21486796875,12.768598671875,28.92636796875,9.480398671875001Q25.63786796875,6.192138671875,20.99656796875,6.192138671875Q16.35995796875,6.192138671875,13.07230796875,9.479778671875Q9.78466796875,12.767428671874999,9.78466796875,17.404038671875Q9.78466796875,21.146338671875,14.607987968749999,27.634438671875Q17.02112796875,30.880538671875,19.604637968749998,33.591938671875Q20.16998796875,34.192138671875,21.00296796875,34.192138671875L21.022967968750002,34.192138671875Q21.895167968750002,34.192138671875,22.464967968750003,33.517038671875L25.623767968750002,29.901038671875Q25.634567968749998,29.888638671875,25.644967968750002,29.875938671875ZM27.51226796875,10.894668671875Q30.21486796875,13.597068671875,30.21486796875,17.409138671875Q30.21486796875,21.119838671875,24.10666796875,28.597738671875L20.998767968750002,32.155738671875Q18.52815796875,29.555438671875,16.21305796875,26.441238671875Q11.78466796875,20.484338671875,11.78466796875,17.404038671875Q11.78466796875,13.595858671875,14.48652796875,10.893998671875Q17.18838796875,8.192138671875,20.99656796875,8.192138671875Q24.80946796875,8.192137671875,27.51226796875,10.894668671875ZM24.98756796875,21.394138671874998Q26.63966796875,19.742338671875,26.63966796875,17.404038671875Q26.63966796875,15.065348671875,24.98756796875,13.413698671875Q23.33556796875,11.762208671875001,20.99656796875,11.762208671875001Q18.65854796875,11.762208671875001,17.00722796875,13.413878671875Q15.355957968750001,15.065518671875001,15.355957968750001,17.404038671875Q15.355957968750001,19.742138671875,17.00716796875,21.394038671875002Q18.65864796875,23.046138671875,20.99656796875,23.046138671875Q23.335467968750002,23.046138671875,24.98756796875,21.394138671874998ZM23.573467968750002,14.828118671875Q24.63966796875,15.893948671875,24.63966796875,17.404038671875Q24.63966796875,18.913838671875,23.573467968750002,19.979938671875Q22.50706796875,21.046138671875,20.99656796875,21.046138671875Q19.487307968750002,21.046138671875,18.42166796875,19.980038671875Q17.35595796875,18.913938671875,17.35595796875,17.404038671875Q17.35595796875,15.893818671875,18.42159796875,14.827938671875Q19.48709796875,13.762208671875001,20.99656796875,13.762208671875001Q22.50726796875,13.762208671875001,23.573467968750002,14.828118671875Z" fill-rule="evenodd" fill="#85F5FF" fill-opacity="1"/></g></g></g></svg>
|
||||||
|
After Width: | Height: | Size: 2.6 KiB |
1
assets/img/icon/customer_service.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="42" height="42" viewBox="0 0 42 42"><g><g></g><g><g><path d="M24.27098828125,30.82373046875L24.27098828125,27.94873046875L22.27098828125,27.94873046875L22.27098828125,31.82373046875Q22.27098828125,31.92223046875,22.29018828125,32.01883046875Q22.30938828125,32.11543046875,22.347088281250002,32.20643046875Q22.38478828125,32.29743046875,22.43948828125,32.37933046875Q22.49428828125,32.46123046875,22.56388828125,32.53083046875Q22.63348828125,32.600430468750005,22.71538828125,32.65523046875Q22.797288281249998,32.70993046875,22.88828828125,32.74763046875Q22.97928828125,32.785330468750004,23.075888281250002,32.80453046875Q23.17248828125,32.82373046875,23.27098828125,32.82373046875L29.93798828125,32.82373046875Q30.03648828125,32.82373046875,30.13308828125,32.80453046875Q30.22968828125,32.785330468750004,30.32068828125,32.74763046875Q30.41168828125,32.70993046875,30.49358828125,32.65523046875Q30.57548828125,32.600430468750005,30.64508828125,32.53083046875Q30.71468828125,32.46123046875,30.76948828125,32.37933046875Q30.82418828125,32.29743046875,30.86188828125,32.20643046875Q30.89958828125,32.11543046875,30.91878828125,32.01883046875Q30.93798828125,31.92223046875,30.93798828125,31.82373046875L30.93798828125,17.63672046875Q30.93798828125,13.52048046875,28.027088281250002,10.60960046875Q25.11628828125,7.69873046875,20.99999828125,7.69873046875Q16.88380828125,7.69873046875,13.97331828125,10.60966046875Q11.06298828125,13.52043046875,11.06298828125,17.63672046875L11.06298828125,31.82373046875L13.06298828125,31.82373046875L13.06298828125,17.63672046875Q13.06298828125,14.34877046875,15.38763828125,12.02376046875Q17.71232828125,9.69873046875,20.99999828125,9.69873046875Q24.287788281250002,9.69873046875,26.61288828125,12.02382046875Q28.93798828125,14.348910468749999,28.93798828125,17.63672046875L28.93798828125,30.82373046875L24.27098828125,30.82373046875Z" fill-rule="evenodd" fill="#85F5FF" fill-opacity="1"/></g><g><g transform="matrix(0,-1,1,0,-22.157470703125,41.490478515625)"><line x1="9.66650390625" y1="30.823974609375" x2="17.708170890808105" y2="30.823974609375" fill-opacity="0" stroke-opacity="1" stroke="#85F5FF" fill="none" stroke-width="2" stroke-linecap="ROUND" stroke-linejoin="round"/></g><g transform="matrix(0,-1,1,0,2.509033203125,66.156982421875)"><line x1="34.3330078125" y1="30.823974609375" x2="42.374674797058105" y2="30.823974609375" fill-opacity="0" stroke-opacity="1" stroke="#85F5FF" fill="none" stroke-width="2" stroke-linecap="ROUND" stroke-linejoin="round"/></g></g></g></g></svg>
|
||||||
|
After Width: | Height: | Size: 2.6 KiB |
1
assets/img/icon/default_head.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="29.17822265625" height="29.1357421875" viewBox="0 0 29.17822265625 29.1357421875"><g><path d="M3.10107,24.4082C2.32617,24.6855,1.82617,25.3301,1.82617,25.917C1.82617,25.917,1.82617,26.6006,1.82617,26.6006C1.82617,27.0312,2.15625,27.3105,2.854,27.3105C2.854,27.3105,26.3232,27.3105,26.3232,27.3105C27.022,27.3105,27.3521,27.0312,27.3521,26.6006C27.3521,26.6006,27.3521,25.917,27.3521,25.917C27.3521,25.3145,26.8384,24.6416,26.1401,24.3916C26.1401,24.3916,19.6514,21.8701,19.6514,21.8701C19.5703,21.8379,19.4443,21.7871,19.2861,21.7178C19.022,21.6035,18.7632,21.4795,18.5083,21.3457C18.061,21.1084,17.6899,20.8682,17.3823,20.582C17.354,20.5547,17.354,20.5547,17.3252,20.5273C16.373,19.5938,16.3784,18.3271,16.8413,16.7812C16.9741,16.3379,17.1631,16.0195,17.6963,15.2129C17.7832,15.082,17.8701,14.9512,17.957,14.8203C18.0664,14.6562,18.1504,14.5283,18.2334,14.4004C18.4302,14.1006,18.6211,13.7979,18.8071,13.4912C19.583,12.2051,20.0801,11.0938,20.2642,10.1201C20.3164,9.85059,20.3413,9.59863,20.3413,9.36426C20.3413,5.12695,17.6572,1.8252,14.5552,1.8252C11.4521,1.8252,8.76904,5.12695,8.76904,9.36426C8.76904,9.71387,8.82227,10.1084,8.93018,10.542C9.1543,11.4482,9.59521,12.4629,10.208,13.5566C10.6494,14.3438,11.812,16.1348,11.8691,16.2432C12.5332,17.5127,12.4731,19.4053,11.6001,20.3809C11.2002,20.8242,10.6973,21.1152,10.019,21.4111C9.74121,21.5312,9.45312,21.6416,9.16602,21.7422C9.05615,21.7812,8.95898,21.8125,8.88232,21.8379C8.88232,21.8379,3.10205,24.4082,3.10205,24.4082C3.10205,24.4082,3.10107,24.4082,3.10107,24.4082C3.10107,24.4082,3.10107,24.4082,3.10107,24.4082ZM26.7563,22.6729C28.1143,23.1602,29.1782,24.4756,29.1782,25.917C29.1782,25.917,29.1782,26.6006,29.1782,26.6006C29.1782,28.1738,27.897,29.1357,26.3232,29.1357C26.3232,29.1357,2.854,29.1357,2.854,29.1357C1.28027,29.1357,0,28.1738,0,26.6006C0,26.6006,0,25.917,0,25.917C0,24.4756,1.06396,23.1992,2.42236,22.7129C2.42236,22.7129,8.2334,20.1289,8.2334,20.1289C8.2334,20.1289,9.80811,19.6455,10.2393,19.1641C10.5264,18.8428,10.6152,17.7842,10.251,17.0889C9.88818,16.3936,6.94336,12.5713,6.94336,9.36426C6.94336,4.19336,10.3511,0,14.5542,0C18.7583,0,22.166,4.19336,22.166,9.36426C22.166,12.7119,18.8623,16.3975,18.5903,17.3047C18.3184,18.2119,18.2964,18.9219,18.603,19.2227C19.0811,19.6904,20.3101,20.167,20.3101,20.167C20.3101,20.167,26.7563,22.6729,26.7563,22.6729C26.7563,22.6729,26.7563,22.6729,26.7563,22.6729C26.7563,22.6729,26.7563,22.6729,26.7563,22.6729Z" fill="#85F5FF" fill-opacity="1"/></g></svg>
|
||||||
|
After Width: | Height: | Size: 2.5 KiB |
1
assets/img/icon/help.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="42" height="42" viewBox="0 0 42 42"><g><g></g><g><ellipse cx="20.99992561340332" cy="20.99992561340332" rx="11.16545295715332" ry="11.16545295715332" fill-opacity="0" stroke-opacity="1" stroke="#85F5FF" fill="none" stroke-width="2" stroke-linecap="ROUND" stroke-linejoin="round"/></g><g transform="matrix(0,1,-1,0,40.11181640625,0.11181640625)"><line x1="20" y1="19.11181640625" x2="27.89148473739624" y2="19.11181640625" fill-opacity="0" stroke-opacity="1" stroke="#85F5FF" fill="none" stroke-width="2" stroke-linecap="ROUND" stroke-linejoin="round"/></g><g><ellipse cx="20.999978065490723" cy="15.770485877990723" rx="1.5868921279907227" ry="1.5868921279907227" fill="#85F5FF" fill-opacity="1"/></g></g></svg>
|
||||||
|
After Width: | Height: | Size: 827 B |
1
assets/img/icon/mall.svg
Normal file
|
After Width: | Height: | Size: 5.4 KiB |
1
assets/img/icon/order.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="42" height="42" viewBox="0 0 42 42"><g><g></g><g><path d="M30.4149953125,13.2087384375C30.4149953125,12.6706584375,30.8505953125,12.2348584375,31.3886953125,12.2348584375C31.9257953125,12.2348584375,32.3617953125,12.6706584375,32.3617953125,13.2087384375C32.3617953125,13.2087384375,32.3617953125,30.4147484375,32.3617953125,30.4147484375C32.3617953125,32.3867484375,30.7636953125,33.985848437499996,28.7909953125,33.985848437499996C28.7909953125,33.985848437499996,13.2089853125,33.985848437499996,13.2089853125,33.985848437499996C11.2358353125,33.985848437499996,9.6376953125,32.3867484375,9.6376953125,30.4147484375C9.6376953125,30.4147484375,9.6376953125,11.5856884375,9.6376953125,11.5856884375C9.6376953125,9.6127884375,11.2358353125,8.0146484375,13.2089853125,8.0146484375C13.2089853125,8.0146484375,31.3886953125,8.0146484375,31.3886953125,8.0146484375C31.9257953125,8.0146484375,32.3617953125,8.4506834375,32.3617953125,8.9887694375C32.3617953125,9.5258784375,31.9257953125,9.9616684375,31.3886953125,9.9616684375C31.3886953125,9.9616684375,13.2089853125,9.9616684375,13.2089853125,9.9616684375C12.3120153125,9.9616684375,11.5849653125,10.6887184375,11.5849653125,11.5856884375C11.5849653125,11.5856884375,11.5849653125,11.5856884375,11.5849653125,11.5856884375C11.5849653125,11.5856884375,11.5849653125,30.4147484375,11.5849653125,30.4147484375C11.5849653125,31.3107484375,12.3120153125,32.0378484375,13.2089853125,32.0378484375C13.2089853125,32.0378484375,28.7909953125,32.0378484375,28.7909953125,32.0378484375C29.6879953125,32.0378484375,30.4149953125,31.3107484375,30.4149953125,30.4147484375C30.4149953125,30.4147484375,30.4149953125,13.2087384375,30.4149953125,13.2087384375C30.4149953125,13.2087384375,30.4149953125,13.2087384375,30.4149953125,13.2087384375ZM15.8056653125,18.7277484375C15.2680653125,18.7277484375,14.8320353125,18.2917484375,14.8320353125,17.7536584375C14.8320353125,17.215818437499998,15.2680653125,16.779788437500002,15.8056653125,16.779788437500002C15.8056653125,16.779788437500002,26.1938953125,16.779788437500002,26.1938953125,16.779788437500002C26.7318953125,16.779788437500002,27.1679953125,17.215818437499998,27.1679953125,17.7536584375C27.1679953125,18.2917484375,26.7318953125,18.7277484375,26.1938953125,18.7277484375C26.1938953125,18.7277484375,15.8056653125,18.7277484375,15.8056653125,18.7277484375C15.8056653125,18.7277484375,15.8056653125,18.7277484375,15.8056653125,18.7277484375ZM15.8056653125,23.9218484375C15.2680653125,23.9218484375,14.8320353125,23.4858484375,14.8320353125,22.9477484375C14.8320353125,22.4096484375,15.2680653125,21.9738484375,15.8056653125,21.9738484375C15.8056653125,21.9738484375,22.298795312499998,21.9738484375,22.298795312499998,21.9738484375C22.8358953125,21.9738484375,23.2729953125,22.4096484375,23.2729953125,22.9477484375C23.2729953125,23.4858484375,22.8358953125,23.9218484375,22.298795312499998,23.9218484375C22.298795312499998,23.9218484375,15.8056653125,23.9218484375,15.8056653125,23.9218484375C15.8056653125,23.9218484375,15.8056653125,23.9218484375,15.8056653125,23.9218484375Z" fill="#85F5FF" fill-opacity="1"/></g></g></svg>
|
||||||
|
After Width: | Height: | Size: 3.2 KiB |
1
assets/img/icon/plus.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="47.754638671875" height="47.7548828125" viewBox="0 0 47.754638671875 47.7548828125"><g><g><g></g></g><g><line x1="8.374755859375" y1="23.876953125" x2="39.380149841308594" y2="23.876953125" fill-opacity="0" stroke-opacity="1" stroke="#85F5FF" fill="none" stroke-width="2" stroke-linecap="ROUND" stroke-linejoin="round"/></g><g transform="matrix(0,1,-1,0,31.25146484375,-14.50341796875)"><line x1="22.87744140625" y1="7.3740234375" x2="53.882835388183594" y2="7.3740234375" fill-opacity="0" stroke-opacity="1" stroke="#85F5FF" fill="none" stroke-width="2" stroke-linecap="ROUND" stroke-linejoin="round"/></g></g></svg>
|
||||||
|
After Width: | Height: | Size: 733 B |
1
assets/img/icon/repair.svg
Normal file
|
After Width: | Height: | Size: 6.1 KiB |
1
assets/img/icon/store.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="42" height="42" viewBox="0 0 42 42"><g><g></g><g><ellipse cx="20.475335121154785" cy="21.977776527404785" rx="10.481682777404785" ry="10.481682777404785" fill-opacity="0" stroke-opacity="1" stroke="#85F5FF" fill="none" stroke-width="2" stroke-linecap="ROUND" stroke-linejoin="round"/></g><g><path d="M20.12353515625,23.907228515625L26.36328515625,23.907228515625L26.36328515625,21.907228515625L21.12353515625,21.907228515625L21.12353515625,15.615478515625L19.12353515625,15.615478515625L19.12353515625,22.907228515625Q19.12353515625,23.005718515625,19.14275015625,23.102318515625Q19.161965156249998,23.198918515625,19.19965615625,23.289908515625Q19.23734715625,23.380898515625,19.29206515625,23.462798515625Q19.34678415625,23.544688515625,19.41642815625,23.614328515625Q19.48607215625,23.683978515625,19.56796515625,23.738698515625Q19.64985715625,23.793418515625,19.74085215625,23.831108515625Q19.83184615625,23.868798515625002,19.92844515625,23.888008515625Q20.02504375625,23.907228515625,20.12353515625,23.907228515625Z" fill-rule="evenodd" fill="#85F5FF" fill-opacity="1"/></g><g><g><g transform="matrix(-0.7071067690849304,0.7071067690849304,-0.7071067690849304,-0.7071067690849304,26.970626847512904,3.312287259599543)"><line x1="12.79931640625" y1="6.241943359375" x2="19.737801551818848" y2="6.241943359375" fill-opacity="0" stroke-opacity="1" stroke="#85F5FF" fill="none" stroke-width="2" stroke-linecap="ROUND" stroke-linejoin="round"/></g><g transform="matrix(0.7071067690849304,0.7071067690849304,-0.7071067690849304,0.7071067690849304,13.951752878012485,-16.37049834166828)"><line x1="26.73681640625" y1="7.656005859375" x2="33.67530155181885" y2="7.656005859375" fill-opacity="0" stroke-opacity="1" stroke="#85F5FF" fill="none" stroke-width="2" stroke-linecap="ROUND" stroke-linejoin="round"/></g></g></g></g></svg>
|
||||||
|
After Width: | Height: | Size: 1.9 KiB |
@@ -11,9 +11,13 @@ class CommonVariables {
|
|||||||
static String enterpriseName = "合肥眠花糖家具有限责任公司";
|
static String enterpriseName = "合肥眠花糖家具有限责任公司";
|
||||||
//备案时间
|
//备案时间
|
||||||
static String ICPTime = "2022-2025";
|
static String ICPTime = "2022-2025";
|
||||||
|
static String shoph5Url = "https://zhmht.swes.com.cn:1443";
|
||||||
|
|
||||||
static Map<String, Function(dynamic)> callMap = {};
|
static Map<String, Function(dynamic)> callMap = {};
|
||||||
|
|
||||||
static const String weather_apiKey =
|
static const String weather_apiKey =
|
||||||
'40e23445cf0a29561af2b5b7d506a38b'; // 替换为你的 API 密钥
|
'40e23445cf0a29561af2b5b7d506a38b'; // 替换为你的 API 密钥
|
||||||
|
static String shareText = "您的朋友邀请您使用《智慧眠花糖》APP,请复制后面链接在浏览器中打开! " +
|
||||||
|
shoph5Url +
|
||||||
|
"/#/pages/download/download";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,14 @@
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
|
import 'package:EasyDartModule/EasyDartModule.dart';
|
||||||
import 'package:ef/ef.dart';
|
import 'package:ef/ef.dart';
|
||||||
|
import 'package:vbvs_app/common/color/ServiceConstant.dart';
|
||||||
|
import 'package:vbvs_app/common/color/app_uri_status.dart';
|
||||||
|
import 'package:vbvs_app/common/util/DailyLogUtils.dart';
|
||||||
|
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||||
|
import 'package:vbvs_app/common/util/requestWithLog.dart';
|
||||||
|
import 'package:vbvs_app/component/tool/TopSlideNotification.dart';
|
||||||
|
import 'package:vbvs_app/model/api_response.dart';
|
||||||
|
|
||||||
class BookInfoModel {
|
class BookInfoModel {
|
||||||
// DateTime? dateTime; //预约时间
|
// DateTime? dateTime; //预约时间
|
||||||
@@ -16,6 +23,14 @@ class BookInfoModel {
|
|||||||
Map dataT = {};
|
Map dataT = {};
|
||||||
|
|
||||||
BookInfoModel();
|
BookInfoModel();
|
||||||
|
BookInfoModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
// dateTime = json['dateTime'];
|
||||||
|
userName = json['userName'];
|
||||||
|
userPhone = json['userPhone'];
|
||||||
|
time_period = json['time_period'];
|
||||||
|
// select_time = json['select_time'];
|
||||||
|
select_time_index = json['select_time_index'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class BookInfoController extends GetControllerEx<BookInfoModel> {
|
class BookInfoController extends GetControllerEx<BookInfoModel> {
|
||||||
@@ -25,13 +40,44 @@ class BookInfoController extends GetControllerEx<BookInfoModel> {
|
|||||||
|
|
||||||
// get userInfoController => Get.find<UserInfoController>();
|
// get userInfoController => Get.find<UserInfoController>();
|
||||||
|
|
||||||
|
Future<void> getData(String storeId) async {
|
||||||
|
// 初始化模型
|
||||||
|
model.datetimes = [];
|
||||||
|
model.datetimes_index = null;
|
||||||
|
model.dataT = {};
|
||||||
|
updateAll();
|
||||||
|
|
||||||
|
String url =
|
||||||
|
"https://crm-api.swes.com.cn/agent/userBook/config/detailConfigByStore?storeId=$storeId";
|
||||||
|
|
||||||
|
await requestWithLog(
|
||||||
|
logTitle: "获取预约门店时间",
|
||||||
|
method: MyHttpMethod.get,
|
||||||
|
queryUrl: url,
|
||||||
|
successMsg: "获取预约门店时间成功",
|
||||||
|
errorMsg: "获取预约门店时间失败",
|
||||||
|
onSuccess: (res) {
|
||||||
|
final data = res.data;
|
||||||
|
if (data != null) {
|
||||||
|
model.datetimes = data["dateList"] ?? [];
|
||||||
|
model.datetimes_index = 0;
|
||||||
|
model.dataT = data;
|
||||||
|
time_periodChange(); // 原来的 time_periodChange
|
||||||
|
updateAll();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onFailure: (res) {},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// getData(id) {
|
// getData(id) {
|
||||||
// model.datetimes = [];
|
// model.datetimes = [];
|
||||||
// model.datetimes_index = null;
|
// model.datetimes_index = null;
|
||||||
// model.dataT = {};
|
// model.dataT = {};
|
||||||
// updateAll();
|
// updateAll();
|
||||||
// ApiService.reservation.get("/agent/userBook/config/detailConfigByStore?storeId=$id")
|
// ApiService.reservation
|
||||||
// .then((d) {
|
// .get("/agent/userBook/config/detailConfigByStore?storeId=$id")
|
||||||
|
// .then((d) {
|
||||||
// model.datetimes = d.data["dateList"];
|
// model.datetimes = d.data["dateList"];
|
||||||
// model.datetimes_index = 0;
|
// model.datetimes_index = 0;
|
||||||
// model.dataT = d.data;
|
// model.dataT = d.data;
|
||||||
@@ -39,14 +85,15 @@ class BookInfoController extends GetControllerEx<BookInfoModel> {
|
|||||||
// });
|
// });
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// time_periodChange() {
|
time_periodChange() {
|
||||||
// if(model.datetimes_index == null) {
|
if (model.datetimes_index == null) {
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
// model.select_time_index = null;
|
model.select_time_index = null;
|
||||||
// model.time_period = model.dataT[model.datetimes?[model.datetimes_index!]["day"]];
|
model.time_period =
|
||||||
// updateAll();
|
model.dataT[model.datetimes?[model.datetimes_index!]["day"]];
|
||||||
// }
|
updateAll();
|
||||||
|
}
|
||||||
|
|
||||||
// submitData(id) {
|
// submitData(id) {
|
||||||
// String tel = userInfoController.model?.user?.tel ?? "";
|
// String tel = userInfoController.model?.user?.tel ?? "";
|
||||||
|
|||||||
22
lib/controller/mh_controller/device.dart
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
import 'package:json_annotation/json_annotation.dart';
|
||||||
|
|
||||||
|
import 'device_share.dart';
|
||||||
|
|
||||||
|
part 'device.g.dart';
|
||||||
|
|
||||||
|
@JsonSerializable()
|
||||||
|
class DeviceModel {
|
||||||
|
String? name; //设备名称
|
||||||
|
String? id; //设备id
|
||||||
|
String? status; //设备状态
|
||||||
|
String? roomName; //设备所属房间
|
||||||
|
String? shareNum; //设备已分享数量
|
||||||
|
|
||||||
|
@JsonKey(ignore: true)
|
||||||
|
List<DeviceShareModel> shareInfo = []; //设备分享信息
|
||||||
|
|
||||||
|
DeviceModel();
|
||||||
|
static DeviceModel fromJson(Map<String, dynamic> json) =>
|
||||||
|
_$DeviceModelFromJson(json);
|
||||||
|
Map<String, dynamic> toJson() => _$DeviceModelToJson(this);
|
||||||
|
}
|
||||||
23
lib/controller/mh_controller/device.g.dart
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'device.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// JsonSerializableGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
DeviceModel _$DeviceModelFromJson(Map<String, dynamic> json) => DeviceModel()
|
||||||
|
..name = json['name'] as String?
|
||||||
|
..id = json['id'] as String?
|
||||||
|
..status = json['status'] as String?
|
||||||
|
..roomName = json['roomName'] as String?
|
||||||
|
..shareNum = json['shareNum'] as String?;
|
||||||
|
|
||||||
|
Map<String, dynamic> _$DeviceModelToJson(DeviceModel instance) =>
|
||||||
|
<String, dynamic>{
|
||||||
|
'name': instance.name,
|
||||||
|
'id': instance.id,
|
||||||
|
'status': instance.status,
|
||||||
|
'roomName': instance.roomName,
|
||||||
|
'shareNum': instance.shareNum,
|
||||||
|
};
|
||||||
100
lib/controller/mh_controller/device_list_controller.dart
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
import 'dart:convert';
|
||||||
|
import 'dart:ui';
|
||||||
|
|
||||||
|
import 'package:EasyDartModule/EasyDartModule.dart';
|
||||||
|
import 'package:ef/ef.dart';
|
||||||
|
import 'package:json_annotation/json_annotation.dart';
|
||||||
|
import 'package:vbvs_app/common/color/ServiceConstant.dart';
|
||||||
|
import 'package:vbvs_app/common/color/app_uri_status.dart';
|
||||||
|
import 'package:vbvs_app/common/util/DailyLogUtils.dart';
|
||||||
|
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||||
|
|
||||||
|
import 'package:vbvs_app/controller/mh_controller/device.dart';
|
||||||
|
import 'package:vbvs_app/model/api_response.dart';
|
||||||
|
|
||||||
|
part 'device_list_controller.g.dart';
|
||||||
|
|
||||||
|
@JsonSerializable()
|
||||||
|
class DeviceListModel {
|
||||||
|
//设备列表
|
||||||
|
List<dynamic> deviceList = [];
|
||||||
|
List<dynamic> deviceListWyf = [];
|
||||||
|
|
||||||
|
@JsonKey(ignore: true)
|
||||||
|
String? keyword;
|
||||||
|
@JsonKey(ignore: true)
|
||||||
|
Color? color = Color(0xFFFFFFFF);
|
||||||
|
|
||||||
|
DeviceListModel();
|
||||||
|
static DeviceListModel fromJson(Map<String, dynamic> json) =>
|
||||||
|
_$DeviceListModelFromJson(json);
|
||||||
|
Map<String, dynamic> toJson() => _$DeviceListModelToJson(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
class DeviceListController extends GetControllerEx<DeviceListModel> {
|
||||||
|
DeviceListController() {
|
||||||
|
attr = GetModel(DeviceListModel()).obs;
|
||||||
|
}
|
||||||
|
|
||||||
|
// @override
|
||||||
|
// void onInit() {
|
||||||
|
// super.onInit();
|
||||||
|
// model.keyword = "";
|
||||||
|
// getDeviceList(); // 正确的初始化数据调用
|
||||||
|
// }
|
||||||
|
|
||||||
|
// getDeviceList({int time = 1}) async {
|
||||||
|
// String search = (model.keyword != null && model.keyword!.isNotEmpty)
|
||||||
|
// ? "?key=${model.keyword}"
|
||||||
|
// : "";
|
||||||
|
// var data = await ApiService.request.get("/api/device/info/list$search");
|
||||||
|
// if (data.data["data"] != null) {
|
||||||
|
// try {
|
||||||
|
// List<dynamic> tmp = data.data["data"] as List<dynamic>;
|
||||||
|
// model.deviceList = tmp.map((obj) => DeviceModel.fromJson(obj)).toList();
|
||||||
|
// model.deviceListWyf = tmp;
|
||||||
|
// } catch (e) {
|
||||||
|
// print(e);
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// model.deviceList = [];
|
||||||
|
// model.deviceListWyf = [];
|
||||||
|
// }
|
||||||
|
// updateAll();
|
||||||
|
// }
|
||||||
|
|
||||||
|
getDeviceList() async {
|
||||||
|
try {
|
||||||
|
String search = (model.keyword != null && model.keyword!.isNotEmpty)
|
||||||
|
? "?key=${model.keyword}"
|
||||||
|
: "";
|
||||||
|
ApiResponse apiResponse = ApiResponse(code: -1, msg: "设备.设备列表请求失败".tr);
|
||||||
|
String serviceAddress = ServiceConstant.service_address;
|
||||||
|
String serviceName = ServiceConstant.server_service;
|
||||||
|
String serviceApi = ServiceConstant.device_list;
|
||||||
|
String queryUrl = "${serviceAddress}${serviceName}${serviceApi}$search";
|
||||||
|
var response = await EasyDartModule.dio.get(queryUrl);
|
||||||
|
if (response != null) {
|
||||||
|
var responseData =
|
||||||
|
response.data is String ? jsonDecode(response.data) : response.data;
|
||||||
|
ApiResponse res =
|
||||||
|
ApiResponse.fromJson(responseData, (object) => object);
|
||||||
|
MyUtils.formatResponse(res, "设备.设备列表请求成功".tr, "设备.设备列表请求失败".tr);
|
||||||
|
if (res.code == HttpStatusCodes.ok) {
|
||||||
|
// bindDeviceNum.value = res.total!;
|
||||||
|
model.deviceList =res.data;
|
||||||
|
|
||||||
|
updateAll();
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
||||||
|
}
|
||||||
|
return apiResponse;
|
||||||
|
} catch (e) {
|
||||||
|
EasyDartModule.logger.info("设备请求列表: $e");
|
||||||
|
DailyLogUtils.writeLog("设备请求列表: $e");
|
||||||
|
}
|
||||||
|
return ApiResponse(code: -1, msg: "未知错误".tr); // Default return statement
|
||||||
|
}
|
||||||
|
}
|
||||||
20
lib/controller/mh_controller/device_list_controller.g.dart
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'device_list_controller.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// JsonSerializableGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
DeviceListModel _$DeviceListModelFromJson(Map<String, dynamic> json) =>
|
||||||
|
DeviceListModel()
|
||||||
|
..deviceList = (json['deviceList'] as List<dynamic>)
|
||||||
|
.map((e) => DeviceModel.fromJson(e as Map<String, dynamic>))
|
||||||
|
.toList()
|
||||||
|
..deviceListWyf = json['deviceListWyf'] as List<dynamic>;
|
||||||
|
|
||||||
|
Map<String, dynamic> _$DeviceListModelToJson(DeviceListModel instance) =>
|
||||||
|
<String, dynamic>{
|
||||||
|
'deviceList': instance.deviceList,
|
||||||
|
'deviceListWyf': instance.deviceListWyf,
|
||||||
|
};
|
||||||
15
lib/controller/mh_controller/device_share.dart
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
import 'package:json_annotation/json_annotation.dart';
|
||||||
|
|
||||||
|
part 'device_share.g.dart';
|
||||||
|
|
||||||
|
@JsonSerializable()
|
||||||
|
class DeviceShareModel {
|
||||||
|
String? name; //设备名称
|
||||||
|
String? phone; //被分享手机号
|
||||||
|
DateTime? share_time; //分享时间
|
||||||
|
|
||||||
|
DeviceShareModel();
|
||||||
|
static DeviceShareModel fromJson(Map<String, dynamic> json) =>
|
||||||
|
_$DeviceShareModelFromJson(json);
|
||||||
|
Map<String, dynamic> toJson() => _$DeviceShareModelToJson(this);
|
||||||
|
}
|
||||||
22
lib/controller/mh_controller/device_share.g.dart
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'device_share.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// JsonSerializableGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
DeviceShareModel _$DeviceShareModelFromJson(Map<String, dynamic> json) =>
|
||||||
|
DeviceShareModel()
|
||||||
|
..name = json['name'] as String?
|
||||||
|
..phone = json['phone'] as String?
|
||||||
|
..share_time = json['share_time'] == null
|
||||||
|
? null
|
||||||
|
: DateTime.parse(json['share_time'] as String);
|
||||||
|
|
||||||
|
Map<String, dynamic> _$DeviceShareModelToJson(DeviceShareModel instance) =>
|
||||||
|
<String, dynamic>{
|
||||||
|
'name': instance.name,
|
||||||
|
'phone': instance.phone,
|
||||||
|
'share_time': instance.share_time?.toIso8601String(),
|
||||||
|
};
|
||||||
122
lib/controller/mh_controller/mhdevice_share_controller.dart
Normal file
@@ -0,0 +1,122 @@
|
|||||||
|
import 'package:dio/dio.dart';
|
||||||
|
import 'package:dio/src/form_data.dart' as formdata;
|
||||||
|
import 'package:ef/ef.dart';
|
||||||
|
import 'package:json_annotation/json_annotation.dart';
|
||||||
|
import 'package:vbvs_app/common/color/appConstants.dart';
|
||||||
|
|
||||||
|
part 'mhdevice_share_controller.g.dart';
|
||||||
|
|
||||||
|
@JsonSerializable()
|
||||||
|
class MHDeviceShareModel {
|
||||||
|
String? phone;
|
||||||
|
int? type = 1;
|
||||||
|
|
||||||
|
String? msg;
|
||||||
|
int? show = 0;
|
||||||
|
|
||||||
|
int limit = AppConstants.limit;
|
||||||
|
int offset = 0;
|
||||||
|
bool isLoading = false;
|
||||||
|
bool hasMore = true;
|
||||||
|
|
||||||
|
// List<dynamic>? shareUser = [
|
||||||
|
// {"type": 1},
|
||||||
|
// {"type": 2}
|
||||||
|
// ];
|
||||||
|
List<dynamic>? shareUser = [];
|
||||||
|
Map mainShare = {};
|
||||||
|
|
||||||
|
MHDeviceShareModel();
|
||||||
|
static MHDeviceShareModel fromJson(Map<String, dynamic> json) =>
|
||||||
|
_$MHDeviceShareModelFromJson(json);
|
||||||
|
Map<String, dynamic> toJson() => _$MHDeviceShareModelToJson(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
class MHDeviceShareController extends GetControllerEx<MHDeviceShareModel> {
|
||||||
|
MHDeviceShareController() {
|
||||||
|
attr = GetModel(MHDeviceShareModel()).obs;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onInit() {
|
||||||
|
super.onInit();
|
||||||
|
model.shareUser = [
|
||||||
|
{
|
||||||
|
'userName': '张三',
|
||||||
|
'opType': 1, // 允许控制
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'userName': '李四',
|
||||||
|
'opType': 2, // 仅查看
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'userName': '王五',
|
||||||
|
'opType': 1,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
update(); // 刷新UI
|
||||||
|
}
|
||||||
|
|
||||||
|
// Future<String> sendInvite(String? phone, String mac) async {
|
||||||
|
// if (phone == null || phone.isEmpty) {
|
||||||
|
// return "手机号不能为空";
|
||||||
|
// }
|
||||||
|
// if (!MyUtils.isValidPhoneNumber(phone)) {
|
||||||
|
// return "手机号格式不正确";
|
||||||
|
// }
|
||||||
|
// var type = model.type;
|
||||||
|
// try {
|
||||||
|
// var aa = await ApiService.requestNoInfo.post("/api/device/info/share",
|
||||||
|
// data: formdata.FormData.fromMap(
|
||||||
|
// {"mac": mac, "tel": phone, "type": type}));
|
||||||
|
// return "";
|
||||||
|
// } catch (e) {
|
||||||
|
// if (e is DioError) {
|
||||||
|
// // 返回 DioError 的 message 属性
|
||||||
|
// return e.message!;
|
||||||
|
// } else {
|
||||||
|
// // 处理其他类型的错误
|
||||||
|
// return e.toString();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// Future<void> initData() async {
|
||||||
|
// //todo 请求分享列表
|
||||||
|
// var deviceController = Get.find<GlobalController>();
|
||||||
|
// var query = {
|
||||||
|
// "mac": deviceController.model.deviceMain['mac'],
|
||||||
|
// };
|
||||||
|
// var data = await ApiService.request
|
||||||
|
// .get("/api/device/info/share", data: formdata.FormData.fromMap(query));
|
||||||
|
|
||||||
|
// if (data.data["data"] != null) {
|
||||||
|
// try {
|
||||||
|
// List<dynamic> tmp = data.data["data"] as List<dynamic>;
|
||||||
|
// model.shareUser = tmp;
|
||||||
|
// } catch (e) {
|
||||||
|
// print(e);
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// model.shareUser = [];
|
||||||
|
// }
|
||||||
|
// updateAll();
|
||||||
|
// }
|
||||||
|
|
||||||
|
// //保存
|
||||||
|
// saveShareDevice(Map shareInfo, RxInt type) async {
|
||||||
|
// return await ApiService.request.put("/api/device/info/share",
|
||||||
|
// data: formdata.FormData.fromMap({
|
||||||
|
// "mac": shareInfo['mac'],
|
||||||
|
// "tel": shareInfo['tel'],
|
||||||
|
// "type": type.value
|
||||||
|
// }));
|
||||||
|
// }
|
||||||
|
|
||||||
|
// //删除
|
||||||
|
// deleteShare(Map shareInfo) async {
|
||||||
|
// return await ApiService.request.delete("/api/device/info/share",
|
||||||
|
// data: formdata.FormData.fromMap(
|
||||||
|
// {"mac": shareInfo['mac'], "tel": shareInfo['tel']}));
|
||||||
|
// }
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'mhdevice_share_controller.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// JsonSerializableGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
MHDeviceShareModel _$MHDeviceShareModelFromJson(Map<String, dynamic> json) =>
|
||||||
|
MHDeviceShareModel()
|
||||||
|
..phone = json['phone'] as String?
|
||||||
|
..type = (json['type'] as num?)?.toInt()
|
||||||
|
..msg = json['msg'] as String?
|
||||||
|
..show = (json['show'] as num?)?.toInt()
|
||||||
|
..limit = (json['limit'] as num).toInt()
|
||||||
|
..offset = (json['offset'] as num).toInt()
|
||||||
|
..isLoading = json['isLoading'] as bool
|
||||||
|
..hasMore = json['hasMore'] as bool
|
||||||
|
..shareUser = json['shareUser'] as List<dynamic>?
|
||||||
|
..mainShare = json['mainShare'] as Map<String, dynamic>;
|
||||||
|
|
||||||
|
Map<String, dynamic> _$MHDeviceShareModelToJson(MHDeviceShareModel instance) =>
|
||||||
|
<String, dynamic>{
|
||||||
|
'phone': instance.phone,
|
||||||
|
'type': instance.type,
|
||||||
|
'msg': instance.msg,
|
||||||
|
'show': instance.show,
|
||||||
|
'limit': instance.limit,
|
||||||
|
'offset': instance.offset,
|
||||||
|
'isLoading': instance.isLoading,
|
||||||
|
'hasMore': instance.hasMore,
|
||||||
|
'shareUser': instance.shareUser,
|
||||||
|
'mainShare': instance.mainShare,
|
||||||
|
};
|
||||||
@@ -36,12 +36,14 @@ import 'package:vbvs_app/controller/message/message_setting_controller.dart';
|
|||||||
import 'package:vbvs_app/controller/mh_controller/address_controller.dart';
|
import 'package:vbvs_app/controller/mh_controller/address_controller.dart';
|
||||||
import 'package:vbvs_app/controller/mh_controller/address_list_controller.dart';
|
import 'package:vbvs_app/controller/mh_controller/address_list_controller.dart';
|
||||||
import 'package:vbvs_app/controller/mh_controller/book_info_controller.dart';
|
import 'package:vbvs_app/controller/mh_controller/book_info_controller.dart';
|
||||||
|
import 'package:vbvs_app/controller/mh_controller/device_list_controller.dart';
|
||||||
import 'package:vbvs_app/controller/mh_controller/experience_store_list_page.dart';
|
import 'package:vbvs_app/controller/mh_controller/experience_store_list_page.dart';
|
||||||
import 'package:vbvs_app/controller/mh_controller/find_password_controller.dart';
|
import 'package:vbvs_app/controller/mh_controller/find_password_controller.dart';
|
||||||
import 'package:vbvs_app/controller/mh_controller/issue_controller.dart';
|
import 'package:vbvs_app/controller/mh_controller/issue_controller.dart';
|
||||||
import 'package:vbvs_app/controller/mh_controller/issue_preview_controller.dart';
|
import 'package:vbvs_app/controller/mh_controller/issue_preview_controller.dart';
|
||||||
import 'package:vbvs_app/controller/mh_controller/message_controller.dart';
|
import 'package:vbvs_app/controller/mh_controller/message_controller.dart';
|
||||||
import 'package:vbvs_app/controller/mh_controller/mh_language_controller.dart';
|
import 'package:vbvs_app/controller/mh_controller/mh_language_controller.dart';
|
||||||
|
import 'package:vbvs_app/controller/mh_controller/mhdevice_share_controller.dart';
|
||||||
import 'package:vbvs_app/controller/mh_controller/my_experience_list_controller.dart';
|
import 'package:vbvs_app/controller/mh_controller/my_experience_list_controller.dart';
|
||||||
import 'package:vbvs_app/controller/mh_controller/people_info_controller.dart';
|
import 'package:vbvs_app/controller/mh_controller/people_info_controller.dart';
|
||||||
import 'package:vbvs_app/controller/mh_controller/register_controller.dart';
|
import 'package:vbvs_app/controller/mh_controller/register_controller.dart';
|
||||||
@@ -79,7 +81,7 @@ Future<void> main() async {
|
|||||||
// final selectapp = "th";
|
// final selectapp = "th";
|
||||||
final selectapp = "mht";
|
final selectapp = "mht";
|
||||||
// await AppLanguage().loadLanguage("en_US");
|
// await AppLanguage().loadLanguage("en_US");
|
||||||
await AppLanguage().loadLanguage("zh_CN",project: selectapp);
|
await AppLanguage().loadLanguage("zh_CN", project: selectapp);
|
||||||
await initLanguageSetting();
|
await initLanguageSetting();
|
||||||
WidgetsFlutterBinding.ensureInitialized();
|
WidgetsFlutterBinding.ensureInitialized();
|
||||||
|
|
||||||
@@ -274,6 +276,7 @@ Future<void> dealBindProcess() async {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final GlobalKey<NavigatorState> navigatorKey = GlobalKey<NavigatorState>();
|
final GlobalKey<NavigatorState> navigatorKey = GlobalKey<NavigatorState>();
|
||||||
|
|
||||||
class MyApp extends StatelessWidget {
|
class MyApp extends StatelessWidget {
|
||||||
MyApp({super.key});
|
MyApp({super.key});
|
||||||
final ThemeController themeController = Get.put(ThemeController());
|
final ThemeController themeController = Get.put(ThemeController());
|
||||||
@@ -320,6 +323,7 @@ class MyApp extends StatelessWidget {
|
|||||||
Get.lazyPut(() => DeviceTypeController()),
|
Get.lazyPut(() => DeviceTypeController()),
|
||||||
Get.lazyPut(() => BodyDeviceController()),
|
Get.lazyPut(() => BodyDeviceController()),
|
||||||
Get.lazyPut(() => HomeController()),
|
Get.lazyPut(() => HomeController()),
|
||||||
|
Get.lazyPut(() => MHDeviceShareController()),
|
||||||
Get.lazyPut(() => DeviceShareController()),
|
Get.lazyPut(() => DeviceShareController()),
|
||||||
Get.lazyPut(() => DeviceShareListController()),
|
Get.lazyPut(() => DeviceShareListController()),
|
||||||
Get.lazyPut(() => DeviceCalibrationController()),
|
Get.lazyPut(() => DeviceCalibrationController()),
|
||||||
@@ -329,6 +333,7 @@ class MyApp extends StatelessWidget {
|
|||||||
Get.lazyPut(() => WeatherModelController()),
|
Get.lazyPut(() => WeatherModelController()),
|
||||||
Get.lazyPut(() => RegisterController()),
|
Get.lazyPut(() => RegisterController()),
|
||||||
Get.lazyPut(() => UpdatePasswordController()),
|
Get.lazyPut(() => UpdatePasswordController()),
|
||||||
|
Get.lazyPut(() => DeviceListController()),
|
||||||
]));
|
]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -532,15 +532,156 @@ Future<void> showHeightPickerDialog(
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future showDayTimeSelectionDialog(BuildContext context,
|
// Future showDayTimeSelectionDialog(BuildContext context,
|
||||||
{required List<int> dayTimeArr, Function? checkChange, String title = ""}) {
|
// {required List<int> dayTimeArr, Function? checkChange, String title = ""}) {
|
||||||
|
// ThemeController themeController = Get.find();
|
||||||
|
|
||||||
|
// final hours = List.generate(24, (i) => i);
|
||||||
|
// final minutes = List.generate(60, (i) => i);
|
||||||
|
|
||||||
|
// final RxInt hoursIndex = RxInt(hours.indexOf(dayTimeArr[0]));
|
||||||
|
// final RxInt minutesIndex = RxInt(minutes.indexOf(dayTimeArr[1]));
|
||||||
|
|
||||||
|
// return showDialog(
|
||||||
|
// context: context,
|
||||||
|
// barrierDismissible: true,
|
||||||
|
// builder: (BuildContext context) {
|
||||||
|
// return Stack(
|
||||||
|
// children: [
|
||||||
|
// Positioned(
|
||||||
|
// bottom: 0,
|
||||||
|
// left: 0,
|
||||||
|
// right: 0,
|
||||||
|
// child: Material(
|
||||||
|
// color: Colors.transparent,
|
||||||
|
// child: Dialog(
|
||||||
|
// backgroundColor: stringToColor("#182B7C"),
|
||||||
|
// insetPadding: EdgeInsets.zero,
|
||||||
|
// shape: RoundedRectangleBorder(
|
||||||
|
// borderRadius: BorderRadius.circular(0),
|
||||||
|
// ),
|
||||||
|
// child: Container(
|
||||||
|
// width: double.infinity,
|
||||||
|
// padding: EdgeInsets.fromLTRB(30.rpx, 10.rpx, 30.rpx, 90.rpx),
|
||||||
|
// child: Column(
|
||||||
|
// mainAxisSize: MainAxisSize.min,
|
||||||
|
// crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
// children: <Widget>[
|
||||||
|
// Row(
|
||||||
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
// children: [
|
||||||
|
// Text(
|
||||||
|
// title,
|
||||||
|
// style: FlutterFlowTheme.of(context)
|
||||||
|
// .bodyMedium
|
||||||
|
// .override(
|
||||||
|
// fontFamily: 'Readex Pro',
|
||||||
|
// color: themeController.currentColor.sc3,
|
||||||
|
// fontSize: 30.rpx,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// closeIconWhite,
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// Container(
|
||||||
|
// height: 240.rpx,
|
||||||
|
// margin: EdgeInsets.only(top: 60.rpx, bottom: 60.rpx),
|
||||||
|
// padding: EdgeInsets.only(left: 30.rpx, right: 30.rpx),
|
||||||
|
// child: Row(
|
||||||
|
// children: [
|
||||||
|
// Expanded(
|
||||||
|
// child: Padding(
|
||||||
|
// padding:
|
||||||
|
// EdgeInsets.symmetric(horizontal: 10.rpx),
|
||||||
|
// child: getOnePickers(context, hours, hoursIndex,
|
||||||
|
// unit: ''),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// Text(
|
||||||
|
// "时",
|
||||||
|
// style: FlutterFlowTheme.of(context)
|
||||||
|
// .bodyMedium
|
||||||
|
// .override(
|
||||||
|
// fontFamily: 'Readex Pro',
|
||||||
|
// color: themeController.currentColor.sc3,
|
||||||
|
// fontSize: 30.rpx,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// Expanded(
|
||||||
|
// child: Padding(
|
||||||
|
// padding:
|
||||||
|
// EdgeInsets.symmetric(horizontal: 10.rpx),
|
||||||
|
// child: getOnePickers(
|
||||||
|
// context, minutes, minutesIndex,
|
||||||
|
// unit: ''),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// Text(
|
||||||
|
// "分",
|
||||||
|
// style: FlutterFlowTheme.of(context)
|
||||||
|
// .bodyMedium
|
||||||
|
// .override(
|
||||||
|
// fontFamily: 'Readex Pro',
|
||||||
|
// color: themeController.currentColor.sc3,
|
||||||
|
// fontSize: 30.rpx,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// InkWell(
|
||||||
|
// onTap: () {
|
||||||
|
// checkChange?.call([
|
||||||
|
// hours[hoursIndex.value],
|
||||||
|
// minutes[minutesIndex.value]
|
||||||
|
// ]);
|
||||||
|
// Get.back();
|
||||||
|
// },
|
||||||
|
// child: Container(
|
||||||
|
// height: 68.rpx,
|
||||||
|
// alignment: Alignment.center,
|
||||||
|
// decoration: BoxDecoration(
|
||||||
|
// color: stringToColor("#D3B684"),
|
||||||
|
// borderRadius: BorderRadius.circular(10.rpx),
|
||||||
|
// ),
|
||||||
|
// child: Text(
|
||||||
|
// "确定",
|
||||||
|
// style: FlutterFlowTheme.of(context)
|
||||||
|
// .bodyMedium
|
||||||
|
// .override(
|
||||||
|
// fontFamily: 'Readex Pro',
|
||||||
|
// color: themeController.currentColor.sc3,
|
||||||
|
// fontSize: 30.rpx,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// )
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// );
|
||||||
|
// },
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
|
||||||
|
Future showDayTimeSelectionDialog(
|
||||||
|
BuildContext context, {
|
||||||
|
required List<int> dayTimeArr,
|
||||||
|
Function(List<int>)? checkChange,
|
||||||
|
String title = "选择时间",
|
||||||
|
}) {
|
||||||
ThemeController themeController = Get.find();
|
ThemeController themeController = Get.find();
|
||||||
|
Color checkColor = stringToColor("#D3B684");
|
||||||
|
|
||||||
final hours = List.generate(24, (i) => i);
|
final List<int> hours = List.generate(24, (i) => i);
|
||||||
final minutes = List.generate(60, (i) => i);
|
final List<int> minutes = List.generate(60, (i) => i);
|
||||||
|
|
||||||
final RxInt hoursIndex = RxInt(hours.indexOf(dayTimeArr[0]));
|
final RxInt hoursIndex = hours.indexOf(dayTimeArr[0]).obs;
|
||||||
final RxInt minutesIndex = RxInt(minutes.indexOf(dayTimeArr[1]));
|
final RxInt minutesIndex = minutes.indexOf(dayTimeArr[1]).obs;
|
||||||
|
|
||||||
return showDialog(
|
return showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
@@ -555,7 +696,7 @@ Future showDayTimeSelectionDialog(BuildContext context,
|
|||||||
child: Material(
|
child: Material(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
child: Dialog(
|
child: Dialog(
|
||||||
backgroundColor: stringToColor("#182B7C"),
|
backgroundColor: const Color(0xFF003058),
|
||||||
insetPadding: EdgeInsets.zero,
|
insetPadding: EdgeInsets.zero,
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(0),
|
borderRadius: BorderRadius.circular(0),
|
||||||
@@ -567,9 +708,24 @@ Future showDayTimeSelectionDialog(BuildContext context,
|
|||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
|
// 顶部栏:取消 - 标题 - 确认
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
|
ClickableContainer(
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
highlightColor: Colors.transparent,
|
||||||
|
padding: EdgeInsets.zero,
|
||||||
|
onTap: () => Navigator.of(context).pop(),
|
||||||
|
child: Container(
|
||||||
|
width: 100.rpx,
|
||||||
|
height: 60.rpx,
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: Text("取消",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 30.rpx, color: Colors.white)),
|
||||||
|
),
|
||||||
|
),
|
||||||
Text(
|
Text(
|
||||||
title,
|
title,
|
||||||
style: FlutterFlowTheme.of(context)
|
style: FlutterFlowTheme.of(context)
|
||||||
@@ -580,82 +736,74 @@ Future showDayTimeSelectionDialog(BuildContext context,
|
|||||||
fontSize: 30.rpx,
|
fontSize: 30.rpx,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
closeIconWhite,
|
ClickableContainer(
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
highlightColor: Colors.transparent,
|
||||||
|
padding: EdgeInsets.zero,
|
||||||
|
onTap: () {
|
||||||
|
checkChange?.call([
|
||||||
|
hours[hoursIndex.value],
|
||||||
|
minutes[minutesIndex.value],
|
||||||
|
]);
|
||||||
|
Get.back();
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
width: 100.rpx,
|
||||||
|
height: 60.rpx,
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: Text("确认",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 30.rpx, color: Colors.white)),
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Container(
|
SizedBox(height: 20.rpx),
|
||||||
height: 240.rpx,
|
Stack(
|
||||||
margin: EdgeInsets.only(top: 60.rpx, bottom: 60.rpx),
|
children: [
|
||||||
padding: EdgeInsets.only(left: 30.rpx, right: 30.rpx),
|
Positioned.fill(
|
||||||
child: Row(
|
child: IgnorePointer(
|
||||||
children: [
|
child: Center(
|
||||||
Expanded(
|
child: Container(
|
||||||
child: Padding(
|
height: 90.rpx,
|
||||||
padding:
|
margin:
|
||||||
EdgeInsets.symmetric(horizontal: 10.rpx),
|
EdgeInsets.symmetric(horizontal: 95.rpx),
|
||||||
child: getOnePickers(context, hours, hoursIndex,
|
decoration: BoxDecoration(
|
||||||
unit: ''),
|
color: const Color(0xFF84F5FF),
|
||||||
),
|
borderRadius: BorderRadius.circular(16.rpx),
|
||||||
),
|
|
||||||
Text(
|
|
||||||
"时",
|
|
||||||
style: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: 'Readex Pro',
|
|
||||||
color: themeController.currentColor.sc3,
|
|
||||||
fontSize: 30.rpx,
|
|
||||||
),
|
),
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: Padding(
|
|
||||||
padding:
|
|
||||||
EdgeInsets.symmetric(horizontal: 10.rpx),
|
|
||||||
child: getOnePickers(
|
|
||||||
context, minutes, minutesIndex,
|
|
||||||
unit: ''),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
"分",
|
|
||||||
style: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: 'Readex Pro',
|
|
||||||
color: themeController.currentColor.sc3,
|
|
||||||
fontSize: 30.rpx,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
InkWell(
|
|
||||||
onTap: () {
|
|
||||||
checkChange?.call([
|
|
||||||
hours[hoursIndex.value],
|
|
||||||
minutes[minutesIndex.value]
|
|
||||||
]);
|
|
||||||
Get.back();
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
height: 68.rpx,
|
|
||||||
alignment: Alignment.center,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: stringToColor("#D3B684"),
|
|
||||||
borderRadius: BorderRadius.circular(10.rpx),
|
|
||||||
),
|
|
||||||
child: Text(
|
|
||||||
"确定",
|
|
||||||
style: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: 'Readex Pro',
|
|
||||||
color: themeController.currentColor.sc3,
|
|
||||||
fontSize: 30.rpx,
|
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
SizedBox(
|
||||||
)
|
height: 240.rpx,
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 95.rpx),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: getOnePickers(
|
||||||
|
context,
|
||||||
|
hours,
|
||||||
|
hoursIndex,
|
||||||
|
unit: "时",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: getOnePickers(
|
||||||
|
context,
|
||||||
|
minutes,
|
||||||
|
minutesIndex,
|
||||||
|
unit: "分",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -1,160 +1,9 @@
|
|||||||
// import 'dart:io';
|
|
||||||
// import 'package:flutter/material.dart';
|
|
||||||
// import 'package:flutter/services.dart';
|
|
||||||
// import 'package:get/get.dart';
|
|
||||||
// import 'package:vbvs_app/component/tool/TopSlideNotification.dart';
|
|
||||||
// import 'package:vbvs_app/controller/main_bottom/global_controller.dart';
|
|
||||||
// import 'package:vbvs_app/controller/main_bottom/main_page_controller.dart';
|
|
||||||
// import 'package:vbvs_app/controller/message/message_controller.dart';
|
|
||||||
// import 'package:vbvs_app/controller/theme_controller/ThemeController.dart';
|
|
||||||
// import 'package:vbvs_app/controller/user_info_controller.dart';
|
|
||||||
// import 'package:vbvs_app/enum/LoginStatus.dart';
|
|
||||||
// import 'package:vbvs_app/pages/common/bezier_bottom_navigation_bar.dart';
|
|
||||||
// import 'package:vbvs_app/pages/main_bottom/e_page.dart';
|
|
||||||
// import 'package:vbvs_app/pages/main_bottom/home_page.dart';
|
|
||||||
// import 'package:vbvs_app/pages/main_bottom/message_page.dart';
|
|
||||||
// import 'package:vbvs_app/pages/main_bottom/mine_page.dart';
|
|
||||||
|
|
||||||
// class MainPageBBottomChange extends StatefulWidget {
|
|
||||||
// const MainPageBBottomChange({super.key});
|
|
||||||
|
|
||||||
// @override
|
|
||||||
// State<MainPageBBottomChange> createState() => _MainPageBottomChangeState();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// class _MainPageBottomChangeState extends State<MainPageBBottomChange>
|
|
||||||
// with SingleTickerProviderStateMixin {
|
|
||||||
// final GlobalController globalController = Get.find();
|
|
||||||
// final ThemeController themeController = Get.find();
|
|
||||||
// final MessageController messageController = Get.find();
|
|
||||||
// final MainPageController controller = Get.find();
|
|
||||||
// final UserInfoController userInfoController = Get.find();
|
|
||||||
|
|
||||||
// late AnimationController _animationController;
|
|
||||||
// late Animation<double> _positionAnimation;
|
|
||||||
|
|
||||||
// final List<Widget> pages = [
|
|
||||||
// const HomePage(),
|
|
||||||
// const EPage(),
|
|
||||||
// const MessagePage(),
|
|
||||||
// const MinePage(),
|
|
||||||
// ];
|
|
||||||
|
|
||||||
// final List<String> titles = ['首页', '报告', '控制', '我的'];
|
|
||||||
// final List<IconData> icons = [
|
|
||||||
// Icons.home,
|
|
||||||
// Icons.android,
|
|
||||||
// Icons.message,
|
|
||||||
// Icons.person,
|
|
||||||
// ];
|
|
||||||
|
|
||||||
// int selectedIndex = 0;
|
|
||||||
// double currentPosition = 0.0;
|
|
||||||
|
|
||||||
// DateTime? _lastBackPressedTime;
|
|
||||||
|
|
||||||
// @override
|
|
||||||
// void initState() {
|
|
||||||
// super.initState();
|
|
||||||
// selectedIndex = controller.model.currentIndex;
|
|
||||||
// currentPosition = selectedIndex.toDouble();
|
|
||||||
|
|
||||||
// _animationController = AnimationController(
|
|
||||||
// vsync: this,
|
|
||||||
// duration: const Duration(milliseconds: 300),
|
|
||||||
// );
|
|
||||||
|
|
||||||
// _positionAnimation = Tween<double>(
|
|
||||||
// begin: currentPosition,
|
|
||||||
// end: currentPosition,
|
|
||||||
// ).animate(CurvedAnimation(
|
|
||||||
// parent: _animationController,
|
|
||||||
// curve: Curves.easeOut,
|
|
||||||
// ))
|
|
||||||
// ..addListener(() {
|
|
||||||
// setState(() {});
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
|
|
||||||
// void _onTabTapped(int index) {
|
|
||||||
// bool isLoggedIn = userInfoController.model.login == LoginStatus.LOGIN.code;
|
|
||||||
|
|
||||||
// if ((index == 1 || index == 2) && !isLoggedIn) {
|
|
||||||
// TopSlideNotification.show(context, text: "必须登录提示".tr);
|
|
||||||
// Future.delayed(const Duration(milliseconds: 100), () {
|
|
||||||
// Get.toNamed("/loginPage");
|
|
||||||
// });
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (selectedIndex != index) {
|
|
||||||
// final begin = currentPosition;
|
|
||||||
// final end = index.toDouble();
|
|
||||||
// _positionAnimation = Tween<double>(begin: begin, end: end).animate(
|
|
||||||
// CurvedAnimation(parent: _animationController, curve: Curves.easeOut),
|
|
||||||
// )..addListener(() {
|
|
||||||
// setState(() {});
|
|
||||||
// });
|
|
||||||
|
|
||||||
// _animationController.forward(from: 0.0);
|
|
||||||
// currentPosition = end;
|
|
||||||
// selectedIndex = index;
|
|
||||||
|
|
||||||
// controller.model.currentIndex = index;
|
|
||||||
// controller.updateAll();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// @override
|
|
||||||
// void dispose() {
|
|
||||||
// _animationController.dispose();
|
|
||||||
// super.dispose();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// Future<bool> _handleBackPressed() async {
|
|
||||||
// final now = DateTime.now();
|
|
||||||
// if (_lastBackPressedTime == null ||
|
|
||||||
// now.difference(_lastBackPressedTime!) > const Duration(seconds: 2)) {
|
|
||||||
// _lastBackPressedTime = now;
|
|
||||||
// TopSlideNotification.show(context, text: "滑动退出提醒".tr);
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
// return true;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// @override
|
|
||||||
// Widget build(BuildContext context) {
|
|
||||||
// return PopScope(
|
|
||||||
// canPop: false,
|
|
||||||
// onPopInvokedWithResult: (disposition, result) async {
|
|
||||||
// if (Platform.isAndroid) {
|
|
||||||
// final exit = await _handleBackPressed();
|
|
||||||
// if (exit) SystemNavigator.pop();
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// child: Obx(() {
|
|
||||||
// final hideBar = globalController.model.hideBottomNavigationBar;
|
|
||||||
// return Scaffold(
|
|
||||||
// backgroundColor: Colors.transparent,
|
|
||||||
// body: pages[controller.model.currentIndex],
|
|
||||||
// bottomNavigationBar: hideBar
|
|
||||||
// ? null
|
|
||||||
// : BezierBottomNavigationBar(
|
|
||||||
// selectedIndex: selectedIndex,
|
|
||||||
// animatedPosition: _positionAnimation.value,
|
|
||||||
// icons: icons,
|
|
||||||
// titles: titles,
|
|
||||||
// onTap: _onTabTapped,
|
|
||||||
// ),
|
|
||||||
// );
|
|
||||||
// }),
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:vbvs_app/pages/common/bezier_bottom_navigation_bar.dart';
|
import 'package:vbvs_app/pages/common/bezier_bottom_navigation_bar.dart';
|
||||||
import 'package:vbvs_app/pages/mh_page/MattressControl.dart';
|
import 'package:vbvs_app/pages/mh_page/MattressControl.dart';
|
||||||
import 'package:vbvs_app/pages/mh_page/homepage/new_Home_page.dart';
|
import 'package:vbvs_app/pages/mh_page/homepage/new_Home_page.dart';
|
||||||
|
import 'package:vbvs_app/pages/mh_page/device_list.dart';
|
||||||
import 'package:vbvs_app/pages/mh_page/new_mine_page.dart';
|
import 'package:vbvs_app/pages/mh_page/new_mine_page.dart';
|
||||||
import 'package:vbvs_app/pages/mh_page/user/page/register_page.dart';
|
import 'package:vbvs_app/pages/mh_page/user/page/register_page.dart';
|
||||||
|
|
||||||
@@ -182,7 +31,9 @@ class _HomePageState extends State<MainPageBBottomChange>
|
|||||||
NewHomePage(),
|
NewHomePage(),
|
||||||
// PeopleInfoPage(),
|
// PeopleInfoPage(),
|
||||||
// Text('报告'),
|
// Text('报告'),
|
||||||
RegisterPage(),
|
// RegisterPage(),
|
||||||
|
// ShareDeviceWidget(),
|
||||||
|
DeviceListPage(),
|
||||||
// FindPasswordPage(),
|
// FindPasswordPage(),
|
||||||
// Smys(),
|
// Smys(),
|
||||||
MattressControlPage(),
|
MattressControlPage(),
|
||||||
|
|||||||
177
lib/pages/mh_page/ShareUserWidget.dart
Normal file
@@ -0,0 +1,177 @@
|
|||||||
|
import 'package:ef/ef.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_svg/flutter_svg.dart';
|
||||||
|
import 'package:flutterflow_ui/flutterflow_ui.dart';
|
||||||
|
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||||
|
import 'package:vbvs_app/component/tool/ClickableContainer.dart';
|
||||||
|
|
||||||
|
import 'package:vbvs_app/controller/mh_controller/mhdevice_share_controller.dart';
|
||||||
|
|
||||||
|
class ShareUserWidget extends GetView {
|
||||||
|
int index;
|
||||||
|
MHDeviceShareController repairListController;
|
||||||
|
|
||||||
|
ShareUserWidget({required this.index, required this.repairListController}) {}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
var info = repairListController.model.shareUser![index];
|
||||||
|
return InkWell(
|
||||||
|
onTap: () {
|
||||||
|
repairListController.model.mainShare =
|
||||||
|
repairListController.model.shareUser![index];
|
||||||
|
Get.toNamed('/share_device_user_detail');
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
width: MediaQuery.sizeOf(context).width,
|
||||||
|
height: MediaQuery.sizeOf(context).height * 0.073,
|
||||||
|
constraints: const BoxConstraints(
|
||||||
|
minHeight: 71,
|
||||||
|
),
|
||||||
|
decoration: const BoxDecoration(
|
||||||
|
border: Border(
|
||||||
|
bottom: BorderSide(
|
||||||
|
color: Color(0xFF929699), // 设置底部线条颜色
|
||||||
|
width: 0, // 设置线条宽度
|
||||||
|
),
|
||||||
|
top: BorderSide(
|
||||||
|
color: Color(0xFF929699), // 设置底部线条颜色
|
||||||
|
width: 0, // 设置线条宽度
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
child: Padding(
|
||||||
|
padding:
|
||||||
|
EdgeInsetsDirectional.fromSTEB(37.rpx, 29.rpx, 42.rpx, 30.rpx),
|
||||||
|
child: Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: 42.rpx,
|
||||||
|
height: 42.rpx,
|
||||||
|
child: SvgPicture.asset('assets/img/icon/default_head.svg'),
|
||||||
|
),
|
||||||
|
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
margin:
|
||||||
|
EdgeInsetsDirectional.only(start: 30.rpx, end: 30.rpx),
|
||||||
|
// width: MediaQuery.sizeOf(context).width * 0.5,
|
||||||
|
// height: MediaQuery.sizeOf(context).height * 0.075,
|
||||||
|
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Align(
|
||||||
|
alignment: const AlignmentDirectional(-1, 0),
|
||||||
|
child: Text(
|
||||||
|
'${info['userName']}',
|
||||||
|
style: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: 'Readex Pro',
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 30.rpx,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Align(
|
||||||
|
alignment: const AlignmentDirectional(-1, 0),
|
||||||
|
child: Text(
|
||||||
|
info['opType'] == 1
|
||||||
|
? '允许对方控制该设备'
|
||||||
|
: info['opType'] == 2
|
||||||
|
? '仅允许对方查看该设备'
|
||||||
|
: '',
|
||||||
|
style: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: 'Readex Pro',
|
||||||
|
color: const Color(0xFFC8CBD2),
|
||||||
|
fontSize: 20.rpx,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
].divide(const SizedBox(height: 5)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// Container(
|
||||||
|
// width: MediaQuery.sizeOf(context).width * 0.2,
|
||||||
|
// height: MediaQuery.sizeOf(context).height * 0.075,
|
||||||
|
// constraints: const BoxConstraints(
|
||||||
|
// maxWidth: 130,
|
||||||
|
// ),
|
||||||
|
// decoration: BoxDecoration(
|
||||||
|
// color: FlutterFlowTheme.of(context).secondaryBackground,
|
||||||
|
// ),
|
||||||
|
// child: Row(
|
||||||
|
// mainAxisSize: MainAxisSize.max,
|
||||||
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
// children: [
|
||||||
|
// Align(
|
||||||
|
// alignment: const AlignmentDirectional(0, 0),
|
||||||
|
// child: Text(
|
||||||
|
// ' ',
|
||||||
|
// style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
|
// fontFamily: 'Readex Pro',
|
||||||
|
// color: const Color(0xFF333333),
|
||||||
|
// fontSize: 13,
|
||||||
|
// letterSpacing: 0.0,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// Flexible(
|
||||||
|
// child: Align(
|
||||||
|
// alignment: const AlignmentDirectional(0, 0.05),
|
||||||
|
// child: Icon(
|
||||||
|
// Icons.arrow_forward_ios,
|
||||||
|
// color: FlutterFlowTheme.of(context).secondaryText,
|
||||||
|
// size: 10,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ].divide(const SizedBox(width: 27)),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
ClickableContainer(
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
highlightColor: Colors.transparent,
|
||||||
|
padding: EdgeInsets.only(right: 0),
|
||||||
|
onTap: () {},
|
||||||
|
child: Container(
|
||||||
|
height: 30.rpx,
|
||||||
|
width: 30.rpx,
|
||||||
|
child: SvgPicture.asset(
|
||||||
|
'assets/img/icon/expand.svg',
|
||||||
|
color: Colors.white,
|
||||||
|
)
|
||||||
|
// Icon(
|
||||||
|
// Icons.arrow_forward_ios,
|
||||||
|
// color: Colors.white,
|
||||||
|
// // size: 14.rpx,
|
||||||
|
// ),
|
||||||
|
)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
// Container(
|
||||||
|
// width: MediaQuery.sizeOf(context).width,
|
||||||
|
// height: MediaQuery.sizeOf(context).height * 0.09,
|
||||||
|
// child: Container(
|
||||||
|
// width: MediaQuery.sizeOf(context).width,
|
||||||
|
// height: MediaQuery.sizeOf(context).height * 0.09,
|
||||||
|
// decoration: BoxDecoration(),
|
||||||
|
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,10 +1,12 @@
|
|||||||
import 'package:ef/ef.dart';
|
import 'package:ef/ef.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_svg/flutter_svg.dart';
|
||||||
import 'package:flutterflow_ui/flutterflow_ui.dart';
|
import 'package:flutterflow_ui/flutterflow_ui.dart';
|
||||||
import 'package:vbvs_app/common/color/appConstants.dart';
|
import 'package:vbvs_app/common/color/appConstants.dart';
|
||||||
import 'package:vbvs_app/common/color/appFontsize.dart';
|
import 'package:vbvs_app/common/color/appFontsize.dart';
|
||||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||||
|
import 'package:vbvs_app/component/NullDataComponentWidget.dart';
|
||||||
import 'package:vbvs_app/controller/mh_controller/address_list_controller.dart';
|
import 'package:vbvs_app/controller/mh_controller/address_list_controller.dart';
|
||||||
import 'package:vbvs_app/pages/mh_page/EmptyMessageWidget.dart';
|
import 'package:vbvs_app/pages/mh_page/EmptyMessageWidget.dart';
|
||||||
import 'package:vbvs_app/pages/mh_page/address_module_widget.dart';
|
import 'package:vbvs_app/pages/mh_page/address_module_widget.dart';
|
||||||
@@ -71,9 +73,7 @@ class AddressListPage extends GetView<AddressListController> {
|
|||||||
Obx(() {
|
Obx(() {
|
||||||
if (controller.model.addressList!.isEmpty) {
|
if (controller.model.addressList!.isEmpty) {
|
||||||
// 如果地址列表为空,显示 EmptyMessageWidget
|
// 如果地址列表为空,显示 EmptyMessageWidget
|
||||||
return Expanded(
|
return Expanded(child: NullDataWidget());
|
||||||
child: EmptyMessageWidget(),
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
// 如果地址列表不为空,显示地址列表
|
// 如果地址列表不为空,显示地址列表
|
||||||
return Expanded(
|
return Expanded(
|
||||||
@@ -160,24 +160,29 @@ class AddressListPage extends GetView<AddressListController> {
|
|||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Baseline(
|
// Baseline(
|
||||||
baselineType: TextBaseline.alphabetic,
|
// baselineType: TextBaseline.alphabetic,
|
||||||
baseline: AppFontsize.normal_text_size *
|
// baseline: AppFontsize.normal_text_size *
|
||||||
1.6, // 调整基线位置
|
// 1.6, // 调整基线位置
|
||||||
child: Text(
|
SvgPicture.asset(
|
||||||
'+',
|
'assets/img/icon/plus.svg',
|
||||||
style: FlutterFlowTheme.of(context)
|
width: 42.rpx,
|
||||||
.titleSmall
|
height: 42.rpx,
|
||||||
.override(
|
|
||||||
fontFamily: 'Readex Pro',
|
|
||||||
color: Color(0xFF85F5FF),
|
|
||||||
fontSize:
|
|
||||||
AppFontsize.normal_text_size +
|
|
||||||
12, // 让加号比文字稍大
|
|
||||||
letterSpacing: 0,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
|
// Text(
|
||||||
|
// '+',
|
||||||
|
// style: FlutterFlowTheme.of(context)
|
||||||
|
// .titleSmall
|
||||||
|
// .override(
|
||||||
|
// fontFamily: 'Readex Pro',
|
||||||
|
// color: Color(0xFF85F5FF),
|
||||||
|
// fontSize:
|
||||||
|
// AppFontsize.normal_text_size +
|
||||||
|
// 12, // 让加号比文字稍大
|
||||||
|
// letterSpacing: 0,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
//),
|
||||||
SizedBox(width: 10), // 加号和文字间距
|
SizedBox(width: 10), // 加号和文字间距
|
||||||
Text(
|
Text(
|
||||||
'添加新地址',
|
'添加新地址',
|
||||||
|
|||||||
@@ -109,13 +109,13 @@ class _BluetoothState extends State<BluetoothPage> {
|
|||||||
children: [
|
children: [
|
||||||
Image.asset(
|
Image.asset(
|
||||||
'assets/images/active_bluetooth.png',
|
'assets/images/active_bluetooth.png',
|
||||||
width: 42.rpx,
|
width: 68.rpx,
|
||||||
height: 42.rpx,
|
height: 68.rpx,
|
||||||
),
|
),
|
||||||
SizedBox(height: 4),
|
SizedBox(height: 4),
|
||||||
Text('已连接',
|
Text('已连接',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.green,
|
color: Color(0xFF6BFDAC),
|
||||||
fontSize: 26.rpx)),
|
fontSize: 26.rpx)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@@ -132,7 +132,7 @@ class _BluetoothState extends State<BluetoothPage> {
|
|||||||
_buildMenuButton(
|
_buildMenuButton(
|
||||||
context, '详情', "/devicePeopleInfo"),
|
context, '详情', "/devicePeopleInfo"),
|
||||||
_buildMenuButton(
|
_buildMenuButton(
|
||||||
context, '人员资料', "/peopleInfoPage"),
|
context, '人员资料', "/peopleInfoPage"),
|
||||||
_buildMenuButton(
|
_buildMenuButton(
|
||||||
context, '房间选择', "/roomPickerPage"),
|
context, '房间选择', "/roomPickerPage"),
|
||||||
_buildMenuButton(
|
_buildMenuButton(
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ class BookInfoPage extends GetView<BookInfoController> {
|
|||||||
Map data;
|
Map data;
|
||||||
|
|
||||||
BookInfoPage({required this.data}) {
|
BookInfoPage({required this.data}) {
|
||||||
// controller.getData(data["id"]);
|
controller.getData(data["id"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -456,12 +456,11 @@ class BookInfoPage extends GetView<BookInfoController> {
|
|||||||
context)
|
context)
|
||||||
.bodyMedium
|
.bodyMedium
|
||||||
.override(
|
.override(
|
||||||
fontFamily:
|
fontFamily:
|
||||||
'Readex Pro',
|
'Readex Pro',
|
||||||
fontSize: AppFontsize
|
fontSize: 26.rpx,
|
||||||
.normal_text_size,
|
letterSpacing: 0,
|
||||||
letterSpacing: 0,
|
color: Colors.white),
|
||||||
),
|
|
||||||
textAlign: TextAlign.end,
|
textAlign: TextAlign.end,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -622,12 +621,11 @@ class BookInfoPage extends GetView<BookInfoController> {
|
|||||||
context)
|
context)
|
||||||
.bodyMedium
|
.bodyMedium
|
||||||
.override(
|
.override(
|
||||||
fontFamily:
|
fontFamily:
|
||||||
'Readex Pro',
|
'Readex Pro',
|
||||||
fontSize: AppFontsize
|
fontSize: 26.rpx,
|
||||||
.normal_text_size,
|
letterSpacing: 0,
|
||||||
letterSpacing: 0,
|
color: Colors.white),
|
||||||
),
|
|
||||||
textAlign: TextAlign.end,
|
textAlign: TextAlign.end,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
439
lib/pages/mh_page/device/device.dart
Normal file
@@ -0,0 +1,439 @@
|
|||||||
|
import 'package:ef/ef.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_svg/flutter_svg.dart';
|
||||||
|
import 'package:flutterflow_ui/flutterflow_ui.dart';
|
||||||
|
|
||||||
|
import 'package:vbvs_app/common/color/appFontsize.dart';
|
||||||
|
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||||
|
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||||
|
import 'package:vbvs_app/controller/main_bottom/global_controller.dart';
|
||||||
|
import 'package:vbvs_app/controller/mh_controller/device_list_controller.dart';
|
||||||
|
|
||||||
|
class DeviceInfoWidget extends GetView {
|
||||||
|
int index;
|
||||||
|
DeviceListController deviceListController;
|
||||||
|
|
||||||
|
DeviceInfoWidget({required this.index, required this.deviceListController}) {}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
var device = deviceListController.model.deviceList[index];
|
||||||
|
GlobalController globalController = Get.find();
|
||||||
|
return Padding(
|
||||||
|
padding: EdgeInsetsDirectional.fromSTEB(30.rpx, 0, 30.rpx, 0),
|
||||||
|
child: Container(
|
||||||
|
// width: MediaQuery.sizeOf(context).width,
|
||||||
|
height: 381.rpx,
|
||||||
|
constraints: BoxConstraints(
|
||||||
|
minHeight: 140,
|
||||||
|
),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Color(0xFF003058),
|
||||||
|
borderRadius: BorderRadius.circular(16.rpx),
|
||||||
|
),
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsetsDirectional.fromSTEB(26.rpx, 33.rpx, 26.rpx, 0),
|
||||||
|
child: Container(
|
||||||
|
// width: MediaQuery.sizeOf(context).width,
|
||||||
|
height: 381.rpx,
|
||||||
|
constraints: BoxConstraints(
|
||||||
|
minHeight: 106,
|
||||||
|
),
|
||||||
|
|
||||||
|
child: Container(
|
||||||
|
// width: MediaQuery.sizeOf(context).width,
|
||||||
|
height: 381.rpx,
|
||||||
|
constraints: BoxConstraints(
|
||||||
|
minHeight: 130,
|
||||||
|
),
|
||||||
|
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
deviceListController.model.deviceList[index]['name'] ??
|
||||||
|
'SWES系列 01号智能一键入眠床',
|
||||||
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
|
fontFamily: 'Readex Pro',
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 30.rpx,
|
||||||
|
letterSpacing: 0,
|
||||||
|
),
|
||||||
|
maxLines: 1, // 限制显示一行
|
||||||
|
overflow: TextOverflow.ellipsis, // 超出部分显示省略号
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(top: 36.rpx),
|
||||||
|
width: MediaQuery.sizeOf(context).width,
|
||||||
|
// height: MediaQuery.sizeOf(context).height * 0.065,
|
||||||
|
constraints: BoxConstraints(
|
||||||
|
minHeight: 55,
|
||||||
|
),
|
||||||
|
|
||||||
|
child: Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () async {
|
||||||
|
// GlobalController globalController = Get.find();
|
||||||
|
// var tmp = globalController.model.deviceMain;
|
||||||
|
// BedController bedController = Get.find();
|
||||||
|
// bedController.websocketSend(2);
|
||||||
|
// globalController.model.deviceMain = device;
|
||||||
|
// globalController.updateAll();
|
||||||
|
// bedController.websocketSend(1);
|
||||||
|
// var result = await Get.toNamed("/bodyChart");
|
||||||
|
// bedController.websocketSend(2);
|
||||||
|
// globalController.model.deviceMain = tmp;
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: RichText(
|
||||||
|
text: TextSpan(
|
||||||
|
children: [
|
||||||
|
TextSpan(
|
||||||
|
text: '设备ID:' +
|
||||||
|
(deviceListController.model
|
||||||
|
.deviceList[
|
||||||
|
index]['id'] ??
|
||||||
|
''),
|
||||||
|
style: FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
'Readex Pro',
|
||||||
|
color:
|
||||||
|
Color(0xFFC8CBD2),
|
||||||
|
fontSize: 26.rpx,
|
||||||
|
letterSpacing: 0,
|
||||||
|
lineHeight: 1),
|
||||||
|
),
|
||||||
|
TextSpan(
|
||||||
|
text:
|
||||||
|
' (${deviceListController.model.deviceList[index]['status'] ?? ''})',
|
||||||
|
style:
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
'Readex Pro',
|
||||||
|
color: deviceListController
|
||||||
|
.model
|
||||||
|
.deviceList[index]
|
||||||
|
[
|
||||||
|
'status'] ==
|
||||||
|
'在线'
|
||||||
|
? Color(
|
||||||
|
0xFF07C160) // 在线的颜色
|
||||||
|
: Color(
|
||||||
|
0xFFEA7CA7), // 离线的颜色
|
||||||
|
fontSize: 26.rpx,
|
||||||
|
letterSpacing: 0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
maxLines: 1, // 限制显示一行
|
||||||
|
overflow: TextOverflow
|
||||||
|
.ellipsis, // 超出部分显示省略号
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Align(
|
||||||
|
alignment: AlignmentDirectional(-1, 0),
|
||||||
|
child: Text(
|
||||||
|
'房间:' +
|
||||||
|
(deviceListController
|
||||||
|
.model.deviceList[index]
|
||||||
|
['roomName'] ??
|
||||||
|
''),
|
||||||
|
style: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: 'Readex Pro',
|
||||||
|
color: Color(0xFFC8CBD2),
|
||||||
|
fontSize: 26.rpx,
|
||||||
|
letterSpacing: 0,
|
||||||
|
lineHeight: 1),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Align(
|
||||||
|
alignment: AlignmentDirectional(-1, 0),
|
||||||
|
child: Text(
|
||||||
|
'设备状态:' +
|
||||||
|
(deviceListController
|
||||||
|
.model
|
||||||
|
.deviceList[index]["status"]
|
||||||
|
?["status"]
|
||||||
|
?.toString() ??
|
||||||
|
''),
|
||||||
|
style: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: 'Readex Pro',
|
||||||
|
color: Color(0xFFC8CBD2),
|
||||||
|
fontSize: 26.rpx,
|
||||||
|
letterSpacing: 0,
|
||||||
|
lineHeight: 1),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
].divide(SizedBox(height: 36.rpx)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Align(
|
||||||
|
alignment: AlignmentDirectional(0, 0),
|
||||||
|
child: Container(
|
||||||
|
width: MediaQuery.sizeOf(context).width * 0.21,
|
||||||
|
height: 90.rpx,
|
||||||
|
child: FFButtonWidget(
|
||||||
|
onPressed: () {
|
||||||
|
// deviceControllerChange(device);
|
||||||
|
},
|
||||||
|
text: '控制',
|
||||||
|
options: FFButtonOptions(
|
||||||
|
color: Color(0XFF85F5FF),
|
||||||
|
textStyle: FlutterFlowTheme.of(context)
|
||||||
|
.titleSmall
|
||||||
|
.override(
|
||||||
|
fontFamily: 'Readex Pro',
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 28.rpx,
|
||||||
|
letterSpacing: 0,
|
||||||
|
),
|
||||||
|
elevation: 0,
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: Colors.transparent,
|
||||||
|
width: 1,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(16.rpx),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsetsDirectional.fromSTEB(0, 36.rpx, 0, 0),
|
||||||
|
child: Container(
|
||||||
|
width: MediaQuery.sizeOf(context).width,
|
||||||
|
height: 130,
|
||||||
|
constraints: BoxConstraints(
|
||||||
|
minHeight: 1,
|
||||||
|
maxHeight: 1,
|
||||||
|
),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Color(0xFFB6BBC9),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Flexible(
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(right: 26.rpx),
|
||||||
|
width: MediaQuery.sizeOf(context).width,
|
||||||
|
height: MediaQuery.sizeOf(context).height * 1,
|
||||||
|
constraints: BoxConstraints(
|
||||||
|
minHeight: 60,
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
InkWell(
|
||||||
|
onTap: () async {
|
||||||
|
if (device['type'] == 1) {
|
||||||
|
globalController.model.deviceMain = device;
|
||||||
|
await Get.toNamed("/deviceShare");
|
||||||
|
globalController.getDeviceList();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
height: MediaQuery.sizeOf(context).height * 0.1,
|
||||||
|
child: Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Align(
|
||||||
|
alignment: AlignmentDirectional(1, 0),
|
||||||
|
child: Container(
|
||||||
|
width: 42.rpx,
|
||||||
|
height: 42.rpx,
|
||||||
|
child: SvgPicture.asset(
|
||||||
|
'assets/images/group.svg',
|
||||||
|
color: Color(0xFF85F5FF),
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
if (device['type'] == 1)
|
||||||
|
Text(
|
||||||
|
'已分享:',
|
||||||
|
style: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: 'Readex Pro',
|
||||||
|
fontSize: AppFontsize
|
||||||
|
.normal_text_size,
|
||||||
|
letterSpacing: 0,
|
||||||
|
color: Color(0xFF333333),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (device['type'] == 1)
|
||||||
|
Padding(
|
||||||
|
padding:
|
||||||
|
EdgeInsetsDirectional.fromSTEB(
|
||||||
|
5, 0, 5, 0),
|
||||||
|
child: Text(
|
||||||
|
// '0',
|
||||||
|
deviceListController
|
||||||
|
.model.deviceList[index]
|
||||||
|
['shareNum'] ??
|
||||||
|
'0',
|
||||||
|
style: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: 'Readex Pro',
|
||||||
|
color: Color(0xFFE55E92),
|
||||||
|
fontSize: AppFontsize
|
||||||
|
.normal_text_size,
|
||||||
|
letterSpacing: 0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (device['type'] == 1)
|
||||||
|
Text(
|
||||||
|
'人',
|
||||||
|
style: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: 'Readex Pro',
|
||||||
|
fontSize: AppFontsize
|
||||||
|
.normal_text_size,
|
||||||
|
letterSpacing: 0,
|
||||||
|
color: Color(0xFF333333),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (device['type'] == 2)
|
||||||
|
Text(
|
||||||
|
'来自',
|
||||||
|
style: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: 'Readex Pro',
|
||||||
|
fontSize: AppFontsize
|
||||||
|
.normal_text_size,
|
||||||
|
letterSpacing: 0,
|
||||||
|
color: Color(0xFF333333),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (device['type'] == 2)
|
||||||
|
Padding(
|
||||||
|
padding:
|
||||||
|
EdgeInsetsDirectional.fromSTEB(
|
||||||
|
5, 0, 5, 0),
|
||||||
|
child: Text(
|
||||||
|
'${device['suname']?.length > 5 ? device['suname'].substring(0, 5) + '...' : device['suname']}',
|
||||||
|
style: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: 'Readex Pro',
|
||||||
|
color: Color(0xFFE55E92),
|
||||||
|
fontSize: AppFontsize
|
||||||
|
.normal_text_size,
|
||||||
|
letterSpacing: 0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (device['type'] == 2)
|
||||||
|
Text(
|
||||||
|
'的分享',
|
||||||
|
style: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: 'Readex Pro',
|
||||||
|
fontSize: 21.rpx,
|
||||||
|
letterSpacing: 0,
|
||||||
|
color: Color(0xFF333333),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
].divide(SizedBox(width: 6)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
InkWell(
|
||||||
|
onTap: () {
|
||||||
|
var a = [device["bindMacA"]];
|
||||||
|
if ("${device["bindMacB"]}".length > 6) {
|
||||||
|
a.add(device["bindMacB"]);
|
||||||
|
}
|
||||||
|
Get.toNamed("/sleepWebview", arguments: a);
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
height: MediaQuery.sizeOf(context).height * 0.1,
|
||||||
|
constraints: BoxConstraints(
|
||||||
|
minHeight: 25,
|
||||||
|
),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Align(
|
||||||
|
alignment: AlignmentDirectional(0, 0),
|
||||||
|
child: SvgPicture.asset(
|
||||||
|
"assets/images/table.svg",
|
||||||
|
width: 24.rpx,
|
||||||
|
height: 24.rpx,
|
||||||
|
color: Color(0xFF85F5FF),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(width: 5),
|
||||||
|
Text(
|
||||||
|
'睡眠报告',
|
||||||
|
style: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: 'Readex Pro',
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 21.rpx,
|
||||||
|
letterSpacing: 0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
134
lib/pages/mh_page/device_list.dart
Normal file
@@ -0,0 +1,134 @@
|
|||||||
|
import 'package:ef/ef.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutterflow_ui/flutterflow_ui.dart';
|
||||||
|
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||||
|
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||||
|
import 'package:vbvs_app/component/NullDataComponentWidget.dart';
|
||||||
|
import 'package:vbvs_app/pages/mh_page/device/device.dart';
|
||||||
|
import 'package:vbvs_app/pages/mh_page/searchWidget.dart';
|
||||||
|
|
||||||
|
import '../../controller/mh_controller/device_list_controller.dart';
|
||||||
|
|
||||||
|
class DeviceListPage extends StatefulWidget {
|
||||||
|
const DeviceListPage({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<DeviceListPage> createState() => _DeviceListPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _DeviceListPageState extends State<DeviceListPage> {
|
||||||
|
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||||
|
DeviceListController controller = Get.find();
|
||||||
|
BoxConstraints? bodysize;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
controller.model.keyword = '';
|
||||||
|
controller.getDeviceList();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return LayoutBuilder(builder: (context, cc) {
|
||||||
|
bodysize = cc;
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: () => FocusScope.of(context).unfocus(),
|
||||||
|
child: Container(
|
||||||
|
decoration: const BoxDecoration(
|
||||||
|
image: DecorationImage(
|
||||||
|
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||||
|
fit: BoxFit.fill, // 填满整个 Container
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Scaffold(
|
||||||
|
appBar: AppBar(
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
automaticallyImplyLeading: false,
|
||||||
|
iconTheme: IconThemeData(color: Colors.white),
|
||||||
|
titleSpacing: 0,
|
||||||
|
// leading: returnIconButtomAddCallback(() {
|
||||||
|
// controller.saveDataApi();
|
||||||
|
// updateParm(isShowToast: false);
|
||||||
|
// }),
|
||||||
|
// leading: returnIconButtomNew,
|
||||||
|
title: Container(
|
||||||
|
width: double.infinity,
|
||||||
|
height: 180.rpx,
|
||||||
|
child: Stack(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
children: [
|
||||||
|
// 中间居中的标题
|
||||||
|
Text(
|
||||||
|
'设备列表',
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 30.rpx,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// 左侧图标
|
||||||
|
Positioned(
|
||||||
|
left: 20.rpx,
|
||||||
|
child: returnIconButtomNew,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
actions: [],
|
||||||
|
centerTitle: false,
|
||||||
|
),
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
body: Container(
|
||||||
|
width: bodysize!.maxWidth,
|
||||||
|
height: bodysize!.maxHeight,
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsetsDirectional.fromSTEB(0, 10, 0, 23),
|
||||||
|
child: SearchWidget(
|
||||||
|
keyword: controller.model.keyword,
|
||||||
|
color: controller.model.color,
|
||||||
|
hint: "检索设备",
|
||||||
|
onChange: (d) {
|
||||||
|
controller.model.keyword = d;
|
||||||
|
},
|
||||||
|
findCallback: () {
|
||||||
|
controller.getDeviceList();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Obx(() {
|
||||||
|
if (controller.model.deviceList == null ||
|
||||||
|
controller.model.deviceList.isEmpty) {
|
||||||
|
return Expanded(child: NullDataWidget());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果 deviceList 不为空,渲染列表
|
||||||
|
return Expanded(
|
||||||
|
child: ListView(
|
||||||
|
shrinkWrap: true,
|
||||||
|
scrollDirection: Axis.vertical,
|
||||||
|
children: controller.model.deviceList
|
||||||
|
.asMap()
|
||||||
|
.entries
|
||||||
|
.map((e) => DeviceInfoWidget(
|
||||||
|
index: e.key,
|
||||||
|
deviceListController: controller,
|
||||||
|
))
|
||||||
|
.toList()
|
||||||
|
.divide(const SizedBox(height: 10))
|
||||||
|
.addToEnd(const SizedBox(height: 100)),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
672
lib/pages/mh_page/device_share_page.dart
Normal file
@@ -0,0 +1,672 @@
|
|||||||
|
import 'package:ef/ef.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
|
import 'package:flutterflow_ui/flutterflow_ui.dart';
|
||||||
|
import 'package:vbvs_app/common/color/appConstants.dart';
|
||||||
|
import 'package:vbvs_app/common/util/CommonVariables.dart';
|
||||||
|
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||||
|
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||||
|
import 'package:vbvs_app/component/tool/ClickableContainer.dart';
|
||||||
|
import 'package:vbvs_app/controller/main_bottom/global_controller.dart';
|
||||||
|
import 'package:vbvs_app/controller/mh_controller/mhdevice_share_controller.dart';
|
||||||
|
import 'package:vbvs_app/pages/mh_page/EmptyMessageWidget.dart';
|
||||||
|
import 'package:vbvs_app/pages/mh_page/ShareUserWidget.dart';
|
||||||
|
|
||||||
|
class ShareDeviceWidget extends GetView<MHDeviceShareController> {
|
||||||
|
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||||
|
|
||||||
|
final ScrollController scrollController = ScrollController();
|
||||||
|
|
||||||
|
// ShareDeviceWidget() {
|
||||||
|
// controller.initData();
|
||||||
|
// scrollController.addListener(() {
|
||||||
|
// if (scrollController.position.pixels ==
|
||||||
|
// scrollController.position.maxScrollExtent &&
|
||||||
|
// controller.model.hasMore) {
|
||||||
|
// controller.initData();
|
||||||
|
// controller.updateAll();
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
final _formKey = GlobalKey<FormState>();
|
||||||
|
final _phoneController = TextEditingController();
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
var deviceController = Get.find<GlobalController>();
|
||||||
|
controller.model.msg = "";
|
||||||
|
controller.model.show = 0;
|
||||||
|
controller.model.type = 1;
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: () => FocusScope.of(context).unfocus(),
|
||||||
|
child: Container(
|
||||||
|
decoration: const BoxDecoration(
|
||||||
|
image: DecorationImage(
|
||||||
|
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||||
|
fit: BoxFit.fill, // 填满整个 Container
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Scaffold(
|
||||||
|
appBar: AppBar(
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
automaticallyImplyLeading: false,
|
||||||
|
iconTheme: const IconThemeData(color: Colors.white),
|
||||||
|
titleSpacing: 0,
|
||||||
|
title: Container(
|
||||||
|
width: double.infinity,
|
||||||
|
height: 180.rpx,
|
||||||
|
child: Stack(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
children: [
|
||||||
|
// 中间居中的标题
|
||||||
|
Text(
|
||||||
|
'分享设备',
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 30.rpx,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// 左侧图标
|
||||||
|
Positioned(
|
||||||
|
left: 20.rpx,
|
||||||
|
child: returnIconButtomNew,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
actions: [],
|
||||||
|
centerTitle: false,
|
||||||
|
),
|
||||||
|
key: scaffoldKey,
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
body: SingleChildScrollView(
|
||||||
|
child: Container(
|
||||||
|
width: MediaQuery.sizeOf(context).width,
|
||||||
|
height: MediaQuery.sizeOf(context).height * 1,
|
||||||
|
child: Padding(
|
||||||
|
padding:
|
||||||
|
EdgeInsetsDirectional.fromSTEB(30.rpx, 0, 30.rpx, 0),
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding:
|
||||||
|
EdgeInsetsDirectional.fromSTEB(0, 30.rpx, 0, 0),
|
||||||
|
child: Container(
|
||||||
|
width: MediaQuery.sizeOf(context).width,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: const Color(0xFF003058),
|
||||||
|
borderRadius: BorderRadius.circular(16.rpx),
|
||||||
|
),
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsetsDirectional.fromSTEB(
|
||||||
|
30.rpx, 49.rpx, 30.rpx, 80.rpx),
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Column(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
crossAxisAlignment:
|
||||||
|
CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
'将以下设备分享给您的家人或朋友 ',
|
||||||
|
style: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: 'Readex Pro',
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 30.rpx,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
lineHeight: 1,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'设备ID:${deviceController.model.deviceMain['mac']}',
|
||||||
|
style: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: 'Readex Pro',
|
||||||
|
color: const Color(0xFF6BFDAC),
|
||||||
|
fontSize: 26.rpx,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
lineHeight: 1),
|
||||||
|
),
|
||||||
|
].divide(SizedBox(height: 65.rpx)),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsetsDirectional.fromSTEB(
|
||||||
|
0, 80.rpx, 0, 0),
|
||||||
|
child: Container(
|
||||||
|
width: MediaQuery.sizeOf(context).width,
|
||||||
|
constraints: const BoxConstraints(
|
||||||
|
minHeight: 46,
|
||||||
|
),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.circular(16.rpx),
|
||||||
|
),
|
||||||
|
child: Align(
|
||||||
|
alignment:
|
||||||
|
const AlignmentDirectional(0, 0),
|
||||||
|
child: Form(
|
||||||
|
key: _formKey,
|
||||||
|
child: TextFormField(
|
||||||
|
controller: _phoneController,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
hintText: '请输入对方手机号',
|
||||||
|
hintStyle:
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.labelMedium
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
'Readex Pro',
|
||||||
|
color: const Color(
|
||||||
|
0xFF929699),
|
||||||
|
fontSize: 36.rpx,
|
||||||
|
),
|
||||||
|
enabledBorder:
|
||||||
|
const UnderlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: Color(0xFF929699),
|
||||||
|
width: 0),
|
||||||
|
),
|
||||||
|
focusedBorder:
|
||||||
|
const UnderlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: Color(0xFF929699),
|
||||||
|
width: 0),
|
||||||
|
),
|
||||||
|
errorBorder:
|
||||||
|
const UnderlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: Colors.red,
|
||||||
|
width: 0),
|
||||||
|
),
|
||||||
|
focusedErrorBorder:
|
||||||
|
const UnderlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: Colors.redAccent,
|
||||||
|
width: 0),
|
||||||
|
),
|
||||||
|
contentPadding:
|
||||||
|
const EdgeInsets.only(
|
||||||
|
left: 10, bottom: 5),
|
||||||
|
),
|
||||||
|
style:
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
'Readex Pro',
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 36.rpx,
|
||||||
|
),
|
||||||
|
validator: (value) {
|
||||||
|
if (value == null ||
|
||||||
|
value.isEmpty) {
|
||||||
|
return '手机号不能为空';
|
||||||
|
}
|
||||||
|
final phoneReg =
|
||||||
|
RegExp(r'^1[3-9]\d{9}$');
|
||||||
|
if (!phoneReg.hasMatch(value)) {
|
||||||
|
return '请输入正确的手机号';
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
onChanged: (value) {
|
||||||
|
controller.model.phone = value;
|
||||||
|
},
|
||||||
|
),
|
||||||
|
)
|
||||||
|
// TextFormField(
|
||||||
|
// // controller: _model.textController,
|
||||||
|
// // focusNode: _model.textFieldFocusNode,
|
||||||
|
// // autofocus: true,
|
||||||
|
// obscureText: false,
|
||||||
|
// decoration: InputDecoration(
|
||||||
|
// hintText: '请输入对方手机号',
|
||||||
|
// hintStyle: FlutterFlowTheme.of(
|
||||||
|
// context)
|
||||||
|
// .labelMedium
|
||||||
|
// .override(
|
||||||
|
// fontFamily: 'Readex Pro',
|
||||||
|
// color:
|
||||||
|
// const Color(0xFFD2D2D2),
|
||||||
|
// fontSize: 13,
|
||||||
|
// letterSpacing: 0.0,
|
||||||
|
// ),
|
||||||
|
// enabledBorder:
|
||||||
|
// const UnderlineInputBorder(
|
||||||
|
// borderSide: BorderSide(
|
||||||
|
// color: Color(0xFFCCCCCC),
|
||||||
|
// width: 1),
|
||||||
|
// ),
|
||||||
|
// focusedBorder:
|
||||||
|
// const UnderlineInputBorder(
|
||||||
|
// borderSide: BorderSide(
|
||||||
|
// color: Color(0xFF929699),
|
||||||
|
// width: 0),
|
||||||
|
// ),
|
||||||
|
// errorBorder:
|
||||||
|
// const UnderlineInputBorder(
|
||||||
|
// borderSide: BorderSide(
|
||||||
|
// color: Colors.red, width: 1),
|
||||||
|
// ),
|
||||||
|
// focusedErrorBorder:
|
||||||
|
// const UnderlineInputBorder(
|
||||||
|
// borderSide: BorderSide(
|
||||||
|
// color: Colors.redAccent,
|
||||||
|
// width: 1.5),
|
||||||
|
// ),
|
||||||
|
// contentPadding:
|
||||||
|
// const EdgeInsets.only(
|
||||||
|
// left: 10, bottom: 5),
|
||||||
|
// ),
|
||||||
|
// style: FlutterFlowTheme.of(context)
|
||||||
|
// .bodyMedium
|
||||||
|
// .override(
|
||||||
|
// fontFamily: 'Readex Pro',
|
||||||
|
// fontSize: 13,
|
||||||
|
// letterSpacing: 0.0,
|
||||||
|
// ),
|
||||||
|
// onChanged: (value) {
|
||||||
|
// controller.model.phone = value;
|
||||||
|
// },
|
||||||
|
// // validator: _model.textControllerValidator
|
||||||
|
// // .asValidator(context),
|
||||||
|
// ),
|
||||||
|
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
ClickableContainer(
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
highlightColor: Colors.transparent,
|
||||||
|
padding: EdgeInsets.only(top: 30.rpx),
|
||||||
|
onTap: () {},
|
||||||
|
child: Container(
|
||||||
|
decoration: const BoxDecoration(
|
||||||
|
border: Border(
|
||||||
|
bottom: BorderSide(
|
||||||
|
color: Color(0xFF85F5FF),
|
||||||
|
width: 0), // 下边线
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Text(
|
||||||
|
'点击复制APP下载链接',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xFF85F5FF), // 蓝色文字
|
||||||
|
|
||||||
|
fontSize: 22.rpx,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
// Container(
|
||||||
|
// width: MediaQuery.sizeOf(context).width,
|
||||||
|
// constraints: const BoxConstraints(
|
||||||
|
// minHeight: 46,
|
||||||
|
// ),
|
||||||
|
// decoration: BoxDecoration(
|
||||||
|
// borderRadius: BorderRadius.circular(0),
|
||||||
|
// ),
|
||||||
|
// child: Align(
|
||||||
|
// alignment:
|
||||||
|
// const AlignmentDirectional(0, 0),
|
||||||
|
// child: Obx(() {
|
||||||
|
// if (controller.model.show == 0) {
|
||||||
|
// return Container();
|
||||||
|
// } else {
|
||||||
|
// return GestureDetector(
|
||||||
|
// onTap: controller
|
||||||
|
// .model.msg!.isNotEmpty
|
||||||
|
// ? () {
|
||||||
|
// Clipboard.setData(
|
||||||
|
// ClipboardData(
|
||||||
|
// text: CommonVariables
|
||||||
|
// .shareText));
|
||||||
|
// showToast(
|
||||||
|
// "复制成功,粘贴分享APP下载链接!",
|
||||||
|
// color: color_success);
|
||||||
|
// }
|
||||||
|
// : null, // 不可点击时设置为 null
|
||||||
|
// child: RichText(
|
||||||
|
// textAlign: TextAlign
|
||||||
|
// .center, // 设置整个 RichText 内容居中
|
||||||
|
// text: TextSpan(
|
||||||
|
// children:
|
||||||
|
// controller.model.msg!
|
||||||
|
// .isNotEmpty
|
||||||
|
// ? [
|
||||||
|
// TextSpan(
|
||||||
|
// text: controller
|
||||||
|
// .model
|
||||||
|
// .msg! +
|
||||||
|
// "!", // 第一部分文本
|
||||||
|
// style: FlutterFlowTheme.of(
|
||||||
|
// context)
|
||||||
|
// .bodyMedium
|
||||||
|
// .override(
|
||||||
|
// fontFamily:
|
||||||
|
// 'Readex Pro',
|
||||||
|
// color: const Color(
|
||||||
|
// 0xFFE55E92), // 设置为粉红色
|
||||||
|
// fontSize:
|
||||||
|
// 26.rpx,
|
||||||
|
// letterSpacing:
|
||||||
|
// 0.0,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// const TextSpan(
|
||||||
|
// text:
|
||||||
|
// '\n', // 添加换行
|
||||||
|
// ),
|
||||||
|
// WidgetSpan(
|
||||||
|
// child: SizedBox(
|
||||||
|
// height: 20
|
||||||
|
// .rpx), // 添加间距
|
||||||
|
// ),
|
||||||
|
// TextSpan(
|
||||||
|
// text:
|
||||||
|
// '点击复制APP下载链接', // 第二部分文本
|
||||||
|
// style: FlutterFlowTheme.of(
|
||||||
|
// context)
|
||||||
|
// .bodyMedium
|
||||||
|
// .override(
|
||||||
|
// fontFamily:
|
||||||
|
// 'Readex Pro',
|
||||||
|
// color: const Color(
|
||||||
|
// 0xFF1890FF), // 设置为蓝色
|
||||||
|
// fontSize:
|
||||||
|
// 20.rpx,
|
||||||
|
// letterSpacing:
|
||||||
|
// 0.0,
|
||||||
|
// decoration:
|
||||||
|
// TextDecoration
|
||||||
|
// .underline, // 添加下划线
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ]
|
||||||
|
// : [
|
||||||
|
// TextSpan(
|
||||||
|
// text:
|
||||||
|
// '发送成功!', // 当 msg 为空时显示的文本
|
||||||
|
// style: FlutterFlowTheme.of(
|
||||||
|
// context)
|
||||||
|
// .bodyMedium
|
||||||
|
// .override(
|
||||||
|
// fontFamily:
|
||||||
|
// 'Readex Pro',
|
||||||
|
// color: const Color(
|
||||||
|
// 0xFF07C160), // 设置为绿色
|
||||||
|
// fontSize:
|
||||||
|
// 20.rpx,
|
||||||
|
// letterSpacing:
|
||||||
|
// 0.0,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
// })),
|
||||||
|
// ),
|
||||||
|
|
||||||
|
Obx(
|
||||||
|
() => GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
// 当点击时,将 type 设置为 0(允许控制)
|
||||||
|
controller.model.type = 1;
|
||||||
|
controller.updateAll();
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(top: 76.rpx),
|
||||||
|
width: MediaQuery.sizeOf(context).width,
|
||||||
|
constraints: const BoxConstraints(
|
||||||
|
minHeight: 46,
|
||||||
|
),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.circular(0),
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
'允许对方控制该设备',
|
||||||
|
style:
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
'Readex Pro',
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 26.rpx,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Radio<int>(
|
||||||
|
value: 1,
|
||||||
|
groupValue: controller.model.type,
|
||||||
|
onChanged: (value) {
|
||||||
|
controller.model.type = value!;
|
||||||
|
controller.updateAll();
|
||||||
|
},
|
||||||
|
activeColor:
|
||||||
|
const Color(0xFF6BFDAC),
|
||||||
|
materialTapTargetSize:
|
||||||
|
MaterialTapTargetSize
|
||||||
|
.shrinkWrap, // 减少内边距
|
||||||
|
visualDensity: VisualDensity(
|
||||||
|
horizontal: -4,
|
||||||
|
vertical: -4), // 缩小视觉密度
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Obx(
|
||||||
|
() => GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
// 当点击时,将 type 设置为 1(仅允许查看)
|
||||||
|
controller.model.type = 2;
|
||||||
|
controller.updateAll();
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
width: MediaQuery.sizeOf(context).width,
|
||||||
|
constraints: const BoxConstraints(
|
||||||
|
minHeight: 46,
|
||||||
|
),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.circular(0),
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
'仅允许对方查看该设备',
|
||||||
|
style:
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
'Readex Pro',
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 26.rpx,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Radio<int>(
|
||||||
|
value: 2,
|
||||||
|
groupValue: controller.model.type,
|
||||||
|
onChanged: (value) {
|
||||||
|
controller.model.type = value!;
|
||||||
|
controller.updateAll();
|
||||||
|
},
|
||||||
|
activeColor:
|
||||||
|
const Color(0xFF6BFDAC),
|
||||||
|
materialTapTargetSize:
|
||||||
|
MaterialTapTargetSize
|
||||||
|
.shrinkWrap, // 减少内边距
|
||||||
|
visualDensity: VisualDensity(
|
||||||
|
horizontal: -4,
|
||||||
|
vertical: -4), // 缩小视觉密度
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Align(
|
||||||
|
alignment: const AlignmentDirectional(0, 0),
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsetsDirectional.fromSTEB(
|
||||||
|
0, 46.rpx, 0, 0),
|
||||||
|
child: Container(
|
||||||
|
width: 108,
|
||||||
|
height: 31,
|
||||||
|
decoration: BoxDecoration(),
|
||||||
|
child: FFButtonWidget(
|
||||||
|
onPressed: () async {
|
||||||
|
//todo 1:验证用户是否存在 2:发送邀请
|
||||||
|
// controller.model.show = 1;
|
||||||
|
// String msg =
|
||||||
|
// await controller.sendInvite(
|
||||||
|
// controller.model.phone,
|
||||||
|
// deviceController
|
||||||
|
// .model.deviceMain['mac']);
|
||||||
|
// if (msg != null && msg.isNotEmpty) {
|
||||||
|
// controller.model.msg = msg;
|
||||||
|
// }
|
||||||
|
// controller.updateAll();
|
||||||
|
},
|
||||||
|
text: '发送邀请',
|
||||||
|
options: FFButtonOptions(
|
||||||
|
height: 60.rpx,
|
||||||
|
padding:
|
||||||
|
EdgeInsetsDirectional.fromSTEB(
|
||||||
|
30.rpx, 0, 30.rpx, 0),
|
||||||
|
color: const Color(0xFF84F5FF),
|
||||||
|
textStyle:
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.titleSmall
|
||||||
|
.override(
|
||||||
|
fontFamily: 'Readex Pro',
|
||||||
|
color: Color(0xFF011D33),
|
||||||
|
fontSize: 26.rpx,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
),
|
||||||
|
elevation: 0,
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.circular(50),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsetsDirectional.fromSTEB(
|
||||||
|
0, 100.rpx, 0, 32.rpx),
|
||||||
|
child: Container(
|
||||||
|
width: MediaQuery.sizeOf(context).width,
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
children: [
|
||||||
|
Align(
|
||||||
|
alignment:
|
||||||
|
const AlignmentDirectional(-1, 0),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsetsDirectional
|
||||||
|
.fromSTEB(14, 0, 0, 16),
|
||||||
|
child: Text(
|
||||||
|
'已分享用户',
|
||||||
|
style: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: 'Readex Pro',
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 30.rpx,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
lineHeight: 1),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Obx(
|
||||||
|
() {
|
||||||
|
// 检查 shareUser 是否为空或数量为 0
|
||||||
|
if (controller.model.shareUser ==
|
||||||
|
null ||
|
||||||
|
controller
|
||||||
|
.model.shareUser!.isEmpty) {
|
||||||
|
// return Container(
|
||||||
|
// alignment: AlignmentDirectional
|
||||||
|
// .centerStart, // 确保文字靠左对齐
|
||||||
|
// padding: EdgeInsets.symmetric(
|
||||||
|
// horizontal: 16.0), // 根据需要设置内边距
|
||||||
|
// child: Text(
|
||||||
|
// "暂无分享!",
|
||||||
|
// textAlign: TextAlign.left, // 文字左对齐
|
||||||
|
// style: FlutterFlowTheme.of(context)
|
||||||
|
// .bodyMedium, // 可根据需要自定义样式
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
return EmptyMessageWidget(
|
||||||
|
imagePath:
|
||||||
|
"assets/images/emptyUser.png",
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 否则显示正常的 ListView
|
||||||
|
return ListView(
|
||||||
|
controller:
|
||||||
|
scrollController, // 绑定 ScrollController
|
||||||
|
shrinkWrap: true,
|
||||||
|
scrollDirection: Axis.vertical,
|
||||||
|
children: (controller.model.shareUser!
|
||||||
|
.asMap()
|
||||||
|
.entries
|
||||||
|
.map((e) => ShareUserWidget(
|
||||||
|
index: e.key,
|
||||||
|
repairListController:
|
||||||
|
controller))
|
||||||
|
.toList() as List<Widget>)
|
||||||
|
// .divide(const SizedBox(
|
||||||
|
// height: 13,
|
||||||
|
// ))
|
||||||
|
.addToEnd(const SizedBox(
|
||||||
|
height:
|
||||||
|
AppConstants.list_end_height,
|
||||||
|
)),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -59,7 +59,6 @@ class ExperienceStoreWidget extends GetView {
|
|||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontSize: 30.rpx,
|
fontSize: 30.rpx,
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
letterSpacing: 0,
|
letterSpacing: 0,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -279,28 +279,30 @@ class _MinePageState extends State<NewMinePage> {
|
|||||||
// 直接使用 SingleChildScrollView
|
// 直接使用 SingleChildScrollView
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
_buildListTile(
|
_buildListTile('assets/img/icon/order.svg',
|
||||||
Icons.receipt_long, '我的订单', '快捷查看我在网上的订单记录',
|
'我的订单', '快捷查看我在网上的订单记录',
|
||||||
showTopLine: true, path: "/issueListpage"),
|
showTopLine: true, path: "/issueListpage"),
|
||||||
_buildListTile(Icons.store_mall_directory, '门店体验',
|
_buildListTile('assets/img/icon/store.svg',
|
||||||
'如果想免费体验智能设备,可在此进行提前预约',
|
'门店体验', '如果想免费体验智能设备,可在此进行提前预约',
|
||||||
path: "/experienceStorePage"),
|
path: "/experienceStorePage"),
|
||||||
_buildListTile(
|
_buildListTile(
|
||||||
Icons.build,
|
'assets/img/icon/repair.svg',
|
||||||
'设备报修',
|
'设备报修',
|
||||||
'当您的智能设备需要报修时,可以通过该功能联系解决,',
|
'当您的智能设备需要报修时,可以通过该功能联系解决,',
|
||||||
path: '/deviceRepairPage',
|
path: '/deviceRepairPage',
|
||||||
),
|
),
|
||||||
_buildListTile(
|
_buildListTile('assets/img/icon/mall.svg', '网上商城',
|
||||||
Icons.shopping_cart, '网上商城', '最新的智能产品线上购买服务',
|
'最新的智能产品线上购买服务',
|
||||||
path: "/issueListpage"),
|
path: "/issueListpage"),
|
||||||
_buildListTile(
|
_buildListTile('assets/img/icon/address.svg',
|
||||||
Icons.location_on, '地址管理', '用于收货和报修时联系您',
|
'地址管理', '用于收货和报修时联系您',
|
||||||
path: "/addressListPage"),
|
path: "/addressListPage"),
|
||||||
_buildListTile(Icons.help_outline, '问题与帮助',
|
_buildListTile('assets/img/icon/help.svg',
|
||||||
'常见的问题汇总,如:智能床连接流程、如何查看睡眠报告',
|
'问题与帮助', '常见的问题汇总,如:智能床连接流程、如何查看睡眠报告',
|
||||||
path: "/issueListpage"),
|
path: "/issueListpage"),
|
||||||
_buildListTile(Icons.headset_mic, '在线客服',
|
_buildListTile(
|
||||||
|
'assets/img/icon/customer_service.svg',
|
||||||
|
'在线客服',
|
||||||
'购买和使用智能床过程中,如果遇到疑问可与客服进行联系',
|
'购买和使用智能床过程中,如果遇到疑问可与客服进行联系',
|
||||||
path: "/issueListpage"),
|
path: "/issueListpage"),
|
||||||
],
|
],
|
||||||
@@ -331,7 +333,7 @@ class _MinePageState extends State<NewMinePage> {
|
|||||||
|
|
||||||
/// 构建列表项(带分隔线)
|
/// 构建列表项(带分隔线)
|
||||||
Widget _buildListTile(
|
Widget _buildListTile(
|
||||||
IconData icon,
|
String svgPath,
|
||||||
String title,
|
String title,
|
||||||
String subtitle, {
|
String subtitle, {
|
||||||
// VoidCallback? onTap,
|
// VoidCallback? onTap,
|
||||||
@@ -359,7 +361,13 @@ class _MinePageState extends State<NewMinePage> {
|
|||||||
padding: EdgeInsets.fromLTRB(40.rpx, 0.rpx, 40.rpx, 0.rpx),
|
padding: EdgeInsets.fromLTRB(40.rpx, 0.rpx, 40.rpx, 0.rpx),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Icon(icon, color: const Color(0xFF85F5FF), size: 28.rpx),
|
Container(
|
||||||
|
child: SvgPicture.asset(
|
||||||
|
svgPath,
|
||||||
|
width: 42.rpx,
|
||||||
|
height: 42.rpx,
|
||||||
|
),
|
||||||
|
),
|
||||||
SizedBox(width: 30.rpx),
|
SizedBox(width: 30.rpx),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Column(
|
child: Column(
|
||||||
|
|||||||
@@ -35,10 +35,7 @@ class _PeopleInfoState extends State<PeopleInfoPage> {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
getLine() {
|
getLine() {
|
||||||
return Container(
|
return Container(height: 0.5.rpx, color: Color(0xFFD8D8D8));
|
||||||
height: 1,
|
|
||||||
color: stringToColor("#152676"),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -163,7 +160,7 @@ class _PeopleInfoState extends State<PeopleInfoPage> {
|
|||||||
.bodyMedium
|
.bodyMedium
|
||||||
.override(
|
.override(
|
||||||
fontFamily: 'Readex Pro',
|
fontFamily: 'Readex Pro',
|
||||||
color: stringToColor("#9EA4B7"),
|
color: Color(0XFF011D33),
|
||||||
letterSpacing: 0,
|
letterSpacing: 0,
|
||||||
fontSize: 30.rpx,
|
fontSize: 30.rpx,
|
||||||
),
|
),
|
||||||
@@ -754,6 +751,7 @@ class _PeopleInfoState extends State<PeopleInfoPage> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
getLine(),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import 'package:ef/ef.dart';
|
import 'package:ef/ef.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_svg/svg.dart';
|
||||||
import 'package:flutterflow_ui/flutterflow_ui.dart';
|
import 'package:flutterflow_ui/flutterflow_ui.dart';
|
||||||
import 'package:vbvs_app/common/color/appColors.dart';
|
import 'package:vbvs_app/common/color/appColors.dart';
|
||||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||||
@@ -200,8 +201,24 @@ class RepairHistoryWidget extends GetView<RepairInfoController> {
|
|||||||
'',
|
'',
|
||||||
style: TextStyle(color: Colors.white, fontSize: 26.rpx),
|
style: TextStyle(color: Colors.white, fontSize: 26.rpx),
|
||||||
),
|
),
|
||||||
Icon(Icons.arrow_forward_ios,
|
ClickableContainer(
|
||||||
color: Colors.white, size: 30.rpx),
|
backgroundColor: Colors.transparent,
|
||||||
|
highlightColor: Colors.transparent,
|
||||||
|
padding: EdgeInsets.only(right: 0),
|
||||||
|
onTap: () {},
|
||||||
|
child: Container(
|
||||||
|
height: 30.rpx,
|
||||||
|
width: 30.rpx,
|
||||||
|
child: SvgPicture.asset(
|
||||||
|
'assets/img/icon/expand.svg',
|
||||||
|
color: Colors.white,
|
||||||
|
)
|
||||||
|
// Icon(
|
||||||
|
// Icons.arrow_forward_ios,
|
||||||
|
// color: Colors.white,
|
||||||
|
// // size: 14.rpx,
|
||||||
|
// ),
|
||||||
|
)),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -22,12 +22,12 @@ class SearchWidget extends GetView {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: EdgeInsetsDirectional.fromSTEB(25, 0, 25, 0),
|
padding: EdgeInsetsDirectional.fromSTEB(30.rpx, 0, 30.rpx, 0),
|
||||||
child: Container(
|
child: Container(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: themeController.currentColor.sc3,
|
color: themeController.currentColor.sc3,
|
||||||
borderRadius: BorderRadius.circular(20.rpx),
|
borderRadius: BorderRadius.circular(16.rpx),
|
||||||
),
|
),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsetsDirectional.fromSTEB(35.rpx, 0, 35.rpx, 0),
|
padding: EdgeInsetsDirectional.fromSTEB(35.rpx, 0, 35.rpx, 0),
|
||||||
@@ -39,24 +39,21 @@ class SearchWidget extends GetView {
|
|||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Container(
|
||||||
padding: EdgeInsetsDirectional.fromSTEB(0, 0.rpx, 0, 0),
|
width: 25.rpx,
|
||||||
child: Container(
|
height: 25.rpx,
|
||||||
width: 25.rpx,
|
// width: double.infinity,
|
||||||
height: 25.rpx,
|
decoration: BoxDecoration(),
|
||||||
// width: double.infinity,
|
child: SvgPicture.asset(
|
||||||
decoration: BoxDecoration(),
|
'assets/img/icon/query.svg',
|
||||||
child: SvgPicture.asset(
|
fit: BoxFit.cover,
|
||||||
'assets/img/icon/query.svg',
|
color: stringToColor("#333333"), //固定
|
||||||
fit: BoxFit.cover,
|
|
||||||
color: stringToColor("#333333"), //固定
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 100.rpx,
|
width: 100.rpx,
|
||||||
height: 80.rpx,
|
height: 60.rpx,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color:
|
color:
|
||||||
FlutterFlowTheme.of(context).secondaryBackground,
|
FlutterFlowTheme.of(context).secondaryBackground,
|
||||||
@@ -79,10 +76,10 @@ class SearchWidget extends GetView {
|
|||||||
hintStyle: FlutterFlowTheme.of(context)
|
hintStyle: FlutterFlowTheme.of(context)
|
||||||
.labelMedium
|
.labelMedium
|
||||||
.override(
|
.override(
|
||||||
fontFamily: 'Inter',
|
fontFamily: 'Inter',
|
||||||
fontSize: 26.rpx,
|
fontSize: 26.rpx,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
),
|
color: Color(0XFFC8CBD2)),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: Color(0x00000000),
|
color: Color(0x00000000),
|
||||||
@@ -113,12 +110,15 @@ class SearchWidget extends GetView {
|
|||||||
),
|
),
|
||||||
filled: false,
|
filled: false,
|
||||||
fillColor: themeController.currentColor.sc22,
|
fillColor: themeController.currentColor.sc22,
|
||||||
|
contentPadding: EdgeInsets.symmetric(
|
||||||
|
vertical: 12.rpx, horizontal: 12.rpx), // 关键设置
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context)
|
style: FlutterFlowTheme.of(context)
|
||||||
.bodyMedium
|
.bodyMedium
|
||||||
.override(
|
.override(
|
||||||
fontFamily: 'Inter',
|
fontFamily: 'Inter',
|
||||||
fontSize: 26.rpx,
|
fontSize: 26.rpx,
|
||||||
|
color: Colors.black,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
),
|
),
|
||||||
cursorColor:
|
cursorColor:
|
||||||
@@ -161,7 +161,6 @@ class SearchWidget extends GetView {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import 'package:ef/ef.dart';
|
import 'package:ef/ef.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:vbvs_app/component/tool/TopSlideNotification.dart';
|
import 'package:vbvs_app/component/tool/TopSlideNotification.dart';
|
||||||
|
|
||||||
import 'package:vbvs_app/controller/theme_controller/ThemeController.dart';
|
import 'package:vbvs_app/controller/theme_controller/ThemeController.dart';
|
||||||
import 'package:vbvs_app/controller/user_info_controller.dart';
|
import 'package:vbvs_app/controller/user_info_controller.dart';
|
||||||
import 'package:vbvs_app/main.dart';
|
import 'package:vbvs_app/main.dart';
|
||||||
@@ -11,7 +12,9 @@ import 'package:vbvs_app/pages/mh_page/address_list_page.dart';
|
|||||||
import 'package:vbvs_app/pages/mh_page/apply_repair_page.dart';
|
import 'package:vbvs_app/pages/mh_page/apply_repair_page.dart';
|
||||||
import 'package:vbvs_app/pages/mh_page/book_info_page.dart';
|
import 'package:vbvs_app/pages/mh_page/book_info_page.dart';
|
||||||
import 'package:vbvs_app/pages/mh_page/book_success_page.dart';
|
import 'package:vbvs_app/pages/mh_page/book_success_page.dart';
|
||||||
|
import 'package:vbvs_app/pages/mh_page/device_list.dart';
|
||||||
import 'package:vbvs_app/pages/mh_page/device_people_info.dart';
|
import 'package:vbvs_app/pages/mh_page/device_people_info.dart';
|
||||||
|
import 'package:vbvs_app/pages/mh_page/device_share_page.dart';
|
||||||
import 'package:vbvs_app/pages/mh_page/edit_bed.dart';
|
import 'package:vbvs_app/pages/mh_page/edit_bed.dart';
|
||||||
import 'package:vbvs_app/pages/mh_page/user/page/edit_userinfo_page.dart';
|
import 'package:vbvs_app/pages/mh_page/user/page/edit_userinfo_page.dart';
|
||||||
import 'package:vbvs_app/pages/mh_page/experience_store_page.dart';
|
import 'package:vbvs_app/pages/mh_page/experience_store_page.dart';
|
||||||
@@ -64,6 +67,8 @@ var mhroutes = {
|
|||||||
"/findPasswordPage": (context) => FindPasswordPage(),
|
"/findPasswordPage": (context) => FindPasswordPage(),
|
||||||
"/loginPage": (context) => MHTLoginPage(),
|
"/loginPage": (context) => MHTLoginPage(),
|
||||||
"/updatePasswordPage": (context) => UpdatePasswordPage(),
|
"/updatePasswordPage": (context) => UpdatePasswordPage(),
|
||||||
|
"/deviceSharePage": (context) => ShareDeviceWidget(),
|
||||||
|
"/deviceListPage": (context) => DeviceListPage(),
|
||||||
};
|
};
|
||||||
var mhonGenerateRoute = (RouteSettings settings) {
|
var mhonGenerateRoute = (RouteSettings settings) {
|
||||||
final String? name = settings.name; // 获取路由名称,如 /news 或 /search
|
final String? name = settings.name; // 获取路由名称,如 /news 或 /search
|
||||||
@@ -74,39 +79,16 @@ var mhonGenerateRoute = (RouteSettings settings) {
|
|||||||
int loginStatus = userInfoController.model.login!;
|
int loginStatus = userInfoController.model.login!;
|
||||||
|
|
||||||
// 检查用户是否已登录,如果未登录且路由不是登录相关页面,跳转到登录页面
|
// 检查用户是否已登录,如果未登录且路由不是登录相关页面,跳转到登录页面
|
||||||
// if (loginStatus != 1) {
|
|
||||||
// // 如果用户未登录且访问的不是登录页面等,展示提示并重定向
|
|
||||||
// if (settings.name != "/loginPage" &&
|
|
||||||
// settings.name != "/otherLoginPage" &&
|
|
||||||
// settings.name != "/mianPageBottomChange") {
|
|
||||||
// TopSlideNotification.show(
|
|
||||||
// Get.context!,
|
|
||||||
// text: "必须登录提示".tr,
|
|
||||||
// textColor: themeController.currentColor.sc9,
|
|
||||||
// );
|
|
||||||
|
|
||||||
// // 创建新的 RouteSettings,并修改 name 为 /loginPage
|
|
||||||
// final updatedSettings = RouteSettings(
|
|
||||||
// name: "/loginPage",
|
|
||||||
// arguments: settings.arguments,
|
|
||||||
// );
|
|
||||||
|
|
||||||
// // 创建一个新的路由,跳转到登录页面
|
|
||||||
// return CupertinoPageRoute(
|
|
||||||
// settings: updatedSettings,
|
|
||||||
// builder: (context) => pageContentBuilder!(context),
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
if (loginStatus != 1) {
|
if (loginStatus != 1) {
|
||||||
if (settings.name != "/loginPage" &&
|
if (settings.name != "/loginPage" &&
|
||||||
settings.name != "/otherLoginPage" &&
|
settings.name != "/otherLoginPage" &&
|
||||||
settings.name != "/mianPageBottomChange") {
|
settings.name != "/mianPageBottomChange") {
|
||||||
TopSlideNotification.show(
|
// TopSlideNotification.show(
|
||||||
navigatorKey.currentContext!,
|
// navigatorKey.currentContext!,
|
||||||
text: "必须登录提示".tr,
|
// text: "必须登录提示".tr,
|
||||||
textColor: themeController.currentColor.sc9,
|
// textColor: themeController.currentColor.sc9,
|
||||||
);
|
// );
|
||||||
return CupertinoPageRoute(
|
return CupertinoPageRoute(
|
||||||
settings: RouteSettings(
|
settings: RouteSettings(
|
||||||
name: "/loginPage",
|
name: "/loginPage",
|
||||||
|
|||||||