Browse Source

设计了简单的微信小程序界面

qw 5 months ago
parent
commit
406d3e0fbb
100 changed files with 1832 additions and 852 deletions
  1. BIN
      SoilAcidification.db
  2. 12 14
      app.js
  3. 30 16
      app.json
  4. BIN
      assets/taddar/12.png
  5. BIN
      assets/taddar/W020241210635035429857_ORIGIN.jpg
  6. BIN
      assets/taddar/微信图片_20241209174643.png
  7. BIN
      assets/taddar/微信图片_20241209174946.png
  8. BIN
      assets/taddar/首页 (1).png
  9. BIN
      assets/taddar/首页 (2).png
  10. BIN
      assets/taddar/首页 (3).png
  11. BIN
      assets/taddar/首页.png
  12. 181 0
      components/loading/loading.js
  13. 4 0
      components/loading/loading.json
  14. 9 0
      components/loading/loading.wxml
  15. 0 0
      components/loading/loading.wxss
  16. 60 0
      components/shoping-tabbar/index.js
  17. 4 0
      components/shoping-tabbar/index.json
  18. 7 0
      components/shoping-tabbar/index.wxml
  19. 38 0
      components/shoping-tabbar/index.wxss
  20. 48 0
      custom-tab-bar/index.js
  21. 0 0
      custom-tab-bar/index.json
  22. 7 0
      custom-tab-bar/index.wxml
  23. 38 0
      custom-tab-bar/index.wxss
  24. BIN
      environment.yml
  25. 1 1
      pages/AcidNeutralizationModel/AcidNeutralizationModel.wxml
  26. 1 1
      pages/AcidNeutralizationModel/AcidNeutralizationModel.wxss
  27. 0 1
      pages/Calculation/Calculation.js
  28. 1 1
      pages/Calculation/Calculation.json
  29. 6 0
      pages/Calculation/Calculation.wxml
  30. 13 1
      pages/Calculation/Calculation.wxss
  31. 28 0
      pages/Home/Home.js
  32. 8 0
      pages/Home/Home.json
  33. 7 0
      pages/Home/Home.wxml
  34. 27 0
      pages/Home/Home.wxss
  35. 66 0
      pages/Overview/Overview.js
  36. 1 1
      pages/Overview/Overview.json
  37. 3 0
      pages/Overview/Overview.wxml
  38. 21 0
      pages/Overview/Overview.wxss
  39. 2 2
      pages/Regular/Regular.js
  40. 6 0
      pages/Regular/Regular.json
  41. 0 0
      pages/Regular/Regular.wxml
  42. 0 0
      pages/Regular/Regular.wxss
  43. 66 0
      pages/ResearchFindings/ResearchFindings.js
  44. 6 0
      pages/ResearchFindings/ResearchFindings.json
  45. 8 0
      pages/ResearchFindings/ResearchFindings.wxml
  46. 27 0
      pages/ResearchFindings/ResearchFindings.wxss
  47. 21 0
      pages/RoleSelectionPage/RoleSelectionPage.js
  48. 6 0
      pages/RoleSelectionPage/RoleSelectionPage.json
  49. 7 0
      pages/RoleSelectionPage/RoleSelectionPage.wxml
  50. 27 0
      pages/RoleSelectionPage/RoleSelectionPage.wxss
  51. 66 0
      pages/Soil Acid Reduction Iterative Evolution/Soil Acid Reduction Iterative Evolution.js
  52. 6 0
      pages/Soil Acid Reduction Iterative Evolution/Soil Acid Reduction Iterative Evolution.json
  53. 2 0
      pages/Soil Acid Reduction Iterative Evolution/Soil Acid Reduction Iterative Evolution.wxml
  54. 1 0
      pages/Soil Acid Reduction Iterative Evolution/Soil Acid Reduction Iterative Evolution.wxss
  55. 66 0
      pages/Soil Acidification Iterative Evolution/Soil Acidification Iterative Evolution.js
  56. 6 0
      pages/Soil Acidification Iterative Evolution/Soil Acidification Iterative Evolution.json
  57. 2 0
      pages/Soil Acidification Iterative Evolution/Soil Acidification Iterative Evolution.wxml
  58. 1 0
      pages/Soil Acidification Iterative Evolution/Soil Acidification Iterative Evolution.wxss
  59. 26 0
      pages/Soil Acidification/Soil Acidification.js
  60. 6 0
      pages/Soil Acidification/Soil Acidification.json
  61. 21 0
      pages/Soil Acidification/Soil Acidification.wxml
  62. 46 0
      pages/Soil Acidification/Soil Acidification.wxss
  63. 21 0
      pages/Soil Deacidification/Soil Deacidification.js
  64. 6 0
      pages/Soil Deacidification/Soil Deacidification.json
  65. 20 0
      pages/Soil Deacidification/Soil Deacidification.wxml
  66. 45 0
      pages/Soil Deacidification/Soil Deacidification.wxss
  67. 66 0
      pages/SoilPro/SoilPro.js
  68. 6 0
      pages/SoilPro/SoilPro.json
  69. 49 0
      pages/SoilPro/SoilPro.wxml
  70. 49 0
      pages/SoilPro/SoilPro.wxss
  71. 25 9
      pages/Staff/Staff.js
  72. 3 1
      pages/Staff/Staff.json
  73. 2 5
      pages/Staff/Staff.wxml
  74. 66 0
      pages/Unit Team Profile/Unit Team Profile.js
  75. 6 0
      pages/Unit Team Profile/Unit Team Profile.json
  76. 14 0
      pages/Unit Team Profile/Unit Team Profile.wxml
  77. 48 0
      pages/Unit Team Profile/Unit Team Profile.wxss
  78. 0 325
      pages/Visualization/Visualization.js
  79. 0 100
      pages/Visualization/Visualization.wxml
  80. 0 203
      pages/Visualization/Visualization.wxss
  81. 24 36
      pages/index/index.js
  82. 18 4
      pages/index/index.wxml
  83. 23 65
      pages/index/index.wxss
  84. 0 22
      pages/logs/logs.js
  85. 0 5
      pages/logs/logs.json
  86. 0 33
      pages/logs/logs.wxml
  87. 0 0
      shoping/Data Visualization/Data Visualization.js
  88. 0 0
      shoping/Data Visualization/Data Visualization.json
  89. 0 0
      shoping/Data Visualization/Data Visualization.wxml
  90. 0 0
      shoping/Data Visualization/Data Visualization.wxss
  91. 101 0
      shoping/Staffl/Staff.js
  92. 8 0
      shoping/Staffl/Staff.json
  93. 33 0
      shoping/Staffl/Staff.wxml
  94. 7 6
      shoping/Staffl/Staff.wxss
  95. 66 0
      shoping/Visualizatio/Visualizatio.js
  96. 5 0
      shoping/Visualizatio/Visualizatio.json
  97. 3 0
      shoping/Visualizatio/Visualizatio.wxml
  98. 1 0
      shoping/Visualizatio/Visualizatio.wxss
  99. 66 0
      shoping/Visualization/Visualization.js
  100. 5 0
      shoping/Visualization/Visualization.json

BIN
SoilAcidification.db


+ 12 - 14
app.js

@@ -1,19 +1,17 @@
 // app.js
 App({
+  globalData: {
+    userRole: '', // 用户角色:'regular' 或 'admin'
+    triggerThreshold: {
+      count: 3, // 默认条数阈值
+      percentage: 70 // 默认百分比阈值
+    }
+  },
+  
   onLaunch() {
     // 展示本地存储能力
-    const logs = wx.getStorageSync('logs') || []
-    logs.unshift(Date.now())
-    wx.setStorageSync('logs', logs)
-
-    // 登录
-    wx.login({
-      success: res => {
-        // 发送 res.code 到后台换取 openId, sessionKey, unionId
-      }
-    })
-  },
-  globalData: {
-    userInfo: null
+    const logs = wx.getStorageSync('logs') || [];
+    logs.unshift(Date.now());
+    wx.setStorageSync('logs', logs);
   }
-})
+});

+ 30 - 16
app.json

