diff --git a/src/components/global-toast/index.scss b/src/components/global-toast/index.scss deleted file mode 100644 index ef89137..0000000 --- a/src/components/global-toast/index.scss +++ /dev/null @@ -1,83 +0,0 @@ -.popup1 { - padding: 110rpx 0 0; - width: 651rpx; - height: 820rpx; - box-sizing: border-box; - - .title { - font-size: 40rpx; - color: #222222; - font-weight: bold; - text-align: center; - } - - .code { - margin: 48rpx auto 0; - display: block; - width: 304rpx; - height: 304rpx; - } - - .tip { - margin-top: 40rpx; - font-size: 32rpx; - color: #65686c; - text-align: center; - } - .close { - margin: 120rpx auto 0; - display: block; - width: 72rpx; - height: 72rpx; - } -} - -.popup3 { - .badge { - position: relative; - z-index: 1; - display: block; - margin: 0 auto; - width: 264rpx; - height: 264rpx; - } - .container { - margin-top: -130rpx; - padding: 136rpx 44rpx 0; - width: 622rpx; - height: 632rpx; - box-sizing: border-box; - background: linear-gradient(180deg, #e7f8ff 0%, #ffffff 100%); - border-radius: 36rpx 36rpx 36rpx 36rpx; - .title { - font-size: 48rpx; - color: #222222; - font-weight: bold; - text-align: center; - } - .tip { - margin-top: 24rpx; - font-size: 36rpx; - color: #65686c; - line-height: 56rpx; - } - .btn1 { - margin-top: 44rpx; - font-size: 36rpx; - color: #ffffff; - height: 88rpx; - display: flex; - align-items: center; - justify-content: center; - background: #3795f7; - border-radius: 96rpx 96rpx 96rpx 96rpx; - } - .btn2 { - margin-top: 16rpx; - padding: 16rpx 32rpx; - font-size: 32rpx; - color: #3795f7; - text-align: center; - } - } -} diff --git a/src/components/global-toast/index.ts b/src/components/global-toast/index.ts deleted file mode 100644 index 5be460c..0000000 --- a/src/components/global-toast/index.ts +++ /dev/null @@ -1,39 +0,0 @@ -const _app = getApp(); - -// pages/story/a.ts -Component({ - /** - * 组件的属性列表 - */ - properties: { - show: { - type: Boolean, - value: false, - }, - type: { - type: Number, - value: 0, - }, - params: { - type: Object, - value: {}, - }, - }, - - /** - * 组件的初始数据 - */ - data: {}, - - /** - * 组件的方法列表 - */ - methods: { - handleConform() { - this.triggerEvent('conform'); - }, - handleClose() { - this.triggerEvent('close'); - }, - }, -}); diff --git a/src/components/global-toast/index.wxml b/src/components/global-toast/index.wxml deleted file mode 100644 index b6ab5bd..0000000 --- a/src/components/global-toast/index.wxml +++ /dev/null @@ -1,32 +0,0 @@ - - - 关注适中信息微信公众号 - - 长按识别二维码关注 - - - - - - - 添加适中信息企业微信 - - 长按识别二维码添加 - - - - - - - - - 该账号未开通阅读权益 - 此小程序暂时仅供经邀请的企业用户使用,请使用有权益的手机号登录。 - 换个手机号登录 - 取消 - - - diff --git a/src/components/global-toast/index.json b/src/components/popup/index.json similarity index 100% rename from src/components/global-toast/index.json rename to src/components/popup/index.json diff --git a/src/components/popup/index.scss b/src/components/popup/index.scss new file mode 100644 index 0000000..bc90913 --- /dev/null +++ b/src/components/popup/index.scss @@ -0,0 +1,93 @@ +.popup1 { + padding: 220rpx 0 0; + width: 630rpx; + box-sizing: border-box; + .container { + padding: 32rpx; + background: linear-gradient(180deg, #ebe4ff 0%, #ffffff 100%); + border-radius: 24rpx; + .user { + padding: 24rpx; + display: flex; + align-items: center; + border-radius: 24rpx; + background-color: #fff; + .avatar-wrapper { + flex-shrink: 0; + padding: 0; + margin: 0; + width: 108rpx; + height: 108rpx; + gap: 16rpx; + outline: none; + border: 2px solid #fff; + border-radius: 50%; + &::after { + border: none; + } + .avatar { + width: 100%; + height: 100%; + border-radius: 50%; + } + } + .wrap { + flex: 1; + padding-left: 24rpx; + .nickname { + font-size: 36rpx; + font-weight: bold; + color: rgba(1, 1, 5, 1); + } + .hostipal { + margin-top: 16rpx; + line-height: 1; + font-size: 28rpx; + color: rgba(173, 172, 178, 1); + .tag { + display: inline-block; + font-size: 24rpx; + color: rgba(255, 255, 255, 1); + padding: 2rpx 10rpx; + background: #8c75d0; + border-radius: 8rpx 8rpx 8rpx 8rpx; + } + } + } + } + } +} + +.popup2 { + width: 590rpx; + height: 880rpx; + .p-img { + width: 100%; + height: 100%; + } +} + +.popup3 { + width: 590rpx; + height: 880rpx; + .p-img { + width: 100%; + height: 100%; + } +} + +.popup4 { + width: 590rpx; + height: 620rpx; + .p-img { + width: 100%; + height: 100%; + } +} + +.close { + margin: 48rpx auto 0; + display: block; + width: 84rpx; + height: 84rpx; +} diff --git a/src/components/popup/index.ts b/src/components/popup/index.ts new file mode 100644 index 0000000..4945a48 --- /dev/null +++ b/src/components/popup/index.ts @@ -0,0 +1,57 @@ +import { wxPromiseWrapper } from 'XrFrame/core/utils' + +const app = getApp() + +Component({ + properties: { + show: { + type: Boolean, + value: false, + }, + type: String, + params: { + type: Object, + value() { + return {} + }, + }, + }, + + data: { + popup1Check1: false, + + imageUrl: app.globalData.imageUrl, + Timestamp: app.globalData.Timestamp, + }, + methods: { + handleOk() { + const { type } = this.data + if (type === 'argument' && !this.data.popup1Check1) { + wx.showToast({ + title: '请同意隐私政策', + icon: 'none', + }) + return + } + this.triggerEvent('ok') + }, + handleCancel() { + this.triggerEvent('cancel') + }, + routerTo(e: any) { + const { url } = e.currentTarget.dataset + wx.navigateTo({ + url, + }) + }, + handlePopup1Check1() { + if (this.data.popup1Check1) { + app.mpBehavior({ PageName: 'BTN_PATIENTPRIVACY' }) + } + }, + handleSelectStatus(e) { + const { status } = e.currentTarget.dataset + this.triggerEvent('ok', { type: 'selectStatusComplete', status }) + }, + }, +}) diff --git a/src/components/popup/index.wxml b/src/components/popup/index.wxml new file mode 100644 index 0000000..179926a --- /dev/null +++ b/src/components/popup/index.wxml @@ -0,0 +1,46 @@ + + + + + + + XX医生 + + 北京天坛医院 + 三甲 + + + + + + + + + + + + + + + + + diff --git a/src/images/bg4.png b/src/images/bg4.png new file mode 100644 index 0000000..3e51dc9 Binary files /dev/null and b/src/images/bg4.png differ diff --git a/src/images/bg5.png b/src/images/bg5.png new file mode 100644 index 0000000..cb22c9d Binary files /dev/null and b/src/images/bg5.png differ diff --git a/src/images/bg6.png b/src/images/bg6.png new file mode 100644 index 0000000..8d7d412 Binary files /dev/null and b/src/images/bg6.png differ diff --git a/src/images/bg7.png b/src/images/bg7.png new file mode 100644 index 0000000..8825145 Binary files /dev/null and b/src/images/bg7.png differ diff --git a/src/images/file-icon2.png b/src/images/file-icon2.png new file mode 100644 index 0000000..6f2948b Binary files /dev/null and b/src/images/file-icon2.png differ diff --git a/src/images/file-icon3.png b/src/images/file-icon3.png new file mode 100644 index 0000000..fb99650 Binary files /dev/null and b/src/images/file-icon3.png differ diff --git a/src/images/file-icon4.png b/src/images/file-icon4.png new file mode 100644 index 0000000..834463f Binary files /dev/null and b/src/images/file-icon4.png differ diff --git a/src/images/file-icon5.png b/src/images/file-icon5.png new file mode 100644 index 0000000..94fa790 Binary files /dev/null and b/src/images/file-icon5.png differ diff --git a/src/images/file-icon6.png b/src/images/file-icon6.png new file mode 100644 index 0000000..8aea399 Binary files /dev/null and b/src/images/file-icon6.png differ diff --git a/src/images/file-icon7.png b/src/images/file-icon7.png new file mode 100644 index 0000000..34cd988 Binary files /dev/null and b/src/images/file-icon7.png differ diff --git a/src/images/file-icon8.png b/src/images/file-icon8.png new file mode 100644 index 0000000..792403d Binary files /dev/null and b/src/images/file-icon8.png differ diff --git a/src/images/icon11.png b/src/images/icon11.png new file mode 100644 index 0000000..6423b17 Binary files /dev/null and b/src/images/icon11.png differ diff --git a/src/pages/article/index.json b/src/pages/article/index.json deleted file mode 100644 index 511f5e0..0000000 --- a/src/pages/article/index.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "navigationStyle": "default", - "navigationBarTitleText": "详情", - "usingComponents": { - "van-slider": "@vant/weapp/slider/index", - "van-popup": "@vant/weapp/popup/index", - "mp-html": "mp-html", - "global-toast":"/components/global-toast/index" - } -} diff --git a/src/pages/article/index.scss b/src/pages/article/index.scss deleted file mode 100644 index 8a33293..0000000 --- a/src/pages/article/index.scss +++ /dev/null @@ -1,257 +0,0 @@ -.page { - padding: 48rpx 20rpx 200rpx; - - .page-title { - font-size: 44rpx; - color: #222222; - font-weight: bold; - line-height: 48rpx; - } - - .page-info { - display: flex; - align-items: center; - justify-content: space-between; - .page-date { - margin-top: 24rpx; - font-size: 28rpx; - color: #999999; - } - .view-num { - font-size: 28rpx; - color: #999999; - display: flex; - align-items: center; - gap: 12rpx; - .icon { - width: 28rpx; - height: 28rpx; - } - } - } - - .audio-bar { - margin-top: 32rpx; - padding: 32rpx; - --slider-disabled-opacity: 1; - background-color: #f9fafb; - border-radius: 24rpx; - - .a-header { - display: flex; - align-items: center; - justify-content: space-between; - - .wrap { - line-height: 1; - - .name { - font-size: 32rpx; - color: #000000; - font-weight: bold; - } - - .date { - margin-top: 12rpx; - font-size: 24rpx; - color: #65686c; - } - } - - .icon { - width: 64rpx; - height: 64rpx; - } - } - - .progress { - display: block; - margin-top: 30rpx; - .custom-button { - position: relative; - flex-shrink: 0; - width: 20rpx; - height: 20rpx; - background: #ffffff; - border-radius: 50%; - border: 2rpx solid #3795f7; - box-sizing: border-box; - &::after { - content: ''; - display: block; - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - width: 64rpx; - height: 64rpx; - background-color: transparent; - } - } - } - } - - .rich { - margin-top: 32rpx; - } - - .quick-article { - margin-top: 24rpx; - padding: 26rpx 32rpx; - background: #f9fafb; - line-height: 48rpx; - border-radius: 16rpx 16rpx 16rpx 16rpx; - color: #3795f7; - font-size: 36rpx; - - .label { - color: #3795f7; - } - } - - .type { - margin-top: 48rpx; - display: flex; - align-items: center; - flex-wrap: wrap; - gap: 24rpx; - - .label { - font-size: 32rpx; - color: #999999; - } - - .item { - padding: 6rpx 24rpx; - border-radius: 40rpx; - font-size: 32rpx; - color: #fff; - background-color: #3795f7; - } - } - - .footer { - position: fixed; - bottom: 0; - left: 0; - width: 100%; - padding: 30rpx 30rpx calc(30rpx + env(safe-area-inset-bottom)); - display: flex; - align-items: center; - justify-content: space-between; - box-shadow: 0 -6rpx 32.8rpx rgba(0, 0, 0, 0.1); - background: #ffffff; - - .item { - position: relative; - flex: 1; - display: flex; - align-items: center; - justify-content: center; - gap: 12rpx; - font-size: 36rpx; - - .icon { - width: 56rpx; - height: 56rpx; - } - .item-tip { - position: absolute; - left: 0; - top: -45rpx; - transform: translateY(-100%); - padding: 16rpx 32rpx; - font-size: 36rpx; - color: #ffffff; - background: rgba(0, 0, 0, 0.8); - border-radius: 8rpx 8rpx 8rpx 8rpx; - white-space: nowrap; - .close { - position: absolute; - top: -12rpx; - right: -12rpx; - width: 36rpx; - height: 36rpx; - } - &::after { - content: ''; - position: absolute; - bottom: -10rpx; - left: 40%; - width: 0; - height: 0; - border-left: 12rpx solid transparent; - border-right: 12rpx solid transparent; - border-top: 12rpx solid rgba(0, 0, 0, 0.9); - } - } - } - } -} - -.popup-directory { - .p-close-line { - padding: 36rpx 32rpx; - display: flex; - justify-content: flex-end; - .option { - font-size: 32rpx; - color: #999999; - .icon { - margin-left: 10rpx; - width: 24rpx; - height: 24rpx; - transform: rotate(180deg); - } - } - } - .p-title { - padding: 0 32rpx; - font-size: 44rpx; - color: #222222; - font-weight: bold; - } - .p-type { - padding: 32rpx; - display: flex; - align-items: center; - flex-wrap: wrap; - - .label { - font-size: 32rpx; - color: #999999; - } - - .item { - border-radius: 40rpx; - font-size: 32rpx; - color: #3795f7; - } - } - .p-scroll { - max-height: 50vh; - font-size: 36rpx; - .row { - padding: 32rpx; - position: relative; - &::after { - position: absolute; - bottom: 0; - left: 32rpx; - content: ''; - width: calc(100% - 64rpx); - height: 1px; - background-color: #f0f0f0; - } - &:last-of-type::after { - display: none; - } - &.current { - background: rgba(55, 149, 247, 0.06); - } - } - .place-row { - height: 120rpx; - } - } -} diff --git a/src/pages/article/index.ts b/src/pages/article/index.ts deleted file mode 100644 index 28cdc84..0000000 --- a/src/pages/article/index.ts +++ /dev/null @@ -1,349 +0,0 @@ -import { decryptData } from '@/utils/crypto'; -const app = getApp(); - -Page({ - data: { - show: false, - BookId: '', - ChapterId: '', - chapterList: [], - - book: {} as any, - chapter: {} as any, - prevAndNext: {} as any, - - progress: 0, - url: 'http://m10.music.126.net/20241126110303/3f2481d2d6d50acd2009359539eadda0/ymusic/5353/0f0f/0358/d99739615f8e5153d77042092f07fd77.mp3', - play: false, - time: '00:00/00:00', - currentTime: 0, - drag: false, - - chapterTip: false, - - toastShow: false, - toastType: 3, - previewImg: true, - - listener: false, - globalStop: false, - }, - BackgroundAudioManager: null as WechatMiniprogram.BackgroundAudioManager | null, - onLoad(options) { - this.BackgroundAudioManager = wx.getBackgroundAudioManager(); - this.setData({ - BookId: options.id, - globalStop: this.BackgroundAudioManager.paused, - }); - if (options.cid) { - this.setData({ - ChapterId: options.cid, - }); - } - const previewImg = !['mac', 'windows'].includes(wx.getDeviceInfo().platform); - this.setData({ - previewImg, - }); - - app.waitLogin(false, true).then(() => { - this.getChapterList(); - this.getDetail(); - }); - }, - getChapterList() { - wx.ajax({ - method: 'GET', - url: '?r=shizhong/book/chapter-list', - data: { - BookId: this.data.BookId, - }, - }).then((res) => { - this.setData({ - chapterList: res.list, - }); - }); - }, - getDetail() { - wx.ajax({ - method: 'GET', - url: '?r=shizhong/book/detail', - data: { - BookId: this.data.BookId, - ChapterId: this.data.ChapterId, - }, - showMsg: false, - }) - .then((res) => { - if (res.chapter.content_encrypt === 1) { - res.chapter.Content = decryptData(res.chapter.Content); - } - this.setData({ - book: { - ...res.book, - PublishDate: res.book.PublishTime.split(' ')[0], - }, - chapter: res.chapter, - prevAndNext: { - prev: Array.isArray(res.prevAndNext.prev) ? null : res.prevAndNext.prev, - next: Array.isArray(res.prevAndNext.next) ? null : res.prevAndNext.next, - }, - ChapterId: res.chapter.Id, - show: !this.data.ChapterId, - }); - if (res.chapter.AudioUrl?.url) { - const time = `00:00/${this.formatTime(res.chapter.AudioUrl.duration)}`; - this.setData({ - time, - }); - } - wx.setNavigationBarTitle({ - title: res.book.BookName, - }); - this.handleView(); - this.initBackgroundAudioManager(); - }) - .catch((err) => { - if (err.data.code === 403) { - this.setData({ - toastShow: true, - toastType: 3, - }); - } - }); - }, - handleView() { - wx.ajax({ - method: 'POST', - url: '?r=shizhong/book/add-browse-record', - data: { - BookId: this.data.BookId, - ChapterId: this.data.ChapterId, - }, - }); - }, - handleDirectory() { - this.setData({ - show: true, - }); - }, - handleSwitchDirectory(e) { - const { id } = e.currentTarget.dataset; - this.setData({ - ChapterId: id, - }); - this.getDetail(); - this.onClose(); - }, - onClose() { - const chapterTip = !wx.getStorageSync('chapterTip'); - this.setData({ - show: false, - chapterTip, - }); - if (chapterTip) { - setTimeout(() => { - this.handleTipClsoe(); - }, 5000); - } - }, - - handleCollect() { - const { Id } = this.data.book; - wx.ajax({ - method: 'POST', - url: '?r=shizhong/book/collect', - data: { BookId: Id }, - }).then(() => { - wx.showToast({ - title: '您已收藏这本书,可在我的页查看', - icon: 'none', - }); - this.setData({ - [`book.IsCollect`]: 1, - }); - }); - }, - handleUnCollect() { - const { Id } = this.data.book; - wx.ajax({ - method: 'POST', - url: '?r=shizhong/book/cancel-collect', - data: { BookId: Id }, - }).then(() => { - wx.showToast({ - title: '取消收藏', - icon: 'none', - }); - this.setData({ - [`book.IsCollect`]: 0, - }); - }); - }, - initBackgroundAudioManager() { - const { chapter } = this.data; - if (this.BackgroundAudioManager) { - if (this.BackgroundAudioManager.src === chapter.AudioUrl.url && !this.BackgroundAudioManager.paused) { - this.setData({ - play: true, - }); - this.backgroundAudioManagerListener(); - } else { - this.backgroundAudioManagerListener(); - this.setData({ - play: false, - progress: 0, - currentTime: 0, - }); - } - } - }, - backgroundAudioManagerListener() { - const { chapter } = this.data; - if (!this.BackgroundAudioManager) return; - const timeUpdateListener = () => { - const isCurrent = this.BackgroundAudioManager?.src === chapter.AudioUrl.url; - if (this.BackgroundAudioManager && !this.data.drag && this.data.play && isCurrent) { - const { currentTime, duration } = this.BackgroundAudioManager; - const time = `${this.formatTime(currentTime)}/${this.formatTime(duration)}`; - const progress = (currentTime / duration) * 100; - this.setData({ - time, - progress, - currentTime, - }); - } - }; - const endedListener = () => { - const time = `00:00/${this.formatTime(chapter.AudioUrl.duration)}`; - this.setData({ - play: false, - progress: 0, - time, - currentTime: 0, - globalStop: true, - }); - }; - const playListener = () => { - const isCurrent = this.BackgroundAudioManager?.src === chapter.AudioUrl.url; - if (!isCurrent) return; - this.setData({ - play: true, - }); - }; - const pauseListener = () => { - this.setData({ - play: false, - }); - }; - const stopListener = () => { - const time = `00:00/${this.formatTime(chapter.AudioUrl.duration)}`; - this.setData({ - play: false, - globalStop: true, - progress: 0, - time, - currentTime: 0, - }); - }; - this.BackgroundAudioManager.onTimeUpdate(timeUpdateListener); - this.BackgroundAudioManager.onEnded(endedListener); - this.BackgroundAudioManager.onPlay(playListener); - this.BackgroundAudioManager.onPause(pauseListener); - this.BackgroundAudioManager.onStop(stopListener); - this.setData({ - listener: true, - }); - }, - handlePlay() { - const { chapter, currentTime, play, listener, globalStop } = this.data; - if (play) return; - if (this.BackgroundAudioManager) { - if (this.BackgroundAudioManager.src !== chapter.AudioUrl.url || globalStop) { - this.BackgroundAudioManager.title = chapter.ChapterName; - this.BackgroundAudioManager.coverImgUrl = chapter.CoverUrl; - this.BackgroundAudioManager.src = chapter.AudioUrl.url; - } else { - this.BackgroundAudioManager.play(); - this.BackgroundAudioManager.seek(this.BackgroundAudioManager.currentTime || currentTime); - } - if (!listener) { - this.backgroundAudioManagerListener(); - } - } - this.setData({ - globalStop: false, - }); - }, - handlePause() { - const { play } = this.data; - if (this.BackgroundAudioManager && play) { - this.setData({ - play: false, - }); - this.BackgroundAudioManager.pause(); - } - }, - handleDragStart() { - this.setData({ - drag: true, - }); - }, - handleDragEnd() { - this.setData({ - drag: false, - }); - if (this.data.play) { - this.BackgroundAudioManager?.seek(this.data.currentTime); - } - }, - handleDrag(e: any) { - const current = e.detail.value; - const duration = this.BackgroundAudioManager?.duration || this.data.chapter.AudioUrl.duration; - const currentTime = (current / 100) * duration; - const time = `${this.formatTime(currentTime)}/${this.formatTime(duration)}`; - this.setData({ - time, - currentTime, - }); - }, - formatTime(time: number) { - const minutes = Math.floor(time / 60); - const seconds = Math.floor(time % 60); - return `${minutes < 10 ? `0${minutes}` : minutes}:${seconds < 10 ? `0${seconds}` : seconds}`; - }, - handleAuthClose() { - this.setData({ - toastShow: false, - }); - wx.navigateBack({ - fail() { - wx.reLaunch({ - url: '/pages/classify/index', - }); - }, - }); - }, - handleAuthConform() { - const { BookId, ChapterId } = this.data; - const backPath = `/pages/article/index?id=${BookId}&cid=${ChapterId}`; - app.globalData.backPath = backPath; - wx.navigateTo({ - url: '/pages/login/index?back=1', - }); - }, - handleType() { - wx.redirectTo({ - url: `/pages/classify/index?id=${this.data.chapter.CateId}`, - }); - }, - handleTipClsoe() { - if (this.data.chapterTip) { - wx.setStorageSync('chapterTip', 'open'); - } - this.setData({ - chapterTip: false, - }); - }, -}); - -export {}; diff --git a/src/pages/article/index.wxml b/src/pages/article/index.wxml deleted file mode 100644 index 79e5c4e..0000000 --- a/src/pages/article/index.wxml +++ /dev/null @@ -1,125 +0,0 @@ - - - {{chapter.ChapterName}} - - {{book.PublishDate}} - - - - - - 概要解读 - {{time}} - - - - - - - - - - - - - 上一篇: - {{prevAndNext.prev.ChapterName}} - - - 下一篇: - {{prevAndNext.next.ChapterName}} - - - 分类 - {{chapter.CateName}} - - - - - - 目录 - - 查看全文目录,可点击这里 - - - - - - 取消收藏 - - - - 收藏 - - - - - - - - - 目录收起 - - - - {{book.BookName}} - - 分类: - {{chapter.CateName}} - - - - {{index+1}}. {{item.ChapterName}} - - - - - - - diff --git a/src/pages/classify/index.json b/src/pages/classify/index.json deleted file mode 100644 index abf9db4..0000000 --- a/src/pages/classify/index.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "navigationStyle": "default", - "navigationBarTitleText": "", - "usingComponents": { - "van-icon": "@vant/weapp/icon/index", - "van-divider": "@vant/weapp/divider/index" - } -} diff --git a/src/pages/classify/index.scss b/src/pages/classify/index.scss deleted file mode 100644 index ccd2d58..0000000 --- a/src/pages/classify/index.scss +++ /dev/null @@ -1,137 +0,0 @@ -page { - background-color: #f3f4f5; -} -.page { - padding-top: 100rpx; - padding-bottom: 80rpx; - - .scroll { - position: fixed; - top: 0; - left: 0; - z-index: 100000000000; - width: 100%; - background-color: #fff; - } - .nav { - padding: 0 16rpx; - display: flex; - background-color: #fff; - &::-webkit-scrollbar { - display: none; - } - .nav-item { - flex-shrink: 0; - padding: 32rpx 16rpx; - font-size: 36rpx; - color: #222222; - line-height: 36rpx; - &.active { - font-size: 36rpx; - color: #3795f7; - font-weight: bold; - position: relative; - &::after { - position: absolute; - bottom: 0; - left: 50%; - transform: translateX(-50%); - content: ''; - width: 44rpx; - height: 8rpx; - background: #3795f7; - border-radius: 0rpx 0rpx 0rpx 0rpx; - } - } - } - } - .types { - padding: 32rpx 32rpx 0; - display: flex; - gap: 16rpx; - flex-wrap: wrap; - .type { - min-width: 160rpx; - padding: 8rpx 10rpx; - box-sizing: border-box; - font-size: 32rpx; - color: #65686c; - line-height: 40rpx; - background-color: #fff; - border-radius: 8rpx; - text-align: center; - &.active { - color: #fff; - background-color: #3795f7; - } - } - } - .der { - margin-top: 32rpx; - font-size: 28rpx; - color: #999999; - text-align: center; - } - .card { - margin: 32rpx 32rpx 24rpx; - padding: 24rpx; - display: flex; - gap: 24rpx; - background: linear-gradient(173deg, #ffffff 0%, #eff7ff 100%); - border-radius: 24rpx 24rpx 24rpx 24rpx; - border: 2rpx solid #ffffff; - &:last-of-type { - margin-bottom: 0; - } - .photo { - flex-shrink: 0; - width: 218rpx; - height: 218rpx; - border-radius: 16rpx; - } - .c-container { - flex: 1; - display: flex; - flex-direction: column; - justify-content: space-between; - .title { - font-size: 36rpx; - color: #222222; - font-weight: bold; - line-height: 48rpx; - } - .type { - margin-top: 16rpx; - flex: 1; - font-size: 32rpx; - color: #999999; - } - .stat { - margin-top: 42rpx; - display: flex; - align-items: center; - justify-content: space-between; - gap: 40rpx; - .s-item { - display: flex; - align-items: center; - gap: 8rpx; - font-size: 28rpx; - color: #999999; - .icon { - width: 32rpx; - height: 32rpx; - } - &.active { - color: #3795f7; - } - } - } - } - } - .none { - display: block; - margin: 30rpx auto; - width: 80%; - } -} diff --git a/src/pages/classify/index.ts b/src/pages/classify/index.ts deleted file mode 100644 index 47f34fd..0000000 --- a/src/pages/classify/index.ts +++ /dev/null @@ -1,200 +0,0 @@ -const app = getApp(); - -Page({ - data: { - background: 'transparent', - - list: [], - pagination: { - page: 1, - pages: 1, - count: 1, - }, - recommendList: [], - recommendPagination: { - page: 1, - pages: 1, - count: 0, - }, - - cateList: [] as any, - CateId: '', - CateSecondId: '', - cateSecondList: [] as any, - - scrollIntoView: '', - }, - onLoad(options) { - this.setData({ - CateId: options.id || '', - }); - app.waitLogin().then(() => { - this.getCateList(); - this.cateCallback(this.data.CateId, this.data.CateSecondId); - }); - }, - getCateList() { - wx.ajax({ - method: 'GET', - url: '?r=shizhong/book/cate-list', - data: {}, - }).then((res) => { - this.setData({ - cateList: res, - }); - if (this.data.CateId) { - this.setData({ - cateSecondList: res.find((item: any) => item.Id === this.data.CateId)?.Children || [], - scrollIntoView: `nav-item${this.data.CateId}`, - }); - } - }); - }, - handleCate(e) { - const { index } = e.currentTarget.dataset; - if (typeof index === 'number') { - this.setData({ - CateId: this.data.cateList[index].Id, - CateSecondId: '', - cateSecondList: this.data.cateList[index].Children, - }); - } else { - this.setData({ CateId: '', CateSecondId: '', cateSecondList: [] }); - } - this.cateCallback(this.data.CateId, this.data.CateSecondId); - }, - handleSecondCate(e) { - const { index } = e.currentTarget.dataset; - if (typeof index === 'number') { - this.setData({ - CateSecondId: this.data.cateSecondList[index].Id, - }); - } else { - this.setData({ CateSecondId: '' }); - } - this.cateCallback(this.data.CateId, this.data.CateSecondId); - }, - cateCallback(CateId, CateSecondId) { - this.setData({ - list: [], - pagination: { - page: 1, - pages: 1, - count: 1, - }, - recommendList: [], - recommendPagination: { - page: 1, - pages: 1, - count: this.data.CateSecondId ? 1 : 0, - }, - }); - this.getList(1, CateId, CateSecondId); - if (CateId && CateSecondId) { - this.getRecommendList(1, CateId, CateSecondId); - } - }, - getList(newPage = 1, CateId, CateSecondId) { - wx.ajax({ - method: 'GET', - url: `?r=shizhong/book/list`, - data: { - page: newPage, - CateId, - CateSecondId, - }, - }).then((res) => { - const list = res.page === 1 ? res.list : [...this.data.list, ...res.list]; - this.setData({ - list, - pagination: { - page: res.page, - pages: res.pages, - count: res.count, - }, - }); - }); - }, - getRecommendList(newPage = 1, CateId, CateSecondId) { - wx.ajax({ - method: 'GET', - url: '?r=shizhong/book/recommend-list', - data: { - CateId, - CateSecondId, - page: newPage, - }, - }).then((res) => { - const recommendList = res.page === 1 ? res.list : [...this.data.recommendList, ...res.list]; - this.setData({ - recommendList, - recommendPagination: { - page: res.page, - pages: res.pages, - count: res.count, - }, - }); - }); - }, - onReachBottom() { - const { page, pages } = this.data.pagination; - const { page: rPage, pages: rPages } = this.data.recommendPagination; - if (pages > page && this.data.list.length) { - this.getList(page + 1, this.data.CateId, this.data.CateSecondId); - } else if (rPages > rPage && this.data.recommendList.length && this.data.CateId && this.data.CateSecondId) { - this.getRecommendList(rPage + 1, this.data.CateId, this.data.CateSecondId); - } - }, - handleCollect(e) { - const { index, list } = e.currentTarget.dataset; - const { Id } = this.data[list][index]; - app.waitLogin(false, true).then(() => { - wx.ajax({ - method: 'POST', - url: '?r=shizhong/book/collect', - data: { BookId: Id }, - }).then(() => { - wx.showToast({ - title: '您已收藏这本书,可在我的页查看', - icon: 'none', - }); - this.setData({ - [`${list}[${index}].IsCollect`]: '1', - }); - }); - }); - }, - handleUnCollect(e) { - const { index, list } = e.currentTarget.dataset; - const { Id } = this.data[list][index]; - app.waitLogin(false, true).then(() => { - wx.ajax({ - method: 'POST', - url: '?r=shizhong/book/cancel-collect', - data: { BookId: Id }, - }).then(() => { - wx.showToast({ - title: '取消收藏', - icon: 'none', - }); - this.setData({ - [`${list}[${index}].IsCollect`]: '0', - }); - }); - }); - }, - handleDetail(e) { - const { id } = e.currentTarget.dataset; - const backPath = `/pages/article/index?id=${id}`; - app.waitLogin(false, true, backPath).then(() => { - wx.navigateTo({ - url: backPath, - }); - }); - }, - handleBack() { - wx.navigateBack(); - }, -}); - -export {}; diff --git a/src/pages/classify/index.wxml b/src/pages/classify/index.wxml deleted file mode 100644 index e5fe9c0..0000000 --- a/src/pages/classify/index.wxml +++ /dev/null @@ -1,102 +0,0 @@ - - - - 全部 - - {{item.CateName}} - - - - - - 全部 - - {{item.CateName}} - - - - - - {{item.BookName}} - {{item.CateName}}{{item.CateSecondName ? '/'+item.CateSecondName : ''}} - - - - 阅读 {{~~item.OperateNum + ~~item.BrowseNum}} - - - - 已收藏 - - - - 收藏 - - - - - - — — 以下为本分类下其他内容 — — - - - - {{item.BookName}} - {{item.CateName}}{{item.CateSecondName ? '/'+item.CateSecondName : ''}} - - - - 阅读 {{~~item.OperateNum + ~~item.BrowseNum}} - - - - 已收藏 - - - - 收藏 - - - - - - - - - - 加载中... - - 没有更多了 - - diff --git a/src/pages/collection/index.json b/src/pages/collection/index.json deleted file mode 100644 index 9806cef..0000000 --- a/src/pages/collection/index.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "usingComponents": { - "van-nav-bar": "@vant/weapp/nav-bar/index", - "van-icon": "@vant/weapp/icon/index", - "pagination":"/components/pagination/index" - } -} diff --git a/src/pages/collection/index.scss b/src/pages/collection/index.scss deleted file mode 100644 index bb34f94..0000000 --- a/src/pages/collection/index.scss +++ /dev/null @@ -1,60 +0,0 @@ -page { - background-color: #f3f4f5; -} -.page { - margin: 50rpx 32rpx 0; - padding-bottom: 80rpx; - .card { - padding: 24rpx; - display: flex; - gap: 24rpx; - background: linear-gradient(173deg, #ffffff 0%, #eff7ff 100%); - border-radius: 24rpx 24rpx 24rpx 24rpx; - border: 2rpx solid #ffffff; - .photo { - flex-shrink: 0; - width: 218rpx; - height: 218rpx; - border-radius: 16rpx; - } - .c-container { - flex: 1; - display: flex; - flex-direction: column; - justify-content: space-between; - .title { - font-size: 36rpx; - color: #222222; - font-weight: bold; - line-height: 48rpx; - } - .type { - flex: 1; - margin-top: 16rpx; - font-size: 32rpx; - color: #999999; - } - .stat { - margin-top: 42rpx; - display: flex; - align-items: center; - justify-content: space-between; - gap: 40rpx; - .s-item { - display: flex; - align-items: center; - gap: 8rpx; - font-size: 28rpx; - color: #999999; - .icon { - width: 32rpx; - height: 32rpx; - } - &.active { - color: #3795f7; - } - } - } - } - } -} diff --git a/src/pages/collection/index.ts b/src/pages/collection/index.ts deleted file mode 100644 index 8dc7b04..0000000 --- a/src/pages/collection/index.ts +++ /dev/null @@ -1,94 +0,0 @@ -const app = getApp(); - -Page({ - data: { - background: 'transparent', - - pagination: { - page: 1, - pages: 1, - count: 1, - }, - list: [], - }, - onLoad() { - app.waitLogin(false, true).then(() => { - this.getList(); - }); - }, - getList(newPage = 1) { - wx.ajax({ - method: 'GET', - url: `?r=shizhong/book/collect-list`, - data: { - page: newPage, - }, - }).then((res) => { - res.list.forEach((item) => { - item.IsCollect = '1'; - }); - const list = res.page === 1 ? res.list : [...this.data.list, ...res.list]; - this.setData({ - list, - pagination: { - page: res.page, - pages: res.pages, - count: res.count, - }, - }); - }); - }, - onReachBottom() { - const { page, pages } = this.data.pagination; - if (pages > page && this.data.list.length) { - this.getList(page + 1); - } - }, - handleCollect(e) { - const { index, list } = e.currentTarget.dataset; - const { BookId } = this.data[list][index]; - wx.ajax({ - method: 'POST', - url: '?r=shizhong/book/collect', - data: { BookId }, - }).then(() => { - wx.showToast({ - title: '您已收藏这本书,可在我的页查看', - icon: 'none', - }); - this.setData({ - [`${list}[${index}].IsCollect`]: '1', - }); - }); - }, - handleUnCollect(e) { - const { index, list } = e.currentTarget.dataset; - const { BookId } = this.data[list][index]; - wx.ajax({ - method: 'POST', - url: '?r=shizhong/book/cancel-collect', - data: { BookId }, - }).then(() => { - wx.showToast({ - title: '取消收藏', - icon: 'none', - }); - this.setData({ - [`${list}[${index}].IsCollect`]: '0', - }); - }); - }, - handleBack() { - wx.navigateBack(); - }, - handleDetail(e) { - const { id } = e.currentTarget.dataset; - app.waitLogin(false, true).then(() => { - wx.navigateTo({ - url: `/pages/article/index?id=${id}`, - }); - }); - }, -}); - -export {}; diff --git a/src/pages/collection/index.wxml b/src/pages/collection/index.wxml deleted file mode 100644 index a072214..0000000 --- a/src/pages/collection/index.wxml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - {{item.BookName}} - {{item.CateName}}{{item.CateSecondName ? '/'+item.CateSecondName : ''}} - - - - 阅读 {{~~item.OperateNum + ~~item.BrowseNum}} - - - - 已收藏 - - - - 收藏 - - - - - - diff --git a/src/pages/home/index.json b/src/pages/home/index.json index e231b01..d40cd51 100644 --- a/src/pages/home/index.json +++ b/src/pages/home/index.json @@ -1,6 +1,7 @@ { "usingComponents": { "van-popup": "@vant/weapp/popup/index", - "navbar": "/components/navbar/index" + "navbar": "/components/navbar/index", + "popup": "/components/popup/index" } } diff --git a/src/pages/home/index.ts b/src/pages/home/index.ts index 747f872..81d6143 100644 --- a/src/pages/home/index.ts +++ b/src/pages/home/index.ts @@ -1,10 +1,28 @@ const app = getApp(); Page({ - data: {}, + data: { + popupShow: false, + // popupType: 'popup1', // 绑定医生弹窗 + // popupType: 'popup2', // 去关注弹窗 + // popupType: 'popup3', // 问题反馈弹窗 + popupType: 'popup4', // 登录失败弹窗 + popupParams: { + close: true, + } as any, + }, onLoad() { // app.waitLogin().then(() => {}); }, + handlePopupOk() { + const { popupType } = this.data; + }, + handlePopupCancel() { + const { popupType } = this.data; + this.setData({ + popupShow: false, + }); + }, }); export {}; diff --git a/src/pages/home/index.wxml b/src/pages/home/index.wxml index dfe7c3e..3b9fbe7 100644 --- a/src/pages/home/index.wxml +++ b/src/pages/home/index.wxml @@ -66,3 +66,11 @@ + + diff --git a/src/pages/information/index.wxml b/src/pages/information/index.wxml index 2e11d02..6e3ee6c 100644 --- a/src/pages/information/index.wxml +++ b/src/pages/information/index.wxml @@ -32,4 +32,3 @@ - diff --git a/src/pages/informationDetail/index.ts b/src/pages/informationDetail/index.ts index 7592108..d596ce9 100644 --- a/src/pages/informationDetail/index.ts +++ b/src/pages/informationDetail/index.ts @@ -3,8 +3,40 @@ const _app = getApp(); Page({ data: { doc: '1', + + fileIcon: { + pdf: 'file-icon1', + doc: 'file-icon2', + docx: 'file-icon3', + pptx: 'file-icon4', + xls: 'file-icon5', + xlsx: 'file-icon6', + ppt: 'file-icon7', + none: 'file-icon8', + }, }, onLoad() {}, + + handleDownload() { + wx.downloadFile({ + url: '', + success: (res) => { + if (res.statusCode === 200) { + wx.openDocument({ + filePath: res.tempFilePath, + success: () => { + console.log('打开文档成功'); + }, + fail: (err) => { + console.error('打开文档失败', err); + }, + }); + } else { + console.error('下载文件失败', res); + } + }, + }); + }, }); export {}; diff --git a/src/pages/longPicture/index.json b/src/pages/longPicture/index.json deleted file mode 100644 index 11cc17e..0000000 --- a/src/pages/longPicture/index.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "navigationStyle": "default", - "navigationBarTitleText": "详情", - "usingComponents": {} -} diff --git a/src/pages/longPicture/index.scss b/src/pages/longPicture/index.scss deleted file mode 100644 index 019048d..0000000 --- a/src/pages/longPicture/index.scss +++ /dev/null @@ -1,3 +0,0 @@ -.banner { - width: 100%; -} diff --git a/src/pages/longPicture/index.ts b/src/pages/longPicture/index.ts deleted file mode 100644 index a086f18..0000000 --- a/src/pages/longPicture/index.ts +++ /dev/null @@ -1,17 +0,0 @@ -const _app = getApp(); - -Page({ - data: { - url: '', - }, - onLoad(options) { - const { url } = options; - if (url) { - this.setData({ - url: decodeURIComponent(url), - }); - } - }, -}); - -export {}; diff --git a/src/pages/longPicture/index.wxml b/src/pages/longPicture/index.wxml deleted file mode 100644 index 312598c..0000000 --- a/src/pages/longPicture/index.wxml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/pages/protocol/index.json b/src/pages/protocol/index.json deleted file mode 100644 index a1709b1..0000000 --- a/src/pages/protocol/index.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "navigationBarTitleText": "用户隐私协议", - "navigationStyle": "default", - "usingComponents": { - "mp-html": "mp-html" - } -} diff --git a/src/pages/protocol/index.scss b/src/pages/protocol/index.scss deleted file mode 100644 index b9f0774..0000000 --- a/src/pages/protocol/index.scss +++ /dev/null @@ -1,3 +0,0 @@ -.page { - padding: 32rpx; -} diff --git a/src/pages/protocol/index.ts b/src/pages/protocol/index.ts deleted file mode 100644 index 72064ef..0000000 --- a/src/pages/protocol/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -const _app = getApp(); - -Page({ - data: { - content:`

适中健康信息小程序隐私政策


本版本更新日期:2024年12月12日

本版本生效日期:2024年12月20日



“适中健康信息”(以下亦称“我们”)非常注重保护用户(“您”)的个人信息及隐私。我们希望通过本《适中健康信息小程序隐私政策》(以下简称“本隐私政策”或本“政策”)向您清晰地介绍在使用我们的产品/服务时,我们如何处理您的个人信息。您及您的隐私对于我们至关重要,我们非常重视您的隐私和个人信息的保护。

请您在使用本产品/服务前,务必仔细阅读并充分理解本隐私政策。我们将逐一说明我们收集您的个人信息的类型及其对应的用途,以便您了解我们针对某一特定功能或服务所收集的具体个人信息的类别、使用理由及收集方式。

您在完成勾选并点击“同意”按钮后,本隐私政策即构成对双方有约束力的法律文件,即表示您同意我们按照本隐私政策收集、使用、处理和存储您的相关个人信息。


【本隐私政策的适用范围】

本隐私政策适用于您通过任何方式使用适中健康信息小程序平台或我们通过其他方式与您沟通合作时提供的全部功能和/或服务(以下合称为“本平台服务”)而收集或存储的信息。我们希望通过本隐私政策向您说明在您使用本平台服务时或我们通过其他方式与您沟通合作时,我们是如何收集、存储、使用、加工、传输、提供、公开、删除这些信息,以及我们将为您提供查阅、更正、限制、拒绝、删除、注销这些信息的方式。


本隐私政策将帮您了解以下信息:

1. 我们如何收集和使用您的个人信息

2. 我们基于何种目的或场景,收集和使用您的个人信息

3. 我们如何使用Cookie等同类技术

4. 我们如何委托处理、共享、转让、公开披露您的个人信息

5. 我们如何保存、保护您的个人信息

6. 您查阅、更正、限制、拒绝、删除、注销个人信息的权利

7. 未成年人保护

8. 本隐私政策变更及通知

9. 如何联系我们

10. 名词定义和解释


一、     我们如何收集和使用您的个人信息

(一)我们会根据本隐私政策的约定,为实现本平台服务而对所收集的个人信息进行使用。

(二)我们深知个人信息对您的重要性,并会尽全力保护您的个人信息安全可靠。我们致力于维持您对我们的信任,恪守以下原则,保护您的个人信息:合法、正当、必要和诚信原则,目的明确和直接相关原则,公开透明原则、准确性原则、问责性原则、数据安全原则等。同时,我们承诺将按业界成熟的安全标准,采取必要的措施保障您的个人信息的安全。

(三)我们对您个人信息的使用建立在下述一项或多项合法依据之上:您的同意、对公开信息的合理使用、为履行双方所签署的合同所必须及为遵守我们的法律义务。


二、     我们基于何种目的或场景,收集和使用您的个人信息

出于本隐私政策所描述的目的或场景,当您使用本平台服务时,我们可能会收集有关您的如下个人信息。若您不同意提供下列信息,有权拒绝提供,但您可能无法继续使用本平台的全部或部分服务:

(一)   注册、登录

当您需要使用本平台服务时,您首先需要注册本平台账号。为注册本平台账号,您需要提供您的手机号,以及选择性提供头像、昵称,您后续可以自主在【我的】页中填写或修改您的头像、昵称。如果您不提供上述信息,将影响您使用本平台的基本功能。

(二)   向您提供的本平台服务

1.页面浏览

当您在本平台浏览页面时,我们会收集您的本平台账号UID信息、微信OpenID,用来展示您的权益内容,以方便您的便捷使用。

2.留言板

当您在本平台给我们留言,我们将会收集、储存您的如下个人信息:微信OpenID、本平台账号UID信息、留言信息。以上信息不对外公开展示。

3.阅读文章

您在本平台上阅读文章时,我们将会收集您的本平台账号UID信息,以判断您是否有对应的阅读权限。

4.收藏文章

您在本平台上收藏或查看收藏文章时,我们将会收集您的本平台账号UID信息,以记录或读取该账号下收藏的文章内容。

5.为您提供安全保障及更佳的服务体验

当您使用本平台服务时,我们会自动收集您对我们服务的详细使用情况,作为有关网络日志保存。包括浏览、点击查看、搜索查询、分享信息、发布信息、访问日期和时间、浏览的内容及时长、浏览记录等。为了保障您的账号安全以及系统运行安全,防止欺诈、网络病毒、网络攻击等安全风险,本平台服务将满足法律法规和我们协议规则的相关要求,同时,我们会根据不同操作系统为您提供最佳的浏览体验。

(三) 如果您对我们收集和使用您的个人信息的法律依据有任何疑问或需要提供进一步的信息,请通过本隐私政策第九章节「如何联系我们」提供的联系方式与我们联系。

(四) 当我们要将您的个人信息用于本隐私政策未载明的其他目的时,会事先征求您的同意。请您知悉,本平台向您提供的服务可能将不断更新和发展,如果您选择使用本隐私政策中尚未列明的其他功能或服务时,我们会在收集您的个人信息前通过推送通知、更为显著的弹窗等方式向您详细说明信息收集的目的、方式、范围并征求您的同意。


三、     我们如何使用Cookie等同类技术

(一)依托于微信小程序提供的原生能力

为了帮助提升您的产品体验,我们会使用微信提供的一些原生能力来避免您重复登录,并存储您所在城市信息等数据,进而帮助判断您的登录状态、更好的为您提供服务、判断账户或数据安全。所有的信息获取都会经过您的授权同意才会使用,并且我们不会主动共享或转让您的信息至任何第三方,不会对外公开披露您的任何信息,您可以通过移除小程序的方式删除您已授权的信息。

(二)Cookies 的使用

我们提供的产品服务中,为了能够让您获得更好的浏览体验,我们会在您的微信内置浏览器上记录Cookies信息,指定给您的Cookies是唯一的,它只能被将Cookies发布给您的域中的Web服务器读取。大部分手机的微信内置浏览器会自动接受Cookies,我们不会将Cookies用于本隐私政策所述目的之外的任何用途。您可以在微信“我-设置-通用-存储空间-缓存”中清除保存的所有 Cookies,但如果您这么做,您可能需要在每一次访问小程序内嵌网站时重新授权获取相关信息,而且您之前的相关记录信息也会被删除,并且可能会对您所使用服务的安全性有一定影响。


四、     我们如何委托处理、共享、转让、公开披露您的个人信息

(一)   委托处理

我们会聘请服务提供商来协助我们提供客户支持。对我们委托处理个人信息的公司、组织和个人,我们会与其签署严格的个人信息保护条款和保密协定,要求他们按照我们的要求、本个人信息保护政策以及其他任何相关的个人信息保护、保密和信息安全措施来处理您的个人信息,并且对他们的个人信息处理活动进行监督。

(二)   共享

我们不会将任何个人信息出售给第三方。我们不会向本小程序运营公司以外的任何公司、组织和个人提供您的个人信息,但以下情况除外:

1. 在向您进行明确告知并获取您的单独同意的情况下共享:获得您的单独同意后,我们会与我们所披露的有关个人信息处理者共享您的相关个人信息;

2. 我们可能会根据法律法规规定,或按政府主管部门的强制性要求,向有关主管部门提供您的个人信息。

(三)   转让

我们不会将您的个人信息转让给任何公司、组织和个人,但以下情况除外:

1. 在向您进行明确告知并获取您的单独同意的情况下转让:获得您的单独同意后,我们会向我们所披露的有关个人信息处理者转让您的相关个人信息;

2. 在涉及合并、分立、解散、被宣告破产时,如涉及到个人信息转让,我们会向您告知接收方的名称或者姓名和联系方式。如接收方变更原先的处理目的、处理方式的,我们将要求该接收方重新取得您的同意。

(四)   公开披露

我们仅会在获得您明确同意后,公开披露您的个人信息。


五、     我们如何保存、保护您的个人信息

(一)   保存地点

我们依照法律法规的规定,将在境内运营过程中收集和产生的您的个人信息存储于中华人民共和国境内。目前,我们不会将上述信息传输至其他地区,如果我们向其他地区传输,我们将遵循相关国家规定或者征求您的同意。

(二)   保存时间

我们会采取一切合理可行的措施,确保未收集无关的个人信息。适中健康信息小程序中个人信息储存必要期限是适中健康信息小程序为您终止服务后3年。超出必要期限后,我们将对您的个人信息进行删除或匿名化处理,但法律法规另有规定的除外。

(三)   保护措施

我们已使用符合业界标准的安全防护措施保护您提供的个人信息,防止数据遭到未经授权访问、公开披露、使用、修改、损坏或丢失。我们会采取一切合理可行的措施,保护您的个人信息。例如,我们会使用加密技术(例如SSL)确保数据的保密性;我们会使用受信赖的保护机制防止数据遭到恶意攻击;我们会部署访问控制机制,确保只有授权人员才可访问个人信息;以及我们会举办安全和隐私保护培训课程,加强员工对于保护个人信息重要性的认识。互联网环境并非百分之百安全,我们将尽力确保或担保您发送给我们的任何信息的安全性。

(四)    数据安全能力

我们会使用不低于行业同行的加密技术、匿名化处理及相关合理可行的手段保护您的个人信息,并使用安全保护机制防止您的个人信息遭到恶意攻击。

我们会建立专门的安全部门、安全管理制度、数据安全流程保障您的个人信息安全。我们采取严格的数据使用和访问制度,确保只有授权人员才可访问您的个人信息,并适时对数据和技术进行安全审计。

(五)   安全事件处理

在不幸发生个人信息安全事件后,我们将按照法律法规的要求,及时向您告知:安全事件的基本情况和可能的影响、我们已采取或将要采取的处置措施、您可自主防范和降低风险的建议、对您的补救措施等。我们将及时将事件相关情况以邮件、信函、电话、推送通知等方式告知您,难以逐一告知个人信息主体时,我们会采取合理、有效的方式发布公告。 同时,我们还将按照监管部门要求,主动上报个人信息安全事件的处置情况。


六、     您查阅、更正、限制、拒绝、删除、注销个人信息的权利

我们非常重视并保护您对于个人信息处理活动中的知情权、决定权、限制权、拒绝权等权利,并为您提供了行使在个人信息处理活动中相关权利的方法。

(一)   查阅权和更正权

除法律法规规定的情形除外,您有权随时查阅和更正您的个人信息,您可以通过在本平台的【我的】查阅或修改您的个人信息,包括头像、昵称。

(二)   限制或拒绝权

对于您个人信息的收集和使用,您可以在本平台上随时通过以下方式撤回授权同意,以限制或拒绝我们收集或使用您的个人信息:

您可以通过「第九章节、如何联系我们」进行相应的同意撤回。请您谨慎操作,否则,因注销账号产生的数据丢失问题均由您自行承担。在注销账号之后,我们将停止为您提供本平台服务,并依据您的要求,删除您的个人信息,但法律法规另有规定的除外。

(三)   删除权

1.您可通过微信的缓存清理功能,删除您在本平台的缓存记录提供的相关个人信息。

2.如果您需要删除您在使用本平台过程中产生的其他个人信息,在您的合理要求并经验证核实您的身份后,我们会处理您的请求。您可以通过本隐私政策「第九章节、如何联系我们」方式向我们进行反馈。

3.在以下情形中,您可以向我们提出删除个人信息的请求:

(1)  我们永久不再为您提供产品或服务;

(2)  您撤回对我们收集、使用您的个人信息的同意;

(3)  我们处理个人信息的行为违反法律、行政法规;

(4)  我们处理个人信息的行为违反了与您的约定;

(5)  您注销了用户帐号;

(6)  法律、行政法规规定的其他情形。

您同意并理解,您删除某些您已提交的个人信息可能导致您无法使用本平台的部分或者全部服务。

(四)   注销权

您可以通过「第九章节、如何联系我们」进行账户注销。一旦您注销账户,我们将停止为您提供服务。请您谨慎操作,否则,因注销账号产生的数据丢失问题均由您自行承担。当您选择注销账户后,我们将停止为您提供服务,并依据您的要求,删除您的个人信息,但法律法规另有规定的除外。


七、     未成年人保护

我们非常重视对未成年人个人信息的保护,本平台服务主要面向成年人。如果我们发现收集了未成年人的个人信息,我们将尽快删除相关信息。如果您是未成年人的监护人,并且您认为我们收集了未成年人的个人信息,请您及时与我们联系,我们将采取措施删除相关信息。


八、     本隐私政策变更及通知

(一)为了向您提供更好的功能与服务,本平台服务将不时更新与变化,因此,我们将适时修订及变更隐私政策。

(二)未经您明确同意,我们不会削减您按照本隐私政策所应享有的权利。我们会在本页面上发布对本政策所做的任何变更。

(三)对于重大变更,我们可能还会提供本平台公告、推送通知或更为显著的弹窗等方式,向您发送隐私政策的最新版本。本政策重大变更包括但不限于:

1.我们的服务模式发生重大变化。如处理个人信息的目的、处理的个人信息类型、个人信息的使用方式等;

2.我们在所有权结构、组织架构等方面发生重大变化。如业务调整、破产并购等引起的所有者变更等;

3.个人信息共享、转让或公开披露的主要对象发生变化;

4.您参与个人信息处理方面的权利及其行使方式发生重大变化;

5.我们的联络方式及投诉渠道发生变化;

6.个人信息安全影响评估报告表明存在高风险时。


九、     如何联系我们

如果您对本隐私协议有任何疑问、意见或建议,或者您需要行使您的个人信息权利,请通过以下方式与我们联系:

[电子邮箱地址] sunyuping@188.com

我们将在收到您的联系信息后,尽快回复您并处理您的问题。


十、     名词定义与解释

本平台:通过电子化信息平台运营和提供的数字化产品和服务,电子化信息平台包括但不限于适中健康信息小程序、微信公众号提供数字化产品和服务的系统或平台等,具体以用户实际注册、访问或使用为准(对于该等数字化产品和服务,本协议统称为“电子化信息平台”或“平台”或“本平台”)

个人信息:以电子或者其他方式记录的与已识别或可识别的自然人有关的各种信息,不包括匿名化处理后的信息。如姓名、出生日期、身份证件号码、个人生物识别信息、住址、通信通讯联系方式、通信记录和内容、账号密码、财产信息、征信信息、行踪轨迹、住宿信息、健康生理信息、交易信息等。

敏感个人信息:敏感个人信息是指一旦泄露或者非法使用,容易导致自然人的人格尊严受到侵害或者人身、财产安全受到危害的个人信息,包括生物识别、宗教信仰、特定身份、医疗健康、金融账户、行踪轨迹等信息,以及不满十四周岁未成年人的个人信息。例如,个人敏感信息包括身份证件号码、个人生物识别信息、银行账号、通信内容、健康生理信息等。本平台不涉及敏感信息收集。

OpenID:微信OpenID是用户在微信平台上的唯一标识符,用于身份验证和跨平台登录。此处OpenID是指本平台用户注册后的唯一加密用户身份标识。



适中健康信息



` - }, - onLoad() {}, -}); - -export {} diff --git a/src/pages/protocol/index.wxml b/src/pages/protocol/index.wxml deleted file mode 100644 index 3bf9773..0000000 --- a/src/pages/protocol/index.wxml +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/pages/search/index.json b/src/pages/search/index.json deleted file mode 100644 index 9806cef..0000000 --- a/src/pages/search/index.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "usingComponents": { - "van-nav-bar": "@vant/weapp/nav-bar/index", - "van-icon": "@vant/weapp/icon/index", - "pagination":"/components/pagination/index" - } -} diff --git a/src/pages/search/index.scss b/src/pages/search/index.scss deleted file mode 100644 index 187a809..0000000 --- a/src/pages/search/index.scss +++ /dev/null @@ -1,106 +0,0 @@ -page { - background-color: #f3f4f5; -} -.page { - padding-bottom: 80rpx; - .search { - margin: 34rpx 32rpx 0; - padding: 0 0 0 24rpx; - display: flex; - align-items: center; - background: linear-gradient(158deg, #ffffff 0%, #f2f9fe 100%); - border-radius: 106rpx 106rpx 106rpx 106rpx; - border: 1px solid #ffffff; - .icon { - width: 36rpx; - height: 36rpx; - } - .input { - flex: 1; - padding: 16rpx; - line-height: 40rpx; - font-size: 28rpx; - } - .place-input { - color: #c9cdd4; - } - } - .tip { - margin: 52rpx 32rpx 0; - font-size: 28rpx; - color: #222222; - font-weight: bold; - } - .card { - padding: 24rpx; - margin: 24rpx 32rpx 0; - display: flex; - gap: 24rpx; - background: linear-gradient(173deg, #ffffff 0%, #eff7ff 100%); - border-radius: 24rpx 24rpx 24rpx 24rpx; - border: 2rpx solid #ffffff; - .photo { - flex-shrink: 0; - width: 218rpx; - height: 218rpx; - border-radius: 16rpx; - } - .c-container { - flex: 1; - display: flex; - flex-direction: column; - justify-content: space-between; - .title { - font-size: 36rpx; - color: #222222; - font-weight: bold; - line-height: 48rpx; - } - .book-name { - flex: 1; - padding-top: 20rpx; - font-size: 32rpx; - color: #999999; - } - .c-footer { - margin-top: 20px; - display: flex; - justify-content: space-between; - gap: 20rpx; - .type { - font-size: 32rpx; - color: #999999; - } - .stat { - flex-shrink: 0; - .s-item { - display: flex; - align-items: center; - gap: 8rpx; - font-size: 28rpx; - color: #999999; - .icon { - width: 32rpx; - height: 32rpx; - } - } - } - } - } - } - .empty-search { - .e-icon { - margin: 186rpx auto 0; - display: block; - width: 217rpx; - height: 236rpx; - } - .content { - margin-top: 44rpx; - font-size: 32rpx; - line-height: 48rpx; - color: #999999; - text-align: center; - } - } -} diff --git a/src/pages/search/index.ts b/src/pages/search/index.ts deleted file mode 100644 index c386fd7..0000000 --- a/src/pages/search/index.ts +++ /dev/null @@ -1,78 +0,0 @@ -const app = getApp(); - -Page({ - data: { - background: 'transparent', - - focus: false, - Search: '', - pagination: { - page: 1, - pages: 1, - count: 1, - }, - list: [], - }, - onLoad() { - app.waitLogin().then(() => { - this.setData({ - focus: true, - }); - }); - }, - handleInput() { - this.setData({ - 'pagination.count': 1, - }); - }, - handleSearch() { - if (!this.data.Search) { - wx.showToast({ - title: '请输入搜索内容', - icon: 'none', - }); - return; - } - this.getList(); - }, - getList(newPage = 1) { - wx.ajax({ - method: 'GET', - url: `?r=shizhong/book/search-list`, - data: { - page: newPage, - Search: this.data.Search, - }, - }).then((res) => { - const list = res.page === 1 ? res.list : [...this.data.list, ...res.list]; - this.setData({ - list, - pagination: { - page: res.page, - pages: res.pages, - count: res.count, - }, - }); - }); - }, - onReachBottom() { - const { page, pages } = this.data.pagination; - if (pages > page && this.data.list.length) { - this.getList(page + 1); - } - }, - handleBack() { - wx.navigateBack(); - }, - handleDetail(e) { - const { id, cid } = e.currentTarget.dataset; - const backPath = `/pages/article/index?id=${id}&cid=${cid}`; - app.waitLogin(false, true, backPath).then(() => { - wx.navigateTo({ - url: backPath, - }); - }); - }, -}); - -export {}; diff --git a/src/pages/search/index.wxml b/src/pages/search/index.wxml deleted file mode 100644 index 5c0facf..0000000 --- a/src/pages/search/index.wxml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - 以下为搜到的内容 - - - - {{item.ChapterName}} - {{item.BookName}} - - {{item.CateName}}{{item.CateSecondName ? '/'+item.CateSecondName : ''}} - - - - 阅读 {{~~item.OperateNum + ~~item.BrowseNum}} - - - - - - - - - 抱歉,未搜到相关内容 - - 换个词试试吧 - - - - diff --git a/src/pages/switchLogin/index.json b/src/pages/switchLogin/index.json deleted file mode 100644 index 2b97f2d..0000000 --- a/src/pages/switchLogin/index.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "usingComponents": { - "van-icon": "@vant/weapp/icon/index", - "van-nav-bar": "@vant/weapp/nav-bar/index" - } -} diff --git a/src/pages/switchLogin/index.scss b/src/pages/switchLogin/index.scss deleted file mode 100644 index e0813cc..0000000 --- a/src/pages/switchLogin/index.scss +++ /dev/null @@ -1,161 +0,0 @@ -.page { - .container { - margin-top: 336rpx; - padding: 64rpx 32rpx 0; - background: linear-gradient(to bottom, rgba(255, 255, 255, 0.76) 0%, #ffffff 100%) no-repeat top center/100% 186rpx; - border-radius: 32rpx; - - .tel { - .input { - padding: 24rpx 48rpx; - background-color: #f4f7fa; - border-radius: 96rpx; - font-size: 32rpx; - } - - .place-input { - color: #babdc1; - } - } - - .code-row { - margin-top: 32rpx; - display: flex; - align-items: center; - gap: 30rpx; - - .code { - flex: 1; - padding: 24rpx 48rpx; - background-color: #f4f7fa; - border-radius: 96rpx; - font-size: 32rpx; - } - - .place-code { - color: #babdc1; - } - - .btn { - flex-shrink: 0; - padding: 24rpx; - width: 7em; - text-align: center; - color: #fff; - font-size: 32rpx; - background-color: #3795f7; - border-radius: 96rpx; - } - } - - .protool { - margin-top: 56rpx; - display: flex; - align-items: center; - font-size: 28rpx; - color: #999; - - .radio { - transform: scale(0.7); - } - - .link { - color: #3795f7; - } - } - - .submit { - margin-top: 88rpx; - padding: 22rpx; - text-align: center; - font-size: 36rpx; - color: #fff; - line-height: 44rpx; - background: linear-gradient(90deg, #134df6 36%, #3795f7 100%); - border-radius: 96rpx 96rpx 96rpx 96rpx; - } - - .tel-btn { - margin: 78rpx auto 0; - padding: 12rpx 44rpx; - border-radius: 52rpx; - width: 352rpx; - font-size: 32rpx; - line-height: 40rpx; - color: rgba(153, 153, 153, 1); - display: flex; - gap: 12rpx; - align-items: center; - justify-content: center; - outline: none; - - .icon { - width: 28rpx; - height: 40rpx; - } - - &::after { - border: none; - outline: none; - } - } - - .visitor { - margin-top: 196rpx; - display: flex; - align-items: center; - justify-content: center; - font-size: 32rpx; - line-height: 1; - color: #3795f7; - } - } -} - -.popup { - padding: 33rpx 0 0; - - .popup-container { - padding: 280rpx 48rpx 0; - width: 622rpx; - height: 490rpx; - box-sizing: border-box; - background: linear-gradient(180deg, #e7f8ff 0%, #ffffff 100%); - border-radius: 32rpx; - position: relative; - - .badge { - position: absolute; - left: 0; - top: -33px; - width: 246rpx; - height: 286rpx; - } - - .title { - position: absolute; - top: 50rpx; - right: 28rpx; - width: 338rpx; - height: 164rpx; - } - - .conform { - height: 88rpx; - text-align: center; - background: #3795f7; - line-height: 88rpx; - font-size: 36rpx; - color: #FFFFFF; - border-radius: 96rpx 96rpx 96rpx 96rpx; - } - - .cancel{ - margin-top: 10rpx; - font-size: 32rpx; - color: #999999; - text-align: center; - line-height: 88rpx; - } - } -} diff --git a/src/pages/switchLogin/index.ts b/src/pages/switchLogin/index.ts deleted file mode 100644 index 6fce3a5..0000000 --- a/src/pages/switchLogin/index.ts +++ /dev/null @@ -1,95 +0,0 @@ -const app = getApp(); -let timer: number | null = 0; - -Page({ - data: { - menuButtonInfo: {}, - mobile: '', - code: '', - codeText: '发送验证码', - }, - onLoad() {}, - getCode() { - if (timer) return; - const mobile = this.data.mobile; - if (!mobile) { - wx.showToast({ - title: '手机号不能为空', - icon: 'none', - }); - return; - } - // 验证手机号 - if (!/^1[3-9,]\d{9}$/.test(mobile)) { - wx.showToast({ - title: '手机号格式不正确', - icon: 'none', - }); - return; - } - wx.ajax({ - method: 'POST', - url: '?r=shizhong/login/send-verify-code', - data: { - mobile, - }, - }).then(() => { - wx.showToast({ - icon: 'none', - title: '验证码已发送~', - }); - let time = 60; - timer = setInterval(() => { - time--; - this.setData({ - codeText: `${time}s后重新发送`, - }); - if (time <= 0) { - clearInterval(timer as number); - timer = null; - this.setData({ - codeText: '发送验证码', - }); - } - }, 1000); - }); - }, - handleSubmit() { - const { mobile, code } = this.data; - if (!mobile) { - wx.showToast({ - title: '请输入手机号', - icon: 'none', - }); - return; - } - if (!code) { - wx.showToast({ - title: '请输入验证码', - icon: 'none', - }); - return; - } - wx.ajax({ - method: 'POST', - url: '?r=shizhong/login/reg-login', - data: { - mobile, - code, - }, - }).then(() => { - this.submitCallback(); - }); - }, - submitCallback() { - app.globalData.isLogin = 1; - wx.reLaunch({ - url: '/pages/home/index', - }); - }, - handleBack(){ - wx.navigateBack() - } -}); - -export {}; diff --git a/src/pages/switchLogin/index.wxml b/src/pages/switchLogin/index.wxml deleted file mode 100644 index 1aaffeb..0000000 --- a/src/pages/switchLogin/index.wxml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - {{codeText}} - - 切换账号 - - diff --git a/src/pages/topic/index.json b/src/pages/topic/index.json deleted file mode 100644 index 9d75de7..0000000 --- a/src/pages/topic/index.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "usingComponents": { - "van-progress": "@vant/weapp/progress/index", - "van-nav-bar": "@vant/weapp/nav-bar/index", - "van-icon": "@vant/weapp/icon/index", - "van-popup": "@vant/weapp/popup/index" - } -} diff --git a/src/pages/topic/index.scss b/src/pages/topic/index.scss deleted file mode 100644 index fd9085a..0000000 --- a/src/pages/topic/index.scss +++ /dev/null @@ -1,219 +0,0 @@ -page { - background: #f3f4f5 linear-gradient(180deg, #d2f1fe 0%, rgba(244, 248, 249, 0) 100%) no-repeat top center/100% 442rpx; -} - -.page { - min-height: 100vh; - overflow: hidden; - - .swiper { - width: 100%; - height: 1632rpx; - box-sizing: border-box; - } - - .topic { - position: relative; - margin: 16rpx 48rpx; - padding: 48rpx 40rpx 0; - box-sizing: border-box; - background: #ffffff; - box-shadow: 0rpx 8rpx 32rpx 0rpx rgba(188, 188, 188, 0.18); - border-radius: 24rpx 24rpx 24rpx 24rpx; - &::before { - content: ''; - position: absolute; - bottom: -50rpx; - left: 52rpx; - width: calc(100% - 104rpx); - height: 50rpx; - background: rgba(55, 149, 247, 0.24); - border-radius: 0 0 24rpx 24rpx; - } - &::after { - content: ''; - position: absolute; - bottom: -30rpx; - left: 22rpx; - width: calc(100% - 44rpx); - height: 30rpx; - background: rgba(55, 149, 247, 0.8); - border-radius: 0 0 24rpx 24rpx; - } - - .order { - font-size: 60rpx; - color: #3795f7; - font-weight: bold; - - .all { - font-size: 44rpx; - color: #cdcdcd; - } - } - - .progress { - margin-top: 26rpx; - } - - .content { - margin-top: 34rpx; - font-size: 36rpx; - color: #222222; - line-height: 64rpx; - white-space: pre-line; - } - - .btn { - margin-top: 32rpx; - font-size: 36rpx; - color: #65686c; - line-height: 88rpx; - text-align: center; - height: 88rpx; - background: #f4f7fa; - border-radius: 84rpx 84rpx 84rpx 84rpx; - - &.active { - color: #ffffff; - background: #3795f7; - } - } - - .footer { - width: 100%; - padding: 60rpx 0; - box-sizing: border-box; - display: flex; - align-items: center; - justify-content: space-between; - - .prev { - flex: 1; - font-size: 36rpx; - color: #3795f7; - font-weight: bold; - display: flex; - align-items: center; - justify-content: center; - box-sizing: border-box; - - .icon { - margin-right: 16rpx; - width: 44rpx; - height: 44rpx; - } - } - - .submit { - width: 290rpx; - height: 88rpx; - font-size: 36rpx; - color: #ffffff; - background: #3795f7; - border-radius: 96rpx 96rpx 96rpx 96rpx; - text-align: center; - line-height: 88rpx; - font-weight: normal; - } - } - } - - .end { - position: relative; - margin: 272rpx 48rpx 16rpx; - padding: 70rpx 52rpx 84rpx; - box-sizing: border-box; - background: #ffffff; - box-shadow: 0rpx 8rpx 32rpx 0rpx rgba(188, 188, 188, 0.18); - border-radius: 24rpx 24rpx 24rpx 24rpx; - .badge { - display: block; - margin: 0 auto; - width: 217rpx; - height: 182rpx; - } - .title { - font-size: 40rpx; - color: #222222; - font-weight: bold; - text-align: center; - } - .content { - margin-top: 30rpx; - font-size: 32rpx; - color: #222222; - } - .codes { - margin-top: 30rpx; - display: flex; - justify-content: space-between; - .c-item { - .code { - width: 246rpx; - height: 246rpx; - } - .name { - margin-top: 4rpx; - text-align: center; - font-size: 28rpx; - color: #222222; - } - } - } - .btn { - margin-top: 54rpx; - height: 88rpx; - text-align: center; - line-height: 88rpx; - font-size: 36rpx; - color: #fff; - background: #3795f7; - border-radius: 96rpx 96rpx 96rpx 96rpx; - } - } -} - -.relove { - position: fixed; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - z-index: 10; - width: 388rpx; - height: 350rpx; - background: rgba(0, 0, 0, 0.67); - border-radius: 42rpx 42rpx 42rpx 42rpx; - display: flex; - align-items: center; - justify-content: center; - flex-direction: column; - text-align: center; - .icon { - width: 84rpx; - height: 84rpx; - } - .content { - margin-top: 26rpx; - font-size: 40rpx; - color: #ffffff; - } -} - -.start { - padding: 710rpx 32rpx 0; - width: 654rpx; - height: 860rpx; - box-sizing: border-box; - .btn { - width: 596rpx; - height: 88rpx; - font-size: 36rpx; - color: #FFFFFF; - display: flex; - align-items: center; - justify-content: center; - background: #3795f7; - border-radius: 96rpx 96rpx 96rpx 96rpx; - } -} diff --git a/src/pages/topic/index.ts b/src/pages/topic/index.ts deleted file mode 100644 index 464bf9b..0000000 --- a/src/pages/topic/index.ts +++ /dev/null @@ -1,146 +0,0 @@ -const app = getApp(); -// const licia = require('miniprogram-licia'); - -Page({ - data: { - nav: 0, - percentage: 0, - question: [] as { questionId: string; title: string; answer?: '1' | '2' }[], - - back: false, - - start: true, - end: false, - - answerList: [ - ['非常了解', '一般了解', '完全不了解'], - ['非常了解', '一般了解', '完全不了解'], - ['非常了解', '一般了解', '完全不了解'], - ['非常了解', '一般了解', '完全不了解'], - ['很感兴趣', '一般兴趣', '不感兴趣'], - ['很感兴趣', '一般兴趣', '不感兴趣'], - ['很感兴趣', '一般兴趣', '不感兴趣'], - ['非常了解', '一般了解', '完全不了解'], - ['很感兴趣', '一般兴趣', '不感兴趣'], - ['很感兴趣', '一般兴趣', '不感兴趣'], - ['很感兴趣', '一般兴趣', '不感兴趣'], - ['很感兴趣', '一般兴趣', '不感兴趣'], - ['很感兴趣', '一般兴趣', '不感兴趣'], - ['很感兴趣', '一般兴趣', '不感兴趣'], - ['很感兴趣', '一般兴趣', '不感兴趣'], - ['很感兴趣', '一般兴趣', '不感兴趣'], - ['很感兴趣', '一般兴趣', '不感兴趣'], - ['很感兴趣', '一般兴趣', '不感兴趣'], - ['很感兴趣', '一般兴趣', '不感兴趣'], - ['很感兴趣', '一般兴趣', '不感兴趣'], - ], - }, - onLoad(options) { - this.setData({ - back: options.back === '1', - }); - app.waitLogin(true).then(() => { - this.getList(); - }); - }, - getList() { - wx.ajax({ - method: 'GET', - url: '?r=shizhong/account/get-question', - data: {}, - }).then((res) => { - this.setData({ - question: res, - }); - }); - }, - handleEnd() { - app.waitLogin().then(() => { - wx.reLaunch({ - url: '/pages/home/index', - }); - }); - }, - // handleBtn: licia.debounce(function (e) { - // const { index, id } = e.currentTarget.dataset; - // const { question, nav } = this.data; - // question[index].answer = id; - // this.setData({ - // question, - // nav: nav === question.length - 1 ? nav : nav + 1, - // percentage: ((nav + 1) / question.length) * 100, - // }); - // }, 200), - handleBtn(e) { - const { index, id } = e.currentTarget.dataset; - const { question, nav } = this.data; - // 防止重复点击 - if (question[index].answer && nav > index) return; - question[index].answer = id; - this.setData({ - question, - nav: nav === question.length - 1 ? nav : nav + 1, - percentage: ((nav + 1) / question.length) * 100, - }); - }, - handlePrev() { - this.setData({ - nav: this.data.nav - 1, - }); - }, - handleSubmit() { - const answer = this.data.question.map((item) => { - return { - qId: item.questionId, - answer: item.answer, - }; - }); - wx.ajax({ - method: 'POST', - url: '?r=shizhong/account/answer-question', - data: { - answer: JSON.stringify(answer), - }, - }).then(() => { - this.setData({ - end: true, - }); - }); - }, - bindtransition() { - this.setData({ - nav: this.data.nav, - }); - }, - catchTouchMove() { - return false; - }, - handleStart() { - this.setData({ start: false }); - }, - handleBack() { - if (this.data.end) { - wx.navigateBack(); - } else { - wx.showModal({ - title: '确认退出?', - content: '还差一点就完成了,退出会清空所有答题,确认现在要退出吗?', - cancelText: '退出', - confirmText: '继续答题', - success: (res) => { - if (res.cancel) { - if (this.data.back) { - wx.navigateBack(); - } else { - wx.reLaunch({ - url: '/pages/home/index', - }); - } - } - }, - }); - } - }, -}); - -export {}; diff --git a/src/pages/topic/index.wxml b/src/pages/topic/index.wxml deleted file mode 100644 index 7802710..0000000 --- a/src/pages/topic/index.wxml +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - - {{index + 1}}/ - {{question.length}} - - - - - {{questionItem.title}} - - {{answerList[index][0]}} - - - {{answerList[index][1]}} - - - {{answerList[index][2]}} - - - - - 上一题 - - - 提交 - - - - - - - - - - 提交成功 - - 感谢您的参与! - - - 欢迎使用适中健康信息小程序,您将看到一个查有可依、科学性、体系化的健康信息世界,化零为整,随时查阅。 - - - - - 关注公众号 - - - - 关注企微号 - - - 现在体验 - - - - - - 开始答题 - - diff --git a/src/pages/userInfo/index.json b/src/pages/userInfo/index.json deleted file mode 100644 index fb43e76..0000000 --- a/src/pages/userInfo/index.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "navigationStyle": "default", - "navigationBarTitleText": "个人信息", - "usingComponents": { - "uploadFile": "/components/uploadFile/index" - } -} diff --git a/src/pages/userInfo/index.scss b/src/pages/userInfo/index.scss deleted file mode 100644 index f0171e1..0000000 --- a/src/pages/userInfo/index.scss +++ /dev/null @@ -1,56 +0,0 @@ -page { - background-color: #f3f4f5; -} -.page { - padding: 32rpx; - .container { - border-radius: 16rpx; - background-color: #fff; - .row { - padding: 36rpx 32rpx; - display: flex; - align-items: center; - justify-content: space-between; - border-bottom: 1px solid #f0f0f0; - &:last-of-type { - border: none; - } - &.small { - padding: 24rpx 32rpx; - } - .label { - font-size: 36rpx; - color: #222222; - } - .wrap { - flex: 1; - display: flex; - justify-content: flex-end; - .avatar { - position: relative; - width: 100rpx; - height: 100rpx; - .a-img { - width: 100rpx; - height: 100rpx; - border-radius: 50%; - } - .icon { - position: absolute; - bottom: 0; - right: 0; - width: 32rpx; - height: 32rpx; - } - } - .input { - text-align: right; - font-size: 36rpx; - } - .place-input { - color: #babdc1; - } - } - } - } -} diff --git a/src/pages/userInfo/index.ts b/src/pages/userInfo/index.ts deleted file mode 100644 index 2f86ab6..0000000 --- a/src/pages/userInfo/index.ts +++ /dev/null @@ -1,59 +0,0 @@ -const app = getApp(); - -Page({ - data: { - username: '', - userInfo: {} as any, - }, - onLoad() { - app.waitLogin().then(() => { - app.getUserInfo(this); - }); - }, - handleFile(e) { - const avatar = e.detail.fileUrl; - this.setData({ - 'userInfo.avatar': avatar, - }); - this.updateUserInfo(); - }, - handleInputBlur(e) { - this.setData({ - username: e.detail.value, - }); - }, - handleInputBlurPass(e) { - if (e.detail.pass) { - this.setData({ - [`userInfo.username`]: this.data.username, - }); - this.updateUserInfo(); - } - }, - updateUserInfo() { - const { avatar, username } = this.data.userInfo; - if (!username) { - wx.showToast({ - title: '请输入用户名', - icon: 'none', - }); - return; - } - wx.ajax({ - method: 'POST', - url: '?r=shizhong/account/update-info', - data: { - userName: username, - avatar, - }, - }).then(() => { - app.getUserInfo(this); - wx.showToast({ - title: '保存成功', - icon: 'none', - }); - }); - }, -}); - -export {}; diff --git a/src/pages/userInfo/index.wxml b/src/pages/userInfo/index.wxml deleted file mode 100644 index 14b9cc3..0000000 --- a/src/pages/userInfo/index.wxml +++ /dev/null @@ -1,42 +0,0 @@ - - - - 头像 - - - - - - - - - - 昵称 - - - - - -