diff --git a/api/oa/customer.js b/api/oa/customer.js new file mode 100644 index 0000000..2c8ae90 --- /dev/null +++ b/api/oa/customer.js @@ -0,0 +1,52 @@ +import request from "@/util/oaRequest" + +// 查询CRM 客户列表 +export function listCustomer(query) { + return request({ + url: '/oa/customer/list', + method: 'get', + params: query + }) +} +// 查询CRM 客户列表 +export function listSeaCustomer(query) { + return request({ + url: '/oa/customer/list-sea', + method: 'get', + params: query + }) +} + +// 查询CRM 客户详细 +export function getCustomer(customerId) { + return request({ + url: '/oa/customer/' + customerId, + method: 'get' + }) +} + +// 新增CRM 客户 +export function addCustomer(data) { + return request({ + url: '/oa/customer', + method: 'post', + data: data + }) +} + +// 修改CRM 客户 +export function updateCustomer(data) { + return request({ + url: '/oa/customer', + method: 'put', + data: data + }) +} + +// 删除CRM 客户 +export function delCustomer(customerId) { + return request({ + url: '/oa/customer/' + customerId, + method: 'delete' + }) +} diff --git a/api/oa/notice.js b/api/oa/notice.js new file mode 100644 index 0000000..ad49743 --- /dev/null +++ b/api/oa/notice.js @@ -0,0 +1,53 @@ +import request from "@/util/oaRequest" + +// 查询公告列表 +export function listNotice(query) { + return request({ + url: '/system/notice/list', + method: 'get', + params: query + }) +} + +//查询固定条数的列表 +export function listNoticeLimit(query) { + return request({ + url: '/system/notice/listLimit', + method: 'get', + params: query + }) +} + +// 查询公告详细 +export function getNotice(noticeId) { + return request({ + url: '/system/notice/' + noticeId, + method: 'get' + }) +} + +// 新增公告 +export function addNotice(data) { + return request({ + url: '/system/notice', + method: 'post', + data: data + }) +} + +// 修改公告 +export function updateNotice(data) { + return request({ + url: '/system/notice', + method: 'put', + data: data + }) +} + +// 删除公告 +export function delNotice(noticeId) { + return request({ + url: '/system/notice/' + noticeId, + method: 'delete' + }) +} diff --git a/components/oa/oa-user/oa-user.vue b/components/oa/oa-user/oa-user.vue new file mode 100644 index 0000000..d945920 --- /dev/null +++ b/components/oa/oa-user/oa-user.vue @@ -0,0 +1,88 @@ + + + + + \ No newline at end of file diff --git a/manifest.json b/manifest.json index 970ebc0..2070123 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "name" : "德讯", "appid" : "__UNI__D705A34", "description" : "", - "versionName" : "fad-im 4.0.0", + "versionName" : "fad-im 5.0.0", "versionCode" : 345, "transformPx" : false, "app-plus" : { @@ -82,9 +82,9 @@ "androidStyle" : "default", "iosStyle" : "common", "android" : { - "hdpi" : "unpackage/res/cover/480_762.9.png", - "xhdpi" : "unpackage/res/cover/720_1242.9.png", - "xxhdpi" : "unpackage/res/cover/1080_1882.9.png" + "hdpi" : "unpackage/res/cover/480___762.9.png", + "xhdpi" : "unpackage/res/cover/720___1242.9.png", + "xxhdpi" : "unpackage/res/cover/1080___1882.9.png" } }, "icons" : { diff --git a/pages.json b/pages.json index df04f9a..6eb0bc5 100644 --- a/pages.json +++ b/pages.json @@ -493,6 +493,62 @@ "navigationBarTitleText" : "项目成本", "navigationStyle": "default" } + }, + { + "path" : "pages/workbench/project/schedule", + "style" : + { + "navigationBarTitleText" : "项目进度", + "navigationStyle": "default" + } + }, + { + "path" : "pages/workbench/project/step", + "style" : + { + "navigationBarTitleText" : "进度明细", + "navigationStyle": "default" + } + }, + { + "path" : "pages/workbench/notice/notice", + "style" : + { + "navigationBarTitleText" : "通知公告", + "navigationStyle": "default" + } + }, + { + "path" : "pages/workbench/article/article", + "style" : + { + "navigationBarTitleText" : "文章详情", + "navigationStyle": "default" + } + }, + { + "path" : "pages/workbench/customer/customer", + "style" : + { + "navigationBarTitleText" : "客户管理", + "navigationStyle": "default" + } + }, + { + "path" : "pages/workbench/profit/project", + "style" : + { + "navigationBarTitleText" : "项目明细", + "navigationStyle": "default" + } + }, + { + "path" : "pages/workbench/profit/cost", + "style" : + { + "navigationBarTitleText" : "项目明细详情", + "navigationStyle": "default" + } } ], "tabBar": { diff --git a/pages/workbench/article/article.vue b/pages/workbench/article/article.vue new file mode 100644 index 0000000..8183fd0 --- /dev/null +++ b/pages/workbench/article/article.vue @@ -0,0 +1,22 @@ + + + + + diff --git a/pages/workbench/customer/customer.vue b/pages/workbench/customer/customer.vue new file mode 100644 index 0000000..acdd53d --- /dev/null +++ b/pages/workbench/customer/customer.vue @@ -0,0 +1,736 @@ + + + + + \ No newline at end of file diff --git a/pages/workbench/index/index.vue b/pages/workbench/index/index.vue index 5e0c722..9c54c21 100644 --- a/pages/workbench/index/index.vue +++ b/pages/workbench/index/index.vue @@ -85,17 +85,30 @@ export default { category: '车间管理' }, { - text: '项目中心', + text: '项目管理', icon: '/static/images/project.png', url: '/pages/workbench/project/project', - category: "信息中心" + access: ['vice, admin', 'doctor', 'ceo', '13'], + category: "项目中心" }, + { + text: '项目进度', + icon: '/static/images/progress.png', + url: '/pages/workbench/project/schedule', + category: '项目中心' + }, { text: '问题反馈', icon: '/static/images/wenti.png', url: '/pages/workbench/feedback/feedback', category: "信息中心" }, + { + text: '客户管理', + icon: '/static/images/customer.png', + url: '/pages/workbench/customer/customer', + category: '信息中心' + }, { text: '库存盘点', icon: '/static/images/stock.png', @@ -109,6 +122,13 @@ export default { category: '财务中心', access: ['vice', 'baomi', 'ceo'] // 需要特定权限才能访问 }, + { + text: '项目明细', + icon: '/static/images/profitpro.png', + url: '/pages/workbench/profit/project', + category: '财务中心', + // access: ['vice', 'baomi', 'ceo'] // 需要特定权限才能访问 + }, { text: '项目成本', icon: '/static/images/cost.png', diff --git a/pages/workbench/notice/notice.vue b/pages/workbench/notice/notice.vue new file mode 100644 index 0000000..8183fd0 --- /dev/null +++ b/pages/workbench/notice/notice.vue @@ -0,0 +1,22 @@ + + + + + diff --git a/pages/workbench/profit/cost.vue b/pages/workbench/profit/cost.vue new file mode 100644 index 0000000..725385d --- /dev/null +++ b/pages/workbench/profit/cost.vue @@ -0,0 +1,849 @@ + + + + + \ No newline at end of file diff --git a/pages/workbench/profit/project.vue b/pages/workbench/profit/project.vue new file mode 100644 index 0000000..b0823b4 --- /dev/null +++ b/pages/workbench/profit/project.vue @@ -0,0 +1,446 @@ + + + + + \ No newline at end of file diff --git a/pages/workbench/project/schedule.vue b/pages/workbench/project/schedule.vue new file mode 100644 index 0000000..8183fd0 --- /dev/null +++ b/pages/workbench/project/schedule.vue @@ -0,0 +1,22 @@ + + + + + diff --git a/pages/workbench/project/step.vue b/pages/workbench/project/step.vue new file mode 100644 index 0000000..8183fd0 --- /dev/null +++ b/pages/workbench/project/step.vue @@ -0,0 +1,22 @@ + + + + + diff --git a/static/images/customer.png b/static/images/customer.png new file mode 100644 index 0000000..d693b7c Binary files /dev/null and b/static/images/customer.png differ diff --git a/static/images/profitpro.png b/static/images/profitpro.png new file mode 100644 index 0000000..ee125b5 Binary files /dev/null and b/static/images/profitpro.png differ diff --git a/static/images/progress.png b/static/images/progress.png new file mode 100644 index 0000000..d401e5c Binary files /dev/null and b/static/images/progress.png differ diff --git a/store/index.js b/store/index.js index b87355c..c967061 100644 --- a/store/index.js +++ b/store/index.js @@ -4,6 +4,7 @@ import user from "./modules/user"; import contact from "./modules/contact"; import conversation from "./modules/conversation"; import message from "./modules/message"; +import cache from './modules/cache.js' import getters from "./getters"; Vue.use(Vuex); @@ -14,6 +15,7 @@ const store = new Vuex.Store({ contact, conversation, message, + cache }, getters, }); diff --git a/store/modules/cache.js b/store/modules/cache.js new file mode 100644 index 0000000..7114fe4 --- /dev/null +++ b/store/modules/cache.js @@ -0,0 +1,78 @@ +import { listProject } from '@/api/oa/project.js' +import { listUser } from '@/api/oa/user.js' +import { getDicts } from '@/api/oa/dict.js' + +const state = { + projectList: [], + userList: [], + projectMap: {}, + userMap: {}, // 修正:添加逗号 + dicts: {} +} + +const mutations = { + SET_DICT(state, data) { + state.dicts[data.type] = data.value + }, + SET_USER(state, list) { + state.userList = list; + let o = {}; + for (let i = 0; i < list.length; i++) { + o[list[i].userId] = list[i]; + } + state.userMap = o; + }, + SET_PROJECT(state, list) { + state.projectList = list; + let o = {}; + for (let i = 0; i < list.length; i++) { + o[list[i].projectId] = list[i]; + } + state.projectMap = o; + } +} + +const actions = { + setDict({ commit, state }, dictType) { + // 查找state中是否已经有dictType,如果已存在则不处理,否则请求数据并添加 + if (!state.dicts[dictType]) { + // 调用获取字典的接口,传入字典类型 + getDicts(dictType).then(res => { + // 假设接口返回的数据结构为 { data: [...] },根据实际接口调整 + commit('SET_DICT', { + type: dictType, + value: res.data + }) + }).catch(error => { + console.error('获取字典数据失败:', error) + }) + } + }, + setUser({ commit, state }, { refresh }) { + if (!refresh && state.userList.length > 0) { + return; + } + listUser({ pageSize: 999, pageNum: 1 }).then(res => { + commit('SET_USER', res.rows) + }).catch(error => { + console.error('获取用户列表失败:', error) + }) + }, + setProject({ commit, state }, { refresh }) { + if (!refresh && state.projectList.length > 0) { + return; + } + // 与setUser逻辑类似,调用项目列表接口并提交mutation + listProject({ pageSize: 999, pageNum: 1 }).then(res => { + commit('SET_PROJECT', res.rows) + }).catch(error => { + console.error('获取项目列表失败:', error) + }) + } +} + +export default { + state, + mutations, + actions +} \ No newline at end of file diff --git a/uni_modules/uni-badge/changelog.md b/uni_modules/uni-badge/changelog.md new file mode 100644 index 0000000..e352c60 --- /dev/null +++ b/uni_modules/uni-badge/changelog.md @@ -0,0 +1,33 @@ +## 1.2.2(2023-01-28) +- 修复 运行/打包 控制台警告问题 +## 1.2.1(2022-09-05) +- 修复 当 text 超过 max-num 时,badge 的宽度计算是根据 text 的长度计算,更改为 css 计算实际展示宽度,详见:[https://ask.dcloud.net.cn/question/150473](https://ask.dcloud.net.cn/question/150473) +## 1.2.0(2021-11-19) +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-badge](https://uniapp.dcloud.io/component/uniui/uni-badge) +## 1.1.7(2021-11-08) +- 优化 升级ui +- 修改 size 属性默认值调整为 small +- 修改 type 属性,默认值调整为 error,info 替换 default +## 1.1.6(2021-09-22) +- 修复 在字节小程序上样式不生效的 bug +## 1.1.5(2021-07-30) +- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) +## 1.1.4(2021-07-29) +- 修复 去掉 nvue 不支持css 的 align-self 属性,nvue 下不暂支持 absolute 属性 +## 1.1.3(2021-06-24) +- 优化 示例项目 +## 1.1.1(2021-05-12) +- 新增 组件示例地址 +## 1.1.0(2021-05-12) +- 新增 uni-badge 的 absolute 属性,支持定位 +- 新增 uni-badge 的 offset 属性,支持定位偏移 +- 新增 uni-badge 的 is-dot 属性,支持仅显示有一个小点 +- 新增 uni-badge 的 max-num 属性,支持自定义封顶的数字值,超过 99 显示99+ +- 优化 uni-badge 属性 custom-style, 支持以对象形式自定义样式 +## 1.0.7(2021-05-07) +- 修复 uni-badge 在 App 端,数字小于10时不是圆形的bug +- 修复 uni-badge 在父元素不是 flex 布局时,宽度缩小的bug +- 新增 uni-badge 属性 custom-style, 支持自定义样式 +## 1.0.6(2021-02-04) +- 调整为uni_modules目录规范 diff --git a/uni_modules/uni-badge/components/uni-badge/uni-badge.vue b/uni_modules/uni-badge/components/uni-badge/uni-badge.vue new file mode 100644 index 0000000..956354b --- /dev/null +++ b/uni_modules/uni-badge/components/uni-badge/uni-badge.vue @@ -0,0 +1,268 @@ + + + + + diff --git a/uni_modules/uni-badge/package.json b/uni_modules/uni-badge/package.json new file mode 100644 index 0000000..b0bac93 --- /dev/null +++ b/uni_modules/uni-badge/package.json @@ -0,0 +1,85 @@ +{ + "id": "uni-badge", + "displayName": "uni-badge 数字角标", + "version": "1.2.2", + "description": "数字角标(徽章)组件,在元素周围展示消息提醒,一般用于列表、九宫格、按钮等地方。", + "keywords": [ + "", + "badge", + "uni-ui", + "uniui", + "数字角标", + "徽章" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, +"dcloudext": { + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui", + "type": "component-vue" + }, + "uni_modules": { + "dependencies": ["uni-scss"], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "y", + "联盟": "y" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} \ No newline at end of file diff --git a/uni_modules/uni-badge/readme.md b/uni_modules/uni-badge/readme.md new file mode 100644 index 0000000..bdf175d --- /dev/null +++ b/uni_modules/uni-badge/readme.md @@ -0,0 +1,10 @@ +## Badge 数字角标 +> **组件名:uni-badge** +> 代码块: `uBadge` + +数字角标一般和其它控件(列表、9宫格等)配合使用,用于进行数量提示,默认为实心灰色背景, + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-badge) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 + + diff --git a/uni_modules/uni-list/changelog.md b/uni_modules/uni-list/changelog.md new file mode 100644 index 0000000..c5eb981 --- /dev/null +++ b/uni_modules/uni-list/changelog.md @@ -0,0 +1,52 @@ +## 1.2.17(2025-08-20) +- 修复 右侧箭头类型错误的问题 +## 1.2.16(2025-04-14) +- 修复 可触发点击反馈的 uni-list-item 没有hover效果的问题 +## 1.2.15(2025-01-08) +- 修复 示例中过期图片地址 +## 1.2.14(2023-04-14) +- 优化 uni-list-chat 具名插槽`header` 非app端套一层元素,方便使用时通过外层元素定位实现样式修改 +## 1.2.13(2023-03-03) +- uni-list-chat 新增 支持具名插槽`header` +## 1.2.12(2023-02-01) +- 新增 列表图标新增 customPrefix 属性 ,用法 [详见](https://uniapp.dcloud.net.cn/component/uniui/uni-icons.html#icons-props) +## 1.2.11(2023-01-31) +- 修复 无反馈效果呈现的bug +## 1.2.9(2022-11-22) +- 修复 uni-list-chat 在vue3下跳转报错的bug +## 1.2.8(2022-11-21) +- 修复 uni-list-chat avatar属性 值为本地路径时错误的问题 +## 1.2.7(2022-11-21) +- 修复 uni-list-chat avatar属性 在腾讯云版uniCloud下错误的问题 +## 1.2.6(2022-11-18) +- 修复 uni-list-chat note属性 支持:“草稿”字样功能 文本少1位的问题 +## 1.2.5(2022-11-15) +- 修复 uni-list-item 的 customStyle 属性 padding值在 H5端 无效的bug +## 1.2.4(2022-11-15) +- 修复 uni-list-item 的 customStyle 属性 padding值在nvue(vue2)下无效的bug +## 1.2.3(2022-11-14) +- uni-list-chat 新增 avatar 支持 fileId +## 1.2.2(2022-11-11) +- uni-list 新增属性 render-reverse 详情参考:[https://uniapp.dcloud.net.cn/component/list.html](https://uniapp.dcloud.net.cn/component/list.html) +- uni-list-chat note属性 支持:“草稿”字样 加红显示 详情参考uni-im:[https://ext.dcloud.net.cn/plugin?name=uni-im](https://ext.dcloud.net.cn/plugin?name=uni-im) +- uni-list-item 新增属性 customStyle 支持设置padding、backgroundColor +## 1.2.1(2022-03-30) +- 删除无用文件 +## 1.2.0(2021-11-23) +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-list](https://uniapp.dcloud.io/component/uniui/uni-list) +## 1.1.3(2021-08-30) +- 修复 在vue3中to属性在发行应用的时候报错的bug +## 1.1.2(2021-07-30) +- 优化 vue3下事件警告的问题 +## 1.1.1(2021-07-21) +- 修复 与其他组件嵌套使用时,点击失效的Bug +## 1.1.0(2021-07-13) +- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) +## 1.0.17(2021-05-12) +- 新增 组件示例地址 +## 1.0.16(2021-02-05) +- 优化 组件引用关系,通过uni_modules引用组件 +## 1.0.15(2021-02-05) +- 调整为uni_modules目录规范 +- 修复 uni-list-chat 角标显示不正常的问题 diff --git a/uni_modules/uni-list/components/uni-list-ad/uni-list-ad.vue b/uni_modules/uni-list/components/uni-list-ad/uni-list-ad.vue new file mode 100644 index 0000000..b9349c2 --- /dev/null +++ b/uni_modules/uni-list/components/uni-list-ad/uni-list-ad.vue @@ -0,0 +1,107 @@ + + + + + diff --git a/uni_modules/uni-list/components/uni-list-chat/uni-list-chat.scss b/uni_modules/uni-list/components/uni-list-chat/uni-list-chat.scss new file mode 100644 index 0000000..311f8d9 --- /dev/null +++ b/uni_modules/uni-list/components/uni-list-chat/uni-list-chat.scss @@ -0,0 +1,58 @@ +/** + * 这里是 uni-list 组件内置的常用样式变量 + * 如果需要覆盖样式,这里提供了基本的组件样式变量,您可以尝试修改这里的变量,去完成样式替换,而不用去修改源码 + * + */ + +// 背景色 +$background-color : #fff; +// 分割线颜色 +$divide-line-color : #e5e5e5; + +// 默认头像大小,如需要修改此值,注意同步修改 js 中的值 const avatarWidth = xx ,目前只支持方形头像 +// nvue 页面不支持修改头像大小 +$avatar-width : 45px ; + +// 头像边框 +$avatar-border-radius: 5px; +$avatar-border-color: #eee; +$avatar-border-width: 1px; + +// 标题文字样式 +$title-size : 16px; +$title-color : #3b4144; +$title-weight : normal; + +// 描述文字样式 +$note-size : 12px; +$note-color : #999; +$note-weight : normal; + +// 右侧额外内容默认样式 +$right-text-size : 12px; +$right-text-color : #999; +$right-text-weight : normal; + +// 角标样式 +// nvue 页面不支持修改圆点位置以及大小 +// 角标在左侧时,角标的位置,默认为 0 ,负数左/下移动,正数右/上移动 +$badge-left: 0px; +$badge-top: 0px; + +// 显示圆点时,圆点大小 +$dot-width: 10px; +$dot-height: 10px; + +// 显示角标时,角标大小和字体大小 +$badge-size : 18px; +$badge-font : 12px; +// 显示角标时,角标前景色 +$badge-color : #fff; +// 显示角标时,角标背景色 +$badge-background-color : #ff5a5f; +// 显示角标时,角标左右间距 +$badge-space : 6px; + +// 状态样式 +// 选中颜色 +$hover : #f5f5f5; diff --git a/uni_modules/uni-list/components/uni-list-chat/uni-list-chat.vue b/uni_modules/uni-list/components/uni-list-chat/uni-list-chat.vue new file mode 100644 index 0000000..d49fd7c --- /dev/null +++ b/uni_modules/uni-list/components/uni-list-chat/uni-list-chat.vue @@ -0,0 +1,593 @@ + + + + + diff --git a/uni_modules/uni-list/components/uni-list-item/uni-list-item.vue b/uni_modules/uni-list/components/uni-list-item/uni-list-item.vue new file mode 100644 index 0000000..57b188d --- /dev/null +++ b/uni_modules/uni-list/components/uni-list-item/uni-list-item.vue @@ -0,0 +1,542 @@ + + + + + diff --git a/uni_modules/uni-list/components/uni-list/uni-list.vue b/uni_modules/uni-list/components/uni-list/uni-list.vue new file mode 100644 index 0000000..6ef5972 --- /dev/null +++ b/uni_modules/uni-list/components/uni-list/uni-list.vue @@ -0,0 +1,123 @@ + + + + diff --git a/uni_modules/uni-list/components/uni-list/uni-refresh.vue b/uni_modules/uni-list/components/uni-list/uni-refresh.vue new file mode 100644 index 0000000..3b4c5a2 --- /dev/null +++ b/uni_modules/uni-list/components/uni-list/uni-refresh.vue @@ -0,0 +1,65 @@ + + + + + diff --git a/uni_modules/uni-list/components/uni-list/uni-refresh.wxs b/uni_modules/uni-list/components/uni-list/uni-refresh.wxs new file mode 100644 index 0000000..818a6b7 --- /dev/null +++ b/uni_modules/uni-list/components/uni-list/uni-refresh.wxs @@ -0,0 +1,87 @@ +var pullDown = { + threshold: 95, + maxHeight: 200, + callRefresh: 'onrefresh', + callPullingDown: 'onpullingdown', + refreshSelector: '.uni-refresh' +}; + +function ready(newValue, oldValue, ownerInstance, instance) { + var state = instance.getState() + state.canPullDown = newValue; + // console.log(newValue); +} + +function touchStart(e, instance) { + var state = instance.getState(); + state.refreshInstance = instance.selectComponent(pullDown.refreshSelector); + state.canPullDown = (state.refreshInstance != null && state.refreshInstance != undefined); + if (!state.canPullDown) { + return + } + + // console.log("touchStart"); + + state.height = 0; + state.touchStartY = e.touches[0].pageY || e.changedTouches[0].pageY; + state.refreshInstance.setStyle({ + 'height': 0 + }); + state.refreshInstance.callMethod("onchange", true); +} + +function touchMove(e, ownerInstance) { + var instance = e.instance; + var state = instance.getState(); + if (!state.canPullDown) { + return + } + + var oldHeight = state.height; + var endY = e.touches[0].pageY || e.changedTouches[0].pageY; + var height = endY - state.touchStartY; + if (height > pullDown.maxHeight) { + return; + } + + var refreshInstance = state.refreshInstance; + refreshInstance.setStyle({ + 'height': height + 'px' + }); + + height = height < pullDown.maxHeight ? height : pullDown.maxHeight; + state.height = height; + refreshInstance.callMethod(pullDown.callPullingDown, { + height: height + }); +} + +function touchEnd(e, ownerInstance) { + var state = e.instance.getState(); + if (!state.canPullDown) { + return + } + + state.refreshInstance.callMethod("onchange", false); + + var refreshInstance = state.refreshInstance; + if (state.height > pullDown.threshold) { + refreshInstance.callMethod(pullDown.callRefresh); + return; + } + + refreshInstance.setStyle({ + 'height': 0 + }); +} + +function propObserver(newValue, oldValue, instance) { + pullDown = newValue; +} + +module.exports = { + touchmove: touchMove, + touchstart: touchStart, + touchend: touchEnd, + propObserver: propObserver +} diff --git a/uni_modules/uni-list/package.json b/uni_modules/uni-list/package.json new file mode 100644 index 0000000..4512c76 --- /dev/null +++ b/uni_modules/uni-list/package.json @@ -0,0 +1,108 @@ +{ + "id": "uni-list", + "displayName": "uni-list 列表", + "version": "1.2.17", + "description": "List 组件 ,帮助使用者快速构建列表。", + "keywords": [ + "", + "uni-ui", + "uniui", + "列表", + "", + "list" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "", + "uni-app": "^4.08", + "uni-app-x": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui", + "type": "component-vue", + "darkmode": "x", + "i18n": "x", + "widescreen": "x" + }, + "uni_modules": { + "dependencies": [ + "uni-badge", + "uni-icons" + ], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "x", + "aliyun": "x", + "alipay": "x" + }, + "client": { + "uni-app": { + "vue": { + "vue2": "√", + "vue3": "√" + }, + "web": { + "safari": "√", + "chrome": "√" + }, + "app": { + "vue": "√", + "nvue": "-", + "android": "√", + "ios": "√", + "harmony": "√" + }, + "mp": { + "weixin": "√", + "alipay": "√", + "toutiao": "√", + "baidu": "√", + "kuaishou": "-", + "jd": "-", + "harmony": "-", + "qq": "√", + "lark": "-" + }, + "quickapp": { + "huawei": "√", + "union": "√" + } + }, + "uni-app-x": { + "web": { + "safari": "-", + "chrome": "-" + }, + "app": { + "android": "-", + "ios": "-", + "harmony": "-" + }, + "mp": { + "weixin": "-" + } + } + } + } + } +} \ No newline at end of file diff --git a/uni_modules/uni-list/readme.md b/uni_modules/uni-list/readme.md new file mode 100644 index 0000000..ae499e6 --- /dev/null +++ b/uni_modules/uni-list/readme.md @@ -0,0 +1,46 @@ +## List 列表 +> **组件名:uni-list** +> 代码块: `uList`、`uListItem` +> 关联组件:`uni-list-item`、`uni-badge`、`uni-icons`、`uni-list-chat`、`uni-list-ad` + + +List 列表组件,包含基本列表样式、可扩展插槽机制、长列表性能优化、多端兼容。 + +在vue页面里,它默认使用页面级滚动。在app-nvue页面里,它默认使用原生list组件滚动。这样的长列表,在滚动出屏幕外后,系统会回收不可见区域的渲染内存资源,不会造成滚动越长手机越卡的问题。 + +uni-list组件是父容器,里面的核心是uni-list-item子组件,它代表列表中的一个可重复行,子组件可以无限循环。 + +uni-list-item有很多风格,uni-list-item组件通过内置的属性,满足一些常用的场景。当内置属性不满足需求时,可以通过扩展插槽来自定义列表内容。 + +内置属性可以覆盖的场景包括:导航列表、设置列表、小图标列表、通信录列表、聊天记录列表。 + +涉及很多大图或丰富内容的列表,比如类今日头条的新闻列表、类淘宝的电商列表,需要通过扩展插槽实现。 + +下文均有样例给出。 + +uni-list不包含下拉刷新和上拉翻页。上拉翻页另见组件:[uni-load-more](https://ext.dcloud.net.cn/plugin?id=29) + +### [点击查看详细文档](https://uniapp.dcloud.io/component/uniui/uni-indexed-list) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 + + + +## 基于uni-list扩展的页面模板 + +通过扩展插槽,可实现多种常见样式的列表 + +**新闻列表类** + +1. 云端一体混合布局:[https://ext.dcloud.net.cn/plugin?id=2546](https://ext.dcloud.net.cn/plugin?id=2546) +2. 云端一体垂直布局,大图模式:[https://ext.dcloud.net.cn/plugin?id=2583](https://ext.dcloud.net.cn/plugin?id=2583) +3. 云端一体垂直布局,多行图文混排:[https://ext.dcloud.net.cn/plugin?id=2584](https://ext.dcloud.net.cn/plugin?id=2584) +4. 云端一体垂直布局,多图模式:[https://ext.dcloud.net.cn/plugin?id=2585](https://ext.dcloud.net.cn/plugin?id=2585) +5. 云端一体水平布局,左图右文:[https://ext.dcloud.net.cn/plugin?id=2586](https://ext.dcloud.net.cn/plugin?id=2586) +6. 云端一体水平布局,左文右图:[https://ext.dcloud.net.cn/plugin?id=2587](https://ext.dcloud.net.cn/plugin?id=2587) +7. 云端一体垂直布局,无图模式,主标题+副标题:[https://ext.dcloud.net.cn/plugin?id=2588](https://ext.dcloud.net.cn/plugin?id=2588) + +**商品列表类** + +1. 云端一体列表/宫格视图互切:[https://ext.dcloud.net.cn/plugin?id=2651](https://ext.dcloud.net.cn/plugin?id=2651) +2. 云端一体列表(宫格模式):[https://ext.dcloud.net.cn/plugin?id=2671](https://ext.dcloud.net.cn/plugin?id=2671) +3. 云端一体列表(列表模式):[https://ext.dcloud.net.cn/plugin?id=2672](https://ext.dcloud.net.cn/plugin?id=2672) \ No newline at end of file diff --git a/unpackage/res/cover/1080___1882.9.png b/unpackage/res/cover/1080___1882.9.png new file mode 100644 index 0000000..32be4b0 Binary files /dev/null and b/unpackage/res/cover/1080___1882.9.png differ diff --git a/unpackage/res/cover/480___762.9.png b/unpackage/res/cover/480___762.9.png new file mode 100644 index 0000000..429222f Binary files /dev/null and b/unpackage/res/cover/480___762.9.png differ diff --git a/unpackage/res/cover/720_1242.9.png b/unpackage/res/cover/720_1242.9.png index 2157c9d..6b25b64 100644 Binary files a/unpackage/res/cover/720_1242.9.png and b/unpackage/res/cover/720_1242.9.png differ diff --git a/unpackage/res/cover/720___1242.9.png b/unpackage/res/cover/720___1242.9.png new file mode 100644 index 0000000..f31bf6a Binary files /dev/null and b/unpackage/res/cover/720___1242.9.png differ diff --git a/util/oaRequest.js b/util/oaRequest.js index c920a17..eb6537a 100644 --- a/util/oaRequest.js +++ b/util/oaRequest.js @@ -4,7 +4,7 @@ import { toast, tansParams } from './common' import { getSMSCodeFromOa, loginOaByPhone } from '../api/oa/login' let timeout = 10000 -const baseUrl = 'http://110.41.139.73:8080' +const baseUrl = 'http://49.232.154.205:18081' // const baseUrl = 'http://localhost:8080' // 显示loading提示 diff --git a/util/update.js b/util/update.js index 8a403c5..e33d6ae 100644 --- a/util/update.js +++ b/util/update.js @@ -89,7 +89,8 @@ function checkUpdate(forceCheck = false) { cancelText: '取消', success: (res) => { if (res.confirm) { - const downloadUrl = `http://49.232.154.205:10900/fadapp-update/fad${remoteVersion}.apk`; + const v = remoteVersion.split(' ')[1] + const downloadUrl = `http://49.232.154.205:10900/fadapp-update/fad${v}.apk`; // #ifdef APP-PLUS plus.runtime.openURL(downloadUrl); // #endif diff --git a/version.md b/version.md index ec3ea53..6dce4c6 100644 --- a/version.md +++ b/version.md @@ -43,4 +43,13 @@ + 修复用户管理的权限问题 ## 4.8.2 -+ 增加项目成本页面 \ No newline at end of file ++ 增加项目成本页面 + +## 4.8.3 ++ 修改后端地址 + +## 4.8.5 ++ 完善更新逻辑 + +## 5.0.0 ++ 修改页面启动图 \ No newline at end of file