@@ -1,45 +1,59 @@
 {
   "pages": [
-    
-    "pages/b/b",
+    "pages/RoleSelectionPage/RoleSelectionPage",
     "pages/index/index",
+    "pages/Regular/Regular",
+    "pages/Overview/Overview",
+    "pages/ResearchFindings/ResearchFindings",
+    "pages/Unit Team Profile/Unit Team Profile",
+    "pages/Soil Acidification/Soil Acidification",
+    "pages/Soil Acidification Iterative Evolution/Soil Acidification Iterative Evolution",
+    "pages/Soil Deacidification/Soil Deacidification",
+    "pages/Soil Acid Reduction Iterative Evolution/Soil Acid Reduction Iterative Evolution",
     "pages/demo/demo",
-    "pages/Data Visualization/Data Visualization",
-    "pages/logs/logs",
-    "pages/Visualization/Visualization",
     "pages/Calculate/Calculate",
     "pages/Staff/Staff",
     "pages/Calculation/Calculation",
-    "pages/AcidNeutralizationModel/AcidNeutralizationModel"
+    "pages/AcidNeutralizationModel/AcidNeutralizationModel",
+    "pages/Home/Home",
+    "pages/SoilPro/SoilPro",
+    "custom-tab-bar/index",
+    "shoping/admin/admin",
+    "shoping/threshold/threshold",
+    "shoping/Visualization/Visualization",
+    "shoping/Staffl/Staff",
+    "shoping/Data Visualization/Data Visualization",
+    "shoping/Visualizatio/Visualizatio"
   ],
   "window": {
     "navigationBarTitleText": "登入页面",
-    "navigationBarBackgroundColor": "#00AF92",  
-    "navigationBarTextStyle": "black"  ,
+    "navigationBarBackgroundColor": "#00AF92",
+    "navigationBarTextStyle": "black",
     "enablePullDownRefresh": true,
     "backgroundColor": "#efefef",
     "backgroundTextStyle": "dark"
   },
   "tabBar": {
+    "custom": true,
     "selectedColor": "#F3514F",
     "color": "#666666",
     "backgroundColor": "#ffffff",
     "list": [
       {
-        "text": "计算数据",
-        "pagePath": "pages/Calculate/Calculate",
-        "iconPath": "/assets/taddar/Calculate_Data-active.png",
-        "selectedIconPath": "/assets/taddar/Calculate_Data.png"
+        "text": "首页",
+        "pagePath": "pages/Home/Home",
+        "iconPath": "/assets/taddar/首页.png",
+        "selectedIconPath": "/assets/taddar/首页 (1).png"
       },
       {
-        "text": "数据图像展示",
-        "pagePath": "pages/Data Visualization/Data Visualization",
+        "text": "反酸模型",
+        "pagePath": "pages/Soil Acidification/Soil Acidification",
         "iconPath": "/assets/taddar/chart-histogram (1).png",
         "selectedIconPath": "/assets/taddar/chart-histogram.png"
       },
       {
-        "text": "数据展示",
-        "pagePath": "pages/Visualization/Visualization",
+        "text": "降酸模型",
+        "pagePath": "pages/Soil Deacidification/Soil Deacidification",
         "iconPath": "/assets/taddar/Data_Visualization-active.png",
         "selectedIconPath": "/assets/taddar/Data_Visualization.png"
       },

BIN
assets/taddar/12.png


BIN
assets/taddar/W020241210635035429857_ORIGIN.jpg


BIN
assets/taddar/微信图片_20241209174643.png


BIN
assets/taddar/微信图片_20241209174946.png


BIN
assets/taddar/首页 (1).png


BIN
assets/taddar/首页 (2).png


BIN
assets/taddar/首页 (3).png


BIN
assets/taddar/首页.png


+ 181 - 0
components/loading/loading.js

@@ -0,0 +1,181 @@
+module.exports =
+/******/ (function(modules) { // webpackBootstrap
+/******/ 	// The module cache
+/******/ 	var installedModules = {};
+/******/
+/******/ 	// The require function
+/******/ 	function __webpack_require__(moduleId) {
+/******/
+/******/ 		// Check if module is in cache
+/******/ 		if(installedModules[moduleId]) {
+/******/ 			return installedModules[moduleId].exports;
+/******/ 		}
+/******/ 		// Create a new module (and put it into the cache)
+/******/ 		var module = installedModules[moduleId] = {
+/******/ 			i: moduleId,
+/******/ 			l: false,
+/******/ 			exports: {}
+/******/ 		};
+/******/
+/******/ 		// Execute the module function
+/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+/******/
+/******/ 		// Flag the module as loaded
+/******/ 		module.l = true;
+/******/
+/******/ 		// Return the exports of the module
+/******/ 		return module.exports;
+/******/ 	}
+/******/
+/******/
+/******/ 	// expose the modules object (__webpack_modules__)
+/******/ 	__webpack_require__.m = modules;
+/******/
+/******/ 	// expose the module cache
+/******/ 	__webpack_require__.c = installedModules;
+/******/
+/******/ 	// define getter function for harmony exports
+/******/ 	__webpack_require__.d = function(exports, name, getter) {
+/******/ 		if(!__webpack_require__.o(exports, name)) {
+/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
+/******/ 		}
+/******/ 	};
+/******/
+/******/ 	// define __esModule on exports
+/******/ 	__webpack_require__.r = function(exports) {
+/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
+/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
+/******/ 		}
+/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
+/******/ 	};
+/******/
+/******/ 	// create a fake namespace object
+/******/ 	// mode & 1: value is a module id, require it
+/******/ 	// mode & 2: merge all properties of value into the ns
+/******/ 	// mode & 4: return value when already ns object
+/******/ 	// mode & 8|1: behave like require
+/******/ 	__webpack_require__.t = function(value, mode) {
+/******/ 		if(mode & 1) value = __webpack_require__(value);
+/******/ 		if(mode & 8) return value;
+/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
+/******/ 		var ns = Object.create(null);
+/******/ 		__webpack_require__.r(ns);
+/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
+/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
+/******/ 		return ns;
+/******/ 	};
+/******/
+/******/ 	// getDefaultExport function for compatibility with non-harmony modules
+/******/ 	__webpack_require__.n = function(module) {
+/******/ 		var getter = module && module.__esModule ?
+/******/ 			function getDefault() { return module['default']; } :
+/******/ 			function getModuleExports() { return module; };
+/******/ 		__webpack_require__.d(getter, 'a', getter);
+/******/ 		return getter;
+/******/ 	};
+/******/
+/******/ 	// Object.prototype.hasOwnProperty.call
+/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
+/******/
+/******/ 	// __webpack_public_path__
+/******/ 	__webpack_require__.p = "";
+/******/
+/******/
+/******/ 	// Load entry module and return exports
+/******/ 	return __webpack_require__(__webpack_require__.s = 14);
+/******/ })
+/************************************************************************/
+/******/ ({
+
+/***/ 14:
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Component({
+    options: {
+        addGlobalClass: true
+    },
+    properties: {
+        extClass: {
+            type: String,
+            value: ''
+        },
+        show: {
+            type: Boolean,
+            value: true,
+            observer: function observer(newValue) {
+                this._computedStyle(newValue, this.data.animated);
+            }
+        },
+        animated: {
+            type: Boolean,
+            value: false,
+            observer: function observer(newValue) {
+                this._computedStyle(this.data.show, newValue);
+            }
+        },
+        duration: {
+            type: Number,
+            value: 350
+        },
+        type: {
+            type: String,
+            value: 'dot-gray'
+        },
+        tips: {
+            type: String,
+            value: '加载中'
+        }
+    },
+    data: {
+        animationData: {},
+        animationInstance: {},
+        displayStyle: 'none'
+    },
+    methods: {
+        _computedStyle: function _computedStyle(show, animated) {
+            if (!show) {
+                if (!animated) {
+                    this.setData({
+                        displayStyle: 'none'
+                    });
+                } else {
+                    this._startAnimation();
+                }
+            } else {
+                this.setData({
+                    displayStyle: ''
+                });
+            }
+        },
+        _startAnimation: function _startAnimation() {
+            var _this = this;
+
+            setTimeout(function () {
+                var data = _this.data;
+                var animation = data.animationInstance;
+                animation.height(0).step();
+                _this.setData({
+                    animationData: animation.export()
+                });
+            }, 0);
+        }
+    },
+    lifetimes: {
+        attached: function attached() {
+            var data = this.data;
+            var animationInstance = wx.createAnimation({
+                duration: data.duration,
+                timingFunction: 'ease'
+            });
+            this.setData({ animationInstance: animationInstance });
+            this._computedStyle(this.data.show, this.data.animated);
+        }
+    }
+});
+
+/***/ })
+
+/******/ });

+ 4 - 0
components/loading/loading.json

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

+ 9 - 0
components/loading/loading.wxml

@@ -0,0 +1,9 @@
+<view style="display:{{displayStyle}};" class="wx_loading_view {{extClass}}" animation="{{animationData}}" id="wx_loading_view">
+    <view wx:if="{{type==='dot-white'}}" class="loading wx_dot_loading wx_dot_loading_white">
+    </view>
+    <view wx:elif="{{type==='dot-gray'}}" class="loading wx_dot_loading"></view>
+    <view wx:elif="{{type==='circle'}}" class="weui-loadmore">
+        <view class="weui-loading"></view>
+        <view class="weui-loadmore__tips">{{tips}}</view>
+    </view>
+</view>

File diff suppressed because it is too large
+ 0 - 0
components/loading/loading.wxss


+ 60 - 0
components/shoping-tabbar/index.js

@@ -0,0 +1,60 @@
+// components/shoping-tabbar/index.js
+Component({
+  /**
+   * 组件的属性列表
+   */
+  properties: {
+    selected: {
+      type: Number,
+      default:0
+    }
+  },  
+
+  /**
+   * 组件的初始数据
+   */
+  data: {
+    selected:0,
+    color: "#7A7E83",
+    selectedColor: "#3cc51f",
+    list: [
+      { 
+        text: "阈值", 
+        pagePath: "/shoping/threshold/threshold", 
+        iconPath: "/assets/taddar/users-copy.png", 
+        selectedIconPath: "/assets/taddar/copy.png" 
+      },
+      { 
+        text: "反酸模型数据管理", 
+        pagePath: "/shoping/Visualization/Visualization", 
+        iconPath: "/assets/taddar/users-copy.png", 
+        selectedIconPath: "/assets/taddar/copy.png" 
+      },
+      { text: "降酸模型数据管理", 
+      pagePath: "/shoping/Visualization/Visualization", 
+      iconPath: "/assets/taddar/users-copy.png", 
+      selectedIconPath: "/assets/taddar/copy.png" 
+    },
+    { 
+      text: "人员中心", 
+      pagePath: "/shoping/Staff/Staff", 
+      iconPath: "/assets/taddar/users-copy.png", 
+      selectedIconPath: "/assets/taddar/copy.png" 
+    }
+    ]
+  },
+
+
+  /**
+   * 组件的方法列表
+   */
+  methods: {
+    switchTab(e) {
+      let data = e.currentTarget.dataset
+      let url = data.path
+      wx.redirectTo({
+        url
+      })
+    }
+  }
+})

+ 4 - 0
components/shoping-tabbar/index.json

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

+ 7 - 0
components/shoping-tabbar/index.wxml

@@ -0,0 +1,7 @@
+<cover-view class="tab-bar">
+  <cover-view class="tab-bar-border"></cover-view>
+  <cover-view wx:for="{{list}}" wx:key="index" class="tab-bar-item" data-path="{{item.pagePath}}" data-index="{{index}}" bindtap="switchTab">
+    <cover-image src="{{selected === index ? item.selectedIconPath : item.iconPath}}"></cover-image>
+    <cover-view style="color: {{selected === index ? selectedColor : color}}">{{item.text}}</cover-view>
+  </cover-view>
+</cover-view>

+ 38 - 0
components/shoping-tabbar/index.wxss

@@ -0,0 +1,38 @@
+.tab-bar {
+  position: fixed;
+  bottom: 0;
+  left: 0;
+  right: 0;
+  height: 48px;
+  background: white;
+  display: flex;
+  padding-bottom: env(safe-area-inset-bottom);
+}
+
+.tab-bar-border {
+  background-color: rgba(0, 0, 0, 0.33);
+  position: absolute;
+  left: 0;
+  top: 0;
+  width: 100%;
+  height: 1px;
+  transform: scaleY(0.5);
+}
+
+.tab-bar-item {
+  flex: 1;
+  text-align: center;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  flex-direction: column;
+}
+
+.tab-bar-item cover-image {
+  width: 27px;
+  height: 27px;
+}
+
+.tab-bar-item cover-view {
+  font-size: 10px;
+}

+ 48 - 0
custom-tab-bar/index.js

@@ -0,0 +1,48 @@
+// custom-tab-bar/index.js
+Component({
+  data: {
+    selected: 0, // 当前选中的 tab 索引
+    color: "#999999",
+    selectedColor: "#F7393F",
+    list: [
+      { 
+        text: "首页", 
+        pagePath: "/pages/Home/Home", 
+        iconPath: "/assets/taddar/首页.png", 
+        selectedIconPath: "/assets/taddar/首页 (1).png" 
+      },
+      { 
+        text: "反酸模型", 
+        pagePath: "/pages/Soil Acidification/Soil Acidification", 
+        iconPath: "/assets/taddar/chart-histogram (1).png", 
+        selectedIconPath: "/assets/taddar/chart-histogram.png" 
+      },
+      { 
+        text: "降酸模型", 
+        pagePath: "/pages/Soil Deacidification/Soil Deacidification", 
+        iconPath: "/assets/taddar/Data_Visualization-active.png", 
+        selectedIconPath: "/assets/taddar/Data_Visualization.png" 
+      },
+      { 
+        text: "人员中心", 
+        pagePath: "/pages/Staff/Staff", 
+        iconPath: "/assets/taddar/users-copy.png", 
+        selectedIconPath: "/assets/taddar/copy.png" 
+      }
+    ]
+  },
+  attached() {
+    // 可在此设置初始选中项
+  },
+  methods: {
+    switchTab(e) {
+      const { index, path } = e.currentTarget.dataset;
+      wx.switchTab({
+        url: path,
+      });
+      this.setData({
+        selected: index, // 更新当前选中的 tab 索引
+      });
+    },
+  },
+});

+ 0 - 0
pages/Data Visualization/Data Visualization.json → custom-tab-bar/index.json


+ 7 - 0
custom-tab-bar/index.wxml

@@ -0,0 +1,7 @@
+<cover-view class="tab-bar">
+  <cover-view class="tab-bar-border"></cover-view>
+  <cover-view wx:for="{{list}}" wx:key="index" class="tab-bar-item" data-path="{{item.pagePath}}" data-index="{{index}}" bindtap="switchTab">
+    <cover-image src="{{selected === index ? item.selectedIconPath : item.iconPath}}"></cover-image>
+    <cover-view style="color: {{selected === index ? selectedColor : color}}">{{item.text}}</cover-view>
+  </cover-view>
+</cover-view>

+ 38 - 0
custom-tab-bar/index.wxss

@@ -0,0 +1,38 @@
+.tab-bar {
+  position: fixed;
+  bottom: 0;
+  left: 0;
+  right: 0;
+  height: 48px;
+  background: white;
+  display: flex;
+  padding-bottom: env(safe-area-inset-bottom);
+}
+ 
+.tab-bar-border {
+  background-color: rgba(0, 0, 0, 0.33);
+  position: absolute;
+  left: 0;
+  top: 0;
+  width: 100%;
+  height: 1px;
+  transform: scaleY(0.5);
+}
+ 
+.tab-bar-item {
+  flex: 1;
+  text-align: center;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  flex-direction: column;
+}
+ 
+.tab-bar-item cover-image {
+  width: 27px;
+  height: 27px;
+}
+ 
+.tab-bar-item cover-view {
+  font-size: 10px;
+}

BIN
environment.yml


+ 1 - 1
pages/AcidNeutralizationModel/AcidNeutralizationModel.wxml

@@ -70,6 +70,6 @@
 
 <view class="description-box">
   <text class="bold-text">
