diff --git a/project.private.config.json b/project.private.config.json index 153bcdb..d45e31a 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -81,5 +81,5 @@ ] } }, - "libVersion": "3.6.3" + "libVersion": "3.7.0" } \ No newline at end of file diff --git a/src/miniprogram_npm/dayjs/index.js b/src/miniprogram_npm/dayjs/index.js index 18ba1e5..fc4994d 100644 --- a/src/miniprogram_npm/dayjs/index.js +++ b/src/miniprogram_npm/dayjs/index.js @@ -4,10 +4,10 @@ var __DEFINE__ = function(modId, func, req) { var m = { exports: {}, _tempexport var __REQUIRE__ = function(modId, source) { if(!__MODS__[modId]) return require(source); if(!__MODS__[modId].status) { var m = __MODS__[modId].m; m._exports = m._tempexports; var desp = Object.getOwnPropertyDescriptor(m, "exports"); if (desp && desp.configurable) Object.defineProperty(m, "exports", { set: function (val) { if(typeof val === "object" && val !== m._exports) { m._exports.__proto__ = val.__proto__; Object.keys(val).forEach(function (k) { m._exports[k] = val[k]; }); } m._tempexports = val }, get: function () { return m._tempexports; } }); __MODS__[modId].status = 1; __MODS__[modId].func(__MODS__[modId].req, m, m.exports); } return __MODS__[modId].m.exports; }; var __REQUIRE_WILDCARD__ = function(obj) { if(obj && obj.__esModule) { return obj; } else { var newObj = {}; if(obj != null) { for(var k in obj) { if (Object.prototype.hasOwnProperty.call(obj, k)) newObj[k] = obj[k]; } } newObj.default = obj; return newObj; } }; var __REQUIRE_DEFAULT__ = function(obj) { return obj && obj.__esModule ? obj.default : obj; }; -__DEFINE__(1733364594195, function(require, module, exports) { +__DEFINE__(1733812530209, function(require, module, exports) { !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).dayjs=e()}(this,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return b},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t) { - this.setData({ - toastShow: true, - toastType: 3, - }); + .catch((err) => { + if (err.data.code === 403) { + this.setData({ + toastShow: true, + toastType: 3, + }); + } }); }, handleView() { @@ -184,8 +186,12 @@ Page({ this.innerAudioContext.onTimeUpdate(listener); this.innerAudioContext.onEnded(() => { this.innerAudioContext?.seek(0); + const time = `00:00/${this.formatTime(chapter.AudioUrl.duration)}`; this.setData({ play: false, + progress: 0, + time, + currentTime: 0, }); }); this.innerAudioContext.onPlay(() => { @@ -240,9 +246,6 @@ Page({ wx.navigateBack(); }, handleAuthConform() { - this.setData({ - toastShow: false, - }); wx.navigateTo({ url: '/pages/login/index?back=1', }); diff --git a/src/pages/classify/index.scss b/src/pages/classify/index.scss index bd89f98..ab0684d 100644 --- a/src/pages/classify/index.scss +++ b/src/pages/classify/index.scss @@ -60,6 +60,11 @@ page { } } } + .der{ + font-size: 28rpx; + color: #999999; + text-align: center; + } .card { margin: 32rpx 32rpx 24rpx; padding: 24rpx; diff --git a/src/pages/classify/index.wxml b/src/pages/classify/index.wxml index 6e7a1d8..42b6ef2 100644 --- a/src/pages/classify/index.wxml +++ b/src/pages/classify/index.wxml @@ -34,7 +34,7 @@ - {{item.BrowseNum}} + {{item.BrowseNum || 0}} + — — 以下为本分类下其他内容 — — @@ -62,7 +63,7 @@ - {{item.BrowseNum}} + {{item.BrowseNum || 0}} -
+ 没有更多了 -
+
diff --git a/src/pages/collection/index.ts b/src/pages/collection/index.ts index 1c5d259..747aef5 100644 --- a/src/pages/collection/index.ts +++ b/src/pages/collection/index.ts @@ -46,11 +46,11 @@ Page({ }, handleCollect(e) { const { index, list } = e.currentTarget.dataset; - const { Id } = this.data[list][index]; + const { BookId } = this.data[list][index]; wx.ajax({ method: 'POST', url: '?r=shizhong/book/collect', - data: { BookId: Id }, + data: { BookId }, }).then(() => { wx.showToast({ title: '收藏成功', @@ -63,11 +63,11 @@ Page({ }, handleUnCollect(e) { const { index, list } = e.currentTarget.dataset; - const { Id } = this.data[list][index]; + const { BookId } = this.data[list][index]; wx.ajax({ method: 'POST', url: '?r=shizhong/book/cancel-collect', - data: { BookId: Id }, + data: { BookId }, }).then(() => { wx.showToast({ title: '取消收藏', diff --git a/src/pages/collection/index.wxml b/src/pages/collection/index.wxml index 34445d6..9be2f43 100644 --- a/src/pages/collection/index.wxml +++ b/src/pages/collection/index.wxml @@ -17,7 +17,7 @@ - {{item.BrowseNum}} + {{item.BrowseNum || 0}} 我的收藏 - + 问卷调查 diff --git a/src/pages/topic/index.ts b/src/pages/topic/index.ts index ec88e34..65d1b83 100644 --- a/src/pages/topic/index.ts +++ b/src/pages/topic/index.ts @@ -62,9 +62,11 @@ Page({ relove: true, }); app.waitLogin().then(() => { - wx.reLaunch({ - url: '/pages/home/index', - }); + setTimeout(() => { + wx.reLaunch({ + url: '/pages/home/index', + }); + }, 1500); }); }); }, diff --git a/src/pages/userInfo/index.ts b/src/pages/userInfo/index.ts index 72445b9..20bbd74 100644 --- a/src/pages/userInfo/index.ts +++ b/src/pages/userInfo/index.ts @@ -41,6 +41,10 @@ Page({ }, }).then(() => { app.getUserInfo(this); + wx.showToast({ + title: '保存成功', + icon: 'none', + }); }); }, });