浏览代码

处理公版食谱搜索问题,新增帮助文档页面

zhangshenjie 3 月之前
父节点
当前提交
27085ea49e

+ 17 - 11
BusinessSetting/src/main/java/com/develop/setting/init/ui/HelpDocsActivity.kt

@@ -4,32 +4,37 @@ import android.annotation.SuppressLint
 import androidx.appcompat.app.AppCompatActivity
 import android.os.Bundle
 import android.util.Log
+import android.view.LayoutInflater
 import android.webkit.WebView
 import android.webkit.WebViewClient
 import com.alibaba.android.arouter.facade.annotation.Route
 import com.develop.food.base.router.Screens
+import com.develop.food.base.ui.BaseActivity
 import com.develop.food.base.utils.CURRENT_LANGUAGE
 import com.develop.food.base.utils.MmkvUtils
 import com.develop.food.base.utils.getSN
 import com.develop.setting.R
 import com.develop.food.base.utils.CURRENT_LANGUAGE
 import com.develop.food.base.widgets.TopTitleView
+import com.develop.setting.databinding.ActivityHelpDocsBinding
+import com.develop.setting.databinding.ActivityPrivacePolicyBinding
+
 @Route(path = Screens.Setting. HELP)
-class HelpDocsActivity : AppCompatActivity() {
-    @SuppressLint("MissingInflatedId")
+class HelpDocsActivity : BaseActivity<ActivityHelpDocsBinding>() {
+    override fun createViewBinding(inflater: LayoutInflater): ActivityHelpDocsBinding {
+        return   ActivityHelpDocsBinding.inflate(inflater)
+    }
+
     override fun onCreate(savedInstanceState: Bundle?) {
         super.onCreate(savedInstanceState)
-        setContentView(R.layout.activity_help_docs)
-        val topBar = findViewById<TopTitleView>(R.id.top_bar)
-        topBar.listenBackClick {
+        binding.topBar.listenBackClick {
             finish()
         }
-        topBar.setTopBarTitle(R.string.help)
+        binding.topBar.setTopBarTitle(R.string.help)
 
 
-        val webView = findViewById<WebView>(R.id.help_webview)
-        webView.getSettings().setJavaScriptEnabled(true);
-        webView.webViewClient = object : WebViewClient() {
+        binding.helpWebview.getSettings().setJavaScriptEnabled(true);
+        binding.helpWebview.webViewClient = object : WebViewClient() {
             override fun shouldOverrideUrlLoading(view: WebView, url: String): Boolean {
                 // 在WebView中加载链接
                 view.loadUrl(url)
@@ -40,9 +45,10 @@ class HelpDocsActivity : AppCompatActivity() {
         if (language == null) {
             language = "EN"
         }
+        //000A 先全部显示英语帮助
+        if (getSN().startsWith("000A")) language = "EN"
         var url = "file:///android_asset/help/${language}/help.html"
-        webView.loadUrl(url)
-
+        binding.helpWebview.loadUrl(url)
 
     }
 }

+ 205 - 0
app/src/main/assets/help/EN/help.html

@@ -0,0 +1,205 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+  <meta charset="UTF-8">
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  <title>The FAQ's</title>
+</head>
+
+<style>
+  * {
+    margin: 0;
+    padding: 0;
+  }
+
+  body {
+    background-color: #ffffff;
+    height: 100vh;
+    color: #000000;
+    padding: 12px;
+  }
+
+  p {
+    font-size: 14px;
+  }
+
+  .item {
+    margin-top: 14px;
+  }
+
+  .item h3 {
+    position: relative;
+  }
+
+  .item h3::after {
+    content: "";
+    display: inline-block;
+    width: 12px;
+    height: 12px;
+    border-top: 2px solid #000000;
+    border-right: 2px solid #000000;
+    transform: rotate(136deg);
+    margin-left: 14px;
+  }
+
+  .item p,
+  .item ul {
+    display: none;
+    margin-top: 8px;
+  }
+
+  .item:hover p,
+  .item:hover ul {
+    display: block;
+  }
+</style>
+
+<body>
+  <h2>The FAQ's</h2>
+  <div class="item">
+    <h3>The blade twisted from my first preparation.</h3>
+    <p>The blade is not damaged, you can see it by looking at its specific shape in your manual, it has a more curved
+      blade in order to better mix the ingredients.</p>
+  </div>
+
+  <div class="item">
+    <h3>Smoke comes out of the back of the device during the first use.</h3>
+    <p>This phenomenon is normal, the smoke comes from the windings of the engine which, being new, can give off smoke
+      and a slight smell of "hot plastic" during the first USES. This phenomenon will be mitigated and will disappear in
+      use./p>
+  </div>
+
+  <div class="item">
+    <h3>My robot no longer heats or does not rise to the requested temperature.</h3>
+    <p>After reserving the preparation and cooling the bowl, simply reset the thermal probe placed under the bowl by
+      pressing with your finger until you hear a "click".</p>
+  </div>
+
+  <div class="item">
+    <h3>Error message on screen during recipe process.</h3>
+    <p>The robot is equipped with safety devices to minimize the risk of engine overload (overflow or excessive
+      preparation). To solve this problem, please turn off the device and let it cool for approximately 20 to 30
+      minutes. Afterwards, the problem should be resolved. If you still see that the robot cooker cannot be opened,
+      please repeat the cooling process. If other methods do not work, please contact after-sales service.</p>
+  </div>
+
+  <div class="item">
+    <h3>The bowl is not fully placed in the base, or the lid is not in the locked position.</h3>
+    <p>Check if the accessory drive shaft is fully locked (at the top of the bowl).</p>
+  </div>
+
+  <div class="item">
+    <h3>Accessories: I lost the steam basket, lost the push rod, and broke the whip.</h3>
+    <p>Customers can purchase parts directly on the website , or place orders directly at the email address through POS
+    </p>
+  </div>
+
+  <div class="item">
+    <h3>The lid is difficult to close.</h3>
+    <p>Oil the lid seal after each cleaning (e.g. lubricate fingers with vegetable oil and apply to the seal).</p>
+  </div>
+
+  <div class="item">
+    <h3>I am unable to connect to WiFi: the password is correct, close to the box.</h3>
+    <p>This issue stems from the WiFi security protocol used by the box. The box must use the latest protocol (WPA2),
+      and you must update the software of the box.</p>
+  </div>
+
+  <div class="item">
+    <h3>Do I need a WiFi connection to create a recipe ?</h3>
+    <p>No, WiFi connection is only used for recipe updates.</p>
+  </div>
+
+  <div class="item">
+    <h3>What temperature does my robot heat up to ?</h3>
+    <p>In manual mode, the robot can heat from 37 ° C to 130 ° C, and you can choose to change the temperature in
+      increments of 5 ° C. The temperature dial only displays the temperature of the formulation above 37 ° C..</p>
+    <p>*Some automatic recipes in can be cooked at 160 ° C, but manual mode is limited to 130 ° C.</p>
+  </div>
+
+  <div class="item">
+    <h3>What is the engine speed ?</h3>
+    <p>The speed can be adjusted from 1 to 12.</p>
+    <p>For safety reasons, the robot limits its speed to 3 during cooking activities.</p>
+  </div>
+
+
+  <div class="item">
+    <h3>How to clean my robot ?</h3>
+    <p>After turning off and unplugging the power cord, it is recommended to immediately rinse the bowl and accessories
+      with hot water after using the robot.</p>
+    <p>If there are burn marks on the bottom of the bowl, it is best to soak the inside of the bowl and occasionally rub
+      the bottom of the bowl with a sponge until the food peels off.</p>
+    <p>You can also start the cleaning program. </p>
+  </div>
+
+  <div class="item">
+    <h3>Can all accessories be dishwashers ?</h3>
+    <p>All accessories of the robot can be placed in the dishwasher (except for the engine block). </p>
+  </div>
+
+  <div class="item">
+    <h3>Some foods can cause plastic to change color. How to clean ?</h3>
+    <p>Some colored ingredients, such as curry, tomatoes, carrots, etc., can contaminate plastic parts, and this
+      coloring effect is not always avoidable. This color has no impact on your health or the functionality of the
+      accessory.
+      To reduce color, wipe the stained area with a cloth or tissue soaked in cooking oil and then perform regular
+      cleaning.</p>
+    <p>Cleaning must be carried out immediately after use to reduce staining.</p>
+    <p>Note: This issue is not covered by the warranty as it is an aesthetic issue, not a malfunction.</p>
+  </div>
+
+  <div class="item">
+    <h3>White spots appeared on the cooking cover. How to remove them ?</h3>
+    <p>These marks are tartar deposits generated by the use of limestone water during cooking. Anti scaling solution
+      should be used and the lid should be soaked for a sufficient time to soften the marks.</p>
+    <p>Please note that the longer the cooking time these stains take, the harder they become and the more difficult it
+      is to remove them. Therefore, we recommend removing them immediately upon detection.</p>
+  </div>
+
+  <div class="item">
+    <h3>How to clean food that burns and adheres to the bottom of the bowl ?</h3>
+    <p>There are several solutions, for example, you can put a bottom water and soak it in baking soda, lemon, or
+      dishwashing solution.</p>
+    <p>You can also heat some white vinegar water and a few drops of dishwashing liquid in a bowl, and let it sit for a
+      while before cleaning. If everything does not disappear, restart the operation.</p>
+    <p>A particularly effective tip is to put a dishwasher pellet and some hot water in it and let it soak for a while.
+    </p>
+  </div>
+
+  <div class="item">
+    <h3>How to avoid food still adhering to the bowl on preparations that need to be cooked?</h3>
+    <p>Before starting cooking the recipe, we suggest using soaked absorbent paper to oil the bottom of the bowl. This
+      regular maintenance will prevent food from sticking to the bowl. For sugary preparations, use a little lemon juice
+      instead of oil</p>
+  </div>
+
+
+  <div class="item">
+    <h3>Incorrect mixing or incomplete cooking of ingredients</h3>
+    <p>This may be because the recipe in question may require more cooking time.
+      Although theoretically there is a clear cooking time for food in the recipe, the cooking time may vary due to
+      several factors :</p>
+    <ul>
+      <li>Food temperature during recipe ;;</li>
+      <li>If you don't take the ingredients out of the refrigerator and they're not at room temperature ;</li>
+      <li>Source and maturity of ingredients.</li>
+    </ul>
+  </div>
+
+  <div class="item">
+    <h3>I don't know how to heat pre prepared dishes.</h3>
+    <p>R : You must switch to manual mode and select temperature, duration, etc. based on the preparation to be
+      preheated.</p>
+  </div>
+
+  <div class="item">
+    <h3>Equipment overflow during cooking process.</h3>
+    <p>R : This phenomenon is due to the high temperature of the liquid and food in the bowl, which increases the
+      pressure inside the bowl and causes overflow. To avoid this situation, lower the temperature or use a large steam
+      basket with a glass lid instead of a cooking lid.</p>
+  </div>
+</body>
+
+</html>

+ 2 - 2
libBase/src/main/java/com/develop/food/base/utils/GlobalExt.kt

@@ -279,8 +279,8 @@ fun getSN(): String {
     var serial: String
     if (BuildConfig.DEBUG) {
 //        return "034A30150020123010165431"
-      return "000A30150020123010190001"
-//        return "058A30150020123010190001"
+//      return "000A30150020123010190001"
+        return "058A30150020123010190001"
     } else {
         try {
             val c = Class.forName("android.os.SystemProperties")

+ 1 - 1
libBase/src/main/res/layout/home_sort_filter_search_view.xml

@@ -95,7 +95,7 @@
         android:id="@+id/searchLayout"
         android:layout_width="match_parent"
         android:layout_height="@dimen/convert_120px"
-        android:visibility="visible">
+        android:visibility="gone">
 
         <ImageView
             android:id="@+id/iv_back"