Browse Source

bug处理

master
kola-web 3 days ago
parent
commit
b43b7437be
  1. 39
      src/components/popup/index.scss
  2. 14
      src/components/popup/index.wxml
  3. 6
      src/doc/pages/doc1/index.json
  4. 3
      src/doc/pages/doc1/index.scss
  5. 4
      src/doc/pages/doc1/index.ts
  6. 5
      src/doc/pages/doc1/index.wxml
  7. BIN
      src/images/bg9.png
  8. BIN
      src/images/icon22.png
  9. BIN
      src/images/share.png
  10. 2
      src/pages/home/index.scss
  11. 22
      src/pages/home/index.ts
  12. 10
      src/pages/home/index.wxml
  13. 3
      src/pages/informationDetail/index.json
  14. 3
      src/pages/informationDetail/index.scss
  15. 28
      src/pages/informationDetail/index.ts
  16. 16
      src/pages/informationDetail/index.wxml
  17. 10
      src/pages/login/index.scss
  18. 14
      src/pages/login/index.ts
  19. 15
      src/pages/login/index.wxml
  20. 6
      src/pages/message/index.wxml
  21. 12
      src/utils/page.ts

39
src/components/popup/index.scss

@ -86,6 +86,45 @@ @@ -86,6 +86,45 @@
height: 100%;
}
}
.popup5 {
background-color: #fff;
.container {
padding: 64rpx 0 104rpx;
.title {
display: flex;
align-items: center;
justify-content: center;
font-size: 40rpx;
color: rgba(40, 48, 49, 1);
line-height: 64rpx;
gap: 8rpx;
.tag {
padding: 0 10rpx;
color: #fff;
background-color: rgba(140, 117, 208, 1);
border-radius: 12rpx;
line-height: 52rpx;
}
}
.content {
font-size: 40rpx;
color: rgba(40, 48, 49, 1);
text-align: center;
}
.btn {
margin: 612rpx auto 0;
font-size: 36rpx;
color: rgba(255, 255, 255, 1);
width: 590rpx;
height: 88rpx;
display: flex;
align-items: center;
justify-content: center;
background: linear-gradient(89deg, #8c75d0 0%, #b7bdff 100%);
border-radius: 100rpx 100rpx 100rpx 100rpx;
}
}
}
.close {
margin: 48rpx auto 0;

14
src/components/popup/index.wxml

@ -38,6 +38,20 @@ @@ -38,6 +38,20 @@
<view class="popup4" wx:if="{{type==='popup4'}}">
<image class="p-img" src="{{imageUrl}}bg7.png?t={{Timestamp}}" show-menu-by-longpress></image>
</view>
<view class="popup5" wx:if="{{type==='popup5'}}">
<view
class="container"
style="background: url('{{imageUrl}}bg9.png?t={{Timestamp}}') no-repeat bottom center/100% 804rpx"
>
<view class="title">
<view class="tag">转发</view>
报告至
</view>
<view class="content">“文件传输助手”完成下载</view>
<view class="btn" bind:tap="handleOk">继续</view>
</view>
</view>
<image
wx:if="{{params.close}}"

6
src/doc/pages/doc1/index.json

@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
{
"navigationStyle": "default",
"navigationBarTitleText": "隐私协议保护政策",
"usingComponents": {}
"navigationBarTitleText": "TED关爱中心小程序隐私政策",
"usingComponents": {
"mp-html": "mp-html"
}
}

3
src/doc/pages/doc1/index.scss

@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
.page{
padding: 0 40rpx;
}

4
src/doc/pages/doc1/index.ts

File diff suppressed because one or more lines are too long

5
src/doc/pages/doc1/index.wxml

@ -1,2 +1,3 @@ @@ -1,2 +1,3 @@
<!--pages/story/index.wxml-->
<text>pages/story/index.wxml</text>
<view class="page">
<mp-html content="{{doc}}"></mp-html>
</view>

BIN
src/images/bg9.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

BIN
src/images/icon22.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 932 B

BIN
src/images/share.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 937 KiB

2
src/pages/home/index.scss

@ -3,7 +3,7 @@ page { @@ -3,7 +3,7 @@ page {
}
.page-title {
width: 344rpx;
width: 320rpx;
height: 34rpx;
}
.page {

22
src/pages/home/index.ts

@ -4,6 +4,8 @@ const app = getApp<IAppOption>(); @@ -4,6 +4,8 @@ const app = getApp<IAppOption>();
Page({
data: {
Timestamp: '',
popupShow: false,
popupType: 'popup1', // 绑定医生弹窗
// popupType: 'popup2', // 去关注弹窗
@ -59,6 +61,10 @@ Page({ @@ -59,6 +61,10 @@ Page({
});
},
handleWebview() {
// wx.showToast({
// title: '访问路径:公众号“TED关爱中心”底部菜单栏',
// icon: 'none',
// });
const encodeUrl = encodeURIComponent('https://dct.meddb.cn');
wx.navigateTo({
url: `/pages/webview/index?url=${encodeUrl}`,
@ -70,6 +76,9 @@ Page({ @@ -70,6 +76,9 @@ Page({
url: '?r=xd/doctor/index/get-latest-mini-msg',
data: {},
}).then((res) => {
if (res.list.length) {
app.mpBehavior({ PositionId: '4', OperateType: '4', OperateId: res.list[0].Id });
}
this.setData({
notice: res.list.map((item) => {
item.year = dayjs(item.PublishDate).format('YYYY');
@ -98,12 +107,16 @@ Page({ @@ -98,12 +107,16 @@ Page({
});
},
});
} else {
this.handleNotice();
}
},
handleSwiperChange(e) {
const current = e.detail.current;
const { Id } = this.data.notice[current];
app.mpBehavior({ PositionId: '4', OperateType: '4', OperateId: Id });
const { Id } = this.data.notice[current] || {};
if (Id) {
app.mpBehavior({ PositionId: '4', OperateType: '4', OperateId: Id });
}
this.setData({
current: e.detail.current,
});
@ -124,6 +137,7 @@ Page({ @@ -124,6 +137,7 @@ Page({
handleBanner(e) {
const { index } = e.currentTarget.dataset;
const { LinkUrl } = this.data.bannerList[index];
if (!LinkUrl) return;
wx.navigateTo({
url: LinkUrl,
fail() {
@ -228,7 +242,9 @@ Page({ @@ -228,7 +242,9 @@ Page({
imageUrl: CoverImgUrl,
};
}
return {};
return {
imageUrl: `${app.globalData.imageUrl}share.png?t=${this.data.Timestamp}`,
};
},
});

10
src/pages/home/index.wxml

@ -23,7 +23,7 @@ @@ -23,7 +23,7 @@
<image class="e-img" src="{{imageUrl}}card1.png?t={{Timestamp}}"></image>
</view>
<view class="notice">
<swiper class="v-swiper" current="{{current}}" bind:change="handleSwiperChange">
<swiper class="v-swiper" current="{{current}}" autoplay bind:change="handleSwiperChange">
<swiper-item
class="swiper-item"
wx:for="{{notice}}"
@ -109,9 +109,9 @@ @@ -109,9 +109,9 @@
</view>
<image class="icon" src="{{imageUrl}}icon14.png?t={{Timestamp}}"></image>
</view>
<view class="status2" wx:if="{{item.Cmposite==1}}">
<view class="status2" wx:if="{{item.Composite==1}}">
未申请
<image class="s-icon" src="{{imageUrl}}icon21.png?t={{Timestamp}}"></image>
<image class="s-icon" src="{{imageUrl}}icon19.png?t={{Timestamp}}"></image>
</view>
<view class="status1" wx:elif="{{item.Composite==2}}">
已申请
@ -120,7 +120,7 @@ @@ -120,7 +120,7 @@
<view class="name">{{item.Content}}</view>
</view>
</swiper-item>
<swiper-item class="swiper-item" bind:tap="handleNotice" wx:key="none">
<swiper-item class="swiper-item" bind:tap="handleNotice" wx:key="{{notice.length+1}}">
<!-- more -->
<view class="item5">
<image class="icon1" src="{{imageUrl}}icon17.png?t={{Timestamp}}"></image>
@ -131,7 +131,7 @@ @@ -131,7 +131,7 @@
</view>
</swiper-item>
</swiper>
<view class="dots">
<view class="dots" wx:if="{{notice.length > 0}}">
<view class="dot {{current==index && 'active'}}" wx:for="{{notice.length+1}}" wx:key="index"></view>
</view>
</view>

3
src/pages/informationDetail/index.json

@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
"navigationStyle": "default",
"navigationBarTitleText": "资料详情页",
"usingComponents": {
"mp-html": "mp-html"
"mp-html": "mp-html",
"popup": "/components/popup/index"
}
}

3
src/pages/informationDetail/index.scss

@ -1,5 +1,8 @@ @@ -1,5 +1,8 @@
.page {
padding: 40rpx 40rpx 200rpx;
max-width: 100vw;
box-sizing: border-box;
overflow-x: hidden;
.title {
font-size: 40rpx;
color: rgba(33, 29, 46, 1);

28
src/pages/informationDetail/index.ts

@ -4,6 +4,12 @@ const app = getApp<IAppOption>(); @@ -4,6 +4,12 @@ const app = getApp<IAppOption>();
Page({
data: {
popupShow: false,
popupType: 'popup5', // 绑定医生弹窗
popupParams: {
position: 'bottom',
} as any,
doc: '1',
id: '',
@ -45,7 +51,27 @@ Page({ @@ -45,7 +51,27 @@ Page({
});
});
},
handlePopup() {
this.setData({
popupShow: true,
popupType: 'popup5',
popupParams: {
position: 'bottom',
},
});
},
handlePopupOk() {
const { popupType } = this.data;
if (popupType === 'popup5') {
this.handleDownload();
this.handlePopupCancel();
}
},
handlePopupCancel() {
this.setData({
popupShow: false,
});
},
handleDownload() {
const { detail } = this.data;
wx.showLoading({

16
src/pages/informationDetail/index.wxml

@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
{{detail.ReadCount}}
</view>
</view>
<view class="file-card" wx:if="{{detail.FileUrl}}" bind:tap="handleDownload">
<view class="file-card" wx:if="{{detail.FileUrl}}" bind:tap="handlePopup">
<image class="icon" src="{{imageUrl}}{{fileIcon[detail.FileType] || 'none'}}.png?t={{Timestamp}}"></image>
<view class="wrap">
<view class="content">{{detail.FileName}}</view>
@ -17,14 +17,22 @@ @@ -17,14 +17,22 @@
</view>
<view class="mp-html">
<mp-html content="{{detail.Content}}"></mp-html>
<mp-html container-style="overflow: hidden;word-break:all" content="{{detail.Content}}"></mp-html>
</view>
<view class="page-footer">
<image class="avatar" src="{{imageUrl}}icon10.png?t={{Timestamp}}"></image>
<view class="title"> TED规范化诊治中心</view>
<view class="title">TED规范化诊治中心</view>
<button class="share" open-type="share">
<image class="icon" src="{{imageUrl}}icon8.png?t={{Timestamp}}"></image>
<image class="icon" src="{{imageUrl}}icon22.png?t={{Timestamp}}"></image>
</button>
</view>
</view>
<popup
show="{{popupShow}}"
type="{{popupType}}"
params="{{popupParams}}"
bind:ok="handlePopupOk"
bind:cancel="handlePopupCancel"
></popup>

10
src/pages/login/index.scss

@ -12,12 +12,12 @@ page { @@ -12,12 +12,12 @@ page {
}
.page-title {
display: block;
margin: 32rpx auto 0;
margin: 48rpx auto 0;
width: 510rpx;
height: 54rpx;
}
.protocol {
margin-top: 32rpx;
margin-top: 64rpx;
.p-title {
font-size: 36rpx;
color: rgba(105, 104, 110, 1);
@ -34,7 +34,7 @@ page { @@ -34,7 +34,7 @@ page {
}
}
.phone {
margin-top: 46rpx;
margin-top: 64rpx;
height: 88rpx;
font-size: 32rpx;
color: rgba(255, 255, 255, 1);
@ -45,13 +45,13 @@ page { @@ -45,13 +45,13 @@ page {
border-radius: 84rpx 84rpx 84rpx 84rpx;
}
.divider {
margin: 80rpx 150rpx 0;
margin: 74rpx 150rpx 0;
.van-divider {
color: rgba(173, 172, 178, 1);
}
}
.tel-btn {
margin: 0 auto;
margin: 20rpx auto 0;
padding: 4rpx 0;
width: 266rpx;
display: flex;

14
src/pages/login/index.ts

@ -83,6 +83,20 @@ Page({ @@ -83,6 +83,20 @@ Page({
async handleSubmit() {
await this.handleDocRule();
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=xd/login/reg-login',

15
src/pages/login/index.wxml

@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
<view class="protocol">
<view class="p-title">尊敬的医生您好</view>
<view class="p-content">
在您加入TED规范化诊治中心之前,请您阅读并充分理解
加入TED规范化诊治中心之前,请您阅读并充分理解
<text class="link" bind:tap="handleLink">《隐私协议保护政策》</text>
,了解您的权益及相关数据处理方法,我们将严格按照法律法规及
<text class="link" bind:tap="handleLink">《隐私协议保护政策》</text>
@ -39,7 +39,7 @@ @@ -39,7 +39,7 @@
<view class="form-row">
<input
class="input"
medal:value="{{code}}"
model:value="{{code}}"
placeholder-class="place-input"
type="number"
maxlength="6"
@ -51,12 +51,17 @@ @@ -51,12 +51,17 @@
</view>
<view class="signature">
<view class="row">
<image wx:if="{{check1}}" bind:tap="handleCheck" class="check" src="{{imageUrl}}checkbox-active.png?t={{Timestamp}}"></image>
<image
wx:if="{{check1}}"
bind:tap="handleCheck"
class="check"
src="{{imageUrl}}checkbox-active.png?t={{Timestamp}}"
></image>
<image wx:else class="check" bind:tap="handleCheck" src="{{imageUrl}}checkbox.png?t={{Timestamp}}"></image>
<view class="r-content">
我特此同意依照此
我同意依照此
<text class="link" bind:tap="handleLink">《隐私协议保护政策》</text>
规定收集我的个人敏感信息
规定收集我的个人信息
</view>
</view>
</view>

6
src/pages/message/index.wxml

@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
<!-- 入组 -->
<view class="wrap4" wx:elif="{{item.Type==2}}">
<view class="num-line">
7
{{item.Composite}}
<view class="sub">例入组</view>
</view>
<view class="name">{{item.Content}}</view>
@ -35,11 +35,11 @@ @@ -35,11 +35,11 @@
</view>
<!-- edc -->
<view class="wrap3" wx:elif="{{item.Type==4}}">
<view class="status4" wx:if="{{item.Cmposite==1}}">
<view class="status2" wx:if="{{item.Composite==1}}">
未申请
<image class="s-icon" src="{{imageUrl}}icon19.png?t={{Timestamp}}"></image>
</view>
<view class="status2" wx:elif="{{item.Composite==2}}">
<view class="status1" wx:elif="{{item.Composite==2}}">
已申请
<image class="s-icon" src="{{imageUrl}}icon20.png?t={{Timestamp}}"></image>
</view>

12
src/utils/page.ts

@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@
*/
const originalPage = Page;
const noSharePath = ['pages/login/index'];
function page(config: WechatMiniprogram.Page.Instance<WechatMiniprogram.IAnyObject, WechatMiniprogram.IAnyObject>) {
const originalOnLoad = config.onLoad;
@ -42,7 +43,7 @@ function page(config: WechatMiniprogram.Page.Instance<WechatMiniprogram.IAnyObje @@ -42,7 +43,7 @@ function page(config: WechatMiniprogram.Page.Instance<WechatMiniprogram.IAnyObje
const pages = getCurrentPages();
const currentPage = pages[pages.length - 1];
const url = currentPage.route;
let url = currentPage.route;
const options = currentPage.options;
let urlWithArgs = `${url}?`;
for (const key in options) {
@ -51,10 +52,17 @@ function page(config: WechatMiniprogram.Page.Instance<WechatMiniprogram.IAnyObje @@ -51,10 +52,17 @@ function page(config: WechatMiniprogram.Page.Instance<WechatMiniprogram.IAnyObje
}
urlWithArgs = urlWithArgs.substring(0, urlWithArgs.length - 1);
const isNoShare = noSharePath.some((path) => {
return url.includes(path);
});
if (isNoShare) {
url = 'pages/start/index';
}
return {
title: '甲状腺眼病TED规范化诊治中心',
path: url,
// imageUrl: `${getApp().globalData.imageUrl}1/1.png?t=${Timestamp}`,
imageUrl: `${getApp().globalData.imageUrl}share.png?t=${Timestamp}`,
};
}
};

Loading…
Cancel
Save