Browse Source

产品走查问题修复

master
kola-web 3 months ago
parent
commit
4709563138
  1. 79
      src/components/global-toast/index.scss
  2. 45
      src/components/global-toast/index.wxml
  3. BIN
      src/images/badge.png
  4. BIN
      src/images/home-logo.png
  5. 1
      src/pages/article/index.scss
  6. 7
      src/pages/article/index.wxml
  7. 12
      src/pages/classify/index.scss
  8. 8
      src/pages/collection/index.scss
  9. 2
      src/pages/collection/index.wxml
  10. 4
      src/pages/home/index.json
  11. 56
      src/pages/home/index.scss
  12. 13
      src/pages/home/index.ts
  13. 13
      src/pages/home/index.wxml
  14. 36
      src/pages/login/index.scss
  15. 60
      src/pages/login/index.ts
  16. 22
      src/pages/login/index.wxml
  17. 3
      src/pages/my/index.scss
  18. 10
      src/pages/search/index.scss
  19. 3
      src/pages/topic/index.ts
  20. 2
      src/pages/topic/index.wxml

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

@ -27,40 +27,51 @@ @@ -27,40 +27,51 @@
}
.popup3 {
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;
.badge {
position: relative;
z-index: 1;
display: block;
margin: 0 auto;
width: 264rpx;
height: 264rpx;
}
.btn2 {
margin-top: 16rpx;
padding: 16rpx 32rpx;
font-size: 32rpx;
color: #3795f7;
text-align: center;
.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;
}
}
}

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

@ -1,48 +1,27 @@ @@ -1,48 +1,27 @@
<van-popup
show="{{ show }}"
wx:if="{{type===1}}"
custom-style="background: transparent;"
bind:close="handleClose"
>
<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>
<image class="code" src="{{imageUrl}}{{params.mpPicture}}" show-menu-by-longpress></image>
<view class="tip">长按识别二维码关注</view>
</view>
</van-popup>
<van-popup
show="{{ show }}"
wx:if="{{type===2}}"
custom-style="background: transparent;"
bind:close="handleClose"
>
<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>
<image class="code" src="{{imageUrl}}{{params.qwPicture}}" show-menu-by-longpress></image>
<view class="tip">长按识别二维码添加</view>
</view>
</van-popup>
<van-popup
show="{{ show }}"
wx:if="{{type===3}}"
custom-style="background: transparent;"
bind:close="handleClose"
>
<van-popup show="{{ show }}" wx:if="{{type===3}}" custom-style="background: transparent;" bind:close="handleClose">
<view class="popup3">
<view class="title">该账号未开通阅读权益</view>
<view class="tip">此小程序暂时仅供经邀请的企业用户使用,请换个手机号登录以完成身份验证。</view>
<view class="btn1" bind:tap="handleConform">换个手机号登录</view>
<view class="btn2" bind:tap="handleClose">取消</view>
<image class="badge" src="{{imageUrl}}badge.png?t={{Timestamp}}" show-menu-by-longpress></image>
<view class="container">
<view class="title">该账号未开通阅读权益</view>
<view class="tip">此小程序暂时仅供经邀请的企业用户使用,请换个手机号登录以完成身份验证。</view>
<view class="btn1" bind:tap="handleConform">换个手机号登录</view>
<view class="btn2" bind:tap="handleClose">取消</view>
</view>
</view>
</van-popup>

BIN
src/images/badge.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

BIN
src/images/home-logo.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 14 KiB

1
src/pages/article/index.scss

@ -133,6 +133,7 @@ @@ -133,6 +133,7 @@
font-size: 32rpx;
color: #999999;
.icon {
margin-left: 10rpx;
width: 24rpx;
height: 24rpx;
}

7
src/pages/article/index.wxml

@ -1,3 +1,4 @@ @@ -1,3 +1,4 @@
<page-meta page-style="{{ show ? 'overflow: hidden;' : '' }}" />
<view class="page">
<view class="page-title">{{chapter.ChapterName}}</view>
<view class="page-date">{{book.PublishDate}}</view>
@ -86,9 +87,9 @@ @@ -86,9 +87,9 @@
<view class="label">分类</view>
<view class="item">{{chapter.CateName}}</view>
</view>
<view class="p-scroll">
<scroll-view class="p-scroll" scroll-y scroll-into-view="row{{ChapterId}}">
<view
class="row {{ChapterId === item.Id && 'current'}}"
class="row {{ChapterId === item.Id && 'current'}} row{{ item.Id }}"
wx:for="{{chapterList}}"
wx:key="Id"
bind:tap="handleSwitchDirectory"
@ -96,7 +97,7 @@ @@ -96,7 +97,7 @@
>
{{index+1}}.{{item.ChapterName}}
</view>
</view>
</scroll-view>
</view>
</van-popup>

