Bläddra i källkod

1. 接口联调
2. 推送相关

yangzm123 1 år sedan
förälder
incheckning
3fd40ddeb5
67 ändrade filer med 2236 tillägg och 1281 borttagningar
  1. 14 13
      .hbuilderx/launch.json
  2. 6 2
      src/App.vue
  3. 14 1
      src/androidPrivacy.json
  4. 8 2
      src/components/cols-container/index.vue
  5. 53 0
      src/components/no-auth/index.vue
  6. 20 2
      src/config/apis/auth.js
  7. 13 0
      src/config/apis/dict.js
  8. 25 0
      src/config/apis/flow.js
  9. 16 0
      src/config/apis/message.js
  10. 18 0
      src/config/apis/supplier.js
  11. 5 1
      src/config/http.js
  12. 1 7
      src/config/request.js
  13. 17 7
      src/kirin-ui/kirin-form/kirin-form.vue
  14. 20 8
      src/manifest.json
  15. 29 69
      src/pages.json
  16. 4 2
      src/pages/index/components/home-chart.vue
  17. 9 6
      src/pages/index/components/products-list.vue
  18. 24 13
      src/pages/index/components/records-list.vue
  19. 46 34
      src/pages/index/components/supplier-list.vue
  20. 60 58
      src/pages/index/index.vue
  21. 12 4
      src/pages/login/index.vue
  22. 41 40
      src/pages/message/index.vue
  23. 191 34
      src/pages/mine/index.vue
  24. 0 187
      src/pages/setting/index.vue
  25. 90 0
      src/static/htmls/privacy.html
  26. 237 0
      src/static/htmls/service.html
  27. BIN
      src/static/login_bg.jpeg
  28. BIN
      src/static/noAuth.png
  29. BIN
      src/static/splash.png
  30. BIN
      src/static/tabBar/home.png
  31. BIN
      src/static/tabBar/home_selected.png
  32. BIN
      src/static/tabBar/msg.png
  33. BIN
      src/static/tabBar/msg_selected.png
  34. BIN
      src/static/tabBar/my.png
  35. BIN
      src/static/tabBar/my_selected.png
  36. 16 1
      src/store/index.js
  37. 5 258
      src/subpkg/agreement/index.vue
  38. 152 0
      src/subpkg/flow/detail.vue
  39. 20 47
      src/subpkg/flow/index.vue
  40. 7 15
      src/subpkg/flow/item.vue
  41. 19 53
      src/subpkg/home/records.vue
  42. 13 19
      src/subpkg/home/representations.vue
  43. 61 19
      src/subpkg/home/supplier-detail.vue
  44. 28 50
      src/subpkg/home/supplier.vue
  45. 80 10
      src/subpkg/setting/authentication.vue
  46. 15 4
      src/subpkg/setting/cancel-account.vue
  47. 28 32
      src/subpkg/setting/constant.js
  48. 58 9
      src/subpkg/setting/my-info.vue
  49. 24 6
      src/subpkg/setting/register.vue
  50. 14 5
      src/subpkg/setting/update-psd.vue
  51. 59 0
      src/subpkg/setting/version.vue
  52. 6 0
      src/uni_modules/uni-config-center/changelog.md
  53. 81 0
      src/uni_modules/uni-config-center/package.json
  54. 93 0
      src/uni_modules/uni-config-center/readme.md
  55. 0 0
      src/uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/index.js
  56. 9 0
      src/uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/package.json
  57. 32 0
      src/uni_modules/uni-id-common/changelog.md
  58. 84 0
      src/uni_modules/uni-id-common/package.json
  59. 3 0
      src/uni_modules/uni-id-common/readme.md
  60. 0 0
      src/uni_modules/uni-id-common/uniCloud/cloudfunctions/common/uni-id-common/index.js
  61. 16 0
      src/uni_modules/uni-id-common/uniCloud/cloudfunctions/common/uni-id-common/package.json
  62. 261 261
      src/uni_modules/uv-subsection/components/uv-subsection/uv-subsection.vue
  63. 39 0
      src/utils/form-basic-mixin.js
  64. 4 2
      src/utils/utils.js
  65. 17 0
      uniCloud-aliyun/cloudfunctions/pushMessage/index.js
  66. 7 0
      uniCloud-aliyun/cloudfunctions/pushMessage/package.json
  67. 12 0
      uniCloud-aliyun/database/JQL查询.jql

+ 14 - 13
.hbuilderx/launch.json

@@ -4,23 +4,24 @@
     "version" : "0.0",
     "configurations" : [
         {
-        	"app-plus" : 
-        	{
-        		"launchtype" : "local"
-        	},
-        	"default" : 
-        	{
-        		"launchtype" : "local"
-        	},
-        	"mp-weixin" : 
-        	{
-        		"launchtype" : "local"
-        	},
-        	"type" : "uniCloud"
+            "app-plus" : {
+                "launchtype" : "local"
+            },
+            "default" : {
+                "launchtype" : "local"
+            },
+            "mp-weixin" : {
+                "launchtype" : "local"
+            },
+            "type" : "uniCloud"
         },
         {
             "openVueDevtools" : true,
             "type" : "uni-app:miniProgram"
+        },
+        {
+            "playground" : "custom",
+            "type" : "uni-app:app-android"
         }
     ]
 }

+ 6 - 2
src/App.vue

@@ -2,13 +2,17 @@
  * @Author: PoJun
  * @Date: 2023-05-14 16:13:54
  * @LastEditors: PoJun
