Browse Source

产品走查问题修复

master
kola-web 3 months ago
parent
commit
4709563138
  1. 11
      src/components/global-toast/index.scss
  2. 37
      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. 34
      src/pages/login/index.scss
  15. 58
      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

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

@ -27,6 +27,16 @@
} }
.popup3 { .popup3 {
.badge {
position: relative;
z-index: 1;
display: block;
margin: 0 auto;
width: 264rpx;
height: 264rpx;
}
.container {
margin-top: -130rpx;
padding: 136rpx 44rpx 0; padding: 136rpx 44rpx 0;
width: 622rpx; width: 622rpx;
height: 632rpx; height: 632rpx;
@ -63,4 +73,5 @@
color: #3795f7; color: #3795f7;
text-align: center; text-align: center;
} }
}
} }

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

@ -1,48 +1,27 @@
<van-popup <van-popup show="{{ show }}" wx:if="{{type===1}}" custom-style="background: transparent;" bind:close="handleClose">
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="popup1" style="background: url('{{imageUrl}}popup1-bg.png?t={{Timestamp}}') no-repeat top center/100%">
<view class="title">关注适中健康微信公众号</view> <view class="title">关注适中健康微信公众号</view>
<image <image class="code" src="{{imageUrl}}{{params.mpPicture}}" show-menu-by-longpress></image>
class="code"
src="{{imageUrl}}{{params.mpPicture}}"
show-menu-by-longpress
></image>
<view class="tip">长按识别二维码关注</view> <view class="tip">长按识别二维码关注</view>
</view> </view>
</van-popup> </van-popup>
<van-popup <van-popup show="{{ show }}" wx:if="{{type===2}}" custom-style="background: transparent;" bind:close="handleClose">
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="popup1" style="background: url('{{imageUrl}}popup1-bg.png?t={{Timestamp}}') no-repeat top center/100%">
<view class="title">添加我的企业微信</view> <view class="title">添加我的企业微信</view>
<image <image class="code" src="{{imageUrl}}{{params.qwPicture}}" show-menu-by-longpress></image>
class="code"
src="{{imageUrl}}{{params.qwPicture}}"
show-menu-by-longpress
></image>
<view class="tip">长按识别二维码添加</view> <view class="tip">长按识别二维码添加</view>
</view> </view>
</van-popup> </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="popup3">
<image class="badge" src="{{imageUrl}}badge.png?t={{Timestamp}}" show-menu-by-longpress></image>
<view class="container">
<view class="title">该账号未开通阅读权益</view> <view class="title">该账号未开通阅读权益</view>
<view class="tip">此小程序暂时仅供经邀请的企业用户使用,请换个手机号登录以完成身份验证。</view> <view class="tip">此小程序暂时仅供经邀请的企业用户使用,请换个手机号登录以完成身份验证。</view>
<view class="btn1" bind:tap="handleConform">换个手机号登录</view> <view class="btn1" bind:tap="handleConform">换个手机号登录</view>
<view class="btn2" bind:tap="handleClose">取消</view> <view class="btn2" bind:tap="handleClose">取消</view>
</view> </view>
</view>
</van-popup> </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 @@
font-size: 32rpx; font-size: 32rpx;
color: #999999; color: #999999;
.icon { .icon {
margin-left: 10rpx;
width: 24rpx; width: 24rpx;
height: 24rpx; height: 24rpx;
} }

7
src/pages/article/index.wxml

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

12
src/pages/classify/index.scss

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

8
src/pages/collection/index.scss

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

2
src/pages/collection/index.wxml

@ -9,7 +9,7 @@
</van-nav-bar> </van-nav-bar>
<view class="page" style="padding-top:{{menuButtonInfo.bottom}}px;"> <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> <image class="photo" mode="aspectFill" src="{{item.CoverUrl}}"></image>
<view class="c-container"> <view class="c-container">
<view class="title">{{item.BookName}}</view> <view class="title">{{item.BookName}}</view>

4
src/pages/home/index.json

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

56
src/pages/home/index.scss

