一期还原设计稿,像素级

master
blak-kong 2 years ago
parent 2e1eeade29
commit bf179ffb7c

@ -140,7 +140,46 @@ page {
} }
page { page {
fontfamily: -appleSystem, BlinkMacSystemFont, "Helvetica Neue", Helvetica, fontfamily: "PingFang SC", -appleSystem, BlinkMacSystemFont, "Helvetica Neue",
Segoe UI, Arial, Roboto, "PingFang SC", "miui", "Hiragino Sans GB", Helvetica, Segoe UI, Arial, Roboto, "miui", "Hiragino Sans GB",
"Microsoft Yahei", sansSerif; "Microsoft Yahei", sansSerif;
} }
// 标题字体
.titleSize1 {
font-size: 36rpx;
font-weight: bold;
color: #000;
}
.titleSize2 {
font-size: 32rpx;
font-weight: bold;
color: #000;
}
.titleSize3 {
font-size: 30rpx;
font-weight: bold;
color: #000;
}
.titleSize4 {
font-size: 28rpx;
font-weight: bold;
color: #000;
}
.titleSize5 {
font-size: 26rpx;
font-weight: bold;
color: #000;
}
// 正文字体
.fontSize {
font-size: 28rpx;
font-weight: 400;
color: #000;
}
.fontSize-small {
font-size: 26rpx;
font-weight: 400;
color: #999;
}

@ -1,3 +1,4 @@
import Taro from "@tarojs/taro";
import { Component, PropsWithChildren } from "react"; import { Component, PropsWithChildren } from "react";
import "./app.less"; import "./app.less";
// // html4 // // html4
@ -31,6 +32,10 @@ class App extends Component<PropsWithChildren> {
// go("/pages/userInfo/userInfo"); // 个人信息完善 // go("/pages/userInfo/userInfo"); // 个人信息完善
// go("/pages/register/register"); // go("/pages/register/register");
// go("/pages/instrument/instrument"); // go("/pages/instrument/instrument");
// go("/pages/userInfoDetail/userInfoDetail");
// Taro.reLaunch({
// url: "/pages/user/user",
// });
} }
onError(error) { onError(error) {

@ -2,9 +2,27 @@
.at-calendar { .at-calendar {
// 仅缩放宽度,防止上下抖动 // 仅缩放宽度,防止上下抖动
// transform: scale(0.9, 1); // transform: scale(0.9, 1);
width: 92%; // width: 92%;
padding: 0 36rpx;
margin: 0 auto; margin: 0 auto;
color: #333; color: #333;
.at-calendar__controller {
position: relative;
height: 40rpx;
.calendar-top-date-btn {
position: absolute;
left: -10rpx;
font-size: 36rpx;
font-family: Poppins;
// font-weight: 600;
}
}
.at-calendar__list.flex .flex__item-container {
width: 60rpx;
height: 60rpx;
}
} }
.at-calendar__header .header__flex-item { .at-calendar__header .header__flex-item {
// font-size: 26rpx; // font-size: 26rpx;
@ -15,14 +33,23 @@
font-weight: 500; font-weight: 500;
color: #666666; color: #666666;
} }
.at-calendar__list.flex .flex__item {
// 覆盖组件原本样式
.at-calendar .at-calendar__list.flex .flex__item {
font-size: 24rpx !important; font-size: 24rpx !important;
color: #333; color: #333;
font-weight: 400; font-weight: 400;
margin: 10rpx 0;
}
// 覆盖组件原本样式
.at-calendar .at-calendar__list.flex .flex__item--blur {
color: #ccc;
} }
.at-calendar__list.flex .flex__item--blur { // 覆盖组件原本样式: 当月文字颜色 #333
color: #ccc !important; .at-calendar .at-calendar__list.flex .flex__item--now {
color: #333;
} }
.at-calendar__list.flex .flex__item--today { .at-calendar__list.flex .flex__item--today {
@ -52,22 +79,22 @@
display: block; display: block;
content: ""; content: "";
border-radius: 50%; border-radius: 50%;
border: 6rpx solid transparent; border: 4rpx solid transparent;
background: linear-gradient(0deg, #fff0da, #ffe4c0) border-box; /* 2 */ background: linear-gradient(0deg, #fff0da, #ffe4c0) border-box; /* 2 */
-webkit-mask: linear-gradient(#fff 0 0) padding-box, -webkit-mask: linear-gradient(#fff 0 0) padding-box,
linear-gradient(#fff 0 0); /* 3 */ linear-gradient(#fff 0 0); /* 3 */
-webkit-mask-composite: xor; /* 4 */ -webkit-mask-composite: xor; /* 4 */
mask-composite: exclude; mask-composite: exclude;
position: absolute; position: absolute;
width: 72rpx; width: 60rpx;
height: 72rpx; height: 60rpx;
box-sizing: border-box; box-sizing: border-box;
} }
} }
} }
.at-calendar__list.flex .flex__item--incomplete { .at-calendar__list.flex .flex__item--incomplete {
color: #333 !important; color: #333;
font-weight: 400 !important; font-weight: 400 !important;
.flex__item-container { .flex__item-container {
position: relative; position: relative;
@ -75,15 +102,15 @@
display: block; display: block;
content: ""; content: "";
border-radius: 50%; border-radius: 50%;
border: 6rpx solid transparent; border: 4rpx solid transparent;
background: #f2f2f2; background: #f2f2f2;
-webkit-mask: linear-gradient(#fff 0 0) padding-box, -webkit-mask: linear-gradient(#fff 0 0) padding-box,
linear-gradient(#fff 0 0); /* 3 */ linear-gradient(#fff 0 0); /* 3 */
-webkit-mask-composite: xor; /* 4 */ -webkit-mask-composite: xor; /* 4 */
mask-composite: exclude; mask-composite: exclude;
position: absolute; position: absolute;
width: 72rpx; width: 60rpx;
height: 72rpx; height: 60rpx;
box-sizing: border-box; box-sizing: border-box;
} }
} }
@ -133,11 +160,11 @@
.at-calendar-slider__main--swan { .at-calendar-slider__main--swan {
// 展开高度 // 展开高度
.main__body { .main__body {
height: 410rpx; height: 400rpx;
} }
// 折叠高度 // 折叠高度
.main__body.main__body--isFolding { .main__body.main__body--isFolding {
height: 70px; height: 90px;
} }
} }
/* 样式定制 */ /* 样式定制 */

@ -103,13 +103,14 @@ export default class AtCalendarController extends React.Component<any, any> {
onClick={this.props.onPreMonth.bind(this, isMinMonth)} onClick={this.props.onPreMonth.bind(this, isMinMonth)}
/> />
)} )}
<View className="calendar-top-date-btn">
<View <View
style="display: flex;align-items: center;" style="display: flex;align-items: center;"
onClick={this.openDate} onClick={this.openDate}
> >
{/* <Text className="controller__info"></Text> */} {/* <Text className="controller__info"></Text> */}
{/* <Text>{dayjsDate.format(monthFormat)}</Text> */} {/* <Text>{dayjsDate.format(monthFormat)}</Text> */}
<Text style={{ fontSize: "38rpx", fontWeight: "400" }}> <Text style={{ fontSize: "36rpx", fontWeight: "600" }}>
{dayjsDate.format("YYYY.MM.DD")} {dayjsDate.format("YYYY.MM.DD")}
</Text> </Text>
<View style="margin-left: 34rpx;"> <View style="margin-left: 34rpx;">
@ -119,6 +120,8 @@ export default class AtCalendarController extends React.Component<any, any> {
/> />
</View> </View>
</View> </View>
</View>
<View></View> <View></View>
</View> </View>

@ -25,7 +25,7 @@
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
background: #fff; background: #fff;
padding-bottom: 10rpx; // padding-bottom: 10rpx;
z-index: 99; z-index: 99;
.logo { .logo {
display: inline-flex; display: inline-flex;
@ -33,16 +33,27 @@
justify-content: center; justify-content: center;
width: 220rpx; width: 220rpx;
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC;
font-weight: bold; font-weight: bold;
color: #000000;
} }
.back { .back {
width: 80rpx; width: 100rpx;
text-align: center; text-align: center;
color: #666; color: #666;
font-size: 42rpx; font-size: 42rpx;
display: flex; display: flex;
justify-content: center; justify-content: center;
} }
.back-btn {
width: 40rpx;
height: 40rpx;
padding: 10rpx;
.back-img {
width: 100%;
height: 100%;
}
}
} }
.nav_top_padding { .nav_top_padding {

@ -60,7 +60,7 @@ export default class Navbar extends Component<any, any> {
} }
render() { render() {
let { isBack, leftSlot, titleSlot, transparent } = this.props; let { isBack, leftSlot, titleSlot, transparent, isWhite } = this.props;
let { statusBarHeight, navigationBarHeight, navHeight } = this.state; let { statusBarHeight, navigationBarHeight, navHeight } = this.state;
const statusBarHeightRpx = statusBarHeight * 2; const statusBarHeightRpx = statusBarHeight * 2;
const navigationBarHeightRpx = navigationBarHeight * 2; const navigationBarHeightRpx = navigationBarHeight * 2;
@ -79,18 +79,34 @@ export default class Navbar extends Component<any, any> {
<View className="back"> <View className="back">
{isBack && ( {isBack && (
<View <View
// style="padding: 10rpx" // className="at-icon at-icon-chevron-left"
className="at-icon at-icon-chevron-left" className="back-btn"
onClick={this.back} onClick={this.back}
></View> >
<Image
className="back-img"
src={require("../../img/left.png")}
mode="widthFix"
></Image>
</View>
)} )}
{leftSlot} {leftSlot}
</View> </View>
<View className="logo"> <View className="logo">
{titleSlot ? ( {titleSlot ? (
titleSlot titleSlot
) : isWhite ? (
<Image
style="width: 238rpx;height:29rpx"
src={require("../../img/logo/logo-w.png")}
mode="widthFix"
/>
) : ( ) : (
<Image src="https://oss.flossom.com/logo2.png" mode="widthFix" /> <Image
style="width: 238rpx;height:29rpx"
src={require("../../img/logo/logo-b.png")}
mode="widthFix"
/>
)} )}
</View> </View>
<View className="back"></View> <View className="back"></View>

@ -15,23 +15,27 @@
margin-right: 30rpx; margin-right: 30rpx;
} }
.text { .text {
color: #666; font-family: PingFang SC;
font-size: 28rpx;
color: #999;
} }
} }
.alert-popup-btns { .alert-popup-btns {
display: flex; display: flex;
margin-top: 76rpx; margin-top: 60rpx;
justify-content: center; justify-content: center;
.alert-popup-btn { .alert-popup-btn {
width: 270rpx; width: 270rpx;
height: 90rpx; height: 90rpx;
line-height: 90rpx; line-height: 90rpx;
font-size: 32rpx; font-size: 32rpx;
font-weight: 500;
text-align: center; text-align: center;
border: 1rpx solid #000; border: 1rpx solid #000;
border-radius: 45rpx; border-radius: 45rpx;
color: #fff; color: #fff;
background-color: #000; background-color: #000;
font-family: PingFang SC;
} }
} }

