Browse Source

体验走查问题处理 p0级别

master
kola-web 2 months ago
parent
commit
13d3100790
  1. 8
      src/components/global-toast/index.scss
  2. 15
      src/components/global-toast/index.wxml
  3. BIN
      src/images/copnay-code.png
  4. BIN
      src/images/icon-close.png
  5. BIN
      src/images/icon-play.png
  6. BIN
      src/images/icon-stop.png
  7. BIN
      src/images/qyPic.jpg
  8. BIN
      src/images/topic-card-bg.png
  9. 35
      src/pages/article/index.scss
  10. 9
      src/pages/article/index.ts
  11. 13
      src/pages/article/index.wxml
  12. 2
      src/pages/classify/index.json
  13. 6
      src/pages/classify/index.scss
  14. 2
      src/pages/classify/index.ts
  15. 6
      src/pages/classify/index.wxml
  16. 1
      src/pages/collection/index.scss
  17. 2
      src/pages/collection/index.wxml
  18. 15
      src/pages/home/index.ts
  19. 11
      src/pages/login/index.ts
  20. 2
      src/pages/longPicture/index.json
  21. 1
      src/pages/my/index.scss
  22. 6
      src/pages/my/index.ts
  23. 2
      src/pages/my/index.wxml
  24. 1
      src/pages/search/index.scss
  25. 2
      src/pages/search/index.ts
  26. 2
      src/pages/search/index.wxml
  27. 37
      src/pages/topic/index.scss
  28. 2
      src/pages/topic/index.ts
  29. 7
      src/pages/topic/index.wxml

8
src/components/global-toast/index.scss

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
.popup1 {
padding: 110rpx 0 0;
width: 651rpx;
height: 651rpx;
height: 781rpx;
box-sizing: border-box;
.title {
@ -24,6 +24,12 @@ @@ -24,6 +24,12 @@
color: #65686c;
text-align: center;
}
.close {
margin: 120rpx auto 0;
display: block;
width: 72rpx;
height: 72rpx;
}
}
.popup3 {

15
src/components/global-toast/index.wxml

@ -1,16 +1,21 @@ @@ -1,16 +1,21 @@
<van-popup show="{{ show }}" wx:if="{{type===1}}" custom-style="background: transparent;" bind:close="handleClose">
<view class="popup1" style="background: url('{{imageUrl}}popup1-bg.png?t={{Timestamp}}') no-repeat top center/100%">
<view class="title">关注适中健康微信公众号</view>
<image class="code" src="{{imageUrl}}{{params.mpPicture}}" show-menu-by-longpress></image>
<view
class="popup1"
style="background: url('{{imageUrl}}popup1-bg.png?t={{Timestamp}}') no-repeat top center/100% 691rpx"
>
<view class="title">关注适中信息微信公众号</view>
<image class="code" src="{{imageUrl}}{{params.mpPicture}}?t={{Timestamp}}" show-menu-by-longpress></image>
<view class="tip">长按识别二维码关注</view>
<image class="close" src="{{imageUrl}}icon-close.png?t={{Timestamp}}" bind:tap="handleClose"></image>
</view>
</van-popup>
<van-popup show="{{ show }}" wx:if="{{type===2}}" custom-style="background: transparent;" bind:close="handleClose">
<view class="popup1" style="background: url('{{imageUrl}}popup1-bg.png?t={{Timestamp}}') no-repeat top center/100%">
<view class="title">添加我的企业微信</view>
<image class="code" src="{{imageUrl}}{{params.qwPicture}}" show-menu-by-longpress></image>
<view class="title">添加适中信息企业微信</view>
<image class="code" src="{{imageUrl}}{{params.qwPicture}}?t={{Timestamp}}" show-menu-by-longpress></image>
<view class="tip">长按识别二维码添加</view>
<image class="close" src="{{imageUrl}}icon-close.png?t={{Timestamp}}" bind:tap="handleClose"></image>
</view>
</van-popup>

BIN
src/images/copnay-code.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 206 KiB

BIN
src/images/icon-close.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
src/images/icon-play.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
src/images/icon-stop.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
src/images/qyPic.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 125 KiB

After

Width:  |  Height:  |  Size: 206 KiB

BIN
src/images/topic-card-bg.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

After

Width:  |  Height:  |  Size: 117 KiB

35
src/pages/article/index.scss

@ -8,11 +8,27 @@ @@ -8,11 +8,27 @@
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;
@ -43,8 +59,8 @@ @@ -43,8 +59,8 @@
}
.icon {
width: 42rpx;
height: 42rpx;
width: 64rpx;
height: 64rpx;
}
}
@ -69,9 +85,10 @@ @@ -69,9 +85,10 @@
background: #f9fafb;
line-height: 48rpx;
border-radius: 16rpx 16rpx 16rpx 16rpx;
color: #3795f7;
font-size: 36rpx;
.label {
font-size: 32rpx;
color: #3795f7;
}
}
@ -115,6 +132,7 @@ @@ -115,6 +132,7 @@
align-items: center;
justify-content: center;
gap: 12rpx;
font-size: 36rpx;
.icon {
width: 56rpx;
@ -136,6 +154,7 @@ @@ -136,6 +154,7 @@
margin-left: 10rpx;
width: 24rpx;
height: 24rpx;
transform: rotate(180deg);
}
}
}
@ -150,7 +169,6 @@ @@ -150,7 +169,6 @@
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 24rpx;
.label {
font-size: 32rpx;
@ -158,16 +176,14 @@ @@ -158,16 +176,14 @@
}
.item {
padding: 6rpx 24rpx;
border-radius: 40rpx;
font-size: 32rpx;
color: #fff;
background-color: #3795f7;
color: #3795f7;
}
}
.p-scroll {
max-height: 50vh;
padding-bottom: calc(32rpx + env(safe-area-inset-bottom));
font-size: 36rpx;
.row {
padding: 32rpx;
position: relative;
@ -187,5 +203,8 @@ @@ -187,5 +203,8 @@
background: rgba(55, 149, 247, 0.06);
}
}
.place-row{
height: 120rpx;
}
}
}