@ -6,8 +6,8 @@ page {
min-height: 100vh; min-height: 100vh;
.logo { .logo {
margin-left: 32rpx; margin-left: 32rpx;
width: 216rpx; width: 327rpx;
height: 70rpx; max-height: 100rpx;
} }
.page-title { .page-title {
margin: 50rpx 0 0 32rpx; margin: 50rpx 0 0 32rpx;
@ -156,11 +156,11 @@ page {
margin: 28rpx auto 0; margin: 28rpx auto 0;
width: 236rpx; width: 236rpx;
height: 70rpx; height: 70rpx;
font-size: 28rpx; font-size: 32rpx;
color: #fff; color: #fff;
text-align: center; text-align: center;
line-height: 70rpx; 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; border-radius: 112rpx 112rpx 112rpx 112rpx;
} }
.not-submit { .not-submit {
@ -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>();
Page({ Page({
data: { data: {
show: false,
cateList: [] as any, cateList: [] as any,
remark: '', remark: '',
@ -103,6 +105,17 @@ Page({
title: '今日留言次数已达上限,欢迎明天再来留言吧', title: '今日留言次数已达上限,欢迎明天再来留言吧',
}); });
}, },
handleTopic() {
wx.navigateTo({
url: '/pages/topic/index?back=1',
});
this.handleCancelTopic();
},
handleCancelTopic() {
this.setData({
show: false,
});
},
}); });
export {}; export {};

13
src/pages/home/index.wxml

@ -2,7 +2,7 @@
class="page" class="page"
style="background: url('{{imageUrl}}home-bg.png?t={{Timestamp}}') no-repeat top center/100% 580rpx;padding-top:{{menuButtonInfo.top}}px;" 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> <image class="page-title" src="{{imageUrl}}home-title.png?t={{Timestamp}}"></image>
<view class="page-slogan">人人都是家庭健康师,让生活更有质量</view> <view class="page-slogan">人人都是家庭健康师,让生活更有质量</view>
<view class="search" bind:tap="handleSearch"> <view class="search" bind:tap="handleSearch">
@ -53,3 +53,14 @@
<view wx:else class="submit not-submit" bind:tap="handleNotRemark">提交</view> <view wx:else class="submit not-submit" bind:tap="handleNotRemark">提交</view>
</view> </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>

34
src/pages/login/index.scss

@ -116,46 +116,38 @@
padding: 33rpx 0 0; padding: 33rpx 0 0;
.popup-container { .popup-container {
padding: 280rpx 48rpx 0; padding: 64rpx 44rpx 10rpx;
width: 622rpx; width: 622rpx;
height: 490rpx;
box-sizing: border-box; box-sizing: border-box;
background: linear-gradient(180deg, #e7f8ff 0%, #ffffff 100%); background: linear-gradient(180deg, #e7f8ff 0%, #ffffff 100%);
border-radius: 32rpx; border-radius: 32rpx;
position: relative; position: relative;
.badge { .content {
position: absolute; font-size: 36rpx;
left: 0; color: #65686c;
top: -33px; text-align: center;
width: 246rpx; .link {
height: 286rpx; color: #3795f7;
} }
.title {
position: absolute;
top: 50rpx;
right: 28rpx;
width: 338rpx;
height: 164rpx;
} }
.conform { .conform {
margin-top: 48rpx;
height: 88rpx; height: 88rpx;
text-align: center; text-align: center;
background: #3795f7; background: #3795f7;
line-height: 88rpx; line-height: 86rpx;
font-size: 36rpx; font-size: 36rpx;
color: #FFFFFF; color: #ffffff;
border-radius: 96rpx 96rpx 96rpx 96rpx; border-radius: 96rpx 96rpx 96rpx 96rpx;
} }
.cancel{ .cancel {
margin-top: 10rpx; padding: 32rpx 0;
font-size: 32rpx; font-size: 32rpx;
color: #999999; color: #3795F7;
text-align: center; text-align: center;
line-height: 88rpx;
} }
} }
} }

58
src/pages/login/index.ts

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

22
src/pages/login/index.wxml

@ -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-icon name="arrow-left" slot="left" color="#000" size="46rpx" />
</van-nav-bar> </van-nav-bar>
<view <view
@ -50,10 +57,15 @@
<van-popup show="{{ show }}" bind:close="onClose" round style="--popup-background-color: transparent"> <van-popup show="{{ show }}" bind:close="onClose" round style="--popup-background-color: transparent">
<view class="popup"> <view class="popup">
<view class="popup-container"> <view class="popup-container">
<image class="badge" src="{{imageUrl}}login-popup-badge.png?t={{Timestamp}}"></image> <div class="content">
<image class="title" src="{{imageUrl}}login-popup-title.png?t={{Timestamp}}"></image> 已阅读并同意
<view class="conform" bind:tap="handleTopic">开始</view> <text class="link" bind:tap="handleNavProtool">《用户隐私协议》</text>
<view class="cancel" bind:tap="handleCancelTopic">跳过</view> </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>
</view> </view>
</van-popup> </van-popup>

3
src/pages/my/index.scss

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

10
src/pages/search/index.scss

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

3
src/pages/topic/index.ts

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

2
src/pages/topic/index.wxml

@ -11,7 +11,7 @@
bindtransition="bindtransition" bindtransition="bindtransition"
style="margin-top:{{menuButtonInfo.bottom+73}}px;" 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 <view
class="topic" class="topic"
style="background: url('{{imageUrl}}topic-card-bg.png?t={{Timestamp}}') no-repeat top center/100% 1232rpx" style="background: url('{{imageUrl}}topic-card-bg.png?t={{Timestamp}}') no-repeat top center/100% 1232rpx"

Loading…
Cancel
Save