12
src/pages/classify/index.scss

@ -17,7 +17,7 @@ page { @@ -17,7 +17,7 @@ page {
.nav-item {
flex-shrink: 0;
padding: 32rpx 16rpx;
font-size: 32rpx;
font-size: 36rpx;
color: #222222;
line-height: 36rpx;
&.active {
@ -48,7 +48,7 @@ page { @@ -48,7 +48,7 @@ page {
min-width: 160rpx;
padding: 8rpx 10rpx;
box-sizing: border-box;
font-size: 28rpx;
font-size: 32rpx;
color: #65686c;
line-height: 40rpx;
background-color: #fff;
@ -88,7 +88,7 @@ page { @@ -88,7 +88,7 @@ page {
flex-direction: column;
justify-content: space-between;
.title {
font-size: 32rpx;
font-size: 36rpx;
color: #222222;
font-weight: bold;
line-height: 48rpx;
@ -96,7 +96,7 @@ page { @@ -96,7 +96,7 @@ page {
.type {
margin-top: 16rpx;
flex: 1;
font-size: 28rpx;
font-size: 32rpx;
color: #999999;
line-height: 28rpx;
}
@ -113,8 +113,8 @@ page { @@ -113,8 +113,8 @@ page {
font-size: 28rpx;
color: #999999;
.icon {
width: 28rpx;
height: 28rpx;
width: 32rpx;
height: 32rpx;
}
&.active {
color: #3795f7;

8
src/pages/collection/index.scss

@ -23,7 +23,7 @@ page { @@ -23,7 +23,7 @@ page {
flex-direction: column;
justify-content: space-between;
.title {
font-size: 32rpx;
font-size: 36rpx;
color: #222222;
font-weight: bold;
line-height: 48rpx;
@ -31,7 +31,7 @@ page { @@ -31,7 +31,7 @@ page {
.type {
flex: 1;
margin-top: 16rpx;
font-size: 28rpx;
font-size: 32rpx;
color: #999999;
line-height: 28rpx;
}
@ -48,8 +48,8 @@ page { @@ -48,8 +48,8 @@ page {
font-size: 28rpx;
color: #999999;
.icon {
width: 28rpx;
height: 28rpx;
width: 32rpx;
height: 32rpx;
}
&.active {
color: #3795f7;

2
src/pages/collection/index.wxml

@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
</van-nav-bar>
<view class="page" style="padding-top:{{menuButtonInfo.bottom}}px;">
<view class="card" wx:for="{{list}}" wx:key="Id" bind:tap="handleDetail" data-id="{{item.Id}}">
<view class="card" wx:for="{{list}}" wx:key="Id" bind:tap="handleDetail" data-id="{{item.BookId}}">
<image class="photo" mode="aspectFill" src="{{item.CoverUrl}}"></image>
<view class="c-container">
<view class="title">{{item.BookName}}</view>

4
src/pages/home/index.json

@ -1,3 +1,5 @@ @@ -1,3 +1,5 @@
{
"usingComponents": {}
"usingComponents": {
"van-popup": "@vant/weapp/popup/index"
}
}

56
src/pages/home/index.scss

@ -6,8 +6,8 @@ page { @@ -6,8 +6,8 @@ page {
min-height: 100vh;
.logo {
margin-left: 32rpx;
width: 216rpx;
height: 70rpx;
width: 327rpx;
max-height: 100rpx;
}
.page-title {
margin: 50rpx 0 0 32rpx;
@ -156,11 +156,11 @@ page { @@ -156,11 +156,11 @@ page {
margin: 28rpx auto 0;
width: 236rpx;
height: 70rpx;
font-size: 28rpx;
font-size: 32rpx;
color: #fff;
text-align: center;
line-height: 70rpx;
background: linear-gradient(90deg, #134df6 36%, #3795f7 100%);
background: linear-gradient( 90deg, #2674F6 0%, #3795F7 100%);
border-radius: 112rpx 112rpx 112rpx 112rpx;
}
.not-submit {
@ -168,3 +168,51 @@ page { @@ -168,3 +168,51 @@ page {
}
}
}
.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;
}
}
}

13
src/pages/home/index.ts

@ -2,6 +2,8 @@ const app = getApp<IAppOption>(); @@ -2,6 +2,8 @@ const app = getApp<IAppOption>();
Page({
data: {
show: false,
cateList: [] as any,
remark: '',
@ -103,6 +105,17 @@ Page({ @@ -103,6 +105,17 @@ Page({
title: '今日留言次数已达上限,欢迎明天再来留言吧',
});
},
handleTopic() {
wx.navigateTo({
url: '/pages/topic/index?back=1',
});
this.handleCancelTopic();
},
handleCancelTopic() {
this.setData({
show: false,
});
},
});
export {};

13
src/pages/home/index.wxml

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
class="page"
style="background: url('{{imageUrl}}home-bg.png?t={{Timestamp}}') no-repeat top center/100% 580rpx;padding-top:{{menuButtonInfo.top}}px;"
>
<image class="logo" src="{{imageUrl}}home-logo.png?t={{Timestamp}}"></image>
<image class="logo" mode="widthFix" src="{{imageUrl}}home-logo.png?t={{Timestamp}}"></image>
<image class="page-title" src="{{imageUrl}}home-title.png?t={{Timestamp}}"></image>
<view class="page-slogan">人人都是家庭健康师,让生活更有质量</view>
<view class="search" bind:tap="handleSearch">
@ -53,3 +53,14 @@ @@ -53,3 +53,14 @@
<view wx:else class="submit not-submit" bind:tap="handleNotRemark">提交</view>
</view>
</view>
<van-popup show="{{ show }}" bind:close="onClose" round style="--popup-background-color: transparent">
<view class="popup">
<view class="popup-container">
<image class="badge" src="{{imageUrl}}login-popup-badge.png?t={{Timestamp}}"></image>
<image class="title" src="{{imageUrl}}login-popup-title.png?t={{Timestamp}}"></image>
<view class="conform" bind:tap="handleTopic">开始</view>
<view class="cancel" bind:tap="handleCancelTopic">关闭</view>
</view>
</view>
</van-popup>

36
src/pages/login/index.scss

@ -116,46 +116,38 @@ @@ -116,46 +116,38 @@
padding: 33rpx 0 0;
.popup-container {
padding: 280rpx 48rpx 0;
padding: 64rpx 44rpx 10rpx;
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;
.content {
font-size: 36rpx;
color: #65686c;
text-align: center;
.link {
color: #3795f7;
}
}
.conform {
margin-top: 48rpx;
height: 88rpx;
text-align: center;
background: #3795f7;
line-height: 88rpx;
line-height: 86rpx;
font-size: 36rpx;
color: #FFFFFF;
color: #ffffff;
border-radius: 96rpx 96rpx 96rpx 96rpx;
}
.cancel{
margin-top: 10rpx;
.cancel {
padding: 32rpx 0;
font-size: 32rpx;
color: #999999;
color: #3795F7;
text-align: center;
line-height: 88rpx;
}
}
}

60
src/pages/login/index.ts

@ -3,8 +3,6 @@ let timer: number | null = 0; @@ -3,8 +3,6 @@ let timer: number | null = 0;
Page({
data: {
show: false,
menuButtonInfo: {},
mobile: '',
code: '',
@ -12,6 +10,9 @@ Page({ @@ -12,6 +10,9 @@ Page({
codeText: '发送验证码',
back: false,
type: '',
show: false,
},
onLoad(options) {
this.setData({
@ -64,13 +65,17 @@ Page({ @@ -64,13 +65,17 @@ Page({
});
},
handleSubmit() {
const { mobile, code, protool } = this.data;
if (!protool) {
wx.showToast({
icon: 'none',
title: '请先同意用户隐私协议',
const { show, mobile, code, protool } = this.data;
if (!protool && !show) {
this.setData({
type: 'login',
show: true,
});
return;
} else {
this.setData({
show: false,
});
}
if (!mobile) {
wx.showToast({
@ -98,13 +103,17 @@ Page({ @@ -98,13 +103,17 @@ Page({
});
},
handleWxSubmit(e: any) {
const { protool } = this.data;
if (!protool) {
wx.showToast({
icon: 'none',
title: '请先同意用户隐私协议',
const { show, protool } = this.data;
if (!protool && !show) {
this.setData({
type: 'phone',
show: true,
});
return;
} else {
this.setData({
show: false,
});
}
const { iv, encryptedData } = e.detail;
if (iv && encryptedData) {
@ -122,16 +131,7 @@ Page({ @@ -122,16 +131,7 @@ Page({
},
submitCallback() {
app.globalData.isLogin = 1;
app.getUserInfo(null, (res) => {
app.globalData.isAnswer = res.isAnswer;
if (res.isAnswer === '0') {
this.setData({
show: true,
});
} else {
wx.reLaunch({ url: '/pages/home/index' });
}
});
wx.reLaunch({ url: '/pages/home/index' });
},
handleProtool() {
this.setData({
@ -141,23 +141,17 @@ Page({ @@ -141,23 +141,17 @@ Page({
handleNavProtool() {
wx.navigateTo({ url: `/pages/protocol/index` });
},
handleTopic() {
wx.reLaunch({
url: '/pages/topic/index',
});
},
handleCancelTopic() {
app.globalData.isAnswer = '1';
wx.reLaunch({
url: '/pages/home/index',
});
},
handleVisitor() {
app.globalData.isLogin = 999;
wx.reLaunch({
url: '/pages/home/index',
});
},
handleCancel() {
this.setData({
show: false,
});
},
handleBack() {
wx.navigateBack();
},

22
src/pages/login/index.wxml

@ -1,4 +1,11 @@ @@ -1,4 +1,11 @@
<van-nav-bar wx:if="{{back}}" title="" border="{{false}}" custom-style="background:transparent" bind:click-left="handleBack" fixed>
<van-nav-bar
wx:if="{{back}}"
title=""
border="{{false}}"
custom-style="background:transparent"
bind:click-left="handleBack"
fixed
>
<van-icon name="arrow-left" slot="left" color="#000" size="46rpx" />
</van-nav-bar>
<view
@ -50,10 +57,15 @@ @@ -50,10 +57,15 @@
<van-popup show="{{ show }}" bind:close="onClose" round style="--popup-background-color: transparent">
<view class="popup">
<view class="popup-container">
<image class="badge" src="{{imageUrl}}login-popup-badge.png?t={{Timestamp}}"></image>
<image class="title" src="{{imageUrl}}login-popup-title.png?t={{Timestamp}}"></image>
<view class="conform" bind:tap="handleTopic">开始</view>
<view class="cancel" bind:tap="handleCancelTopic">跳过</view>
<div class="content">
已阅读并同意
<text class="link" bind:tap="handleNavProtool">《用户隐私协议》</text>
</div>
<button wx:if="{{type==='phone'}}" class="conform" open-type="getPhoneNumber" bindgetphonenumber="handleWxSubmit">
同意并继续
</button>
<button wx:else class="conform" bind:tap="handleSubmit">同意并继续</button>
<view class="cancel" bind:tap="handleCancel">取消</view>
</view>
</view>
</van-popup>

3
src/pages/my/index.scss

@ -16,6 +16,7 @@ page { @@ -16,6 +16,7 @@ page {
}
}
.user {
padding-top: 10rpx;
flex: 1;
.name {
font-size: 40rpx;
@ -42,6 +43,8 @@ page { @@ -42,6 +43,8 @@ page {
}
}
.switch {
display: flex;
align-items: center;
font-size: 28rpx;
color: #999999;
}

10
src/pages/search/index.scss

@ -51,7 +51,7 @@ page { @@ -51,7 +51,7 @@ page {
flex-direction: column;
justify-content: space-between;
.title {
font-size: 32rpx;
font-size: 36rpx;
color: #222222;
font-weight: bold;
line-height: 48rpx;
@ -59,7 +59,7 @@ page { @@ -59,7 +59,7 @@ page {
.book-name {
flex: 1;
padding-top: 20rpx;
font-size: 28rpx;
font-size: 32rpx;
color: #999999;
}
.c-footer {
@ -68,7 +68,7 @@ page { @@ -68,7 +68,7 @@ page {
justify-content: space-between;
gap: 20rpx;
.type {
font-size: 28rpx;
font-size: 32rpx;
color: #999999;
line-height: 28rpx;
}
@ -81,8 +81,8 @@ page { @@ -81,8 +81,8 @@ page {
font-size: 28rpx;
color: #999999;
.icon {
width: 28rpx;
height: 28rpx;
width: 32rpx;
height: 32rpx;
}
}
}

3
src/pages/topic/index.ts

@ -75,6 +75,9 @@ Page({ @@ -75,6 +75,9 @@ Page({
nav: this.data.nav,
});
},
catchTouchMove() {
return false;
},
handleBack() {
wx.showModal({
title: '确认退出?',

2
src/pages/topic/index.wxml

@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
bindtransition="bindtransition"
style="margin-top:{{menuButtonInfo.bottom+73}}px;"
>
<swiper-item wx:for="{{question}}" wx:key="index" wx:for-item="questionItem">
<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"

Loading…
Cancel
Save