9
src/pages/article/index.ts

@ -85,6 +85,9 @@ Page({ @@ -85,6 +85,9 @@ Page({
time,
});
}
wx.setNavigationBarTitle({
title: res.book.BookName,
});
this.handleView();
})
.catch((err) => {
@ -250,6 +253,12 @@ Page({ @@ -250,6 +253,12 @@ Page({
url: '/pages/login/index?back=1',
});
},
handleType() {
wx.redirectTo({
url: `/pages/classify/index?id=${this.data.chapter.CateId}`,
});
},
});
export {};

13
src/pages/article/index.wxml

@ -1,7 +1,13 @@ @@ -1,7 +1,13 @@
<page-meta page-style="{{ show ? 'overflow: hidden;' : '' }}" />
<view class="page">
<view class="page-title">{{chapter.ChapterName}}</view>
<view class="page-info">
<view class="page-date">{{book.PublishDate}}</view>
<view class="view-num">
<image class="icon" src="{{imageUrl}}icon-eye.png?t={{Timestamp}}"></image>
{{~~book.OperateNum + ~~book.BrowseNum}}
</view>
</view>
<view class="audio-bar" wx:if="{{chapter.AudioUrl}}">
<view class="a-header">
<view class="wrap">
@ -53,7 +59,7 @@ @@ -53,7 +59,7 @@
<text class="label">下一篇:</text>
{{prevAndNext.next.ChapterName}}
</view>
<view class="type" wx:if="{{chapter.CateName}}">
<view class="type" wx:if="{{chapter.CateName}}" bind:tap="handleType">
<view class="label">分类</view>
<view class="item">{{chapter.CateName}}</view>
</view>
@ -83,8 +89,8 @@ @@ -83,8 +89,8 @@
</view>
</view>
<view class="p-title">{{book.BookName}}</view>
<view class="p-type" wx:if="{{chapter.CateName}}">
<view class="label">分类</view>
<view class="p-type" wx:if="{{chapter.CateName}}" bind:tap="handleType">
<view class="label">分类</view>
<view class="item">{{chapter.CateName}}</view>
</view>
<scroll-view class="p-scroll" scroll-y scroll-into-view="row{{ChapterId}}">
@ -97,6 +103,7 @@ @@ -97,6 +103,7 @@
>
{{index+1}}. {{item.ChapterName}}
</view>
<view class="place-row"></view>
</scroll-view>
</view>
</van-popup>

2
src/pages/classify/index.json

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
{
"navigationStyle": "default",
"navigationBarTitleText": "分类",
"navigationBarTitleText": "",
"usingComponents": {
"van-icon": "@vant/weapp/icon/index",
"van-divider": "@vant/weapp/divider/index"

6
src/pages/classify/index.scss

@ -5,6 +5,10 @@ page { @@ -5,6 +5,10 @@ page {
padding-bottom: 80rpx;
.scroll {
position: sticky;
top: 0;
left: 0;
z-index: 10;
background-color: #fff;
}
.nav {
@ -61,6 +65,7 @@ page { @@ -61,6 +65,7 @@ page {
}
}
.der{
margin-top: 32rpx;
font-size: 28rpx;
color: #999999;
text-align: center;
@ -98,7 +103,6 @@ page { @@ -98,7 +103,6 @@ page {
flex: 1;
font-size: 32rpx;
color: #999999;
line-height: 28rpx;
}
.stat {
margin-top: 42rpx;

2
src/pages/classify/index.ts

@ -155,7 +155,7 @@ Page({ @@ -155,7 +155,7 @@ Page({
data: { BookId: Id },
}).then(() => {
wx.showToast({
title: '收藏成功',
title: '您已收藏这本书,可在我的页查看',
icon: 'none',
});
this.setData({

6
src/pages/classify/index.wxml

@ -34,7 +34,7 @@ @@ -34,7 +34,7 @@
<view class="stat">
<view class="s-item">
<image class="icon" src="{{imageUrl}}icon-eye.png?t={{Timestamp}}"></image>
{{item.BrowseNum || 0}}
{{~~item.OperateNum + ~~item.BrowseNum}}
</view>
<view
class="s-item active"
@ -63,7 +63,7 @@ @@ -63,7 +63,7 @@
<view class="stat">
<view class="s-item">
<image class="icon" src="{{imageUrl}}icon-eye.png?t={{Timestamp}}"></image>
{{item.BrowseNum || 0}}
{{~~item.OperateNum + ~~item.BrowseNum}}
</view>
<view
class="s-item active"
@ -87,7 +87,7 @@ @@ -87,7 +87,7 @@
<image
class="none"
src="{{imageUrl}}none.png?t={{Timestamp}}"
wx:if="{{pagination.count==0 && recommendPagination.count===0}}"
wx:if="{{pagination.count==0 && recommendPagination.count==0}}"
></image>
<van-divider
contentPosition="center"

1
src/pages/collection/index.scss

@ -33,7 +33,6 @@ page { @@ -33,7 +33,6 @@ page {
margin-top: 16rpx;
font-size: 32rpx;
color: #999999;
line-height: 28rpx;
}
.stat {
margin-top: 42rpx;

2
src/pages/collection/index.wxml

@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
<view class="stat">
<view class="s-item">
<image class="icon" src="{{imageUrl}}icon-eye.png?t={{Timestamp}}"></image>
{{item.BrowseNum || 0}}
{{~~item.OperateNum + ~~item.BrowseNum}}
</view>
<view
class="s-item active"

15
src/pages/home/index.ts

@ -9,12 +9,20 @@ Page({ @@ -9,12 +9,20 @@ Page({
feedbackCount: 0,
bannerList: [],
userInfo: {},
},
onLoad() {
app.waitLogin().then(() => {
this.getCateList();
this.getBanner();
this.getRemarkCount();
app.getUserInfo(this, (res) => {
if (res.showQuestion === 1) {
this.setData({
show: true,
});
}
});
});
},
getBanner() {
@ -115,6 +123,13 @@ Page({ @@ -115,6 +123,13 @@ Page({
this.setData({
show: false,
});
wx.ajax({
method: 'POST',
url: '?r=shizhong/account/visit',
data: {
type: 1,
},
});
},
});

11
src/pages/login/index.ts

@ -19,6 +19,9 @@ Page({ @@ -19,6 +19,9 @@ Page({
back: options.back === '1',
});
},
onShow() {
wx.hideShareMenu();
},
getCode() {
if (timer) return;
const mobile = this.data.mobile;
@ -72,9 +75,10 @@ Page({ @@ -72,9 +75,10 @@ Page({
show: true,
});
return;
} else {
} else if (show) {
this.setData({
show: false,
protool: true,
});
}
if (!mobile) {
@ -110,9 +114,10 @@ Page({ @@ -110,9 +114,10 @@ Page({
show: true,
});
return;
} else {
} else if (show) {
this.setData({
show: false,
protool: true,
});
}
const { iv, encryptedData } = e.detail;
@ -142,7 +147,9 @@ Page({ @@ -142,7 +147,9 @@ Page({
wx.navigateTo({ url: `/pages/protocol/index` });
},
handleVisitor() {
if (app.globalData.isLogin !== 1) {
app.globalData.isLogin = 999;
}
wx.reLaunch({
url: '/pages/home/index',
});

2
src/pages/longPicture/index.json

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
{
"navigationStyle": "default",
"navigationBarTitleText": "预览",
"navigationBarTitleText": "详情",
"usingComponents": {}
}

1
src/pages/my/index.scss

@ -25,6 +25,7 @@ page { @@ -25,6 +25,7 @@ page {
line-height: 1;
word-break: break-all;
.icon {
vertical-align: -4rpx;
width: 36rpx;
height: 36rpx;
}

6
src/pages/my/index.ts

@ -8,6 +8,7 @@ Page({ @@ -8,6 +8,7 @@ Page({
userInfo: {} as any,
},
onShow() {
wx.showTabBar({});
app.waitLogin().then(() => {
app.getUserInfo(this);
});
@ -63,17 +64,22 @@ Page({ @@ -63,17 +64,22 @@ Page({
toastShow: true,
toastType: 1,
});
wx.hideTabBar({});
},
handleCompanyOffice() {
this.setData({
toastShow: true,
toastType: 2,
});
wx.hideTabBar({});
},
handleToastClose() {
this.setData({
toastShow: false,
});
setTimeout(() => {
wx.showTabBar({});
}, 1000);
},
handleTopic() {
wx.navigateTo({

2
src/pages/my/index.wxml

@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
<image class="icon" src="{{imageUrl}}my-list-icon1.png?t={{Timestamp}}"></image>
我的收藏
</view>
<view class="nav-item" bind:tap="handleTopic" wx:if="{{userInfo.isAnswer!=1}}">
<view class="nav-item" bind:tap="handleTopic" wx:if="{{userInfo.isAnswer==='0' || userInfo.isAnswer===0}}">
<image class="icon" src="{{imageUrl}}my-list-icon4.png?t={{Timestamp}}"></image>
问卷调查
</view>

1
src/pages/search/index.scss

@ -70,7 +70,6 @@ page { @@ -70,7 +70,6 @@ page {
.type {
font-size: 32rpx;
color: #999999;
line-height: 28rpx;
}
.stat {
flex-shrink: 0;

2
src/pages/search/index.ts

@ -14,7 +14,7 @@ Page({ @@ -14,7 +14,7 @@ Page({
list: [],
},
onLoad() {
app.waitLogin(false, true).then(() => {
app.waitLogin().then(() => {
this.setData({
focus: true,
});

2
src/pages/search/index.wxml

@ -23,7 +23,7 @@ @@ -23,7 +23,7 @@
/>
</view>
<view class="tip" wx:if="{{list.length}}">以下为搜到的内容</view>
<view class="card" wx:for="{{list}}" wx:key="index" bind:tap="handleDetail" data-id="{{item.Id}}">
<view class="card" wx:for="{{list}}" wx:key="index" bind:tap="handleDetail" data-id="{{item.BookId}}">
<image class="photo" mode="aspectFill" src="{{item.CoverUrl}}"></image>
<view class="c-container">
<view class="title">{{item.ChapterName}}</view>

37
src/pages/topic/index.scss

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
page {
background: linear-gradient(180deg, #d2f1fe 0%, rgba(244, 248, 249, 0) 100%) no-repeat top center/100% 442rpx;
background: #f3f4f5 linear-gradient(180deg, #d2f1fe 0%, rgba(244, 248, 249, 0) 100%) no-repeat top center/100% 442rpx;
}
.page {
@ -8,16 +8,38 @@ page { @@ -8,16 +8,38 @@ page {
.swiper {
width: 100%;
height: 1232rpx;
height: 1632rpx;
box-sizing: border-box;
}
.topic {
position: relative;
padding: 86rpx 88rpx;
width: 100%;
height: 1232rpx;
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;
@ -38,7 +60,8 @@ page { @@ -38,7 +60,8 @@ page {
margin-top: 34rpx;
font-size: 36rpx;
color: #222222;
line-height: 1.4;
line-height: 64rpx;
white-space: pre-line;
}
.btn {
@ -59,7 +82,7 @@ page { @@ -59,7 +82,7 @@ page {
.footer {
width: 100%;
padding: 80rpx 0;
padding: 60rpx 0;
box-sizing: border-box;
display: flex;
align-items: center;

2
src/pages/topic/index.ts

@ -2,7 +2,7 @@ const app = getApp<IAppOption>(); @@ -2,7 +2,7 @@ const app = getApp<IAppOption>();
Page({
data: {
nav: 0,
nav: 11,
percentage: 0,
question: [] as { questionId: string; title: string; answer?: '1' | '2' }[],

7
src/pages/topic/index.wxml

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
<view
class="page"
style="background: url('{{imageUrl}}topic-bg.png?t={{Timestamp}}') no-repeat {{menuButtonInfo.bottom+62}}rpx center/100% 1284rpx;"
style="background: url('{{imageUrl}}topic-bg.png?t={{Timestamp}}') no-repeat left {{menuButtonInfo.bottom+102}}rpx /100% 1284rpx;"
>
<van-nav-bar title="" border="{{false}}" custom-style="background:transparent" bind:click-left="handleBack" fixed>
<van-icon name="arrow-left" slot="left" color="#000" size="46rpx" />
@ -12,10 +12,7 @@ @@ -12,10 +12,7 @@
style="margin-top:{{menuButtonInfo.bottom+73}}px;"
>
<swiper-item wx:for="{{question}}" wx:key="index" wx:for-item="questionItem" catch:touchmove="catchTouchMove">
<view
class="topic"
style="background: url('{{imageUrl}}topic-card-bg.png?t={{Timestamp}}') no-repeat top center/100% 1232rpx"
>
<view class="topic">
<view class="order">
{{index + 1}}/
<text class="all">{{question.length}}</text>

Loading…
Cancel
Save