blak-kong 2 years ago
parent 9bbbf5daf6
commit ffb1545314

@ -14,10 +14,12 @@ export default defineAppConfig({
"pages/register/register",
'pages/instrument/instrument',
'pages/privacyPolicy/privacyPolicy',
'pages/userPolicy/userPolicy',
'pages/about/about',
'pages/message/message',
'pages/consultant/consultant',
'pages/integral_list/integral_list',
"pages/recording/recording",
'pages/template/template',
],
"tabBar": {

@ -3,7 +3,6 @@ import dayjs, { Dayjs } from "dayjs";
import React from "react";
import Taro from "@tarojs/taro";
import { View } from "@tarojs/components";
import { BaseEventOrig } from "@tarojs/components/types/common";
import {
AtCalendarDefaultProps,
AtCalendarProps,

@ -187,7 +187,8 @@ class Index extends Component<any, any> {
toNursingRecords = () => {
if (this.isRegister()) {
// todo
this.setState({ isDev: true });
// this.setState({ isDev: true });
go("/pages/recording/recording");
}
};

@ -180,44 +180,7 @@ export default class Message extends Component<any, any> {
let { total, list, dargState } = this.state;
return (
<Block>
<Navbar isBack={true}></Navbar>
{/* <View> */}
{/* <PullToRefresh disable={scrollTop > 0} onRefresh={this.onRefresh}>
<ScrollView
onTouchMove={this.touchmove}
onTouchEnd={this.touchEnd}
onTouchStart={this.touchStart}
onScrollToUpper={this.ScrollToUpper}
onScrollToLower={this.ScrollToLower}
className="dragUpdata"
scrollY={this.state.scrollY}
scrollWithAnimation
>
<View style={{ padding: "0 12px" }}>
{new Array(20).fill(1).map((_, index) => (
<View
style={{
padding: 12,
background: "#fff",
marginBottom: 12,
}}
key={`PullToRefresh${index}`}
>
{index}
</View>
))}
</View>
</ScrollView>
</PullToRefresh>
<View className="upDragBox">
{dargState === 0 ? (
"上拉加载更多"
) : (
<Loading size="24px">...</Loading>
)}
</View>
</View> */}
<Navbar isBack={true} titleSlot="消息中心"></Navbar>
<View style="padding-top: 13rpx">
<ScrollView
@ -279,34 +242,6 @@ export default class Message extends Component<any, any> {
<Text style="color: #666"></Text>
)}
</View>
{/*
<View className="message" style="padding-top: 13rpx">
{list.map((item: any) => {
return (
<View className="infobox1" onClick={this.godetail} key={item.id}>
<View className="info1 flex aitems sb">
<View className="left flex aitems">
<View className="icon">
<Image
src={require("../../img/logos.png")}
mode="aspectFill"
/>
</View>
<View className="tip1"></View>
</View>
<View className="right">{item.createTime}</View>
</View>
<View className="info2">
<View className="content">
<Text>
[]: {item.content ? item.content : ""}
</Text>
</View>
</View>
</View>
);
})}
</View> */}
<View style="height: 100rpx;"></View>

@ -0,0 +1,473 @@
/*.products_list, .main_wrapper_one {
padding-bottom: 160rpx;
}*/
.tabs {
display: flex;
align-items: center;
height: 110rpx;
background: #fff;
font-size: 30rpx;
font-weight: 500;
color: #666;
padding: 0 32rpx;
}
.tab {
margin-right: 72rpx;
}
.tab_active {
position: relative;
font-size: 36rpx;
font-weight: 800;
color: #000;
}
.tabs .tab_active::after {
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: -12rpx;
content: "";
width: 80rpx;
height: 4rpx;
background: linear-gradient(-90deg, #ffe9c7, #eecda1);
border-radius: 2rpx;
}
.main {
width: 100%;
background: #f8f8f8;
min-height: calc(100vh - 244rpx - env(safe-area-inset-bottom));
text-align: center;
}
.main_wrapper_one {
min-height: calc(100vh - 244rpx - env(safe-area-inset-bottom));
/* height:calc(100vh - 156px - env(safe-area-inset-bottom)) */
height: calc(100vh - 156px - calc(env(safe-area-inset-bottom)));
padding-bottom: calc(env(safe-area-inset-bottom));
}
.main_wrapper_two {
min-height: calc(100vh - 110rpx - env(safe-area-inset-bottom));
height: calc(100vh - 32px - env(safe-area-inset-bottom));
}
.m-x-30 {
margin: 0 30rpx;
}
.instrument_list {
padding-bottom: 200rpx;
}
.products_list {
width: 100%;
height: 80rpx;
white-space: nowrap;
background: #f8f8f8;
padding-top: 25rpx;
padding-bottom: 29rpx;
}
.all {
display: inline-block;
width: 120rpx;
height: 70rpx;
background: #eaeaea;
border-radius: 35rpx;
text-align: center;
line-height: 70rpx;
margin-left: 30rpx;
color: #000000;
font-size: 26rpx;
font-weight: 500;
}
.products_item {
position: relative;
display: inline-block;
height: 70rpx;
line-height: 70rpx;
background: #eaeaea;
border-radius: 35rpx;
font-size: 26rpx;
font-weight: 500;
color: #000;
padding-right: 23rpx;
padding-left: 82rpx;
margin-left: 40rpx;
}
.products_item_active {
background: linear-gradient(90deg, #efdcc2, #fff2df);
}
.products_item:last-child {
margin-right: 30rpx;
}
.products_cover {
position: absolute;
z-index: 2;
left: -17rpx;
top: -5rpx;
width: 80rpx;
height: 80rpx;
background: #fff;
border-radius: 50%;
object-fit: cover;
}
.statistic {
position: relative;
display: flex;
align-items: center;
/*height: 200rpx;*/
background: #fff;
border-radius: 30rpx;
}
/*.statistic::after {*/
/* position: absolute;*/
/* left: 50%;*/
/* transform: translateX(-50%);*/
/* content: '';*/
/* width: 1rpx;*/
/* height: 90rpx;*/
/* background: #DDDDDD;*/
/*}*/
.statistic_item {
flex: 1;
}
.border {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 1rpx;
height: 90rpx;
background: #dddddd;
}
.statistic_num {
font-size: 48rpx;
font-weight: 600;
color: #000;
margin-bottom: 26rpx;
}
.statistic_desc {
font-size: 26rpx;
font-weight: 500;
color: #999;
}
.instrument_item {
margin-top: 20rpx;
background: #ffffff;
border-radius: 30rpx;
padding: 46rpx 36rpx;
}
.time {
font-size: 28rpx;
font-weight: bold;
color: #000;
margin-right: 23rpx;
}
.tag {
width: 90rpx;
height: 36rpx;
line-height: 36rpx;
background: #e5f9ee;
border-radius: 18rpx;
font-size: 24rpx;
font-weight: 500;
color: #57bc81;
}
.tag_active {
background: #f8f8f8;
color: #999;
}
.report_btn {
font-size: 26rpx;
font-weight: 500;
color: #666;
align-items: baseline;
}
.arrow_icon {
width: 10rpx;
height: 20rpx;
margin-left: 14rpx;
}
.instrument_middle {
margin-top: 40rpx;
text-align: left;
}
.instrument_cover {
width: 140rpx;
height: 140rpx;
border-radius: 20rpx;
margin-right: 37rpx;
}
.instrument_content {
display: flex;
flex-direction: column;
flex: 1;
}
.instrument_title {
font-size: 28rpx;
font-weight: bold;
color: #000;
padding-top: 3rpx;
}
.instrument_desc_box {
margin-top: 25rpx;
min-height: 73rpx;
}
.instrument_desc {
font-size: 24rpx;
font-weight: 500;
color: #999;
}
.instrument_bottom {
position: relative;
margin-top: 28rpx;
background: #f8f8f8;
border-radius: 20rpx;
padding: 23rpx 0 23rpx;
}
.place_item {
flex: 1;
border-right: 1rpx solid #dddd;
}
.place_item:last-child {
border: none;
}
.place {
font-size: 24rpx;
font-weight: 500;
color: #666;
margin-bottom: 15rpx;
}
.duration {
font-size: 20rpx;
font-weight: 500;
color: #000;
}
.plan_list {
position: relative;
padding-bottom: 40rpx;
}
.plan_reward {
margin-bottom: 10rpx;
}
.plan_progress_bg {
width: 200rpx;
height: 14rpx;
background: #f8f8f8;
margin-right: 30rpx;
border-radius: 20rpx;
overflow: hidden;
}
.plan_progress_bar {
width: 50%;
height: 100%;
background: linear-gradient(90deg, #efdcc2, #fff2df);
}
.plan_middle {
text-align: left;
}
.border-p-t {
border-top: 1rpx solid #f8f8f8;
padding-top: 30rpx;
}
.arrow {
position: absolute;
bottom: 40rpx;
left: 50%;
display: block;
width: 40rpx;
height: 40rpx;
transition: 0.5s;
margin-left: -20rpx;
}
.clock_in_statistics {
background: #fff;
border-radius: 30rpx;
/*margin-top: 30rpx;*/
height: 383rpx;
padding: 46rpx 36rpx;
flex-direction: column;
}
.clock_in_statistics_title {
height: 31rpx;
font-size: 32rpx;
font-weight: bold;
color: #000;
}
.clock_in_statistics_date {
height: 21rpx;
font-size: 26rpx;
font-weight: 500;
color: #666;
}
.chart {
margin-top: 44rpx;
height: 100%;
align-items: flex-end;
}
.column {
width: 13rpx;
height: 186rpx;
background: linear-gradient(0deg, #efdcc2, #fff2df);
border-radius: 7rpx;
}
.buoy {
font-size: 20rpx;
font-weight: 500;
color: #000;
margin-bottom: 16rpx;
}
.month {
font-size: 20rpx;
font-weight: 500;
color: #999;
margin-top: 12rpx;
}
.month_box {
padding-bottom: 200rpx;
}
.month_statistics {
background: #fff;
border-radius: 30rpx;
margin-top: 30rpx;
padding: 46rpx 36rpx;
}
.more_icon {
display: inline-block;
width: 24rpx;
height: 24rpx;
margin-left: 10rpx;
}
.more_text {
font-size: 26rpx;
font-weight: 500;
color: #666;
}
.month_item {
border-top: 1rpx solid #dddddd;
padding: 37rpx 0;
text-align: left;
}
.month_item_cover {
display: inline-block;
width: 200rpx;
height: 200rpx;
border-radius: 20rpx;
}
.month_item_date {
font-size: 28rpx;
font-weight: bold;
color: #000;
}
.month_item_note {
font-size: 24rpx;
font-weight: 500;
color: #999;
margin-top: 31rpx;
}
.month_image_box {
margin: 48rpx 0 50rpx;
justify-content: start;
}
.month_image_box image {
margin-right: 10rpx;
}
.month_image_box image:last-child {
margin-right: 0;
}
.clock_button_wrap {
position: fixed;
bottom: 0;
left: 0;
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 153rpx;
background-color: #fff;
box-shadow: 0rpx -3rpx 7rpx 1rpx rgba(173, 191, 207, 0.21);
}
.clock_button {
width: 690rpx;
height: 90rpx;
line-height: 90rpx;
font-size: 32rpx;
color: #fff;
text-align: center;
font-weight: 500;
background: #000000;
border-radius: 45rpx;
}
.empty {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 100vw;
height: 60vh;
.empty-img {
display: block;
width: 200rpx;
height: 200rpx;
}
.empty-text {
font-size: 36rpx;
color: #666;
margin-top: 20rpx;
}
}

@ -1,9 +1,16 @@
import { Component, PropsWithChildren, useEffect, useState } from "react";
import Taro from "@tarojs/taro";
import classnames from "classnames";
import { Component, PropsWithChildren, useEffect, useState } from "react";
import { Block, View, Text, Image, Input, Button } from "@tarojs/components";
import { Tab, Tabs } from "@antmjs/vantui";
/** 自定义组件 **/
import Navbar from "../../components/navbar/navbar";
import PopupAlert from "../../components/popup/popup-alert";
/** 自定义组件 **/
import "./recording.less";
export default class Recording extends Component<any, any> {
@ -11,6 +18,7 @@ export default class Recording extends Component<any, any> {
super(props);
this.state = {
name: "护理历程",
current: 0,
};
}
@ -25,8 +33,61 @@ export default class Recording extends Component<any, any> {
async initData() {}
onTab = async (event) => {
const { current } = event.currentTarget.dataset;
console.log("current", current);
this.setState({ current });
};
render() {
let { name } = this.state;
return <View>{name}</View>;
let { current } = this.state;
return (
<Block>
<Navbar isBack={true} titleSlot="护理记录"></Navbar>
<View className="tabs">
<View
className={classnames("tab", {
tab_active: current === 0,
})}
data-current={0}
onClick={this.onTab}
>
</View>
<View
className={classnames("tab", {
tab_active: current === 1,
})}
data-current={1}
onClick={this.onTab}
>
</View>
</View>
{current === 0 && (
<View>
<View className="empty">
<Image
className="empty-img"
src={require("../../img/empty.png")}
></Image>
<View className="empty-text"></View>
</View>
</View>
)}
{current === 1 && (
<View>
<View className="empty">
<Image
className="empty-img"
src={require("../../img/empty.png")}
></Image>
<View className="empty-text"></View>
</View>
</View>
)}
</Block>
);
}
}

@ -20,8 +20,7 @@ import {
MpLoginDetail,
MpSplashDetail,
} from "../../utils/Interface";
import { compareVersion, formatRichText } from "../../utils/util";
import { go, loading, msg } from "../../utils/traoAPI";
import { go, msg } from "../../utils/traoAPI";
const app = Taro.getApp();
@ -108,10 +107,6 @@ export default class Register extends Component<any, any> {
complete: (res) => {},
});
};
onPrivacyTap = async () => {
// 打开隐私协议
go("/pages/xieyi1/xieyi1");
};
onClosePrivacyContentPopup = () => {
this.setState({
showPrivacyContent: false,
@ -142,8 +137,12 @@ export default class Register extends Component<any, any> {
if (res.data) {
const mobile = res.data.data;
Taro.setStorageSync("mobile", mobile);
msg("注册成功");
this.changeGetPhoneNumberBtn();
msg("注册成功");
// 注册成功两秒后跳转个人信息完善页
setTimeout(() => {
go("/pages/userInfo/userInfo");
}, 2000);
}
} catch (error) {
this.changeGetPhoneNumberBtn();
@ -199,6 +198,16 @@ export default class Register extends Component<any, any> {
// }
};
onPrivacyTap = () => {
// 跳转用户隐私协议
go("/pages/privacyPolicy/privacyPolicy");
};
onUserTap = () => {
// 跳转用户协议
go("/pages/userPolicy/userPolicy");
};
componentDidMount() {}
componentWillUnmount() {}
@ -233,13 +242,13 @@ export default class Register extends Component<any, any> {
<View className="content">
<View>
<Text onClick={this.onPopup} data-type="agreement">
<Text onClick={this.onUserTap} data-type="agreement">
</Text>
</View>
<View>
<Text onClick={this.onPopup} data-type="policy">
<Text onClick={this.onPrivacyTap} data-type="policy">
</Text>

@ -1,5 +1,7 @@
import { Component, PropsWithChildren, useEffect, useState } from "react";
import Taro from "@tarojs/taro";
import classnames from "classnames";
import { Component, PropsWithChildren, useEffect, useState } from "react";
import { Block, View, Text, Image, Input, Button } from "@tarojs/components";
import "./template.less";
@ -25,6 +27,10 @@ export default class Index extends Component<any, any> {
render() {
let { name } = this.state;
return <View>{name}</View>;
return (
<Block>
<View>{name}</View>
</Block>
);
}
}

@ -48,6 +48,8 @@ class User extends Component<any, any> {
componentWillUnmount() {}
componentDidShow() {
this.setState({ userInfo: this.props.userInfo });
const tabbar = Taro.getTabBar<CustomTabBar>(this.pageCtx);
tabbar?.setSelected(4);
}

@ -176,15 +176,28 @@ class UserInfo extends Component<any, any> {
userInfo.provinceId = res.data.data.provinceId;
userInfo.cityId = res.data.data.cityId;
userInfo.areaId = res.data.data.areaId;
userInfo.nickname = res.data.data.nickname;
userInfo.headimg = res.data.data.headimg;
this.props.userRefresh(userInfo);
this.setState({ userInfo: userInfo });
// if (userInfo.integralText) {
// this.setState({ isShowIntegralText: true });
// }
if (userInfo.integralText) {
this.setState({ isShowIntegralText: true });
} else {
this.goUser();
}
}
};
goUser = () => {
Taro.switchTab({
url: "/pages/user/user",
});
};
getChooseAvatar = (event) => {
console.log("getChooseAvatar", event);
@ -376,7 +389,7 @@ class UserInfo extends Component<any, any> {
textAlgin="center"
confirm={this.closeIntegralText}
/>
<Navbar></Navbar>
<Navbar titleSlot="个人信息完善"></Navbar>
<View style={titleHeight}></View>
<View className="main">
<View className="title"></View>

@ -202,15 +202,25 @@ class UserInfoDetail extends Component<any, any> {
userInfo.provinceId = res.data.data.provinceId;
userInfo.cityId = res.data.data.cityId;
userInfo.areaId = res.data.data.areaId;
userInfo.nickname = res.data.data.nickname;
userInfo.headimg = res.data.data.headimg;
this.props.userRefresh(userInfo);
this.setState({ userInfo: userInfo });
if (userInfo.integralText) {
this.setState({ isShowIntegralText: true });
} else {
this.goUser();
}
}
};
goUser = () => {
Taro.switchTab({
url: "/pages/user/user",
});
};
getChooseAvatar = (event) => {
let { userInfo } = this.state;
userInfo.headimg = event.detail.avatarUrl;
@ -317,6 +327,10 @@ class UserInfoDetail extends Component<any, any> {
closeIntegralText = () => {
this.setState({ isShowIntegralText: false });
setTimeout(() => {
this.goUser();
}, 600);
};
render() {
@ -341,7 +355,7 @@ class UserInfoDetail extends Component<any, any> {
};
return (
<Block>
<Navbar isBack={true}></Navbar>
<Navbar isBack={true} titleSlot="个人信息"></Navbar>
<PopupAlert
isShow={isShowIntegralText}
title="提示"

@ -0,0 +1,3 @@
export default definePageConfig({
navigationBarTitleText: "用户协议",
});

@ -0,0 +1,17 @@
.nodes {
padding: 30rpx;
word-break: break-all;
box-sizing: border-box;
table {
border-collapse: collapse; /* 边框合并 */
}
td {
text-align: center; /* 字体居中 */
border: 1px solid #ccc; /* 边框样式 */
}
}
pre {
white-space: pre-wrap;
word-wrap: break-word;
}

@ -0,0 +1,57 @@
import { Component, PropsWithChildren, useEffect, useState } from "react";
import Taro from "@tarojs/taro";
import { Block, View, RichText } from "@tarojs/components";
import Navbar from "../../components/navbar/navbar";
import "./userPolicy.less";
import { getUserAgreement } from "../../utils/Interface";
export default class UserPolicy extends Component<any, any> {
constructor(props) {
super(props);
this.state = {
name: "用户协议",
nodes: "",
};
}
async onLoad() {
this.initData();
}
componentDidMount() {}
componentWillUnmount() {}
componentDidShow() {}
componentDidHide() {}
initData = async () => {
let res = await getUserAgreement();
if (res.data.code === 200) {
this.setState({ nodes: res.data.data.value });
}
};
render() {
let { nodes } = this.state;
return (
<Block>
<Navbar titleSlot="用户协议" isBack={true} />
<View className="nodes">
<RichText
nodes={
nodes
// "<pre style=' white-space: pre-wrap;word-wrap: break-word;'>" +
// nodes +
// "</pre>"
}
/>
</View>
</Block>
);
}
}

@ -1,4 +1,5 @@
import Taro from "@tarojs/taro";
import dayjs from "dayjs";
import { createSlice } from "@reduxjs/toolkit";
const userInfoReducer = createSlice({
@ -36,7 +37,7 @@ const userInfoReducer = createSlice({
state.mobile = payload.mobile || "";
state.nickname = payload.nickname || "";
state.headimg = payload.headimg || "";
state.birthday = payload.birthday || new Date().getTime();
state.birthday = payload.birthday || dayjs().format("YYYY-MM-DD");
state.province = payload.province || "";
state.provinceId = payload.provinceId || "";
state.city = payload.city || "";

@ -55,6 +55,7 @@ export const msg = (title, mask, icon) => {
title,
mask,
icon: icon || "none",
duration: 2000,
});
};

Loading…
Cancel
Save