Browse Source

优化& 增加注销页面

main
kola-web 3 months ago
parent
commit
daf6eb60ec
  1. 9
      .neoconf.json
  2. 7
      project.private.config.json
  3. 3
      src/app.json
  4. 34
      src/custom-tab-bar/index.scss
  5. 2
      src/custom-tab-bar/index.wxml
  6. BIN
      src/images/icon-close-white.png
  7. BIN
      src/images/invite-title.png
  8. BIN
      src/images/login-out-badge.png
  9. 4
      src/module1/pages/invite/index.scss
  10. 3
      src/module1/pages/loginOut/index.json
  11. 69
      src/module1/pages/loginOut/index.scss
  12. 29
      src/module1/pages/loginOut/index.ts
  13. 18
      src/module1/pages/loginOut/index.wxml
  14. 19
      src/module1/pages/userInfo/index.ts
  15. 2
      src/module1/pages/userInfo/index.wxml

9
.neoconf.json

@ -1,3 +1,10 @@ @@ -1,3 +1,10 @@
{
"usingComponents": {}
"emmet_language_server": {
"init_options": {
"preferences": {
"css.intUnit": "rpx",
"css.floatUnitr": "rpx"
}
}
}
}

7
project.private.config.json

@ -9,6 +9,13 @@ @@ -9,6 +9,13 @@
"miniprogram": {
"list": [
{
"name": "注销",
"pathName": "module1/pages/loginOut/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "module1/pages/doctorHome/index",
"pathName": "module1/pages/doctorHome/index",
"query": "id=100",

3
src/app.json

@ -34,7 +34,8 @@ @@ -34,7 +34,8 @@
"pages/chatRoom/index",
"pages/chatRoomInfo/index",
"pages/setChatDoctor/index",
"pages/doctorHome/index"
"pages/doctorHome/index",
"pages/loginOut/index"
]
}
],

34
src/custom-tab-bar/index.scss

@ -16,23 +16,30 @@ @@ -16,23 +16,30 @@
height: 94rpx;
}
.popup-tip {
padding: 22rpx 24rpx;
padding: 20rpx 34rpx 28rpx;
position: absolute;
top: -60rpx;
left: 50%;
transform: translate(-50%, -100%);
border-radius: 16rpx;
background-color: #fff;
background: linear-gradient(90deg, #00b4c5 0%, #54e2b4 100%);
box-shadow: 0 4rpx 11rpx rgba(0, 0, 0, 0.08);
.close {
position: absolute;
top: -10rpx;
right: -10rpx;
width: 40rpx;
height: 40rpx;
}
.content {
text-align: center;
font-size: 32rpx;
color: #141515;
color: #fff;
white-space: nowrap;
line-height: 48rpx;
.plus {
color: #01b4c5;
font-size: 52rpx;
color: #fff;
font-size: 48rpx;
font-weight: bold;
}
}
@ -43,23 +50,14 @@ @@ -43,23 +50,14 @@
justify-content: center;
gap: 24rpx;
white-space: nowrap;
.cancel {
padding: 16rpx 58rpx;
font-size: 32rpx;
color: #01b4c5;
line-height: 32rpx;
border: 1px solid #01b4c5;
border-radius: 120rpx;
}
.ok {
padding: 18rpx 58rpx;
padding: 16rpx 42rpx;
font-size: 24rpx;
color: rgba(20, 21, 21, 1);
color: #00b4c5;
font-size: 32rpx;
color: #fff;
line-height: 32rpx;
border-radius: 120rpx;
background: linear-gradient(90deg, #00b4c5 0%, #54e2b4 100%);
background: #fff;
}
}
&::after {
@ -72,7 +70,7 @@ @@ -72,7 +70,7 @@
height: 0;
border-style: solid;
border-width: 12rpx 12rpx 0 12rpx;
border-color: #fff transparent transparent transparent;
border-color: #56cabb transparent transparent transparent;
}
}
}

2
src/custom-tab-bar/index.wxml

@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
<view class="custom" wx:if="{{item.custom && userInfo.DoctorLevel<3}}" bind:tap="handleTab" data-index="{{index}}">
<image class="add" src="{{imageUrl}}tabbar/add.png?t={{Timestamp}}"></image>
<view class="popup-tip" wx:if="{{showEntryCase}}">
<image class="close" catch:tap="handleClsoeCaseTip" src="{{imageUrl}}icon-close-white.png?t={{Timestamp}}"></image>
<view class="content">
点击
<text class="plus">+</text>
@ -11,7 +12,6 @@ @@ -11,7 +12,6 @@
邀约合作医生一起讨论哦
</view>
<view class="pt-footer">
<view class="cancel" catch:tap="handleClsoeCaseTip">跳过</view>
<view class="ok">去录入</view>
</view>
</view>

BIN
src/images/icon-close-white.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
src/images/invite-title.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 41 KiB