@ -73,12 +73,14 @@ export default class PopupAlert extends Component<any, any> {
isShow, isShow,
isClose, isClose,
isLarge, isLarge,
myClassName,
type, type,
} = this.props; } = this.props;
return ( return (
<Block> <Block>
<PageMeta pageStyle={isShow ? "overflow: hidden;" : ""} /> <PageMeta pageStyle={isShow ? "overflow: hidden;" : ""} />
<Popup <Popup
className={myClassName}
show={isShow} show={isShow}
closeOnClickOverlay={false} closeOnClickOverlay={false}
round round
@ -95,8 +97,20 @@ export default class PopupAlert extends Component<any, any> {
onClick={this.onClose} onClick={this.onClose}
></View> ></View>
)} )}
<View className={classnames("common-box", "large")}> <View
<View className="common-popup-title">{title}</View> className={classnames("common-box", {
"common-large": isLarge,
})}
>
{title && (
<View
className={classnames("common-popup-title", {
"margin-samll": isLarge,
})}
>
{title}
</View>
)}
<View className="common-popup-content-box"> <View className="common-popup-content-box">
<View <View
className={classnames("common-popup-content", { className={classnames("common-popup-content", {

@ -28,7 +28,6 @@ export default class PopupBinding extends Component<any, any> {
super(props); super(props);
this.state = { this.state = {
name: "确认组件", name: "确认组件",
// isShowconfirmPopup: true,
}; };
} }
@ -74,10 +73,9 @@ export default class PopupBinding extends Component<any, any> {
confirmButtonText, confirmButtonText,
isShow, isShow,
isClose, isClose,
// isLarge, isLarge,
type = 0, type = 0,
} = this.props; } = this.props;
console.log("type", type);
return ( return (
<Block> <Block>
<PageMeta pageStyle={isShow ? "overflow: hidden;" : ""} /> <PageMeta pageStyle={isShow ? "overflow: hidden;" : ""} />

@ -91,8 +91,20 @@ export default class PopupConfirm extends Component<any, any> {
></View> ></View>
)} )}
<View className={classnames("common-box", "large")}> <View
<View className="common-popup-title">{title}</View> className={classnames("common-box", {
"common-large": isLarge,
})}
>
{title && (
<View
className={classnames("common-popup-title", {
"margin-samll": isLarge,
})}
>
{title}
</View>
)}
<View className="common-popup-content-box"> <View className="common-popup-content-box">
<View <View
className={classnames("common-popup-content", { className={classnames("common-popup-content", {

@ -1,8 +1,8 @@
.common-box { .common-box {
padding: 38rpx 0; padding: 38rpx 0 0;
// padding-bottom: 40rpx; // padding-bottom: 40rpx;
padding-bottom: calc(env(safe-area-inset-bottom) + 40rpx);
box-sizing: border-box; box-sizing: border-box;
z-index: 100005;
} }
.common-popup-content-box { .common-popup-content-box {
margin-top: 42rpx; margin-top: 42rpx;

@ -79,7 +79,7 @@ export default class PopupDrawer extends Component<any, any> {
></View> ></View>
)} )}
<View <View
className={classnames("common-box", "large")} className={classnames("common-box", "common-big-large")}
style="margin: auto;" style="margin: auto;"
> >
<View className="common-popup-title">{title}</View> <View className="common-popup-title">{title}</View>

@ -111,7 +111,7 @@ export default class PopupPrivacy extends Component<any, any> {
></View> ></View>
)} )}
<View className={classnames("common-box", "large")}> <View className={classnames("common-box", "common-large")}>
<View className="common-popup-title"></View> <View className="common-popup-title"></View>
<View className="common-popup-content-box"> <View className="common-popup-content-box">
<View className="common-popup-content"> <View className="common-popup-content">

@ -105,7 +105,7 @@ export default class PopupSiteSwiper extends Component<any, any> {
} }
render() { render() {
let { confirmButtonText, isShow, siteData, type } = this.props; let { confirmButtonText, isShow, siteData, type, isLarge } = this.props;
let { current } = this.state; let { current } = this.state;
return ( return (

@ -2,33 +2,41 @@
@import "@antmjs/vantui/lib/transition/index.less"; @import "@antmjs/vantui/lib/transition/index.less";
@import "@antmjs/vantui/lib/overlay/index.less"; @import "@antmjs/vantui/lib/overlay/index.less";
.large {
width: 640rpx;
}
.middle {
width: 580rpx;
}
.common-box { .common-box {
padding: 38rpx 30rpx; width: 640rpx;
padding: 50rpx 35rpx 44rpx 35rpx;
padding-bottom: 40rpx; padding-bottom: 40rpx;
box-sizing: border-box; box-sizing: border-box;
.common-popup-title { .common-popup-title {
font-size: 36rpx; font-size: 36rpx;
font-weight: 700; font-family: PingFang SC;
font-weight: bold;
color: #030000;
text-align: center; text-align: center;
color: #000; margin-bottom: 79rpx;
}
.margin-samll {
margin-bottom: 50rpx;
} }
} }
.common-popup-content-box { // 最大弹窗-抽屉
margin-top: 60rpx; .common-big-large {
width: 690rpx;
}
// 加大弹窗-二维码与积分规则图片
.common-large {
width: 670rpx;
}
// 普通弹窗
.common-middle {
width: 640rpx;
} }
.common-popup-content { .common-popup-content {
font-size: 28rpx; font-size: 28rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
max-height: 700rpx; max-height: 794rpx;
overflow-y: auto; overflow-y: auto;
} }

@ -3,13 +3,15 @@
bottom: 0; bottom: 0;
left: 0; left: 0;
right: 0; right: 0;
height: 120px; height: 153px;
background: #fff; background: #fff;
display: flex; display: flex;
pointer-events: auto; pointer-events: auto;
padding-bottom: env(safe-area-inset-bottom); // padding-top: 25rpx;
// padding-bottom: env(safe-area-inset-bottom);
box-shadow: 0rpx -3rpx 7rpx 1rpx rgba(173, 191, 207, 0.21); box-shadow: 0rpx -3rpx 7rpx 1rpx rgba(173, 191, 207, 0.21);
z-index: -1; z-index: -1;
box-sizing: border-box;
} }
// .tab-bar-border { // .tab-bar-border {
@ -21,19 +23,19 @@
// height: 1px; // height: 1px;
// transform: scaleY(0.5); // transform: scaleY(0.5);
// } // }
.tab-bar-item { .tab-bar-item {
margin-top: 25rpx;
flex: 1; flex: 1;
text-align: center; text-align: center;
display: flex; display: flex;
justify-content: center; // justify-content: center;
align-items: center; align-items: center;
flex-direction: column; flex-direction: column;
} }
.tab-bar-item cover-image { .tab-bar-item cover-image {
width: 54px; width: 54px !important;
height: 54px; height: 54px !important;
} }
.tab-bar-item cover-view { .tab-bar-item cover-view {
@ -45,7 +47,7 @@
bottom: 0; bottom: 0;
left: 0; left: 0;
right: 0; right: 0;
height: 120px; height: 153px;
z-index: 1001; z-index: 1001;
background-color: var(--overlay-background-color, rgba(0, 0, 0, 0.7)); background-color: var(--overlay-background-color, rgba(0, 0, 0, 0.7));
// backdrop-filter: blur(7px); // backdrop-filter: blur(7px);

@ -114,7 +114,7 @@ export default class Index extends Component {
/> */} /> */}
<View className={classnames({ "tab-bar-layer": isMask })}> <View className={classnames({ "tab-bar-layer": isMask })}>
<View className={classnames("tab-bar")}> <View className={classnames("tab-bar")}>
<View className="tab-bar-border"></View> {/* <View className="tab-bar-border"></View> */}
{list.map((item, index) => { {list.map((item, index) => {
return ( return (
<View <View
@ -137,6 +137,7 @@ export default class Index extends Component {
fontWeight: selected === index ? "500" : "bold", fontWeight: selected === index ? "500" : "bold",
fontSize: "22rpx", fontSize: "22rpx",
marginTop: "10rpx", marginTop: "10rpx",
fontFamily: "PingFang SC",
}} }}
> >
{item.text} {item.text}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

@ -12,12 +12,12 @@ page {
box-sizing: border-box; box-sizing: border-box;
overflow: hidden; overflow: hidden;
.cell { .cell {
border-bottom: 1px solid #f3f3f3; // border-bottom: 1px solid #f3f3f3;
background: #fff; background: #fff;
padding: 20rpx 30rpx; padding: 20rpx 30rpx;
font-size: 28rpx; font-size: 28rpx;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 500; font-weight: 400;
color: #000000; color: #000000;
.label { .label {
color: #000000; color: #000000;
@ -31,7 +31,7 @@ page {
// height: 26rpx; // height: 26rpx;
font-size: 28rpx; font-size: 28rpx;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 500; font-weight: 400;
color: #000000; color: #000000;
// line-height: 60rpx; // line-height: 60rpx;
} }

@ -4,13 +4,18 @@ import { Block, View, Image, Text } from "@tarojs/components";
import Navbar from "../../components/navbar/navbar"; import Navbar from "../../components/navbar/navbar";
import { GetAboutUs } from "../../utils/Interface"; import { GetAboutUs, GetOtherSetting } from "../../utils/Interface";
/*** redux ***/
import { connect } from "react-redux";
import { otherSettingRefresh } from "../../store/features/otherSetting";
/*** redux end ***/
import { go } from "../../utils/traoAPI"; import { go } from "../../utils/traoAPI";
import "./about.less"; import "./about.less";
export default class About extends Component<any, any> { class About extends Component<any, any> {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
@ -20,7 +25,7 @@ export default class About extends Component<any, any> {
} }
async onLoad() { async onLoad() {
this.initData(); this.GetOtherSetting();
} }
componentDidMount() {} componentDidMount() {}
@ -35,13 +40,32 @@ export default class About extends Component<any, any> {
// if (res.data.code === 200) { // if (res.data.code === 200) {
// this.setState({ version: res.data.data.value }); // this.setState({ version: res.data.data.value });
// } // }
const accountInfo = Taro.getAccountInfoSync();
let version = accountInfo?.miniProgram?.version // 读取小程序版本
? "当前版本V" + accountInfo?.miniProgram?.version // const accountInfo = Taro.getAccountInfoSync();
: "开发版"; // let version = accountInfo?.miniProgram?.version
this.setState({ version: version }); // ? "当前版本V" + accountInfo?.miniProgram?.version
// : "开发版";
let version = this.props.otherSetting.sysVersion;
this.setState({ version: "当前版本V" + version });
}
// 获取小程序设置
GetOtherSetting = async () => {
Taro.showLoading({
title: "请求中...",
mask: true,
});
let res = await GetOtherSetting();
console.log("e", res);
Taro.hideLoading();
if (res.data.code === 200) {
this.props.otherSettingRefresh(res.data.data);
// this.setState({ otherSetting });
this.setState({ version: "当前版本V" + res.data.data.sysVersion });
} }
};
goUser = () => { goUser = () => {
go("/pages/userPolicy/userPolicy"); go("/pages/userPolicy/userPolicy");
@ -58,7 +82,7 @@ export default class About extends Component<any, any> {
<Navbar titleSlot="更多设置" isBack={true} /> <Navbar titleSlot="更多设置" isBack={true} />
<View className="about-box"> <View className="about-box">
<View className="cell flex aitems sb" style="margin-top:20rpx;"> <View className="cell flex aitems sb" style="margin-top:20rpx;">
<View className="label"></View> <View className="label"></View>
<View className="value version">{version}</View> <View className="value version">{version}</View>
</View> </View>
<View className="cell flex aitems sb" onClick={this.goUser}> <View className="cell flex aitems sb" onClick={this.goUser}>
@ -84,3 +108,13 @@ export default class About extends Component<any, any> {
); );
} }
} }
const mapStateToProps = (state) => ({
otherSetting: state.otherSetting,
});
const mapDispatchToProps = (dispatch) => ({
otherSettingRefresh(data) {
dispatch(otherSettingRefresh(data));
},
});
export default connect(mapStateToProps, mapDispatchToProps)(About);

@ -1,4 +1,4 @@
import { MpSplashDetail, WCUserLogin } from "../../utils/Interface"; // import { MpSplashDetail, WCUserLogin } from "../../utils/Interface";
import { Component, PropsWithChildren, useEffect, useState } from "react"; import { Component, PropsWithChildren, useEffect, useState } from "react";
import Taro from "@tarojs/taro"; import Taro from "@tarojs/taro";
// 引入 Swiper, SwiperItem 组件 // 引入 Swiper, SwiperItem 组件

@ -1,5 +1,10 @@
page {
margin: 0;
padding: 0;
}
.img { .img {
width: 100%; width: 750rpx;
height: 1450rpx;
position: relative; position: relative;
} }
.tip { .tip {

@ -45,7 +45,8 @@ export default class Consultant extends Component<any, any> {
<Image <Image
src={pictureUrl} src={pictureUrl}
show-menu-by-longpress show-menu-by-longpress
mode="widthFix" // mode="widthFix"
mode="aspectFill"
></Image> ></Image>
</View> </View>
</Block> </Block>

@ -1,4 +1,4 @@
import { MpSplashDetail, WCUserLogin } from "../../utils/Interface"; // import { MpSplashDetail, WCUserLogin } from "../../utils/Interface";
import { Component, PropsWithChildren, useEffect, useState } from "react"; import { Component, PropsWithChildren, useEffect, useState } from "react";
import Taro from "@tarojs/taro"; import Taro from "@tarojs/taro";
// 引入 Swiper, SwiperItem 组件 // 引入 Swiper, SwiperItem 组件

@ -31,3 +31,15 @@
-webkit-animation: slide-left 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both; -webkit-animation: slide-left 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
animation: slide-left 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both; animation: slide-left 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
} }
.text-animation {
transition: opacity 1s ease-in-out; /* 设置过渡时间为1秒并且采用ease-in-out曲线 */
}
.text-animation.fadeIn {
opacity: 1; /* 初始状态不透明度为1完全显示*/
}
.text-animation.fadeOut {
opacity: 0; /* 结束状态不透明度为0完全消失*/
}

@ -1,5 +1,34 @@
page {
background: #f8f8f8;
}
.main { .main {
position: relative;
width: 100%; width: 100%;
height: 1451rpx;
background: #f8f8f8;
.btn-box {
position: absolute;
top: 1236rpx;
width: 100vw;
display: flex;
flex-direction: column;
align-items: center;
.btn {
width: 270rpx;
height: 90rpx;
background: #000000;
border-radius: 45rpx;
color: #fff;
line-height: 90rpx;
text-align: center;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: bold;
color: #ffffff;
// left: calc(50% - 135rpx);
// margin-bottom: 40rpx;
}
}
} }
// /* 当设备屏幕宽度小于等于750px时应用该样式 */ // /* 当设备屏幕宽度小于等于750px时应用该样式 */
@ -12,6 +41,7 @@
.absolutely { .absolutely {
width: 100%; width: 100%;
height: 100%; height: 100%;
// height: 726px;
} }
.main .logo { .main .logo {
@ -46,7 +76,7 @@
width: 100%; width: 100%;
height: 38rpx; height: 38rpx;
font-size: 40rpx; font-size: 40rpx;
font-weight: 500; font-weight: 400;
color: #ffffff; color: #ffffff;
line-height: 60rpx; line-height: 60rpx;
text-align: center; text-align: center;
@ -73,57 +103,44 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
} .cover {
.body .cover {
display: inline-block; display: inline-block;
width: 660rpx; width: 660rpx;
height: 800rpx; height: 920rpx;
// height: 820rpx; // height: 820rpx;
border-radius: 50rpx; border-radius: 50rpx;
margin-top: 40rpx; margin-top: 48rpx;
margin-bottom: 7rpx; // margin-bottom: 9rpx;
} }
.body .bottom-card { .bottom-card {
position: relative; position: relative;
display: inline-table; display: inline-table;
width: 660rpx; width: 660rpx;
height: 470rpx; height: 474rpx;
background: linear-gradient(0deg, #f8f8f8 0%, #efefef 100%); background: linear-gradient(0deg, #f8f8f8 0%, #efefef 100%);
border-radius: 50rpx; border-radius: 50rpx;
.text { .text {
height: 45rpx;
font-size: 48rpx; font-size: 48rpx;
font-weight: 500; font-family: PingFang SC;
color: #000; font-weight: 400;
color: #000000;
line-height: 60rpx; line-height: 60rpx;
margin-top: 80rpx; margin-top: 80rpx;
// margin-top: 70rpx;
margin-bottom: 48rpx;
} }
.txt { .txt {
font-size: 26rpx; font-size: 26rpx;
font-weight: 500; font-weight: 400;
color: #666; color: #666;
// margin-bottom: 40rpx; margin-top: 48rpx;
margin-bottom: 59rpx;
} }
.footer {
// position: absolute;
// left: 0;
// right: 0;
// bottom: 20rpx;
flex-direction: column;
// padding-bottom: calc(44rpx + env(safe-area-inset-bottom));
.indicator { .indicator {
display: inline-flex; display: inline-flex;
width: 360rpx; width: 360rpx;
height: 4rpx; height: 2rpx;
background: #dfdfdf; background: transparent;
margin-top: 74rpx; margin-top: 229rpx;
.dot { .dot {
display: inline-flex; display: inline-flex;
flex: 1; flex: 1;
@ -138,15 +155,11 @@
} }
} }
} }
} // .footer {
// margin-top: 59rpx;
.btn { // flex-direction: column;
width: 270rpx; // padding-bottom: calc(44rpx + env(safe-area-inset-bottom));
height: 90rpx; // // box-sizing: border-box;
background: #000000; // // padding-bottom: env(safe-area-inset-bottom);
border-radius: 45rpx; // }
color: #fff;
line-height: 90rpx;
text-align: center;
// margin-bottom: 40rpx;
} }

@ -1,5 +1,5 @@
import classnames from "classnames"; import classnames from "classnames";
import { MpSplashDetail, WCUserLogin } from "../../utils/Interface"; // import { MpSplashDetail, WCUserLogin } from "../../utils/Interface";
import { Component, PropsWithChildren, useEffect, useState } from "react"; import { Component, PropsWithChildren, useEffect, useState } from "react";
import Taro from "@tarojs/taro"; import Taro from "@tarojs/taro";
// 引入 Swiper, SwiperItem 组件 // 引入 Swiper, SwiperItem 组件
@ -150,15 +150,10 @@ class Entry extends Component<any, any> {
render() { render() {
let { menu, current, welcomeList, navHeight } = this.state; let { menu, current, welcomeList, navHeight } = this.state;
const navHeightRpx = navHeight * 2;
return ( return (
<Block> <Block>
<Navbar></Navbar> <Navbar></Navbar>
<View <View className="main">
className="main"
style={{ height: `calc(100vh - ${navHeightRpx}rpx)` }}
>
{/* <View {/* <View
className="logo" className="logo"
style={"top:" + menu.top + "px; height:" + menu.height + "px"} style={"top:" + menu.top + "px; height:" + menu.height + "px"}
@ -174,19 +169,18 @@ class Entry extends Component<any, any> {
indicatorDots={false} indicatorDots={false}
indicatorColor="#999" indicatorColor="#999"
indicatorActiveColor="#333" indicatorActiveColor="#333"
previousMargin="32rpx"
nextMargin="32rpx"
> >
{welcomeList.map((item, index) => { {welcomeList.map((item, index) => {
return ( return (
<SwiperItem <SwiperItem key={"swiper_" + index}>
onClick={this.onClickSwiperItem.bind(this)}
key={"swiper_" + index}
>
<View <View
className="body FadeInFrame fadein" // FadeInFrame fadein
className="body entry-body"
style={{ style={{
top: menu.top + "px", top: menu.top + "px",
height: "calc(" + (100 % -menu.height) + "px)", height: "calc(" + (100 % -menu.height) + "px)",
display: current === index ? "block" : "none",
}} }}
> >
<View> <View>
@ -197,15 +191,24 @@ class Entry extends Component<any, any> {
></Image> ></Image>
</View> </View>
<View className="bottom-card"> <View className="bottom-card">
<View className="text slide-left">{item.title}</View> <View>
<View className="txt slide-left">{item.desc}</View>
<View className="footer flex aitems jcenter">
<View <View
className="btn" className={classnames("text", "text-animation", {
onClick={this.toHomePage.bind(this)} fadeOut: current !== index,
fadeIn: current === index,
})}
> >
{item.title}
</View>
<View
className={classnames("txt", "text-animation", {
fadeOut: current !== index,
fadeIn: current === index,
})}
>
{item.desc}
</View> </View>
<View className="indicator"> <View className="indicator">
{welcomeList.map((item, index) => { {welcomeList.map((item, index) => {
return ( return (
@ -225,6 +228,12 @@ class Entry extends Component<any, any> {
); );
})} })}
</Swiper> </Swiper>
<View className="btn-box">
<View className="btn" onClick={this.toHomePage.bind(this)}>
</View>
</View>
</View> </View>
</Block> </Block>
); );

@ -39,7 +39,7 @@ page {
} }
.infobox5 { .infobox5 {
padding: 31rpx 30rpx 0; padding: 44rpx 30rpx 0;
} }
.nurse_plan_box { .nurse_plan_box {
@ -104,7 +104,7 @@ page {
.add_device .tips { .add_device .tips {
font-size: 26rpx; font-size: 26rpx;
font-weight: 500; font-weight: 400;
color: #666666; color: #666666;
margin-top: 42rpx; margin-top: 42rpx;
} }
@ -176,7 +176,7 @@ page {
.nurse_top .detail_txt { .nurse_top .detail_txt {
font-size: 26rpx; font-size: 26rpx;
font-weight: 500; font-weight: 400;
color: #666666; color: #666666;
margin-right: 19rpx; margin-right: 19rpx;
} }
@ -192,7 +192,7 @@ page {
.nurse_progress .txt { .nurse_progress .txt {
font-size: 28rpx; font-size: 28rpx;
font-weight: 500; font-weight: 400;
color: #030000; color: #030000;
} }
@ -215,13 +215,13 @@ page {
.nurse_progress .progress_box .progress_num { .nurse_progress .progress_box .progress_num {
font-size: 26rpx; font-size: 26rpx;
font-weight: 500; font-weight: 400;
color: #999999; color: #999999;
} }
.nurse_progress .day_num { .nurse_progress .day_num {
font-size: 26rpx; font-size: 26rpx;
font-weight: 500; font-weight: 400;
color: #999999; color: #999999;
} }
@ -301,7 +301,7 @@ page {
.task_info .scene_info { .task_info .scene_info {
font-size: 22rpx; font-size: 22rpx;
font-weight: 500; font-weight: 400;
color: #666666; color: #666666;
line-height: 1; line-height: 1;
white-space: nowrap; white-space: nowrap;
@ -317,7 +317,7 @@ page {
background: #000000; background: #000000;
border-radius: 30rpx; border-radius: 30rpx;
font-size: 26rpx; font-size: 26rpx;
font-weight: 500; font-weight: 400;
color: #ffffff; color: #ffffff;
padding: 0 29rpx; padding: 0 29rpx;
} }
@ -337,7 +337,7 @@ page {
.next_nurse_time .tip { .next_nurse_time .tip {
font-size: 28rpx; font-size: 28rpx;
font-weight: 500; font-weight: 400;
color: #030000; color: #030000;
} }
@ -391,7 +391,7 @@ page {
.nurse_recommend_box .txt_box .txt { .nurse_recommend_box .txt_box .txt {
font-size: 26rpx; font-size: 26rpx;
font-weight: 500; font-weight: 400;
color: #666666; color: #666666;
} }
@ -452,7 +452,7 @@ page {
background: #f8f8f8; background: #f8f8f8;
border-radius: 24rpx; border-radius: 24rpx;
font-size: 24rpx; font-size: 24rpx;
font-weight: 500; font-weight: 400;
color: #000000; color: #000000;
text-align: center; text-align: center;
} }
@ -462,7 +462,7 @@ page {
.infobox3 { .infobox3 {
position: relative; position: relative;
margin: 42rpx 30rpx 0; margin: 44rpx 30rpx 0;
border-radius: 30rpx; border-radius: 30rpx;
overflow: hidden; overflow: hidden;
height: 220rpx; height: 220rpx;
@ -522,7 +522,7 @@ page {
.popbox_text { .popbox_text {
font-size: 28rpx; font-size: 28rpx;
font-weight: 500; font-weight: 400;
color: #000; color: #000;
text-align: center; text-align: center;
margin-top: 64rpx; margin-top: 64rpx;
@ -638,7 +638,7 @@ page {
width: 100%; width: 100%;
height: 100%; height: 100%;
font-size: 28rpx; font-size: 28rpx;
font-weight: 500; font-weight: 400;
/*color: #CCCCCC;*/ /*color: #CCCCCC;*/
} }
@ -809,7 +809,7 @@ page {
.popup-title { .popup-title {
font-size: 36rpx; font-size: 36rpx;
font-weight: 500; font-weight: 400;
text-align: center; text-align: center;
} }
@ -980,7 +980,7 @@ page {
} }
.haibaoTip { .haibaoTip {
font-size: 28rpx; font-size: 28rpx;
font-weight: 500; font-weight: 400;
color: #000000; color: #000000;
line-height: 1; line-height: 1;
text-align: center; text-align: center;
@ -989,10 +989,13 @@ page {
.index { .index {
position: relative; position: relative;
padding-top: 100rpx; padding-top: 50rpx;
background-color: #fff; background-color: #fff;
box-shadow: 0rpx 2rpx 25rpx 18rpx rgba(210, 210, 210, 0.1);
border-radius: 0rpx 0rpx 30rpx 30rpx;
.date-title { .date-title {
position: absolute; position: absolute;
top: 40rpx;
right: 16rpx; right: 16rpx;
width: 132rpx; width: 132rpx;
display: flex; display: flex;
@ -1002,6 +1005,7 @@ page {
.text { .text {
color: #666; color: #666;
font-size: 26rpx; font-size: 26rpx;
font-family: PingFang SC;
} }
} }
} }

@ -35,16 +35,24 @@ import {
GetSitePopupList, GetSitePopupList,
GetSiteCarousel, GetSiteCarousel,
GetSiteAddTag, GetSiteAddTag,
InstrumentInfo,
WCUserLogin,
} from "../../utils/Interface"; } from "../../utils/Interface";
// css引入 // css引入
import "taro-ui/rn/style/components/calendar.scss"; import "taro-ui/rn/style/components/calendar.scss";
import "./index.less"; import "./index.less";
import { go, goJump, msg } from "../../utils/traoAPI"; import {
go,
goJump,
msg,
setStorageSync,
getStorageSync,
} from "../../utils/traoAPI";
// PropsWithChildren
class Index extends Component<any, any> { class Index extends Component<any, any> {
pageCtx = Taro.getCurrentInstance().page; // pageCtx = Taro.getCurrentInstance().page;
$instance = Taro.getCurrentInstance();
constructor(props) { constructor(props) {
super(props); super(props);
@ -76,25 +84,25 @@ class Index extends Component<any, any> {
], ],
calendarInComplete: [ calendarInComplete: [
dayjs().add(1, "day").format("YYYY-MM-DD"), dayjs().add(1, "day").format("YYYY-MM-DD"),
dayjs().add(3, "day").format("YYYY-MM-DD"), dayjs().add(8, "day").format("YYYY-MM-DD"),
], ],
// currentDate: "2023-06-23",
// calendarComplete: ["2023-06-16", "2023-06-19", "2023-06-21"],
// calendarInComplete: ["2023-06-25", "2023-06-27"],
// 横幅轮播 // 横幅轮播
bannerList: [], bannerList: [],
bannerCurrent: 0, bannerCurrent: 0,
// 绑定仪器弹窗
isVisibleBinding: false,
typeBinding: 0,
}; };
} }
async onLoad() { async onLoad() {
// 仅非扫码进入页面时,校验跳转欢迎页
if (!this.$instance.router?.params?.q) {
const isFirst = Taro.getStorageSync("isWelcome"); const isFirst = Taro.getStorageSync("isWelcome");
if (!isFirst) { if (!isFirst) {
go("/pages/initiate/initiate"); go("/pages/initiate/initiate");
} }
}
const menu = Taro.getMenuButtonBoundingClientRect();
this.setState({ menu });
} }
componentDidMount() {} componentDidMount() {}
@ -102,7 +110,7 @@ class Index extends Component<any, any> {
componentWillUnmount() {} componentWillUnmount() {}
componentDidShow() { componentDidShow() {
const tabbar = Taro.getTabBar<CustomTabBar>(this.pageCtx); const tabbar = Taro.getTabBar<CustomTabBar>(this.$instance.page);
tabbar?.setSelected(0); tabbar?.setSelected(0);
this.showInit(); this.showInit();
@ -111,10 +119,15 @@ class Index extends Component<any, any> {
componentDidHide() {} componentDidHide() {}
showInit() { showInit() {
// 非扫码进入小程序,需判断是否跳转欢迎页;扫码进入小程序,直接检测隐私弹窗
if (!this.$instance.router?.params?.q) {
const isFirst = Taro.getStorageSync("isWelcome"); const isFirst = Taro.getStorageSync("isWelcome");
if (isFirst) { if (isFirst) {
this.checkShowPrivacyPopup(); this.checkShowPrivacyPopup();
} }
} else {
this.checkShowPrivacyPopup();
}
} }
// 检测是否弹出隐私协议 // 检测是否弹出隐私协议
@ -126,7 +139,8 @@ class Index extends Component<any, any> {
this.setState({ isShowPrivacyPopup: true }); this.setState({ isShowPrivacyPopup: true });
} else { } else {
// 用户已经同意过隐私协议,所以不需要再弹出隐私协议,也能调用隐私接口 // 用户已经同意过隐私协议,所以不需要再弹出隐私协议,也能调用隐私接口
this.initData(); // this.initData();
this.isSancQrcodeEnter();
} }
}, },
fail: () => {}, fail: () => {},
@ -135,14 +149,30 @@ class Index extends Component<any, any> {
}, },
}); });
} }
// 页面初始化 // 页面初始化
initData() { async initData() {
let token = getStorageSync("token");
if (!token) {
// 如果token过期先登录登录完成后自动初始化
await this.WCUserLogin();
} else {
// token没过期直接请求数据
this.initPageData();
}
}
initPageData() {
const mobile = Taro.getStorageSync("mobile"); const mobile = Taro.getStorageSync("mobile");
this.GetSiteCarousel(); this.GetSiteCarousel();
if (mobile) { if (mobile) {
this.GetNoReadMessageNum(); // 查询是否有消息 this.GetNoReadMessageNum(); // 查询是否有消息
// let url = this.$instance.router?.params?.q;
// if (url) {
// }
this.getInstrumentInfoBySerial();
if (!this.props.isShowIndexFlag) { if (!this.props.isShowIndexFlag) {
this.GetSitePopupList(); this.GetSitePopupList();
// 全局内存缓存,仅初次进入首页运行 // 全局内存缓存,仅初次进入首页运行
@ -216,15 +246,19 @@ class Index extends Component<any, any> {
// 新增设备 // 新增设备
addNewDevice = () => { addNewDevice = () => {
this.isRegister(); if (this.isRegister("addNewDevice")) {
if (this.isRegister()) {
// todo // todo
go("/pages/instrument/instrument"); go("/pages/instrument/instrument");
} }
}; };
// 是否已注册 // 是否已注册
isRegister() { isRegister(type = "") {
if (type === "addNewDevice") {
Taro.setStorageSync("isInstrumentJump", "true"); // 判断是否点击新增设备按钮,用于信息完善页判断跳转逻辑
} else {
Taro.setStorageSync("isInstrumentJump", "false"); // 重置
}
let mobile = Taro.getStorageSync("mobile"); let mobile = Taro.getStorageSync("mobile");
if (!mobile) { if (!mobile) {
this.alertRegister(); this.alertRegister();
@ -299,6 +333,66 @@ class Index extends Component<any, any> {
goJump(item); goJump(item);
} }
/* 扫码进入逻辑 */
//
// 是否扫码进入小程序
isSancQrcodeEnter = async () => {
let instance = Taro.getCurrentInstance();
console.log("instance", instance);
console.log("instance.router?.params", instance.router?.params);
let q = instance.router?.params?.q;
if (q) {
// 扫码进入强制重新登录
this.WCUserLogin();
} else {
this.initPageData();
}
};
async WCUserLogin() {
Taro.showLoading({
title: "请求中...",
mask: true,
});
const { code } = await Taro.login();
const { data } = await WCUserLogin({ code });
if (data.code === 200) {
setStorageSync("isWelcome", "true");
setStorageSync(
"token",
data.data.token,
dayjs().add(12, "h").format("YYYY/MM/DD hh:mm:ss")
);
Taro.setStorageSync("mobile", data.data.mobile);
this.props.userRefresh(data.data);
Taro.hideLoading();
this.initPageData();
} else {
msg("请求失败,尝试重新请求");
this.WCUserLogin();
}
}
closeBinding() {
this.setState({ isVisibleBinding: false });
}
confirmBinding() {
this.setState({ isVisibleBinding: false });
}
getInstrumentInfoBySerial = async () => {
let url = this.$instance.router?.params?.q;
if (url) {
let urlObj = new URL(url);
let params = new URLSearchParams(url);
console.log("urlObj", urlObj);
console.log("params", params);
let { data } = await InstrumentInfo.getInstrumentInfoBySerial();
console.log("Data", data);
}
};
// InstrumentInfo
/* 扫码进入逻辑 */
render() { render() {
let { let {
calendarComplete, calendarComplete,
@ -313,6 +407,9 @@ class Index extends Component<any, any> {
bannerList, bannerList,
bannerCurrent, bannerCurrent,
// 绑定弹窗
isVisibleBinding,
typeBinding,
} = this.state; } = this.state;
console.log("bannerList", bannerList); console.log("bannerList", bannerList);
@ -343,7 +440,12 @@ class Index extends Component<any, any> {
closePrivacy={this.closePrivacy} closePrivacy={this.closePrivacy}
/> />
<PopupBinding /> <PopupBinding
type={typeBinding}
isShow={isVisibleBinding}
close={this.closeBinding}
confirm={this.confirmBinding}
/>
{/* <PopupPrivacyTest {/* <PopupPrivacyTest
closePrivacy={this.closePrivacy.bind(this)} closePrivacy={this.closePrivacy.bind(this)}
@ -417,7 +519,7 @@ class Index extends Component<any, any> {
<View className="txt_box flex jcenter aitems"> <View className="txt_box flex jcenter aitems">
<View <View
className="at-icon at-icon-add" className="at-icon at-icon-add"
style="color: #fff" style="color: #fff;font-size: 30rpx;"
></View> ></View>
<View className="txt" onClick={this.addNewDevice}> <View className="txt" onClick={this.addNewDevice}>
@ -487,7 +589,7 @@ class Index extends Component<any, any> {
key={"banner_" + index} key={"banner_" + index}
onClick={this.gobanner.bind(this, item)} onClick={this.gobanner.bind(this, item)}
> >
<Image src={item.fileUrl} /> <Image style="width:100%;height:100%" src={item.fileUrl} />
</SwiperItem> </SwiperItem>
); );
})} })}

@ -26,9 +26,14 @@
.main .middle { .main .middle {
position: absolute; position: absolute;
left: 50%; width: 100vw;
display: flex;
flex-direction: column;
align-items: center;
// justify-content: center;
// left: 50%;
bottom: calc(env(safe-area-inset-bottom) + 142rpx); bottom: calc(env(safe-area-inset-bottom) + 142rpx);
transform: translateX(-50%); // transform: translateX(-50%);
} }
.main .logo_middle { .main .logo_middle {
@ -41,7 +46,7 @@
width: 100%; width: 100%;
height: 38rpx; height: 38rpx;
font-size: 40rpx; font-size: 40rpx;
font-weight: 500; font-weight: 400;
color: #ffffff; color: #ffffff;
line-height: 60rpx; line-height: 60rpx;
text-align: center; text-align: center;
@ -106,7 +111,7 @@
.bottom .text { .bottom .text {
height: 45rpx; height: 45rpx;
font-size: 48rpx; font-size: 48rpx;
font-weight: 500; font-weight: 400;
color: #000; color: #000;
line-height: 60rpx; line-height: 60rpx;
margin-top: 80rpx; margin-top: 80rpx;
@ -116,7 +121,7 @@
.bottom .txt { .bottom .txt {
height: 27rpx; height: 27rpx;
font-size: 26rpx; font-size: 26rpx;
font-weight: 500; font-weight: 400;
color: #666; color: #666;
} }

@ -33,8 +33,6 @@ class Initiate extends Component<any, any> {
height: 0, height: 0,
}, },
url: "", url: "",
touchX: 0,
touchY: 0,
}; };
} }
@ -131,20 +129,33 @@ class Initiate extends Component<any, any> {
} }
} }
touchstart(event) { onFinish(event) {
const { clientX, clientY } = event.changedTouches[0]; // const { current } = event.detail;
this.setState({ touchX: clientX, touchY: clientY }); // const { toRight, isClick, welcomeList } = this.state;
} // if (current === welcomeList.length - 1) {
touchend(event) { // if (toRight || isClick) {
const { clientX, clientY } = event.changedTouches[0]; // this.setState({ toRight: false, isClick: false });
const { touchX, touchY } = this.state; // } else {
if (clientX - touchX < -30 && Math.abs(clientY - touchY) < 30) { // // this.toHomePage();
// }
// }
this.onEnded(); this.onEnded();
} }
}
onEnded = () => { onEnded = () => {
let token = Taro.getStorageSync("token"); let token = Taro.getStorageSync("token");
if (token) { if (token) {
let data = Taro.getStorageSync("MpSplashDetail_type1") || undefined;
if (data) {
let detail = JSON.parse(data);
let list = detail.filter((item: any) => item.fileSuffix === "images");
if (list.length === 0) {
Taro.reLaunch({
url: "/pages/index/index",
});
return;
}
}
let timeOut: any = null; let timeOut: any = null;
clearTimeout(timeOut); clearTimeout(timeOut);
timeOut = setTimeout(() => { timeOut = setTimeout(() => {
@ -159,26 +170,12 @@ class Initiate extends Component<any, any> {
let { menu, url } = this.state; let { menu, url } = this.state;
return ( return (
<Block> <Block>
{/* <View <Navbar transparent={true} isWhite={true}></Navbar>
className="logo" <View className="main">
style={{ <Swiper
top: (menu?.top != undefined ? menu?.top : 44) + "px", className="absolutely"
height: menu?.height + "px", onAnimationFinish={this.onFinish.bind(this)}
background: "transparent",
}}
>
<Image
src={require("../../img/welcome/top-logo.png")}
mode="widthFix"
/>
</View> */}
<Navbar transparent={true}></Navbar>
<View
className="main"
onTouchStart={this.touchstart.bind(this)}
onTouchEnd={this.touchend.bind(this)}
> >
<Swiper className="absolutely">
<SwiperItem <SwiperItem
className="absolutely" className="absolutely"
onClick={this.onEnded} onClick={this.onEnded}

@ -49,7 +49,7 @@ page {
.top_title { .top_title {
height: 45rpx; height: 45rpx;
font-size: 48rpx; font-size: 48rpx;
font-weight: 500; font-weight: 400;
color: #000; color: #000;
line-height: 1; line-height: 1;
/*line-height: 60rpx;*/ /*line-height: 60rpx;*/
@ -59,7 +59,7 @@ page {
.top_tips { .top_tips {
width: 470rpx; width: 470rpx;
font-size: 26rpx; font-size: 26rpx;
/*font-weight: 500;*/ /*font-weight: 400;*/
color: #666666; color: #666666;
margin: 0 auto 18rpx; margin: 0 auto 18rpx;
line-height: 1; line-height: 1;
@ -176,7 +176,7 @@ page {
padding-left: 28rpx; padding-left: 28rpx;
padding-right: 56rpx; padding-right: 56rpx;
font-size: 28rpx; font-size: 28rpx;
/*font-weight: 500;*/ /*font-weight: 400;*/
} }
.icon { .icon {

@ -1,6 +1,8 @@
import classnames from "classnames"; import classnames from "classnames";
import { Component, PropsWithChildren, useEffect, useState } from "react"; import { Component, PropsWithChildren, useEffect, useState } from "react";
// import { InstrumentInfo } from "../../utils/Interface";
import Taro from "@tarojs/taro"; import Taro from "@tarojs/taro";
// 引入 Swiper, SwiperItem 组件 // 引入 Swiper, SwiperItem 组件
import { import {
@ -15,13 +17,7 @@ import {
Canvas, Canvas,
} from "@tarojs/components"; } from "@tarojs/components";
import { Toast } from "@antmjs/vantui"; import { InstrumentInfo } from "../../utils/Interface";
import {
BuyPropertyList,
InstrumentBindingAdd,
InstrumentCodeCheck,
Uploads,
} from "../../utils/Interface";
import { go, back, loading, msg, showModal } from "../../utils/traoAPI"; import { go, back, loading, msg, showModal } from "../../utils/traoAPI";
import { isVideo } from "../../utils/util"; import { isVideo } from "../../utils/util";
import utilHtml from "../../utils/utilhtml"; import utilHtml from "../../utils/utilhtml";
@ -29,7 +25,10 @@ import utilHtml from "../../utils/utilhtml";
import { getImgInfo, contraction } from "../../utils/compressImage"; import { getImgInfo, contraction } from "../../utils/compressImage";
/* 自定义组件 */
import Navbar from "../../components/navbar/navbar"; import Navbar from "../../components/navbar/navbar";
import PopupAlert from "../../components/popup/popup-alert";
/* 组件 */
import "./instrument.less"; import "./instrument.less";
@ -259,7 +258,7 @@ export default class Instrument extends Component<any, any> {
// this.setState({ succeedShow: true }); // this.setState({ succeedShow: true });
// }) // })
// .catch((err) => { // .catch((err) => {
// if (err.data.code != 500) { // if (err.data.code != 400) {
// that.setState({ // that.setState({
// errorMsg: err.data.msg, // errorMsg: err.data.msg,
// bindPopup: "errorMsg", // bindPopup: "errorMsg",
@ -282,10 +281,30 @@ export default class Instrument extends Component<any, any> {
back(); back();
}; };
closeDev = () => {
// go("/pages/user/user");
let isInstrumentJump = Taro.getStorageSync("isInstrumentJump");
if (isInstrumentJump === "true") {
Taro.reLaunch({
url: "/pages/user/user",
});
}
};
render() { render() {
let { isVideo, channelInfo, inputType, style, equipmentList } = this.state; let { isVideo, channelInfo, inputType, style, equipmentList } = this.state;
return ( return (
<Block> <Block>
<PopupAlert
isShow={true}
isClose={true}
title="提示"
content="页面正在开发中"
confirmButtonText="确定"
textAlgin="center"
close={this.closeDev}
confirm={this.closeDev}
/>
<Canvas id="compressImage" canvasId="compressImage" type="2d"></Canvas> <Canvas id="compressImage" canvasId="compressImage" type="2d"></Canvas>
<Navbar titleSlot="仪器绑定" isBack={true} /> <Navbar titleSlot="仪器绑定" isBack={true} />
<View></View> <View></View>

@ -27,7 +27,7 @@ page {
.tip1 { .tip1 {
padding-right: 23rpx; padding-right: 23rpx;
font-size: 26rpx; font-size: 26rpx;
font-weight: 500; font-weight: 400;
color: #000; color: #000;
} }
.icon { .icon {
@ -48,7 +48,7 @@ page {
.info3 { .info3 {
text-align: center; text-align: center;
font-size: 26rpx; font-size: 26rpx;
font-weight: 500; font-weight: 400;
color: #000000; color: #000000;
padding-top: 55rpx; padding-top: 55rpx;
} }
@ -86,6 +86,12 @@ page {
height: 160rpx; height: 160rpx;
margin-bottom: 34rpx; margin-bottom: 34rpx;
} }
.nodata_text {
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 400;
color: #666666;
}
} }
.list { .list {
@ -94,19 +100,19 @@ page {
.list_block { .list_block {
width: 100%; width: 100%;
border-bottom: 2rpx solid #dddddd; border-bottom: 2rpx solid #dddddd;
padding: 30rpx 34rpx; padding: 32rpx 0 30rpx 0;
box-sizing: border-box; box-sizing: border-box;
} }
.left { .left {
.tip1 { .tip1 {
font-size: 28rpx; font-size: 28rpx;
font-weight: 500; font-weight: 400;
color: #030000; color: #030000;
} }
.tip2 { .tip2 {
margin-top: 34rpx; margin-top: 34rpx;
font-size: 24rpx; font-size: 24rpx;
font-weight: 500; font-weight: 400;
color: #999999; color: #999999;
/*line-height: 36rpx;*/ /*line-height: 36rpx;*/
} }
@ -123,5 +129,13 @@ page {
} }
} }
.richtext { .alert-popup-btns {
margin-top: 40rpx;
}
.integral.van-popup--center {
top: 55%;
}
.officialAccount.van-popup--center {
top: 48%;
} }

@ -181,7 +181,14 @@ class IntegralList extends Component<any, any> {
}); });
if (res.data.code === 200) { if (res.data.code === 200) {
if (res.data.rows.length) { if (res.data.rows.length) {
list = [].concat(list, res.data.rows); let data = res.data.rows.map((item: any) => {
item.createTime = item.createTime
? dayjs(item.createTime).format("YYYY-MM-DD hh:mm:ss")
: "";
return item;
});
list = [].concat(list, data);
this.setState({ list: list, total: res.data.total, dargState: 0 }); this.setState({ list: list, total: res.data.total, dargState: 0 });
} }
} }
@ -327,6 +334,7 @@ class IntegralList extends Component<any, any> {
return ( return (
<Block> <Block>
<PopupAlert <PopupAlert
myClassName="integral"
isLarge={true} isLarge={true}
isClose={true} isClose={true}
isShow={isIntegral} isShow={isIntegral}
@ -338,6 +346,7 @@ class IntegralList extends Component<any, any> {
confirm={this.integralPopupClose} confirm={this.integralPopupClose}
></PopupAlert> ></PopupAlert>
<PopupAlert <PopupAlert
myClassName="officialAccount"
isLarge={true} isLarge={true}
isClose={true} isClose={true}
isShow={isOfficialAccount} isShow={isOfficialAccount}
@ -368,6 +377,7 @@ class IntegralList extends Component<any, any> {
close={this.officialPopupClose} close={this.officialPopupClose}
confirm={this.officialPopupConfirm} confirm={this.officialPopupConfirm}
></PopupAlert> ></PopupAlert>
<Navbar titleSlot="我的积分" isBack={true}></Navbar> <Navbar titleSlot="我的积分" isBack={true}></Navbar>
<View style="background: #f3f3f3;padding: 33rpx 30rpx 31rpx 30rpx;"> <View style="background: #f3f3f3;padding: 33rpx 30rpx 31rpx 30rpx;">
@ -446,7 +456,7 @@ class IntegralList extends Component<any, any> {
src={require("../../img/user/points.png")} src={require("../../img/user/points.png")}
mode="aspectFill" mode="aspectFill"
></Image> ></Image>
<View style="color:#666"></View> <View className="nodata_text"></View>
</View> </View>
)} )}
{list.map((item: any, key: number) => { {list.map((item: any, key: number) => {

@ -24,7 +24,7 @@ page {
} }
.right { .right {
font-size: 24rpx; font-size: 24rpx;
font-weight: 500; font-weight: 400;
color: #999999; color: #999999;
} }
} }
@ -33,7 +33,8 @@ page {
.content { .content {
line-height: 50rpx; line-height: 50rpx;
font-size: 26rpx; font-size: 26rpx;
font-weight: 500; font-family: PingFang SC;
font-weight: 400;
color: #666666; color: #666666;
} }
} }

@ -1,5 +1,6 @@
import { MpSplashDetail, WCUserLogin } from "../../utils/Interface"; import { MpSplashDetail, WCUserLogin } from "../../utils/Interface";
import { Component, PropsWithChildren, useEffect, useState } from "react"; import { Component, PropsWithChildren, useEffect, useState } from "react";
import dayjs from "dayjs";
import Taro from "@tarojs/taro"; import Taro from "@tarojs/taro";
import { import {
Block, Block,
@ -71,10 +72,17 @@ export default class Message extends Component<any, any> {
}); });
if (res.data.code === 200) { if (res.data.code === 200) {
if (res.data.rows.length) { if (res.data.rows.length) {
let newList = [].concat(list, res.data.rows); let data = res.data.rows.map((item: any) => {
item.createTime = item.createTime
? dayjs(item.createTime).format("YYYY-MM-DD")
: "";
return item;
});
let newList = [].concat(list, data);
setTimeout(() => { setTimeout(() => {
this.setState({ list: newList, dargState: 0, total: res.data.total }); this.setState({ list: newList, dargState: 0, total: res.data.total });
}, 500); }, 400);
} }
} }
}; };
@ -198,8 +206,9 @@ export default class Message extends Component<any, any> {
scrollY={this.state.scrollY} scrollY={this.state.scrollY}
scrollWithAnimation scrollWithAnimation
> >
<View style={{ padding: "0 12px" }}> <View>
<View className="message"> <View className="message">
<View style="height:13rpx"></View>
{list.map((item: any) => { {list.map((item: any) => {
return ( return (
<View <View

@ -8,7 +8,7 @@
height: 110rpx; height: 110rpx;
background: #fff; background: #fff;
font-size: 30rpx; font-size: 30rpx;
font-weight: 500; font-weight: 400;
color: #666; color: #666;
padding: 0 32rpx; padding: 0 32rpx;
} }
@ -80,7 +80,7 @@
margin-left: 30rpx; margin-left: 30rpx;
color: #000000; color: #000000;
font-size: 26rpx; font-size: 26rpx;
font-weight: 500; font-weight: 400;
} }
.products_item { .products_item {
@ -91,7 +91,7 @@
background: #eaeaea; background: #eaeaea;
border-radius: 35rpx; border-radius: 35rpx;
font-size: 26rpx; font-size: 26rpx;
font-weight: 500; font-weight: 400;
color: #000; color: #000;
padding-right: 23rpx; padding-right: 23rpx;
padding-left: 82rpx; padding-left: 82rpx;
@ -160,7 +160,7 @@
.statistic_desc { .statistic_desc {
font-size: 26rpx; font-size: 26rpx;
font-weight: 500; font-weight: 400;
color: #999; color: #999;
} }
@ -185,7 +185,7 @@
background: #e5f9ee; background: #e5f9ee;
border-radius: 18rpx; border-radius: 18rpx;
font-size: 24rpx; font-size: 24rpx;
font-weight: 500; font-weight: 400;
color: #57bc81; color: #57bc81;
} }
@ -196,7 +196,7 @@
.report_btn { .report_btn {
font-size: 26rpx; font-size: 26rpx;
font-weight: 500; font-weight: 400;
color: #666; color: #666;
align-items: baseline; align-items: baseline;
} }
@ -239,7 +239,7 @@
.instrument_desc { .instrument_desc {
font-size: 24rpx; font-size: 24rpx;
font-weight: 500; font-weight: 400;
color: #999; color: #999;
} }
@ -262,14 +262,14 @@
.place { .place {
font-size: 24rpx; font-size: 24rpx;
font-weight: 500; font-weight: 400;
color: #666; color: #666;
margin-bottom: 15rpx; margin-bottom: 15rpx;
} }
.duration { .duration {
font-size: 20rpx; font-size: 20rpx;
font-weight: 500; font-weight: 400;
color: #000; color: #000;
} }
@ -336,7 +336,7 @@
.clock_in_statistics_date { .clock_in_statistics_date {
height: 21rpx; height: 21rpx;
font-size: 26rpx; font-size: 26rpx;
font-weight: 500; font-weight: 400;
color: #666; color: #666;
} }
@ -355,14 +355,14 @@
.buoy { .buoy {
font-size: 20rpx; font-size: 20rpx;
font-weight: 500; font-weight: 400;
color: #000; color: #000;
margin-bottom: 16rpx; margin-bottom: 16rpx;
} }
.month { .month {
font-size: 20rpx; font-size: 20rpx;
font-weight: 500; font-weight: 400;
color: #999; color: #999;
margin-top: 12rpx; margin-top: 12rpx;
} }
@ -387,7 +387,7 @@
.more_text { .more_text {
font-size: 26rpx; font-size: 26rpx;
font-weight: 500; font-weight: 400;
color: #666; color: #666;
} }
@ -412,7 +412,7 @@
.month_item_note { .month_item_note {
font-size: 24rpx; font-size: 24rpx;
font-weight: 500; font-weight: 400;
color: #999; color: #999;
margin-top: 31rpx; margin-top: 31rpx;
} }
@ -448,26 +448,46 @@
font-size: 32rpx; font-size: 32rpx;
color: #fff; color: #fff;
text-align: center; text-align: center;
font-weight: 500; font-weight: 400;
background: #000000; background: #000000;
border-radius: 45rpx; border-radius: 45rpx;
} }
.empty { // .empty {
display: flex; // display: flex;
flex-direction: column; // flex-direction: column;
justify-content: center; // justify-content: center;
align-items: center; // align-items: center;
width: 100vw; // width: 100vw;
height: 60vh; // height: 60vh;
.empty-img { // .empty-img {
display: block; // display: block;
// width: 160rpx;
// height: 160rpx;
// }
// .empty-text {
// font-size: 30rpx;
// color: #666;
// margin-top: 20rpx;
// }
// }
.nodata {
width: 200rpx; width: 200rpx;
height: 200rpx; height: 300rpx;
margin: 0 auto;
margin-top: 310rpx;
text-align: center;
.nodata_img {
display: inline-block;
width: 160rpx;
height: 160rpx;
margin-bottom: 34rpx;
} }
.empty-text { .nodata_text {
font-size: 36rpx; font-size: 30rpx;
color: #666; font-family: PingFang SC;
margin-top: 20rpx; font-weight: 400;
color: #666666;
} }
} }

@ -67,23 +67,23 @@ export default class Recording extends Component<any, any> {
{current === 0 && ( {current === 0 && (
<View> <View>
<View className="empty"> <View className="nodata">
<Image <Image
className="empty-img" className="nodata_img"
src={require("../../img/empty.png")} src={require("../../img/empty.png")}
></Image> ></Image>
<View className="empty-text"></View> <View className="nodata_text"></View>
</View> </View>
</View> </View>
)} )}
{current === 1 && ( {current === 1 && (
<View> <View>
<View className="empty"> <View className="nodata">
<Image <Image
className="empty-img" className="nodata_img"
src={require("../../img/empty.png")} src={require("../../img/empty.png")}
></Image> ></Image>
<View className="empty-text"></View> <View className="empty_text"></View>
</View> </View>
</View> </View>
)} )}

@ -23,13 +23,12 @@ page {
.bg { .bg {
display: inline-block; display: inline-block;
width: 100%; width: 100%;
// height: 943rpx; height: 943rpx;
height: 991rpx;
} }
.footer { .footer {
position: relative; position: relative;
margin-top: -60rpx; margin-top: -62rpx;
z-index: 1; z-index: 1;
width: 100%; width: 100%;
height: 570rpx; height: 570rpx;
@ -42,8 +41,9 @@ page {
.title { .title {
font-size: 48rpx; font-size: 48rpx;
font-weight: 500; font-family: PingFang SC;
color: #000; font-weight: 400;
color: #000000;
padding-top: 61rpx; padding-top: 61rpx;
padding-bottom: 48rpx; padding-bottom: 48rpx;
} }
@ -51,8 +51,9 @@ page {
.content { .content {
width: 450rpx; width: 450rpx;
height: 73rpx; height: 73rpx;
font-family: PingFang SC;
font-size: 26rpx; font-size: 26rpx;
font-weight: 500; font-weight: 400;
color: #666; color: #666;
margin: auto; margin: auto;
} }
@ -70,7 +71,7 @@ page {
line-height: 90rpx; line-height: 90rpx;
font-size: 32rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
margin: 120rpx auto 42rpx; margin: 118rpx auto 42rpx;
text-align: center; text-align: center;
} }
@ -79,7 +80,7 @@ page {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
font-size: 26rpx; font-size: 26rpx;
font-weight: 500; font-weight: 400;
color: #666; color: #666;
height: 46rpx; height: 46rpx;
line-height: 46rpx; line-height: 46rpx;
@ -123,7 +124,7 @@ page {
.text { .text {
height: 28rpx; height: 28rpx;
font-size: 30rpx; font-size: 30rpx;
font-weight: 500; font-weight: 400;
color: #030000; color: #030000;
line-height: 60rpx; line-height: 60rpx;
margin-bottom: 40rpx; margin-bottom: 40rpx;

@ -55,7 +55,7 @@ class Shop extends Component<any, any> {
Taro.navigateToMiniProgram({ Taro.navigateToMiniProgram({
appId: otherSetting.skipAppid, appId: otherSetting.skipAppid,
path: otherSetting.skipPath, path: otherSetting.skipPath,
envVersion: otherSetting.envVersion, // sysVersion: otherSetting.sysVersion,
success(res) { success(res) {
// 打开成功 // 打开成功
Taro.reLaunch({ Taro.reLaunch({
@ -84,7 +84,7 @@ class Shop extends Component<any, any> {
let { otherSetting } = this.state; let { otherSetting } = this.state;
otherSetting.skipAppid = res.data.data.skipAppid; otherSetting.skipAppid = res.data.data.skipAppid;
otherSetting.skipPath = res.data.data.skipPath; otherSetting.skipPath = res.data.data.skipPath;
otherSetting.envVersion = res.data.data.envVersion; otherSetting.sysVersion = res.data.data.sysVersion;
this.setState({ otherSetting }); this.setState({ otherSetting });
this.goMiniProgram(); this.goMiniProgram();
} }

@ -17,6 +17,7 @@ page {
background: #ffffff; background: #ffffff;
border-radius: 50rpx 50rpx 0rpx 0rpx; border-radius: 50rpx 50rpx 0rpx 0rpx;
padding: 0 0 150rpx; padding: 0 0 150rpx;
height: 1188rpx;
} }
.infobox1 { .infobox1 {
@ -52,10 +53,11 @@ page {
margin-top: 85rpx; margin-top: 85rpx;
} }
.infobox1 .info1 .tipbox .tip1 .name { .infobox1 .info1 .tipbox .tip1 .name {
line-height: 1;
font-size: 44rpx; font-size: 44rpx;
font-family: PingFang SC;
font-weight: bold; font-weight: bold;
color: #000000; color: #000000;
line-height: 1;
} }
.infobox1 .info1 .tipbox .tip1 .level { .infobox1 .info1 .tipbox .tip1 .level {
color: #ffffff; color: #ffffff;
@ -69,7 +71,8 @@ page {
} }
.infobox1 .info1 .tipbox .tip2 { .infobox1 .info1 .tipbox .tip2 {
font-size: 24rpx; font-size: 24rpx;
font-weight: 500; font-family: PingFang SC;
font-weight: 400;
color: #999999; color: #999999;
line-height: 1; line-height: 1;
margin-top: 25rpx; margin-top: 25rpx;
@ -81,14 +84,16 @@ page {
} }
.infobox1 .info3 { .infobox1 .info3 {
margin: 22rpx 30rpx 0; margin: 22rpx 30rpx 0;
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 400;
color: #999999;
text-align: center;
width: 690rpx;
height: 60rpx; height: 60rpx;
line-height: 60rpx; line-height: 60rpx;
background: #f8f8f8; background: #f8f8f8;
border-radius: 30rpx; border-radius: 30rpx;
font-size: 24rpx;
font-weight: 500;
color: #999999;
text-align: center;
} }
.infobox1 .info2 .block { .infobox1 .info2 .block {
position: relative; position: relative;
@ -123,13 +128,14 @@ page {
.infobox1 .info2 .block .txt { .infobox1 .info2 .block .txt {
font-size: 22rpx; font-size: 22rpx;
font-weight: 500; font-weight: 400;
color: #a58e6d; color: #a58e6d;
} }
.infobox1 .info2 .block .tip .tip1 { .infobox1 .info2 .block .tip .tip1 {
font-size: 26rpx; font-size: 26rpx;
font-weight: 500; font-family: PingFang SC;
font-weight: 400;
color: #000000; color: #000000;
margin-right: 20rpx; margin-right: 20rpx;
} }
@ -147,29 +153,30 @@ page {
margin: 64rpx 34rpx 0; margin: 64rpx 34rpx 0;
background: #fff; background: #fff;
border-radius: 20rpx; border-radius: 20rpx;
} .title,
.infobox2 .title { .title2 {
font-size: 32rpx; font-size: 32rpx;
line-height: 1; font-family: PingFang SC;
font-weight: bold; font-weight: bold;
color: #030000; color: #030000;
} }
.infobox2 .info { .title2 {
margin-top: 82rpx;
}
.info {
margin-top: 56rpx; margin-top: 56rpx;
flex-wrap: wrap; flex-wrap: wrap;
} .block {
.infobox2 .info .block {
width: 25%; width: 25%;
flex-direction: column; flex-direction: column;
position: relative; position: relative;
} .img image {
.infobox2 .info .block .img image {
width: 40rpx; width: 40rpx;
height: 40rpx; height: 40rpx;
} }
.infobox2 .info .block .num { .num {
position: absolute; position: absolute;
top: -5rpx; top: -5rpx;
right: -15rpx; right: -15rpx;
@ -184,18 +191,21 @@ page {
justify-content: center; justify-content: center;
font-size: 20rpx; font-size: 20rpx;
} }
.infobox2 .info .block .img { .img {
position: relative; position: relative;
/*width: 64rpx;*/ /*width: 64rpx;*/
/*height: 70rpx;*/ /*height: 70rpx;*/
/*margin: auto;*/ /*margin: auto;*/
} }
.infobox2 .info .block .tip1 { .tip1 {
margin-top: 36rpx; margin-top: 36rpx;
font-size: 26rpx; font-size: 26rpx;
font-weight: 500; font-weight: 400;
color: #000000; color: #000000;
} }
}
}
}
.service-title { .service-title {
display: flex; display: flex;
@ -213,14 +223,18 @@ page {
background: #ffffff; background: #ffffff;
border: 1px solid #dddddd; border: 1px solid #dddddd;
border-radius: 3rpx; border-radius: 3rpx;
padding: 38rpx 30rpx; padding: 30rpx 30rpx;
width: auto; width: auto;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: #030000;
box-sizing: border-box; box-sizing: border-box;
} }
.textarea-placeholder { .textarea-placeholder {
font-size: 28rpx; font-size: 28rpx;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 500; font-weight: 400;
color: #cccccc; color: #cccccc;
line-height: 60rpx; line-height: 60rpx;
} }

@ -352,9 +352,7 @@ class User extends Component<any, any> {
<View className="tip1"></View> <View className="tip1"></View>
</View> </View>
</View> </View>
<View className="title" style="margin-top: 82rpx;"> <View className="title2"></View>
</View>
<View className="info flex aitems"> <View className="info flex aitems">
<View <View
className="block flex aitems" className="block flex aitems"
@ -385,7 +383,7 @@ class User extends Component<any, any> {
</View> </View>
<View className="tip1"></View> <View className="tip1"></View>
</View> </View>
<View {/* <View
className="block flex aitems" className="block flex aitems"
data-url="/pages/privacyPolicy/privacyPolicy" data-url="/pages/privacyPolicy/privacyPolicy"
onClick={this.goUrlNoRegister} onClick={this.goUrlNoRegister}
@ -394,7 +392,7 @@ class User extends Component<any, any> {
<Image src={require("../../img/8.png")} mode="aspectFill" /> <Image src={require("../../img/8.png")} mode="aspectFill" />
</View> </View>
<View className="tip1"></View> <View className="tip1"></View>
</View> </View> */}
</View> </View>
</View> </View>
</View> </View>
@ -410,6 +408,7 @@ class User extends Component<any, any> {
maxlength={100} maxlength={100}
showCount={true} showCount={true}
placeholder="请在此处写下您的意见与反馈" placeholder="请在此处写下您的意见与反馈"
placeholderStyle="font-weight: 400;font-size:28rpx;"
onInput={this.onInputTextarea} onInput={this.onInputTextarea}
></Textarea> ></Textarea>
</Block> </Block>

@ -24,19 +24,20 @@ page {
.main { .main {
text-align: center; text-align: center;
padding-bottom: 153rpx; height: 1451rpx;
// padding-bottom: 153rpx;
} }
.main .title { .main .title {
font-size: 48rpx; font-size: 48rpx;
font-weight: 500; font-weight: 400;
color: #000; color: #000;
margin: 73rpx auto 48rpx; margin: 73rpx auto 48rpx;
} }
.main .txt { .main .txt {
font-size: 26rpx; font-size: 26rpx;
font-weight: 500; font-weight: 400;
color: #666; color: #666;
margin-bottom: 10rpx; margin-bottom: 10rpx;
} }
@ -44,7 +45,7 @@ page {
.main .avatar_box { .main .avatar_box {
position: relative; position: relative;
// width: max-content; // width: max-content;
width: 147rpx; // width: 147rpx;
margin: 78rpx auto 50rpx; margin: 78rpx auto 50rpx;
} }
@ -56,6 +57,11 @@ page {
} }
.main .avatar_box .btn_avatar { .main .avatar_box .btn_avatar {
// height: 26rpx;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: #000000;
background: transparent; background: transparent;
} }
@ -92,15 +98,15 @@ button::after {
.form_item .arrow { .form_item .arrow {
position: absolute; position: absolute;
bottom: 30rpx; bottom: 26rpx;
right: 21rpx; right: 21rpx;
width: 30rpx; width: 30rpx;
height: 20rpx; height: 30rpx;
} }
.form .form_item .label { .form .form_item .label {
font-size: 28rpx; font-size: 28rpx;
font-weight: 500; font-weight: 400;
color: #030000; color: #030000;
margin-bottom: 28rpx; margin-bottom: 28rpx;
} }
@ -112,14 +118,17 @@ button::after {
} }
.form .form_item .ipt { .form .form_item .ipt {
width: 100%; // width: 100%;
padding-left: 28rpx;
box-sizing: border-box;
width: 690rpx;
height: 80rpx; height: 80rpx;
line-height: 80rpx; line-height: 80rpx;
background: #ffffff; background: #ffffff;
border: 1px solid #dddddd; border: 1px solid #dddddd;
border-radius: 3rpx; border-radius: 3rpx;
padding-left: 28rpx;
box-sizing: border-box;
} }
.footer { .footer {
@ -133,6 +142,7 @@ button::after {
background: #ffffff; background: #ffffff;
box-shadow: 0rpx -3rpx 7rpx 1rpx rgba(173, 191, 207, 0.21); box-shadow: 0rpx -3rpx 7rpx 1rpx rgba(173, 191, 207, 0.21);
padding-bottom: env(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom);
box-sizing: border-box;
} }
.btn { .btn {
@ -144,9 +154,13 @@ button::after {
line-height: 90rpx; line-height: 90rpx;
text-align: center; text-align: center;
margin: 21rpx 49rpx 42rpx 30rpx; margin: 21rpx 49rpx 42rpx 30rpx;
font-family: PingFang SC;
} }
.text { .text {
display: flex;
align-items: center;
font-family: PingFang SC;
font-size: 32rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
color: #000; color: #000;

@ -38,9 +38,10 @@ class UserInfo extends Component<any, any> {
super(props); super(props);
this.state = { this.state = {
name: "用户信息", name: "用户信息",
style: "font-size: 26rpx; font-weight: 500; color: #ccc", style: "font-size: 26rpx; font-weight: 400; color: #ccc",
userInfo: { userInfo: {
...this.props.userInfo, ...this.props.userInfo,
birthday: "",
}, },
isShowIntegralText: false, isShowIntegralText: false,
cityShow: false, cityShow: false,
@ -79,7 +80,7 @@ class UserInfo extends Component<any, any> {
// maxDate: new Date().getTime(), // maxDate: new Date().getTime(),
// minDate: new Date("1949-10-01").getTime(), // minDate: new Date("1949-10-01").getTime(),
minDate: new Date("1949-10-01").getTime(), minDate: new Date("1949-10-01").getTime(),
birthday: dayjs(this.props.userInfo.birthday).valueOf(),
isSubmit: false, // 是否允许提交 isSubmit: false, // 是否允许提交
}; };
} }
@ -172,7 +173,8 @@ class UserInfo extends Component<any, any> {
this.setState({ isShowIntegralText: true }); this.setState({ isShowIntegralText: true });
} else { } else {
msg("更新成功"); msg("更新成功");
this.goUser(); // this.goUser();
this.onSkip();
} }
} }
} else { } else {
@ -206,7 +208,8 @@ class UserInfo extends Component<any, any> {
this.setState({ isShowIntegralText: true }); this.setState({ isShowIntegralText: true });
} else { } else {
msg("更新成功"); msg("更新成功");
this.goUser(); // this.goUser();
this.onSkip();
} }
} }
} }
@ -260,8 +263,14 @@ class UserInfo extends Component<any, any> {
}; };
onSkip = () => { onSkip = () => {
// go("/pages/instrument/instrument"); let isInstrumentJump = Taro.getStorageSync("isInstrumentJump");
this.goUser(); if (isInstrumentJump === "true") {
go("/pages/instrument/instrument");
} else {
Taro.reLaunch({
url: "/pages/user/user",
});
}
}; };
pickerChange = (event) => { pickerChange = (event) => {
@ -374,7 +383,8 @@ class UserInfo extends Component<any, any> {
closeIntegralText = () => { closeIntegralText = () => {
this.setState({ isShowIntegralText: false }); this.setState({ isShowIntegralText: false });
setTimeout(() => { setTimeout(() => {
this.goUser(); // this.goUser();
this.onSkip();
}, 600); }, 600);
}; };
@ -393,6 +403,7 @@ class UserInfo extends Component<any, any> {
minDate, minDate,
isSubmit, isSubmit,
isShowIntegralText, isShowIntegralText,
birthday,
} = this.state; } = this.state;
const formatter = (type, value) => { const formatter = (type, value) => {
if (type === "year") { if (type === "year") {
@ -404,8 +415,6 @@ class UserInfo extends Component<any, any> {
return `${value}`; return `${value}`;
}; };
let birthday = dayjs(userInfo.birthday).valueOf();
return ( return (
<Block> <Block>
<PopupAlert <PopupAlert
@ -509,7 +518,12 @@ class UserInfo extends Component<any, any> {
)} )}
<View className="text" onClick={this.onSkip}> <View className="text" onClick={this.onSkip}>
<Text style="margin-right: 6rpx;"></Text>
<Image
src={require("../../img/right.png")}
style="width: 30rpx;height:30rpx"
mode="aspectFit"
/>
</View> </View>
</View> </View>

@ -1,181 +0,0 @@
page {
background: #f8f8f8;
}
image {
width: 100%;
height: 100%;
}
.infobox1 {
margin: 30rpx;
border-radius: 30rpx;
/*box-shadow: 0px 1px 8px #E5E5E5;*/
display: flex;
align-items: center;
padding: 20rpx 34rpx;
background: #fff;
}
/* 去掉背景色和内外边距 */
button {
margin: 0;
padding: 0;
background-color: inherit;
position: static;
}
button:after {
content: none;
}
/* 去掉边框 */
button::after {
border: none;
}
.infobox1 .avatar_box {
width: max-content;
}
.infobox1 .avatar_box .headimg {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
}
.nickname {
margin-left: 32rpx;
font-size: 28rpx;
font-weight: bold;
color: #000000;
}
.infobox2 {
margin: 30rpx;
border-radius: 30rpx;
/*box-shadow: 0px 1px 8px #E5E5E5;*/
background: #fff;
}
.infobox2 > .title {
padding: 39rpx 34rpx 62rpx;
font-size: 32rpx;
font-weight: bold;
color: #000000;
line-height: 1;
}
.infobox2 > .block_list {
display: flex;
align-items: center;
padding: 0 34rpx 60rpx;
font-size: 28rpx;
color: #000000;
font-weight: 500;
}
.infobox2 > .block_list > .label {
/*color: #3D3E3E;*/
}
.infobox2 > .block_list > .label > text {
color: #eb5858;
margin-left: 6rpx;
}
.infobox2 > .block_list > .value {
margin-left: 45rpx;
/*color: #666666;*/
position: relative;
}
.infobox2 > .block_list > .getmobile {
background: #d3bc8d;
font-size: 24rpx;
color: #fff;
padding: 14rpx 28rpx;
border-radius: 30rpx;
margin-left: 50rpx;
position: relative;
}
.infobox2 > .block_list > .getmobile > .mobilebtn {
position: absolute;
width: 100%;
top: 0;
bottom: 0;
left: 0;
z-index: 99;
opacity: 0;
}
.infobox3 {
margin: 30rpx;
border-radius: 30rpx;
/*box-shadow: 0px 1px 8px #E5E5E5;*/
background: #fff;
}
.infobox3 > .title {
padding: 39rpx 33rpx 62rpx;
font-size: 32rpx;
font-weight: bold;
color: #000000;
line-height: 1;
}
.infobox3 > .block_list {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 30rpx 35rpx;
font-size: 28rpx;
}
.infobox3 > .block_list > .label {
color: #030000;
}
.infobox3 > .block_list > .label > text {
color: #eb5858;
margin-left: 6rpx;
}
.infobox3 > .block_list > .value {
color: #000000;
display: flex;
align-items: center;
position: relative;
}
.infobox3 > .block_list > .value > .picker {
position: absolute;
width: 100%;
top: 0;
bottom: 0;
left: 0;
z-index: 99;
opacity: 0;
}
.infobox3 > .block_list > .value > .input input {
text-align: right;
}
.infobox3 > .block_list > .value > .righticon {
width: 10rpx;
height: 20rpx;
margin-left: 22rpx;
}
.submitbtn {
position: absolute;
bottom: 100rpx;
width: 400rpx;
left: 50%;
margin-left: -200rpx;
}
.btn_box {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 153rpx;
background: #ffffff;
box-shadow: 0rpx -3rpx 7rpx 1rpx rgba(173, 191, 207, 0.21);
padding-bottom: 21rpx;
}
.btn_box .btn {
width: 690rpx;
height: 90rpx;
line-height: 90rpx;
background: #000000;
border-radius: 45rpx;
text-align: center;
font-size: 32rpx;
font-weight: bold;
color: #ffffff;
}
.btn_box .btn-disable {
background-color: #ccc !important;
/* 设置按钮背景颜色为灰色 */
color: #fff !important;
/* 设置按钮文字颜色为白色 */
border-color: #ccc !important;
/* 设置按钮边框颜色为灰色 */
}

@ -5,15 +5,6 @@ image {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.infobox1 {
margin: 30rpx;
border-radius: 30rpx;
/*box-shadow: 0px 1px 8px #E5E5E5;*/
display: flex;
align-items: center;
padding: 20rpx 34rpx;
background: #fff;
}
/* 去掉背景色和内外边距 */ /* 去掉背景色和内外边距 */
button { button {
margin: 0; margin: 0;
@ -28,55 +19,76 @@ button:after {
button::after { button::after {
border: none; border: none;
} }
.infobox1 .avatar_box {
.user-info-detail {
margin: 33rpx 34rpx;
.infobox1 {
width: 690rpx;
height: 140rpx;
border-radius: 30rpx;
display: flex;
align-items: center;
// padding: 20rpx 34rpx;
background: #fff;
box-sizing: border-box;
.avatar_box {
width: 100rpx; width: 100rpx;
} height: 100rpx;
.infobox1 .avatar_box .headimg { margin-left: 34rpx;
margin-right: 32rpx;
.headimg {
width: 100rpx; width: 100rpx;
height: 100rpx; height: 100rpx;
border-radius: 50%; border-radius: 50%;
} }
}
.nickname { .nickname {
margin-left: 32rpx; width: 400rpx;
font-size: 28rpx; font-size: 28rpx;
font-weight: bold; font-weight: bold;
color: #000000; color: #000000;
} }
}
.infobox2 { .infobox2 {
margin: 30rpx; width: 690rpx;
height: 220rpx;
margin-top: 20rpx;
border-radius: 30rpx; border-radius: 30rpx;
/*box-shadow: 0px 1px 8px #E5E5E5;*/ /*box-shadow: 0px 1px 8px #E5E5E5;*/
background: #fff; background: #fff;
} box-sizing: border-box;
.infobox2 > .title { .title {
padding: 39rpx 34rpx 62rpx; padding: 39rpx 34rpx 62rpx;
line-height: 1;
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC;
font-weight: bold; font-weight: bold;
color: #000000;
line-height: 1;
} }
.infobox2 > .block_list { .block_list {
display: flex; display: flex;
align-items: center; align-items: center;
padding: 0 34rpx 60rpx; padding: 0 34rpx 60rpx;
font-size: 28rpx; font-size: 28rpx;
color: #000000; color: #000000;
font-weight: 500; font-weight: 400;
} font-family: PingFang SC;
.infobox2 > .block_list > .label { .label {
/*color: #3D3E3E;*/ /*color: #3D3E3E;*/
} text {
.infobox2 > .block_list > .label > text {
color: #eb5858; color: #eb5858;
margin-left: 6rpx; margin-left: 6rpx;
} }
.infobox2 > .block_list > .value { }
.value {
margin-left: 45rpx; margin-left: 45rpx;
/*color: #666666;*/
position: relative; position: relative;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: #000000;
} }
.infobox2 > .block_list > .getmobile { .getmobile {
background: #d3bc8d; background: #d3bc8d;
font-size: 24rpx; font-size: 24rpx;
color: #fff; color: #fff;
@ -84,8 +96,7 @@ button::after {
border-radius: 30rpx; border-radius: 30rpx;
margin-left: 50rpx; margin-left: 50rpx;
position: relative; position: relative;
} .mobilebtn {
.infobox2 > .block_list > .getmobile > .mobilebtn {
position: absolute; position: absolute;
width: 100%; width: 100%;
top: 0; top: 0;
@ -94,41 +105,48 @@ button::after {
z-index: 99; z-index: 99;
opacity: 0; opacity: 0;
} }
}
}
}
.infobox3 { .infobox3 {
margin: 30rpx; width: 690rpx;
height: 300rpx;
margin-top: 20rpx;
border-radius: 30rpx; border-radius: 30rpx;
/*box-shadow: 0px 1px 8px #E5E5E5;*/ /*box-shadow: 0px 1px 8px #E5E5E5;*/
background: #fff; background: #fff;
} box-sizing: border-box;
.infobox3 > .title { .title {
padding: 39rpx 33rpx 62rpx; padding: 39rpx 33rpx 62rpx;
font-size: 32rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
color: #000000; color: #000000;
line-height: 1; line-height: 1;
} }
.infobox3 > .block_list { .block_list {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
padding: 0 30rpx 35rpx; padding: 0 30rpx 35rpx;
font-size: 28rpx; font-size: 28rpx;
} font-family: PingFang SC;
.infobox3 > .block_list > .label { font-weight: 400;
.label {
color: #030000; color: #030000;
} }
.infobox3 > .block_list > .label > text { .label > text {
color: #eb5858; color: #eb5858;
margin-left: 6rpx; margin-left: 6rpx;
} }
.infobox3 > .block_list > .value { .value {
color: #000000; font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
display: flex; display: flex;
align-items: center; align-items: center;
position: relative; position: relative;
} .picker {
.infobox3 > .block_list > .value > .picker {
position: absolute; position: absolute;
width: 100%; width: 100%;
top: 0; top: 0;
@ -137,15 +155,18 @@ button::after {
z-index: 99; z-index: 99;
opacity: 0; opacity: 0;
} }
.input input {
.infobox3 > .block_list > .value > .input input {
text-align: right; text-align: right;
} }
.infobox3 > .block_list > .value > .righticon { .righticon {
width: 10rpx; width: 10rpx;
height: 20rpx; height: 20rpx;
margin-left: 22rpx; margin-left: 22rpx;
} }
}
}
}
}
.submitbtn { .submitbtn {
position: absolute; position: absolute;
@ -158,14 +179,20 @@ button::after {
.btn_box { .btn_box {
position: fixed; position: fixed;
bottom: 0; bottom: 0;
left: 0; // left: 0;
z-index: 99;
display: flex;
// align-items: baseline;
width: 100%; width: 100%;
height: 153rpx; height: 153rpx;
background: #ffffff; background: #ffffff;
box-shadow: 0rpx -3rpx 7rpx 1rpx rgba(173, 191, 207, 0.21); box-shadow: 0rpx -3rpx 7rpx 1rpx rgba(173, 191, 207, 0.21);
padding-bottom: 21rpx; // padding-bottom: 21rpx;
padding-bottom: env(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom);
// padding-bottom: env(safe-area-inset-bottom);
box-sizing: border-box;
.btn { .btn {
margin-top: 21rpx;
width: 690rpx; width: 690rpx;
height: 90rpx; height: 90rpx;
line-height: 90rpx; line-height: 90rpx;

@ -40,7 +40,7 @@ class UserInfoDetail extends Component<any, any> {
this.state = { this.state = {
name: "用户信息", name: "用户信息",
style: "font-size: 26rpx; font-weight: 500; color: #ccc", style: "font-size: 26rpx; font-weight: 400; color: #ccc",
userInfo: { userInfo: {
...this.props.userInfo, ...this.props.userInfo,
}, },
@ -424,9 +424,11 @@ class UserInfoDetail extends Component<any, any> {
close={this.closeIntegralText} close={this.closeIntegralText}
confirm={this.closeIntegralText} confirm={this.closeIntegralText}
/> />
<View className="user-info-detail">
<View className="infobox1"> <View className="infobox1">
<View className="avatar_box">
<Button <Button
className="avatar_box" style="width: 100rpx;height:100rpx;"
open-type="chooseAvatar" open-type="chooseAvatar"
onChooseAvatar={this.getChooseAvatar} onChooseAvatar={this.getChooseAvatar}
hover-className="none" hover-className="none"
@ -440,6 +442,7 @@ class UserInfoDetail extends Component<any, any> {
></Image> ></Image>
)} )}
</Button> </Button>
</View>
<Input <Input
type="nickname" type="nickname"
className="ipt nickname" className="ipt nickname"
@ -498,11 +501,9 @@ class UserInfoDetail extends Component<any, any> {
</View> </View>
</View> </View>
</View> </View>
</View>
<View className="btn_box flex aitems jcenter"> <View className="btn_box flex jcenter">
{/* <View className="btn" onClick={this.onSubmit}>
</View> */}
{isSubmit ? ( {isSubmit ? (
<View className="btn" onClick={this.onSubmit}> <View className="btn" onClick={this.onSubmit}>

@ -16,6 +16,20 @@ export const WCUserLogin = (data) => {
method: "POST", method: "POST",
}); });
}; };
export const MpSplashDetail = (data) => {
return Ajax({
// url: "/api/MpSplashDetail",
url: "/hzwx/firing/list" + paramsToUrlQueryString(data),
method: "get",
});
};
export const getUserAgreement = (data) => {
//用户协议获取
return Ajax({
url: "/hzwx/setting/getUserAgreement",
data,
});
};
export const GetAboutUs = (data) => { export const GetAboutUs = (data) => {
//获取用户信息接口 //获取用户信息接口
return Ajax({ return Ajax({
@ -214,682 +228,86 @@ export const GetSiteAddTag = (data) => {
}); });
}; };
/////////// // 仪器管理
/////////// export const InstrumentInfo = {
// serial 序列号
export const UserInfoUp = (data) => { getInstrumentInfoBySerial: (data) => {
//注册保存用户信息 // 根据序列号获取仪器信息
return Ajax({
url: "/Api/UserInfoUp",
data,
method: "POST",
});
};
export const UpUserNick = (data) => {
//头像昵称保存
return Ajax({
url: "/Api/UpUserNick",
data,
method: "POST",
});
};
export const regionList = (data) => {
//省市区列表获取
return Ajax({
url: "/Api/RegionList",
data,
});
};
export const InstrumentList = (data) => {
//设备列表
return Ajax({
url: "/Api/InstrumentList",
data,
});
};
export const InstrumentBindingList = (data) => {
//设备绑定记录
return Ajax({
url: "/PortApi/InstrumentBindingList",
data,
});
};
export const getUserAgreement = (data) => {
//用户协议获取
return Ajax({
url: "/hzwx/setting/getUserAgreement",
data,
});
};
export const PlatformInfo = (data) => {
//平台参数获取
return Ajax({
url: "/Api/PlatformInfo",
data,
});
};
export const BuyPropertyList = (data) => {
//购买渠道列表
return Ajax({
url: "/Api/BuyPropertyList",
data,
});
};
export const InstrumentInfo = (data) => {
//设备详情
return Ajax({
url: "/Api/InstrumentInfo",
data,
});
};
export const UserInstrumentInfo = (data) => {
//设备详情
return Ajax({
url: "/Api/UserInstrumentInfo",
data,
});
};
export const ActiveList = (data) => {
//活动列表
return Ajax({
url: "/Api/ActiveListOneLineUpIot",
data,
});
};
export const ActiveUserList = (data) => {
//获取用户自己参与活动列表
return Ajax({
url: "/Api/ActiveUserListsIot",
data,
});
};
export const ActiveUserQualificationList = (data) => {
//获取用户自己参与活动列表
return Ajax({
url: "/Api/ActiveUserQualificationList",
data,
});
};
export const UserActivityList = (data) => {
//用户活动详情
return Ajax({
url: "/api/UserActivityList",
data,
});
};
export const ActiveInfo = (data) => {
//活动详情
return Ajax({
url: "/Api/ActiveInfoUserIot",
data,
});
};
export const ActiveInfonoroot = (data) => {
//活动详情
return Ajax({
url: "/Api/ActiveInfoUserFailIot",
data,
});
};
export const InstrumentBindingAdd = (data) => {
//设备绑定
return Ajax({
url: "/Api/InstrumentBindingAdd",
data,
method: "post",
});
};
export const InstrumentBindingChangeSerial = (data) => {
//设备换绑
return Ajax({
url: "/Api/InstrumentBindingChangeSerial",
data,
method: "post",
});
};
export const PunchingCardOnLineAdd = (data) => {
//线上活动参与
return Ajax({
url: "/Api/PunchingCardOnLineAdd",
data,
method: "post",
});
};
export const Uploads = (filePath) => {
//上传图片
return AjaxUploadFile({
url: "/Uploads",
filePath,
method: "post",
});
};
export const UploadVoide = (filePath) => {
//上传视频
return AjaxUploadFile({
url: "/UploadVoide",
filePath,
method: "post",
});
};
export const PunchingCardAdd = (data) => {
//参与打卡
return Ajax({
url: "/Api/PunchingCardAddInfoIOT",
data,
method: "post",
});
};
export const UserNursingLogAdd = (data) => {
//参与打卡
return Ajax({
url: "/Api/UserNursingLogAdd",
data,
method: "post",
});
};
export const PunchingCardList = (data) => {
//打卡记录
return Ajax({
url: "/Api/PunchingCardListnew",
data,
});
};
export const PunchingCardListIOT = (data) => {
//打卡记录
return Ajax({
url: "/Api/PunchingCardListIOT",
data,
});
};
export const PunchingCardActivList = (data) => {
//参与记录
return Ajax({
url: "/Api/PunchingCardActivList",
data,
});
};
export const Ranking = (data) => {
//打卡排行榜
return Ajax({
url: "/Api/Ranking",
data,
});
};
export const MessageList = (data) => {
//消息列表
return Ajax({
url: "/Api/MessageList",
data,
});
};
export const ReadMessage = (data) => {
//消息已读
return Ajax({
url: "/Api/ReadMessage",
data,
method: "post",
});
};
export const PopupUser = (data) => {
//首页弹窗
return Ajax({
url: "/Api/PopupUser",
data,
});
};
export const PunchingCardMassgeWindowsIot = (data) => {
//参与活动打卡状态获取
return Ajax({
url: "/Api/PunchingCardMassgeWindowsIot",
data,
});
};
export const MassgeWindowsOne = (data) => {
//参与
return Ajax({
url: "/Api/PunchingCardMassgeWindowsOne",
data,
});
};
export const DayActivityPunching = (data) => {
//查询设备今日是否已打卡
return Ajax({
url: "/Api/DayActivityPunchingsIot",
data,
});
};
export const ActiveWindows = (data) => {
//活动参与由今日开始打卡
return Ajax({
url: "/Api/ActiveWindowsParticipate",
data,
});
};
export const ActiveWindowsParticipate = (data) => {
//活动参与由今日开始打卡
return Ajax({
url: "/Api/ActiveWindowsParticipateIot",
data,
});
};
export const WindowsUser = (data) => {
//查看是否能弹窗
return Ajax({
url: "/Api/WindowsUser",
data,
});
};
export const OnWindowClick = (data) => {
//用户点击获得弹窗
return Ajax({
url: "/Api/OnWindowClick",
data,
});
};
export const CreationAgreement = (data) => {
//共创规则
return Ajax({
url: "/Api/CreationAgreement",
data,
});
};
export const Activejoin = (data) => {
//判断活动参与权限
return Ajax({ return Ajax({
url: "/Api/Activejoin", url:
data, "/instrument/getInstrumentInfoBySerial" + paramsToUrlQueryString(data),
});
};
export const BannerList = (data) => {
//banner列表
return Ajax({
url: "/Api/BannerList",
data,
});
};
export const FeedbackAdd = (data) => {
//添加反馈
return Ajax({
url: "/Api/FeedbackAdd",
data,
method: "post",
});
};
export const FeedbackList = (data) => {
//获取用户反馈列表
return Ajax({
url: "/Api/FeedbackList",
data,
});
};
export const GetActiveLately = (data) => {
//获取设备最近一个参与活动
return Ajax({
url: "/Api/GetActiveLately",
data,
});
};
export const GetActiveInfo = (data) => {
//获取活动的所有状态
return Ajax({
url: "/Api/GetActiveInfo",
data,
});
};
// export const ActiveWindowsSojump = (data)=>{ //参与活动
// return Ajax({
// url:'/Api/ActiveWindowsSojump',
// data,
// })
// }
export const ActiveWindowsSojump = (data) => {
//参与活动
return Ajax({
url: "/Api/ActiveWindowsSojumpIot",
data,
});
};
export const TheSameQuestionnaire = (data) => {
//查询是否同一张问卷 如果有答题过则不再答题
return Ajax({
url: "/Api/TheSameQuestionnaire",
data,
});
};
export const CreateActiveCount = (data) => {
//统计
return Ajax({
url: "/Api/CreateActiveCount",
data,
});
};
export const NoticeList = (data) => {
//公告列表
return Ajax({
url: "/Api/NoticeList",
data,
});
};
export const NoticeInfo = (data) => {
//公告详情
return Ajax({
url: "/Api/NoticeInfo",
data,
});
};
export const UserLogList = (data) => {
//积分
return Ajax({
url: "/Api/UserLogList",
data,
});
};
export const AgreementRules = (data) => {
//关于我们
return Ajax({
url: "/Api/AgreementRule",
data,
});
};
export const ReadFileInstrument = (data) => {
//获取iot升级文件
return Ajax({
url: "/Api/ReadFileInstrument",
data,
});
};
export const IotBannerInfoUser = (data) => {
//获取报告的图片封面
return Ajax({
url: "/Api/IotBannerInfoUser",
data,
});
};
export const NursingRecord = (data) => {
//护理报告
return Ajax({
url: "/Api/NursingRecord",
data,
});
};
export const UpstatusPermission = (data) => {
//修改提示时间
return Ajax({
url: "/Api/UpstatusPermission",
data,
method: "post",
});
};
export const MessageHint = (data) => {
//设置提醒
return Ajax({
url: "/Api/MessageHint",
data,
method: "post",
});
};
export const MessageHintCancel = (data) => {
//取消提醒
return Ajax({
url: "/Api/MessageHintCancel",
data,
method: "post",
});
};
export const OfficialAppid = (data) => {
//判断是否关注过公众号
return Ajax({
url: "/Api/OfficialAppid",
data,
});
};
export const DayActivityPunchingsDay = (data) => {
//查询今日是否有打卡 如果打了则有数据没有 则返回空数组
return Ajax({
url: "/Api/DayActivityPunchingsDay",
data,
});
};
export const MessageHintFind = (data) => {
//判断某天是否提示
return Ajax({
url: "/Api/MessageHintFind",
data,
});
};
export const IOTHistorySynchronization = (data) => {
//
return Ajax({
url: "/Api/IOTHistorySynchronization",
data,
method: "post",
});
};
export const IsClickObject = (data) => {
//
return Ajax({
url: "/Api/IsClickObject",
data,
method: "post",
});
};
export const Collagen = (data) => {
//
return Ajax({
url: "/api/Collagen",
data,
method: "post",
});
};
export const CreditSubscribe = (data) => {
//
return Ajax({
url: "/api/CreditSubscribe",
data, data,
method: "get", method: "get",
}); });
}; },
binding: (data) => {
export const CreditSubscribeInfo = (data) => { // 绑定仪器
//
return Ajax({
url: "/api/CreditSubscribeInfo",
data,
method: "post",
});
};
export const SubscribeActivityUser = (data) => {
//
return Ajax({ return Ajax({
url: "/api/SubscribeActivityUser", url: "/instrument/binding" + paramsToUrlQueryString(data),
data, data,
method: "get", method: "get",
}); });
}; },
exchangeBinding: (data) => {
export const SubscribeActivityUserAdd = (data) => { // 更换绑定仪器
//
return Ajax({
url: "/api/SubscribeActivityUserAdd",
data,
method: "post",
});
};
export const getReportData = (data) => {
return Ajax({ return Ajax({
url: "/api/Report", url: "/instrument/exchangeBinding" + paramsToUrlQueryString(data),
data, data,
method: "get", method: "get",
}); });
}; },
bindingInstrumentList: (data) => {
export const getNursingList = (data) => { // 获取当前用户:已绑定仪器列表
return Ajax({ return Ajax({
url: "/api/NursingList", url: "/instrument/bindingInstrumentList" + paramsToUrlQueryString(data),
data, data,
method: "get", method: "get",
}); });
}; },
unbindingInstrumentInfoList: (data) => {
export const MpSplashDetail = (data) => { // 获取当前用户:未绑定仪器列表
return Ajax({
// url: "/api/MpSplashDetail",
url: "/hzwx/firing/list" + paramsToUrlQueryString(data),
method: "get",
});
};
export const MpLoginDetail = () => {
return Ajax({
url: "/api/MpLoginDetail",
method: "get",
});
};
//护理历程数据
export const NursingData = (data) => {
return Ajax({ return Ajax({
url: "/api/NursingData", url:
"/instrument/unbindingInstrumentInfoList" +
paramsToUrlQueryString(data),
data, data,
method: "get", method: "get",
}); });
}; },
manualCodeBinding: (data) => {
//护理记录 // 用户手动绑定仪器
export const NursingList = (data) => {
return Ajax({ return Ajax({
url: "/api/NursingList", url: "/instrument/manualCodeBinding",
data, data,
method: "get", method: "post",
}); });
}; },
instructionInfo: (data) => {
// 打卡记录 // 根据仪器ID获取仪器介绍信息 instrumentId
export const ClockInList = (data) => {
return Ajax({ return Ajax({
url: "/api/ClockInList", url: "/instrument/instructionInfo" + paramsToUrlQueryString(data),
data, data,
method: "get", method: "get",
}); });
}; },
firstNurseInfo: (data) => {
// 打卡详情列表 // 根据仪器ID获取仪器的初次护理信息
export const ClockInDetailList = (data) => {
return Ajax({
url: "/api/ClockInDetailList",
data,
});
};
export const getClockInData = (data) => {
return Ajax({
url: "/Api/ClockInData",
data,
});
};
export const MyNursing = (data) => {
//用户活动详情
return Ajax({
url: "/api/MyNursing",
data,
});
};
export const InstrumentCodeCheck = (data) => {
//仪器扫码查询
return Ajax({
url: "/api/InstrumentCodeCheck",
data,
});
};
export const MElectricSetting = (data) => {
//获取设备配置数据
return Ajax({
url: "/Api/MElectricSetting",
data,
});
};
export const SystemSet = (data) => {
//获取设备配置数据
return Ajax({ return Ajax({
url: "/Api/SystemSet", url: "/instrument/firstNurseInfo" + paramsToUrlQueryString(data),
data, data,
method: "get",
}); });
}; },
modeInfo: (data) => {
export const getSceneList = (data) => { // 根据仪器ID获取仪器模式
//获取场景列表
return Ajax({ return Ajax({
url: "/Api/sceneList", url: "/instrument/modeInfo" + paramsToUrlQueryString(data),
data, data,
method: "get", method: "get",
}); });
},
}; };
//localhost:9204/instrument/getInstrumentInfoBySerial
///////////
///////////

@ -156,7 +156,6 @@ const jupmFun = (type, data) => {
}); });
break; break;
case 5: // 跳转视频号 case 5: // 跳转视频号
// Taro.getChannelsLiveInfo();
Taro.openChannelsActivity({ Taro.openChannelsActivity({
finderUserName: data.videoNo, finderUserName: data.videoNo,
// feedId: data.feedId, // feedId: data.feedId,
@ -171,17 +170,38 @@ const jupmFun = (type, data) => {
}); });
break; break;
case 6: // 跳转视频号直播间 case 6: // 跳转视频号直播间
Taro.getChannelsLiveInfo({
finderUserName: data.videoNo,
success: (res) => {
// 打开成功
console.log("获取直播间信息success", res);
if (res.status === 3) {
Taro.showToast({
title: "直播已结束",
mask: true,
icon: icon || "none",
duration: 2000,
});
return;
}
Taro.openChannelsLive({ Taro.openChannelsLive({
finderUserName: data.videoNo, finderUserName: data.videoNo,
feedId: data.feedId, feedId: res.feedId,
success: (res) => { success: (res) => {
// 打开成功 // 打开成功
console.log("视频号直播间success", res); console.log("打开直播间success", res);
},
fail: (res) => {
console.log("打开直播间fail", res);
},
});
}, },
fail: (res) => { fail: (res) => {
console.log("视频号直播间fail", res); console.log("获取直播间信息fail", res);
}, },
}); });
break; break;
} }
} catch (error) { } catch (error) {
@ -259,3 +279,51 @@ export const requestPayment = (data) => {
}); });
}); });
}; };
// 存
const originSetStorageSync = Taro.setStorageSync;
export const setStorageSync = function (key, data, expires) {
// 如果没有传第三个有效期参数,就还是用原来的方法
if (!expires) return originSetStorageSync(key, data);
const reg = /\d{4}\/\d{1,12}\/\d{1,31}/; // 用来验证绝对时间格式`yyyy/MM/dd`或者`yyyy/MM/dd hh:mm:ss`
if (reg.test(expires)) {
// 绝对日期
const timestamp = new Date(expires + "").getTime();
if (isNaN(timestamp)) {
console.error(
expires +
" error 请传入正确的日期格式yyyy/MM/dd 或者 yyyy/MM/dd hh:mm:ss"
);
return originSetStorageSync(key, data);
}
originSetStorageSync(key, { data, expires: timestamp });
} else {
// 相对日期
if (typeof expires !== "number") {
console.error("expires is not a number");
return originSetStorageSync(key, data);
}
originSetStorageSync(key, { data, expires: +new Date() + expires });
}
};
// 取
const originGetStorageSymc = Taro.getStorageSync;
export const getStorageSync = function (key) {
const data = originGetStorageSymc(key);
// 如果data不是个对象就说明是没加有效期的直接返回
if (typeof data !== "object" || (typeof data === "object" && !data.expires))
return data;
const now = +new Date();
if (now < data.expires) {
//用当前时间和存储的时间对比
return data.data; // 未过期返回data
} else {
// 已过期,移除缓存,返回空
Taro.removeStorageSync(key);
return "";
}
};

Loading…
Cancel
Save