- * @LastEditTime: 2023-12-19 14:14:34
+ * @LastEditTime: 2024-01-09 15:22:54
  * @Message: Nothing
 -->
 <script>
 export default {
     onLaunch: function () {
-        // 不能在启动的时候去做判断, 因为有通过扫码来的逻辑
+        console.log("App Launch");
+        uni.onPushMessage(res => {
+            console.log("收到推送消息:", res); //监听推送消息
+            uni.$uv.toast("收到推送消息");
+        });
     },
     onShow: function () {
         console.log("App Show");

+ 14 - 1
src/androidPrivacy.json

@@ -1,3 +1,16 @@
 {
-    "prompt" : "template"
+    "version" : "1",
+    "prompt" : "template",
+    "title" : "服务协议和隐私政策",
+    "message" : "  请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/>  你可阅读<a href=\"static\\htmls\\service.html\">《服务协议》</a>和<a href=\"static\\htmls\\privacy.html\">《隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。",
+    "buttonAccept" : "同意并接受",
+    "buttonRefuse" : "暂不同意",
+    "hrefLoader" : "system|default",
+    "backToExit" : "false",
+    "second" : {
+        "title" : "确认提示",
+        "message" : "  进入应用前,你需先同意<a href=\"static\\htmls\\service.html\">《服务协议》</a>和<a href=\"static\\htmls\\privacy.html\">《隐私政策》</a>,否则将退出应用。",
+        "buttonAccept" : "同意并继续",
+        "buttonRefuse" : "退出应用"
+    }
 }

+ 8 - 2
src/components/cols-container/index.vue

@@ -2,7 +2,7 @@
  * @Author: PoJun
  * @Date: 2023-09-15 15:30:09
  * @LastEditors: PoJun
- * @LastEditTime: 2023-12-19 14:47:40
+ * @LastEditTime: 2024-01-04 15:33:42
  * @Message: Nothing
 -->
 <template>
@@ -15,7 +15,10 @@
                 :customStyle="{ height: 140 + 'rpx' }"
             >
                 <uv-icon :name="item.icon" custom-prefix="custom-icon" size="30" :color="item.color"></uv-icon>
-                <text class="boxContent-text">{{ item.title }}</text>
+                <view class="boxContent-text">
+                    <text class="uv-m-r-10">{{ item.title }}</text>
+                    <uv-badge v-if="item.mark" type="error" max="99" :value="item.mark"></uv-badge>
+                </view>
             </uv-grid-item>
         </uv-grid>
     </view>
@@ -60,6 +63,9 @@ export default {
     &-text {
         font-size: 26rpx;
         margin-top: 14rpx;
+        display: flex;
+        flex-direction: row;
+        align-items: center;
     }
 }
 </style>

+ 53 - 0
src/components/no-auth/index.vue

@@ -0,0 +1,53 @@
+<!--
+ * @Author: PoJun
+ * @Date: 2023-09-15 15:30:09
+ * @LastEditors: PoJun
+ * @LastEditTime: 2024-01-08 16:05:54
+ * @Message: 未登录页面
+-->
+<template>
+    <view class="no-auth">
+        <uv-image :src="noAuthImg" height="300px" width="300px">
+            <template v-slot:loading>
+                <uv-loading-icon></uv-loading-icon>
+            </template>
+        </uv-image>
+
+        <text class="uv-info uv-font-24">{{ title }}</text>
+
+        <view class="uv-m-t-30">
+            <slot></slot>
+        </view>
+    </view>
+</template>
+
+<script>
+import noAuthImg from "@/static/noAuth.png";
+export default {
+    props: {
+        title: {
+            type: String,
+            default: "",
+        },
+    },
+    name: "NoAuth",
+    data() {
+        return { noAuthImg };
+    },
+    methods: {},
+};
+</script>
+
+<style lang="scss" scoped>
+.no-auth {
+    height: calc(100vh - var(--status-bar-height) - 50px);
+    /* #ifdef APP-PLUS */
+    height: 100vh;
+    /* #endif */
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    align-items: center;
+    padding-bottom: 10vh;
+}
+</style>

+ 20 - 2
src/config/apis/auth.js

@@ -2,7 +2,7 @@
  * @Author: PoJun
  * @Date: 2023-09-13 17:12:51
  * @LastEditors: PoJun
- * @LastEditTime: 2023-12-14 15:58:44
+ * @LastEditTime: 2024-01-04 16:42:03
  * @Message: 登录相关
  */
 const { http } = uni.$uv;
@@ -12,4 +12,22 @@ export const wechatLogin = (code, pass, type) =>
     http.post("/wechat/mini/login", { principal: code, credentials: pass, type });
 
 // 获取登录信息
-export const getLoginInfo = config => http.get(`/web/login_info`, config);
+export const getLoginInfo = config => http.get(`/web/login_info`, config);
+
+// 注册账号
+export const registerUsername = data => http.post("/web/register", data);
+
+// 重置用户密码信息
+export const updatePassword = data => http.post("/currentuser/reset_security", data);
+
+// 修改人员信息
+export const editPersonInfo = (data, config) => http.post("/org/org_persons/person_uer/info", data, config);
+
+// 用户申请加入组织
+export const userJoinOrgAffair = (data, config) => http.post("/affair_ext/UserJoinOrgAffair", data, config);
+
+// 用户申请成为供应商
+export const supplierAffair = (data, config) => http.post("/affair_ext/SupplierAffair", data, config);
+
+// 注销账号
+export const cancelUser = data => http.post("/web/cancel", data);

+ 13 - 0
src/config/apis/dict.js

@@ -0,0 +1,13 @@
+/*
+ * @Author: PoJun
+ * @Date: 2023-09-13 17:12:51
+ * @LastEditors: PoJun
+ * @LastEditTime: 2023-10-31 16:11:46
+ * @Message: 字典、枚举相关
+ */
+const { http } = uni.$uv;
+/** 获取字典项信息 */
+export const getDictItems = code => http.get(`/ddics/code_${code}/items`);
+
+/** 批量获取字典项信息 */
+export const getDictList = params => http.get(`/ddics/code_list/items`, params);

+ 25 - 0
src/config/apis/flow.js

@@ -0,0 +1,25 @@
+/*
+ * @Author: PoJun
+ * @Date: 2023-09-13 17:12:51
+ * @LastEditors: PoJun
+ * @LastEditTime: 2024-01-03 16:57:01
+ * @Message: 待办相关
+ */
+const { http } = uni.$uv;
+/** 获取待办事务列表 */
+export const getWaitdoList = (params, config = {}) => http.get("/affairs/waitdo_list", params, config);
+
+/** 获取已办事务列表 */
+export const getDoneList = (params, config = {}) => http.get(`/affairs/done_list`, params, config);
+
+// 获取某事务信息
+export const getAffairInfo = (affairId, config) => http.get(`/affairs/${affairId}/info`, config);
+
+// 获取某事务信息(看自己的处理结果)
+export const getAffairSelfInfo = (affairId, config) => http.get(`/affairs/${affairId}/self_info`, config);
+
+/** 拒绝某事务 */
+export const refuseAffairs = affairId => http.post(`/affairs/${affairId}/refuse`);
+
+/** 同意某事务 */
+export const agreeAffairs = (affairId, params) => http.post(`/affairs/${affairId}/agree`, params);

+ 16 - 0
src/config/apis/message.js

@@ -0,0 +1,16 @@
+/*
+ * @Author: PoJun
+ * @Date: 2023-09-13 17:12:51
+ * @LastEditors: PoJun
+ * @LastEditTime: 2023-12-27 15:48:41
+ * @Message: 消息相关
+ */
+const { http } = uni.$uv;
+/** 全部清除已读 */
+export const postReadAll = data => http.post(`/message/readAll`, data, { custom: { toast: true } });
+
+/** 清除某条消息已读 */
+export const postReadMessage = params => http.post(`/message/read`, params);
+
+/** 获取消息列表 */
+export const getMessages = params => http.get(`/message/page`, params);

+ 18 - 0
src/config/apis/supplier.js

@@ -0,0 +1,18 @@
+/*
+ * @Author: PoJun
+ * @Date: 2023-09-13 17:12:51
+ * @LastEditors: PoJun
+ * @LastEditTime: 2024-01-04 16:16:37
+ * @Message: 供应商相关
+ */
+const { http } = uni.$uv;
+/** 根据id获取供应商详情 */
+export const getSupplierInfo = id => http.get(`/srmSuppliers/${id}/info`);
+/** 获取我的供应商信息 */
+export const getMySupplierInfo = () => http.get(`/srmSuppliers/self`);
+/** 批量获取字典项信息 */
+export const getSuppliersList = (params, config = {}) => http.get(`/srmSuppliers/page`, params, config);
+
+export const appealMark = params => http.post(`/srmSuppliers/appeal`, params);
+/** 分页查询我的合作记录 */
+export const getSelfRecords = params => http.get(`/srmCooperates/self/page`, params);

+ 5 - 1
src/config/http.js

@@ -2,7 +2,11 @@
  * @Author: PoJun
  * @Date: 2023-09-13 17:12:51
  * @LastEditors: PoJun
- * @LastEditTime: 2023-12-14 15:58:10
+ * @LastEditTime: 2023-12-27 14:53:45
  * @Message: 集中导出
  */
 export * from "./apis/auth";
+export * from "./apis/dict";
+export * from "./apis/supplier";
+export * from "./apis/message";
+export * from "./apis/flow";

+ 1 - 7
src/config/request.js

@@ -2,7 +2,7 @@
  * @Author: PoJun
  * @Date: 2023-05-14 18:26:45
  * @LastEditors: PoJun
- * @LastEditTime: 2023-11-14 09:59:47
+ * @LastEditTime: 2024-01-04 16:25:30
  * @Message: Nothing
  */
 
@@ -47,7 +47,6 @@ module.exports = vm => {
         response => {
             /* 对响应成功做点什么 可使用async await 做异步操作*/
             const data = response.data;
-
             // 自定义参数
             const custom = response.config?.custom;
             if (data.code !== 200) {
@@ -64,11 +63,6 @@ module.exports = vm => {
                                 if (res.confirm) {
                                     uni.$uv.route({
                                         url: "/pages/login/index",
-                                        type: "reLaunch",
-                                        params: {
-                                            mustLogin: true,
-                                            noBack: true,
-                                        },
                                     });
                                 }
                             },

+ 17 - 7
src/kirin-ui/kirin-form/kirin-form.vue

@@ -2,11 +2,11 @@
  * @Author: PoJun
  * @Date: 2023-10-09 15:51:12
  * @LastEditors: PoJun
- * @LastEditTime: 2023-12-18 10:21:29
+ * @LastEditTime: 2024-01-05 15:30:22
  * @Message: 表单
 -->
 <template>
-    <uv-form :labelPosition="labelPosition" labelWidth="150" :labelStyle="{ 'font-size': '14px', color: '#676767' }">
+    <uv-form :labelPosition="labelPosition" :labelWidth="labelWidth" :labelStyle="labelStyle">
         <block v-for="(item, index) in dataList" :key="index">
             <!-- 输入框 -->
             <uv-form-item
@@ -268,6 +268,10 @@ export default {
             type: String,
             default: "left",
         },
+        labelWidth: {
+            type: String,
+            default: "150",
+        },
     },
     data() {
         return {
@@ -279,6 +283,7 @@ export default {
                 top: "1px",
             },
             suffixIconStyle: { "font-size": "12px", color: "#909399", top: "1px" },
+            labelStyle: { "font-size": "14px", color: "#676767" },
             // 时间类对象管理,后续增加
             dataTimeObj: {
                 value: Number(new Date()),
@@ -314,8 +319,8 @@ export default {
             for (let i = 0, len = this.dataList.length; i < len; i++) {
                 const item = this.dataList[i];
                 // 必填、可见  可编辑先不放出来
-                if (item.canShow && item.canEdit) {
-                    if (item.rv !== undefined && item.rv != null && item.rv != "") {
+                if (item.required && item.canEdit) {
+                    if ((item.rv !== undefined && item.rv != null && item.rv != "") || item.rv == "0") {
                         data[item.code] = item.rv;
                     } else {
                         uni.$uv.toast(item.label + "不能为空");
@@ -393,10 +398,15 @@ export default {
          * @description: 页面单选弹窗
          * @param {*} item       表单字段对象
          */
-        async openRadioPicker({ rv, code, dictCode }) {
+        async openRadioPicker({ rv, code, dictCode, options }) {
             this.radioObj.code = code;
-            // 使用vuex的缓存数据
-            const columns = this.vuex_dict[dictCode];
+            let columns = null;
+            // 使用vuex的缓存数据 或者自带的选项
+            if (options) {
+                columns = options;
+            } else {
+                columns = this.vuex_dict[dictCode];
+            }
             this.radioObj.columns = [columns];
             this.$refs.picker.open();
             const index = columns.findIndex(item => item.key == rv);

+ 20 - 8
src/manifest.json

@@ -2,8 +2,8 @@
     "name" : "盛泰SRM",
     "appid" : "__UNI__82C0680",
     "description" : "",
-    "versionName" : "1.0.3",
-    "versionCode" : 103,
+    "versionName" : "1.0.4",
+    "versionCode" : 104,
     "transformPx" : false,
     "app-plus" : {
         "compatible" : {
@@ -20,7 +20,9 @@
             "autoclose" : true,
             "delay" : 0
         },
-        "modules" : {},
+        "modules" : {
+            "Push" : {}
+        },
         /* 模块配置 */
         "distribute" : {
             /* 应用发布信息 */
@@ -49,14 +51,27 @@
                     "<uses-feature android:name=\"android.hardware.camera\"/>",
                     "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
                     "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
-                ]
+                ],
+                "autoSdkPermissions" : true
             },
             "ios" : {
                 "dSYMs" : false
             },
             /* ios打包配置 */
             "sdkConfigs" : {
-                "ad" : {}
+                "ad" : {},
+                "push" : {
+                    "unipush" : {
+                        "version" : "2",
+                        "offline" : true,
+                        "hms" : {},
+                        "icons" : {
+                            "small" : {
+                                "hdpi" : ""
+                            }
+                        }
+                    }
+                }
             },
             "splashscreen" : {
                 "androidStyle" : "common",
@@ -112,9 +127,6 @@
         "permission" : {
             "scope.userLocation" : {
                 "desc" : "为了您更好的体验,请确认获取您的位置"
-            },
-            "scope.camera" : {
-                "desc" : "用于二维码扫描"
             }
         },
         "requiredPrivateInfos" : [ "getLocation", "chooseLocation" ]

+ 29 - 69
src/pages.json

@@ -5,17 +5,11 @@
     "pages": [
         {
             "path": "pages/index/index",
-            "style": {
-                "navigationStyle": "custom",
-                "bounce": false
-            }
+            "style": { "bounce": false, "navigationStyle": "custom" }
         },
         {
             "path": "pages/login/index",
-            "style": {
-                "navigationStyle": "custom",
-                "bounce": false
-            }
+            "style": { "bounce": false, "navigationStyle": "custom" }
         },
         {
             "path": "pages/message/index",
@@ -42,19 +36,7 @@
         },
         {
             "path": "pages/mine/index",
-            "style": {
-                "bounce": false,
-                "enablePullDownRefresh": true,
-                "navigationStyle": "custom"
-            }
-        },
-        {
-            "path": "pages/setting/index",
-            "style": {
-                "navigationBarTitleText": "设置",
-                "navigationBarBackgroundColor": "#f8f8f8",
-                "bounce": false
-            }
+            "style": { "bounce": false, "enablePullDownRefresh": true, "navigationStyle": "custom" }
         }
     ],
     "subPackages": [
@@ -63,37 +45,30 @@
             "pages": [
                 {
                     "path": "update-psd",
-                    "style": {
-                        "navigationBarTitleText": "修改密码",
-                        "bounce": false
-                    }
+                    "style": { "bounce": false, "navigationBarTitleText": "修改密码" }
                 },
                 {
                     "path": "my-info",
-                    "style": {
-                        "navigationBarTitleText": "个人信息",
-                        "bounce": false
-                    }
+                    "style": { "bounce": false, "navigationBarTitleText": "个人信息" }
                 },
                 {
                     "path": "authentication",
-                    "style": {
-                        "navigationBarTitleText": "单位认证",
-                        "bounce": false
-                    }
+                    "style": { "bounce": false, "navigationBarTitleText": "角色认证" }
                 },
                 {
                     "path": "cancel-account",
-                    "style": {
-                        "navigationBarTitleText": "账号注销",
-                        "bounce": false
-                    }
+                    "style": { "bounce": false, "navigationBarTitleText": "账号注销" }
                 },
                 {
                     "path": "register",
+                    "style": { "bounce": false, "navigationBarTitleText": "账号注册" }
+                },
+                {
+                    "path": "version",
                     "style": {
-                        "navigationBarTitleText": "账号注册",
-                        "bounce": false
+                        "bounce": false,
+                        "navigationBarTitleText": "版本查看",
+                        "navigationBarBackgroundColor": "#f8f8f8"
                     }
                 }
             ]
@@ -103,10 +78,7 @@
             "pages": [
                 {
                     "path": "index",
-                    "style": {
-                        "navigationBarTitleText": "协议",
-                        "bounce": false
-                    }
+                    "style": { "bounce": false, "navigationBarTitleText": "协议" }
                 }
             ]
         },
@@ -115,40 +87,23 @@
             "pages": [
                 {
                     "path": "products",
-                    "style": {
-                        "navigationBarTitleText": "产品目录",
-                        "bounce": false
-                    }
+                    "style": { "bounce": false, "navigationBarTitleText": "产品目录" }
                 },
                 {
                     "path": "records",
-                    "style": {
-                        "navigationBarTitleText": "合作记录",
-                        "enablePullDownRefresh": true,
-                        "bounce": false
-                    }
+                    "style": { "bounce": false, "navigationBarTitleText": "合作记录", "enablePullDownRefresh": true }
                 },
                 {
                     "path": "representations",
-                    "style": {
-                        "navigationBarTitleText": "评分申述",
-                        "bounce": false
-                    }
+                    "style": { "bounce": false, "navigationBarTitleText": "评分申述" }
                 },
                 {
                     "path": "supplier",
-                    "style": {
-                        "navigationBarTitleText": "供应商",
-                        "enablePullDownRefresh": true,
-                        "bounce": false
-                    }
+                    "style": { "bounce": false, "navigationBarTitleText": "供应商", "enablePullDownRefresh": true }
                 },
                 {
                     "path": "supplier-detail",
-                    "style": {
-                        "navigationStyle": "custom",
-                        "bounce": false
-                    }
+                    "style": { "bounce": false, "navigationStyle": "custom" }
                 }
             ]
         },
@@ -158,9 +113,16 @@
                 {
                     "path": "index",
                     "style": {
+                        "bounce": false,
                         "navigationBarTitleText": "待办中心",
-                        "enablePullDownRefresh": true,
-                        "bounce": false
+                        "enablePullDownRefresh": true
+                    }
+                },
+                {
+                    "path": "detail",
+                    "style": {
+                        "bounce": false,
+                        "navigationBarTitleText": "详情"
                     }
                 }
             ]
@@ -173,9 +135,7 @@
         "backgroundColor": "#F8F8F8"
     },
     "tabBar": {
-        "iconWidth": "20px",
         "borderStyle": "white",
-        "spacing": "6px",
         "backgroundColor": "#ffffff",
         "color": "#bfbfbf",
         "selectedColor": "#4076F4",

+ 4 - 2
src/pages/index/components/home-chart.vue

@@ -2,7 +2,7 @@
  * @Author: PoJun
  * @Date: 2023-12-19 14:57:48
  * @LastEditors: PoJun
- * @LastEditTime: 2023-12-21 17:13:43
+ * @LastEditTime: 2024-01-04 17:34:18
  * @Message: 柱形图
 -->
 <template>
@@ -68,7 +68,9 @@ export default {
         },
     },
     mounted() {
-        this.getServerData();
+        this.$nextTick(() => {
+            this.getServerData();
+        });
     },
 };
 </script>

+ 9 - 6
src/pages/index/components/products-list.vue

@@ -2,19 +2,22 @@
  * @Author: PoJun
  * @Date: 2023-12-19 14:57:48
  * @LastEditors: PoJun
- * @LastEditTime: 2023-12-21 14:25:22
+ * @LastEditTime: 2023-12-26 11:17:27
  * @Message: 产品列表, 只展示5个
 -->
 <template>
     <uv-cell-group :border="false" :customStyle="{ padding: '5px 0' }">
-        <uv-cell :border="false" :isLink="true" url="/subpkg/home/products">
+        <uv-cell :border="false" :arrow="false" value="查看更多" :isLink="true" url="/subpkg/home/products">
             <uv-text slot="title" text="产品目录" :customStyle="{ 'font-weight': 'bold' }"></uv-text>
-            <uv-text slot="right-icon" text="查看更多" size="12"></uv-text>
         </uv-cell>
 
-        <uv-cell v-for="(item, index) in productsList" :key="index" :border="false" :label="item.code">
-            <uv-text slot="right-icon" :text="item.name" size="13"></uv-text>
-        </uv-cell>
+        <uv-cell
+            v-for="(item, index) in productsList"
+            :key="index"
+            :border="false"
+            :label="item.code"
+            :value="item.name"
+        ></uv-cell>
     </uv-cell-group>
 </template>
 

+ 24 - 13
src/pages/index/components/records-list.vue

@@ -2,34 +2,45 @@
  * @Author: PoJun
  * @Date: 2023-12-19 14:57:48
  * @LastEditors: PoJun
- * @LastEditTime: 2023-12-21 16:59:34
+ * @LastEditTime: 2024-01-04 16:09:14
  * @Message: 合作记录
 -->
 <template>
     <uv-cell-group :border="false" :customStyle="{ padding: '5px 0' }">
-        <uv-cell :border="false" :isLink="true" url="/subpkg/home/records">
+        <uv-cell :border="false" :isLink="true" value="查看更多" url="/subpkg/home/records">
             <uv-text slot="title" text="近期合作记录" :customStyle="{ 'font-weight': 'bold' }"></uv-text>
-            <uv-text slot="right-icon" text="查看更多" size="12"></uv-text>
         </uv-cell>
 
-        <uv-cell v-for="(item, index) in recordsList" :key="index" :border="false" :value="item.name">
-            <uv-text slot="label" :text="item.time" size="13" :customStyle="{ 'white-space': 'nowrap' }"></uv-text>
-        </uv-cell>
+        <template v-if="recordsList.length">
+            <uv-cell v-for="(item, index) in recordsList" :key="index" :border="false" :value="item.content">
+                <uv-text slot="label" :text="item.time" size="13" :customStyle="{ 'white-space': 'nowrap' }"></uv-text>
+            </uv-cell>
+        </template>
+
+        <view v-else class="uv-m-b-50">
+            <uv-empty marginTop="30" mode="data" text="暂无数据"></uv-empty>
+        </view>
     </uv-cell-group>
 </template>
 
 <script>
+import { getSelfRecords } from "@/config/http.js";
 export default {
     data() {
         return {
-            recordsList: [
-                { name: "诚唐科技有限公司购入电脑5台", time: "2023-12-19", id: "1111" },
-                { name: "新希望集团采购1000吨钢材", time: "2023-12-12", id: "2222" },
-                { name: "新希望集团签订D6园区办公室", time: "2023-11-11", id: "3333" },
-                { name: "诚唐科技有限公司拟采购化工原材料", time: "2023-11-08", id: "4444" },
-                { name: "诚唐科技有限公司A5区办公司装修", time: "2023-08-08", id: "5555" },
-            ],
+            recordsList: [],
+        };
+    },
+    async created() {
+        const params = {
+            params: {
+                pageSize: 5,
+                pageNum: 1,
+                query: {},
+            },
         };
+        const data = await getSelfRecords(params);
+        this.recordsList = data.list;
     },
 };
 </script>

+ 46 - 34
src/pages/index/components/supplier-list.vue

@@ -2,65 +2,77 @@
  * @Author: PoJun
  * @Date: 2023-12-19 14:57:48
  * @LastEditors: PoJun
- * @LastEditTime: 2023-12-21 16:52:11
+ * @LastEditTime: 2024-01-04 16:25:00
  * @Message: 排名, 只展示5个
 -->
 <template>
     <uv-cell-group :border="false" :customStyle="{ padding: '5px 0' }">
-        <uv-cell :border="false" :isLink="true" url="/subpkg/home/supplier">
+        <uv-cell :border="false" :arrow="false" value="查看更多" :isLink="true" url="/subpkg/home/supplier">
             <uv-text slot="title" text="优质供应商" :customStyle="{ 'font-weight': 'bold' }"></uv-text>
-            <uv-text slot="right-icon" text="查看更多" size="12"></uv-text>
         </uv-cell>
 
-        <uv-cell
-            v-for="(item, index) in supplierList"
-            :key="index"
-            :title="item.name"
-            :isLink="true"
-            arrow-direction="right"
-            :border="false"
-            @click="checkSupplier(item)"
-        >
-            <uv-badge
-                slot="value"
-                :type="index == 0 ? 'error' : index == 1 ? 'warning' : index == 2 ? 'success' : 'info'"
-                max="100"
-                :value="item.score"
-            ></uv-badge>
-            <uv-text
-                slot="icon"
-                :type="index == 0 ? 'error' : index == 1 ? 'warning' : index == 2 ? 'success' : 'info'"
-                :text="index + 1"
-                :customStyle="{ 'font-weight': 'bold' }"
-            ></uv-text>
-        </uv-cell>
+        <template v-if="supplierList.length">
+            <uv-cell
+                v-for="(item, index) in supplierList"
+                :key="index"
+                :title="item.name"
+                :isLink="true"
+                arrow-direction="right"
+                :border="false"
+                @click="checkSupplier(item)"
+            >
+                <uv-badge
+                    slot="value"
+                    :type="index == 0 ? 'error' : index == 1 ? 'warning' : index == 2 ? 'success' : 'info'"
+                    max="100"
+                    :value="item.mark"
+                ></uv-badge>
+                <uv-text
+                    slot="icon"
+                    :type="index == 0 ? 'error' : index == 1 ? 'warning' : index == 2 ? 'success' : 'info'"
+                    :text="index + 1"
+                    :customStyle="{ 'font-weight': 'bold' }"
+                ></uv-text>
+            </uv-cell>
+        </template>
+
+        <view v-else class="uv-m-b-50">
+            <uv-empty marginTop="30" mode="data" text="暂无供应商数据"></uv-empty>
+        </view>
     </uv-cell-group>
 </template>
 
 <script>
+import { getSuppliersList } from "@/config/http.js";
 export default {
     data() {
         return {
-            supplierList: [
-                { name: "诚唐科技有限公司", score: "99", id: "1111" },
-                { name: "四川海底捞餐饮股份有限公司", score: "99", id: "2222" },
-                { name: "四川智天金融服务外包有限公司", score: "98", id: "3333" },
-                { name: "成都建工集团有限公司", score: "96", id: "4444" },
-                { name: "极米科技股份有限公司", score: "93", id: "5555" },
-            ],
+            supplierList: [],
         };
     },
     methods: {
         checkSupplier(item) {
             uni.$uv.route({
                 url: "/subpkg/home/supplier-detail",
+                params: { id: item.id },
+            });
+        },
+        getList() {
+            getSuppliersList({
                 params: {
-                    name: item.name,
-                    id: item.id,
+                    pageSize: 5,
+                    pageNum: 1,
+                    query: {},
                 },
+                custom: { toast: false },
+            }).then(res => {
+                this.supplierList = res.list;
             });
         },
     },
+    created() {
+        this.getList();
+    },
 };
 </script>
 

+ 60 - 58
src/pages/index/index.vue

@@ -2,41 +2,21 @@
  * @Author: PoJun
  * @Date: 2023-05-15 19:59:55
  * @LastEditors: PoJun
- * @LastEditTime: 2023-12-21 18:14:25
+ * @LastEditTime: 2024-01-09 16:19:14
  * @Message: Nothing
 -->
 <template>
     <view class="index">
-        <view class="index-banner">
-            <uv-image :src="BannerImg" height="300px" width="100%">
-                <template v-slot:loading>
-                    <uv-loading-icon></uv-loading-icon>
-                </template>
-            </uv-image>
-        </view>
-
-        <view class="content" v-if="!vuex_userInfo">
-            <view class="content-container no-auth">
-                <uv-empty mode="permission" text="还未登录"></uv-empty>
+        <view v-if="vuex_userInfo && vuex_userInfo.attr.BusinessRole">
+            <view class="index-banner">
+                <uv-image :src="BannerImg" height="300px" width="100%">
+                    <template v-slot:loading>
+                        <uv-loading-icon></uv-loading-icon>
+                    </template>
+                </uv-image>
             </view>
-            <view class="content-container">
-                <uv-button
-                    type="info"
-                    text="登录"
-                    @click="toLogin"
-                    :hairline="false"
-                    plain
-                    throttleTime="100"
-                    :customStyle="{ border: 0 }"
-                ></uv-button>
-            </view>
-        </view>
-
-        <view v-else>
             <!-- 管理员角色 -->
-            <view class="content" v-if="role == 'management'">
-                <!-- 待办入口 -->
-                <cols-container :list="managementTabs" :col="2" @click="tabClick"></cols-container>
+            <view class="content" v-if="vuex_userInfo.attr.BusinessRole == 'orgMember'">
                 <!-- 排名 -->
                 <view class="content-container">
                     <supplier-list></supplier-list>
@@ -47,9 +27,7 @@
                 </view>
             </view>
             <!-- 供应商角色 -->
-            <view class="content" v-else>
-                <!-- 得分、申述 -->
-                <cols-container :list="supplierTabs" :col="2" @click="tabClick"></cols-container>
+            <view class="content" v-else-if="vuex_userInfo.attr.BusinessRole == 'supplier'">
                 <!-- 合作记录 -->
                 <view class="content-container">
                     <records-list></records-list>
@@ -59,59 +37,86 @@
                     <products-list></products-list>
                 </view>
             </view>
-            <view class="uv-m-25">
-                <button type="primary" @click="role = role == 'management' ? '123' : 'management'">
-                    点击切换测试身份
-                </button>
-            </view>
         </view>
+        <!-- 未登录和未认证角色 -->
+        <no-auth v-else :title="!vuex_userInfo ? '没有检测到您的登录状态' : '角色认证尚未完成'">
+            <uv-button
+                v-if="!vuex_userInfo || vuex_userInfo.attr.auditState != 1"
+                :text="!vuex_userInfo ? '去登录' : '去认证'"
+                @click="toLogin"
+                size="small"
+                :hairline="false"
+                plain
+                throttleTime="100"
+                shape="circle"
+            ></uv-button>
+        </no-auth>
+
+        <uv-textarea
+            :value="iinfo"
+            :autoHeight="true"
+            :textStyle="{ fontSize: '14px', textAlign: 'right' }"
+        ></uv-textarea>
     </view>
 </template>
 
 <script>
-import colsContainer from "@/components/cols-container/index";
 import supplierList from "./components/supplier-list.vue";
 import homeChart from "./components/home-chart.vue";
 import recordsList from "./components/records-list.vue";
 import productsList from "./components/products-list.vue";
+import NoAuth from "@/components/no-auth/index.vue";
+
 import BannerImg from "@/static/banner.png";
 
 export default {
     components: {
-        colsContainer,
         supplierList,
         homeChart,
         recordsList,
         productsList,
+        NoAuth,
     },
     data() {
         return {
             BannerImg,
-            managementTabs: [
-                { title: "待处理", icon: "todo", color: "#f9ae3d", route: "/subpkg/flow/index?index=0" },
-                { title: "已处理", icon: "done", color: "#4076F4", route: "/subpkg/flow/index?index=1" },
-            ],
-            supplierTabs: [
-                { title: "评分:92", icon: "todo", color: "#f9ae3d" },
-                { title: "评分申述", icon: "done", color: "#4076F4", route: "/subpkg/home/representations" },
-            ],
-            role: "management",
-            // role: "123",
+            iinfo: null,
         };
     },
     methods: {
-        tabClick({ route }) {
-            if (route) {
-                uni.$uv.route(route);
-            }
-        },
         toLogin() {
-            uni.$uv.route("/pages/login/index");
+            if (!this.vuex_userInfo) {
+                uni.$uv.route("/pages/login/index");
+            } else {
+                uni.$uv.route("/subpkg/setting/authentication");
+            }
+
+            // 主动创建通知栏在线消息
+            // uni.createPushMessage({
+            //     title: "消息通知",
+            //     content: "下午开个小会",
+            //     success: () => {
+            //         console.log("success");
+            //     },
+            //     fail: () => {
+            //         console.log("fail");
+            //     },
+            // });
         },
     },
     computed: {},
     onLoad() {},
     onShow() {},
+    onReady() {
+        setTimeout(() => {
+            plus.push.getClientInfoAsync(info => {
+                console.log(info);
+                console.log(info);
+                console.log(info);
+                this.iinfo = JSON.stringify(info);
+            });
+        }, 2000);
+    },
 };
 </script>
 
@@ -136,8 +141,5 @@ page {
             overflow: hidden;
         }
     }
-    .no-auth {
-        padding: 150rpx 0;
-    }
 }
 </style>

+ 12 - 4
src/pages/login/index.vue

@@ -2,11 +2,11 @@
  * @Author: PoJun
  * @Date: 2023-09-28 10:38:11
  * @LastEditors: PoJun
- * @LastEditTime: 2023-12-21 18:03:06
+ * @LastEditTime: 2024-01-08 10:20:32
  * @Message: 登录页面
 -->
 <template>
-    <view class="login uv-flex-col">
+    <view class="login uv-flex-col" :style="[getbgIamge]">
         <uv-navbar :border="false" :autoBack="true" bgColor="transparent" :placeholder="true"></uv-navbar>
 
         <view class="login-content">
@@ -48,7 +48,8 @@
                         :disabled="checkboxValue.length == 0 || !auth.password || !auth.name"
                         @click="authLogin"
                         type="primary"
-                        text="登录"
+                        text="账号登录"
+                        shape="circle"
                     ></uv-button>
                 </view>
             </view>
@@ -68,6 +69,8 @@
 
 <script>
 import { wechatLogin } from "@/config/http.js";
+import LoginGg from "@/static/login_bg.png";
+
 export default {
     data() {
         return {
@@ -76,6 +79,7 @@ export default {
                 password: "",
             },
             checkboxValue: [],
+            LoginGg,
         };
     },
     onLoad() {},
@@ -104,6 +108,11 @@ export default {
             }
         },
     },
+    computed: {
+        getbgIamge() {
+            return { "background-image": `url(${LoginGg})` };
+        },
+    },
 };
 </script>
 
@@ -114,7 +123,6 @@ export default {
     height: 100vh;
     /* #endif */
     width: 100%;
-    background-image: url("../../static/login_bg.png");
     background-repeat: no-repeat;
     background-size: cover;
     background-position: center;

+ 41 - 40
src/pages/message/index.vue

@@ -2,7 +2,7 @@
  * @Author: PoJun
  * @Date: 2023-09-28 10:38:11
  * @LastEditors: PoJun
- * @LastEditTime: 2023-12-21 17:25:21
+ * @LastEditTime: 2023-12-28 17:49:14
  * @Message: 消息, 认证、系统消息
 -->
 <template>
@@ -18,13 +18,15 @@
             >
                 <view class="uv-flex uv-row-between">
                     <view class="uv-font-30 uv-flex">
-                        <view class="uv-m-r-10"><uv-badge :isDot="true" type="error"></uv-badge></view>
-                        <view>{{ item.target }}</view>
+                        <view v-if="item.read == 0" class="uv-m-r-10">
+                            <uv-badge :isDot="true" type="error"></uv-badge>
+                        </view>
+                        <view>{{ item.type }}</view>
                     </view>
-                    <view class="uv-font-24 uv-info">{{ item.time }}</view>
+                    <view class="uv-font-24 uv-info">{{ item.gmtCreate }}</view>
                 </view>
                 <view class="uv-font-32 uv-weight-700 uv-m-t-20">{{ item.title }}</view>
-                <view class="uv-font-28 uv-info uv-m-t-20">{{ item.des }}</view>
+                <view class="uv-font-28 uv-info uv-m-t-20">{{ item.content }}</view>
             </view>
         </view>
         <!-- 加载更多 -->
@@ -35,6 +37,7 @@
 </template>
 
 <script>
+import { getMessages, postReadAll, postReadMessage } from "@/config/http.js";
 export default {
     data() {
         return {
@@ -58,54 +61,52 @@ export default {
             this.getDataList();
         },
         itemClick(item) {
-            uni.$uv.toast(item.title);
+            if (item.read == 0) {
+                this.setReadState(item.id);
+            }
         },
         async getDataList() {
             if (!this.vuex_userInfo) {
                 return;
             }
-
             if (this.page.pageNum == 1) {
                 this.dataList = [];
             }
-
             this.status = "loading";
-            const data = await this.creatMockList();
-            // console.log(data);
-
-            if (this.dataList.length == 30) {
-                this.status = "nomore";
+            const data = {
+                params: {
+                    pageSize: this.page.pageSize,
+                    pageNum: this.page.pageNum,
+                    query: { search: this.searchKey },
+                },
+            };
+            try {
+                const res = await getMessages(data);
+                if (this.dataList.length == res.total) {
+                    this.status = "nomore";
+                }
+                this.dataList = this.dataList.concat(res.list);
+            } finally {
+                uni.stopPullDownRefresh();
             }
-            this.dataList = this.dataList.concat(data);
-            uni.stopPullDownRefresh();
         },
-        // 模拟数据,一次十条,大于30条就不返回了
-        creatMockList() {
-            return new Promise(resolve => {
-                let list = [];
-                for (let i = 0; i < 10; i++) {
-                    list.push({
-                        target: "消息类型",
-                        time: "2023-12-15 17:57:21",
-                        title: "消息标题_" + i,
-                        des: "对于当前消息的简述文字",
-                    });
-                }
-                setTimeout(() => {
-                    if (this.dataList.length >= 30) {
-                        resolve([]);
-                    } else {
-                        resolve(list);
-                    }
-                }, 300);
-            });
+        setReadState(id) {
+            if (id) {
+                const item = this.dataList.find(v => v.id == id);
+                this.$set(item, "read", 1);
+                postReadMessage([id]);
+            } else {
+                this.dataList.forEach(v => {
+                    this.$set(v, "read", 1);
+                });
+                postReadAll();
+            }
         },
     },
-    onNavigationBarButtonTap() {
-        uni.showToast({
-            title: "你点了清除已读",
-            icon: "none",
-        });
+    async onNavigationBarButtonTap() {
+        uni.showLoading({ mask: true });
+        this.setReadState();
+        uni.hideLoading();
     },
     onPullDownRefresh() {
         if (!this.vuex_userInfo) {

+ 191 - 34
src/pages/mine/index.vue

@@ -2,36 +2,39 @@
  * @Author: PoJun
  * @Date: 2023-09-28 10:38:11
  * @LastEditors: PoJun
- * @LastEditTime: 2023-12-21 18:04:37
+ * @LastEditTime: 2024-01-04 17:40:09
  * @Message: 个人中心
 -->
 <template>
     <view class="mine">
-        <uv-navbar :border="false" :bgColor="getNavStyle" :placeholder="true" leftIcon="">
-            <uv-icon slot="right" name="setting" size="24" color="#151823" @click="toSetting"></uv-icon>
-
+        <uv-navbar :border="false" :bgColor="getNavStyle" :placeholder="true">
+            <view slot="left"></view>
             <view slot="center" class="mine-bar" :style="[getTitleStyle]">
                 <uv-avatar :src="getImageUrl" class="uv-avatar" size="34"></uv-avatar>
                 <view v-if="vuex_userInfo" class="mine-bar-name">
-                    {{ vuex_userInfo.name ? vuex_userInfo.name : "用户名未设置" }}
+                    {{ vuex_userInfo.otherName ? vuex_userInfo.otherName : "昵称未设置" }}
                 </view>
                 <view v-else class="mine-bar-name">未登录</view>
             </view>
         </uv-navbar>
+
         <view class="mine-head">
-            <view class="mine-head-inner" :style="[getInfoStyle]">
+            <view class="mine-head-inner">
                 <view class="mine-head-avatar">
                     <uv-avatar :src="getImageUrl" size="76"></uv-avatar>
                 </view>
                 <view v-if="vuex_userInfo" class="mine-head-name">
-                    {{ vuex_userInfo.name ? vuex_userInfo.name : "用户名未设置" }}
+                    {{ vuex_userInfo.otherName ? vuex_userInfo.otherName : "昵称未设置" }}
                 </view>
                 <view v-else class="mine-head-name">未登录</view>
             </view>
         </view>
-
         <view class="mine-cont">
-            <view class="mine-cont-login">
+            <template v-if="vuex_userInfo">
+                <cols-container :list="managementTabs" :col="2" @click="tabClick"></cols-container>
+            </template>
+
+            <view class="mine-cont-circular">
                 <uv-button
                     v-if="!vuex_userInfo"
                     type="info"
@@ -43,49 +46,204 @@
                     :customStyle="{ border: 0 }"
                 ></uv-button>
             </view>
-            <view class="mine-cont-circular">占位符</view>
-            <view class="mine-cont-circular">占位符</view>
-            <view class="mine-cont-circular">占位符</view>
-            <view class="mine-cont-circular">占位符</view>
-            <view class="mine-cont-circular">占位符</view>
+
+            <view class="mine-cont-circular" v-if="vuex_userInfo" :key="'' + new Date()">
+                <uv-cell-group :border="false">
+                    <uv-cell
+                        title="个人设置"
+                        :isLink="true"
+                        arrow-direction="right"
+                        url="/subpkg/setting/my-info"
+                        :border="false"
+                        :cellStyle="{ padding: '15px' }"
+                    ></uv-cell>
+                    <uv-cell
+                        v-if="vuex_userInfo.attr.BusinessRole || [1, 2].includes(vuex_userInfo.attr.auditState)"
+                        title="角色认证"
+                        :border="false"
+                        :cellStyle="{ padding: '15px' }"
+                        :value="vuex_userInfo.attr.auditState == 1 ? '审核中' : '已认证'"
+                    ></uv-cell>
+                    <uv-cell
+                        v-else-if="[0, 3].includes(vuex_userInfo.attr.auditState)"
+                        title="角色认证"
+                        :isLink="true"
+                        arrow-direction="right"
+                        url="/subpkg/setting/authentication"
+                        :border="false"
+                        :cellStyle="{ padding: '15px' }"
+                    ></uv-cell>
+                    <uv-cell
+                        v-if="vuex_userInfo.attr.BusinessRole == 'supplier'"
+                        title="我的供应商信息"
+                        :isLink="true"
+                        arrow-direction="right"
+                        url="/subpkg/home/supplier-detail"
+                        :border="false"
+                        :cellStyle="{ padding: '15px' }"
+                    ></uv-cell>
+                </uv-cell-group>
+            </view>
+
+            <view class="mine-cont-circular">
+                <uv-cell-group :border="false">
+                    <uv-cell
+                        title="清除缓存"
+                        :isLink="true"
+                        arrow-direction="right"
+                        :border="false"
+                        :cellStyle="{ padding: '15px' }"
+                        @click="clearCache"
+                    ></uv-cell>
+                    <uv-cell
+                        title="版本查看"
+                        :isLink="true"
+                        arrow-direction="right"
+                        url="/subpkg/setting/version"
+                        :border="false"
+                        :cellStyle="{ padding: '15px' }"
+                    ></uv-cell>
+                </uv-cell-group>
+            </view>
+
+            <view class="mine-cont-circular">
+                <uv-cell-group :border="false">
+                    <uv-cell
+                        title="服务协议"
+                        :isLink="true"
+                        arrow-direction="right"
+                        url="/subpkg/agreement/index?type=service"
+                        :border="false"
+                        :cellStyle="{ padding: '15px' }"
+                    ></uv-cell>
+                    <uv-cell
+                        title="隐私协议"
+                        :isLink="true"
+                        arrow-direction="right"
+                        url="/subpkg/agreement/index?type=privacy"
+                        :border="false"
+                        :cellStyle="{ padding: '15px' }"
+                    ></uv-cell>
+                </uv-cell-group>
+            </view>
+
+            <view class="mine-cont-circular" v-if="vuex_userInfo">
+                <uv-cell-group :border="false">
+                    <uv-cell
+                        title="修改密码"
+                        :isLink="true"
+                        arrow-direction="right"
+                        url="/subpkg/setting/update-psd"
+                        :border="false"
+                        :cellStyle="{ padding: '15px' }"
+                    ></uv-cell>
+                    <uv-cell
+                        title="账号注销"
+                        :isLink="true"
+                        arrow-direction="right"
+                        url="/subpkg/setting/cancel-account"
+                        :border="false"
+                        :cellStyle="{ padding: '15px' }"
+                    ></uv-cell>
+                </uv-cell-group>
+            </view>
+
+            <view class="mine-cont-circular">
+                <uv-button
+                    v-if="vuex_userInfo"
+                    type="info"
+                    text="退出"
+                    @click="showActionSheet"
+                    :hairline="false"
+                    plain
+                    throttleTime="100"
+                    :customStyle="{ border: 0 }"
+                ></uv-button>
+            </view>
         </view>
     </view>
 </template>
 
 <script>
+import { logoutApp } from "@/utils/utils.js";
+import colsContainer from "@/components/cols-container/index";
 export default {
+    components: {
+        colsContainer,
+    },
     data() {
         return {
             scrollTop: 0,
+            managementTabs: [
+                { title: "待处理", icon: "todo", color: "#f9ae3d", route: "/subpkg/flow/index?index=0", mark: 0 },
+                { title: "已处理", icon: "done", color: "#4076F4", route: "/subpkg/flow/index?index=1" },
+            ],
         };
     },
     onLoad() {},
+    onShow() {
+        this.$store.dispatch("UPDATEAFFAIRINFO");
+    },
     methods: {
-        toSetting() {
-            uni.$uv.route("/pages/setting/index");
+        tabClick({ route }) {
+            if (route) {
+                uni.$uv.route(route);
+            }
         },
         toLogin() {
             uni.$uv.route("/pages/login/index");
         },
+        showActionSheet() {
+            uni.showActionSheet({
+                itemList: ["退出登录", "关闭应用"],
+                success: res => {
+                    if (res.tapIndex == 0) {
+                        logoutApp(this);
+                    } else if (res.tapIndex == 1) {
+                        // #ifdef APP-PLUS
+                        if (uni.$uv.os() === "ios") {
+                            // plus.runtime.launchApplication({ action: "QUIT" });
+                            plus.ios.import("UIApplication").sharedApplication().performSelector("exit");
+                        } else {
+                            plus.runtime.quit();
+                        }
+                        // #endif
+                    }
+                },
+                fail: res => {
+                    console.log(res.errMsg);
+                },
+            });
+        },
+        clearCache() {
+            uni.showModal({
+                title: "清除缓存",
+                content: "此操作不会影响当前用户登录状态",
+                success: res => {
+                    if (res.confirm) {
+                        uni.showLoading({ mask: true });
+                        uni.$uv.sleep(2000).then(() => {
+                            uni.hideLoading();
+                            uni.$uv.toast("缓存清理成功");
+                        });
+                    }
+                },
+            });
+        },
     },
     computed: {
         // 1. 滚动头部渐变出背景色
         // 2. 信息标签渐变透明
         getNavStyle() {
-            if (this.scrollTop >= 100) {
+            if (this.scrollTop >= 50) {
                 return "rgba(255,255,255,1)";
             } else {
                 return `rgba(255,255,255,${this.scrollTop / 100})`;
             }
         },
-        getInfoStyle() {
-            let style = {};
-            style.opacity = this.scrollTop >= 100 ? 0 : 1 - this.scrollTop / 100;
-            return style;
-        },
         getTitleStyle() {
             let style = {};
-            if (this.scrollTop >= 100) {
+            if (this.scrollTop >= 50) {
                 style.opacity = 1;
                 style.transform = "translateY(0)";
             } else {
@@ -99,7 +257,7 @@ export default {
             if (this.vuex_userInfo?.imageLogo) {
                 return process.env.VUE_APP_BASE_API + `/files/${this.vuex_userInfo?.imageLogo}/show_image`;
             } else {
-                return "";
+                return "img";
             }
         },
     },
@@ -116,6 +274,14 @@ export default {
             uni.stopPullDownRefresh();
         }
     },
+    watch: {
+        vuex_affairNum: {
+            immediate: true,
+            handler: function (val) {
+                this.managementTabs[0].mark = val;
+            },
+        },
+    },
 };
 </script>
 
@@ -169,17 +335,8 @@ page {
     }
 
     &-cont {
-        margin: 25rpx;
+        margin: 25rpx 25rpx 0;
         &-circular {
-            height: 150px;
-            border-radius: 14rpx;
-            background-color: $uni-bg-color;
-            margin-bottom: 20rpx;
-            display: flex;
-            justify-content: center;
-            align-items: center;
-        }
-        &-login {
             background-color: #fff;
             border-radius: 14rpx;
             overflow: hidden;

+ 0 - 187
src/pages/setting/index.vue

@@ -1,187 +0,0 @@
-<!--
- * @Author: PoJun
- * @Date: 2023-09-28 10:38:11
- * @LastEditors: PoJun
- * @LastEditTime: 2023-12-18 15:36:55
- * @Message: 设置界面
--->
-<template>
-    <view class="setting">
-        <view class="setting-container" v-if="vuex_userInfo">
-            <uv-cell-group :border="false">
-                <uv-cell
-                    title="个人设置"
-                    :isLink="true"
-                    arrow-direction="right"
-                    url="/subpkg/setting/my-info"
-                    :border="false"
-                    :cellStyle="{ padding: '15px' }"
-                ></uv-cell>
-                <uv-cell
-                    title="单位认证"
-                    :isLink="true"
-                    arrow-direction="right"
-                    url="/subpkg/setting/authentication"
-                    :border="false"
-                    :cellStyle="{ padding: '15px' }"
-                ></uv-cell>
-            </uv-cell-group>
-        </view>
-
-        <view class="setting-container">
-            <uv-cell-group :border="false">
-                <uv-cell
-                    title="清除缓存"
-                    :isLink="true"
-                    arrow-direction="right"
-                    :border="false"
-                    :cellStyle="{ padding: '15px' }"
-                    @click="clearCache"
-                ></uv-cell>
-                <uv-cell
-                    title="版本更新"
-                    :isLink="true"
-                    arrow-direction="right"
-                    :border="false"
-                    :cellStyle="{ padding: '15px' }"
-                ></uv-cell>
-            </uv-cell-group>
-        </view>
-
-        <view class="setting-container">
-            <uv-cell-group :border="false">
-                <uv-cell
-                    title="服务协议"
-                    :isLink="true"
-                    arrow-direction="right"
-                    url="/subpkg/agreement/index?type=service"
-                    :border="false"
-                    :cellStyle="{ padding: '15px' }"
-                ></uv-cell>
-                <uv-cell
-                    title="隐私协议"
-                    :isLink="true"
-                    arrow-direction="right"
-                    url="/subpkg/agreement/index?type=privacy"
-                    :border="false"
-                    :cellStyle="{ padding: '15px' }"
-                ></uv-cell>
-            </uv-cell-group>
-        </view>
-
-        <view class="setting-container" v-if="vuex_userInfo">
-            <uv-cell-group :border="false">
-                <uv-cell
-                    title="修改密码"
-                    :isLink="true"
-                    arrow-direction="right"
-                    url="/subpkg/setting/update-psd"
-                    :border="false"
-                    :cellStyle="{ padding: '15px' }"
-                ></uv-cell>
-                <uv-cell
-                    title="账号注销"
-                    :isLink="true"
-                    arrow-direction="right"
-                    url="/subpkg/setting/cancel-account"
-                    :border="false"
-                    :cellStyle="{ padding: '15px' }"
-                ></uv-cell>
-            </uv-cell-group>
-        </view>
-
-        <view class="setting-container">
-            <uv-button
-                v-if="vuex_userInfo"
-                type="info"
-                text="退出"
-                @click="showActionSheet"
-                :hairline="false"
-                plain
-                throttleTime="100"
-                :customStyle="{ border: 0 }"
-            ></uv-button>
-
-            <uv-button
-                v-else
-                type="info"
-                text="登录"
-                @click="toLogin"
-                :hairline="false"
-                plain
-                throttleTime="100"
-                :customStyle="{ border: 0 }"
-            ></uv-button>
-        </view>
-    </view>
-</template>
-
-<script>
-import { logoutApp } from "@/utils/utils.js";
-export default {
-    data() {
-        return {
-            scrollTop: 0,
-            showOptions: false,
-        };
-    },
-    onLoad() {},
-    methods: {
-        toLogin() {
-            uni.$uv.route("/pages/login/index");
-        },
-        showActionSheet() {
-            uni.showActionSheet({
-                itemList: ["退出登录", "关闭应用"],
-                success: res => {
-                    if (res.tapIndex == 0) {
-                        logoutApp(this);
-                    } else if (res.tapIndex == 1) {
-                        // #ifdef APP-PLUS
-                        if (uni.$uv.os() === "ios") {
-                            // plus.runtime.launchApplication({ action: "QUIT" });
-                            plus.ios.import("UIApplication").sharedApplication().performSelector("exit");
-                        } else {
-                            plus.runtime.quit();
-                        }
-                        // #endif
-                    }
-                },
-                fail: res => {
-                    console.log(res.errMsg);
-                },
-            });
-        },
-        clearCache() {
-            uni.showModal({
-                title: "清除缓存",
-                content: "此操作不会影响当前用户登录状态",
-                success: res => {
-                    if (res.confirm) {
-                        uni.showLoading({ mask: true });
-                        uni.$uv.sleep(2500).then(() => {
-                            uni.hideLoading();
-                            uni.$uv.toast("缓存清理成功");
-                        });
-                    }
-                },
-            });
-        },
-    },
-};
-</script>
-
-<style lang="scss">
-page {
-    background-color: $uni-bg-color-grey;
-}
-.setting {
-    padding: 0 25rpx;
-    &-container {
-        background-color: #fff;
-        border-radius: 14rpx;
-        margin-top: 24rpx;
-        overflow: hidden;
-    }
-}
-</style>

+ 90 - 0
src/static/htmls/privacy.html

@@ -0,0 +1,90 @@
+<!--
+ * @Author: PoJun
+ * @Date: 2024-01-08 16:26:08
+ * @LastEditors: PoJun
+ * @LastEditTime: 2024-01-08 16:37:33
+ * @Message: Nothing
+-->
+<!DOCTYPE html>
+<html>
+    <head>
+        <meta charset="utf-8" />
+        <title>隐私政策</title>
+        <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" name="viewport" />
+        <style type="text/css">
+            * {
+                margin: 0;
+                padding: 0;
+            }
+            .agreement {
+                padding: 0 15px;
+                font-size: 14px;
+            }
+            .item {
+                margin-bottom: 10px;
+            }
+            .tip {
+                color: #676767;
+                font-size: 13px;
+            }
+        </style>
+    </head>
+    <body>
+        <div class="agreement">
+            <div>
+                <div class="item">
+                    我们十分重视你的隐私。本隐私声明阐述了盛泰科技有限公司(以下简称“盛泰”)处理的个人数据以及盛泰处理个人数据的方式和目的。
+                </div>
+                <div class="item">
+                    盛泰提供企业安全质量管理相关软件及服务。本声明中所提到的盛泰产品包括所有web端、app端、小程序端业务内容。
+                </div>
+                <div class="item">请阅读本隐私声明详细信息。 此声明适用于盛泰与你之间的互动。</div>
+                <div class="item">
+                    出于下述各种目的,包括为用户提供最佳产品体验、用户在业务你准确分配数据权限、用户作为项目人员进行认证,盛泰会收集你向我们提供的数据。
+                </div>
+                <div class="item">
+                    我们还从第三方获取数据。我们保护根据本声明中描述的惯例以及数据源所施加的任何其他限制从第三方获取的数据。这些第三方源随着时间的推移而变化。
+                </div>
+                <div class="item">
+                    对于你使用的技术和共享的数据,你可以做出不同的选择。 当我们请求你提供个人数据时,你可以拒绝。
+                </div>
+                <div class="item">我们的产品都需要你提供某些个人数据,以便运行并向你提供服务。</div>
+                <div class="item">如果你选择不提供某个产品或功能所需的数据,则无法运行和使用该产品或功能。</div>
+                <div class="item">
+                    同样,如果我们需要依法收集个人数据,或者需要与你签订合同或对你履行合同,但你没有提供数据,那么我们将无法签订合同;或者如果这涉及到你正在使用的现有产品,那么我们可能必须暂停或取消你的使用权。
+                </div>
+                <div class="item">如果属于上述情况,我们将通知你。</div>
+                <div class="item">
+                    在不强制要求提供数据的情况下,如果你选择不共享个人数据,那么你将无法使用需要提供此类数据的功能(如个性化功能)。
+                </div>
+                <div class="item">
+                    我们收集的数据取决于你与盛泰互动的环境、你所做的选择(包括你的隐私设置)、你所使用的产品和功能、你的位置以及适用法律。
+                </div>
+                <div class="item">我们收集的数据可能包括以下各项:</div>
+                <div class="item tip">
+                    1. 姓名和联系人数据. 你的姓氏和名字、电子邮件地址、通信地址、电话号码以及其他类似的联系人数据。
+                </div>
+                <div class="item tip">2. 密码、密码提示以及用于验证和帐户访问的类似安全信息。</div>
+                <div class="item tip">3. 特种工作证数据,包括工作证图片和证件认证信息。</div>
+                <div class="item tip">4. 浏览历史记录。有关你访问的业务模块和填写的业务数据。</div>
+                <div class="item tip">
+                    5. 搜索和命令. 使用具有搜索或相关待办、业务功能的盛泰产品时,搜索查询和命令。
+                </div>
+                <div class="item tip">
+                    6. 文本、墨迹书写和键入数据. 文本、墨迹书写和键入数据以及相关信息。
+                    例如,当你进行待办处理签字时将你的签字信息记录到业务内供管理人员进行甄别。
+                </div>
+                <div class="item tip">
+                    7. 图像. 图像和相关信息,如图片元数据。 例如,我们会收集你在使用必应图像支持服务时提供的图像。
+                </div>
+                <div class="item tip">
+                    8. 位置数据. 有关你的设备位置的数据(可能是精确数据,也可能是模糊数据)。
+                    例如,你在发起业务数据流程时需要填写具体地理位置以便于能够准确的完成业务定位和控制。
+                </div>
+                <div class="item tip">
+                    9. 反馈和评价. 你提供给我们的信息、你发送给我们的消息内容,例如反馈、调查数据和你写的产品评价。
+                </div>
+            </div>
+        </div>
+    </body>
+</html>

+ 237 - 0
src/static/htmls/service.html

@@ -0,0 +1,237 @@
+<!--
+ * @Author: PoJun
+ * @Date: 2024-01-08 16:26:08
+ * @LastEditors: PoJun
+ * @LastEditTime: 2024-01-08 16:42:35
+ * @Message: Nothing
+-->
+<!DOCTYPE html>
+<html>
+    <head>
+        <meta charset="utf-8" />
+        <title>用户服务协议</title>
+        <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" name="viewport" />
+        <style type="text/css">
+            * {
+                margin: 0;
+                padding: 0;
+            }
+            .agreement {
+                padding: 0 15px;
+                font-size: 14px;
+            }
+            .item {
+                margin-bottom: 10px;
+            }
+            .tip {
+                color: #676767;
+                font-size: 13px;
+            }
+        </style>
+    </head>
+    <body>
+        <div class="agreement">
+            <div>
+                <div class="item">
+                    为使用盛泰科技有限公司(以下简称“盛泰”)服务,您应当阅读并遵守《盛泰服务协议》(以下简称“本协议”)。
+                </div>
+                <div class="item">
+                    请您务必审慎阅读、充分理解各条款内容,特别是免除或者限制盛泰责任的条款、对用户权利进行限制的条款、约定争议解决方式和司法管辖的条款(如第十八条相关约定)等,以及开通或使用某项服务的单独协议或规则。限制、免责条款或者其他涉及您重大权益的条款可能以加粗、加下划线等形式提示您重点注意。
+                </div>
+                <div class="item">
+                    除非您已充分阅读、完全理解并接受本协议所有条款,否则您无权使用盛泰服务。您点击“同意”或“下一步”,或您使用盛泰服务,或者以其他任何明示或者默示方式表示接受本协议的,均视为您已阅读并同意签署本协议。本协议即在您与盛泰之间产生法律效力,成为对双方均具有约束力的法律文件。
+                </div>
+                <div class="item">
+                    如果您因年龄、智力等因素而不具有完全民事行为能力,请在法定监护人(以下简称"监护人")的陪同下阅读和判断是否同意本协议,并特别注意未成年人使用条款。
+                </div>
+                <div class="item">
+                    如果您是中国大陆地区以外的用户,您订立或履行本协议还需要同时遵守您所属和/或所处国家或地区的法律。
+                </div>
+                <div class="item">一、【协议的范围】</div>
+                <div class="item tip">
+                    1.1本协议是用户与盛泰之间关于其使用盛泰的产品及服务所订立的协议。“盛泰”是指盛泰和/或其相关服务可能存在的运营关联单位。“用户”是指盛泰的服务的使用人,在本协议中更多地称为“您”。
+                </div>
+                <div class="item tip">
+                    1.2盛泰的服务是指盛泰向用户提供的,包括web应用、app应用、小程序应用及服务,具体服务以盛泰实际提供的为准(以下简称“本服务”)。
+                </div>
+                <div class="item">二、【账号与密码安全】</div>
+                <div class="item tip">
+                    2.1您在使用本服务时可能需要注册一个账号。关于您使用账号的具体规则,请仔细阅读并遵守相关单独协议。
+                </div>
+                <div class="item tip">
+                    2.2盛泰特别提醒您应妥善保管您的账号和密码。当您使用完毕后,应安全退出。因您保管不善可能导致遭受被盗号或密码失窃,责任由您自行承担。
+                </div>
+                <div class="item tip">
+                    2.3为增强用户体验和/或技术便利,本服务的账号可能包括数字、字母或者其组合,以及手机号码、电子信箱等多种形式。在您注册某一形式的账号时,盛泰可能附赠该账号的另一表现形式。具体的账号形式、账号体系及账号之间的关联关系等,以盛泰实际提供的为准。
+                </div>
+                <div class="item tip">
+                    2.4您在使用本服务过程中,您应当保证这些信息的内容和形式符合法律法规(本协议中的“法律法规”指用户所属/所处地区、国家现行有效的法律、行政法规、司法解释、地方法规、地方规章、部门规章及其他规范性文件以及对于该等法律法规的不时修改和补充,以及相关政策规定等,下同。)、公序良俗、社会公德以及盛泰平台规则,且不会侵害任何主体的合法权益。
+                </div>
+                <div class="item">三、【使用本服务的方式】</div>
+                <div class="item tip">3.1本服务仅为您个人非商业性质的使用,除非您与盛泰另有约定。</div>
+                <div class="item tip">3.2您依本协议条款所取得的权利不可转让。</div>
+                <div class="item tip">
+                    3.3您不得使用任何方式(包括但不限于第三方软件、插件、外挂、系统、设备等)对本服务进行干扰、破坏、修改或施加其他影响。
+                </div>
+                <div class="item tip">
+                    3.4您应当通过盛泰提供或认可的方式使用本服务,不得通过任何第三方软件、插件、外挂、系统、设备等登录或使用本服务。
+                </div>
+                <div class="item tip">
+                    3.5任何人未经盛泰授权不得使用任何第三方软件、插件、外挂、系统等查看、获取本服务中所包含的盛泰、盛泰合作伙伴或用户的任何相关信息、数据等内容,同时,应当严格遵守盛泰发布的Robots协议等相关协议规则。
+                </div>
+                <div class="item">四、【按现状提供服务】</div>
+                <div class="item tip">
+                    4.1本服务是按照现有技术和条件所能达到的现状提供的。盛泰会尽最大努力保障服务的连贯性和安全性,但盛泰不能随时预见和防范法律、技术以及其他风险,盛泰对此类风险在法律允许的范围内免责,包括但不限于不可抗力、病毒、木马、黑客攻击、系统不稳定、第三方服务瑕疵、政府行为等原因可能导致的服务中断、数据丢失以及其他的损失和风险。
+                </div>
+                <div class="item tip">
+                    4.2因经营策略安排或调整等原因,不同地区的用户可使用的具体盛泰服务的内容可能会存在差异,具体以盛泰实际提供的为准。
+                </div>
+                <div class="item">五、【自备设备】</div>
+                <div class="item tip">
+                    5.1您应当理解,您使用本服务需自行准备与相关服务有关的终端设备(如电脑、移动终端和必要的网络接入设备等装置),并承担所需的费用(如电话费、上网费等费用)。
+                </div>
+                <div class="item tip">5.2您理解并同意,您使用本服务时会耗用您的终端设备和带宽等资源。</div>
+                <div class="item">六、【第三方提供的产品或服务】</div>
+                <div class="item tip">
+                    您在盛泰平台上使用第三方提供的产品或服务时,除遵守本协议约定外,还应遵守第三方的用户协议。盛泰和第三方对可能出现的纠纷在法律规定和约定的范围内各自承担责任。
+                </div>
+                <div class="item">七、【基于软件提供服务】</div>
+                <div class="item">若盛泰依托“软件”向您提供服务,您还应遵守以下约定:</div>
+                <div class="item tip">
+                    7.1您在使用本服务的过程中可能需要下载软件,对于这些软件,盛泰给予您一项个人的、不可转让及非排他性的许可。您仅可为使用本服务的目的而使用这些软件。
+                </div>
+                <div class="item tip">
+                    7.2为了改善用户体验、保障服务的安全性及产品功能的一致性等目的,盛泰可能会对软件进行更新。您应该将相关软件更新到最新版本,否则盛泰并不保证软件或服务能正常使用。
+                </div>
+                <div class="item tip">
+                    7.3盛泰可能为不同的终端设备开发不同的软件版本,您应当根据实际情况选择下载合适的版本进行安装。您可以直接从盛泰平台上获取软件,也可以从得到盛泰授权的第三方获取。如果您从未经盛泰授权的第三方获取软件或与软件名称相同的安装程序,盛泰无法保证该软件或服务能够正常使用,并对因此给您造成的损失不予负责。
+                </div>
+                <div class="item tip">7.4除非盛泰书面许可,您不得从事下列任一行为:</div>
+                <div class="item tip">(1)删除软件及其副本上关于著作权的信息。</div>
+                <div class="item tip">
+                    (2)对软件进行反向工程、反向汇编、反向编译,或者以其他方式尝试发现软件的源代码。
+                </div>
+                <div class="item tip">
+                    (3)对盛泰拥有知识产权的内容进行使用、出租、出借、复制、修改、链接、转载、汇编、发表、出版、建立镜像站点等。
+                </div>
+                <div class="item tip">
+                    (4)对软件或者软件运行过程中释放到任何终端内存中的数据、软件运行过程中客户端与服务器端的交互数据,以及软件运行所必需的系统数据,进行复制、修改、增加、删除、挂接运行或创作任何衍生作品,形式包括但不限于使用插件、外挂或非经盛泰授权的第三方工具/服务接入软件和相关系统。
+                </div>
+                <div class="item tip">
+                    (5)通过修改或伪造软件运行中的指令、数据等任何方式,增加、删减、变动软件的功能或运行效果,或者将用于上述用途的软件、方法进行运营或向公众传播,无论这些行为是否为商业目的。
+                </div>
+                <div class="item tip">
+                    (6)通过非盛泰开发、授权的第三方软件、插件、外挂、系统、设备等任何方式,登录或使用盛泰软件及服务,或制作、发布、传播非盛泰开发、授权的用于登录或使用盛泰软件及服务的第三方软件、插件、外挂、系统、设备等。
+                </div>
+                <div class="item">八、【知识产权声明】</div>
+                <div class="item tip">
+                    8.1盛泰在本服务中提供的内容(包括但不限于网页、文字、图片、音频、视频、图表、计算机软件等)的知识产权归盛泰所有,用户在使用本服务中所产生内容的知识产权归用户或相关权利人所有,除非您与盛泰另有约定。
+                </div>
+                <div class="item tip">
+                    8.2除另有特别声明外,盛泰提供本服务时所依托软件的著作权、专利权及其他知识产权均归盛泰所有。
+                </div>
+                <div class="item tip">
+                    8.3上述及其他任何本服务包含的内容的知识产权均受到法律法规保护,未经盛泰、用户或相关权利人书面许可,任何人不得以任何形式进行使用或创造相关衍生作品。
+                </div>
+                <div class="item tip">九、【用户违法违规行为】</div>
+                <div class="item tip">
+                    9.1您在使用本服务时须遵守法律法规,不得制作、复制、发布、传播含有下列内容的信息或从事相关行为,也不得为制作、复制、发布、传播含有下列内容的信息或从事相关行为提供便利:
+                </div>
+                <div class="item tip">(1)反对宪法所确定的基本原则的。</div>
+                <div class="item tip">(2)危害国家安全,泄露国家秘密,颠覆国家政权,破坏国家统一的。</div>
+                <div class="item tip">(3)损害国家荣誉和利益的。</div>
+                <div class="item tip">(4)煽动民族仇恨、民族歧视,破坏民族团结的。</div>
+                <div class="item tip">(5)破坏国家宗教政策,宣扬邪教和封建迷信的。</div>
+                <div class="item tip">(6)散布谣言,扰乱社会秩序,破坏社会稳定的。</div>
+                <div class="item tip">(7)散布淫秽、色情、赌博、暴力、凶杀、恐怖或者教唆犯罪的。</div>
+                <div class="item tip">(8)侮辱或者诽谤他人,侵害他人合法权益的。</div>
+                <div class="item tip">
+                    (9)违反法律法规底线、社会主义制度底线、国家利益底线、公民合法权益底线、社会公共秩序底线、道德风尚底线和信息真实性底线的“七条底线”要求的。
+                </div>
+                <div class="item tip">(10)相关法律法规或本协议、相关协议、规则等禁止的。</div>
+                <div class="item tip">
+                    9.2如果您在使用本服务过程中违反了相关法律法规或本协议约定,相关国家机关或机构可能会对您提起诉讼、罚款或采取其他制裁措施,并要求盛泰给予协助。因此给您或者他人造成损害的,您应自行承担全部责任,盛泰不承担任何责任。
+                </div>
+                <div class="item tip">
+                    9.3如果您违反本协议约定,盛泰有权进行独立判断并采取相应措施,包括但不限于通过技术手段删除、屏蔽相关内容或断开链接等。同时,盛泰有权视用户的行为性质,采取包括但不限于暂停或终止向您提供服务,限制、中止、冻结或终止您对QQ账号、微信账号的使用,追究法律责任等措施。
+                </div>
+                <div class="item tip">
+                    9.4您违反本协议约定,导致任何主体损失的,您应当独立承担责任;盛泰因此遭受损失的,您也应当一并赔偿。
+                </div>
+                <div class="item">十、【遵守当地法律监管】</div>
+                <div class="item tip">
+                    10.1您在使用本服务过程中应当遵守当地相关的法律法规,并尊重当地的道德和风俗习惯。如果您的行为违反了当地法律法规或道德风俗,您应当为此独立承担责任。
+                </div>
+                <div class="item tip">
+                    10.2您应避免因使用本服务而使盛泰违反法律法规或卷入政治和公共事件,否则盛泰有权暂停或终止对您的服务。
+                </div>
+                <div class="item">十一、【用户发送、传播的内容与投诉处理】</div>
+                <div class="item tip">
+                    11.1您通过本服务发送或传播的内容(包括但不限于网页、文字、图片、音频、视频、图表等)均由您自行承担责任。
+                </div>
+                <div class="item tip">11.2您发送或传播的内容应有合法来源,相关内容为您所有或您已获得必要的授权。</div>
+                <div class="item tip">
+                    11.3如果您发送或传播的内容违法违规或侵犯他人权利的,盛泰有权进行独立判断并采取删除、屏蔽或断开链接等措施。
+                </div>
+                <div class="item tip">
+                    11.4如您被他人投诉或您投诉他人,盛泰有权将争议中相关方的主体信息、联系方式、投诉相关内容等必要信息提供给相关当事方或相关部门,以便及时解决投诉纠纷,保护各方合法权益。
+                </div>
+                <div class="item tip">
+                    11.5您保证对您在投诉处理程序中提供的信息、材料、证据等的真实性、合法性、有效性负责。
+                </div>
+                <div class="item">十二、【不可抗力及其他免责事由】</div>
+                <div class="item tip">
+                    12.1您理解并同意,在使用本服务的过程中,可能会遇到不可抗力等风险因素,使本服务受到影响。不可抗力是指不能预见、不能克服并不能避免且对一方或双方造成重大影响的客观事件,包括但不限于自然灾害如洪水、地震、瘟疫流行和风暴等以及社会事件如战争、动乱、政府行为等。出现上述情况时,盛泰将努力在第一时间与相关单位配合,争取及时进行处理,但是由此给您造成的损失盛泰在法律允许的范围内免责。
+                </div>
+                <div class="item tip">12.2在法律允许的范围内,盛泰对以下情形导致的服务中断或受阻不承担责任:</div>
+                <div class="item tip">(1)受到计算机病毒、木马或其他恶意程序、黑客攻击的破坏。</div>
+                <div class="item tip">(2)用户或盛泰的电脑软件、系统、硬件和通信线路出现故障。</div>
+                <div class="item tip">(3)用户操作不当或用户通过非盛泰授权的方式使用本服务。</div>
+                <div class="item tip">(4)程序版本过时、设备的老化和/或其兼容性问题。</div>
+                <div class="item tip">(5)其他盛泰无法控制或合理预见的情形。</div>
+                <div class="item tip">
+                    12.3您理解并同意,在使用本服务的过程中,可能会遇到网络信息或其他用户行为带来的风险,盛泰不对任何信息的真实性、适用性、合法性承担责任,也不对因侵权行为给您造成的损害负责。这些风险包括但不限于:
+                </div>
+                <div class="item tip">(1)来自他人匿名或冒名的含有威胁、诽谤、令人反感或非法内容的信息。</div>
+                <div class="item tip">
+                    (2)遭受他人误导、欺骗或其他导致或可能导致的任何心理、生理上的伤害以及经济上的损失。
+                </div>
+                <div class="item tip">(3)其他因网络信息或用户行为引起的风险。</div>
+                <div class="item tip">
+                    12.4盛泰依据本协议约定获得处理违法违规内容的权利,该权利不构成盛泰的义务或承诺,盛泰不能保证及时发现违法行为或进行相应处理。
+                </div>
+                <div class="item tip">
+                    12.5在任何情况下,您不应轻信借款、索要密码或其他涉及财产的信息。涉及财产操作的,请一定先核实对方身份,并请经常留意盛泰有关防范诈骗犯罪的提示。
+                </div>
+                <div class="item">十三、【协议的生效与变更】</div>
+                <div class="item tip">13.1您使用本服务即视为您已阅读本协议并接受本协议的约束。</div>
+                <div class="item tip">
+                    13.2盛泰有权在必要时修改本协议条款。您可以在相关服务页面查阅最新版本的协议条款。
+                </div>
+                <div class="item tip">
+                    13.3本协议条款变更后,如果您继续使用盛泰提供的软件或服务,即视为您已接受变更后的协议。
+                </div>
+                <div class="item">十四、【服务的变更、中断、终止】</div>
+                <div class="item tip">
+                    14.1您理解并同意,盛泰基于经营策略的调整,可能会对服务内容进行变更,也可能会中断、中止或终止服务。
+                </div>
+                <div class="item tip">
+                    14.2在盛泰发生合并、分立、收购、资产转让时,盛泰可向第三方转让本服务下相关资产;盛泰也可在单方通知您后,将本协议下部分或全部服务及相应的权利义务转交由第三方运营或履行。具体受让主体以盛泰通知的为准。
+                </div>
+                <div class="item tip">14.3如发生下列任何一种情形,盛泰有权不经通知而中断或终止向您提供服务:</div>
+                <div class="item tip">
+                    (1)根据法律法规规定您应提交真实信息,而您提供的个人资料不真实、或与注册时信息不一致又未能提供合理证明。
+                </div>
+                <div class="item tip">(2)您违反相关法律法规的规定或违反本协议的约定。</div>
+                <div class="item tip">(3)按照法律法规规定,司法机关或主管部门的要求。</div>
+                <div class="item tip">(4)出于安全的原因或其他必要的情形。</div>
+                <div class="item tip">
+                    14.4盛泰有权按本协议8.2条的约定进行收费。若您未按时足额付费,盛泰有权中断、中止或终止提供服务。
+                </div>
+                <div class="item tip">
+                    14.5您有责任自行备份存储在本服务中的数据。如果您的服务被终止,盛泰有权从服务器上永久地删除您的数据,法律法规另有规定的除外。服务中止或终止后,盛泰没有义务向您提供或返还数据。
+                </div>
+            </div>
+        </div>
+    </body>
+</html>

BIN
src/static/login_bg.jpeg


BIN
src/static/noAuth.png


BIN
src/static/splash.png


BIN
src/static/tabBar/home.png


BIN
src/static/tabBar/home_selected.png


BIN
src/static/tabBar/msg.png


BIN
src/static/tabBar/msg_selected.png


BIN
src/static/tabBar/my.png


BIN
src/static/tabBar/my_selected.png


+ 16 - 1
src/store/index.js

@@ -2,7 +2,7 @@
  * @Author: PoJun
  * @Date: 2023-05-14 17:52:10
  * @LastEditors: PoJun
- * @LastEditTime: 2023-12-18 11:12:44
+ * @LastEditTime: 2024-01-04 15:25:49
  * @Message: Nothing
  */
 import Vue from "vue";
@@ -40,6 +40,7 @@ const store = new Vuex.Store({
         vuex_dict: {}, //字典数据
         // 人员信息展开, 在使用的时候方便使用, 使用null是为了在未登录情况小程序端不出现undefined
         vuex_userInfo: lifeData.vuex_userInfo ? lifeData.vuex_userInfo : null, //登录信息
+        vuex_affairNum: 0,
     },
     mutations: {
         $uStore(state, payload) {
@@ -66,12 +67,17 @@ const store = new Vuex.Store({
             // 数据更新,把需要且有用的人员相关信息直接放在第一层级,只能做展示用
             const info = {
                 ...res.attr.OrgPerson,
+                name: res.attr.systemUser?.name,
+                otherName: res.attr.systemUser?.otherName,
                 imageLogo: res.attr.systemUser?.imageLogo,
                 ...res,
             };
             state.vuex_userInfo = info;
             saveLifeData("vuex_userInfo", info);
         },
+        $updateAffairInfo(state, num = 0) {
+            state.vuex_affairNum = num;
+        },
     },
     actions: {
         // 获取登录信息, 在多个地方需要重新获取
@@ -81,6 +87,15 @@ const store = new Vuex.Store({
                 commit("$updateLoginInfo", data);
             }
         },
+        // 待办数量接口
+        async UPDATEAFFAIRINFO({ commit }) {
+            const num = await uni.$uv.http.get("/affairs/waitdo_count", { custom: { toast: false } });
+            try {
+                commit("$updateAffairInfo", num ? num : 0);
+            } catch (error) {
+                console.log(error);
+            }
+        },
     },
 });
 

+ 5 - 258
src/subpkg/agreement/index.vue

@@ -2,274 +2,21 @@
  * @Author: PoJun
  * @Date: 2023-10-30 17:14:30
  * @LastEditors: PoJun
- * @LastEditTime: 2023-12-19 16:15:21
+ * @LastEditTime: 2024-01-08 17:01:44
  * @Message: Nothing
 -->
 <template>
-    <view class="agreement">
-        <view v-if="type == 'service'">
-            <view class="item">
-                为使用盛泰科技有限公司(以下简称“盛泰”)服务,您应当阅读并遵守《盛泰服务协议》(以下简称“本协议”)。
-            </view>
-            <view class="item">
-                请您务必审慎阅读、充分理解各条款内容,特别是免除或者限制盛泰责任的条款、对用户权利进行限制的条款、约定争议解决方式和司法管辖的条款(如第十八条相关约定)等,以及开通或使用某项服务的单独协议或规则。限制、免责条款或者其他涉及您重大权益的条款可能以加粗、加下划线等形式提示您重点注意。
-            </view>
-            <view class="item">
-                除非您已充分阅读、完全理解并接受本协议所有条款,否则您无权使用盛泰服务。您点击“同意”或“下一步”,或您使用盛泰服务,或者以其他任何明示或者默示方式表示接受本协议的,均视为您已阅读并同意签署本协议。本协议即在您与盛泰之间产生法律效力,成为对双方均具有约束力的法律文件。
-            </view>
-            <view class="item">
-                如果您因年龄、智力等因素而不具有完全民事行为能力,请在法定监护人(以下简称"监护人")的陪同下阅读和判断是否同意本协议,并特别注意未成年人使用条款。
-            </view>
-            <view class="item">
-                如果您是中国大陆地区以外的用户,您订立或履行本协议还需要同时遵守您所属和/或所处国家或地区的法律。
-            </view>
-            <view class="item">一、【协议的范围】</view>
-            <view class="item tip">
-                1.1本协议是用户与盛泰之间关于其使用盛泰的产品及服务所订立的协议。“盛泰”是指盛泰和/或其相关服务可能存在的运营关联单位。“用户”是指盛泰的服务的使用人,在本协议中更多地称为“您”。
-            </view>
-            <view class="item tip">
-                1.2盛泰的服务是指盛泰向用户提供的,包括web应用、app应用、小程序应用及服务,具体服务以盛泰实际提供的为准(以下简称“本服务”)。
-            </view>
-            <view class="item">二、【账号与密码安全】</view>
-            <view class="item tip">
-                2.1您在使用本服务时可能需要注册一个账号。关于您使用账号的具体规则,请仔细阅读并遵守相关单独协议。
-            </view>
-            <view class="item tip">
-                2.2盛泰特别提醒您应妥善保管您的账号和密码。当您使用完毕后,应安全退出。因您保管不善可能导致遭受被盗号或密码失窃,责任由您自行承担。
-            </view>
-            <view class="item tip">
-                2.3为增强用户体验和/或技术便利,本服务的账号可能包括数字、字母或者其组合,以及手机号码、电子信箱等多种形式。在您注册某一形式的账号时,盛泰可能附赠该账号的另一表现形式。具体的账号形式、账号体系及账号之间的关联关系等,以盛泰实际提供的为准。
-            </view>
-            <view class="item tip">
-                2.4您在使用本服务过程中,您应当保证这些信息的内容和形式符合法律法规(本协议中的“法律法规”指用户所属/所处地区、国家现行有效的法律、行政法规、司法解释、地方法规、地方规章、部门规章及其他规范性文件以及对于该等法律法规的不时修改和补充,以及相关政策规定等,下同。)、公序良俗、社会公德以及盛泰平台规则,且不会侵害任何主体的合法权益。
-            </view>
-            <view class="item">三、【使用本服务的方式】</view>
-            <view class="item tip">3.1本服务仅为您个人非商业性质的使用,除非您与盛泰另有约定。</view>
-            <view class="item tip">3.2您依本协议条款所取得的权利不可转让。</view>
-            <view class="item tip">
-                3.3您不得使用任何方式(包括但不限于第三方软件、插件、外挂、系统、设备等)对本服务进行干扰、破坏、修改或施加其他影响。
-            </view>
-            <view class="item tip">
-                3.4您应当通过盛泰提供或认可的方式使用本服务,不得通过任何第三方软件、插件、外挂、系统、设备等登录或使用本服务。
-            </view>
-            <view class="item tip">
-                3.5任何人未经盛泰授权不得使用任何第三方软件、插件、外挂、系统等查看、获取本服务中所包含的盛泰、盛泰合作伙伴或用户的任何相关信息、数据等内容,同时,应当严格遵守盛泰发布的Robots协议等相关协议规则。
-            </view>
-            <view class="item">四、【按现状提供服务】</view>
-            <view class="item tip">
-                4.1本服务是按照现有技术和条件所能达到的现状提供的。盛泰会尽最大努力保障服务的连贯性和安全性,但盛泰不能随时预见和防范法律、技术以及其他风险,盛泰对此类风险在法律允许的范围内免责,包括但不限于不可抗力、病毒、木马、黑客攻击、系统不稳定、第三方服务瑕疵、政府行为等原因可能导致的服务中断、数据丢失以及其他的损失和风险。
-            </view>
-            <view class="item tip">
-                4.2因经营策略安排或调整等原因,不同地区的用户可使用的具体盛泰服务的内容可能会存在差异,具体以盛泰实际提供的为准。
-            </view>
-            <view class="item">五、【自备设备】</view>
-            <view class="item tip">
-                5.1您应当理解,您使用本服务需自行准备与相关服务有关的终端设备(如电脑、移动终端和必要的网络接入设备等装置),并承担所需的费用(如电话费、上网费等费用)。
-            </view>
-            <view class="item tip">5.2您理解并同意,您使用本服务时会耗用您的终端设备和带宽等资源。</view>
-            <view class="item">六、【第三方提供的产品或服务】</view>
-            <view class="item tip">
-                您在盛泰平台上使用第三方提供的产品或服务时,除遵守本协议约定外,还应遵守第三方的用户协议。盛泰和第三方对可能出现的纠纷在法律规定和约定的范围内各自承担责任。
-            </view>
-            <view class="item">七、【基于软件提供服务】</view>
-            <view class="item">若盛泰依托“软件”向您提供服务,您还应遵守以下约定:</view>
-            <view class="item tip">
-                7.1您在使用本服务的过程中可能需要下载软件,对于这些软件,盛泰给予您一项个人的、不可转让及非排他性的许可。您仅可为使用本服务的目的而使用这些软件。
-            </view>
-            <view class="item tip">
-                7.2为了改善用户体验、保障服务的安全性及产品功能的一致性等目的,盛泰可能会对软件进行更新。您应该将相关软件更新到最新版本,否则盛泰并不保证软件或服务能正常使用。
-            </view>
-            <view class="item tip">
-                7.3盛泰可能为不同的终端设备开发不同的软件版本,您应当根据实际情况选择下载合适的版本进行安装。您可以直接从盛泰平台上获取软件,也可以从得到盛泰授权的第三方获取。如果您从未经盛泰授权的第三方获取软件或与软件名称相同的安装程序,盛泰无法保证该软件或服务能够正常使用,并对因此给您造成的损失不予负责。
-            </view>
-            <view class="item tip">7.4除非盛泰书面许可,您不得从事下列任一行为:</view>
-            <view class="item tip">(1)删除软件及其副本上关于著作权的信息。</view>
-            <view class="item tip">
-                (2)对软件进行反向工程、反向汇编、反向编译,或者以其他方式尝试发现软件的源代码。
-            </view>
-            <view class="item tip">
-                (3)对盛泰拥有知识产权的内容进行使用、出租、出借、复制、修改、链接、转载、汇编、发表、出版、建立镜像站点等。
-            </view>
-            <view class="item tip">
-                (4)对软件或者软件运行过程中释放到任何终端内存中的数据、软件运行过程中客户端与服务器端的交互数据,以及软件运行所必需的系统数据,进行复制、修改、增加、删除、挂接运行或创作任何衍生作品,形式包括但不限于使用插件、外挂或非经盛泰授权的第三方工具/服务接入软件和相关系统。
-            </view>
-            <view class="item tip">
-                (5)通过修改或伪造软件运行中的指令、数据等任何方式,增加、删减、变动软件的功能或运行效果,或者将用于上述用途的软件、方法进行运营或向公众传播,无论这些行为是否为商业目的。
-            </view>
-            <view class="item tip">
-                (6)通过非盛泰开发、授权的第三方软件、插件、外挂、系统、设备等任何方式,登录或使用盛泰软件及服务,或制作、发布、传播非盛泰开发、授权的用于登录或使用盛泰软件及服务的第三方软件、插件、外挂、系统、设备等。
-            </view>
-            <view class="item">八、【知识产权声明】</view>
-            <view class="item tip">
-                8.1盛泰在本服务中提供的内容(包括但不限于网页、文字、图片、音频、视频、图表、计算机软件等)的知识产权归盛泰所有,用户在使用本服务中所产生内容的知识产权归用户或相关权利人所有,除非您与盛泰另有约定。
-            </view>
-            <view class="item tip">
-                8.2除另有特别声明外,盛泰提供本服务时所依托软件的著作权、专利权及其他知识产权均归盛泰所有。
-            </view>
-            <view class="item tip">
-                8.3上述及其他任何本服务包含的内容的知识产权均受到法律法规保护,未经盛泰、用户或相关权利人书面许可,任何人不得以任何形式进行使用或创造相关衍生作品。
-            </view>
-            <view class="item tip">九、【用户违法违规行为】</view>
-            <view class="item tip">
-                9.1您在使用本服务时须遵守法律法规,不得制作、复制、发布、传播含有下列内容的信息或从事相关行为,也不得为制作、复制、发布、传播含有下列内容的信息或从事相关行为提供便利:
-            </view>
-            <view class="item tip">(1)反对宪法所确定的基本原则的。</view>
-            <view class="item tip">(2)危害国家安全,泄露国家秘密,颠覆国家政权,破坏国家统一的。</view>
-            <view class="item tip">(3)损害国家荣誉和利益的。</view>
-            <view class="item tip">(4)煽动民族仇恨、民族歧视,破坏民族团结的。</view>
-            <view class="item tip">(5)破坏国家宗教政策,宣扬邪教和封建迷信的。</view>
-            <view class="item tip">(6)散布谣言,扰乱社会秩序,破坏社会稳定的。</view>
-            <view class="item tip">(7)散布淫秽、色情、赌博、暴力、凶杀、恐怖或者教唆犯罪的。</view>
-            <view class="item tip">(8)侮辱或者诽谤他人,侵害他人合法权益的。</view>
-            <view class="item tip">
-                (9)违反法律法规底线、社会主义制度底线、国家利益底线、公民合法权益底线、社会公共秩序底线、道德风尚底线和信息真实性底线的“七条底线”要求的。
-            </view>
-            <view class="item tip">(10)相关法律法规或本协议、相关协议、规则等禁止的。</view>
-            <view class="item tip">
-                9.2如果您在使用本服务过程中违反了相关法律法规或本协议约定,相关国家机关或机构可能会对您提起诉讼、罚款或采取其他制裁措施,并要求盛泰给予协助。因此给您或者他人造成损害的,您应自行承担全部责任,盛泰不承担任何责任。
-            </view>
-            <view class="item tip">
-                9.3如果您违反本协议约定,盛泰有权进行独立判断并采取相应措施,包括但不限于通过技术手段删除、屏蔽相关内容或断开链接等。同时,盛泰有权视用户的行为性质,采取包括但不限于暂停或终止向您提供服务,限制、中止、冻结或终止您对QQ账号、微信账号的使用,追究法律责任等措施。
-            </view>
-            <view class="item tip">
-                9.4您违反本协议约定,导致任何主体损失的,您应当独立承担责任;盛泰因此遭受损失的,您也应当一并赔偿。
-            </view>
-            <view class="item">十、【遵守当地法律监管】</view>
-            <view class="item tip">
-                10.1您在使用本服务过程中应当遵守当地相关的法律法规,并尊重当地的道德和风俗习惯。如果您的行为违反了当地法律法规或道德风俗,您应当为此独立承担责任。
-            </view>
-            <view class="item tip">
-                10.2您应避免因使用本服务而使盛泰违反法律法规或卷入政治和公共事件,否则盛泰有权暂停或终止对您的服务。
-            </view>
-            <view class="item">十一、【用户发送、传播的内容与投诉处理】</view>
-            <view class="item tip">
-                11.1您通过本服务发送或传播的内容(包括但不限于网页、文字、图片、音频、视频、图表等)均由您自行承担责任。
-            </view>
-            <view class="item tip">11.2您发送或传播的内容应有合法来源,相关内容为您所有或您已获得必要的授权。</view>
-            <view class="item tip">
-                11.3如果您发送或传播的内容违法违规或侵犯他人权利的,盛泰有权进行独立判断并采取删除、屏蔽或断开链接等措施。
-            </view>
-            <view class="item tip">
-                11.4如您被他人投诉或您投诉他人,盛泰有权将争议中相关方的主体信息、联系方式、投诉相关内容等必要信息提供给相关当事方或相关部门,以便及时解决投诉纠纷,保护各方合法权益。
-            </view>
-            <view class="item tip">
-                11.5您保证对您在投诉处理程序中提供的信息、材料、证据等的真实性、合法性、有效性负责。
-            </view>
-            <view class="item">十二、【不可抗力及其他免责事由】</view>
-            <view class="item tip">
-                12.1您理解并同意,在使用本服务的过程中,可能会遇到不可抗力等风险因素,使本服务受到影响。不可抗力是指不能预见、不能克服并不能避免且对一方或双方造成重大影响的客观事件,包括但不限于自然灾害如洪水、地震、瘟疫流行和风暴等以及社会事件如战争、动乱、政府行为等。出现上述情况时,盛泰将努力在第一时间与相关单位配合,争取及时进行处理,但是由此给您造成的损失盛泰在法律允许的范围内免责。
-            </view>
-            <view class="item tip">12.2在法律允许的范围内,盛泰对以下情形导致的服务中断或受阻不承担责任:</view>
-            <view class="item tip">(1)受到计算机病毒、木马或其他恶意程序、黑客攻击的破坏。</view>
-            <view class="item tip">(2)用户或盛泰的电脑软件、系统、硬件和通信线路出现故障。</view>
-            <view class="item tip">(3)用户操作不当或用户通过非盛泰授权的方式使用本服务。</view>
-            <view class="item tip">(4)程序版本过时、设备的老化和/或其兼容性问题。</view>
-            <view class="item tip">(5)其他盛泰无法控制或合理预见的情形。</view>
-            <view class="item tip">
-                12.3您理解并同意,在使用本服务的过程中,可能会遇到网络信息或其他用户行为带来的风险,盛泰不对任何信息的真实性、适用性、合法性承担责任,也不对因侵权行为给您造成的损害负责。这些风险包括但不限于:
-            </view>
-            <view class="item tip">(1)来自他人匿名或冒名的含有威胁、诽谤、令人反感或非法内容的信息。</view>
-            <view class="item tip">
-                (2)遭受他人误导、欺骗或其他导致或可能导致的任何心理、生理上的伤害以及经济上的损失。
-            </view>
-            <view class="item tip">(3)其他因网络信息或用户行为引起的风险。</view>
-            <view class="item tip">
-                12.4盛泰依据本协议约定获得处理违法违规内容的权利,该权利不构成盛泰的义务或承诺,盛泰不能保证及时发现违法行为或进行相应处理。
-            </view>
-            <view class="item tip">
-                12.5在任何情况下,您不应轻信借款、索要密码或其他涉及财产的信息。涉及财产操作的,请一定先核实对方身份,并请经常留意盛泰有关防范诈骗犯罪的提示。
-            </view>
-            <view class="item">十三、【协议的生效与变更】</view>
-            <view class="item tip">13.1您使用本服务即视为您已阅读本协议并接受本协议的约束。</view>
-            <view class="item tip">
-                13.2盛泰有权在必要时修改本协议条款。您可以在相关服务页面查阅最新版本的协议条款。
-            </view>
-            <view class="item tip">
-                13.3本协议条款变更后,如果您继续使用盛泰提供的软件或服务,即视为您已接受变更后的协议。
-            </view>
-            <view class="item">十四、【服务的变更、中断、终止】</view>
-            <view class="item tip">
-                14.1您理解并同意,盛泰基于经营策略的调整,可能会对服务内容进行变更,也可能会中断、中止或终止服务。
-            </view>
-            <view class="item tip">
-                14.2在盛泰发生合并、分立、收购、资产转让时,盛泰可向第三方转让本服务下相关资产;盛泰也可在单方通知您后,将本协议下部分或全部服务及相应的权利义务转交由第三方运营或履行。具体受让主体以盛泰通知的为准。
-            </view>
-            <view class="item tip">14.3如发生下列任何一种情形,盛泰有权不经通知而中断或终止向您提供服务:</view>
-            <view class="item tip">
-                (1)根据法律法规规定您应提交真实信息,而您提供的个人资料不真实、或与注册时信息不一致又未能提供合理证明。
-            </view>
-            <view class="item tip">(2)您违反相关法律法规的规定或违反本协议的约定。</view>
-            <view class="item tip">(3)按照法律法规规定,司法机关或主管部门的要求。</view>
-            <view class="item tip">(4)出于安全的原因或其他必要的情形。</view>
-            <view class="item tip">
-                14.4盛泰有权按本协议8.2条的约定进行收费。若您未按时足额付费,盛泰有权中断、中止或终止提供服务。
-            </view>
-            <view class="item tip">
-                14.5您有责任自行备份存储在本服务中的数据。如果您的服务被终止,盛泰有权从服务器上永久地删除您的数据,法律法规另有规定的除外。服务中止或终止后,盛泰没有义务向您提供或返还数据。
-            </view>
-        </view>
-
-        <view v-else>
-            <view class="item">
-                我们十分重视你的隐私。本隐私声明阐述了盛泰科技有限公司(以下简称“盛泰”)处理的个人数据以及盛泰处理个人数据的方式和目的。
-            </view>
-            <view class="item">
-                盛泰提供企业安全质量管理相关软件及服务。本声明中所提到的盛泰产品包括所有web端、app端、小程序端业务内容。
-            </view>
-            <view class="item">请阅读本隐私声明详细信息。 此声明适用于盛泰与你之间的互动。</view>
-            <view class="item">
-                出于下述各种目的,包括为用户提供最佳产品体验、用户在业务你准确分配数据权限、用户作为项目人员进行认证,盛泰会收集你向我们提供的数据。
-            </view>
-            <view class="item">
-                我们还从第三方获取数据。我们保护根据本声明中描述的惯例以及数据源所施加的任何其他限制从第三方获取的数据。这些第三方源随着时间的推移而变化。
-            </view>
-            <view class="item">
-                对于你使用的技术和共享的数据,你可以做出不同的选择。 当我们请求你提供个人数据时,你可以拒绝。
-            </view>
-            <view class="item">我们的产品都需要你提供某些个人数据,以便运行并向你提供服务。</view>
-            <view class="item">如果你选择不提供某个产品或功能所需的数据,则无法运行和使用该产品或功能。</view>
-            <view class="item">
-                同样,如果我们需要依法收集个人数据,或者需要与你签订合同或对你履行合同,但你没有提供数据,那么我们将无法签订合同;或者如果这涉及到你正在使用的现有产品,那么我们可能必须暂停或取消你的使用权。
-            </view>
-            <view class="item">如果属于上述情况,我们将通知你。</view>
-            <view class="item">
-                在不强制要求提供数据的情况下,如果你选择不共享个人数据,那么你将无法使用需要提供此类数据的功能(如个性化功能)。
-            </view>
-            <view class="item">
-                我们收集的数据取决于你与盛泰互动的环境、你所做的选择(包括你的隐私设置)、你所使用的产品和功能、你的位置以及适用法律。
-            </view>
-            <view class="item">我们收集的数据可能包括以下各项:</view>
-            <view class="item tip">
-                1. 姓名和联系人数据. 你的姓氏和名字、电子邮件地址、通信地址、电话号码以及其他类似的联系人数据。
-            </view>
-            <view class="item tip">2. 密码、密码提示以及用于验证和帐户访问的类似安全信息。</view>
-            <view class="item tip">3. 特种工作证数据,包括工作证图片和证件认证信息。</view>
-            <view class="item tip">4. 浏览历史记录。有关你访问的业务模块和填写的业务数据。</view>
-            <view class="item tip">5. 搜索和命令. 使用具有搜索或相关待办、业务功能的盛泰产品时,搜索查询和命令。</view>
-            <view class="item tip">
-                6. 文本、墨迹书写和键入数据. 文本、墨迹书写和键入数据以及相关信息。
-                例如,当你进行待办处理签字时将你的签字信息记录到业务内供管理人员进行甄别。
-            </view>
-            <view class="item tip">
-                7. 图像. 图像和相关信息,如图片元数据。 例如,我们会收集你在使用必应图像支持服务时提供的图像。
-            </view>
-            <view class="item tip">
-                8. 位置数据. 有关你的设备位置的数据(可能是精确数据,也可能是模糊数据)。
-                例如,你在发起业务数据流程时需要填写具体地理位置以便于能够准确的完成业务定位和控制。
-            </view>
-            <view class="item tip">
-                9. 反馈和评价. 你提供给我们的信息、你发送给我们的消息内容,例如反馈、调查数据和你写的产品评价。
-            </view>
-        </view>
+    <view class="webview-box">
+        <web-view v-if="type == 'service'" src="/static/htmls/service.html"></web-view>
+        <web-view v-else src="/static/htmls/privacy.html"></web-view>
     </view>
 </template>
 
 <script>
 export default {
-    components: {},
     data() {
         return {
-            type: "",
+            type: "service",
         };
     },
     methods: {},

+ 152 - 0
src/subpkg/flow/detail.vue

@@ -0,0 +1,152 @@
+<!--
+ * @Author: PoJun
+ * @Date: 2024-01-03 16:13:54
+ * @LastEditors: PoJun
+ * @LastEditTime: 2024-01-04 17:33:34
+ * @Message: Nothing
+-->
+<template>
+    <view class="flow-detail">
+        <uv-skeletons
+            :loading="skeletonLoading"
+            :skeleton="[
+                {
+                    type: 'line',
+                    num: 10,
+                    gap: '0',
+                    style: 'height: 32px;marginTop:36rpx',
+                },
+            ]"
+        >
+            <kirin-form :list="list" labelWidth="80"></kirin-form>
+            <view class="uv-m-t-30" v-if="tabType == 'todo'">
+                <uv-row gutter="15">
+                    <uv-col span="6">
+                        <uv-button type="primary" :plain="true" text="拒绝" @click="refuse"></uv-button>
+                    </uv-col>
+                    <uv-col span="6">
+                        <uv-button type="primary" text="同意" @click="agree"></uv-button>
+                    </uv-col>
+                </uv-row>
+            </view>
+        </uv-skeletons>
+    </view>
+</template>
+
+<script>
+import { getAffairSelfInfo, refuseAffairs, agreeAffairs } from "@/config/http.js";
+import formBasicMixin from "@/utils/form-basic-mixin.js";
+export default {
+    mixins: [formBasicMixin],
+    data() {
+        return {
+            list: [
+                {
+                    type: "textarea",
+                    label: "标题",
+                    code: "title",
+                    sv: null,
+                    rv: null,
+                    canShow: true,
+                    labelWidth: 80,
+                },
+                {
+                    type: "input",
+                    label: "审核类型",
+                    code: "type",
+                    sv: null,
+                    rv: null,
+                    canShow: true,
+                    labelWidth: 80,
+                },
+                {
+                    type: "input",
+                    label: "名称",
+                    code: "name",
+                    sv: null,
+                    rv: null,
+                    canShow: true,
+                    labelWidth: 80,
+                },
+                {
+                    type: "input",
+                    label: "联系方式",
+                    code: "phone",
+                    sv: null,
+                    rv: null,
+                    canShow: true,
+                    labelWidth: 80,
+                },
+                {
+                    type: "input",
+                    label: "审核结果",
+                    code: "result",
+                    sv: null,
+                    rv: null,
+                    canShow: true,
+                    labelWidth: 80,
+                },
+            ],
+            tabType: "todo",
+            id: "",
+            skeletonLoading: true,
+            detailItem: null,
+        };
+    },
+    methods: {
+        async initPage(id) {
+            const data = await getAffairSelfInfo(id);
+            this.detailItem = data;
+            this.list.forEach(item => {
+                if (item.code == "title" || item.code == "type") {
+                    item.sv = item.rv = data[item.code];
+                }
+                if (item.code == "phone" || item.code == "name") {
+                    item.sv = item.rv = data?.data[item.code];
+                }
+                if (item.code == "result") {
+                    if (data[item.code] != undefined && data[item.code] != null) {
+                        item.sv = item.rv = data[item.code] == 1 ? "已通过" : "已拒绝";
+                    }
+                    if (this.tabType == "done") {
+                        item.canShow = true;
+                    } else {
+                        item.canShow = false;
+                    }
+                }
+            });
+            uni.$uv.sleep(200).then(() => {
+                this.skeletonLoading = false;
+            });
+        },
+        async refuse() {
+            await refuseAffairs(this.id);
+            this.doback();
+        },
+        async agree() {
+            await agreeAffairs(this.id, this.detailItem.data);
+            this.doback();
+        },
+        doback() {
+            try {
+                uni.$uv.route({ type: "back" });
+                uni.$emit("refreshFlowList");
+            } finally {
+                uni.hideLoading();
+            }
+        },
+    },
+    async onLoad(e) {
+        await this.initDictList("supplierType");
+        this.tabType = e?.tabType;
+        this.id = e?.id;
+        this.initPage(e.id);
+    },
+};
+</script>
+
+<style lang="scss">
+.flow-detail {
+    padding: 0 25rpx;
+}
+</style>

+ 20 - 47
src/subpkg/flow/index.vue

@@ -2,7 +2,7 @@
  * @Author: PoJun
  * @Date: 2023-09-28 10:38:11
  * @LastEditors: PoJun
- * @LastEditTime: 2023-12-21 11:17:39
+ * @LastEditTime: 2024-01-03 16:39:19
  * @Message: 待办、已办
 -->
 <template>
@@ -35,7 +35,7 @@
 
 <script>
 import ItemInfo from "./item.vue";
-// import { getWaitdoList, getDoneList } from "@/config/http.js";
+import { getWaitdoList, getDoneList } from "@/config/http.js";
 
 export default {
     components: { ItemInfo },
@@ -59,7 +59,7 @@ export default {
                 },
                 {
                     name: "已处理",
-                    type: "processed",
+                    type: "done",
                 },
             ],
         };
@@ -71,35 +71,31 @@ export default {
             this.getDataList();
         },
         async getDataList() {
-            // if (!this.vuex_userInfo) {
-            //     uni.hideLoading();
-            //     return;
-            // }
+            if (!this.vuex_userInfo) {
+                uni.hideLoading();
+                return;
+            }
             if (this.page.pageNum == 1) {
                 this.dataList = [];
             }
             this.status = "loading";
-            // const data = {
-            //     params: {
-            //         pageSize: this.page.pageSize,
-            //         pageNum: this.page.pageNum,
-            //         search: this.searchKey,
-            //         excludeToken: this.currentIndex == 1 ? "Start" : "",
-            //         token: this.currentIndex == 2 ? "Start" : "",
-            //     },
-            // };
+            const data = {
+                params: {
+                    pageSize: this.page.pageSize,
+                    pageNum: this.page.pageNum,
+                    search: this.searchKey,
+                    excludeToken: this.currentIndex == 1 ? "Start" : "",
+                    token: this.currentIndex == 2 ? "Start" : "",
+                },
+            };
             // 先暂时只管两种.
-            // const res = this.currentIndex == 0 ? await getWaitdoList(data) : await getDoneList(data);
-            const res = await this.creatMockList();
+            const res = this.currentIndex == 0 ? await getWaitdoList(data) : await getDoneList(data);
 
-            // if (this.dataList.length == res.total) {
-            //     this.status = "nomore";
-            // }
-            if (this.dataList.length == 30) {
+            if (this.dataList.length == res.total) {
                 this.status = "nomore";
             }
-            // this.dataList = this.dataList.concat(res.list);
-            this.dataList = this.dataList.concat(res);
+
+            this.dataList = this.dataList.concat(res.list);
             uni.stopPullDownRefresh();
         },
         doSearch(keyword) {
@@ -107,29 +103,6 @@ export default {
             this.page.pageNum = 1;
             this.getDataList();
         },
-        // 模拟数据,一次十条,大于30条就不返回了
-        creatMockList() {
-            return new Promise(resolve => {
-                let list = [];
-                for (let i = 0; i < 10; i++) {
-                    list.push({
-                        title: this.tabList[this.currentIndex].name + "_标题_" + i,
-                        des: "流程信息描述内容",
-                        text1: "测试文字1",
-                        text2: "测试文字2",
-                        text3: "测试文字3",
-                        time: "2023-12-15 17:57:21",
-                    });
-                }
-                setTimeout(() => {
-                    if (this.dataList.length >= 30) {
-                        resolve([]);
-                    } else {
-                        resolve(list);
-                    }
-                }, 300);
-            });
-        },
     },
     onLoad(e) {
         this.currentIndex = e?.index;

+ 7 - 15
src/subpkg/flow/item.vue

@@ -2,7 +2,7 @@
  * @Author: PoJun
  * @Date: 2023-09-14 13:43:13
  * @LastEditors: PoJun
- * @LastEditTime: 2023-12-21 10:50:55
+ * @LastEditTime: 2024-01-03 16:39:01
  * @Message: 列表每项的内容
 -->
 <template>
@@ -11,15 +11,15 @@
             <view class="uv-flex uv-row-between">
                 <view class="uv-line-1 uv-flex-1 uv-weight-700">{{ item.title }}</view>
             </view>
-            <view class="uv-m-t-16">{{ item.des }}</view>
+            <view class="uv-m-t-16">{{ item.summary }}</view>
         </view>
-        <view class="flow-item-cont">
+        <!-- <view class="flow-item-cont">
             <view>{{ item.text1 }}</view>
             <view class="uv-m-t-8">{{ item.text2 }}</view>
             <view class="uv-m-t-8">{{ item.text3 }}</view>
-        </view>
+        </view> -->
         <view class="flow-item-sub">
-            <view>接收时间:{{ item.time }}</view>
+            <view>接收时间:{{ item.gmtCreate }}</view>
             <!-- <view class="uv-m-t-8">流程名称:item.groupName</view> -->
         </view>
     </view>
@@ -44,22 +44,14 @@ export default {
     data() {
         return {};
     },
-    computed: {
-        showItem() {
-            let str = this.item.fullName.replace(/:/g, ":");
-            return str.split(";");
-        },
-    },
     methods: {
         itemClick() {
-            const { resType } = this.item;
             const params = {
                 id: this.item.id,
-                tokenid: this.item.tokenId,
-                dataState: this.tab.type,
+                tabType: this.tab.type,
             };
             uni.$uv.route({
-                url: `/subpkg/flow/detail/${resType}`,
+                url: `/subpkg/flow/detail`,
                 params,
             });
         },

+ 19 - 53
src/subpkg/home/records.vue

@@ -2,7 +2,7 @@
  * @Author: PoJun
  * @Date: 2023-09-28 10:38:11
  * @LastEditors: PoJun
- * @LastEditTime: 2023-12-21 11:33:42
+ * @LastEditTime: 2024-01-04 16:07:28
  * @Message: 合作记录页
 -->
 <template>
@@ -20,8 +20,7 @@
                 v-for="(item, index) in dataList"
                 :key="index"
             >
-                <view class="uv-font-30 uv-weight-700">{{ item.name }}</view>
-                <view class="uv-font-26 uv-m-t-15 uv-info">{{ item.des }}</view>
+                <view class="uv-font-30 uv-weight-700">{{ item.content }}</view>
                 <view class="uv-font-26 uv-m-t-15">{{ item.time }}</view>
             </view>
         </view>
@@ -35,8 +34,7 @@
 </template>
 
 <script>
-// import { getWaitdoList, getDoneList } from "@/config/http.js";
-
+import { getSelfRecords } from "@/config/http.js";
 export default {
     data() {
         return {
@@ -54,33 +52,30 @@ export default {
     },
     methods: {
         async getDataList() {
-            // if (!this.vuex_userInfo) {
-            //     uni.hideLoading();
-            //     return;
-            // }
+            if (!this.vuex_userInfo) {
+                uni.hideLoading();
+                return;
+            }
             if (this.page.pageNum == 1) {
                 this.dataList = [];
             }
             this.status = "loading";
-            // const data = {
-            //     params: {
-            //         pageSize: this.page.pageSize,
-            //         pageNum: this.page.pageNum,
-            //         search: this.searchKey,
-            //     },
-            // };
+            const data = {
+                params: {
+                    pageSize: this.page.pageSize,
+                    pageNum: this.page.pageNum,
+                    query: {
+                        search: this.searchKey,
+                    },
+                },
+            };
             // 先暂时只管两种.
-            // const res = await getWaitdoList(data);
-            const res = await this.creatMockList();
+            const res = await getSelfRecords(data);
 
-            // if (this.dataList.length == res.total) {
-            //     this.status = "nomore";
-            // }
-            if (this.dataList.length == 30) {
+            if (this.dataList.length == res.total) {
                 this.status = "nomore";
             }
-            // this.dataList = this.dataList.concat(res.list);
-            this.dataList = this.dataList.concat(res);
+            this.dataList = this.dataList.concat(res.list);
             uni.stopPullDownRefresh();
         },
         doSearch(keyword) {
@@ -88,36 +83,10 @@ export default {
             this.page.pageNum = 1;
             this.getDataList();
         },
-        // 模拟数据,一次十条,大于30条就不返回了
-        creatMockList() {
-            return new Promise(resolve => {
-                let list = [];
-                for (let i = 0; i < 10; i++) {
-                    list.push({
-                        name: "合作公司某某某_" + i,
-                        des: "柔情似水,佳期如梦,忍顾鹊桥归路。两情若是久长时,又岂在朝朝暮暮。",
-                        time: "2023-12-21 11:30:06",
-                    });
-                }
-                setTimeout(() => {
-                    if (this.dataList.length >= 30) {
-                        resolve([]);
-                    } else {
-                        resolve(list);
-                    }
-                }, 300);
-            });
-        },
     },
     onLoad() {
         this.getDataList();
     },
-    onReady() {
-        uni.$on("refreshFlowList", () => {
-            this.page.pageNum = 1;
-            this.getDataList();
-        });
-    },
     onReachBottom() {
         if (this.status == "nomore") {
             return;
@@ -135,9 +104,6 @@ export default {
     onPageScroll(e) {
         this.scrollTop = e.scrollTop;
     },
-    destroyed() {
-        uni.$off("refreshFlowList");
-    },
 };
 </script>
 

+ 13 - 19
src/subpkg/home/representations.vue

@@ -2,7 +2,7 @@
  * @Author: PoJun
  * @Date: 2023-09-28 10:38:11
  * @LastEditors: PoJun
- * @LastEditTime: 2023-12-21 11:40:13
+ * @LastEditTime: 2024-01-04 15:02:22
  * @Message: 申述界面
 -->
 <template>
@@ -15,6 +15,7 @@
 </template>
 
 <script>
+import { appealMark } from "@/config/http.js";
 export default {
     data() {
         return {
@@ -22,7 +23,7 @@ export default {
                 {
                     type: "input",
                     label: "申述类型",
-                    code: "reason",
+                    code: "type",
                     sv: "评分",
                     rv: "评分",
                     canShow: true,
@@ -31,37 +32,30 @@ export default {
                 {
                     type: "textarea",
                     label: "申述理由",
-                    code: "sex",
+                    code: "reason",
                     sv: null,
                     rv: null,
                     canShow: true,
                     canEdit: true,
                     required: true,
                 },
-                {
-                    type: "imgUpload",
-                    label: "附件",
-                    code: "images",
-                    canShow: true,
-                    canEdit: true,
-                    sv: null,
-                    rv: null,
-                    maxCount: 3,
-                    width: "700rpx",
-                    height: "200px",
-                    uploadText: "上传附件图片,不超过3张",
-                },
             ],
         };
     },
-    onLoad() {},
     methods: {
-        save() {
+        async save() {
             const formData = this.$refs.form.getFormData();
             if (!formData) {
                 return;
             }
-            console.log(formData);
+            uni.showLoading({ mask: true });
+            await appealMark(formData.reason);
+            await uni.$uv.sleep(200);
+            try {
+                uni.$uv.route({ type: "back" });
+            } finally {
+                uni.hideLoading();
+            }
         },
     },
 };

+ 61 - 19
src/subpkg/home/supplier-detail.vue

@@ -2,47 +2,89 @@
  * @Author: PoJun
  * @Date: 2023-09-28 10:38:11
  * @LastEditors: PoJun
- * @LastEditTime: 2023-12-21 17:21:14
+ * @LastEditTime: 2024-01-04 14:55:05
  * @Message: 供应商详情页面
 -->
 <template>
     <view class="supplier-detail">
         <uv-navbar :border="false" :autoBack="true" bgColor="transparent" :placeholder="false"></uv-navbar>
-        <uv-swiper :list="list" height="400" indicator circular></uv-swiper>
+        <uv-swiper :list="getImages" height="400" indicator circular></uv-swiper>
         <view class="supplier-detail-cont">
             <uv-cell-group :border="false">
+                <uv-cell title="名称" :value="item.name" :border="false" :cellStyle="{ padding: '15px' }"></uv-cell>
+                <uv-cell title="评分" :value="item.mark" :border="false" :cellStyle="{ padding: '15px' }"></uv-cell>
                 <uv-cell
-                    title="名称"
-                    value="诚唐科技有限公司"
+                    title="联系人"
+                    :value="item.personName"
+                    :border="false"
+                    :cellStyle="{ padding: '15px' }"
+                ></uv-cell>
+                <uv-cell
+                    title="联系方式"
+                    :value="item.phone"
+                    :border="false"
+                    :cellStyle="{ padding: '15px' }"
+                ></uv-cell>
+                <uv-cell
+                    title="供应商类型"
+                    :value="item.type"
+                    :border="false"
+                    :cellStyle="{ padding: '15px' }"
+                ></uv-cell>
+                <uv-cell
+                    title="公司地址"
+                    :value="item.address"
+                    :border="false"
+                    :cellStyle="{ padding: '15px' }"
+                ></uv-cell>
+                <uv-cell
+                    v-if="showBtn"
+                    title="评分申述"
+                    :isLink="true"
+                    arrow-direction="right"
+                    url="/subpkg/home/representations"
                     :border="false"
                     :cellStyle="{ padding: '15px' }"
                 ></uv-cell>
-                <uv-cell title="评分" value="100" :border="false" :cellStyle="{ padding: '15px' }"></uv-cell>
-                <uv-cell title="其他信息" value="其他信息" :border="false" :cellStyle="{ padding: '15px' }"></uv-cell>
-                <uv-cell title="其他信息" value="其他信息" :border="false" :cellStyle="{ padding: '15px' }"></uv-cell>
-                <uv-cell title="其他信息" value="其他信息" :border="false" :cellStyle="{ padding: '15px' }"></uv-cell>
-                <uv-cell title="其他信息" value="其他信息" :border="false" :cellStyle="{ padding: '15px' }"></uv-cell>
-                <uv-cell title="其他信息" value="其他信息" :border="false" :cellStyle="{ padding: '15px' }"></uv-cell>
-                <uv-cell title="其他信息" value="其他信息" :border="false" :cellStyle="{ padding: '15px' }"></uv-cell>
-                <uv-cell title="其他信息" value="其他信息" :border="false" :cellStyle="{ padding: '15px' }"></uv-cell>
             </uv-cell-group>
         </view>
     </view>
 </template>
 
 <script>
-// import { getWaitdoList, getDoneList } from "@/config/http.js";
-import LoginLogo from "@/static/login_bg.jpeg";
-import Banner from "@/static/banner.png";
-import Login_bg from "@/static/splash.png";
+import { getSupplierInfo, getMySupplierInfo } from "@/config/http.js";
+
 export default {
     data() {
         return {
-            list: [Login_bg, LoginLogo, Banner],
+            list: [],
+            item: {},
+            showBtn: false,
         };
     },
-    methods: {},
-    onLoad() {},
+    methods: {
+        async initPage(id) {
+            const res = id ? await getSupplierInfo(id) : await getMySupplierInfo();
+            this.item = Object.assign({}, res);
+        },
+        getImageUrl(id) {
+            return process.env.VUE_APP_BASE_API + `/files/${id}/show_image`;
+        },
+    },
+    computed: {
+        getImages() {
+            if (this.item.image && this.item.image.length) {
+                const urls = this.item.image.map(v => this.getImageUrl(v));
+                return urls;
+            } else {
+                return [];
+            }
+        },
+    },
+    onLoad(e) {
+        this.showBtn = e.id ? false : true;
+        this.initPage(e.id);
+    },
 };
 </script>
 

+ 28 - 50
src/subpkg/home/supplier.vue

@@ -2,7 +2,7 @@
  * @Author: PoJun
  * @Date: 2023-09-28 10:38:11
  * @LastEditors: PoJun
- * @LastEditTime: 2023-12-21 14:35:38
+ * @LastEditTime: 2023-12-26 14:40:11
  * @Message: 供应商列表页
 -->
 <template>
@@ -21,11 +21,11 @@
                 :key="index"
                 @tap="itemClick(item)"
             >
-                <uv-avatar random-bg-color src="" size="66" icon="twitte" shape="square"></uv-avatar>
+                <uv-avatar :src="getImageUrl(item.image)" size="66" shape="square"></uv-avatar>
                 <view class="uv-m-l-24 uv-flex-1">
                     <view class="uv-font-30 uv-weight-700">{{ item.name }}</view>
-                    <view class="uv-font-26 uv-m-t-10 uv-info">{{ item.des }}</view>
-                    <view class="supplier-list-score uv-font-28 uv-error uv-weight-700">{{ item.score }}</view>
+                    <view class="uv-font-26 uv-m-t-10 uv-info">{{ item.address }}</view>
+                    <view class="supplier-list-score uv-font-28 uv-error uv-weight-700">{{ item.mark }}</view>
                 </view>
             </view>
         </view>
@@ -39,7 +39,7 @@
 </template>
 
 <script>
-// import { getWaitdoList, getDoneList } from "@/config/http.js";
+import { getSuppliersList } from "@/config/http.js";
 
 export default {
     data() {
@@ -58,33 +58,27 @@ export default {
     },
     methods: {
         async getDataList() {
-            // if (!this.vuex_userInfo) {
-            //     uni.hideLoading();
-            //     return;
-            // }
+            if (!this.vuex_userInfo) {
+                uni.hideLoading();
+                return;
+            }
             if (this.page.pageNum == 1) {
                 this.dataList = [];
             }
             this.status = "loading";
-            // const data = {
-            //     params: {
-            //         pageSize: this.page.pageSize,
-            //         pageNum: this.page.pageNum,
-            //         search: this.searchKey,
-            //     },
-            // };
-            // 先暂时只管两种.
-            // const res = await getWaitdoList(data);
-            const res = await this.creatMockList();
+            const data = {
+                params: {
+                    pageSize: this.page.pageSize,
+                    pageNum: this.page.pageNum,
+                    query: { search: this.searchKey },
+                },
+            };
+            const res = await getSuppliersList(data);
 
-            // if (this.dataList.length == res.total) {
-            //     this.status = "nomore";
-            // }
-            if (this.dataList.length == 30) {
+            if (this.dataList.length == res.total) {
                 this.status = "nomore";
             }
-            // this.dataList = this.dataList.concat(res.list);
-            this.dataList = this.dataList.concat(res);
+            this.dataList = this.dataList.concat(res.list);
             uni.stopPullDownRefresh();
         },
         doSearch(keyword) {
@@ -92,36 +86,20 @@ export default {
             this.page.pageNum = 1;
             this.getDataList();
         },
-        // 模拟数据,一次十条,大于30条就不返回了
-        creatMockList() {
-            return new Promise(resolve => {
-                let list = [];
-                for (let i = 0; i < 10; i++) {
-                    list.push({
-                        name: "供应商名称_" + i,
-                        des: "附加部分供应商描述信息,内容暂时随便写点内容暂时随便写点",
-                        score: 100 - i,
-                        logo: "",
-                    });
-                }
-                setTimeout(() => {
-                    if (this.dataList.length >= 30) {
-                        resolve([]);
-                    } else {
-                        resolve(list);
-                    }
-                }, 300);
-            });
-        },
+
         itemClick(item) {
             uni.$uv.route({
                 url: "/subpkg/home/supplier-detail",
-                params: {
-                    name: item.name,
-                    id: item.id,
-                },
+                params: { id: item.id },
             });
         },
+        getImageUrl(ids) {
+            if (ids && ids.length) {
+                return process.env.VUE_APP_BASE_API + `/files/${ids[0]}/show_image`;
+            } else {
+                return "";
+            }
+        },
     },
     onLoad() {
         this.getDataList();

+ 80 - 10
src/subpkg/setting/authentication.vue

@@ -2,34 +2,102 @@
  * @Author: PoJun
  * @Date: 2023-09-28 10:38:11
  * @LastEditors: PoJun
- * @LastEditTime: 2023-12-14 21:10:11
- * @Message: 信息认证界面
+ * @LastEditTime: 2024-01-03 17:17:37
+ * @Message: 角色认证界面
 -->
 <template>
     <view class="authentication">
-        <kirin-form ref="form" :list="list"></kirin-form>
-        <view class="uv-m-t-30">
-            <uv-button type="primary" text="确定" @click="save"></uv-button>
+        <uv-alert type="primary" description="选择角色,确认基本信息,更多信息待审核通过后联系管理员" center></uv-alert>
+
+        <view class="authentication-cont">
+            <uv-subsection mode="subsection" :list="tabs" :current="current" @change="change"></uv-subsection>
+
+            <kirin-form v-if="current == 0" ref="form" :list="infoList"></kirin-form>
+            <kirin-form v-else-if="current == 1" ref="form" :list="authenticationFormList"></kirin-form>
+
+            <view class="uv-m-t-30">
+                <uv-button type="primary" text="确定" @click="save"></uv-button>
+            </view>
         </view>
     </view>
 </template>
 
 <script>
 import { authenticationFormList } from "./constant";
+import formBasicMixin from "@/utils/form-basic-mixin.js";
+import { userJoinOrgAffair, supplierAffair } from "@/config/http.js";
+
 export default {
+    mixins: [formBasicMixin],
     data() {
         return {
-            list: authenticationFormList,
+            infoList: null,
+            authenticationFormList,
+            tabs: [{ name: "组织成员" }, { name: "供应商" }],
+            current: 0,
         };
     },
-    onLoad() {},
+    async onLoad() {
+        await this.initDictList("sex,supplierType");
+        this.initFormData();
+    },
     methods: {
-        save() {
+        async save() {
             const formData = this.$refs.form.getFormData();
             if (!formData) {
                 return;
             }
-            console.log(formData);
+            uni.showLoading({ mask: true });
+            this.current == 0 ? await userJoinOrgAffair(formData) : await supplierAffair(formData);
+            try {
+                await this.$store.dispatch("UPDATELOGININFO");
+                uni.$uv.route({ type: "back" });
+            } finally {
+                uni.hideLoading();
+            }
+        },
+        change(index) {
+            this.current = index;
+        },
+        initFormData() {
+            const { OrgUnit } = this.vuex_userInfo.attr;
+            this.infoList = [
+                {
+                    type: "input",
+                    label: "组织名称",
+                    code: "orgName",
+                    sv: OrgUnit.name,
+                    rv: OrgUnit.name,
+                    canShow: true,
+                    canEdit: false,
+                },
+                {
+                    type: "input",
+                    label: "用户名称",
+                    code: "name",
+                    sv: null,
+                    rv: null,
+                    canShow: true,
+                    canEdit: true,
+                    required: true,
+                },
+                {
+                    type: "input",
+                    label: "联系方式",
+                    code: "phone",
+                    sv: null,
+                    rv: null,
+                    canShow: true,
+                    canEdit: true,
+                    required: true,
+                },
+            ];
+            this.infoList.forEach(item => {
+                if (this.vuex_userInfo[item.code]) {
+                    item.rv = item.sv = this.vuex_userInfo[item.code];
+                    item.canEdit = item.required = false;
+                }
+            });
         },
     },
 };
@@ -37,6 +105,8 @@ export default {
 
 <style lang="scss">
 .authentication {
-    padding: 0rpx 25rpx;
+    &-cont {
+        padding: 25rpx;
+    }
 }
 </style>

+ 15 - 4
src/subpkg/setting/cancel-account.vue

@@ -2,7 +2,7 @@
  * @Author: PoJun
  * @Date: 2023-09-28 10:38:11
  * @LastEditors: PoJun
- * @LastEditTime: 2023-12-15 15:27:14
+ * @LastEditTime: 2024-01-04 16:44:27
  * @Message: 账号注销
 -->
 <template>
@@ -49,6 +49,8 @@
 </template>
 
 <script>
+import { cancelUser } from "@/config/http.js";
+import { logoutApp } from "@/utils/utils.js";
 export default {
     data() {
         return {
@@ -57,19 +59,28 @@ export default {
     },
     onLoad() {},
     methods: {
-        save() {},
         btnClick() {
             uni.showModal({
                 title: "提示",
                 content: "注销账号后会清空您的所有数据和账号信息,您是否确认注销?",
                 cancelText: "我再想想",
-                success: function (res) {
+                success: res => {
                     if (res.confirm) {
-                        console.log("用户点击确定");
+                        this.doCancel();
                     }
                 },
             });
         },
+        async doCancel() {
+            uni.showLoading({ mask: true });
+            await cancelUser();
+            try {
+                await uni.$uv.sleep(500);
+                logoutApp(this);
+            } finally {
+                uni.hideLoading();
+            }
+        },
     },
 };
 </script>

+ 28 - 32
src/subpkg/setting/constant.js

@@ -2,7 +2,7 @@
  * @Author: PoJun
  * @Date: 2023-12-14 21:10:35
  * @LastEditors: PoJun
- * @LastEditTime: 2023-12-15 15:17:59
+ * @LastEditTime: 2024-01-05 11:09:33
  * @Message: Nothing
  */
 // 个人信息表单信息
@@ -10,7 +10,7 @@ export const myInfoFormList = [
     {
         type: "imgUpload",
         label: "头像",
-        code: "images",
+        code: "imageLogo",
         canShow: true,
         canEdit: true,
         sv: null,
@@ -23,8 +23,8 @@ export const myInfoFormList = [
     },
     {
         type: "input",
-        label: "姓名",
-        code: "name",
+        label: "昵称",
+        code: "otherName",
         sv: null,
         rv: null,
         canShow: true,
@@ -32,14 +32,18 @@ export const myInfoFormList = [
         required: true,
     },
     {
-        type: "input",
+        type: "radio",
         label: "性别",
         code: "sex",
         sv: null,
         rv: null,
-        canShow: true,
-        canEdit: true,
-        dictCode: "sex",
+        canShow: false,
+        canEdit: false,
+        required: false,
+        options: [
+            { name: "女", key: "1" },
+            { name: "男", key: "0" },
+        ],
     },
     {
         type: "datetime",
@@ -47,8 +51,9 @@ export const myInfoFormList = [
         code: "birthday",
         sv: null,
         rv: null,
-        canShow: true,
-        canEdit: true,
+        canShow: false,
+        canEdit: false,
+        required: false,
         mode: "date",
     },
     {
@@ -57,15 +62,16 @@ export const myInfoFormList = [
         code: "phone",
         sv: null,
         rv: null,
-        canShow: true,
-        canEdit: true,
+        canShow: false,
+        canEdit: false,
+        required: false,
     },
 ];
 // 认证信息表单信息
 export const authenticationFormList = [
     {
         type: "input",
-        label: "组织名称",
+        label: "供应商名称",
         code: "name",
         sv: null,
         rv: null,
@@ -75,35 +81,24 @@ export const authenticationFormList = [
     },
     {
         type: "input",
-        label: "部门",
-        code: "sex",
-        sv: null,
-        rv: null,
-        canShow: true,
-        canEdit: true,
-        required: true,
-        dictCode: "sex",
-    },
-    {
-        type: "datetime",
-        label: "岗位",
-        code: "birthday",
+        label: "联系电话",
+        code: "phone",
         sv: null,
         rv: null,
         canShow: true,
         canEdit: true,
         required: true,
-        mode: "date",
     },
     {
-        type: "input",
-        label: "角色",
-        code: "phone",
+        type: "radio",
+        label: "供应商类型",
+        code: "type",
         sv: null,
         rv: null,
         canShow: true,
         canEdit: true,
         required: true,
+        dictCode: "supplierType",
     },
 ];
 // 修改密码
@@ -149,17 +144,18 @@ export const registerFormList = [
     {
         type: "input",
         label: "账号",
-        code: "name",
+        code: "principal",
         sv: null,
         rv: null,
         canShow: true,
         canEdit: true,
         required: true,
+        placeholder: "用户名必须包含字母",
     },
     {
         type: "input",
         label: "密码",
-        code: "password",
+        code: "credentials",
         sv: null,
         rv: null,
         canShow: true,

+ 58 - 9
src/subpkg/setting/my-info.vue

@@ -2,34 +2,83 @@
  * @Author: PoJun
  * @Date: 2023-09-28 10:38:11
  * @LastEditors: PoJun
- * @LastEditTime: 2023-12-14 21:11:56
+ * @LastEditTime: 2024-01-05 11:09:42
  * @Message: 个人信息
 -->
 <template>
     <view class="my-info">
-        <kirin-form ref="form" :list="list"></kirin-form>
-        <view class="uv-m-t-30">
-            <uv-button type="primary" text="确定" @click="save"></uv-button>
-        </view>
+        <uv-skeletons
+            :loading="skeletonLoading"
+            :skeleton="[
+                {
+                    type: 'line',
+                    num: 10,
+                    gap: '0',
+                    style: 'height: 32px;marginTop:36rpx',
+                },
+            ]"
+        >
+            <kirin-form v-if="!skeletonLoading" ref="form" :list="list"></kirin-form>
+            <view class="uv-m-t-30">
+                <uv-button type="primary" text="确定" @click="save"></uv-button>
+            </view>
+        </uv-skeletons>
     </view>
 </template>
 
 <script>
+import { editPersonInfo } from "@/config/http.js";
 import { myInfoFormList } from "./constant";
+import formBasicMixin from "@/utils/form-basic-mixin.js";
 export default {
+    mixins: [formBasicMixin],
     data() {
         return {
-            list: myInfoFormList,
+            skeletonLoading: true,
+            list: [],
         };
     },
-    onLoad() {},
+    async onLoad() {
+        await this.initDictList("sex");
+        this.initFormData();
+    },
     methods: {
-        save() {
+        async save() {
             const formData = this.$refs.form.getFormData();
             if (!formData) {
                 return;
             }
-            console.log(formData);
+            uni.showLoading({ mask: true });
+            await editPersonInfo(formData);
+            try {
+                await this.$store.dispatch("UPDATELOGININFO");
+                uni.$uv.toast("信息修改成功");
+            } finally {
+                uni.hideLoading();
+            }
+        },
+        initFormData() {
+            this.list = JSON.parse(JSON.stringify(myInfoFormList));
+            this.list.forEach(item => {
+                // 这里的数据本身没有显示值和存储值的说法,
+                const val = this.vuex_userInfo[item.code];
+                item.rv = item.sv = val;
+                if (["sex", "birthday", "phone"].includes(item.code)) {
+                    item.canShow = item.canEdit = this.vuex_userInfo.attr.BusinessRole == "orgMember";
+                    if (item.code == "sex") {
+                        if (val || val == 0) {
+                            item.sv = val == 0 ? "男" : "女";
+                        } else {
+                            item.sv = val;
+                        }
+                    }
+                }
+            });
+            console.log(this.list);
+
+            uni.$uv.sleep(300).then(() => {
+                this.skeletonLoading = false;
+            });
         },
     },
 };

+ 24 - 6
src/subpkg/setting/register.vue

@@ -2,7 +2,7 @@
  * @Author: PoJun
  * @Date: 2023-09-28 10:38:11
  * @LastEditors: PoJun
- * @LastEditTime: 2023-12-18 15:27:03
+ * @LastEditTime: 2023-12-25 16:35:22
  * @Message: 账号注册
 -->
 <template>
@@ -11,7 +11,13 @@
         <view class="register-cont">
             <kirin-form ref="form" :list="list"></kirin-form>
             <view class="uv-m-t-30">
-                <uv-button type="primary" text="注册" @click="save" :disabled="checkboxValue.length == 0"></uv-button>
+                <uv-button
+                    type="primary"
+                    text="注册"
+                    @click="save"
+                    :disabled="checkboxValue.length == 0"
+                    shape="circle"
+                ></uv-button>
             </view>
         </view>
         <view class="register-agree uv-font-26">
@@ -28,6 +34,7 @@
 </template>
 
 <script>
+import { registerUsername } from "@/config/http.js";
 import { registerFormList } from "./constant";
 export default {
     data() {
@@ -38,16 +45,27 @@ export default {
     },
     onLoad() {},
     methods: {
-        save() {
+        async save() {
             const formData = this.$refs.form.getFormData();
             if (!formData) {
                 return;
             }
+            if (formData.rePassword != formData.credentials) {
+                uni.$uv.toast("两次输入密码不一致");
+                return;
+            }
+            if (formData.rePassword.length < 6) {
+                uni.$uv.toast("密码长度不能低于6位数");
+                return;
+            }
             uni.showLoading({ mask: true });
-            uni.$uv.sleep(500).then(() => {
-                uni.hideLoading();
+            await registerUsername(formData);
+            try {
+                await uni.$uv.sleep(500);
                 uni.$uv.route({ type: "back" });
-            });
+            } finally {
+                uni.hideLoading();
+            }
         },
         check(type) {
             uni.$uv.route({

+ 14 - 5
src/subpkg/setting/update-psd.vue

@@ -2,7 +2,7 @@
  * @Author: PoJun
  * @Date: 2023-09-28 10:38:11
  * @LastEditors: PoJun
- * @LastEditTime: 2023-12-14 20:50:13
+ * @LastEditTime: 2023-12-25 16:39:42
  * @Message: 修改密码
 -->
 <template>
@@ -20,6 +20,7 @@
 <script>
 import { logoutApp } from "@/utils/utils.js";
 import { updatePsdFormList } from "./constant";
+import { updatePassword } from "@/config/http.js";
 export default {
     data() {
         return {
@@ -28,16 +29,24 @@ export default {
     },
     onLoad() {},
     methods: {
-        save() {
+        async save() {
             const formData = this.$refs.form.getFormData();
             if (!formData) {
                 return;
             }
+            if (formData.rePassword.length < 6) {
+                uni.$uv.toast("密码长度不能低于6位数");
+                return;
+            }
+
             uni.showLoading({ mask: true });
-            uni.$uv.sleep(500).then(() => {
-                uni.hideLoading();
+            await updatePassword(formData);
+            try {
+                await uni.$uv.sleep(500);
                 logoutApp(this);
-            });
+            } finally {
+                uni.hideLoading();
+            }
         },
     },
 };

+ 59 - 0
src/subpkg/setting/version.vue

@@ -0,0 +1,59 @@
+<!--
+ * @Author: PoJun
+ * @Date: 2023-09-28 10:38:11
+ * @LastEditors: PoJun
+ * @LastEditTime: 2023-12-28 18:00:19
+ * @Message: 版本查看
+-->
+<template>
+    <view class="version">
+        <view class="version-circular">
+            <uv-cell-group :border="false">
+                <uv-cell
+                    :title="sysInfo.appName"
+                    :label="sysInfo.appVersion"
+                    :isLink="true"
+                    arrow-direction="right"
+                    :border="false"
+                    :cellStyle="{ padding: '15px' }"
+                    @click="checkVersion"
+                >
+                    <uv-text slot="right-icon" text="点击查看更新" :customStyle="{ 'font-size': '12px' }"></uv-text>
+                </uv-cell>
+            </uv-cell-group>
+        </view>
+    </view>
+</template>
+
+<script>
+export default {
+    data() {
+        return {
+            sysInfo: {},
+        };
+    },
+    onLoad() {
+        this.sysInfo = uni.getSystemInfoSync();
+    },
+    methods: {
+        checkVersion() {
+            uni.$uv.toast("已是最新版本");
+        },
+    },
+};
+</script>
+
+<style lang="scss">
+page {
+    background-color: $uni-bg-color-grey;
+}
+.version {
+    padding: 10rpx 25rpx;
+    &-circular {
+        background-color: #fff;
+        border-radius: 14rpx;
+        overflow: hidden;
+        margin-bottom: 20rpx;
+    }
+}
+</style>

+ 6 - 0
src/uni_modules/uni-config-center/changelog.md

@@ -0,0 +1,6 @@
+## 0.0.3(2022-11-11)
+- 修复 config 方法获取根节点为数组格式配置时错误的转化为了对象的Bug
+## 0.0.2(2021-04-16)
+- 修改插件package信息
+## 0.0.1(2021-03-15)
+- 初始化项目

+ 81 - 0
src/uni_modules/uni-config-center/package.json

@@ -0,0 +1,81 @@
+{
+  "id": "uni-config-center",
+  "displayName": "uni-config-center",
+  "version": "0.0.3",
+  "description": "uniCloud 配置中心",
+  "keywords": [
+    "配置",
+    "配置中心"
+],
+  "repository": "",
+  "engines": {
+    "HBuilderX": "^3.1.0"
+  },
+"dcloudext": {
+    "sale": {
+      "regular": {
+        "price": "0.00"
+      },
+      "sourcecode": {
+        "price": "0.00"
+      }
+    },
+    "contact": {
+      "qq": ""
+    },
+    "declaration": {
+      "ads": "无",
+      "data": "无",
+      "permissions": "无"
+    },
+    "npmurl": "",
+    "type": "unicloud-template-function"
+  },
+  "directories": {
+    "example": "../../../scripts/dist"
+  },
+  "uni_modules": {
+    "dependencies": [],
+    "encrypt": [],
+    "platforms": {
+      "cloud": {
+        "tcb": "y",
+        "aliyun": "y"
+      },
+      "client": {
+        "App": {
+          "app-vue": "u",
+          "app-nvue": "u"
+        },
+        "H5-mobile": {
+          "Safari": "u",
+          "Android Browser": "u",
+          "微信浏览器(Android)": "u",
+          "QQ浏览器(Android)": "u"
+        },
+        "H5-pc": {
+          "Chrome": "u",
+          "IE": "u",
+          "Edge": "u",
+          "Firefox": "u",
+          "Safari": "u"
+        },
+        "小程序": {
+          "微信": "u",
+          "阿里": "u",
+          "百度": "u",
+          "字节跳动": "u",
+          "QQ": "u"
+        },
+        "快应用": {
+          "华为": "u",
+          "联盟": "u"
+        },
+        "Vue": {
+            "vue2": "y",
+            "vue3": "u"
+        }
+      }
+    }
+  }
+}

+ 93 - 0
src/uni_modules/uni-config-center/readme.md

@@ -0,0 +1,93 @@
+# 为什么使用uni-config-center
+
+实际开发中很多插件需要配置文件才可以正常运行,如果每个插件都单独进行配置的话就会产生下面这样的目录结构
+
+```bash
+cloudfunctions
+└─────common 公共模块
+        ├─plugin-a // 插件A对应的目录
+        │  ├─index.js
+        │  ├─config.json // plugin-a对应的配置文件
+        │  └─other-file.cert  // plugin-a依赖的其他文件
+        └─plugin-b // plugin-b对应的目录
+           ├─index.js
+           └─config.json // plugin-b对应的配置文件
+```
+
+假设插件作者要发布一个项目模板,里面使用了很多需要配置的插件,无论是作者发布还是用户使用都是一个大麻烦。
+
+uni-config-center就是用了统一管理这些配置文件的,使用uni-config-center后的目录结构如下
+
+```bash
+cloudfunctions
+└─────common 公共模块
+        ├─plugin-a // 插件A对应的目录
+        │  └─index.js
+        ├─plugin-b // plugin-b对应的目录
+        │  └─index.js
+        └─uni-config-center
+           ├─index.js // config-center入口文件
+           ├─plugin-a
+           │  ├─config.json  // plugin-a对应的配置文件
+           │  └─other-file.cert  // plugin-a依赖的其他文件
+           └─plugin-b
+              └─config.json  // plugin-b对应的配置文件
+```
+
+使用uni-config-center后的优势
+
+- 配置文件统一管理,分离插件主体和配置信息,更新插件更方便
+- 支持对config.json设置schema,插件使用者在HBuilderX内编写config.json文件时会有更好的提示(后续HBuilderX会提供支持)
+
+# 用法
+
+在要使用uni-config-center的公共模块或云函数内引入uni-config-center依赖,请参考:[使用公共模块](https://uniapp.dcloud.net.cn/uniCloud/cf-common)
+
+```js
+const createConfig = require('uni-config-center')
+
+const uniIdConfig = createConfig({
+    pluginId: 'uni-id', // 插件id
+    defaultConfig: { // 默认配置
+        tokenExpiresIn: 7200,
+        tokenExpiresThreshold: 600,
+    },
+    customMerge: function(defaultConfig, userConfig) { // 自定义默认配置和用户配置的合并规则,不设置的情况侠会对默认配置和用户配置进行深度合并
+        // defaudltConfig 默认配置
+        // userConfig 用户配置
+        return Object.assign(defaultConfig, userConfig)
+    }
+})
+
+
+// 以如下配置为例
+// {
+//   "tokenExpiresIn": 7200,
+//   "passwordErrorLimit": 6,
+//   "bindTokenToDevice": false,
+//   "passwordErrorRetryTime": 3600,
+//   "app-plus": {
+//     "tokenExpiresIn": 2592000
+//   },
+//   "service": {
+//     "sms": {
+//       "codeExpiresIn": 300
+//     }
+//   }
+// }
+
+// 获取配置
+uniIdConfig.config() // 获取全部配置,注意:uni-config-center内不存在对应插件目录时会返回空对象
+uniIdConfig.config('tokenExpiresIn') // 指定键值获取配置,返回:7200
+uniIdConfig.config('service.sms.codeExpiresIn') // 指定键值获取配置,返回:300
+uniIdConfig.config('tokenExpiresThreshold', 600) // 指定键值获取配置,如果不存在则取传入的默认值,返回:600
+
+// 获取文件绝对路径
+uniIdConfig.resolve('custom-token.js') // 获取uni-config-center/uni-id/custom-token.js文件的路径
+
+// 引用文件(require)
+uniIDConfig.requireFile('custom-token.js') // 使用require方式引用uni-config-center/uni-id/custom-token.js文件。文件不存在时返回undefined,文件内有其他错误导致require失败时会抛出错误。
+
+// 判断是否包含某文件
+uniIDConfig.hasFile('custom-token.js') // 配置目录是否包含某文件,true: 文件存在,false: 文件不存在
+```

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
src/uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/index.js


+ 9 - 0
src/uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/package.json

@@ -0,0 +1,9 @@
+{
+  "name": "uni-config-center",
+  "version": "0.0.3",
+  "description": "配置中心",
+  "main": "index.js",
+  "keywords": [],
+  "author": "DCloud",
+  "license": "Apache-2.0"
+}

+ 32 - 0
src/uni_modules/uni-id-common/changelog.md

@@ -0,0 +1,32 @@
+## 1.0.16(2023-04-25)
+- 新增maxTokenLength配置,用于限制数据库用户记录token数组的最大长度
+## 1.0.15(2023-04-06)
+- 修复部分语言国际化出错的Bug
+## 1.0.14(2023-03-07)
+- 修复 admin用户包含其他角色时未包含在token的Bug
+## 1.0.13(2022-07-21)
+- 修复 创建token时未传角色权限信息生成的token不正确的bug
+## 1.0.12(2022-07-15)
+- 提升与旧版本uni-id的兼容性(补充读取配置文件时回退平台app-plus、h5),但是仍推荐使用新平台名进行配置(app、web)
+## 1.0.11(2022-07-14)
+- 修复 部分情况下报`read property 'reduce' of undefined`的错误
+## 1.0.10(2022-07-11)
+- 将token存储在用户表的token字段内,与旧版本uni-id保持一致
+## 1.0.9(2022-07-01)
+- checkToken兼容token内未缓存角色权限的情况,此时将查库获取角色权限
+## 1.0.8(2022-07-01)
+- 修复clientDB默认依赖时部分情况下获取不到uni-id配置的Bug
+## 1.0.7(2022-06-30)
+- 修复config文件不合法时未抛出具体错误的Bug
+## 1.0.6(2022-06-28)
+- 移除插件内的数据表schema
+## 1.0.5(2022-06-27)
+- 修复使用多应用配置时报`Cannot read property 'appId' of undefined`的Bug
+## 1.0.4(2022-06-27)
+- 修复使用自定义token内容功能报错的Bug [详情](https://ask.dcloud.net.cn/question/147945)
+## 1.0.2(2022-06-23)
+- 对齐旧版本uni-id默认配置
+## 1.0.1(2022-06-22)
+- 补充对uni-config-center的依赖
+## 1.0.0(2022-06-21)
+- 提供uni-id token创建、校验、刷新接口,简化旧版uni-id公共模块

+ 84 - 0
src/uni_modules/uni-id-common/package.json

@@ -0,0 +1,84 @@
+{
+	"id": "uni-id-common",
+	"displayName": "uni-id-common",
+	"version": "1.0.16",
+	"description": "包含uni-id token生成、校验、刷新功能的云函数公共模块",
+	"keywords": [
+        "uni-id-common",
+        "uniCloud",
+        "token",
+        "权限"
+    ],
+	"repository": "https://gitcode.net/dcloud/uni-id-common",
+	"engines": {
+		"HBuilderX": "^3.1.0"
+	},
+    "dcloudext": {
+        "sale": {
+			"regular": {
+				"price": "0.00"
+			},
+			"sourcecode": {
+				"price": "0.00"
+			}
+		},
+		"contact": {
+			"qq": ""
+		},
+		"declaration": {
+			"ads": "无",
+			"data": "无",
+			"permissions": "无"
+		},
+        "npmurl": "",
+        "type": "unicloud-template-function"
+	},
+	"uni_modules": {
+		"dependencies": ["uni-config-center"],
+		"encrypt": [],
+		"platforms": {
+			"cloud": {
+				"tcb": "y",
+				"aliyun": "y"
+			},
+			"client": {
+				"Vue": {
+					"vue2": "u",
+					"vue3": "u"
+				},
+				"App": {
+					"app-vue": "u",
+					"app-nvue": "u"
+				},
+				"H5-mobile": {
+					"Safari": "u",
+					"Android Browser": "u",
+					"微信浏览器(Android)": "u",
+					"QQ浏览器(Android)": "u"
+				},
+				"H5-pc": {
+					"Chrome": "u",
+					"IE": "u",
+					"Edge": "u",
+					"Firefox": "u",
+					"Safari": "u"
+				},
+				"小程序": {
+					"微信": "u",
+					"阿里": "u",
+					"百度": "u",
+					"字节跳动": "u",
+					"QQ": "u",
+					"钉钉": "u",
+					"快手": "u",
+					"飞书": "u",
+                    "京东": "u"
+				},
+				"快应用": {
+					"华为": "u",
+					"联盟": "u"
+				}
+			}
+		}
+	}
+}

+ 3 - 0
src/uni_modules/uni-id-common/readme.md

@@ -0,0 +1,3 @@
+# uni-id-common
+
+文档请参考:[uni-id-common](https://uniapp.dcloud.net.cn/uniCloud/uni-id-common.html)

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
src/uni_modules/uni-id-common/uniCloud/cloudfunctions/common/uni-id-common/index.js


+ 16 - 0
src/uni_modules/uni-id-common/uniCloud/cloudfunctions/common/uni-id-common/package.json

@@ -0,0 +1,16 @@
+{
+  "name": "uni-id-common",
+  "version": "1.0.16",
+  "description": "uni-id token生成、校验、刷新",
+  "main": "index.js",
+  "homepage": "https://uniapp.dcloud.io/uniCloud/uni-id-common.html",
+  "repository": {
+    "type": "git",
+    "url": "git+https://gitee.com/dcloud/uni-id-common.git"
+  },
+  "author": "DCloud",
+  "license": "Apache-2.0",
+  "dependencies": {
+    "uni-config-center": "file:../../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center"
+  }
+}

+ 261 - 261
src/uni_modules/uv-subsection/components/uv-subsection/uv-subsection.vue

@@ -1,269 +1,269 @@
 <template>
-	<view 
-		class="uv-subsection"
-		ref="uv-subsection"
-		:class="[`uv-subsection--${mode}`]"
-		:style="[$uv.addStyle(customStyle), wrapperStyle]">
-		<view 
-			class="uv-subsection__bar"
-			ref="uv-subsection__bar"
-			:style="[barStyle]"
-			:class="[
-        mode === 'button' && 'uv-subsection--button__bar',
-        current === 0 && mode === 'subsection' && 'uv-subsection__bar--first',
-        current > 0 && current < list.length - 1 && mode === 'subsection' && 'uv-subsection__bar--center',
-        current === list.length - 1 && mode === 'subsection' && 'uv-subsection__bar--last'
-      ]"
-		></view>
-		<view class="uv-subsection__item"
-			:class="[
-        `uv-subsection__item--${index}`,
-        index < list.length - 1 && 'uv-subsection__item--no-border-right',
-        index === 0 && 'uv-subsection__item--first',
-        index === list.length - 1 && 'uv-subsection__item--last'
-      ]"
-			:ref="`uv-subsection__item--${index}`"
-			:style="[itemStyle(index)]"
-			@tap="clickHandler(index)"
-			v-for="(item, index) in list"
-			:key="index"
-		>
-			<text 
-				class="uv-subsection__item__text"
-				:style="[textStyle(index)]">{{ getText(item) }}
-			</text>
-		</view>
-	</view>
+    <view
+        class="uv-subsection"
+        ref="uv-subsection"
+        :class="[`uv-subsection--${mode}`]"
+        :style="[$uv.addStyle(customStyle), wrapperStyle]"
+    >
+        <view
+            class="uv-subsection__bar"
+            ref="uv-subsection__bar"
+            :style="[barStyle]"
+            :class="[
+                mode === 'button' && 'uv-subsection--button__bar',
+                current === 0 && mode === 'subsection' && 'uv-subsection__bar--first',
+                current > 0 && current < list.length - 1 && mode === 'subsection' && 'uv-subsection__bar--center',
+                current === list.length - 1 && mode === 'subsection' && 'uv-subsection__bar--last',
+            ]"
+        ></view>
+        <view
+            class="uv-subsection__item"
+            :class="[
+                `uv-subsection__item--${index}`,
+                index < list.length - 1 && 'uv-subsection__item--no-border-right',
+                index === 0 && 'uv-subsection__item--first',
+                index === list.length - 1 && 'uv-subsection__item--last',
+            ]"
+            :ref="`uv-subsection__item--${index}`"
+            :style="[itemStyle(index)]"
+            @tap="clickHandler(index)"
+            v-for="(item, index) in list"
+            :key="index"
+        >
+            <text class="uv-subsection__item__text" :style="[textStyle(index)]">{{ getText(item) }}</text>
+        </view>
+    </view>
 </template>
 
 <script>
-	import mpMixin from '@/uni_modules/uv-ui-tools/libs/mixin/mpMixin.js'
-	import mixin from '@/uni_modules/uv-ui-tools/libs/mixin/mixin.js'
-	// #ifdef APP-NVUE
-	const dom = uni.requireNativePlugin("dom");
-	const animation = uni.requireNativePlugin("animation");
-	// #endif
-	import props from "./props.js";
-	/**
-	 * Subsection 分段器
-	 * @description 该分段器一般用于用户从几个选项中选择某一个的场景
-	 * @tutorial https://www.uvui.cn/components/subsection.html
-	 * @property {Array}			list			tab的数据
-	 * @property {String | Number}	current			当前活动的tab的index(默认 0 )
-	 * @property {String}			activeColor		激活时的颜色(默认 '#3c9cff' )
-	 * @property {String}			inactiveColor	未激活时的颜色(默认 '#303133' )
-	 * @property {String}			mode			模式选择,mode=button为按钮形式,mode=subsection时为分段模式(默认 'button' )
-	 * @property {String | Number}	fontSize		字体大小,单位px(默认 12 )
-	 * @property {Boolean}			bold			激活选项的字体是否加粗(默认 true )
-	 * @property {String}			bgColor			组件背景颜色,mode为button时有效(默认 '#eeeeef' )
-	 * @property {Object}			customStyle		定义需要用到的外部样式
-	 * @property {String}	        keyName	        从`list`元素对象中读取的键名(默认 'name' )
-	 *
-	 * @event {Function} change		分段器选项发生改变时触发  回调 index:选项的index索引值,从0开始
-	 * @example <uv-subsection :list="list" :current="curNow" @change="sectionChange"></uv-subsection>
-	 */
-	export default {
-		name: "uv-subsection",
-		mixins: [mpMixin, mixin, props],
-		data() {
-			return {
-				// 组件尺寸
-				itemRect: {
-					width: 0,
-					height: 0,
-				}
-			}
-		},
-		watch: {
-			list: {
-				deep: true,
-				handler(){
-					this.init();
-				}
-			},
-			current: {
-				immediate: true,
-				handler(n) {
-					// #ifdef APP-NVUE
-					// 在安卓nvue上,如果通过translateX进行位移,到最后一个时,会导致右侧无法绘制圆角
-					// 故用animation模块进行位移
-					const ref = this.$refs?.["uv-subsection__bar"]?.ref;
-					// 不存在ref的时候(理解为第一次初始化时,需要渲染dom,进行一定延时再获取ref),这里的100ms是经过测试得出的结果(某些安卓需要延时久一点),勿随意修改
-					this.$uv.sleep(ref ? 0 : 150).then(() => {
-						animation.transition(this.$refs["uv-subsection__bar"].ref, {
-							styles: {
-								transform: `translateX(${ n * this.itemRect.width }px)`,
-								transformOrigin: "center center"
-							},
-							duration: 300,
-						});
-					});
-					// #endif
-				}
-			}
-		},
-		computed: {
-			wrapperStyle() {
-				const style = {};
-				// button模式时,设置背景色
-				if (this.mode === "button") {
-					style.backgroundColor = this.bgColor;
-				}
-				return style;
-			},
-			// 滑块的样式
-			barStyle() {
-				const style = {};
-				style.width = `${this.itemRect.width}px`;
-				style.height = `${this.itemRect.height}px`;
-				// 通过translateX移动滑块,其移动的距离为索引*item的宽度
-				// #ifndef APP-NVUE
-				style.transform = `translateX(${ this.current * this.itemRect.width }px)`;
-				// #endif
-				if (this.mode === "subsection") {
-					// 在subsection模式下,需要动态设置滑块的圆角,因为移动滑块使用的是translateX,无法通过父元素设置overflow: hidden隐藏滑块的直角
-					style.backgroundColor = this.activeColor;
-				}
-				return this.$uv.deepMerge(this.$uv.addStyle(this.customItemStyle),style);
-			},
-			// 分段器item的样式
-			itemStyle(index) {
-				return (index) => {
-					const style = {};
-					if (this.mode === "subsection") {
-						// 设置border的样式
-						style.borderColor = this.activeColor;
-						style.borderWidth = "1px";
-						style.borderStyle = "solid";
-					}
-					return style;
-				};
-			},
-			// 分段器文字颜色
-			textStyle(index) {
-				return (index) => {
-					const style = {};
-					style.fontWeight = this.bold && this.current === index ? "bold" : "normal";
-					style.fontSize = this.$uv.addUnit(this.fontSize);
-					// subsection模式下,激活时默认为白色的文字
-					if (this.mode === "subsection") {
-						style.color = this.current === index ? "#fff" : this.inactiveColor;
-					} else {
-						// button模式下,激活时文字颜色默认为activeColor
-						style.color = this.current === index ? this.activeColor : this.inactiveColor;
-					}
-					return style;
-				};
-			},
-		},
-		mounted() {
-			this.init();
-		},
-		methods: {
-			init() {
-				this.$uv.sleep().then(() => this.getRect());
-			},
-			// 判断展示文本
-			getText(item) {
-				return typeof item === 'object' ? item[this.keyName] : item
-			},
-			// 获取组件的尺寸
-			getRect() {
-				// #ifndef APP-NVUE
-				this.$uvGetRect(".uv-subsection__item--0").then((size) => {
-					this.itemRect = size;
-				});
-				// #endif
+import mpMixin from "@/uni_modules/uv-ui-tools/libs/mixin/mpMixin.js";
+import mixin from "@/uni_modules/uv-ui-tools/libs/mixin/mixin.js";
+// #ifdef APP-NVUE
+const dom = uni.requireNativePlugin("dom");
+const animation = uni.requireNativePlugin("animation");
+// #endif
+import props from "./props.js";
+/**
+ * Subsection 分段器
+ * @description 该分段器一般用于用户从几个选项中选择某一个的场景
+ * @tutorial https://www.uvui.cn/components/subsection.html
+ * @property {Array}			list			tab的数据
+ * @property {String | Number}	current			当前活动的tab的index(默认 0 )
+ * @property {String}			activeColor		激活时的颜色(默认 '#3c9cff' )
+ * @property {String}			inactiveColor	未激活时的颜色(默认 '#303133' )
+ * @property {String}			mode			模式选择,mode=button为按钮形式,mode=subsection时为分段模式(默认 'button' )
+ * @property {String | Number}	fontSize		字体大小,单位px(默认 12 )
+ * @property {Boolean}			bold			激活选项的字体是否加粗(默认 true )
+ * @property {String}			bgColor			组件背景颜色,mode为button时有效(默认 '#eeeeef' )
+ * @property {Object}			customStyle		定义需要用到的外部样式
+ * @property {String}	        keyName	        从`list`元素对象中读取的键名(默认 'name' )
+ *
+ * @event {Function} change		分段器选项发生改变时触发  回调 index:选项的index索引值,从0开始
+ * @example <uv-subsection :list="list" :current="curNow" @change="sectionChange"></uv-subsection>
+ */
+export default {
+    name: "uv-subsection",
+    mixins: [mpMixin, mixin, props],
+    data() {
+        return {
+            // 组件尺寸
+            itemRect: {
+                width: 0,
+                height: 0,
+            },
+        };
+    },
+    watch: {
+        list: {
+            deep: true,
+            handler() {
+                this.init();
+            },
+        },
+        current: {
+            immediate: true,
+            handler(n) {
+                // #ifdef APP-NVUE
+                // 在安卓nvue上,如果通过translateX进行位移,到最后一个时,会导致右侧无法绘制圆角
+                // 故用animation模块进行位移
+                const ref = this.$refs?.["uv-subsection__bar"]?.ref;
+                // 不存在ref的时候(理解为第一次初始化时,需要渲染dom,进行一定延时再获取ref),这里的100ms是经过测试得出的结果(某些安卓需要延时久一点),勿随意修改
+                this.$uv.sleep(ref ? 0 : 150).then(() => {
+                    animation.transition(this.$refs["uv-subsection__bar"].ref, {
+                        styles: {
+                            transform: `translateX(${n * this.itemRect.width}px)`,
+                            transformOrigin: "center center",
+                        },
+                        duration: 300,
+                    });
+                });
+                // #endif
+            },
+        },
+    },
+    computed: {
+        wrapperStyle() {
+            const style = {};
+            // button模式时,设置背景色
+            if (this.mode === "button") {
+                style.backgroundColor = this.bgColor;
+            }
+            return style;
+        },
+        // 滑块的样式
+        barStyle() {
+            const style = {};
+            style.width = `${this.itemRect.width}px`;
+            style.height = `${this.itemRect.height}px`;
+            // 通过translateX移动滑块,其移动的距离为索引*item的宽度
+            // #ifndef APP-NVUE
+            style.transform = `translateX(${this.current * this.itemRect.width}px)`;
+            // #endif
+            if (this.mode === "subsection") {
+                // 在subsection模式下,需要动态设置滑块的圆角,因为移动滑块使用的是translateX,无法通过父元素设置overflow: hidden隐藏滑块的直角
+                style.backgroundColor = this.activeColor;
+            }
+            return style;
+        },
+        // 分段器item的样式
+        itemStyle(index) {
+            return index => {
+                const style = {};
+                if (this.mode === "subsection") {
+                    // 设置border的样式
+                    style.borderColor = this.activeColor;
+                    style.borderWidth = "1px";
+                    style.borderStyle = "solid";
+                }
+                return style;
+            };
+        },
+        // 分段器文字颜色
+        textStyle(index) {
+            return index => {
+                const style = {};
+                style.fontWeight = this.bold && this.current === index ? "bold" : "normal";
+                style.fontSize = this.$uv.addUnit(this.fontSize);
+                // subsection模式下,激活时默认为白色的文字
+                if (this.mode === "subsection") {
+                    style.color = this.current === index ? "#fff" : this.inactiveColor;
+                } else {
+                    // button模式下,激活时文字颜色默认为activeColor
+                    style.color = this.current === index ? this.activeColor : this.inactiveColor;
+                }
+                return style;
+            };
+        },
+    },
+    mounted() {
+        this.init();
+    },
+    methods: {
+        init() {
+            this.$uv.sleep().then(() => this.getRect());
+        },
+        // 判断展示文本
+        getText(item) {
+            return typeof item === "object" ? item[this.keyName] : item;
+        },
+        // 获取组件的尺寸
+        getRect() {
+            // #ifndef APP-NVUE
+            this.$uvGetRect(".uv-subsection__item--0").then(size => {
+                this.itemRect = size;
+            });
+            // #endif
 
-				// #ifdef APP-NVUE
-				const ref = this.$refs["uv-subsection__item--0"][0];
-				ref && dom.getComponentRect(ref, (res) => {
-					this.itemRect = res.size;
-				});
-				// #endif
-			},
-			clickHandler(index) {
-				this.$emit("change", index);
-			}
-		}
-	}
+            // #ifdef APP-NVUE
+            const ref = this.$refs["uv-subsection__item--0"][0];
+            ref &&
+                dom.getComponentRect(ref, res => {
+                    this.itemRect = res.size;
+                });
+            // #endif
+        },
+        clickHandler(index) {
+            this.$emit("change", index);
+        },
+    },
+};
 </script>
 
 <style lang="scss" scoped>
-	@import '@/uni_modules/uv-ui-tools/libs/css/components.scss';
-	.uv-subsection {
-		@include flex;
-		position: relative;
-		overflow: hidden;
-		/* #ifndef APP-NVUE */
-		width: 100%;
-		box-sizing: border-box;
-		/* #endif */
-		&--button {
-			height: 32px;
-			background-color: rgb(238, 238, 239);
-			padding: 3px;
-			border-radius: 3px;
-			align-items: stretch;
-			&__bar {
-				background-color: #ffffff;
-			}
-		}
-		&--subsection {
-			height: 30px;
-		}
-		&__bar {
-			position: absolute;
-			/* #ifndef APP-NVUE */
-			transition-property: transform, color;
-			transition-duration: 0.3s;
-			transition-timing-function: ease-in-out;
-			/* #endif */
-			&--first {
-				border-top-left-radius: 3px;
-				border-bottom-left-radius: 3px;
-				border-top-right-radius: 0px;
-				border-bottom-right-radius: 0px;
-			}
-			&--center {
-				border-top-left-radius: 0px;
-				border-bottom-left-radius: 0px;
-				border-top-right-radius: 0px;
-				border-bottom-right-radius: 0px;
-			}
-			&--last {
-				border-top-left-radius: 0px;
-				border-bottom-left-radius: 0px;
-				border-top-right-radius: 3px;
-				border-bottom-right-radius: 3px;
-			}
-		}
-		&__item {
-			@include flex;
-			flex: 1;
-			justify-content: center;
-			align-items: center;
-			// vue环境下,需要设置相对定位,因为滑块为绝对定位,item需要在滑块的上面
-			position: relative;
-			&--no-border-right {
-				border-right-width: 0 !important;
-			}
-			&--first {
-				border-top-left-radius: 3px;
-				border-bottom-left-radius: 3px;
-			}
-			&--last {
-				border-top-right-radius: 3px;
-				border-bottom-right-radius: 3px;
-			}
-			&__text {
-				font-size: 12px;
-				line-height: 12px;
-				@include flex;
-				align-items: center;
-				transition-property: color;
-				transition-duration: 0.3s;
-			}
-		}
-	}
-</style>
+@import "@/uni_modules/uv-ui-tools/libs/css/components.scss";
+.uv-subsection {
+    @include flex;
+    position: relative;
+    overflow: hidden;
+    /* #ifndef APP-NVUE */
+    width: 100%;
+    box-sizing: border-box;
+    /* #endif */
+    &--button {
+        height: 32px;
+        background-color: rgb(238, 238, 239);
+        padding: 3px;
+        border-radius: 3px;
+        align-items: stretch;
+        &__bar {
+            background-color: #ffffff;
+        }
+    }
+    &--subsection {
+        height: 30px;
+    }
+    &__bar {
+        position: absolute;
+        /* #ifndef APP-NVUE */
+        transition-property: transform, color;
+        transition-duration: 0.3s;
+        transition-timing-function: ease-in-out;
+        /* #endif */
+        &--first {
+            border-top-left-radius: 3px;
+            border-bottom-left-radius: 3px;
+            border-top-right-radius: 0px;
+            border-bottom-right-radius: 0px;
+        }
+        &--center {
+            border-top-left-radius: 0px;
+            border-bottom-left-radius: 0px;
+            border-top-right-radius: 0px;
+            border-bottom-right-radius: 0px;
+        }
+        &--last {
+            border-top-left-radius: 0px;
+            border-bottom-left-radius: 0px;
+            border-top-right-radius: 3px;
+            border-bottom-right-radius: 3px;
+        }
+    }
+    &__item {
+        @include flex;
+        flex: 1;
+        justify-content: center;
+        align-items: center;
+        // vue环境下,需要设置相对定位,因为滑块为绝对定位,item需要在滑块的上面
+        position: relative;
+        &--no-border-right {
+            border-right-width: 0 !important;
+        }
+        &--first {
+            border-top-left-radius: 3px;
+            border-bottom-left-radius: 3px;
+        }
+        &--last {
+            border-top-right-radius: 3px;
+            border-bottom-right-radius: 3px;
+        }
+        &__text {
+            font-size: 12px;
+            line-height: 12px;
+            @include flex;
+            align-items: center;
+            transition-property: color;
+            transition-duration: 0.3s;
+        }
+    }
+}
+</style>

+ 39 - 0
src/utils/form-basic-mixin.js

@@ -0,0 +1,39 @@
+/*
+ * @Author: PoJun
+ * @Date: 2023-09-12 10:55:35
+ * @LastEditors: PoJun
+ * @LastEditTime: 2023-12-26 10:15:01
+ * @Message: 也许可能会用到的一些公用方法
+ */
+import { getDictList } from "@/config/http.js";
+module.exports = {
+    data() {
+        return {};
+    },
+    methods: {
+        // 页面初始化需要的字典数据, 获取后存入vuex页面调用
+        async initDictList(ids) {
+            const ar = ids.split(",");
+            const nAr = ar.filter(item => !this.vuex_dict[item]);
+            if (nAr.length != 0) {
+                const data = await getDictList({ params: { codes: ids } });
+                for (const key in data) {
+                    if (Object.hasOwnProperty.call(data, key)) {
+                        this.$uv.vuex(`vuex_dict.${key}`, data[key]);
+                    }
+                }
+            }
+        },
+        // 字典数据做key=>name的转换
+        dictKeyToName(dict, key) {
+            const data = this.vuex_dict[dict];
+            if (!key || !data) {
+                return key;
+            }
+
+            const ele = data.find(item => item.key == key);
+            return ele?.name;
+        },
+    },
+    computed: {},
+};

+ 4 - 2
src/utils/utils.js

@@ -2,12 +2,14 @@
  * @Author: PoJun
  * @Date: 2023-12-14 15:56:24
  * @LastEditors: PoJun
- * @LastEditTime: 2023-12-14 20:23:43
+ * @LastEditTime: 2023-12-26 10:47:44
  * @Message: Nothing
  */
 export const logoutApp = vm => {
     uni.removeStorageSync("vuex_token");
     uni.removeStorageSync("lifeData");
     vm.$uv.vuex("vuex_userInfo", null);
-    uni.$uv.route({ url: "/pages/index/index", type: "switchTab" });
+    uni.$uv.sleep(100).then(() => {
+        uni.$uv.route({ url: "/pages/mine/index", type: "switchTab" });
+    });
 };

+ 17 - 0
uniCloud-aliyun/cloudfunctions/pushMessage/index.js

@@ -0,0 +1,17 @@
+'use strict';
+const uniPush = uniCloud.getPushManager({
+	appId: "__UNI__82C0680"
+});
+exports.main = async (event) => {
+	let obj = JSON.parse(event.body); //这是重点 解析json字符串
+	const res = await uniPush.sendMessage({
+		"push_clientid": obj.cids, // 设备id,支持多个以数组的形式指定多个设备,如["cid-1","cid-2"],数组长度不大于1000  
+		"title": obj.title, // 标题  
+		"content": obj.content, // 内容  
+		"payload": obj.data, // 数据  
+		"force_notification": true, // 服务端推送 需要加这一句  
+		"request_id": obj.request_id, //请求唯一标识号,10-32位之间;如果request_id重复,会导致消息丢失  
+		"options": obj.options //消息分类,没申请可以不传这个参数  
+	});
+	return res;
+};

+ 7 - 0
uniCloud-aliyun/cloudfunctions/pushMessage/package.json

@@ -0,0 +1,7 @@
+{
+  "name": "pushMessage",
+  "dependencies": {},
+  "extensions": {
+    "uni-cloud-push": {}
+  }
+}

+ 12 - 0
uniCloud-aliyun/database/JQL查询.jql

@@ -0,0 +1,12 @@
+// 本文件用于,使用JQL语法操作项目关联的uniCloud空间的数据库,方便开发调试和远程数据库管理
+// 编写clientDB的js API(也支持常规js语法,比如var),可以对云数据库进行增删改查操作。不支持uniCloud-db组件写法
+// 可以全部运行,也可以选中部分代码运行。点击工具栏上的运行按钮或者按下【F5】键运行代码
+// 如果文档中存在多条JQL语句,只有最后一条语句生效
+// 如果混写了普通js,最后一条语句需是数据库操作语句
+// 此处代码运行不受DB Schema的权限控制,移植代码到实际业务中注意在schema中配好permission
+// 不支持clientDB的action
+// 数据库查询有最大返回条数限制,详见:https://uniapp.dcloud.net.cn/uniCloud/cf-database.html#limit
+// 详细JQL语法,请参考:https://uniapp.dcloud.net.cn/uniCloud/jql.html
+
+// 下面示例查询uni-id-users表的所有数据
+db.collection('uni-id-users').get();

Vissa filer visades inte eftersom för många filer har ändrats