BIN
src/images/login-out-badge.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

4
src/module1/pages/invite/index.scss

@ -8,8 +8,8 @@ @@ -8,8 +8,8 @@
.title {
display: block;
margin: 40rpx auto 0;
width: 592rpx;
height: 250rpx;
width: 486rpx;
height: 262rpx;
}
.container-wrap {
margin: 100rpx 30rpx 0;

3
src/module1/pages/loginOut/index.json

@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
{
"usingComponents": {}
}

69
src/module1/pages/loginOut/index.scss

@ -0,0 +1,69 @@ @@ -0,0 +1,69 @@
.page {
.container {
padding: 0 86rpx 0;
height: 100vh;
box-sizing: border-box;
.badge {
margin: 160px auto 0;
display: block;
width: 167rpx;
height: 167rpx;
}
.title {
margin-top: 26rpx;
font-size: 40rpx;
color: #141515;
font-weight: bold;
line-height: 64rpx;
text-align: center;
}
.content {
margin-top: 54rpx;
font-size: 32rpx;
color: #999999;
line-height: 56rpx;
}
.footer {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
box-sizing: border-box;
padding: 32rpx 32rpx calc(env(safe-area-inset-bottom) + 32rpx);
flex-shrink: 0;
display: flex;
gap: 24rpx;
.cancel {
flex: 1;
height: 84rpx;
text-align: center;
line-height: 84rpx;
font-size: 32rpx;
color: rgba(1, 180, 197, 1);
border-radius: 96rpx 96rpx 96rpx 96rpx;
border: 1px solid #01b4c5;
}
.sure {
flex: 1;
height: 88rpx;
text-align: center;
line-height: 88rpx;
font-size: 32rpx;
color: #fff;
background: linear-gradient(90deg, #00b4c5 0%, #54e2b4 100%);
border-radius: 96rpx 96rpx 96rpx 96rpx;
}
.wait {
flex: 1;
height: 88rpx;
text-align: center;
line-height: 88rpx;
font-size: 32rpx;
color: #fff;
opacity: 0.3;
background: linear-gradient(90deg, #00b4c5 0%, #54e2b4 100%);
border-radius: 96rpx 96rpx 96rpx 96rpx;
}
}
}
}

29
src/module1/pages/loginOut/index.ts

@ -0,0 +1,29 @@ @@ -0,0 +1,29 @@
const _app = getApp<IAppOption>();
Page({
data: {},
onLoad() {},
handleCancel() {
wx.navigateBack();
},
handleLoginOut() {
wx.showModal({
confirmColor: "#00B4C5",
cancelColor: "#141515",
title: "确认注销该账号?",
success(res) {
if (res.confirm) {
app.globalData.isLogin = 0;
wx.ajax({
method: "POST",
url: "?r=takeda/account/delete-account",
}).then(() => {
wx.reLaunch({
url: "/module1/pages/login/index",
});
});
}
},
});
},
});

18
src/module1/pages/loginOut/index.wxml

@ -0,0 +1,18 @@ @@ -0,0 +1,18 @@
<view
class="page"
style="background: url({{imageUrl}}login-protool-bg.png?r={{Timestamp}}) no-repeat top center/100% 316rpx;"
>
<view class="container" style="padding-top:{{menuButtonInfo.bottom}}px;">
<image class="badge" src="{{imageUrl}}login-out-badge.png?t={{Timestamp}}"></image>
<view class="title">
注销后数据不可恢复
<view></view>
请谨慎操作
</view>
<view class="content">注销账号后,系统会删除当前用户的全部信息和数据</view>
<view class="footer">
<view class="cancel" bind:tap="handleCancel">取消</view>
<view class="sure" bind:tap="handleLoginOut">确认注销</view>
</view>
</view>
</view>

19
src/module1/pages/userInfo/index.ts

@ -180,23 +180,8 @@ Page({ @@ -180,23 +180,8 @@ Page({
});
},
handleLogout() {
wx.showModal({
confirmColor: "#00B4C5",
cancelColor: "#141515",
title: "确认注销该账号?",
success(res) {
if (res.confirm) {
app.globalData.isLogin = 0;
wx.ajax({
method: "POST",
url: "?r=takeda/account/delete-account",
}).then(() => {
wx.reLaunch({
url: "/module1/pages/login/index",
});
});
}
},
wx.navigateTo({
url: "/module1/pages/loginOut/index",
});
},
});

2
src/module1/pages/userInfo/index.wxml

@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
</view>
</view>
</view>
<view class="row" wx:if="{{userInfo.DoctorLevel>1}}">
<view class="row" wx:if="{{userInfo.DoctorLevel>1}}">
<view class="label">专长</view>
<view class="content" bind:tap="handleShowDept">
<view class="all">{{SpecialtyName || '无'}}</view>

Loading…
Cancel
Save