diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json index 582561b..a49094c 100644 --- a/.hbuilderx/launch.json +++ b/.hbuilderx/launch.json @@ -1,16 +1,20 @@ -{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/ - // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数 - "version": "0.0", - "configurations": [{ - "app-plus" : - { - "launchtype" : "local" - }, - "default" : - { - "launchtype" : "local" - }, - "type" : "uniCloud" - } +{ + // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/ + // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数 + "version" : "0.0", + "configurations" : [ + { + "app-plus" : { + "launchtype" : "local" + }, + "default" : { + "launchtype" : "local" + }, + "type" : "uniCloud" + }, + { + "playground" : "custom", + "type" : "uni-app:app-ios" + } ] } diff --git a/components/commBookItemThree/index.vue b/components/commBookItemThree/index.vue index 7ce5fa0..979cfff 100644 --- a/components/commBookItemThree/index.vue +++ b/components/commBookItemThree/index.vue @@ -88,8 +88,9 @@ }) }, toNovelReading() { + const bookId = this.bookId; uni.navigateTo({ - url: `/pages/novelReading/novelReading` + url: `/pages/novelReading/novelReading?sid=${bookId}` }) } } diff --git a/manifest.json b/manifest.json index 85a9c97..31f4835 100644 --- a/manifest.json +++ b/manifest.json @@ -1,5 +1,5 @@ { - "name" : "app_ancientSayings", + "name" : "古言小说", "appid" : "__UNI__474F351", "description" : "", "versionName" : "1.0.0", @@ -15,6 +15,7 @@ "offset" : "none|auto" // 底部安全区域偏移,"none"表示不空出安全区域,"auto"自动计算空出安全区域,默认值为"none" } }, + "bounce" : "none", // 将回弹属性关掉 "usingComponents" : true, "nvueStyleCompiler" : "uni-app", "compilerVersion" : 3, @@ -49,39 +50,44 @@ ] }, /* ios打包配置 */ - "ios" : {}, + "ios" : { + "dSYMs" : false + }, /* SDK配置 */ - "sdkConfigs" : {}, + "sdkConfigs" : { + "ad" : {} + }, "icons" : { "android" : { - "hdpi" : "static/app_logo.png", - "xhdpi" : "static/app_logo.png", - "xxhdpi" : "static/app_logo.png", - "xxxhdpi" : "static/app_logo.png" + "hdpi" : "unpackage/res/icons/72x72.png", + "xhdpi" : "unpackage/res/icons/96x96.png", + "xxhdpi" : "unpackage/res/icons/144x144.png", + "xxxhdpi" : "unpackage/res/icons/192x192.png" }, "ios" : { - "appstore" : "static/app_logo.png", + // "appstore" : "static/app_logo.png", "iphone" : { - "app@2x" : "static/app_logo.png", - "app@3x" : "static/app_logo.png", - "spotlight@2x" : "static/app_logo.png", - "spotlight@3x" : "static/app_logo.png", - "settings@2x" : "static/app_logo.png", - "settings@3x" : "static/app_logo.png", - "notification@2x" : "static/app_logo.png", - "notification@3x" : "static/app_logo.png" + "app@2x" : "unpackage/res/icons/120x120.png", + "app@3x" : "unpackage/res/icons/180x180.png", + "spotlight@2x" : "unpackage/res/icons/80x80.png", + "spotlight@3x" : "unpackage/res/icons/120x120.png", + "settings@2x" : "unpackage/res/icons/58x58.png", + "settings@3x" : "unpackage/res/icons/87x87.png", + "notification@2x" : "unpackage/res/icons/40x40.png", + "notification@3x" : "unpackage/res/icons/60x60.png" }, "ipad" : { - "app" : "static/app_logo.png", - "app@2x" : "static/app_logo.png", - "proapp@2x" : "static/app_logo.png", - "spotlight" : "static/app_logo.png", - "spotlight@2x" : "static/app_logo.png", - "settings" : "static/app_logo.png", - "settings@2x" : "static/app_logo.png", - "notification@2x" : "static/app_logo.png", - "notification" : "static/app_logo.png" - } + "app" : "unpackage/res/icons/76x76.png", + "app@2x" : "unpackage/res/icons/152x152.png", + "proapp@2x" : "unpackage/res/icons/167x167.png", + "spotlight" : "unpackage/res/icons/40x40.png", + "spotlight@2x" : "unpackage/res/icons/80x80.png", + "settings" : "unpackage/res/icons/29x29.png", + "settings@2x" : "unpackage/res/icons/58x58.png", + "notification@2x" : "unpackage/res/icons/40x40.png", + "notification" : "unpackage/res/icons/20x20.png" + }, + "appstore" : "unpackage/res/icons/1024x1024.png" } } } diff --git a/pages.json b/pages.json index 3e3b8b0..d365889 100644 --- a/pages.json +++ b/pages.json @@ -1,23 +1,53 @@ { - "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages + "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages + { + // 初始化页面 + "path": "pages/initialization/initialization", + "style": { + "navigationBarTitleText": "", + "navigationStyle": "custom", + "app-plus": { + "bounce": "none" // 将回弹属性关掉 + } + } + }, + { + // 协议和政策 + "path": "pages/agreement/agreement", + "style": { + "navigationBarTitleText": "", + // "navigationStyle": "custom", + "app-plus": { + "bounce": "none" ,// 将回弹属性关掉 + "safearea": { + //安全区域配置,仅ioS平台生效 + "background": "#FFFFFF", //安全区域外的背景颜色,默认值为"#FFFFFF" + "bottom": { + // 底部安全区域配置 + "offset": "auto" // 底部安全区域偏移,"none"表示不空出安全区域,"auto"自动计算空出安全区域,默认值为"none" + } + } + } + } + }, { "path": "pages/bookCity/bookCity/index", "style": { "navigationBarTitleText": "书城", - "navigationStyle": "custom" - // "app-plus": { - // "titleView": false, //不启用系统导航 - // "statusbar": { - // "immersed": false - // } - // } + "navigationStyle": "custom", + "app-plus": { + "bounce": "none" // 将回弹属性关掉 + } } }, { "path": "pages/bookshelf/bookshelf/index", "style": { "navigationBarTitleText": "书架", - "navigationStyle": "custom" + "navigationStyle": "custom", + "app-plus": { + "bounce": "none" // 将回弹属性关掉 + } } }, { @@ -25,7 +55,10 @@ "style": { // 登录页面 "navigationBarTitleText": "", - "navigationStyle": "custom" + "navigationStyle": "custom", + "app-plus": { + "bounce": "none" // 将回弹属性关掉 + } } }, { @@ -33,56 +66,83 @@ "style": { // 登录验证码页面 "navigationBarTitleText": "", - "navigationStyle": "custom" + "navigationStyle": "custom", + "app-plus": { + "bounce": "none" // 将回弹属性关掉 + } } }, { "path": "pages/classification/classification/index", "style": { "navigationBarTitleText": "分类", - "navigationStyle": "custom" + "navigationStyle": "custom", + "app-plus": { + "bounce": "none" // 将回弹属性关掉 + } } }, { "path": "pages/myInfo/myInfo/index", "style": { - "navigationBarTitleText": "我的" + "navigationBarTitleText": "我的", + "app-plus": { + "bounce": "none" // 将回弹属性关掉 + } } }, { "path": "pages/myInfo/aboutMy/index", "style": { - "navigationBarTitleText": "关于我们" + "navigationBarTitleText": "关于我们", + "app-plus": { + "bounce": "none" // 将回弹属性关掉 + } } }, { "path": "pages/myInfo/mySetUp/index", "style": { - "navigationBarTitleText": "设置" + "navigationBarTitleText": "设置", + "app-plus": { + "bounce": "none" // 将回弹属性关掉 + } } }, { "path": "pages/myInfo/problemList/index", "style": { - "navigationBarTitleText": "常见问题" + "navigationBarTitleText": "常见问题", + "app-plus": { + "bounce": "none" // 将回弹属性关掉 + } } }, { "path": "pages/myInfo/problemDetail/index", "style": { - "navigationBarTitleText": "常见问题" + "navigationBarTitleText": "常见问题", + "app-plus": { + "bounce": "none" // 将回弹属性关掉 + } } }, { "path": "pages/voucherCenter/index", "style": { - "navigationBarTitleText": "充值中心" + "navigationBarTitleText": "充值中心", + "app-plus": { + "bounce": "none" // 将回弹属性关掉 + } } }, { "path": "pages/readingRecords/index", "style": { - "navigationBarTitleText": "阅读记录" + "navigationBarTitleText": "阅读记录", + "app-plus": { + "bounce": "none" // 将回弹属性关掉 + } } }, { @@ -90,14 +150,20 @@ "style": { "navigationBarTitleText": "签到领取书币", "navigationStyle": "custom", - "navigationBarTextStyle": "white" + "navigationBarTextStyle": "white", + "app-plus": { + "bounce": "none" // 将回弹属性关掉 + } } }, { "path": "pages/booksListAll/index", "style": { //完本和新书的 书籍列表 - "navigationBarTitleText": "" + "navigationBarTitleText": "", + "app-plus": { + "bounce": "none" // 将回弹属性关掉 + } // "app-plus": { // "safearea": { //安全区域配置,仅ioS平台生效 // "background": "#FFFFFF", //安全区域外的背景颜色,默认值为"#FFFFFF" @@ -119,45 +185,58 @@ { "path": "pages/booksTheCharts/index", "style": { - "navigationBarTitleText": "排行榜", - "navigationBarBackgroundColor": "transparent", + // booksTheCharts + "navigationBarTitleText": "", + // "navigationBarBackgroundColor": "transparent", "navigationStyle": "custom", - "app-plus": { - "titleNView": { - "backgroundColor": "transparent", - "background": "transparent" - } - } + // "app-plus": { + // "titleNView": { + // "backgroundColor": "transparent", + // "background": "transparent" + // } + // } // "enablePullDownRefresh": false, // "disableScroll": true, - // "app-plus": { - // "bounce": "none" // 将回弹属性关掉 - // } + "app-plus": { + "bounce": "none" // 将回弹属性关掉 + } } }, { "path": "pages/voucherCenterDetail/index", "style": { - "navigationBarTitleText": "充值记录" + "navigationBarTitleText": "充值记录", + "app-plus": { + "bounce": "none" // 将回弹属性关掉 + } } }, { "path": "pages/bookCoinDetail/bookCoinDetail", "style": { - "navigationBarTitleText": "书币明细" + "navigationBarTitleText": "书币明细", + "app-plus": { + "bounce": "none" // 将回弹属性关掉 + } } }, { "path": "pages/giveCoinDetail/giveCoinDetail", "style": { - "navigationBarTitleText": "赠币明细" + "navigationBarTitleText": "赠币明细", + "app-plus": { + "bounce": "none" // 将回弹属性关掉 + } } }, { "path": "pages/booksSearchList/booksSearchList", "style": { - "navigationBarTitleText": "搜索" + "navigationBarTitleText": "搜索", + "app-plus": { + "bounce": "none" // 将回弹属性关掉 + } } }, { @@ -177,14 +256,20 @@ "path": "pages/booksReadingDetail/booksReadingDetail", "style": { // 书籍详细页面 - "navigationBarTitleText": "" + "navigationBarTitleText": "", + "app-plus": { + "bounce": "none" // 将回弹属性关掉 + } } }, { "path": "pages/bookRecommendList/bookRecommendList", "style": { // 书籍章节列表 - "navigationBarTitleText": "" + "navigationBarTitleText": "", + "app-plus": { + "bounce": "none" // 将回弹属性关掉 + } } } ], diff --git a/pages/agreement/agreement.vue b/pages/agreement/agreement.vue new file mode 100644 index 0000000..2ad535e --- /dev/null +++ b/pages/agreement/agreement.vue @@ -0,0 +1,56 @@ + + + + + \ No newline at end of file diff --git a/pages/bookCity/bookCity/index.vue b/pages/bookCity/bookCity/index.vue index bf2f2ac..5050660 100644 --- a/pages/bookCity/bookCity/index.vue +++ b/pages/bookCity/bookCity/index.vue @@ -5,7 +5,11 @@ - + @@ -20,6 +24,9 @@ import { isGetSystemInfo } from '@/utils/systemInfo.js' + import { + baseUrlImage + } from '@/utils/utils' export default { components: { CommNavBar, @@ -38,22 +45,86 @@ // }, ], navBarActive: '1', - barHeight: 0, + // 全网火爆 + explosiveDataList: [], + // 榜单 + rankingDataList: [], + rankingDataObj: {}, + headerListActive: '1', + // 人气作品 + popularityDataList: [], + // 原创优选 + originalDataList: [], + // 书友推荐 + recommendDataList: [], + // 跟多书籍 + moreBooksList: [], + swiperList: [], } }, - onLoad() { - - - }, + onLoad() {}, onShow() { - this.$nextTick(() => { - this.$refs.bookCityHome.isGetIndex() - }) + // this.$nextTick(() => { + // this.$refs.bookCityHome.isGetIndex() + // }) + this.isGetHomeIndex(); }, methods: { handelCommNavBar(event) { this.navBarActive = event.currentTarget.dataset.id - } + }, + isGetHomeIndex() { + uni.showLoading({ + title: '加载中...' + }); + // 也可以直接通过uni.$u.post发出请求,注意此处需要写上接口地址 + const parameter = { + custom: { + token: true + } + } + uni.$u.http.post('/Index', {}, parameter).then((res) => { + uni.hideLoading(); + if (res.status == 1) { + const { + ads, + module1, + charts1, + charts2, + charts3, + charts4, + module3, + module4, + module5, + module6 + } = res.data; + + this.swiperList = baseUrlImage(ads); + this.explosiveDataList = baseUrlImage(module1); + this.explosiveDataList = baseUrlImage(module1); + const rankingDataObj = { + '1': baseUrlImage(charts1), + '2': baseUrlImage(charts2), + '3': baseUrlImage(charts3), + '4': baseUrlImage(charts4) + } + this.rankingDataList = rankingDataObj[this.headerListActive]; + this.rankingDataObj = rankingDataObj; + this.popularityDataList = baseUrlImage(module3); + this.originalDataList = baseUrlImage(module4); + this.recommendDataList = baseUrlImage(module5); + this.moreBooksList = baseUrlImage(module6); + } + }).catch((err) => { + uni.hideLoading(); + console.log(err, "========") + }) + }, + handelRankingList(event) { + const id = event.currentTarget.dataset.id; + this.headerListActive = id; + this.rankingDataList = this.rankingDataObj[id]; + }, } } @@ -81,9 +152,8 @@ bottom: 0; left: 0; right: 0; - .scroll_y_item { - - } + + .scroll_y_item {} } } } diff --git a/pages/bookCity/components/home/index.vue b/pages/bookCity/components/home/index.vue index 3603d06..2a05cb5 100644 --- a/pages/bookCity/components/home/index.vue +++ b/pages/bookCity/components/home/index.vue @@ -76,6 +76,9 @@ import { baseUrlImage } from '@/utils/utils' + import { + myGetStorage, + } from '@/utils/storage/index.js'; export default { components: { @@ -86,10 +89,57 @@ RecommendList, CommFooter, }, + props: { + explosiveDataList: { + type: Array, + default: () => { + return []; + } + }, + rankingDataList: { + type: Array, + default: () => { + return []; + } + }, + headerListActive: { + type: String, + default: '' + }, + popularityDataList: { + type: Array, + default: () => { + return []; + } + }, + originalDataList: { + type: Array, + default: () => { + return []; + } + }, + recommendDataList: { + type: Array, + default: () => { + return []; + } + }, + moreBooksList: { + type: Array, + default: () => { + return []; + } + }, + swiperList: { + type: Array, + default: () => { + return []; + } + } + }, data() { return { baseUrl: config.baseUrl, - swiperList: [], list: [{ name: the_charts, title: '榜单', @@ -110,88 +160,31 @@ { name: recharge, title: '充值', - toPath: '/pages/voucherCenter/index' + toPath: '/pages/voucherCenter/index', + type: 'recharge' }, ], - // 全网火爆 - explosiveDataList: [], - // 榜单 - rankingDataList: [], - rankingDataObj: {}, - headerListActive: '1', - // 人气作品 - popularityDataList: [], - // 原创优选 - originalDataList: [], - // 书友推荐 - recommendDataList: [], - // 跟多书籍 - moreBooksList: [] } - }, - mounted() { - }, methods: { toGridItemPath(row) { - if (row.toPath) { + const token = myGetStorage('token'); + if (row.type == 'recharge' && !token) { + uni.navigateTo({ + url: `/pages/login/login?to=3` + }) + } else if (row.toPath) { uni.navigateTo({ url: `${row.toPath}?titleType=${row.type}` }) } }, handelRankingList(event) { - const id = event.currentTarget.dataset.id; - this.headerListActive = id; - this.rankingDataList = this.rankingDataObj[id]; + this.$emit('handelRankingList', event) + // const id = event.currentTarget.dataset.id; + // this.headerListActive = id; + // this.rankingDataList = this.rankingDataObj[id]; }, - isGetIndex() { - uni.showLoading({ - title: '加载中...' - }); - // 也可以直接通过uni.$u.post发出请求,注意此处需要写上接口地址 - const parameter = { - custom: { - token: true - } - } - uni.$u.http.post('/Index', {}, parameter).then((res) => { - uni.hideLoading(); - if (res.status == 1) { - const { - ads, - module1, - charts1, - charts2, - charts3, - charts4, - module3, - module4, - module5, - module6 - } = res.data; - - this.swiperList = baseUrlImage(ads); - this.explosiveDataList = baseUrlImage(module1); - this.explosiveDataList = baseUrlImage(module1); - const rankingDataObj = { - '1': baseUrlImage(charts1), - '2': baseUrlImage(charts2), - '3': baseUrlImage(charts3), - '4': baseUrlImage(charts4) - } - this.rankingDataList = rankingDataObj[this.headerListActive]; - this.rankingDataObj = rankingDataObj; - this.popularityDataList = baseUrlImage(module3); - this.originalDataList = baseUrlImage(module4); - this.recommendDataList = baseUrlImage(module5); - this.moreBooksList = baseUrlImage(module6); - } - }).catch((err) => { - uni.hideLoading(); - console.log(err, "========") - }) - } } } diff --git a/pages/booksReadingDetail/bookOtherInfo.vue b/pages/booksReadingDetail/bookOtherInfo.vue index 2db7839..2788676 100644 --- a/pages/booksReadingDetail/bookOtherInfo.vue +++ b/pages/booksReadingDetail/bookOtherInfo.vue @@ -33,8 +33,7 @@ {{bookInfo.size}} - - 字 + 万字 diff --git a/pages/booksReadingDetail/booksReadingDetail.vue b/pages/booksReadingDetail/booksReadingDetail.vue index 77f68ce..07259bc 100644 --- a/pages/booksReadingDetail/booksReadingDetail.vue +++ b/pages/booksReadingDetail/booksReadingDetail.vue @@ -133,7 +133,7 @@ toNovelReading() { const bookInfo = this.bookInfo; uni.navigateTo({ - url: `/pages/novelReading/novelReading?sid=${bookInfo.id}&n=${bookInfo.title}` + url: `/pages/novelReading/novelReading?sid=${bookInfo.id}` }) } } diff --git a/pages/initialization/initialization.vue b/pages/initialization/initialization.vue new file mode 100644 index 0000000..ff67033 --- /dev/null +++ b/pages/initialization/initialization.vue @@ -0,0 +1,161 @@ + + + + + \ No newline at end of file diff --git a/pages/loginMobile/loginMobile.vue b/pages/loginMobile/loginMobile.vue index f226c5e..2dbb673 100644 --- a/pages/loginMobile/loginMobile.vue +++ b/pages/loginMobile/loginMobile.vue @@ -51,7 +51,8 @@ let toPathUrl = '' const toPathObj = { '1': `/pages/novelReading/novelReading?sid=${bookSid}&id=${bookId}&c=${chapterorder}`, - '2':`/pages/myInfo/myInfo/index` + '2': `/pages/myInfo/myInfo/index`, + '3': `/pages/bookCity/bookCity/index` } if (toPathObj[toPath]) { toPathUrl = `${toPathObj[toPath]}` diff --git a/pages/novelReading/novelReading.vue b/pages/novelReading/novelReading.vue index 2aabaad..b949fd2 100644 --- a/pages/novelReading/novelReading.vue +++ b/pages/novelReading/novelReading.vue @@ -11,7 +11,7 @@ :slide="20" :enablePreload="false" @loadmore="loadmoreContent" @clickTo="handelShowStepUp" :clickOption="{width:200,height: 400,left:'auto',top:'auto'}" :topGap="0" :bottomGap="20" @change="currentChange"> -