-    建议:\n1. 选用Ca0(生石灰)作为碱性物料,每季施用量不宜超过150 kg/亩,当计算用量超过150 kg/亩时,建议分多季施用;建议翻耕时施用,施加后与耕作层土壤混匀,避免苗期施用导致烧苗;施加过程注意防护,避免灼烧眼睛和皮肤;\n 2. 在改良时间富裕,石灰质材料充足的条件下,建议优先选用石灰石粉末、白云石等温和型碱性物料;\n3. 当其它碱性物料计算用量超过500 kg/亩,建议分2季施用;\n 4. 建议每隔3-5年,追踪土壤pH变化,可根据土壤pH变化,追施少量石灰质材料;
+   计算结果可以放在这里
   </text>
 </view> 

+ 1 - 1
pages/AcidNeutralizationModel/AcidNeutralizationModel.wxss

@@ -52,7 +52,7 @@
 .btn {
   width: 80%; /* 按钮宽度为父容器的 80% */
   padding: 15rpx 0; /* 上下内边距为 15rpx */
-  background-color: #00af92; /* 按钮背景颜色为绿色 */
+  background-color: #3EC01E; /* 按钮背景颜色为绿色 */
   color: #fff; /* 按钮文字颜色为白色 */
   font-size: 28rpx; /* 字体大小为 28rpx */
   border-radius: 10rpx; /* 按钮圆角效果 */

+ 0 - 1
pages/Calculation/Calculation.js

@@ -12,7 +12,6 @@ Page({
     collection_location: '', // 采样地点
     collection_date: '', // 采样时间
   },
-
   // 更新有机质含量
   onOMChange: function(e) {
     this.setData({

+ 1 - 1
pages/Calculation/Calculation.json

@@ -1,5 +1,5 @@
 {
   "navigationBarTitleText": "反酸模型", 
   "navigationBarBackgroundColor": "#ffffff",  
-  "navigationBarTextStyle": "black"  
+  "navigationBarTextStyle": "black"
 }

+ 6 - 0
pages/Calculation/Calculation.wxml

@@ -130,3 +130,9 @@
 <view class="green-btn">
   <button class="btn" bindtap="calculate">计算</button>
 </view>
+
+<view class="description-box">
+  <text class="bold-text">
+   计算结果可以放在这里
+  </text>
+</view> 

+ 13 - 1
pages/Calculation/Calculation.wxss

@@ -47,7 +47,7 @@
 .btn {
   width: 80%;
   padding: 15rpx 0;
-  background-color: #00af92;
+  background-color: #3EC01E;
   color: #fff;
   font-size: 28rpx;
   border-radius: 10rpx;
@@ -62,4 +62,16 @@
 .picker {
   flex-shrink: 0;
   width: 100px; /* 根据需要调整宽度 */
+}
+
+.description-box {
+  width: 90%; /* 白色框的宽度为父容器的 90% */
+  margin: 10rpx auto; /* 上下间距 10rpx,水平居中 */
+  padding: 15rpx; /* 增加文字周围空间 */
+  background-color: #fff; /* 背景为白色 */
+}
+
+.bold-text {
+  font-size: 32rpx; /* 加粗字体大小 */
+  color: #000; /* 黑色字体 */
 }

+ 28 - 0
pages/Home/Home.js

@@ -0,0 +1,28 @@
+// pages/Home/Home.js
+Page({
+  SoilPro() {
+    wx.navigateTo({
+      url: '/pages/SoilPro/SoilPro'
+    });
+  },
+  Overview: function() {
+    if (typeof this.getTabBar === 'function' && this.getTabBar()) {
+      this.getTabBar().setData({
+        selected: 0  //这个数字是当前页面在tabBar中list数组的索引
+      })
+    }
+    wx.navigateTo({
+      url: '/pages/Overview/Overview'
+    });
+  },
+  ResearchFindings() {
+    wx.navigateTo({
+      url: '/pages/ResearchFindings/ResearchFindings'
+    });
+  },
+  Unit_Team_Profile () {
+    wx.navigateTo({
+      url: '/pages/Unit Team Profile/Unit Team Profile'
+    });
+  }
+})

+ 8 - 0
pages/Home/Home.json

@@ -0,0 +1,8 @@
+{
+  "usingComponents": {
+    "custom-tab-bar": "/custom-tab-bar/index"
+  },
+  "navigationBarTitleText": "首页",
+  "navigationBarBackgroundColor": "#ffffff",  
+  "navigationBarTextStyle": "black"  
+}

+ 7 - 0
pages/Home/Home.wxml

@@ -0,0 +1,7 @@
+<view class="container">
+  <button class="full-width-button" bindtap="SoilPro">软件简介</button>
+  <button class="full-width-button" bindtap="Overview">项⽬简介</button>
+  <button class="full-width-button" bindtap="ResearchFindings">研究成果</button>
+  <button class="full-width-button" bindtap="Unit_Team_Profile">承担单位团队信息</button>
+</view>
+<custom-tab-bar></custom-tab-bar>

+ 27 - 0
pages/Home/Home.wxss

@@ -0,0 +1,27 @@
+/* 父容器样式 */
+.container {
+  display: flex;
+  flex-direction: column; /* 垂直排列 */
+  align-items: center;    /* 居中对齐 */
+  padding: 20px 0;        /* 增加上下内边距 */
+  margin: 50px 20px 20px  20px;     /* 增加顶部外边距 */
+}
+
+/* 按钮样式 */
+.full-width-button {
+  width: 100%;            /* 按钮占满宽度 */
+  padding: 15px 0;        /* 按钮内边距,控制高度 */
+  margin: 15px 0;         /* 按钮间距 */
+  background-color: #3EC01E; /* 按钮背景颜色 */
+  color: white;           /* 按钮文字颜色 */
+  font-size: 18px;        /* 按钮文字大小 */
+  border: none;           /* 去除按钮边框 */
+  outline: none;          /* 去除焦点边框 */
+  text-align: center;     /* 文字居中 */
+  border-radius: 5px;     /* 圆角效果 */
+}
+
+/* 按钮点击效果 */
+.full-width-button:active {
+  background-color: #299A0C; /* 按下按钮时的颜色变化 */
+}

+ 66 - 0
pages/Overview/Overview.js

@@ -0,0 +1,66 @@
+// pages/Regular User/Overview/Overview.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 1 - 1
pages/Visualization/Visualization.json → pages/Overview/Overview.json

@@ -1,6 +1,6 @@
 {
   "usingComponents": {},
-  "navigationBarTitleText": "数据展示",
+  "navigationBarTitleText": "项目简介",
   "navigationBarBackgroundColor": "#ffffff",  
   "navigationBarTextStyle": "black"  
 }

+ 3 - 0
pages/Overview/Overview.wxml

@@ -0,0 +1,3 @@
+<view class="green-box">
+  <text class="title-en">项目简介</text>
+</view>

+ 21 - 0
pages/Overview/Overview.wxss

@@ -0,0 +1,21 @@
+/* 页面整体背景 */
+.green-box {
+  background-color: #4caf50; /* 绿色背景 */
+  padding: 10px 20px;  /* 减小上下内边距,控制高度 */
+  text-align: center;
+  display: flex;
+  flex-direction: column; /* 设置垂直方向布局 */
+  justify-content: center;
+  align-items: center;
+  max-height: 100rpx; /* 限制最大高度 */
+  max-width: calc(100% - 10px); /* 宽度最大100%,两边各留5px */
+  margin-left: 15px;  /* 左边留5px */
+  margin-right: 15px; /* 右边留5px */
+  box-sizing: border-box; /* 确保 padding 和 margin 不影响宽度计算 */
+}
+
+.title-en {
+  font-size: 16px;
+  color: #fff;
+  display: block;
+}

+ 2 - 2
pages/b/b.js → pages/Regular/Regular.js

@@ -81,7 +81,7 @@ Page({
 
     // 登录成功后跳转到指定页面
     wx.switchTab({
-      url: '/pages/Calculate/Calculate',
+      url: '/pages/Regular User/Home/Home',
     });
   },
 
@@ -130,7 +130,7 @@ Page({
 
         // 登录成功后跳转到指定页面
         wx.switchTab({
-          url: '/pages/Calculate/Calculate',
+          url: '/pages/Regular User/Home/Home',
         });
       } else {
         this.setData({

+ 6 - 0
pages/Regular/Regular.json

@@ -0,0 +1,6 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "普通用户登录",
+  "navigationBarBackgroundColor": "#f8f8f8",  
+  "navigationBarTextStyle": "black"  
+}

+ 0 - 0
pages/b/b.wxml → pages/Regular/Regular.wxml


+ 0 - 0
pages/b/b.wxss → pages/Regular/Regular.wxss


+ 66 - 0
pages/ResearchFindings/ResearchFindings.js

@@ -0,0 +1,66 @@
+// pages/Regular User/ResearchFindings/ResearchFindings.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 6 - 0
pages/ResearchFindings/ResearchFindings.json

@@ -0,0 +1,6 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "研究成果",
+  "navigationBarBackgroundColor": "#ffffff",
+  "navigationBarTextStyle": "black"  
+}

+ 8 - 0
pages/ResearchFindings/ResearchFindings.wxml

@@ -0,0 +1,8 @@
+<view class="container">
+  <view class="section">
+    <text class="content">⼴东省典型区域⼟壤环境质量及农产品安全研究,在⼴东省典型区域率先系统地开展了⼟壤环境质量的探查研究,为新的国家⼟壤环境质量标准修订稿中有关有机污染物指标限值的确定提供了科⼴东省典型区域⼟壤环境质量及农产品安全研究,在⼴东省典型区域率先系统地开展了⼟壤环境质量的探查研究,为新的国⼟壤环境质量标准修订稿中有关有机污染物指标限值的确定提供了科学依据,并为全国开展⼟壤有机污染物调查提供了重要参考。相关成果获得2009年度⼴东省科学技术⼀等奖。</text>
+  </view>
+</view>
+
+<image class="navigat-arrow" src="/assets/taddar/12.png" />
+

+ 27 - 0
pages/ResearchFindings/ResearchFindings.wxss

@@ -0,0 +1,27 @@
+/* 父容器样式 */
+.container {
+  padding: 15px;
+  background-color: #f4f4f4;
+  display: block;
+}
+
+/* 标题样式 */
+.title {
+  font-size: 22px;
+  font-weight: bold;
+}
+
+.content {
+  font-size: 16px;
+}
+
+/* 使每个段落独立 */
+.content {
+  text-indent: 2em;  /* 段落首行缩进 */
+}
+
+.navigat-arrow {
+  padding: 10px;
+  width: 700rpx;  /* 设置图片的大小 */
+  height: 400rpx;  /* 设置图片的大小 */
+}

+ 21 - 0
pages/RoleSelectionPage/RoleSelectionPage.js

@@ -0,0 +1,21 @@
+Page({
+  selectRegularUser() {
+    // 设置用户角色为普通用户
+    wx.setStorageSync('userRole', 'RegularUser');
+
+    // 跳转到普通用户首页
+    wx.switchTab({
+      url: '/pages/Home/Home', // 普通用户首页
+    });
+  },
+
+  selectAdmin() {
+    // 设置用户角色为管理员
+    wx.setStorageSync('userRole', 'Admin');
+
+    // 跳转到管理员首页
+    wx.navigateTo({
+      url: '/shoping/threshold/threshold', // 管理员首页
+    });
+  }
+});

+ 6 - 0
pages/RoleSelectionPage/RoleSelectionPage.json

@@ -0,0 +1,6 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "选择权限", 
+  "navigationBarBackgroundColor": "#ffffff",  
+  "navigationBarTextStyle": "black"  
+}

+ 7 - 0
pages/RoleSelectionPage/RoleSelectionPage.wxml

@@ -0,0 +1,7 @@
+<!-- pages/role-selection/role-selection.wxml -->
+<view class="container">
+  <button class="full-width-button" bindtap="selectRegularUser">普通用户</button>
+  <button class="full-width-button" bindtap="selectAdmin">管理员</button>
+</view>
+
+<custom-tab-bar></custom-tab-bar>

+ 27 - 0
pages/RoleSelectionPage/RoleSelectionPage.wxss

@@ -0,0 +1,27 @@
+/* 父容器样式 */
+.container {
+  display: flex;
+  flex-direction: column; /* 垂直排列 */
+  align-items: center;    /* 居中对齐 */
+  padding: 20px 0;        /* 增加上下内边距 */
+  margin: 150px  20px 20px  20px;     /* 增加顶部外边距 */
+}
+
+/* 按钮样式 */
+.full-width-button {
+  width: 100%;            /* 按钮占满宽度 */
+  padding: 15px 0;        /* 按钮内边距,控制高度 */
+  margin: 15px 0;         /* 按钮间距 */
+  background-color: #3EC01E; /* 按钮背景颜色 */
+  color: white;           /* 按钮文字颜色 */
+  font-size: 18px;        /* 按钮文字大小 */
+  border: none;           /* 去除按钮边框 */
+  outline: none;          /* 去除焦点边框 */
+  text-align: center;     /* 文字居中 */
+  border-radius: 5px;     /* 圆角效果 */
+}
+
+/* 按钮点击效果 */
+.full-width-button:active {
+  background-color: #299A0C; /* 按下按钮时的颜色变化 */
+}

+ 66 - 0
pages/Soil Acid Reduction Iterative Evolution/Soil Acid Reduction Iterative Evolution.js

@@ -0,0 +1,66 @@
+// pages/Regular User/Soil Acid Reduction Iterative Evolution/Soil Acid Reduction Iterative Evolution.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 6 - 0
pages/Soil Acid Reduction Iterative Evolution/Soil Acid Reduction Iterative Evolution.json

@@ -0,0 +1,6 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "降酸模型迭代进化",
+  "navigationBarBackgroundColor": "#ffffff",  
+  "navigationBarTextStyle": "black" 
+}

+ 2 - 0
pages/Soil Acid Reduction Iterative Evolution/Soil Acid Reduction Iterative Evolution.wxml

@@ -0,0 +1,2 @@
+<!--pages/Regular User/Soil Acid Reduction Iterative Evolution/Soil Acid Reduction Iterative Evolution.wxml-->
+<text>这里可以放"降酸模型"计算图片</text>

+ 1 - 0
pages/Soil Acid Reduction Iterative Evolution/Soil Acid Reduction Iterative Evolution.wxss

@@ -0,0 +1 @@
+/* pages/Regular User/Soil Acid Reduction Iterative Evolution/Soil Acid Reduction Iterative Evolution.wxss */

+ 66 - 0
pages/Soil Acidification Iterative Evolution/Soil Acidification Iterative Evolution.js

@@ -0,0 +1,66 @@
+// pages/Regular User/Soil Acidification Iterative Evolution/Soil Acidification Iterative Evolution.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 6 - 0
pages/Soil Acidification Iterative Evolution/Soil Acidification Iterative Evolution.json

@@ -0,0 +1,6 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "反酸模型迭代进化",
+  "navigationBarBackgroundColor": "#ffffff",  
+  "navigationBarTextStyle": "black" 
+}

+ 2 - 0
pages/Soil Acidification Iterative Evolution/Soil Acidification Iterative Evolution.wxml

@@ -0,0 +1,2 @@
+<!--pages/Regular User/Soil Acidification Iterative Evolution/Soil Acidification Iterative Evolution.wxml-->
+<text>这里可以放"反酸模型"计算图片</text>

+ 1 - 0
pages/Soil Acidification Iterative Evolution/Soil Acidification Iterative Evolution.wxss

@@ -0,0 +1 @@
+/* pages/Regular User/Soil Acidification Iterative Evolution/Soil Acidification Iterative Evolution.wxss */

+ 26 - 0
pages/Soil Acidification/Soil Acidification.js

@@ -0,0 +1,26 @@
+// pages/Home/Home.js
+Page({
+  SoilPro() {
+    wx.navigateTo({
+      url: '/pages/SoilPro/SoilPro'
+    });
+  },
+  onShow: function() {
+ 
+    if (typeof this.getTabBar === 'function' && this.getTabBar()) {
+      this.getTabBar().setData({
+        selected: 1  //这个数字是当前页面在tabBar中list数组的索引
+      })
+    }
+},
+  Calculation() {
+    wx.navigateTo({
+      url: '/pages/Calculation/Calculation'
+    });
+  },
+  Soil_Acidification_Iterative_Evolution() {
+    wx.navigateTo({
+      url: '/pages/Soil Acidification Iterative Evolution/Soil Acidification Iterative Evolution'
+    });
+  },
+})

+ 6 - 0
pages/Soil Acidification/Soil Acidification.json

@@ -0,0 +1,6 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "反酸模型",
+  "navigationBarBackgroundColor": "#ffffff",  
+  "navigationBarTextStyle": "black"  
+}

+ 21 - 0
pages/Soil Acidification/Soil Acidification.wxml

@@ -0,0 +1,21 @@
+<view class="containe">
+  <text class="regular-text">
+    注意事项如下:
+    1. 本模型是基于我国南方 23 份酸性土壤样品开发的;
+    2. 土壤起始 pH 和目标 pH 是指在土水比为 1:2.5 下的 pH 值;\n3. 施用最佳时期为翻耕前,将农用石灰质物料均匀撒加到土壤表面,然后与耕作层土壤(0-20 cm)混匀;\n4. 本软件同时可以计算不同类型碱性物料的施用量,包括石灰石粉、生石灰、熟石灰、白云石、以及已知 CaO 和 MgO 含量的碱性材料。
+    </text>
+</view>
+
+<view class="containe">
+<text class="regular-text">
+    从重金属污染土壤安全利用的目的,还需注意:\n1. 土壤目标 pH 为 6.5 时能有效降低土壤镉的活性和稻米镉的积累;\n2. 农用石灰质物料重金属含量不能超过农用物料重金属含量标准;\n3. 一次施用后,稻米降镉效果可持续多年,每隔 3-5 年通过监测土壤 pH 变化,根据土壤 pH 的变化,可适当追加少量石灰质物料。
+  </text>
+</view>
+
+<image class="navigat-arrow" src="/assets/taddar/微信图片_20241209174643.png" />
+
+<view class="container">
+  <button class="full-width-button" bindtap="Calculation">反酸模型计算</button>
+  <button class="full-width-button" bindtap="Soil_Acidification_Iterative_Evolution">反酸模型迭代进化</button>
+</view>
+

+ 46 - 0
pages/Soil Acidification/Soil Acidification.wxss

@@ -0,0 +1,46 @@
+/* 普通文本样式 */
+.containe {
+  padding: 5px 5px;  /* 调整容器的内边距,减小文字与容器的距离 */
+  line-height: 1;  /* 调整行高,控制文字的垂直间距 */
+  margin-bottom: 2px;
+}
+
+.regular-text {
+  font-size: 14px;  /* 设置字体大小 */
+  color: #333333;
+}
+
+
+/* 父容器样式 */
+.container {
+  display: flex;
+  flex-direction: column; /* 垂直排列 */
+  align-items: center;    /* 居中对齐 */
+  padding: 10px 0;        /* 增加上下内边距 */
+  margin: 1px 20px 20px  20px;     /* 增加顶部外边距 */
+}
+
+/* 按钮样式 */
+.full-width-button {
+  width: 100%;            /* 按钮占满宽度 */
+  padding: 5px 0;        /* 按钮内边距,控制高度 */
+  margin: 15px 0;         /* 按钮间距 */
+  background-color: #3EC01E; /* 按钮背景颜色 */
+  color: white;           /* 按钮文字颜色 */
+  font-size: 18px;        /* 按钮文字大小 */
+  border: none;           /* 去除按钮边框 */
+  outline: none;          /* 去除焦点边框 */
+  text-align: center;     /* 文字居中 */
+  border-radius: 5px;     /* 圆角效果 */
+}
+
+/* 按钮点击效果 */
+.full-width-button:active {
+  background-color: #299A0C; /* 按下按钮时的颜色变化 */
+}
+
+.navigat-arrow {
+  padding: 5px;
+  width: 700rpx;
+  height: 400rpx;
+}

+ 21 - 0
pages/Soil Deacidification/Soil Deacidification.js

@@ -0,0 +1,21 @@
+// pages/Home/Home.js
+Page({
+  AcidNeutralizationModel() {
+    wx.navigateTo({
+      url: '/pages/AcidNeutralizationModel/AcidNeutralizationModel'
+    });
+  },
+  onShow: function() {
+ 
+    if (typeof this.getTabBar === 'function' && this.getTabBar()) {
+      this.getTabBar().setData({
+        selected: 2  //这个数字是当前页面在tabBar中list数组的索引
+      })
+    }
+},
+  Soil_Acid_Reduction_Iterative_Evolution() {
+    wx.navigateTo({
+      url: '/pages/Soil Acid Reduction Iterative Evolution/Soil Acid Reduction Iterative Evolution'
+    });
+  },
+})

+ 6 - 0
pages/Soil Deacidification/Soil Deacidification.json

@@ -0,0 +1,6 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "降酸模型",
+  "navigationBarBackgroundColor": "#ffffff",  
+  "navigationBarTextStyle": "black"
+}

+ 20 - 0
pages/Soil Deacidification/Soil Deacidification.wxml

@@ -0,0 +1,20 @@
+<view class="containe">
+  <text class="regular-text">
+    注意事项如下:
+    1. 本模型是基于我国南方 23 份酸性土壤样品开发的;
+    2. 土壤起始 pH 和目标 pH 是指在土水比为 1:2.5 下的 pH 值;\n3. 施用最佳时期为翻耕前,将农用石灰质物料均匀撒加到土壤表面,然后与耕作层土壤(0-20 cm)混匀;\n4. 本软件同时可以计算不同类型碱性物料的施用量,包括石灰石粉、生石灰、熟石灰、白云石、以及已知 CaO 和 MgO 含量的碱性材料。
+    </text>
+</view>
+
+<view class="containe">
+<text class="regular-text">
+    从重金属污染土壤安全利用的目的,还需注意:\n1. 土壤目标 pH 为 6.5 时能有效降低土壤镉的活性和稻米镉的积累;\n2. 农用石灰质物料重金属含量不能超过农用物料重金属含量标准;\n3. 一次施用后,稻米降镉效果可持续多年,每隔 3-5 年通过监测土壤 pH 变化,根据土壤 pH 的变化,可适当追加少量石灰质物料。
+  </text>
+</view>
+
+<image class="navigat-arrow" src="/assets/taddar/微信图片_20241209174946.png" />
+
+<view class="container">
+  <button class="full-width-button" bindtap="AcidNeutralizationModel">降酸模型计算</button>
+  <button class="full-width-button" bindtap="Soil_Acid_Reduction_Iterative_Evolution">降酸模型迭代进化</button>
+</view>

+ 45 - 0
pages/Soil Deacidification/Soil Deacidification.wxss

@@ -0,0 +1,45 @@
+/* 普通文本样式 */
+.containe {
+  padding: 5px 5px;  /* 调整容器的内边距,减小文字与容器的距离 */
+  line-height: 1;  /* 调整行高,控制文字的垂直间距 */
+  margin-bottom: 2px;
+}
+
+.regular-text {
+  font-size: 14px;  /* 设置字体大小 */
+  color: #333333;
+}
+
+/* 父容器样式 */
+.container {
+  display: flex;
+  flex-direction: column; /* 垂直排列 */
+  align-items: center;    /* 居中对齐 */
+  padding: 10px 0;        /* 增加上下内边距 */
+  margin: 1px 20px 20px  20px;     /* 增加顶部外边距 */
+}
+
+/* 按钮样式 */
+.full-width-button {
+  width: 100%;            /* 按钮占满宽度 */
+  padding: 5px 0;        /* 按钮内边距,控制高度 */
+  margin: 15px 0;         /* 按钮间距 */
+  background-color: #3EC01E; /* 按钮背景颜色 */
+  color: white;           /* 按钮文字颜色 */
+  font-size: 18px;        /* 按钮文字大小 */
+  border: none;           /* 去除按钮边框 */
+  outline: none;          /* 去除焦点边框 */
+  text-align: center;     /* 文字居中 */
+  border-radius: 5px;     /* 圆角效果 */
+}
+
+/* 按钮点击效果 */
+.full-width-button:active {
+  background-color: #299A0C; /* 按下按钮时的颜色变化 */
+}
+
+.navigat-arrow {
+  padding: 5px;
+  width: 700rpx;
+  height: 400rpx;
+}

+ 66 - 0
pages/SoilPro/SoilPro.js

@@ -0,0 +1,66 @@
+// pages/SoilPro/SoilPro.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 6 - 0
pages/SoilPro/SoilPro.json

@@ -0,0 +1,6 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "软件简介",
+  "navigationBarBackgroundColor": "#ffffff",  
+  "navigationBarTextStyle": "black"  
+}

+ 49 - 0
pages/SoilPro/SoilPro.wxml

@@ -0,0 +1,49 @@
+<view class="green-box">
+  <text class="title-en">算法模型计算及优化软件简介</text>
+</view>
+
+<view class="container">
+  <view class="section">
+    <text class="sub-title">⼴东省⽣态环境与⼟壤研究所</text>
+    <text class="content">依托</text>
+    <text class="sub-title">国家⾃然科学基⾦重点项⽬</text>
+    <text class="content">⽀持,开发了</text>
+    <text class="sub-title">算法模型计算及优化</text>
+    <text class="content">软件。该软件集成了</text>
+    <text class="sub-title">反酸模型</text> 和 
+    <text class="sub-title">降酸模型,</text>
+    <text class="content">以科学化、智能化的⽅式提供⼟壤酸性调控解决⽅案,同时通过模型迭代优化不断提升预测精度。以下为软件的综述性简介:</text>
+    <text class="sub-title">\n1. 软件功能概述</text>
+    <text class="content">反酸模型:输入土壤理化指标(如粘粒、交换性铝、有机质、游离氧化铝等),预测土壤反酸后的 pH 值变化。</text>
+    <text class="content">降酸模型:根据土壤 pH 和目标值,计算不同碱性物料(如石灰石粉、生石灰等)的施用量。</text>
+
+    <text class="sub-title">\n2. 核心技术特点</text>
+    <text class="content">迭代进化模型,反酸模型与降酸模型通过数据驱动实现迭代优化:</text>
+    <text class="content">\n1. 初始模型训练:使用小规模的初始数据集训练初始模型 Aa,获得初步预测能力,准确度为 Ka。</text>
+    <text class="content">\n2. 新数据迭代优化:当新数据集加入后,模型 Aa 更新为 Ab,准确度提升至 Kb。</text>
+    <text class="content">\n3. 长期优化与路线图:随着数据量的不断积累,模型通过多轮迭代进化逐步完善,可绘制性能提升的可视化路线图,展示准确度提升的动态过程。</text>
+
+    <text class="sub-title">\n机器学习赋能</text>
+    <text class="content">\n使用算法(如随机森林、XGBoost)挖掘理化指标与 pH 变化的复杂关系。</text>
+
+    <text class="sub-title">\n动态数据支持</text>
+    <text class="content">\n模型支持多种数据类型的输入,结合实验室数据和田间采样,逐步扩展模型的适用范围。</text>
+
+    <text class="sub-title">\n3. 应用场景</text>
+    <text class="content">农业管理:为农户和农业技术人员提供优化土壤酸性治理的科学依据,提升作物产量与品质。</text>
+    <text class="content">生态修复:支持酸性土壤生态修复的决策与方案优化,助力退化土地的恢复与改良。</text>
+    <text class="content">科学研究:为土壤学者和研究机构提供高效、便捷的土壤酸性调控工具,助力科研进展。</text>
+
+    <text class="sub-title">\n4. 使用优势</text>
+    <text class="content">精准性:基于高质量数据和模型优化,预测结果具备科学性与实践指导价值。</text>
+    <text class="content">可视化路线图:提供模型进化路线图和性能提升的可视化展示,让用户清晰了解模型迭代优化过程和效果。</text>
+
+    <text class="sub-title">\n5. 项目意义</text>
+    <text class="content">算法模型计算及优化软件是国家自然科学基金重点项目的创新成果,系统集成了反酸与降酸模型,采用数据驱动的方式动态优化,为土壤酸性调控提供精准、高效的解决方案。模型的迭代进化及可视化性能展示,不仅提升了科学研究的深度,也为农业和生态保护的实际应用提供了强有力支持。</text>
+  </view>
+</view>
+
+<view class="container">
+  <text class="title-e">广东省生态环境与土壤研究所期待与社会各界共同努力,为土壤科学技术进步和生态文明建设作出积极贡献!</text>
+</view>
+

+ 49 - 0
pages/SoilPro/SoilPro.wxss

@@ -0,0 +1,49 @@
+/* 页面整体背景 */
+.green-box {
+  background-color: #4caf50; /* 绿色背景 */
+  padding: 10px 20px;  /* 减小上下内边距,控制高度 */
+  text-align: center;
+  display: flex;
+  flex-direction: column; /* 设置垂直方向布局 */
+  justify-content: center;
+  align-items: center;
+  max-height: 100rpx; /* 限制最大高度 */
+  max-width: calc(100% - 10px); /* 宽度最大100%,两边各留5px */
+  margin-left: 15px;  /* 左边留5px */
+  margin-right: 15px; /* 右边留5px */
+  box-sizing: border-box; /* 确保 padding 和 margin 不影响宽度计算 */
+}
+
+.title-en {
+  font-size: 16px;
+  color: #fff;
+  display: block;
+}
+
+/* 父容器样式 */
+.container {
+  padding: 15px;
+  background-color: #f4f4f4;
+  display: block;
+}
+
+/* 标题样式 */
+.title {
+  font-size: 22px;
+  font-weight: bold;
+}
+
+.sub-title {
+  font-size: 18px;
+  font-weight:700;
+}
+
+.content {
+  font-size: 16px;
+}
+
+/* 使每个段落独立 */
+.content {
+  text-indent: 2em;  /* 段落首行缩进 */
+}
+

+ 25 - 9
pages/Staff/Staff.js

@@ -43,6 +43,15 @@ Page({
     wx.setStorageSync('userinfo', userInfo);
   },
 
+  onShow: function() {
+ 
+    if (typeof this.getTabBar === 'function' && this.getTabBar()) {
+      this.getTabBar().setData({
+        selected: 3  //这个数字是当前页面在tabBar中list数组的索引
+      })
+    }
+},
+
   // 显示登录弹窗
   gologin() {
     this.setData({
@@ -77,19 +86,26 @@ Page({
     });
   },
 
-  // 退出登录
+  goToThreshold() {
+    wx.navigateTo({
+      url: '/pages/threshold/threshold'
+    });
+  },
+
+  /// 点击退出登录
   tuichu() {
+    // 清除缓存
+    wx.clearStorageSync();
+
+    // 重置登录状态
     this.setData({
-      isLogin: false,  // 设置登录状态为 false
-      userInfo: {},    // 清除用户信息
+      isLogin: false,
+      userInfo: {}
     });
 
-    // 清除缓存中的用户信息
-    wx.removeStorageSync('userinfo');
-    
-    // 跳转到 "pages/b/b" 页面
-    wx.navigateTo({
-      url: '/pages/b/b', // 路径可以根据实际情况修改
+    // 跳转到登录页面
+    wx.redirectTo({
+      url: '/pages/RoleSelectionPage/RoleSelectionPage' // 登录页面的路径
     });
   }
 });

+ 3 - 1
pages/Staff/Staff.json

@@ -1,5 +1,7 @@
 {
-  "usingComponents": {},
+    "usingComponents": {
+      "custom-tab-bar": "/custom-tab-bar/index"
+    },
   "navigationBarTitleText": "个人中心",
   "navigationBarBackgroundColor": "#ffffff",  
   "navigationBarTextStyle": "black"  

+ 2 - 5
pages/Staff/Staff.wxml

@@ -15,11 +15,6 @@
 
 
   <view class="center-list">
-    <view class="center-list-item">
-      <image class="list-icon" src="/assets/taddar/lock.png" />
-      <text class="list-text">帐号管理</text>
-      <image class="navigat-arrow" src="/assets/taddar/right.png" />
-    </view>
     <view class="center-list-item">
       <image class="list-icon" src="/assets/taddar/edit.png" />
       <text class="list-text">编辑个人信息</text>
@@ -35,3 +30,5 @@
     </view>
   </view>
 </view>
+
+<custom-tab-bar></custom-tab-bar>

+ 66 - 0
pages/Unit Team Profile/Unit Team Profile.js

@@ -0,0 +1,66 @@
+// pages/Regular User/Unit Team Profile/Unit Team Profile.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 6 - 0
pages/Unit Team Profile/Unit Team Profile.json

@@ -0,0 +1,6 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "承担单位团队信息",
+  "navigationBarBackgroundColor": "#ffffff",
+  "navigationBarTextStyle": "black" 
+}

+ 14 - 0
pages/Unit Team Profile/Unit Team Profile.wxml

@@ -0,0 +1,14 @@
+<view class="green-box">
+  <text class="title-en">广东省⼟壤与⽣态环境研究所</text>
+</view>
+<view class="container">
+  <view class="section">
+    <text class="content">⼴东省科学院⽣态环境与⼟壤研究所,成⽴于1958年,是我国红壤区唯⼀的⼟壤学专业研究机构。前⾝为中科院中南⼟壤研究室,曾⽤名中国科学院⼴州⼟壤研究所、⼴东省⼟壤研究所、⼴东省⽣态环境与⼟壤研究所、⼴东省⽣态环境技术研究所。现有在职职⼯255⼈,科研⼈员218⼈,其中国家级⼈才10⼈,包括国家杰出⻘年基⾦获得者3⼈,国家级优秀⻘年⼈才7⼈;省部级优秀⼈才27⼈次,包括⼴东省杰出⼈才1⼈、⼴东省领军⼈才3⼈、⼴东省杰⻘7⼈、⼴东省⻘拔8⼈等;已形成了⼀⽀⾼⽔平的中⻘年⼈才队伍。建所以来,累积获得省部级奖励超130项,近五年,获国家科技进步⼆等奖1项、省部级⼀等奖 4项。主办国家核⼼学术期刊《⽣态环境学报》、英⽂期刊Carbon Research。建有华南⼟壤污染控制与修复国家地⽅联合⼯程研究中⼼、农业农村部亚热带农⽥⼟环境保护及资源可持续利⽤重点实验室 (部省共建) 、⼴东省农业环境综合治理重点实验室等创新平台。</text>
+  </view>
+</view>
+
+<image class="navigat-arrow" src="/assets/taddar/W020241210635035429857_ORIGIN.jpg" />
+
+<view class="green-box">
+  <text class="title-en">项目团队成员简介</text>
+</view>

+ 48 - 0
pages/Unit Team Profile/Unit Team Profile.wxss

@@ -0,0 +1,48 @@
+/* 页面整体背景 */
+.green-box {
+  background-color: #4caf50; /* 绿色背景 */
+  padding: 10px 20px;  /* 减小上下内边距,控制高度 */
+  text-align: center;
+  display: flex;
+  flex-direction: column; /* 设置垂直方向布局 */
+  justify-content: center;
+  align-items: center;
+  max-height: 100rpx; /* 限制最大高度 */
+  max-width: calc(100% - 10px); /* 宽度最大100%,两边各留5px */
+  margin-left: 15px;  /* 左边留5px */
+  margin-right: 15px; /* 右边留5px */
+  box-sizing: border-box; /* 确保 padding 和 margin 不影响宽度计算 */
+}
+
+.title-en {
+  font-size: 16px;
+  color: #fff;
+  display: block;
+}
+/* 父容器样式 */
+.container {
+  padding: 15px;
+  background-color: #f4f4f4;
+  display: block;
+}
+
+/* 标题样式 */
+.title {
+  font-size: 22px;
+  font-weight: bold;
+}
+
+.content {
+  font-size: 16px;
+}
+
+/* 使每个段落独立 */
+.content {
+  text-indent: 2em;  /* 段落首行缩进 */
+}
+
+.navigat-arrow {
+  padding: 5px;
+  width: 730rpx;
+  height: 400rpx;
+}

+ 0 - 325
pages/Visualization/Visualization.js

@@ -1,325 +0,0 @@
-Page({
-  data: {
-    shoopingtext: "", // 搜索框内容
-    filteredRows: [], // 表格过滤后的数据
-    rows: [], // 所有表格数据
-    showModal: false, // 控制底部编辑删除弹窗的显示与否
-    showAddModal: false, // 控制新增数据弹窗的显示与否
-    currentRow: null, // 当前选中的表格行
-    // 新增数据弹窗的输入框内容
-    newData: {
-      OM: "",
-      CL: "",
-      CEC: "",
-      Hplus: "",
-      HN: "",
-      Al3plus: "",
-      Alumina: "",
-      IronOxides: "",
-      DeltaPH: "",
-      Day0PH: ""
-    }
-  },
-
-  // 页面加载时获取表格数据
-  onLoad: function() {
-    wx.request({
-      url: 'http://localhost:5000/tables',
-      method: 'POST',
-      header: {
-        'Content-Type': 'application/json'
-      },
-      data: {
-        table: 'Soil_samples'
-      },
-      success: (res) => {
-        console.log('后端返回数据:', res.data.rows); // 打印返回数据,确认格式
-        
-        if (res.data && Array.isArray(res.data.rows)) {
-          const rows = res.data.rows.map(row => {
-            return {
-              '0 day pH': row[0],
-              'OM g/kg': row[1],
-              'CL g/kg': row[2],
-              'CEC cmol/kg': row[3],
-              'H+ cmol/kg': row[4],
-              'HN mg/kg': row[5],
-              'Al3plus': row[6],
-              'Free alumina g/kg': row[7],
-              'Free iron oxides g/kg': row[8],
-              '105 day pH': row[9],
-              'Collection location': row[10],
-              'Collection Date': row[11]
-            };
-          });
-  
-          this.setData({
-            rows: rows,
-            filteredRows: rows
-          });
-        } else {
-          wx.showToast({
-            title: '获取数据失败',
-            icon: 'none'
-          });
-        }
-      },
-      fail: (err) => {
-        wx.showToast({
-          title: '请求失败,请重试',
-          icon: 'none'
-        });
-        console.error('请求失败:', err);
-      }
-    });
-  },  
-
-  // 搜索框绑定
-  shoppinginput: function(e) {
-    this.setData({
-      shoopingtext: e.detail.value
-    });
-  },
-
-  // 搜索功能:根据输入内容过滤表格数据
-  search: function() {
-    const searchText = this.data.shoopingtext.toLowerCase();
-    const filteredRows = this.data.rows.filter(item => {
-      return Object.values(item).some(value =>
-        String(value).toLowerCase().includes(searchText)
-      );
-    });
-    this.setData({
-      filteredRows: filteredRows
-    });
-  },
-
-  // 新增按钮点击,显示新增弹窗
-  onAdd: function() {
-    console.log("新增按钮被点击了");  // 调试日志
-    this.setData({
-      showAddModal: true,
-      newData: { // 重置新增数据
-        OM: "",
-        CL: "",
-        CEC: "",
-        Hplus: "",
-        HN: "",
-        Al3plus: "",
-        Alumina: "",
-        IronOxides: "",
-        DeltaPH: "",
-        Day0PH: ""
-      }
-    });
-    console.log("showAddModal: ", this.data.showAddModal);  // 确认数据更新
-  },
-
-  // 输入框绑定:更新新增数据的对应字段
-  onInputOM: function(e) {
-    this.setData({
-      'newData.OM': e.detail.value
-    });
-  },
-  onInputCL: function(e) {
-    this.setData({
-      'newData.CL': e.detail.value
-    });
-  },
-  onInputCEC: function(e) {
-    this.setData({
-      'newData.CEC': e.detail.value
-    });
-  },
-  onInputHplus: function(e) {
-    this.setData({
-      'newData.Hplus': e.detail.value
-    });
-  },
-  onInputHN: function(e) {
-    this.setData({
-      'newData.HN': e.detail.value
-    });
-  },
-  onInputAl3plus: function(e) {
-    this.setData({
-      'newData.Al3plus': e.detail.value
-    });
-  },
-  onInputAlumina: function(e) {
-    this.setData({
-      'newData.Alumina': e.detail.value
-    });
-  },
-  onInputIronOxides: function(e) {
-    this.setData({
-      'newData.IronOxides': e.detail.value
-    });
-  },
-  onInputDeltaPH: function(e) {
-    this.setData({
-      'newData.DeltaPH': e.detail.value
-    });
-  },
-  onInputDay0PH: function(e) {
-    this.setData({
-      'newData.Day0PH': e.detail.value
-    });
-  },
-
-  // 提交新增数据
-  onSubmitAdd: function() {
-    const newRow = this.data.newData;
-    if (Object.values(newRow).some(value => !value)) {
-      wx.showToast({
-        title: '所有字段都必须填写!',
-        icon: 'none'
-      });
-      return;
-    }
-
-    wx.request({
-      url: 'http://localhost:5000/add_item',
-      method: 'POST',
-      header: {
-        'Content-Type': 'application/json'
-      },
-      data: {
-        table: 'Soil_samples',
-        item: newRow
-      },
-      success: (res) => {
-        if (res.data.success) {
-          this.setData({
-            rows: [...this.data.rows, newRow],
-            showAddModal: false
-          });
-          wx.showToast({
-            title: '新增成功',
-            icon: 'success'
-          });
-        } else {
-          wx.showToast({
-            title: '新增失败',
-            icon: 'none'
-          });
-        }
-      },
-      fail: (err) => {
-        wx.showToast({
-          title: '请求失败,请重试',
-          icon: 'none'
-        });
-        console.error('请求失败:', err);
-      }
-    });
-  },
-
-  // 取消新增数据
-  onCancelAdd: function() {
-    this.setData({
-      showAddModal: false
-    });
-  },
-
-  // 编辑按钮点击
-  onEdit: function() {
-    const updatedRow = this.data.currentRow.row;  // 获取当前编辑的行数据
-    wx.request({
-      url: `http://127.0.0.1:5000/delete_item?${condition}`,
-      method: 'DELETE',
-      header: {
-        'Content-Type': 'application/json'
-      },
-      success: (res) => {
-        console.log('响应数据:', res);  // 输出响应数据,检查服务器返回的内容
-        if (res.data.success) {
-          let rows = [...this.data.rows];
-          rows.splice(index, 1);  // 删除选中的行
-          this.setData({
-            rows: rows,
-            showModal: false
-          });
-          wx.showToast({
-            title: '删除成功',
-            icon: 'success'
-          });
-        } else {
-          wx.showToast({
-            title: '删除失败',
-            icon: 'none'
-          });
-        }
-      },
-      fail: (err) => {
-        console.error('请求失败:', err);
-        wx.showToast({
-          title: '请求失败,请重试',
-          icon: 'none'
-        });
-      }
-    });    
-  },
-
-  // 删除按钮点击
-  onDelete: function() {
-    const { index, row } = this.data.currentRow;
-    const condition = `id=${row.id}`;
-
-    wx.request({
-      url: 'http://127.0.0.1:5000/delete_item',
-      method: 'DELETE',
-      header: {
-        'Content-Type': 'application/json'
-      },
-      data: {
-        table: 'Soil_samples',
-        condition: condition
-      },
-      success: (res) => {
-        if (res.data.success) {
-          let rows = [...this.data.rows];
-          rows.splice(index, 1);  // 删除选中的行
-          this.setData({
-            rows: rows,
-            showModal: false
-          });
-          wx.showToast({
-            title: '删除成功',
-            icon: 'success'
-          });
-        } else {
-          wx.showToast({
-            title: '删除失败',
-            icon: 'none'
-          });
-        }
-      },
-      fail: (err) => {
-        wx.showToast({
-          title: '请求失败,请重试',
-          icon: 'none'
-        });
-        console.error('请求失败:', err);
-      }
-    });
-  },
-
-  // 取消编辑删除弹窗
-  onCancel: function() {
-    this.setData({
-      showModal: false
-    });
-  },
-
-  // 行点击事件:显示编辑和删除弹窗
-  onRowClick: function(e) {
-    const index = e.currentTarget.dataset.index;
-    const row = e.currentTarget.dataset.row;
-
-    this.setData({
-      currentRow: { index: index, row: row },
-      showModal: true  // 显示编辑删除弹窗
-    });
-  }
-});

+ 0 - 100
pages/Visualization/Visualization.wxml

@@ -1,100 +0,0 @@
-<scroll-view class="table-container" scroll-x="true" scroll-with-animation="true">
-  <!-- 顶部搜索 -->
-  <view class="top">
-    <view class="topsearch">
-      <view class="frame">
-        <input value="{{shoopingtext}}" placeholder="请输入搜索内容" bindinput="shoppinginput" />
-      </view>
-      <text bindtap="search">搜索</text>
-    </view>
-  </view>
-
-  <!-- 新增按钮 -->
-  <view class="add-btn-container">
-    <button class="add-btn" bindtap="onAdd">新增</button>
-    <button class="add-btn" bindtap="onAdd">导入</button>
-    <button class="add-btn" bindtap="onAdd">导出</button>
-  </view>
-
-  <!-- 表头 -->
-  <view class="table">
-    <view class="table-header">
-      <view class="table-cell">序号</view>
-      <view class="table-cell">0 day pH</view>
-      <view class="table-cell">有机质含量</view>
-      <view class="table-cell">土壤粘粒重量</view>
-      <view class="table-cell">阳离子交换量</view>
-      <view class="table-cell">氢离子含量</view>
-      <view class="table-cell">铵离子含量</view>
-      <view class="table-cell">铝离子含量</view>
-      <view class="table-cell">游离氧化铝</view>
-      <view class="table-cell">游离氧化铁</view>
-      <view class="table-cell">105 day pH</view>
-      <view class="table-cell">采集位置</view>
-      <view class="table-cell">采集日期</view>
-    </view>
-
-    <!-- 数据加载中 -->
-    <view wx:if="{{loading}}" class="loading">数据加载中,请稍候...</view>
-
-    <!-- 无数据提示 -->
-    <view wx:if="{{!loading && filteredRows.length === 0}}" class="no-data">暂无数据</view>
-
-    <!-- 表格内容 -->
-    <scroll-view wx:else scroll-y="true" class="table-body">
-      <block wx:for="{{filteredRows}}" wx:key="index">
-        <view class="table-row" bindtap="onRowClick" data-index="{{index}}" data-row="{{item}}">
-          <view class="table-cell">{{item['0 day pH']}}</view>
-          <view class="table-cell">{{item['OM g/kg']}}</view>
-          <view class="table-cell">{{item['CL g/kg']}}</view>
-          <view class="table-cell">{{item['CEC cmol/kg']}}</view>
-          <view class="table-cell">{{item['H+ cmol/kg']}}</view>
-          <view class="table-cell">{{item['HN mg/kg']}}</view>
-          <view class="table-cell">{{item['Al3plus']}}</view>
-          <view class="table-cell">{{item['Free alumina g/kg']}}</view>
-          <view class="table-cell">{{item['Free iron oxides g/kg']}}</view>
-          <view class="table-cell">{{item['105 day pH']}}</view>
-          <view class="table-cell">{{item['Collection location']}}</view>
-          <view class="table-cell">{{item['Collection Date']}}</view>
-        </view>
-      </block>
-    </scroll-view>
-  </view>
-</scroll-view>
-
-<!-- 新增数据弹窗 -->
-<view class="modal" wx:if="{{showAddModal}}">
-  <view class="modal-content">
-    <view class="page-section-title">游离氧化铁 (free iron oxides g/kg):</view>
-    <input 
-      class="input-field" 
-      type="text" 
-      placeholder="请输入游离氧化铁含量" 
-      data-field="IronOxides" 
-      bindinput="onInputChange" 
-    />
-
-    <view class="page-section-title">有机质含量 (OM g/kg):</view>
-    <input class="input-field" placeholder="请输入OM含量" data-field="OM" bindinput="onInputChange" />
-    <view class="page-section-title">土壤粘粒重量 (CL g/kg):</view>
-    <input class="input-field" placeholder="请输入CL含量" data-field="CL" bindinput="onInputChange" />
-    <view class="page-section-title">阳离子交换量 (CEC cmol/kg):</view>
-    <input class="input-field" placeholder="请输入CEC含量" data-field="CEC" bindinput="onInputChange" />
-    <view class="page-section-title">氢离子含量 (H+ cmol/kg):</view>
-    <input class="input-field" placeholder="请输入H+含量" data-field="Hplus" bindinput="onInputChange" />
-
-    <view class="button-container">
-      <button class="submit-btn" bindtap="onSubmitAdd">提交</button>
-      <button class="cancel-btn" bindtap="onCancelAdd">取消</button>
-    </view>
-  </view>
-</view>
-
-<!-- 底部编辑删除弹窗 -->
-<view class="modal" wx:if="{{showModal}}">
-  <view class="modal-content">
-    <view class="modal-item" bindtap="onEdit">编辑</view>
-    <view class="modal-item delete" bindtap="onDelete">删除</view>
-    <view class="modal-item cancel" bindtap="onCancel">取消</view>
-  </view>
-</view>

+ 0 - 203
pages/Visualization/Visualization.wxss

@@ -1,203 +0,0 @@
-/* 确保搜索框和新增按钮固定在顶部 */
-.top {
-  position: sticky; /* 使搜索框在页面滚动时固定 */
-  top: 0; /* 固定在顶部 */
-  z-index: 100; /* 确保在表格之上 */
-  background-color: #f7f7f7; /* 背景色 */
-  padding: 2% 0; /* 上下内边距 */
-}
-
-.topsearch {
-  width: 90%;
-  margin-left: 5%;
-  display: flex;
-  align-items: center;
-  justify-content: space-between; /* 确保搜索框和按钮分开 */
-}
-
-.frame {
-  background-color: white;
-  width: 75%;
-  border-radius: 20rpx;
-  padding: 0 3%;
-}
-
-.frame > input {
-  font-size: 24rpx;
-  margin: 6rpx 0;
-}
-
-.topsearch > text {
-  width: 10%;
-  margin-left: 5%;
-  color: #a8a7a7fa;
-}
-
-/* 新增按钮容器 */
-.add-btn-container {
-  position: sticky;
-  top: 0;
-  background-color: #fff; /* 背景色为白色 */
-  z-index: 101; /* 确保新增按钮高于表格 */
-  padding: 10rpx; /* 增加按钮的上内边距 */
-  display: flex;
-  justify-content: center;
-  margin-top: 10rpx; /* 新增按钮的上边距 */
-}
-
-/* 新增按钮 */
-.add-btn {
-  padding: 5px 12px;
-  background-color: #007aff;
-  color: #fff;
-  border-radius: 4px;
-  font-size: 14px;
-}
-
-/* 表格容器 */
-.table-container {
-  width: 100%;
-  overflow-x: auto; /* 启用横向滚动 */
-  background-color: #fff;
-  border: 1rpx solid #ddd;
-  margin-top: 20rpx; /* 添加上边距,确保不会和顶部元素重叠 */
-  white-space: nowrap; /* 禁止换行 */
-}
-
-/* 表头样式 */
-.table-header {
-  display: flex;
-  width: max-content;
-  background-color: #FFD700;
-  font-weight: bold;
-  border-bottom: 1rpx solid #ddd;
-  z-index: 99; /* 确保表头高于表格内容 */
-}
-
-/* 表格单元格样式 */
-.table-cell {
-  flex: none;
-  width: 250rpx;
-  padding: 10rpx;
-  text-align: center;
-  font-size: 28rpx;
-  color: #333;
-  border-right: 1rpx solid #ddd;
-  white-space: nowrap;
-  overflow: hidden;
-  text-overflow: ellipsis;
-}
-
-/* 表格内容样式 */
-.table-body {
-  display: flex;
-  flex-direction: column;
-  width: max-content;
-}
-
-.table-row {
-  display: flex;
-}
-
-.table-row:nth-child(odd) {
-  background-color: #f9f9f9;
-}
-
-.table-row:nth-child(even) {
-  background-color: #ffffff;
-}
-
-/* 模态框背景 */
-.modal {
-  position: fixed; /* 固定定位,始终在屏幕中央 */
-  top: 0;
-  left: 0;
-  right: 0;
-  bottom: 0;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  background-color: rgba(0, 0, 0, 0.6); /* 半透明背景色,增加一点深度感 */
-  z-index: 1000; /* 提高层级,确保模态框在其他元素之上 */
-}
-
-/* 模态框内容 */
-.modal-content {
-  background-color: #fff; /* 模态框内容背景为白色 */
-  border-radius: 16px; /* 圆角 */
-  width: 80%; /* 宽度占80% */
-  max-width: 500rpx; /* 最大宽度限制 */
-  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1); /* 添加阴影效果,增加浮动感 */
-  padding: 20rpx; /* 内边距 */
-  transition: transform 0.3s ease-out; /* 平滑的动画过渡 */
-}
-
-/* 每个选项项 */
-.modal-item {
-  text-align: center; /* 每个项的文本居中 */
-  font-size: 32rpx; /* 字体大小 */
-  padding: 20rpx 0; /* 内边距 */
-  border-top: 1rpx solid #eee; /* 上边框为浅灰色 */
-  cursor: pointer; /* 鼠标悬停时显示为手指 */
-  transition: background-color 0.2s; /* 添加鼠标悬停的平滑过渡 */
-}
-
-/* 第一项不显示上边框 */
-.modal-item:first-child {
-  border-top: none;
-}
-
-/* 提交按钮样式 */
-.submit-btn {
-  background-color: #4CAF50; /* 绿色背景 */
-  color: white; /* 白色字体 */
-  border: none; /* 去掉边框 */
-  padding: 10rpx 20rpx; /* 内边距 */
-  font-size: 32rpx; /* 字体大小 */
-  border-radius: 8rpx; /* 圆角 */
-  cursor: pointer; /* 鼠标悬停时显示为手指 */
-  transition: background-color 0.3s ease; /* 背景色变化平滑过渡 */
-}
-
-/* 提交按钮悬停效果 */
-.submit-btn:hover {
-  background-color: #45a049; /* 悬停时变为更深的绿色 */
-}
-
-/* 取消按钮样式 */
-.cancel-btn {
-  background-color: #e74c3c; /* 红色背景 */
-  color: white; /* 白色字体 */
-  border: none; /* 去掉边框 */
-  padding: 10rpx 20rpx; /* 内边距 */
-  font-size: 32rpx; /* 字体大小 */
-  border-radius: 8rpx; /* 圆角 */
-  cursor: pointer; /* 鼠标悬停时显示为手指 */
-  transition: background-color 0.3s ease; /* 背景色变化平滑过渡 */
-}
-
-/* 取消按钮悬停效果 */
-.cancel-btn:hover {
-  background-color: #c0392b; /* 悬停时变为更深的红色 */
-}
-
-/* 新增数据弹窗的按钮容器 */
-.modal-content {
-  display: flex;
-  flex-direction: column; /* 默认垂直方向布局 */
-  align-items: center; /* 居中对齐内容 */
-}
-
-/* 按钮容器 */
-.button-container {
-  display: flex; /* 使用 flexbox 布局 */
-  justify-content: space-between; /* 按钮之间均匀分布 */
-  width: 100%; /* 按钮容器宽度为 100% */
-  margin-top: 20rpx; /* 上边距 */
-}
-
-/* 每个按钮样式 */
-.submit-btn, .cancel-btn {
-  flex: 1; /* 使按钮宽度相等 */
-  margin: 0 10rpx; /* 按钮间隔 */
-}

+ 24 - 36
pages/index/index.js

@@ -1,59 +1,47 @@
 Page({
   data: {
-    username: '', // 用户名
-    password: '', // 密码
-    errorMessage: '' // 错误信息
+    username: '',
+    password: '',
+    role: '' // 保存角色信息
   },
 
-  // 输入用户名
-  inputUsername: function (e) {
+  // 页面加载时获取角色参数
+  onLoad(options) {
     this.setData({
-      username: e.detail.value
+      role: options.role || '' // 默认角色为空
     });
   },
 
-  // 输入密码
-  inputPassword: function (e) {
-    this.setData({
-      password: e.detail.value
-    });
+  // 更新输入框的值
+  onInputChange(e) {
+    const { field } = e.currentTarget.dataset;
+    this.setData({ [field]: e.detail.value });
   },
 
   // 登录逻辑
-  login: function () {
-    const { username, password } = this.data;
+  onLogin() {
+    const { username, password, role } = this.data;
 
-    // 简单验证逻辑:用户名和密码为 "123" 时验证通过
     if (!username || !password) {
       wx.showToast({
-        title: '用户名和密码不能为空',
-        icon: 'none',
-        duration: 2000
+        title: '请输入用户名和密码',
+        icon: 'none'
       });
       return;
     }
 
-    wx.showLoading({
-      title: '登录中...'
-    });
-
+    wx.showLoading({ title: '登录中...' });
     setTimeout(() => {
-      if (username === '123' && password === '123') {
-        wx.hideLoading();
-        wx.switchTab({ // 跳转到 tabBar 页面
-          url: '/pages/Calculate/Calculate'
-        });
+      wx.hideLoading();
+
+      // 模拟登录成功后跳转
+      wx.setStorageSync('userRole', role); // 存储角色信息
+
+      if (role === 'admin') {
+        wx.redirectTo({ url: '/pages/admin/threshold/threshold' });
       } else {
-        wx.hideLoading();
-        this.setData({
-          errorMessage: '用户名或密码错误'
-        });
-        wx.showToast({
-          title: '用户名或密码错误',
-          icon: 'none',
-          duration: 2000
-        });
+        wx.redirectTo({ url: '/pages/Regular User/Home/Home' });
       }
-    }, 1500);
+    }, 1000);
   }
 });

+ 18 - 4
pages/index/index.wxml

@@ -1,6 +1,20 @@
 <view class="container">
-  <input class="input" bindinput="inputUsername" placeholder="请输入用户名" />
-  <input class="input" bindinput="inputPassword" placeholder="请输入密码" type="password" />
-  <button class="btn" bindtap="login">登录</button>
-  <text class="error">{{errorMessage}}</text>
+  <view class="role-info">当前角色:{{ role === 'admin' ? '管理员' : '普通用户' }}</view>
+  <view class="form">
+    <input 
+      class="input" 
+      type="text" 
+      placeholder="请输入用户名" 
+      data-field="username" 
+      bindinput="onInputChange" 
+    />
+    <input 
+      class="input" 
+      type="password" 
+      placeholder="请输入密码" 
+      data-field="password" 
+      bindinput="onInputChange" 
+    />
+    <button class="login-button" bindtap="onLogin">登录</button>
+  </view>
 </view>

+ 23 - 65
pages/index/index.wxss

@@ -3,77 +3,35 @@
   flex-direction: column;
   align-items: center;
   justify-content: center;
-  padding: 20rpx 40rpx;
-  height: 50vh; /* 使容器占据整个屏幕高度 */
+  height: 100vh;
+  background-color: #f5f5f5;
 }
 
-.input {
-  width: 100%;
-  height: 80rpx;
-  margin-bottom: 20rpx;
-  padding: 0 20rpx;
-  border: 1px solid #ddd;
-  border-radius: var(--border-radius, 10rpx);
-  box-sizing: border-box;
-}
-
-.btn {
-  width: 100%;
-  height: 80rpx;
-  background-color: var(--primary-color, #1aad19);
-  color: #fff;
-  border: none;
-  border-radius: var(--border-radius, 10rpx);
-  text-align: center;
-  line-height: 45rpx;
-  font-size: 36rpx;
-  box-shadow: 0 4rpx 10rpx rgba(0, 0, 0, 0.1);  /* 添加阴影 */
-  transition: background-color 0.3s ease, box-shadow 0.3s ease;  /* 背景颜色和阴影过渡效果 */
-}
-
-.btn:active {
-  background-color: var(--active-color, #128c13);
-  box-shadow: 0 2rpx 5rpx rgba(0, 0, 0, 0.2);  /* 按钮点击时阴影变化 */
+.role-info {
+  font-size: 18px;
+  color: #333;
+  margin-bottom: 20px;
 }
 
-.btn:hover {
-  background-color: var(--hover-color, #16b818);
-  cursor: pointer;  /* 鼠标悬浮时显示手型 */
+.form {
+  width: 80%;
 }
 
-.error {
-  color: red;
-  margin-top: 10rpx;
-  animation: fadeIn 0.5s ease;
-}
-
-@keyframes fadeIn {
-  from {
-    opacity: 0;
-  }
-  to {
-    opacity: 1;
-  }
-}
-
-.avatar {
-  width: 150rpx;
-  height: 150rpx;
-  border-radius: 50%;
-  margin-top: 20rpx;
-  object-fit: cover;
+.input {
+  width: 100%;
+  margin-bottom: 20px;
+  padding: 10px;
+  border: 1px solid #ccc;
+  border-radius: 4px;
 }
 
-@media screen and (max-width: 375px) {
-  .container {
-    padding: 100rpx 20rpx;
-  }
-  .btn {
-    font-size: 28rpx;
-    height: 60rpx;
-    line-height: 60rpx;
-  }
-  .input {
-    height: 60rpx;
-  }
+.login-button {
+  width: 100%;
+  padding: 10px;
+  background-color: #007AFF;
+  color: white;
+  text-align: center;
+  border: none;
+  border-radius: 4px;
+  font-size: 16px;
 }

+ 0 - 22
pages/logs/logs.js

@@ -1,22 +0,0 @@
-Page({
-  data: {
-    login: false,
-    uerInfo: {}
-  },
-
-  // 退出登录
-  tuichu() {
-    this.setData({
-      avatarUrl: '',
-      nickName: '',
-      isLogin: false
-    });
-  },
-  
-  goLogin() {
-    if (!this.data.login) {
-      console.log("点击前往登录");
-      // 这里你可以加入逻辑去处理登录操作
-    }
-  }
-});

+ 0 - 5
pages/logs/logs.json

@@ -1,5 +0,0 @@
-{
-  "usingComponents": {
-    "navigation-bar": "/components/navigation-bar/navigation-bar"
-  }
-}

+ 0 - 33
pages/logs/logs.wxml

@@ -1,33 +0,0 @@
-<view class="center">
-  <!-- 处理点击事件和hover类 -->
-  <view class="logo" bindtap="goLogin" hover-class="{{!login ? 'logo-hover' : ''}}">
-    <image class="logo-img" src="/assets/taddar/me.png"></image>
-    <view class="logo-title">
-      <text class="uer-name">Hi,{{ login ? uerInfo.name : '未登录' }}</text>
-      <!-- 未登录时显示登录图标 -->
-      <image class="go-login" wx:if="{{!login}}" src="/assets/taddar/right (1).png"></image>
-    </view>
-  </view>
-
-  <view class="center-list">
-    <view class="center-list-item">
-      <!-- 使用图片替代 iconfont 字体图标 -->
-      <image class="list-icon" src="/assets/taddar/lock.png"></image>
-      <text class="list-text">帐号管理</text>
-      <image class="navigat-arrow" src="/assets/taddar/right.png"></image>
-    </view>
-    <view class="center-list-item">
-      <image class="list-icon" src="/assets/taddar/edit.png"></image>
-      <text class="list-text">编辑个人信息</text>
-      <image class="navigat-arrow" src="/assets/taddar/right.png"></image>
-    </view>
-  </view>
-
-  <view class="center-list">
-    <view class="center-list-item border-bottom">
-      <image class="list-icon" src="/assets/taddar/logout.png"></image>
-      <button class="list-text" bind:tap="tuichu">退出登录</button> 
-      <image class="navigat-arrow" src="/assets/taddar/right.png"></image>
-    </view>
-  </view>
-</view>

+ 0 - 0
pages/Data Visualization/Data Visualization.js → shoping/Data Visualization/Data Visualization.js


+ 0 - 0
pages/b/b.json → shoping/Data Visualization/Data Visualization.json


+ 0 - 0
pages/Data Visualization/Data Visualization.wxml → shoping/Data Visualization/Data Visualization.wxml


+ 0 - 0
pages/Data Visualization/Data Visualization.wxss → shoping/Data Visualization/Data Visualization.wxss


+ 101 - 0
shoping/Staffl/Staff.js

@@ -0,0 +1,101 @@
+Page({
+  data: {
+    isLogin: false,  // 登录状态
+    userInfo: {},    // 存储用户信息(头像和昵称)
+  },
+
+  // 页面加载时获取缓存的昵称和头像
+  onLoad() {
+    const storedUserInfo = wx.getStorageSync('userinfo'); // 获取缓存中的用户信息
+
+    if (storedUserInfo) {
+      // 如果缓存中有用户信息,更新页面上的数据
+      this.setData({
+        userInfo: storedUserInfo,  // 更新用户信息
+        isLogin: true, // 设置登录状态为 true
+      });
+    }
+  },
+
+  // 获取用户头像
+  getAvatar(e) {
+    const avatarUrl = e.detail.avatarUrl;
+    this.setData({
+      'userInfo.avatarUrl': avatarUrl
+    });
+
+    // 保存头像到缓存
+    let userInfo = wx.getStorageSync('userinfo') || {};
+    userInfo.avatarUrl = avatarUrl;
+    wx.setStorageSync('userinfo', userInfo);
+  },
+
+  // 获取用户昵称
+  getName(e) {
+    const nickName = e.detail.value;
+    this.setData({
+      'userInfo.nickName': nickName
+    });
+
+    // 保存昵称到缓存
+    let userInfo = wx.getStorageSync('userinfo') || {};
+    userInfo.nickName = nickName;
+    wx.setStorageSync('userinfo', userInfo);
+  },
+
+  // 显示登录弹窗
+  gologin() {
+    this.setData({
+      isHidden: false
+    });
+  },
+
+  // 取消登录弹窗
+  potNo() {
+    this.setData({
+      isHidden: true
+    });
+  },
+
+  // 确认登录弹窗
+  popYes() {
+    const { avatarUrl, nickName } = this.data.userInfo;
+    if (!avatarUrl || !nickName) {
+      wx.showToast({
+        icon: 'error',
+        title: '请获取头像和昵称',
+      });
+      return;
+    }
+
+    // 保存头像和昵称到缓存
+    wx.setStorageSync('userinfo', this.data.userInfo);
+
+    this.setData({
+      isLogin: true,  // 设置登录状态为 true
+      isHidden: true, // 隐藏弹窗
+    });
+  },
+
+  goToThreshold() {
+    wx.navigateTo({
+      url: '/pages/threshold/threshold'
+    });
+  },
+
+  // 退出登录
+  tuichu() {
+    this.setData({
+      isLogin: false,  // 设置登录状态为 false
+      userInfo: {},    // 清除用户信息
+    });
+
+    // 清除缓存中的用户信息
+    wx.removeStorageSync('userinfo');
+    
+    // 跳转到 "pages/b/b" 页面
+    wx.navigateTo({
+      url: '/pages/Regular User/b/b', // 路径可以根据实际情况修改
+    });
+  }
+});

+ 8 - 0
shoping/Staffl/Staff.json

@@ -0,0 +1,8 @@
+{
+  "usingComponents": {
+    "custom-tab-bar": "/custom-tab-bar/index"
+  },
+  "navigationBarTitleText": "个人中心",
+  "navigationBarBackgroundColor": "#ffffff",  
+  "navigationBarTextStyle": "black"  
+}

+ 33 - 0
shoping/Staffl/Staff.wxml

@@ -0,0 +1,33 @@
+<view class="center">
+  <!-- 处理点击事件和hover类 -->
+  <view class="logo" bindtap="goLogin" hover-class="{{!isLogin ? 'logo-hover' : ''}}">
+  <!-- 如果已登录并且有头像,则显示用户头像 -->
+  <image class="logo-img" wx:if="{{isLogin && userInfo && userInfo.avatarUrl}}" src="{{ userInfo.avatarUrl }}" />
+  <!-- 如果未登录或没有头像,则显示默认头像 -->
+  <image class="logo-img" wx:if="{{!isLogin || !userInfo.avatarUrl}}" src="/assets/taddar/me.png" />
+  <view class="logo-title">
+    <!-- 显示昵称,如果已登录,则显示昵称 -->
+    <text class="uer-name">Hi,{{ isLogin ? userInfo.nickName : '未登录' }}</text>
+    <!-- 未登录时显示登录图标 -->
+    <image class="go-login" wx:if="{{!isLogin}}" src="/assets/taddar/right (1).png" />
+  </view>
+</view>
+
+
+  <view class="center-list">
+    <view class="center-list-item">
+      <image class="list-icon" src="/assets/taddar/edit.png" />
+      <text class="list-text">编辑个人信息</text>
+      <image class="navigat-arrow" src="/assets/taddar/right.png" />
+    </view>
+  </view>
+
+  <view class="center-list">
+    <view class="center-list-item border-bottom">
+      <image class="list-icon" src="/assets/taddar/logout.png" />
+      <text class="list-text" bindtap="tuichu">退出登录</text>
+      <image class="navigat-arrow" src="/assets/taddar/right.png" />
+    </view>
+  </view>
+</view>
+<custom-tab-bar></custom-tab-bar>

+ 7 - 6
pages/logs/logs.wxss → shoping/Staffl/Staff.wxss

@@ -82,6 +82,9 @@ page {
   box-sizing: border-box;
   flex-direction: row;
   padding: 0 20rpx;
+  display: flex;
+  justify-content: center; /* 图片和文本水平居中 */
+  align-items: center;     /* 图片和文本垂直居中 */
 }
 
 /* 边框样式 */
@@ -95,8 +98,7 @@ page {
 .list-icon {
   width: 40rpx;  /* 设置图片宽度 */
   height: 40rpx;  /* 设置图片高度 */
-  line-height: 90rpx; /* 图片垂直居中 */
-  margin-right: 20rpx;
+  margin-right: 10rpx; /* 图标和文本之间的间距 */
   object-fit: contain; /* 保证图片不被拉伸 */
 }
 
@@ -107,14 +109,13 @@ page {
   font-size: 34rpx;
   color: #555;
   flex: 1;
-  text-align: left;
+  text-align: left;  /* 使文字水平居中 */
 }
 
 /* 导航箭头样式 */
 .navigat-arrow {
-  height: 40rpx; /* 设置箭头图片的高度 */
   width: 40rpx;  /* 设置箭头图片的宽度 */
-  line-height: 90rpx; /* 图片垂直居中 */
+  height: 40rpx; /* 设置箭头图片的高度 */
   margin-left: 10rpx; /* 设置箭头和文本之间的间距 */
   object-fit: contain; /* 保证图片不被拉伸 */
-}
+}

+ 66 - 0
shoping/Visualizatio/Visualizatio.js

@@ -0,0 +1,66 @@
+// pages/admin/Visualizatio/Visualizatio.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 5 - 0
shoping/Visualizatio/Visualizatio.json

@@ -0,0 +1,5 @@
+{
+  "usingComponents": {
+    "custom-tab-bar": "/custom-tab-bar/index"
+  }
+}

+ 3 - 0
shoping/Visualizatio/Visualizatio.wxml

@@ -0,0 +1,3 @@
+<!--pages/admin/Visualizatio/Visualizatio.wxml-->
+<text>pages/admin/Visualizatio/Visualizatio.wxml</text>
+<custom-tab-bar></custom-tab-bar>

+ 1 - 0
shoping/Visualizatio/Visualizatio.wxss

@@ -0,0 +1 @@
+/* pages/admin/Visualizatio/Visualizatio.wxss */

+ 66 - 0
shoping/Visualization/Visualization.js

@@ -0,0 +1,66 @@
+// pages/admin/Visualization/Visualization.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 5 - 0
shoping/Visualization/Visualization.json

@@ -0,0 +1,5 @@
+{
+  "usingComponents": {
+    "custom-tab-bar": "/custom-tab-bar/index"
+  }
+}

Some files were not shown because too many files changed in this diff