diff --git a/components/guide-pages/guide-pages.vue b/components/guide-pages/guide-pages.vue index 1e4442f..c9a2311 100644 --- a/components/guide-pages/guide-pages.vue +++ b/components/guide-pages/guide-pages.vue @@ -12,14 +12,14 @@ 疯子读书, - 让阅读无处不在 + 古今一统,中西互参 疯子读书, - 让阅读无处不在 + 和光同尘,普惠人间 开始使用 开始使用 diff --git a/config/baseUrl.js b/config/baseUrl.js index 2516a4f..50a42ff 100644 --- a/config/baseUrl.js +++ b/config/baseUrl.js @@ -5,12 +5,15 @@ if (process.env.NODE_ENV === 'development') { // baseUrl = "http://localhost:7001/"; // socketUrl = "ws://localhost:6001/"; // baseUrl = "https://twin-ui.com/demo/"; - // baseUrl = "http://59.110.212.44:9100/pb/"; - baseUrl = "http://192.168.110.100:9100/pb/"; + // baseUrl = "http://59.110.212.44:9200/pb/"; + // baseUrl = "https://testapi.nuttyreading.com/"; // 线上测试环境 + // baseUrl = "http://192.168.110.100:9100/pb/"; // 开发用电脑 + baseUrl = "http://192.168.110.38:9200/pb/"; // 吴春磊笔记本1 // socketUrl = "ws://8.129.186.35:6001/"; } else if (process.env.NODE_ENV === 'production') { // 生产环境11 - baseUrl = "http://59.110.212.44:9100/pb/"; + // baseUrl = "http://59.110.212.44:9100/pb/"; + baseUrl = "https://api.nuttyreading.com/"; //1 // baseUrl = "ws://twin-ui.com:6001/"; // socketUrl = "ws://twin-ui.com:6001/"; } diff --git a/config/utils.js b/config/utils.js index 982d5a3..2aaf13d 100644 --- a/config/utils.js +++ b/config/utils.js @@ -235,10 +235,10 @@ export const getLatLon = function(tip) { }); } -// 单独重新微信支付 +// 单独微信支付 export const setWXPay = function(payInfo, callback) { $http.request({ - url: "/pay/placeAnOrder/shoppingpay", + url: "/pay/placeAnOrder/shoppingPay", method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档 data:payInfo, header: { //默认 无 说明:请求头1 diff --git a/main.js b/main.js index 3bc6a5b..48b3651 100644 --- a/main.js +++ b/main.js @@ -8,7 +8,8 @@ Vue.prototype.$bgm = bgm // 地址 // Vue.prototype.$baseUrl = "http://192.168.110.100:9100/pb/" - Vue.prototype.$baseUrl = "http://59.110.212.44:9100/pb/" + // Vue.prototype.$baseUrl = "http://59.110.212.44:9100/pb/" + Vue.prototype.$baseUrl = "https://api.nuttyreading.com/" diff --git a/pages/bookShop/orderList.vue b/pages/bookShop/orderList.vue index f2989d2..b60d818 100644 --- a/pages/bookShop/orderList.vue +++ b/pages/bookShop/orderList.vue @@ -5,17 +5,20 @@ - + {{item.name}} - 待支付 - 待发货 - 待收货 - 已完成 + 待支付 + 待发货 + 待收货 + 已完成 + + 订单编号: {{ifex.orderSn}} + @@ -24,7 +27,7 @@ {{item.productName}} - ¥{{item.productPrice}} + ¥{{item.productPrice}} X {{item.quantity}} @@ -36,10 +39,10 @@ - 花生币充值 + 天医币充值 - ¥{{ifex.realMoney}} + ¥{{ifex.realMoney}} @@ -52,16 +55,16 @@ 会员充值 - ¥{{ifex.realMoney}} + ¥{{ifex.realMoney}} - 下单时间:{{ifex.createTime}} - 实付款 : - ¥{{ifex.realMoney}} + 下单时间:{{ifex.createTime}} + 实付款 : + ¥{{ifex.realMoney}} 取消订单 @@ -174,7 +177,7 @@ import { }, // 订单详情 - goOrdiCont(e) { + goOrdiCont(e) { uni.navigateTo({ url: './orderLCont?orderId=' + e.orderId + '&orderType=' + e.orderStatus + '&orderSn=' + e.orderSn }); @@ -507,27 +510,34 @@ import { \ No newline at end of file diff --git a/pages/clock/clock.vue b/pages/clock/clock.vue index 20a4089..6368ee1 100644 --- a/pages/clock/clock.vue +++ b/pages/clock/clock.vue @@ -134,6 +134,11 @@ 今日签到随想 + + @@ -166,7 +171,7 @@ 说点什么 + @click="addTextShow = true">说点什么 @@ -186,6 +191,7 @@ export default { data() { return { + placeholder: '开始输入...', dayCurrent: 0, // 载入页面时的显示页数 showBack: false, currentIndex: 0, @@ -264,6 +270,17 @@ ...mapState(['userInfo']) }, methods: { + onEditorReady() { + // #ifdef MP-BAIDU + this.editorCtx = requireDynamicLib('editorLib').createEditorContext('editor'); + // #endif + + // #ifdef APP-PLUS || H5 ||MP-WEIXIN + uni.createSelectorQuery().select('#editor').context((res) => { + this.editorCtx = res.context + }).exec() + // #endif + }, // 获取书籍信息 getBookInfo() { this.$http @@ -513,7 +530,7 @@ }, // 快捷签到 kuickSign() { - + if (!this.taskInfo.id) { uni.showToast({ title: '当天未发布打卡任务,不可签到哦', @@ -521,36 +538,35 @@ }) return false } - let data = { - "bookId": this.bookid, - "userId": this.userInfo.id, - "tid": this.taskInfo.id, - "days": this.currentDay + let data = { + "bookId": this.bookid, + "userId": this.userInfo.id, + "tid": this.taskInfo.id, + "days": this.currentDay + } + $http.request({ + url: 'book/clockinPunch/save', + method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档 + data, + header: { //默认 无 说明:请求头 + 'Content-Type': 'application/json' + }, + }).then(res => { + if (res.code == 0) { + //console.log(res, '快捷签到') + uni.showToast({ + title: '签到成功', + icon: 'success' + }) + this.addTextShow = false + this.formData.content = '' + this.formData.images = [] + this.getmySign() + this.getAllSign(this.taskInfo) } - $http.request({ - url: 'book/clockinPunch/save', - method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档 - data, - header: { //默认 无 说明:请求头 - 'Content-Type': 'application/json' - }, - }).then(res => { - if (res.code == 0) { - //console.log(res, '快捷签到') - uni.showToast({ - title: '签到成功', - icon: 'success' - }) - return false - this.addTextShow = false - this.formData.content = '' - this.formData.images = [] - this.getmySign() - this.getAllSign(this.taskInfo) - } - }); - + }); + }, // 说点什么 goToSign() { @@ -715,6 +731,18 @@ diff --git a/pages/library/library.vue b/pages/library/library.vue index 42792e5..021cf76 100644 --- a/pages/library/library.vue +++ b/pages/library/library.vue @@ -14,7 +14,7 @@ - 请输入想要搜索的书名 + 请输入书名 + + + + 已购图书 + + + 推荐图书 + + - + @@ -44,7 +54,7 @@ - + @@ -89,7 +99,7 @@ bookList: [], freeTotalPage:0, freeStatus:3, // 已购买图书状态 - contentShow: 0, + contentShow: 1, page: 1, // 页码 status: 3, ygtotalPage: 1, @@ -97,13 +107,13 @@ tjTotalPage: 1, tjPageSize:9, tjBookLIst: [], - contentButtonList: [{ - name: '已购图书' - }, - { - name: '推荐图书' - } - ], + // contentButtonList: [{ + // name: '已购图书' + // }, + // { + // name: '推荐图书' + // } + // ], } }, onLoad() { @@ -130,7 +140,7 @@ this.loadingNow = true console.log('到底了') - if(this.contentShow == 0){ + if(this.contentShow == 1){ //console.log(this.page , this.ygtotalPage) if(this.page+1 <= this.freeTotalPage){ this.page++ @@ -146,7 +156,7 @@ } - if (this.contentShow == 1) { + if (this.contentShow == 2) { if (this.tjPage+1 <= this.tjTotalPage) { this.tjPage++ console.log('加载', this.tjPage) @@ -167,6 +177,9 @@ ...mapState(['userInfo']) }, methods: { + setData(e) { + this.contentShow = e + }, // 未购买图书,评书跳转 wgGoPingshu(item) { console.log('未购买评书', item) @@ -316,7 +329,31 @@ \ No newline at end of file diff --git a/pages/talkBook/talkBookML.vue b/pages/talkBook/talkBookML.vue index 46ce5f4..ff7b2d8 100644 --- a/pages/talkBook/talkBookML.vue +++ b/pages/talkBook/talkBookML.vue @@ -22,7 +22,7 @@ {{bookInfo.name}} - {{bookInfo.author.authorName}} [著] > diff --git a/pages/user/persCount.vue b/pages/user/persCount.vue index 69155b8..28c4a30 100644 --- a/pages/user/persCount.vue +++ b/pages/user/persCount.vue @@ -10,7 +10,7 @@ {{userMes.peanutCoin}} - 疯币 + 天医币 充值 @@ -22,7 +22,7 @@ + {{item.changeAmount}} - 疯币 + 天医币 {{item.remark}} @@ -113,7 +113,7 @@ return { playData:{}, tab_list: [{ - name: '疯币', + name: '天医币', }, { name: '优惠券', }], @@ -247,7 +247,7 @@ - // 充值疯币 + // 充值天医币 buPoint() { uni.navigateTo({ url: '../peanut/reCharge' diff --git a/static/haoyou.png b/static/haoyou.png new file mode 100644 index 0000000..3b1575e Binary files /dev/null and b/static/haoyou.png differ diff --git a/static/quan.png b/static/quan.png new file mode 100644 index 0000000..52a8f3d Binary files /dev/null and b/static/quan.png differ diff --git a/uni_modules/uni-popup/changelog.md b/uni_modules/uni-popup/changelog.md new file mode 100644 index 0000000..bc59f07 --- /dev/null +++ b/uni_modules/uni-popup/changelog.md @@ -0,0 +1,68 @@ +## 1.8.3(2023-04-17) +- 修复 uni-popup 重复打开时的 bug +## 1.8.2(2023-02-02) +- uni-popup-dialog 组件新增 inputType 属性 +## 1.8.1(2022-12-01) +- 修复 nvue 下 v-show 报错 +## 1.8.0(2022-11-29) +- 优化 主题样式 +## 1.7.9(2022-04-02) +- 修复 弹出层内部无法滚动的bug +## 1.7.8(2022-03-28) +- 修复 小程序中高度错误的bug +## 1.7.7(2022-03-17) +- 修复 快速调用open出现问题的Bug +## 1.7.6(2022-02-14) +- 修复 safeArea 属性不能设置为false的bug +## 1.7.5(2022-01-19) +- 修复 isMaskClick 失效的bug +## 1.7.4(2022-01-19) +- 新增 cancelText \ confirmText 属性 ,可自定义文本 +- 新增 maskBackgroundColor 属性 ,可以修改蒙版颜色 +- 优化 maskClick属性 更新为 isMaskClick ,解决微信小程序警告的问题 +## 1.7.3(2022-01-13) +- 修复 设置 safeArea 属性不生效的bug +## 1.7.2(2021-11-26) +- 优化 组件示例 +## 1.7.1(2021-11-26) +- 修复 vuedoc 文字错误 +## 1.7.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-popup](https://uniapp.dcloud.io/component/uniui/uni-popup) +## 1.6.2(2021-08-24) +- 新增 支持国际化 +## 1.6.1(2021-07-30) +- 优化 vue3下事件警告的问题 +## 1.6.0(2021-07-13) +- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) +## 1.5.0(2021-06-23) +- 新增 mask-click 遮罩层点击事件 +## 1.4.5(2021-06-22) +- 修复 nvue 平台中间弹出后,点击内容,再点击遮罩无法关闭的Bug +## 1.4.4(2021-06-18) +- 修复 H5平台中间弹出后,点击内容,再点击遮罩无法关闭的Bug +## 1.4.3(2021-06-08) +- 修复 错误的 watch 字段 +- 修复 safeArea 属性不生效的问题 +- 修复 点击内容,再点击遮罩无法关闭的Bug +## 1.4.2(2021-05-12) +- 新增 组件示例地址 +## 1.4.1(2021-04-29) +- 修复 组件内放置 input 、textarea 组件,无法聚焦的问题 +## 1.4.0 (2021-04-29) +- 新增 type 属性的 left\right 值,支持左右弹出 +- 新增 open(String:type) 方法参数 ,可以省略 type 属性 ,直接传入类型打开指定弹窗 +- 新增 backgroundColor 属性,可定义主窗口背景色,默认不显示背景色 +- 新增 safeArea 属性,是否适配底部安全区 +- 修复 App\h5\微信小程序底部安全区占位不对的Bug +- 修复 App 端弹出等待的Bug +- 优化 提升低配设备性能,优化动画卡顿问题 +- 优化 更简单的组件自定义方式 +## 1.2.9(2021-02-05) +- 优化 组件引用关系,通过uni_modules引用组件 +## 1.2.8(2021-02-05) +- 调整为uni_modules目录规范 +## 1.2.7(2021-02-05) +- 调整为uni_modules目录规范 +- 新增 支持 PC 端 +- 新增 uni-popup-message 、uni-popup-dialog扩展组件支持 PC 端 diff --git a/uni_modules/uni-popup/components/uni-popup-dialog/keypress.js b/uni_modules/uni-popup/components/uni-popup-dialog/keypress.js new file mode 100644 index 0000000..6ef26a2 --- /dev/null +++ b/uni_modules/uni-popup/components/uni-popup-dialog/keypress.js @@ -0,0 +1,45 @@ +// #ifdef H5 +export default { + name: 'Keypress', + props: { + disable: { + type: Boolean, + default: false + } + }, + mounted () { + const keyNames = { + esc: ['Esc', 'Escape'], + tab: 'Tab', + enter: 'Enter', + space: [' ', 'Spacebar'], + up: ['Up', 'ArrowUp'], + left: ['Left', 'ArrowLeft'], + right: ['Right', 'ArrowRight'], + down: ['Down', 'ArrowDown'], + delete: ['Backspace', 'Delete', 'Del'] + } + const listener = ($event) => { + if (this.disable) { + return + } + const keyName = Object.keys(keyNames).find(key => { + const keyName = $event.key + const value = keyNames[key] + return value === keyName || (Array.isArray(value) && value.includes(keyName)) + }) + if (keyName) { + // 避免和其他按键事件冲突 + setTimeout(() => { + this.$emit(keyName, {}) + }, 0) + } + } + document.addEventListener('keyup', listener) + this.$once('hook:beforeDestroy', () => { + document.removeEventListener('keyup', listener) + }) + }, + render: () => {} +} +// #endif diff --git a/uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue b/uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue new file mode 100644 index 0000000..b5eee79 --- /dev/null +++ b/uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue @@ -0,0 +1,275 @@ + + + + {{titleText}} + + + + {{content}} + + + + + + + + + + {{closeText}} + + + {{okText}} + + + + + + + + + diff --git a/uni_modules/uni-popup/components/uni-popup-message/uni-popup-message.vue b/uni_modules/uni-popup/components/uni-popup-message/uni-popup-message.vue new file mode 100644 index 0000000..91370a8 --- /dev/null +++ b/uni_modules/uni-popup/components/uni-popup-message/uni-popup-message.vue @@ -0,0 +1,143 @@ + + + + + {{message}} + + + + + + + diff --git a/uni_modules/uni-popup/components/uni-popup-share/uni-popup-share.vue b/uni_modules/uni-popup/components/uni-popup-share/uni-popup-share.vue new file mode 100644 index 0000000..01b34d6 --- /dev/null +++ b/uni_modules/uni-popup/components/uni-popup-share/uni-popup-share.vue @@ -0,0 +1,189 @@ + + + {{shareTitleText}} + + + + + {{item.text}} + + + + + + {{cancelText}} + + + + + + diff --git a/uni_modules/uni-popup/components/uni-popup/i18n/en.json b/uni_modules/uni-popup/components/uni-popup/i18n/en.json new file mode 100644 index 0000000..7f1bd06 --- /dev/null +++ b/uni_modules/uni-popup/components/uni-popup/i18n/en.json @@ -0,0 +1,7 @@ +{ + "uni-popup.cancel": "cancel", + "uni-popup.ok": "ok", + "uni-popup.placeholder": "pleace enter", + "uni-popup.title": "Hint", + "uni-popup.shareTitle": "Share to" +} diff --git a/uni_modules/uni-popup/components/uni-popup/i18n/index.js b/uni_modules/uni-popup/components/uni-popup/i18n/index.js new file mode 100644 index 0000000..de7509c --- /dev/null +++ b/uni_modules/uni-popup/components/uni-popup/i18n/index.js @@ -0,0 +1,8 @@ +import en from './en.json' +import zhHans from './zh-Hans.json' +import zhHant from './zh-Hant.json' +export default { + en, + 'zh-Hans': zhHans, + 'zh-Hant': zhHant +} diff --git a/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hans.json b/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hans.json new file mode 100644 index 0000000..5e3003c --- /dev/null +++ b/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hans.json @@ -0,0 +1,7 @@ +{ + "uni-popup.cancel": "取消", + "uni-popup.ok": "确定", + "uni-popup.placeholder": "请输入", + "uni-popup.title": "提示", + "uni-popup.shareTitle": "分享到" +} diff --git a/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hant.json b/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hant.json new file mode 100644 index 0000000..13e39eb --- /dev/null +++ b/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hant.json @@ -0,0 +1,7 @@ +{ + "uni-popup.cancel": "取消", + "uni-popup.ok": "確定", + "uni-popup.placeholder": "請輸入", + "uni-popup.title": "提示", + "uni-popup.shareTitle": "分享到" +} diff --git a/uni_modules/uni-popup/components/uni-popup/keypress.js b/uni_modules/uni-popup/components/uni-popup/keypress.js new file mode 100644 index 0000000..62dda46 --- /dev/null +++ b/uni_modules/uni-popup/components/uni-popup/keypress.js @@ -0,0 +1,45 @@ +// #ifdef H5 +export default { + name: 'Keypress', + props: { + disable: { + type: Boolean, + default: false + } + }, + mounted () { + const keyNames = { + esc: ['Esc', 'Escape'], + tab: 'Tab', + enter: 'Enter', + space: [' ', 'Spacebar'], + up: ['Up', 'ArrowUp'], + left: ['Left', 'ArrowLeft'], + right: ['Right', 'ArrowRight'], + down: ['Down', 'ArrowDown'], + delete: ['Backspace', 'Delete', 'Del'] + } + const listener = ($event) => { + if (this.disable) { + return + } + const keyName = Object.keys(keyNames).find(key => { + const keyName = $event.key + const value = keyNames[key] + return value === keyName || (Array.isArray(value) && value.includes(keyName)) + }) + if (keyName) { + // 避免和其他按键事件冲突 + setTimeout(() => { + this.$emit(keyName, {}) + }, 0) + } + } + document.addEventListener('keyup', listener) + // this.$once('hook:beforeDestroy', () => { + // document.removeEventListener('keyup', listener) + // }) + }, + render: () => {} +} +// #endif diff --git a/uni_modules/uni-popup/components/uni-popup/popup.js b/uni_modules/uni-popup/components/uni-popup/popup.js new file mode 100644 index 0000000..c4e5781 --- /dev/null +++ b/uni_modules/uni-popup/components/uni-popup/popup.js @@ -0,0 +1,26 @@ + +export default { + data() { + return { + + } + }, + created(){ + this.popup = this.getParent() + }, + methods:{ + /** + * 获取父元素实例 + */ + getParent(name = 'uniPopup') { + let parent = this.$parent; + let parentName = parent.$options.name; + while (parentName !== name) { + parent = parent.$parent; + if (!parent) return false + parentName = parent.$options.name; + } + return parent; + }, + } +} diff --git a/uni_modules/uni-popup/components/uni-popup/uni-popup.vue b/uni_modules/uni-popup/components/uni-popup/uni-popup.vue new file mode 100644 index 0000000..54afee2 --- /dev/null +++ b/uni_modules/uni-popup/components/uni-popup/uni-popup.vue @@ -0,0 +1,473 @@ + + + + + + + + + + + + + + + + + + diff --git a/uni_modules/uni-popup/package.json b/uni_modules/uni-popup/package.json new file mode 100644 index 0000000..f40556b --- /dev/null +++ b/uni_modules/uni-popup/package.json @@ -0,0 +1,87 @@ +{ + "id": "uni-popup", + "displayName": "uni-popup 弹出层", + "version": "1.8.3", + "description": " Popup 组件,提供常用的弹层", + "keywords": [ + "uni-ui", + "弹出层", + "弹窗", + "popup", + "弹框" + ], + "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", + "uni-transition" + ], + "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" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} diff --git a/uni_modules/uni-popup/readme.md b/uni_modules/uni-popup/readme.md new file mode 100644 index 0000000..fdad4b3 --- /dev/null +++ b/uni_modules/uni-popup/readme.md @@ -0,0 +1,17 @@ + + +## Popup 弹出层 +> **组件名:uni-popup** +> 代码块: `uPopup` +> 关联组件:`uni-transition` + + +弹出层组件,在应用中弹出一个消息提示窗口、提示框等 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-popup) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 + + + + + diff --git a/uni_modules/uni-transition/changelog.md b/uni_modules/uni-transition/changelog.md index b1a824b..70c1cd4 100644 --- a/uni_modules/uni-transition/changelog.md +++ b/uni_modules/uni-transition/changelog.md @@ -1,3 +1,5 @@ +## 1.3.2(2023-05-04) +- 修复 NVUE 平台报错的问题 ## 1.3.1(2021-11-23) - 修复 init 方法初始化问题 ## 1.3.0(2021-11-19) diff --git a/uni_modules/uni-transition/components/uni-transition/createAnimation.js b/uni_modules/uni-transition/components/uni-transition/createAnimation.js index 5f54365..8f89b18 100644 --- a/uni_modules/uni-transition/components/uni-transition/createAnimation.js +++ b/uni_modules/uni-transition/components/uni-transition/createAnimation.js @@ -10,7 +10,10 @@ const nvueAnimation = uni.requireNativePlugin('animation') class MPAnimation { constructor(options, _this) { this.options = options - this.animation = uni.createAnimation(options) + // 在iOS10+QQ小程序平台下,传给原生的对象一定是个普通对象而不是Proxy对象,否则会报parameter should be Object instead of ProxyObject的错误 + this.animation = uni.createAnimation({ + ...options + }) this.currentStepAnimates = {} this.next = 0 this.$ = _this diff --git a/uni_modules/uni-transition/components/uni-transition/uni-transition.vue b/uni_modules/uni-transition/components/uni-transition/uni-transition.vue index 0d739bd..bfbba93 100644 --- a/uni_modules/uni-transition/components/uni-transition/uni-transition.vue +++ b/uni_modules/uni-transition/components/uni-transition/uni-transition.vue @@ -1,5 +1,10 @@ - + + + + + +
{{bookInfo.author.authorName}} [著] > diff --git a/pages/user/persCount.vue b/pages/user/persCount.vue index 69155b8..28c4a30 100644 --- a/pages/user/persCount.vue +++ b/pages/user/persCount.vue @@ -10,7 +10,7 @@ {{userMes.peanutCoin}} - 疯币 + 天医币 充值 @@ -22,7 +22,7 @@ + {{item.changeAmount}} - 疯币 + 天医币 {{item.remark}} @@ -113,7 +113,7 @@ return { playData:{}, tab_list: [{ - name: '疯币', + name: '天医币', }, { name: '优惠券', }], @@ -247,7 +247,7 @@ - // 充值疯币 + // 充值天医币 buPoint() { uni.navigateTo({ url: '../peanut/reCharge' diff --git a/static/haoyou.png b/static/haoyou.png new file mode 100644 index 0000000..3b1575e Binary files /dev/null and b/static/haoyou.png differ diff --git a/static/quan.png b/static/quan.png new file mode 100644 index 0000000..52a8f3d Binary files /dev/null and b/static/quan.png differ diff --git a/uni_modules/uni-popup/changelog.md b/uni_modules/uni-popup/changelog.md new file mode 100644 index 0000000..bc59f07 --- /dev/null +++ b/uni_modules/uni-popup/changelog.md @@ -0,0 +1,68 @@ +## 1.8.3(2023-04-17) +- 修复 uni-popup 重复打开时的 bug +## 1.8.2(2023-02-02) +- uni-popup-dialog 组件新增 inputType 属性 +## 1.8.1(2022-12-01) +- 修复 nvue 下 v-show 报错 +## 1.8.0(2022-11-29) +- 优化 主题样式 +## 1.7.9(2022-04-02) +- 修复 弹出层内部无法滚动的bug +## 1.7.8(2022-03-28) +- 修复 小程序中高度错误的bug +## 1.7.7(2022-03-17) +- 修复 快速调用open出现问题的Bug +## 1.7.6(2022-02-14) +- 修复 safeArea 属性不能设置为false的bug +## 1.7.5(2022-01-19) +- 修复 isMaskClick 失效的bug +## 1.7.4(2022-01-19) +- 新增 cancelText \ confirmText 属性 ,可自定义文本 +- 新增 maskBackgroundColor 属性 ,可以修改蒙版颜色 +- 优化 maskClick属性 更新为 isMaskClick ,解决微信小程序警告的问题 +## 1.7.3(2022-01-13) +- 修复 设置 safeArea 属性不生效的bug +## 1.7.2(2021-11-26) +- 优化 组件示例 +## 1.7.1(2021-11-26) +- 修复 vuedoc 文字错误 +## 1.7.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-popup](https://uniapp.dcloud.io/component/uniui/uni-popup) +## 1.6.2(2021-08-24) +- 新增 支持国际化 +## 1.6.1(2021-07-30) +- 优化 vue3下事件警告的问题 +## 1.6.0(2021-07-13) +- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) +## 1.5.0(2021-06-23) +- 新增 mask-click 遮罩层点击事件 +## 1.4.5(2021-06-22) +- 修复 nvue 平台中间弹出后,点击内容,再点击遮罩无法关闭的Bug +## 1.4.4(2021-06-18) +- 修复 H5平台中间弹出后,点击内容,再点击遮罩无法关闭的Bug +## 1.4.3(2021-06-08) +- 修复 错误的 watch 字段 +- 修复 safeArea 属性不生效的问题 +- 修复 点击内容,再点击遮罩无法关闭的Bug +## 1.4.2(2021-05-12) +- 新增 组件示例地址 +## 1.4.1(2021-04-29) +- 修复 组件内放置 input 、textarea 组件,无法聚焦的问题 +## 1.4.0 (2021-04-29) +- 新增 type 属性的 left\right 值,支持左右弹出 +- 新增 open(String:type) 方法参数 ,可以省略 type 属性 ,直接传入类型打开指定弹窗 +- 新增 backgroundColor 属性,可定义主窗口背景色,默认不显示背景色 +- 新增 safeArea 属性,是否适配底部安全区 +- 修复 App\h5\微信小程序底部安全区占位不对的Bug +- 修复 App 端弹出等待的Bug +- 优化 提升低配设备性能,优化动画卡顿问题 +- 优化 更简单的组件自定义方式 +## 1.2.9(2021-02-05) +- 优化 组件引用关系,通过uni_modules引用组件 +## 1.2.8(2021-02-05) +- 调整为uni_modules目录规范 +## 1.2.7(2021-02-05) +- 调整为uni_modules目录规范 +- 新增 支持 PC 端 +- 新增 uni-popup-message 、uni-popup-dialog扩展组件支持 PC 端 diff --git a/uni_modules/uni-popup/components/uni-popup-dialog/keypress.js b/uni_modules/uni-popup/components/uni-popup-dialog/keypress.js new file mode 100644 index 0000000..6ef26a2 --- /dev/null +++ b/uni_modules/uni-popup/components/uni-popup-dialog/keypress.js @@ -0,0 +1,45 @@ +// #ifdef H5 +export default { + name: 'Keypress', + props: { + disable: { + type: Boolean, + default: false + } + }, + mounted () { + const keyNames = { + esc: ['Esc', 'Escape'], + tab: 'Tab', + enter: 'Enter', + space: [' ', 'Spacebar'], + up: ['Up', 'ArrowUp'], + left: ['Left', 'ArrowLeft'], + right: ['Right', 'ArrowRight'], + down: ['Down', 'ArrowDown'], + delete: ['Backspace', 'Delete', 'Del'] + } + const listener = ($event) => { + if (this.disable) { + return + } + const keyName = Object.keys(keyNames).find(key => { + const keyName = $event.key + const value = keyNames[key] + return value === keyName || (Array.isArray(value) && value.includes(keyName)) + }) + if (keyName) { + // 避免和其他按键事件冲突 + setTimeout(() => { + this.$emit(keyName, {}) + }, 0) + } + } + document.addEventListener('keyup', listener) + this.$once('hook:beforeDestroy', () => { + document.removeEventListener('keyup', listener) + }) + }, + render: () => {} +} +// #endif diff --git a/uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue b/uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue new file mode 100644 index 0000000..b5eee79 --- /dev/null +++ b/uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue @@ -0,0 +1,275 @@ + + + + {{titleText}} + + + + {{content}} + + + + + + + + + + {{closeText}} + + + {{okText}} + + + + + + + + + diff --git a/uni_modules/uni-popup/components/uni-popup-message/uni-popup-message.vue b/uni_modules/uni-popup/components/uni-popup-message/uni-popup-message.vue new file mode 100644 index 0000000..91370a8 --- /dev/null +++ b/uni_modules/uni-popup/components/uni-popup-message/uni-popup-message.vue @@ -0,0 +1,143 @@ + + + + + {{message}} + + + + + + + diff --git a/uni_modules/uni-popup/components/uni-popup-share/uni-popup-share.vue b/uni_modules/uni-popup/components/uni-popup-share/uni-popup-share.vue new file mode 100644 index 0000000..01b34d6 --- /dev/null +++ b/uni_modules/uni-popup/components/uni-popup-share/uni-popup-share.vue @@ -0,0 +1,189 @@ + + + {{shareTitleText}} + + + + + {{item.text}} + + + + + + {{cancelText}} + + + + + + diff --git a/uni_modules/uni-popup/components/uni-popup/i18n/en.json b/uni_modules/uni-popup/components/uni-popup/i18n/en.json new file mode 100644 index 0000000..7f1bd06 --- /dev/null +++ b/uni_modules/uni-popup/components/uni-popup/i18n/en.json @@ -0,0 +1,7 @@ +{ + "uni-popup.cancel": "cancel", + "uni-popup.ok": "ok", + "uni-popup.placeholder": "pleace enter", + "uni-popup.title": "Hint", + "uni-popup.shareTitle": "Share to" +} diff --git a/uni_modules/uni-popup/components/uni-popup/i18n/index.js b/uni_modules/uni-popup/components/uni-popup/i18n/index.js new file mode 100644 index 0000000..de7509c --- /dev/null +++ b/uni_modules/uni-popup/components/uni-popup/i18n/index.js @@ -0,0 +1,8 @@ +import en from './en.json' +import zhHans from './zh-Hans.json' +import zhHant from './zh-Hant.json' +export default { + en, + 'zh-Hans': zhHans, + 'zh-Hant': zhHant +} diff --git a/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hans.json b/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hans.json new file mode 100644 index 0000000..5e3003c --- /dev/null +++ b/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hans.json @@ -0,0 +1,7 @@ +{ + "uni-popup.cancel": "取消", + "uni-popup.ok": "确定", + "uni-popup.placeholder": "请输入", + "uni-popup.title": "提示", + "uni-popup.shareTitle": "分享到" +} diff --git a/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hant.json b/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hant.json new file mode 100644 index 0000000..13e39eb --- /dev/null +++ b/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hant.json @@ -0,0 +1,7 @@ +{ + "uni-popup.cancel": "取消", + "uni-popup.ok": "確定", + "uni-popup.placeholder": "請輸入", + "uni-popup.title": "提示", + "uni-popup.shareTitle": "分享到" +} diff --git a/uni_modules/uni-popup/components/uni-popup/keypress.js b/uni_modules/uni-popup/components/uni-popup/keypress.js new file mode 100644 index 0000000..62dda46 --- /dev/null +++ b/uni_modules/uni-popup/components/uni-popup/keypress.js @@ -0,0 +1,45 @@ +// #ifdef H5 +export default { + name: 'Keypress', + props: { + disable: { + type: Boolean, + default: false + } + }, + mounted () { + const keyNames = { + esc: ['Esc', 'Escape'], + tab: 'Tab', + enter: 'Enter', + space: [' ', 'Spacebar'], + up: ['Up', 'ArrowUp'], + left: ['Left', 'ArrowLeft'], + right: ['Right', 'ArrowRight'], + down: ['Down', 'ArrowDown'], + delete: ['Backspace', 'Delete', 'Del'] + } + const listener = ($event) => { + if (this.disable) { + return + } + const keyName = Object.keys(keyNames).find(key => { + const keyName = $event.key + const value = keyNames[key] + return value === keyName || (Array.isArray(value) && value.includes(keyName)) + }) + if (keyName) { + // 避免和其他按键事件冲突 + setTimeout(() => { + this.$emit(keyName, {}) + }, 0) + } + } + document.addEventListener('keyup', listener) + // this.$once('hook:beforeDestroy', () => { + // document.removeEventListener('keyup', listener) + // }) + }, + render: () => {} +} +// #endif diff --git a/uni_modules/uni-popup/components/uni-popup/popup.js b/uni_modules/uni-popup/components/uni-popup/popup.js new file mode 100644 index 0000000..c4e5781 --- /dev/null +++ b/uni_modules/uni-popup/components/uni-popup/popup.js @@ -0,0 +1,26 @@ + +export default { + data() { + return { + + } + }, + created(){ + this.popup = this.getParent() + }, + methods:{ + /** + * 获取父元素实例 + */ + getParent(name = 'uniPopup') { + let parent = this.$parent; + let parentName = parent.$options.name; + while (parentName !== name) { + parent = parent.$parent; + if (!parent) return false + parentName = parent.$options.name; + } + return parent; + }, + } +} diff --git a/uni_modules/uni-popup/components/uni-popup/uni-popup.vue b/uni_modules/uni-popup/components/uni-popup/uni-popup.vue new file mode 100644 index 0000000..54afee2 --- /dev/null +++ b/uni_modules/uni-popup/components/uni-popup/uni-popup.vue @@ -0,0 +1,473 @@ + + + + + + + + + + + + + + + + + + diff --git a/uni_modules/uni-popup/package.json b/uni_modules/uni-popup/package.json new file mode 100644 index 0000000..f40556b --- /dev/null +++ b/uni_modules/uni-popup/package.json @@ -0,0 +1,87 @@ +{ + "id": "uni-popup", + "displayName": "uni-popup 弹出层", + "version": "1.8.3", + "description": " Popup 组件,提供常用的弹层", + "keywords": [ + "uni-ui", + "弹出层", + "弹窗", + "popup", + "弹框" + ], + "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", + "uni-transition" + ], + "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" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} diff --git a/uni_modules/uni-popup/readme.md b/uni_modules/uni-popup/readme.md new file mode 100644 index 0000000..fdad4b3 --- /dev/null +++ b/uni_modules/uni-popup/readme.md @@ -0,0 +1,17 @@ + + +## Popup 弹出层 +> **组件名:uni-popup** +> 代码块: `uPopup` +> 关联组件:`uni-transition` + + +弹出层组件,在应用中弹出一个消息提示窗口、提示框等 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-popup) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 + + + + + diff --git a/uni_modules/uni-transition/changelog.md b/uni_modules/uni-transition/changelog.md index b1a824b..70c1cd4 100644 --- a/uni_modules/uni-transition/changelog.md +++ b/uni_modules/uni-transition/changelog.md @@ -1,3 +1,5 @@ +## 1.3.2(2023-05-04) +- 修复 NVUE 平台报错的问题 ## 1.3.1(2021-11-23) - 修复 init 方法初始化问题 ## 1.3.0(2021-11-19) diff --git a/uni_modules/uni-transition/components/uni-transition/createAnimation.js b/uni_modules/uni-transition/components/uni-transition/createAnimation.js index 5f54365..8f89b18 100644 --- a/uni_modules/uni-transition/components/uni-transition/createAnimation.js +++ b/uni_modules/uni-transition/components/uni-transition/createAnimation.js @@ -10,7 +10,10 @@ const nvueAnimation = uni.requireNativePlugin('animation') class MPAnimation { constructor(options, _this) { this.options = options - this.animation = uni.createAnimation(options) + // 在iOS10+QQ小程序平台下,传给原生的对象一定是个普通对象而不是Proxy对象,否则会报parameter should be Object instead of ProxyObject的错误 + this.animation = uni.createAnimation({ + ...options + }) this.currentStepAnimates = {} this.next = 0 this.$ = _this diff --git a/uni_modules/uni-transition/components/uni-transition/uni-transition.vue b/uni_modules/uni-transition/components/uni-transition/uni-transition.vue index 0d739bd..bfbba93 100644 --- a/uni_modules/uni-transition/components/uni-transition/uni-transition.vue +++ b/uni_modules/uni-transition/components/uni-transition/uni-transition.vue @@ -1,5 +1,10 @@ - + + + + + +