diff --git a/pages.json b/pages.json index eb7384b4dab511b06006e371f773f594699d336a..3e7a9ed0c40f9d0c28c082bed15853598b4e9810 100644 --- a/pages.json +++ b/pages.json @@ -67,7 +67,18 @@ "navigationStyle": "custom" } }, { - "path": "pages/ucenter/uni-feedback/uni-feedback", + "path": "uni_modules/opendb-feedback/pages/opendb-feedback/list", + "style": { + "navigationBarTitleText": "反馈列表", + "enablePullDownRefresh":true + } + }, { + "path": "uni_modules/opendb-feedback/pages/opendb-feedback/add", + "style": { + "navigationBarTitleText": "问题反馈" + } + }, { + "path": "uni_modules/opendb-feedback/pages/opendb-feedback/detail", "style": { "navigationBarTitleText": "问题反馈" } diff --git a/pages/ucenter/ucenter.vue b/pages/ucenter/ucenter.vue index 828417b918ddf2741bc17da381538910d5f9ab16..68b92669c8f5f26fb746d06b2f7abb23e4130f14 100644 --- a/pages/ucenter/ucenter.vue +++ b/pages/ucenter/ucenter.vue @@ -81,7 +81,7 @@ ], [{ title: '反馈', - to: '/pages/ucenter/uni-feedback/uni-feedback' + to: '/uni_modules/opendb-feedback/pages/opendb-feedback/list' // /pages/ucenter/uni-feedback/uni-feedback uni_modules/opendb-feedback/pages/opendb-feedback/list }, { title: '设置', to: '/pages/ucenter/settings/settings' diff --git a/pages/ucenter/uni-feedback/uni-feedback.vue b/pages/ucenter/uni-feedback/uni-feedback.vue deleted file mode 100644 index 7eacbaadfbcc67ccc548bcbb4fccf39fb20c755c..0000000000000000000000000000000000000000 --- a/pages/ucenter/uni-feedback/uni-feedback.vue +++ /dev/null @@ -1,372 +0,0 @@ - - - - - diff --git a/uniCloud-aliyun/database/opendb-feedback.schema.json b/uniCloud-aliyun/database/opendb-feedback.schema.json deleted file mode 100644 index c3d23928d8861523373f6425a709e023715d244b..0000000000000000000000000000000000000000 --- a/uniCloud-aliyun/database/opendb-feedback.schema.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "bsonType": "object", - "permission": { - "read": "doc.uid == auth.uid && doc.article_status == 0 || doc.article_status == 1", - "create": true, - "update": "doc.uid == auth.uid", - "delete": "doc.uid == auth.uid" - }, - "properties": { - "_id": { - "description": "ID,系统自动生成" - }, - "user_id": { - "bsonType": "string", - "description": "留言反馈用户ID\/回复留言用户ID,参考uni-id-users表", - "foreignKey": "uni-id-users._id" - }, - "create_date": { - "bsonType": "timestamp", - "description": "留言时间\/回复留言时间" - }, - "content": { - "bsonType": "string", - "description": "留言内容\/回复内容", - "trim": "right" - }, - "imgs": { - "bsonType": "array", - "description": "图片列表" - }, - "is_reply": { - "bsonType": "bool", - "description": "是否是回复类型" - }, - "feedback_id": { - "bsonType": "string", - "description": "被回复留言ID" - }, - "contact": { - "bsonType": "string", - "description": "联系人", - "trim": "both" - }, - "mobile": { - "bsonType": "string", - "description": "联系电话", - "trim": "both" - }, - "reply_count": { - "bsonType": "int", - "description": "被回复条数" - } - } -} diff --git a/uni_modules/opendb-feedback/changelog.md b/uni_modules/opendb-feedback/changelog.md new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/uni_modules/opendb-feedback/components/feedback-imgs.vue b/uni_modules/opendb-feedback/components/feedback-imgs.vue new file mode 100644 index 0000000000000000000000000000000000000000..7254c048c987438804392c062509a417640dbb27 --- /dev/null +++ b/uni_modules/opendb-feedback/components/feedback-imgs.vue @@ -0,0 +1,255 @@ + + + + + diff --git a/uni_modules/opendb-feedback/js_sdk/validator/opendb-feedback.js b/uni_modules/opendb-feedback/js_sdk/validator/opendb-feedback.js new file mode 100644 index 0000000000000000000000000000000000000000..3918e36d1fb1761beb95459da72dbd2ba192d082 --- /dev/null +++ b/uni_modules/opendb-feedback/js_sdk/validator/opendb-feedback.js @@ -0,0 +1,74 @@ + +// 表单校验规则由 schema2code 生成,不建议直接修改校验规则,而建议通过 schema2code 生成, 详情: https://uniapp.dcloud.net.cn/uniCloud/schema + + + +const validator = { + "user_id": { + "rules": [ + { + "format": "string" + } + ] + }, + "create_date": { + "rules": [ + { + "format": "timestamp" + } + ] + }, + "content": { + "rules": [ + { + "format": "string" + } + ] + }, + "imgs": { + "rules": [ + { + "format": "array" + } + ] + }, + "is_reply": { + "rules": [ + { + "format": "bool" + } + ] + }, + "feedback_id": { + "rules": [ + { + "format": "string" + } + ] + }, + "contact": { + "rules": [ + { + "format": "string" + } + ] + }, + "mobile": { + "rules": [ + { + "format": "string" + } + ] + }, + "reply_count": { + "rules": [ + { + "format": "int" + } + ] + } +} + +const enumConverter = {} + +export { validator, enumConverter } diff --git a/uni_modules/opendb-feedback/package.json b/uni_modules/opendb-feedback/package.json new file mode 100644 index 0000000000000000000000000000000000000000..48810656ae9f92a2e4296454cf265813c53a1f15 --- /dev/null +++ b/uni_modules/opendb-feedback/package.json @@ -0,0 +1,91 @@ +{ + "id": "opendb-feedback", + "displayName": "opendb-feedback", + "version": "1.0.0", + "description": "", + "keywords": [ + "opendb-feedback" + ], + "repository": "", + "engines": { + "HBuilderX": "^3.1.0" + }, + "dcloudext": { + "category": [ + "uniCloud", + "Admin插件" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "" + }, + "uni_modules": { + "dependencies": [ + "uni-dateformat", + "uni-badge", + "uni-icons", + "uni-link", + "uni-load-more", + "uni-forms", + "uni-group", + "uni-list", + "uni-fab", + "uni-datetime-picker", + "uni-file-picker", + "uni-easyinput", + "uni-data-checkbox", + "switch" + ], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "u" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "u", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "u", + "联盟": "u" + } + } + } + } +} \ No newline at end of file diff --git a/uni_modules/opendb-feedback/pages/opendb-feedback/add.vue b/uni_modules/opendb-feedback/pages/opendb-feedback/add.vue new file mode 100644 index 0000000000000000000000000000000000000000..267239c80c5b099a02fd201289934dff644bfdbf --- /dev/null +++ b/uni_modules/opendb-feedback/pages/opendb-feedback/add.vue @@ -0,0 +1,211 @@ + + + + + diff --git a/uni_modules/opendb-feedback/pages/opendb-feedback/detail.vue b/uni_modules/opendb-feedback/pages/opendb-feedback/detail.vue new file mode 100644 index 0000000000000000000000000000000000000000..8984ccb17ec0d624fbf26e82df6da2acb6c89bca --- /dev/null +++ b/uni_modules/opendb-feedback/pages/opendb-feedback/detail.vue @@ -0,0 +1,82 @@ + + + + + diff --git a/uni_modules/opendb-feedback/pages/opendb-feedback/edit.vue b/uni_modules/opendb-feedback/pages/opendb-feedback/edit.vue new file mode 100644 index 0000000000000000000000000000000000000000..23f82e7f9103556c439206adebe21a995270ae8c --- /dev/null +++ b/uni_modules/opendb-feedback/pages/opendb-feedback/edit.vue @@ -0,0 +1,184 @@ + + + + + + diff --git a/uni_modules/opendb-feedback/pages/opendb-feedback/list.vue b/uni_modules/opendb-feedback/pages/opendb-feedback/list.vue new file mode 100644 index 0000000000000000000000000000000000000000..403e996847fd3347d8a0b97b56c561ec1978e61f --- /dev/null +++ b/uni_modules/opendb-feedback/pages/opendb-feedback/list.vue @@ -0,0 +1,67 @@ + + + + + diff --git a/uni_modules/opendb-feedback/readme.md b/uni_modules/opendb-feedback/readme.md new file mode 100644 index 0000000000000000000000000000000000000000..89b3a6064cf93c314d54f2defc67cd735a99f80b --- /dev/null +++ b/uni_modules/opendb-feedback/readme.md @@ -0,0 +1 @@ +# opendb-feedback \ No newline at end of file diff --git a/uni_modules/opendb-feedback/uniCloud/database/opendb-feedback.schema.json b/uni_modules/opendb-feedback/uniCloud/database/opendb-feedback.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..6cd00a6c11afba4fbec6b73de5990cde8dd78590 --- /dev/null +++ b/uni_modules/opendb-feedback/uniCloud/database/opendb-feedback.schema.json @@ -0,0 +1,54 @@ +{ + "bsonType": "object", + "permission": { + "read": "auth.uid && doc.uid == auth.uid", + "create": true, + "update": false, + "delete": false + }, + "properties": { + "_id": { + "description": "ID,系统自动生成" + }, + "user_id": { + "bsonType": "string", + "description": "留言反馈用户ID/回复留言用户ID,参考uni-id-users表", + "foreignKey": "uni-id-users._id" + }, + "create_date": { + "bsonType": "timestamp", + "description": "留言时间/回复留言时间" + }, + "content": { + "bsonType": "string", + "description": "留言内容/回复内容", + "trim": "right" + }, + "imgs": { + "bsonType": "array", + "description": "图片列表" + }, + "is_reply": { + "bsonType": "bool", + "description": "是否是回复类型" + }, + "feedback_id": { + "bsonType": "string", + "description": "被回复留言ID" + }, + "contact": { + "bsonType": "string", + "description": "联系人", + "trim": "both" + }, + "mobile": { + "bsonType": "string", + "description": "联系电话", + "trim": "both" + }, + "reply_count": { + "bsonType": "int", + "description": "被回复条数" + } + } +} \ No newline at end of file diff --git a/uni_modules/uni-badge/components/uni-badge/uni-badge.vue b/uni_modules/uni-badge/components/uni-badge/uni-badge.vue index 670b53292c96c35fd4b7bd89e7c2c712bc28afd2..e26d14d906667e913501b8eab355f1e9f41be111 100644 --- a/uni_modules/uni-badge/components/uni-badge/uni-badge.vue +++ b/uni_modules/uni-badge/components/uni-badge/uni-badge.vue @@ -1,156 +1,156 @@ - - - - - diff --git a/uni_modules/uni-data-checkbox/changelog.md b/uni_modules/uni-data-checkbox/changelog.md index 5fa34d21693b3f97958a186e23cc07728df32660..9a5d23f5e94bb06350f64096ee4e0f0d5d8220e6 100644 --- a/uni_modules/uni-data-checkbox/changelog.md +++ b/uni_modules/uni-data-checkbox/changelog.md @@ -1,3 +1,5 @@ +## 0.1.4(2021-04-09) +- 修复 nvue 下无法选中的问题 ## 0.1.3(2021-03-22) - 新增 disabled属性 ## 0.1.2(2021-02-24) diff --git a/uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox.vue b/uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox.vue index c6bf68a6954bcb3f9531bd4bc53f4fdca2372469..f9caf32bb9fd54ad3b8ca5acbfcb2f00aad463ce 100644 --- a/uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox.vue +++ b/uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox.vue @@ -1,785 +1,785 @@ - - - - - + + + + + diff --git a/uni_modules/uni-data-checkbox/package.json b/uni_modules/uni-data-checkbox/package.json index c5fcbfc73f7c09e9b3fabec955bf2eec6b2a0117..e6e4868826d80684725aff0dcb4807ce271f07c8 100644 --- a/uni_modules/uni-data-checkbox/package.json +++ b/uni_modules/uni-data-checkbox/package.json @@ -1,7 +1,7 @@ { "id": "uni-data-checkbox", "displayName": "DataCheckbox 数据选择器", - "version": "0.1.3", + "version": "0.1.4", "description": "通过数据驱动的单选框和复选框", "keywords": [ "checkbox", diff --git a/uni_modules/uni-data-checkbox/readme.md b/uni_modules/uni-data-checkbox/readme.md index c34450c5f51a856477bd57f1c0920bb39844bdc2..6fb99721b853f0fa0159bfbd16cfa5fb28d7a666 100644 --- a/uni_modules/uni-data-checkbox/readme.md +++ b/uni_modules/uni-data-checkbox/readme.md @@ -1,6 +1,7 @@ ## DataCheckbox 数据驱动的单选复选框 +> **组件名:uni-data-checkbox** > 代码块: `uDataCheckbox` @@ -13,6 +14,7 @@ 在uniCloud开发中,`DB Schema`中配置了enum枚举等类型后,在web控制台的[自动生成表单](https://uniapp.dcloud.io/uniCloud/schema?id=autocode)功能中,会自动生成``uni-data-checkbox``组件并绑定好data +> **注意事项** > 为了避免错误使用,给大家带来不好的开发体验,请在使用组件前仔细阅读下面的注意事项,可以帮你避免一些错误。 > - 组件需要依赖 `sass` 插件 ,请自行手动安装 > - 本组件为数据驱动,目的是快速投入使用,只可通过 style 覆盖有限样式,不支持自定义更多样式 diff --git a/uni_modules/uni-dateformat/components/uni-dateformat/date-format.js b/uni_modules/uni-dateformat/components/uni-dateformat/date-format.js index 579aded153c433a3ce23bcccff99589b08c74e73..24b450e1b4017ced9a0100c1b4e622a1158fa6fa 100644 --- a/uni_modules/uni-dateformat/components/uni-dateformat/date-format.js +++ b/uni_modules/uni-dateformat/components/uni-dateformat/date-format.js @@ -59,13 +59,7 @@ function getDate(time) { } switch (typeof time) { case 'string': - { - // 2020-12-12T12:12:12.000Z、2020-12-12T12:12:12.000 - if (time.indexOf('T') > -1) { - return new Date(time) - } - return new Date(time.replace(/-/g, '/')) - } + return new Date(time.replace(/-/g, '/')) default: return new Date(time) } diff --git a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue index 4a09b4b914f1c29d966e58fb8dfb2e17aa305af8..ab77c96975ba8d399d9a7dc46c3c1327dfac1fd1 100644 --- a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue +++ b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue @@ -1,827 +1,827 @@ - - - - - diff --git a/uni_modules/uni-datetime-picker/readme.md b/uni_modules/uni-datetime-picker/readme.md index f263ca88a97df9967a27c746d2d7c35d820364e0..ed6710276022b3d5a71321c8000151398a2dac9b 100644 --- a/uni_modules/uni-datetime-picker/readme.md +++ b/uni_modules/uni-datetime-picker/readme.md @@ -10,11 +10,11 @@ ___点击 picker 默认值规则:___ - -- 若设置初始值 value, 会显示在 picker 显示框中; 若无初始值 value,则初始值 value 为当前本地时间 Date.now(), 但不会显示在 picker 显示框中 - - 设置了起始时间 start、终止时间 end,并 start < value < end,初始值为 value, 否则初始值为 start - - 只设置了起始时间 start,并 start < value,初始值为 value,否则初始值为 start - - 只设置了终止时间 end,并 value < end,初始值为 value,否则初始值为 end + +- 若设置初始值 value, 会显示在 picker 显示框中; 若无初始值 value,则初始值 value 为当前本地时间 Date.now(), 但不会显示在 picker 显示框中 + - 设置了起始时间 start、终止时间 end,并 start < value < end,初始值为 value, 否则初始值为 start + - 只设置了起始时间 start,并 start < value,初始值为 value,否则初始值为 start + - 只设置了终止时间 end,并 value < end,初始值为 value,否则初始值为 end - 无起始终止时间,则初始值为 value ### 安装方式 diff --git a/uni_modules/uni-easyinput/components/uni-easyinput/common.js b/uni_modules/uni-easyinput/components/uni-easyinput/common.js index df9abe1da71fd2245aba33c6d31dadd62e39c47c..5549cc993e5af6a6b50b3fc2bcd2543c2472b547 100644 --- a/uni_modules/uni-easyinput/components/uni-easyinput/common.js +++ b/uni_modules/uni-easyinput/components/uni-easyinput/common.js @@ -1,56 +1,56 @@ -/** - * @desc 函数防抖 - * @param func 目标函数 - * @param wait 延迟执行毫秒数 - * @param immediate true - 立即执行, false - 延迟执行 - */ -export const debounce = function(func, wait = 1000, immediate = true) { - let timer; - console.log(1); - return function() { - console.log(123); - let context = this, - args = arguments; - if (timer) clearTimeout(timer); - if (immediate) { - let callNow = !timer; - timer = setTimeout(() => { - timer = null; - }, wait); - if (callNow) func.apply(context, args); - } else { - timer = setTimeout(() => { - func.apply(context, args); - }, wait) - } - } -} -/** - * @desc 函数节流 - * @param func 函数 - * @param wait 延迟执行毫秒数 - * @param type 1 使用表时间戳,在时间段开始的时候触发 2 使用表定时器,在时间段结束的时候触发 - */ -export const throttle = (func, wait = 1000, type = 1) => { - let previous = 0; - let timeout; - return function() { - let context = this; - let args = arguments; - if (type === 1) { - let now = Date.now(); - - if (now - previous > wait) { - func.apply(context, args); - previous = now; - } - } else if (type === 2) { - if (!timeout) { - timeout = setTimeout(() => { - timeout = null; - func.apply(context, args) - }, wait) - } - } - } +/** + * @desc 函数防抖 + * @param func 目标函数 + * @param wait 延迟执行毫秒数 + * @param immediate true - 立即执行, false - 延迟执行 + */ +export const debounce = function(func, wait = 1000, immediate = true) { + let timer; + console.log(1); + return function() { + console.log(123); + let context = this, + args = arguments; + if (timer) clearTimeout(timer); + if (immediate) { + let callNow = !timer; + timer = setTimeout(() => { + timer = null; + }, wait); + if (callNow) func.apply(context, args); + } else { + timer = setTimeout(() => { + func.apply(context, args); + }, wait) + } + } +} +/** + * @desc 函数节流 + * @param func 函数 + * @param wait 延迟执行毫秒数 + * @param type 1 使用表时间戳,在时间段开始的时候触发 2 使用表定时器,在时间段结束的时候触发 + */ +export const throttle = (func, wait = 1000, type = 1) => { + let previous = 0; + let timeout; + return function() { + let context = this; + let args = arguments; + if (type === 1) { + let now = Date.now(); + + if (now - previous > wait) { + func.apply(context, args); + previous = now; + } + } else if (type === 2) { + if (!timeout) { + timeout = setTimeout(() => { + timeout = null; + func.apply(context, args) + }, wait) + } + } + } } diff --git a/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue b/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue index c1e0724e7efb4f1920c6dd7ddbd953472338f94b..f40d360f8938a3949e3408b998252f575ee57f1f 100644 --- a/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue +++ b/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue @@ -1,428 +1,427 @@ -