diff --git a/androidPrivacy.json b/androidPrivacy.json new file mode 100644 index 0000000000000000000000000000000000000000..0d726ca9ef1cb1a126e746a6c4d2aedfcbce12ca --- /dev/null +++ b/androidPrivacy.json @@ -0,0 +1,3 @@ +{ + "prompt" : "template" +} diff --git a/changelog.md b/changelog.md index e87aa746bf63f83e270bdeac65ff5b99a43bac0e..69f778c49a126dc16a76acda2eb23179c33de049 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,6 @@ +## 1.1.23(2021-11-20) +- 使用`uni.getUniverifyManager`优化一键登陆中,点击第三方登陆的逻辑:未勾选隐私政策时,toast提醒并阻止了一键登陆界面的close +- 新增支持看激励视频广告签到 ## 1.1.22(2021-11-10) 删除`common/openApp.js`中可选链操作符,解决vue3版本在hbuilderX内置浏览器不兼容的问题 ## 1.1.21(2021-11-10) diff --git a/common/appInit.js b/common/appInit.js index 9af4be22e51b70b1b9c9a164f9c60c7c1f52f850..4dd648bf540c0d08281acaf0201e4d1b01ce8dab 100644 --- a/common/appInit.js +++ b/common/appInit.js @@ -179,7 +179,7 @@ export default async function() { oaid, idfa } - console.log("重新登录/注册,获取设备id", deviceInfo); + //console.log("重新登录/注册,获取设备id", deviceInfo); option.data.deviceInfo = deviceInfo // #ifndef H5 diff --git a/components/cloud-image/cloud-image.vue b/components/cloud-image/cloud-image.vue index b211f1a2ed02122472da80664c1d77e4c4a72214..2279eb81f6d3880be8c68e5942e1750d9b6ed312 100644 --- a/components/cloud-image/cloud-image.vue +++ b/components/cloud-image/cloud-image.vue @@ -39,7 +39,7 @@ handler(src) { // console.log(src); // console.log(src.substring(0, 8)); - if (src.substring(0, 8) == "cloud://") { + if (src&&src.substring(0, 8) == "cloud://") { uniCloud.getTempFileURL({ fileList: [src] }).then(res=>{ diff --git a/components/uni-agreements/uni-agreements.vue b/components/uni-agreements/uni-agreements.vue index 2c0af79c1e4b5593604e670f1c244a461c09c91d..d94a5b76d88a0422f894cd84871e0b4c2ad60752 100644 --- a/components/uni-agreements/uni-agreements.vue +++ b/components/uni-agreements/uni-agreements.vue @@ -1,7 +1,7 @@ - + - + @@ -50,22 +50,29 @@ diff --git a/pages/list/list.nvue b/pages/list/list.nvue index dbc993a8af27cbc70df13a4977e9ad5d972d8417..305528ec341e4ecbb486be8b162e3cada3840f8f 100644 --- a/pages/list/list.nvue +++ b/pages/list/list.nvue @@ -41,15 +41,18 @@ - - - - + + diff --git a/pages/list/search/search.nvue b/pages/list/search/search.nvue index 12ab77042bec049036e79227fbab7a68bf283d51..89ec8ab3d00a7f47eb23a852ef8875d8dbea5358 100644 --- a/pages/list/search/search.nvue +++ b/pages/list/search/search.nvue @@ -63,10 +63,9 @@ - + + diff --git a/pages/ucenter/login-page/index/index.vue b/pages/ucenter/login-page/index/index.vue index 16aa161ea06d88a1253d3ae66a6d6cb786dc2323..8d1a855dc67725bb0e93fbfa5a70d8419519eee7 100644 --- a/pages/ucenter/login-page/index/index.vue +++ b/pages/ucenter/login-page/index/index.vue @@ -54,7 +54,13 @@ "top": "2000px" //隐藏当前页面窗体 }) } - //#endif + //#endif + uni.$on('setLoginType',type=>{ + this.type = type + }) + }, + onUnload() { + uni.$off('setLoginType') }, onReady() { //#ifdef APP-PLUS diff --git a/pages/ucenter/login-page/pwd-login/pwd-login.vue b/pages/ucenter/login-page/pwd-login/pwd-login.vue index 7413577b669ca4f12bc159bd2c1007f8f1bb60e0..2ae197982cd29c9ff3ffd4c0c7225f45261cdd71 100644 --- a/pages/ucenter/login-page/pwd-login/pwd-login.vue +++ b/pages/ucenter/login-page/pwd-login/pwd-login.vue @@ -80,7 +80,7 @@ } else { if (result.needCaptcha) { uni.showToast({ - title: result.msg, + title: result.msg||'完成', icon: 'none' }); this.createCaptcha() diff --git a/pages/ucenter/login-page/pwd-retrieve/pwd-retrieve.vue b/pages/ucenter/login-page/pwd-retrieve/pwd-retrieve.vue index 730f35a8eed97cfe57857fdbaf0783356048324a..80913275347ebb2a99536dd5cec3fc2fa9af9b99 100644 --- a/pages/ucenter/login-page/pwd-retrieve/pwd-retrieve.vue +++ b/pages/ucenter/login-page/pwd-retrieve/pwd-retrieve.vue @@ -25,7 +25,7 @@ :placeholder="$t('common.confirmNewPasswordPlaceholder')"> + @click="submit">{{$t('common.complete')}} @@ -38,7 +38,8 @@ return { lock:false, formData: { - "phone": "", + "phone": "", + "code":"", 'pwd': '', 'pwd2': '' }, @@ -100,7 +101,7 @@ } }, computed: { - canSubmit() { + canSubmit() { return this.isPhone && this.isPwd && this.isCode; }, isPhone() { @@ -115,7 +116,7 @@ }, isCode() { let reg_code = /^\d{6}$/; - let isCode = reg_code.test(this.formData.code); + let isCode = reg_code.test(this.formData.code); return isCode; } }, @@ -137,7 +138,9 @@ /** * 完成并提交 */ - submit() { + submit() { + console.log("formData",this.formData); + console.log('rules',this.rules); this.$refs.form.validate() .then(res => { uniCloud.callFunction({ @@ -153,7 +156,7 @@ success: ({result}) => { console.log(result); uni.showToast({ - title: result.msg, + title: result.msg||'更新成功', icon: 'none' }); if (result.code === 0) { @@ -169,7 +172,6 @@ + .item-text-overflow { + width: 280px; + /* fix nvue */ + overflow: hidden; + /* #ifndef APP-NVUE */ + width: 20em; + white-space: nowrap; + text-overflow: ellipsis; + -o-text-overflow: ellipsis; + /* #endif */ + } + + .check { + margin-right: 5px; + border: 2px solid #007aff; + border-left: 0; + border-top: 0; + height: 12px; + width: 6px; + transform-origin: center; + /* #ifndef APP-NVUE */ + transition: all 0.3s; + /* #endif */ + transform: rotate(45deg); + } + diff --git a/uni_modules/uni-data-picker/package.json b/uni_modules/uni-data-picker/package.json index 676f68baf92bc3dd61e77c9e4bd1cc674b9cf06f..0647354f763695637a2be5949772fdb225ade9c0 100644 --- a/uni_modules/uni-data-picker/package.json +++ b/uni_modules/uni-data-picker/package.json @@ -1,8 +1,8 @@ { "id": "uni-data-picker", "displayName": "uni-data-picker 数据驱动的picker选择器", - "version": "0.4.0", - "description": "Picker选择器", + "version": "0.4.9", + "description": "单列、多列级联选择器,常用于省市区城市选择、公司部门选择、多级分类等场景", "keywords": [ "uni-ui", "uniui", @@ -43,7 +43,8 @@ }, "uni_modules": { "dependencies": [ - "uni-load-more" + "uni-load-more", + "uni-icons" ], "encrypt": [], "platforms": { @@ -79,6 +80,10 @@ "快应用": { "华为": "u", "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" } } } diff --git a/uni_modules/uni-data-picker/readme.md b/uni_modules/uni-data-picker/readme.md index 70eed230caef370d15a0511884374d5b4b7ae988..d466274845937e7252a71fbba177b8aff548e736 100644 --- a/uni_modules/uni-data-picker/readme.md +++ b/uni_modules/uni-data-picker/readme.md @@ -23,14 +23,9 @@ > 为了避免错误使用,给大家带来不好的开发体验,请在使用组件前仔细阅读下面的注意事项,可以帮你避免一些错误。 > - 组件需要依赖 `sass` 插件 ,请自行手动安装 > - 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 -> - `` 内部包含了弹出层组件 `` 外层的布局可能会影响弹出层,[详情](https://developer.mozilla.org/zh-Hans/docs/Web/CSS/Common_CSS_Questions) +> - `` 内部包含了弹出层组件 `` 外层的布局可能会影响弹出层,[详情](https://developer.mozilla.org/zh-CN/docs/Web/CSS/Common_CSS_Questions) - -### 平台差异说明 - -暂不支持在nvue页面中使用 - ### 安装方式 本组件符合[easycom](https://uniapp.dcloud.io/collocation/pages?id=easycom)规范,`HBuilderX 2.5.5`起,只需将本组件导入项目,在页面`template`中即可直接使用,无需在页面中`import`和注册`componets`。 @@ -44,9 +39,12 @@ |属性名 | 类型 | 可选值 | 默认值 | 说明| |:-: | :-: |:-: | :-: | :-: | |v-model |String/ Number | - | - |绑定数据| +|spaceInfo |Object | | |服务空间配置,[详情](https://uniapp.dcloud.net.cn/uniCloud/init)| |localdata |Array | | |数据,[详情](https://gitee.com/dcloud/datacom)| |preload |Boolean | true/false | false |预加载数据| |readonly |Boolean | true/false | false |是否禁用| +|clear-icon |Boolean | true/false | true |是否显示清除按钮| +|ellipsis |Boolean | true/false | true |是否隐藏 tab 标签过长的文本| |step-searh |Boolean | true/false | true |分步查询时,点击节点请求数据| |step-search-url |String | | |分步查询时,动态加载云端数据url格式,`https://xxx.com/{parentValue}`(当前版本暂不支持,下版支持)| |self-field |String | | |分步查询时当前字段名称| @@ -56,7 +54,7 @@ |where |String | | |查询条件,内容较多,另见jql文档:[详情](https://uniapp.dcloud.net.cn/uniCloud/uni-clientDB?id=jsquery)| |orderby |String | | |排序字段及正序倒叙设置| |popup-title |String | | |弹出层标题| - +|map |Object | |{text:'text',value:'value'}|字段映射,将text/value映射到数据中的其他字段| > **** > `collection/where/orderby` 和 `` 的用法一致,[详情](https://uniapp.dcloud.net.cn/uniCloud/unicloud-db) @@ -73,6 +71,24 @@ |@popupopened |EventHandle | 弹出层弹出时触发 | |@popupclosed |EventHandle | 弹出层关闭时触发 | +### DataPicker Methods + +|方法称名 |说明|参数| +|:-:|:-:|:-:| +|show|打开弹出层|-| +|hide|关闭弹出层|-| +|clear|清除已选项|-| + +**使用方法:** +```js +this.$refs.picker.show() // `picker` 为组件的 ref 名称 +``` + +### DataPicker Slots + +|名称|说明| +|:-:|:-:| +|default|覆盖显示框内容| ### 基本用法 diff --git a/uni_modules/uni-datetime-picker/changelog.md b/uni_modules/uni-datetime-picker/changelog.md index 1011ada56a1c5b1cbfe3d1ac0e47f4539a185c90..4182e0c2148f2f6a623c69fddb1d06a778170689 100644 --- a/uni_modules/uni-datetime-picker/changelog.md +++ b/uni_modules/uni-datetime-picker/changelog.md @@ -1,3 +1,14 @@ +## 2.1.4(2021-09-10) +- 修复 hide-second 在移动端的 bug +- 修复 单选赋默认值时,赋值日期未高亮的 bug +- 修复 赋默认值时,移动端未正确显示时间的 bug +## 2.1.3(2021-09-09) +- 新增 hide-second 属性,支持只使用时分,隐藏秒 +## 2.1.2(2021-09-03) +- 优化 取消选中时(范围选)直接开始下一次选择, 避免多点一次 +- 优化 移动端支持清除按钮,同时支持通过 ref 调用组件的 clear 方法 +- 优化 调整字号大小,美化日历界面 +- 修复 因国际化导致的 placeholder 失效的 bug ## 2.1.1(2021-08-24) - 新增 支持国际化 - 优化 范围选择器在 pc 端过宽的问题 diff --git a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar-item.vue b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar-item.vue index e3bf17d827ed194847a7e01a28596cf1030f0988..7c9a093c898e3b039f65c3f67e1449d529b80685 100644 --- a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar-item.vue +++ b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar-item.vue @@ -7,7 +7,7 @@ }" @click="choiceDate(weeks)" @mouseenter="handleMousemove(weeks)"> {{weeks.date}} - - @@ -47,18 +44,18 @@ lunar: { type: Boolean, default: false - }, - checkHover: { - type: Boolean, - default: false + }, + checkHover: { + type: Boolean, + default: false } }, methods: { choiceDate(weeks) { this.$emit('change', weeks) - }, - handleMousemove(weeks) { - this.$emit('handleMouse', weeks) + }, + handleMousemove(weeks) { + this.$emit('handleMouse', weeks) } } } @@ -72,12 +69,13 @@ /* #endif */ flex-direction: column; justify-content: center; - align-items: center; + align-items: center; margin: 3px 0; } .uni-calendar-item__weeks-box-text { - font-size: $uni-font-size-base; + font-size: 12px; + // font-size: $uni-font-size-base; // color: $uni-text-color; } @@ -94,13 +92,13 @@ flex-direction: column; justify-content: center; align-items: center; - width: 43px; - height: 43px; + width: 40px; + height: 40px; /* #ifdef H5 */ cursor: pointer; /* #endif */ - } - + } + .uni-calendar-item__weeks-box-circle { position: absolute; @@ -115,12 +113,12 @@ .uni-calendar-item__weeks-box .uni-calendar-item--disable { // background-color: rgba(249, 249, 249, $uni-opacity-disabled); - color: $uni-text-color-disable; + color: $uni-text-color-disable; cursor: default; } - .uni-calendar-item--isDay-text { - color: $uni-color-primary !important; + .uni-calendar-item__weeks-box .uni-calendar-item--isDay-text { + color: $uni-color-primary; } .uni-calendar-item--isDay { @@ -134,17 +132,17 @@ opacity: 0.8; } - .uni-calendar-item--checked { - background-color: $uni-color-primary; - // border-radius: 50%; - box-sizing: border-box; + .uni-calendar-item__weeks-box .uni-calendar-item--checked { + background-color: $uni-color-primary; + // border-radius: 50%; + box-sizing: border-box; border: 6px solid #f2f6fc; color: #fff; opacity: 0.8; - } - - .uni-calendar-item--multiple .uni-calendar-item--checked-range-text { - color: #333; + } + + .uni-calendar-item--multiple .uni-calendar-item--checked-range-text { + color: #333; } .uni-calendar-item--multiple { @@ -155,29 +153,29 @@ .uni-calendar-item--multiple .uni-calendar-item--before-checked { background-color: #409eff; - color: #fff !important; - // border-radius: 50%; - box-sizing: border-box; + color: #fff !important; + // border-radius: 50%; + box-sizing: border-box; border: 6px solid #f2f6fc; } .uni-calendar-item--multiple .uni-calendar-item--after-checked { background-color: #409eff;; - color: #fff !important; - // border-radius: 50%; - box-sizing: border-box; + color: #fff !important; + // border-radius: 50%; + box-sizing: border-box; border: 6px solid #f2f6fc; - } - - .uni-calendar-item--before-checked-x { - // border-top-left-radius: 25px; - // border-bottom-left-radius: 25px; - background-color: #f2f6fc; - } - - .uni-calendar-item--after-checked-x { - // border-top-right-radius: 25px; - // border-bottom-right-radius: 25px; - background-color: #f2f6fc; - } - + } + + .uni-calendar-item--before-checked-x { + // border-top-left-radius: 25px; + // border-bottom-left-radius: 25px; + background-color: #f2f6fc; + } + + .uni-calendar-item--after-checked-x { + // border-top-right-radius: 25px; + // border-bottom-right-radius: 25px; + background-color: #f2f6fc; + } + diff --git a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.vue b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.vue index 6b7a20b42488bcce25d5d6db6815cba5abd94453..d04b9cf23ba1d2aec7082721506bdd3ac6d4f835 100644 --- a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.vue +++ b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.vue @@ -10,8 +10,7 @@ - {{ (nowDate.year||'') +' / '+( nowDate.month||'')}} + {{ (nowDate.year||'') +' / '+( nowDate.month||'')}} @@ -56,29 +55,29 @@ - {{tempSingleDate ? tempSingleDate : selectDateText}} + style="padding: 0 80px;"> + {{tempSingleDate ? tempSingleDate : selectDateText}} + :disabled="!tempSingleDate" :border="false" :hide-second="hideSecond" class="time-picker-style"> - {{tempRange.before ? tempRange.before : startDateText}} - {{tempRange.before ? tempRange.before : startDateText}} + + - {{tempRange.after ? tempRange.after : endDateText}} - {{tempRange.after ? tempRange.after : endDateText}} + - {{okText}} @@ -96,7 +95,9 @@ initVueI18n } from '@dcloudio/uni-i18n' import messages from './i18n/index.js' - const { t } = initVueI18n(messages) + const { + t + } = initVueI18n(messages) /** * Calendar 日历 * @description 日历组件可以查看日期,选择任意范围内的日期,打点操作。常用场景如:酒店日期预订、火车机票选择购买日期、上下班打卡等 @@ -186,6 +187,10 @@ checkHover: { type: Boolean, default: true + }, + hideSecond: { + type: [Boolean], + default: false }, pleStatus: { type: Object, @@ -207,12 +212,12 @@ nowDate: '', aniMaskShow: false, firstEnter: true, - time: this.defTime ? this.defTime : '', + time: '', timeRange: { - startTime: this.defTime.start ? this.defTime.start : '', - endTime: this.defTime.end ? this.defTime.end : '' + startTime: '', + endTime: '' }, - tempSingleDate: this.date, + tempSingleDate: '', tempRange: { before: '', after: '' @@ -223,11 +228,25 @@ date: { immediate: true, handler(newVal, oldVal) { - if (!this.range) - setTimeout(() => { - this.init(newVal) - }, 100) + if (!this.range) { + this.tempSingleDate = newVal + setTimeout(() => { + this.init(newVal) + }, 100) + } } + }, + defTime: { + immediate: true, + handler(newVal, oldVal) { + if (!this.range) { + this.time = newVal + } else { + // console.log('-----', newVal); + this.timeRange.startTime = newVal.start + this.timeRange.endTime = newVal.end + } + } }, startDate(val) { this.cale.resetSatrtDate(val) @@ -261,8 +280,7 @@ this.cale.lastHover = true if (this.rangeWithinMonth(after, before)) return this.setDate(before) - } - if (!before && !after) { + } else { this.cale.setMultiple(fulldate) this.setDate(this.nowDate.fullDate) this.calendar.fullDate = '' @@ -380,9 +398,26 @@ this.close() }, + clearCalender() { + if (this.range) { + this.timeRange.startTime = '' + this.timeRange.endTime = '' + this.tempRange.before = '' + this.tempRange.after = '' + this.cale.multipleStatus.before = '' + this.cale.multipleStatus.after = '' + this.cale.multipleStatus.data = [] + this.cale.lastHover = false + } else { + this.time = '' + this.tempSingleDate = '' + } + this.calendar.fullDate = '' + this.setDate() + }, + bindDateChange(e) { const value = e.detail.value + '-1' - console.log(this.cale.getDate(value)); this.init(value) }, /** @@ -494,6 +529,7 @@ choiceDate(weeks) { if (weeks.disable) return this.calendar = weeks + this.calendar.userChecked = true // 设置多选 this.cale.setMultiple(this.calendar.fullDate, true) this.weeks = this.cale.weeks @@ -506,7 +542,6 @@ * 回到今天 */ backtoday() { - console.log(this.cale.getDate(new Date()).fullDate); let date = this.cale.getDate(new Date()).fullDate // this.cale.setDate(date) this.init(date) @@ -678,14 +713,14 @@ } .uni-calendar__header-btn { - width: 10px; - height: 10px; + width: 8px; + height: 8px; border-left-color: $uni-text-color-placeholder; border-left-style: solid; - border-left-width: 2px; + border-left-width: 1px; border-top-color: $uni-color-subtitle; border-top-style: solid; - border-top-width: 2px; + border-top-width: 1px; } .uni-calendar--left { @@ -717,14 +752,14 @@ flex-direction: column; justify-content: center; align-items: center; - height: 45px; + height: 40px; border-bottom-color: #F5F5F5; border-bottom-style: solid; border-bottom-width: 1px; } .uni-calendar__weeks-day-text { - font-size: 14px; + font-size: 12px; } .uni-calendar__box { @@ -783,11 +818,12 @@ .uni-date-changed--time-date { color: #999; line-height: 50px; + margin-right: 5px; // opacity: 0.6; } .time-picker-style { - width: 62px; + // width: 62px; /* #ifndef APP-NVUE */ display: flex; /* #endif */ @@ -798,4 +834,4 @@ .mr-10 { margin-right: 10px; } - + diff --git a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/time-picker.vue b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/time-picker.vue index 147513a13451617489253737e3d810e45a8617d1..9e799a4bf398f8071cdff25ade8f4699dc4252a6 100644 --- a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/time-picker.vue +++ b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/time-picker.vue @@ -124,7 +124,7 @@ // 输入框当前时间 time: '', // 当前的年月日时分秒 - year: 1900, + year: 1920, month: 0, day: 0, hour: 0, @@ -190,7 +190,8 @@ if (newVal) { this.parseValue(this.fixIosDateFormat(newVal)) //兼容 iOS、safari 日期格式 this.initTime(false) - } else { + } else { + this.time = '' this.parseValue(Date.now()) } }, @@ -538,7 +539,9 @@ * @param {Object} defaultTime */ parseValue(value) { - if (!value) return + if (!value) { + return + } if (this.type === 'time' && typeof value === "string") { this.parseTimeType(value) } else { @@ -576,7 +579,7 @@ this.startSecond = 0 } if (pointType === 'end') { - this.endYear = 120 + this.endYear = 2120 this.endMonth = 12 this.endDay = 31 this.endHour = 23 @@ -770,7 +773,7 @@