From bf179ffb7c678286424b681922b64f34cacedce2 Mon Sep 17 00:00:00 2001 From: blak-kong <546598185@qq.com> Date: Thu, 25 Jan 2024 20:36:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E6=9C=9F=E8=BF=98=E5=8E=9F=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E7=A8=BF=EF=BC=8C=E5=83=8F=E7=B4=A0=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app.less | 43 +- src/app.tsx | 5 + src/components/calendar/body/isFolding.less | 53 +- src/components/calendar/controller/index.tsx | 31 +- src/components/navbar/navbar.less | 15 +- src/components/navbar/navbar.tsx | 26 +- src/components/popup/popup-alert.less | 8 +- src/components/popup/popup-alert.tsx | 18 +- src/components/popup/popup-binding.tsx | 4 +- src/components/popup/popup-confirm.tsx | 16 +- src/components/popup/popup-drawer.less | 4 +- src/components/popup/popup-drawer.tsx | 2 +- src/components/popup/popup-privacy.tsx | 2 +- src/components/popup/popup-site-swiper.tsx | 2 +- src/components/popup/popup.less | 34 +- src/custom-tab-bar/index.less | 16 +- src/custom-tab-bar/index.tsx | 3 +- src/img/left.png | Bin 0 -> 1090 bytes src/img/logo/logo-b.png | Bin 0 -> 6396 bytes src/img/logo/logo-w.png | Bin 0 -> 5843 bytes src/pages/about/about.less | 6 +- src/pages/about/about.tsx | 52 +- src/pages/activity/activity.tsx | 2 +- src/pages/consultant/consultant.less | 7 +- src/pages/consultant/consultant.tsx | 3 +- src/pages/detect/detect.tsx | 2 +- src/pages/entry/Animista.less | 12 + src/pages/entry/entry.less | 129 ++-- src/pages/entry/entry.tsx | 47 +- src/pages/index/componet/instrument.tsx | 0 src/pages/index/index.less | 38 +- src/pages/index/index.tsx | 152 +++- src/pages/initiate/initiate.less | 15 +- src/pages/initiate/initiate.tsx | 61 +- src/pages/instrument/instrument.less | 6 +- src/pages/instrument/instrument.tsx | 35 +- src/pages/integral_list/integral_list.less | 26 +- src/pages/integral_list/integral_list.tsx | 14 +- src/pages/message/message.less | 5 +- src/pages/message/message.tsx | 15 +- src/pages/recording/recording.less | 80 +- src/pages/recording/recording.tsx | 12 +- src/pages/register/register.less | 19 +- src/pages/shop/shop.tsx | 4 +- src/pages/user/user.less | 126 +-- src/pages/user/user.tsx | 13 +- src/pages/userInfo/userInfo.less | 34 +- src/pages/userInfo/userInfo.tsx | 34 +- src/pages/userInfoDetail/userInfoDetail.css | 181 ----- src/pages/userInfoDetail/userInfoDetail.less | 277 ++++--- src/pages/userInfoDetail/userInfoDetail.tsx | 137 ++-- src/utils/Interface.js | 772 +++---------------- src/utils/traoAPI.js | 78 +- 53 files changed, 1223 insertions(+), 1453 deletions(-) create mode 100644 src/img/left.png create mode 100644 src/img/logo/logo-b.png create mode 100644 src/img/logo/logo-w.png create mode 100644 src/pages/index/componet/instrument.tsx delete mode 100644 src/pages/userInfoDetail/userInfoDetail.css diff --git a/src/app.less b/src/app.less index 4a2871c..04593d8 100644 --- a/src/app.less +++ b/src/app.less @@ -140,7 +140,46 @@ page { } page { - fontfamily: -appleSystem, BlinkMacSystemFont, "Helvetica Neue", Helvetica, - Segoe UI, Arial, Roboto, "PingFang SC", "miui", "Hiragino Sans GB", + fontfamily: "PingFang SC", -appleSystem, BlinkMacSystemFont, "Helvetica Neue", + Helvetica, Segoe UI, Arial, Roboto, "miui", "Hiragino Sans GB", "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; +} diff --git a/src/app.tsx b/src/app.tsx index 20a64a0..f5e6821 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -1,3 +1,4 @@ +import Taro from "@tarojs/taro"; import { Component, PropsWithChildren } from "react"; import "./app.less"; // // html4 @@ -31,6 +32,10 @@ class App extends Component { // go("/pages/userInfo/userInfo"); // 个人信息完善 // go("/pages/register/register"); // go("/pages/instrument/instrument"); + // go("/pages/userInfoDetail/userInfoDetail"); + // Taro.reLaunch({ + // url: "/pages/user/user", + // }); } onError(error) { diff --git a/src/components/calendar/body/isFolding.less b/src/components/calendar/body/isFolding.less index 49c38ab..fb9fa93 100644 --- a/src/components/calendar/body/isFolding.less +++ b/src/components/calendar/body/isFolding.less @@ -2,9 +2,27 @@ .at-calendar { // 仅缩放宽度,防止上下抖动 // transform: scale(0.9, 1); - width: 92%; + // width: 92%; + + padding: 0 36rpx; margin: 0 auto; 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 { // font-size: 26rpx; @@ -15,14 +33,23 @@ font-weight: 500; color: #666666; } -.at-calendar__list.flex .flex__item { + +// 覆盖组件原本样式 +.at-calendar .at-calendar__list.flex .flex__item { font-size: 24rpx !important; color: #333; font-weight: 400; + margin: 10rpx 0; } -.at-calendar__list.flex .flex__item--blur { - color: #ccc !important; +// 覆盖组件原本样式 +.at-calendar .at-calendar__list.flex .flex__item--blur { + color: #ccc; +} + +// 覆盖组件原本样式: 当月文字颜色 #333 +.at-calendar .at-calendar__list.flex .flex__item--now { + color: #333; } .at-calendar__list.flex .flex__item--today { @@ -52,22 +79,22 @@ display: block; content: ""; border-radius: 50%; - border: 6rpx solid transparent; + border: 4rpx solid transparent; background: linear-gradient(0deg, #fff0da, #ffe4c0) border-box; /* 2 */ -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0); /* 3 */ -webkit-mask-composite: xor; /* 4 */ mask-composite: exclude; position: absolute; - width: 72rpx; - height: 72rpx; + width: 60rpx; + height: 60rpx; box-sizing: border-box; } } } .at-calendar__list.flex .flex__item--incomplete { - color: #333 !important; + color: #333; font-weight: 400 !important; .flex__item-container { position: relative; @@ -75,15 +102,15 @@ display: block; content: ""; border-radius: 50%; - border: 6rpx solid transparent; + border: 4rpx solid transparent; background: #f2f2f2; -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0); /* 3 */ -webkit-mask-composite: xor; /* 4 */ mask-composite: exclude; position: absolute; - width: 72rpx; - height: 72rpx; + width: 60rpx; + height: 60rpx; box-sizing: border-box; } } @@ -133,11 +160,11 @@ .at-calendar-slider__main--swan { // 展开高度 .main__body { - height: 410rpx; + height: 400rpx; } // 折叠高度 .main__body.main__body--isFolding { - height: 70px; + height: 90px; } } /* 样式定制 */ diff --git a/src/components/calendar/controller/index.tsx b/src/components/calendar/controller/index.tsx index 86494c0..8b235dd 100644 --- a/src/components/calendar/controller/index.tsx +++ b/src/components/calendar/controller/index.tsx @@ -103,22 +103,25 @@ export default class AtCalendarController extends React.Component { onClick={this.props.onPreMonth.bind(this, isMinMonth)} /> )} - - {/* */} - {/* {dayjsDate.format(monthFormat)} */} - - {dayjsDate.format("YYYY.MM.DD")} - - - + + + {/* */} + {/* {dayjsDate.format(monthFormat)} */} + + {dayjsDate.format("YYYY.MM.DD")} + + + + + diff --git a/src/components/navbar/navbar.less b/src/components/navbar/navbar.less index d98613c..65729ac 100644 --- a/src/components/navbar/navbar.less +++ b/src/components/navbar/navbar.less @@ -25,7 +25,7 @@ justify-content: space-between; align-items: center; background: #fff; - padding-bottom: 10rpx; + // padding-bottom: 10rpx; z-index: 99; .logo { display: inline-flex; @@ -33,16 +33,27 @@ justify-content: center; width: 220rpx; font-size: 32rpx; + font-family: PingFang SC; font-weight: bold; + color: #000000; } .back { - width: 80rpx; + width: 100rpx; text-align: center; color: #666; font-size: 42rpx; display: flex; justify-content: center; } + .back-btn { + width: 40rpx; + height: 40rpx; + padding: 10rpx; + .back-img { + width: 100%; + height: 100%; + } + } } .nav_top_padding { diff --git a/src/components/navbar/navbar.tsx b/src/components/navbar/navbar.tsx index e22d07d..0c67069 100644 --- a/src/components/navbar/navbar.tsx +++ b/src/components/navbar/navbar.tsx @@ -60,7 +60,7 @@ export default class Navbar extends Component { } render() { - let { isBack, leftSlot, titleSlot, transparent } = this.props; + let { isBack, leftSlot, titleSlot, transparent, isWhite } = this.props; let { statusBarHeight, navigationBarHeight, navHeight } = this.state; const statusBarHeightRpx = statusBarHeight * 2; const navigationBarHeightRpx = navigationBarHeight * 2; @@ -79,18 +79,34 @@ export default class Navbar extends Component { {isBack && ( + > + + )} {leftSlot} {titleSlot ? ( titleSlot + ) : isWhite ? ( + ) : ( - + )} diff --git a/src/components/popup/popup-alert.less b/src/components/popup/popup-alert.less index ba5c75a..41101f1 100644 --- a/src/components/popup/popup-alert.less +++ b/src/components/popup/popup-alert.less @@ -15,23 +15,27 @@ margin-right: 30rpx; } .text { - color: #666; + font-family: PingFang SC; + font-size: 28rpx; + color: #999; } } .alert-popup-btns { display: flex; - margin-top: 76rpx; + margin-top: 60rpx; justify-content: center; .alert-popup-btn { width: 270rpx; height: 90rpx; line-height: 90rpx; font-size: 32rpx; + font-weight: 500; text-align: center; border: 1rpx solid #000; border-radius: 45rpx; color: #fff; background-color: #000; + font-family: PingFang SC; } } diff --git a/src/components/popup/popup-alert.tsx b/src/components/popup/popup-alert.tsx index 53642ac..b8deb7a 100644 --- a/src/components/popup/popup-alert.tsx +++ b/src/components/popup/popup-alert.tsx @@ -73,12 +73,14 @@ export default class PopupAlert extends Component { isShow, isClose, isLarge, + myClassName, type, } = this.props; return ( { onClick={this.onClose} > )} - - {title} + + {title && ( + + {title} + + )} { super(props); this.state = { name: "确认组件", - // isShowconfirmPopup: true, }; } @@ -74,10 +73,9 @@ export default class PopupBinding extends Component { confirmButtonText, isShow, isClose, - // isLarge, + isLarge, type = 0, } = this.props; - console.log("type", type); return ( diff --git a/src/components/popup/popup-confirm.tsx b/src/components/popup/popup-confirm.tsx index 77a74f4..47fc42e 100644 --- a/src/components/popup/popup-confirm.tsx +++ b/src/components/popup/popup-confirm.tsx @@ -91,8 +91,20 @@ export default class PopupConfirm extends Component { > )} - - {title} + + {title && ( + + {title} + + )} { > )} {title} diff --git a/src/components/popup/popup-privacy.tsx b/src/components/popup/popup-privacy.tsx index fdd41d6..6aa7be8 100644 --- a/src/components/popup/popup-privacy.tsx +++ b/src/components/popup/popup-privacy.tsx @@ -111,7 +111,7 @@ export default class PopupPrivacy extends Component { > )} - + 用户隐私保护提示 diff --git a/src/components/popup/popup-site-swiper.tsx b/src/components/popup/popup-site-swiper.tsx index c5e6a3e..b70fd7f 100644 --- a/src/components/popup/popup-site-swiper.tsx +++ b/src/components/popup/popup-site-swiper.tsx @@ -105,7 +105,7 @@ export default class PopupSiteSwiper extends Component { } render() { - let { confirmButtonText, isShow, siteData, type } = this.props; + let { confirmButtonText, isShow, siteData, type, isLarge } = this.props; let { current } = this.state; return ( diff --git a/src/components/popup/popup.less b/src/components/popup/popup.less index e0b7307..dc35707 100644 --- a/src/components/popup/popup.less +++ b/src/components/popup/popup.less @@ -2,33 +2,41 @@ @import "@antmjs/vantui/lib/transition/index.less"; @import "@antmjs/vantui/lib/overlay/index.less"; -.large { - width: 640rpx; -} -.middle { - width: 580rpx; -} - .common-box { - padding: 38rpx 30rpx; + width: 640rpx; + padding: 50rpx 35rpx 44rpx 35rpx; padding-bottom: 40rpx; box-sizing: border-box; .common-popup-title { font-size: 36rpx; - font-weight: 700; + font-family: PingFang SC; + font-weight: bold; + color: #030000; 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 { font-size: 28rpx; margin-bottom: 20rpx; - max-height: 700rpx; + max-height: 794rpx; overflow-y: auto; } diff --git a/src/custom-tab-bar/index.less b/src/custom-tab-bar/index.less index c354f68..8dedc34 100644 --- a/src/custom-tab-bar/index.less +++ b/src/custom-tab-bar/index.less @@ -3,13 +3,15 @@ bottom: 0; left: 0; right: 0; - height: 120px; + height: 153px; background: #fff; display: flex; 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); z-index: -1; + box-sizing: border-box; } // .tab-bar-border { @@ -21,19 +23,19 @@ // height: 1px; // transform: scaleY(0.5); // } - .tab-bar-item { + margin-top: 25rpx; flex: 1; text-align: center; display: flex; - justify-content: center; + // justify-content: center; align-items: center; flex-direction: column; } .tab-bar-item cover-image { - width: 54px; - height: 54px; + width: 54px !important; + height: 54px !important; } .tab-bar-item cover-view { @@ -45,7 +47,7 @@ bottom: 0; left: 0; right: 0; - height: 120px; + height: 153px; z-index: 1001; background-color: var(--overlay-background-color, rgba(0, 0, 0, 0.7)); // backdrop-filter: blur(7px); diff --git a/src/custom-tab-bar/index.tsx b/src/custom-tab-bar/index.tsx index d326ad4..8027fbd 100644 --- a/src/custom-tab-bar/index.tsx +++ b/src/custom-tab-bar/index.tsx @@ -114,7 +114,7 @@ export default class Index extends Component { /> */} - + {/* */} {list.map((item, index) => { return ( {item.text} diff --git a/src/img/left.png b/src/img/left.png new file mode 100644 index 0000000000000000000000000000000000000000..ab7982e8a92c02ccf3475214e99b040a7137814d GIT binary patch literal 1090 zcmeAS@N?(olHy`uVBq!ia0vp^CqS5k8A#4*i(3Pv7>k44ofy`glX(f`u%tWsIx;Y9 z?C1WI$O`0p1o(uw0%Ah4;HQEvPdn&UB7#UungCwro)3p^r=85sBugD~Uq{1qt-49p3hE{-7; zac}3IEPCW1;G(*5J=>X2|Ld(Jo=Z5FKh0EXyMASNx#q+3@U);;APA^>7Tt2a8)ra(q^WQz#-$+^NhL$nDUUyYLr0it-Gz9~zV^K{D z{@;8j#-qMg(V(mJj9Zj*f=TdIRUO&%&{(4h@Ak}Ixk@i`LCKlW(vwXkbLEp|y{GVr z#y$-87I+g<(mHjTLWb*c7uRryx8C<0jynQHLrYr2N*3t+YVTUN;i?eJ+7~xgz2MS_ zzunc>{_VK(inNZ4jb4xD-Im|)@N&hmx8~0@WF38KQ~OTcNtO)`S#8i$o@n(b;>(_k zLM**UI%Aa!7hN=*P%`I{g`jBnx85U*YLyF<)-Tdt@aV|Iu5}l>_(JAnlq^Wv(c86d zg4I9fWq%vHgne%_h^o(;u}f5Tg~i1qS5`=zJFGft$ReQ0I8-7Dx1Bmh%Q5=NY3}^F+@a znXRX!BWF|_JHydXn0bxHjkAjm@N~^Anzac?GNmbjm6_U-Dq?-=~6`fjl?e#^!@Y50^K$UE)K$VV-k-EtN31O$dJWoh2 zf1kKDf=zWTP*LC2Sw}z$%8o7Au;!X!m{EIaeR4Asx8m95j}v!SefHXxwd+~fTEDvmBm^YXeRR9J-~iL2{46%sZ^zm+cuy@bHsNY!n!RV|=ahhk{QrMb z|5r!vZ`eEc>w#zgCbZ{n;o7!&{ryu0$KLvBeX+j7y%afncz#;{VwZhUbqJTg?agjr P24wJb^>bP0l+XkKuUX%i literal 0 HcmV?d00001 diff --git a/src/img/logo/logo-b.png b/src/img/logo/logo-b.png new file mode 100644 index 0000000000000000000000000000000000000000..d2a1b2b9817f7379cee9b4673c8ddf6dd8d73249 GIT binary patch literal 6396 zcmaJ`XIN9)woQnD6a}P7FG`1ygwUlI=^!8-B|<170g@<9dJ_Qw=^#~#6e&utp$now zK#(2;DI&f1hv(jN@B8u2+duZ6YkgykIp$pR*V+*VdUvmpGm`@VfNPo>s)hgn5P2C3 zUnRMGH|H0XTz;6aYGzm?S9`1n0*wSH*||P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Wt*V?0VMF#>i_@% literal 0 HcmV?d00001 diff --git a/src/img/logo/logo-w.png b/src/img/logo/logo-w.png new file mode 100644 index 0000000000000000000000000000000000000000..92766fe1f62d2a3086654130cfd4438babd44b2c GIT binary patch literal 5843 zcmaJ_c|4T++n$K*8Iv{Z7;BcXjWM>E5o2dYs1(LnVhm&KNivj_Eo($gB~dcAXza>b zmN;P|*|KEGUbbGH-#O>^{_&po`Qv%+@BO*1>%Q*$d;j$$*jk%%bBJ&N003^Z8Ok02 zID$WnmDpGh-}O(Pl^lMA$tF%@4AGMu>PEr?j68_$cu6$D%?odjck>7j?8NH<0L-#J zSSPZRl_dg4B&fLk#;Al50uI>#fSzGkfE&&iPnLAYd-?e5gIDN{U`ZbjeXygJ71SyK ziTCy~iy+}K5!P5-gfC9V18is@sTYPg6d>TqZjxaHKmQ;^m_GPVUBqGhJFNXOmHIj!X!X9dJ=*<)CnX zvRjz4e~|Rw3MhOKj^q= z=h29t1y7w0McyHo%INy594i6ktM z==b*&ZM}(PVvsj6KoW`kJvF$byrYl52Qf5A;ZKg06$0%aM0WGX;n664@S%!|kBZ6kdC-3#(x_5R{|{JR&_zj9R%&8Ysq-2Zjif2R&N=y&+f z>K-2cS$@3#;l`5=R~vtmodE!VkZ6<VIWK zE(Lx374>M~Vq|aa*L%J_YVE#BIjOn1CB_ssU<-i3TVLWrkN3WH12F`=&$s>)L-k~- z1tqrqEY<8!K$)Iwm{p-xv0ugHC<>G;tK&w@Ut6!T zpmpMtq#~|)JC{ahQ^zpW7-JoNTSX(XbU%v9ZA_1rJ7=buUF4a@AhY%Zs5+=f3T#Q{ zp2c86QG73<6LR^C<}GiveyNB0xe4V72WYGT`#vUa?f|}D5j)3B^^a#@tZPgyT6;B3 zN}``9?>qhhkeGY&N6r+@K(6Op4ZgaH@kskI^ z7#?0sj|c6iD76;lU|f-{JScb0e1lS`&S-vu;!Mc*boiWZu6^D6NIzbs>lI|@gKKVa z`4UmoPU{BVf;U)hCuxo~RyHph_(F2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u=4*1*Ow>K}rjVl!nd8mf;v9 zd{^;IWINY1Q*~t-L{pInz*7Ge~066RWNZ8eZ#m@|U>mtq8@d_L0!%Dk=Ya_P|{u9x&yXjXDSWv#)?DAW@7?I-#1Z6Cy`XH}LjITU>p zXkC{vEr|}}_`0~>64Vo9d*FF|rLf?Aq-7^J{CXb9wYn=BmUC%t^2@7~qatPZN0fO* zD7U@GGJ?h3=f|AF%dNQZ=S#;sH*$6N^xw%1t)fEHN})Fh-DR`Z z&^<1kQxs)=-th+K8&?(IVk_v_=v&K0 zj7}+I9o!yHdE1UX=-|+us>vt4k|x)5(fdzTD(teo>HAy?W^ZiP+k<04uoqS;-Pb$8 zdOV*eMf@y!JWdXu%Pa-f$LN7O%`V0s_%tVSFRle>X5OMjKC()zv3d||@M<<}S>lb@ zkO!ThNhWe?&{dr|tj;tnTVAwPojrIafE$Q^5y@}SHgI&lmzxU1n_c^cg)kir@xMFU zZ9?es{`JZa(_`IyL98`VvE}&7wW44n%;oOriI-(TN=};n4g43q4EVeYMN3ztj49AK nMZfqOdl~KHp)t+BScCxWCM}|SoIc~fe>0;^tWl-LuGjwuwd0bo literal 0 HcmV?d00001 diff --git a/src/pages/about/about.less b/src/pages/about/about.less index a36bc1b..0558234 100644 --- a/src/pages/about/about.less +++ b/src/pages/about/about.less @@ -12,12 +12,12 @@ page { box-sizing: border-box; overflow: hidden; .cell { - border-bottom: 1px solid #f3f3f3; + // border-bottom: 1px solid #f3f3f3; background: #fff; padding: 20rpx 30rpx; font-size: 28rpx; font-family: PingFang SC; - font-weight: 500; + font-weight: 400; color: #000000; .label { color: #000000; @@ -31,7 +31,7 @@ page { // height: 26rpx; font-size: 28rpx; font-family: PingFang SC; - font-weight: 500; + font-weight: 400; color: #000000; // line-height: 60rpx; } diff --git a/src/pages/about/about.tsx b/src/pages/about/about.tsx index 4ba4bcf..a0da194 100644 --- a/src/pages/about/about.tsx +++ b/src/pages/about/about.tsx @@ -4,13 +4,18 @@ import { Block, View, Image, Text } from "@tarojs/components"; 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 "./about.less"; -export default class About extends Component { +class About extends Component { constructor(props) { super(props); this.state = { @@ -20,7 +25,7 @@ export default class About extends Component { } async onLoad() { - this.initData(); + this.GetOtherSetting(); } componentDidMount() {} @@ -35,14 +40,33 @@ export default class About extends Component { // if (res.data.code === 200) { // this.setState({ version: res.data.data.value }); // } - const accountInfo = Taro.getAccountInfoSync(); - let version = accountInfo?.miniProgram?.version - ? "当前版本V" + accountInfo?.miniProgram?.version - : "开发版"; - this.setState({ version: version }); + // 读取小程序版本 + // const accountInfo = Taro.getAccountInfoSync(); + // let version = accountInfo?.miniProgram?.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 = () => { go("/pages/userPolicy/userPolicy"); }; @@ -58,7 +82,7 @@ export default class About extends Component { - 版本管理 + 版本 {version} @@ -84,3 +108,13 @@ export default class About extends Component { ); } } + +const mapStateToProps = (state) => ({ + otherSetting: state.otherSetting, +}); +const mapDispatchToProps = (dispatch) => ({ + otherSettingRefresh(data) { + dispatch(otherSettingRefresh(data)); + }, +}); +export default connect(mapStateToProps, mapDispatchToProps)(About); diff --git a/src/pages/activity/activity.tsx b/src/pages/activity/activity.tsx index 5647e55..1e79580 100644 --- a/src/pages/activity/activity.tsx +++ b/src/pages/activity/activity.tsx @@ -1,4 +1,4 @@ -import { MpSplashDetail, WCUserLogin } from "../../utils/Interface"; +// import { MpSplashDetail, WCUserLogin } from "../../utils/Interface"; import { Component, PropsWithChildren, useEffect, useState } from "react"; import Taro from "@tarojs/taro"; // 引入 Swiper, SwiperItem 组件 diff --git a/src/pages/consultant/consultant.less b/src/pages/consultant/consultant.less index 7f2d796..cab3402 100644 --- a/src/pages/consultant/consultant.less +++ b/src/pages/consultant/consultant.less @@ -1,5 +1,10 @@ +page { + margin: 0; + padding: 0; +} .img { - width: 100%; + width: 750rpx; + height: 1450rpx; position: relative; } .tip { diff --git a/src/pages/consultant/consultant.tsx b/src/pages/consultant/consultant.tsx index 1e8272a..215f1da 100644 --- a/src/pages/consultant/consultant.tsx +++ b/src/pages/consultant/consultant.tsx @@ -45,7 +45,8 @@ export default class Consultant extends Component { diff --git a/src/pages/detect/detect.tsx b/src/pages/detect/detect.tsx index a063fcb..73b9a75 100644 --- a/src/pages/detect/detect.tsx +++ b/src/pages/detect/detect.tsx @@ -1,4 +1,4 @@ -import { MpSplashDetail, WCUserLogin } from "../../utils/Interface"; +// import { MpSplashDetail, WCUserLogin } from "../../utils/Interface"; import { Component, PropsWithChildren, useEffect, useState } from "react"; import Taro from "@tarojs/taro"; // 引入 Swiper, SwiperItem 组件 diff --git a/src/pages/entry/Animista.less b/src/pages/entry/Animista.less index dc42c24..0c1e288 100644 --- a/src/pages/entry/Animista.less +++ b/src/pages/entry/Animista.less @@ -31,3 +31,15 @@ -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; } + +.text-animation { + transition: opacity 1s ease-in-out; /* 设置过渡时间为1秒,并且采用ease-in-out曲线 */ +} + +.text-animation.fadeIn { + opacity: 1; /* 初始状态不透明度为1(完全显示)*/ +} + +.text-animation.fadeOut { + opacity: 0; /* 结束状态不透明度为0(完全消失)*/ +} diff --git a/src/pages/entry/entry.less b/src/pages/entry/entry.less index 4a249e7..d2f0e30 100644 --- a/src/pages/entry/entry.less +++ b/src/pages/entry/entry.less @@ -1,5 +1,34 @@ +page { + background: #f8f8f8; +} .main { + position: relative; 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时应用该样式 */ @@ -12,6 +41,7 @@ .absolutely { width: 100%; height: 100%; + // height: 726px; } .main .logo { @@ -46,7 +76,7 @@ width: 100%; height: 38rpx; font-size: 40rpx; - font-weight: 500; + font-weight: 400; color: #ffffff; line-height: 60rpx; text-align: center; @@ -73,57 +103,44 @@ display: flex; flex-direction: column; align-items: center; -} - -.body .cover { - display: inline-block; - width: 660rpx; - height: 800rpx; - // height: 820rpx; - border-radius: 50rpx; - margin-top: 40rpx; - margin-bottom: 7rpx; -} - -.body .bottom-card { - position: relative; - display: inline-table; - width: 660rpx; - height: 470rpx; - background: linear-gradient(0deg, #f8f8f8 0%, #efefef 100%); - border-radius: 50rpx; - - .text { - height: 45rpx; - font-size: 48rpx; - font-weight: 500; - color: #000; - line-height: 60rpx; - margin-top: 80rpx; - // margin-top: 70rpx; - margin-bottom: 48rpx; - } - .txt { - font-size: 26rpx; - font-weight: 500; - color: #666; - // margin-bottom: 40rpx; - margin-bottom: 59rpx; + .cover { + display: inline-block; + width: 660rpx; + height: 920rpx; + // height: 820rpx; + border-radius: 50rpx; + margin-top: 48rpx; + // margin-bottom: 9rpx; } - .footer { - // position: absolute; - // left: 0; - // right: 0; - // bottom: 20rpx; - flex-direction: column; - // padding-bottom: calc(44rpx + env(safe-area-inset-bottom)); + + .bottom-card { + position: relative; + display: inline-table; + width: 660rpx; + height: 474rpx; + background: linear-gradient(0deg, #f8f8f8 0%, #efefef 100%); + border-radius: 50rpx; + .text { + font-size: 48rpx; + font-family: PingFang SC; + font-weight: 400; + color: #000000; + line-height: 60rpx; + margin-top: 80rpx; + } + .txt { + font-size: 26rpx; + font-weight: 400; + color: #666; + margin-top: 48rpx; + } .indicator { display: inline-flex; width: 360rpx; - height: 4rpx; - background: #dfdfdf; - margin-top: 74rpx; + height: 2rpx; + background: transparent; + margin-top: 229rpx; .dot { display: inline-flex; flex: 1; @@ -138,15 +155,11 @@ } } } -} - -.btn { - width: 270rpx; - height: 90rpx; - background: #000000; - border-radius: 45rpx; - color: #fff; - line-height: 90rpx; - text-align: center; - // margin-bottom: 40rpx; + // .footer { + // margin-top: 59rpx; + // flex-direction: column; + // padding-bottom: calc(44rpx + env(safe-area-inset-bottom)); + // // box-sizing: border-box; + // // padding-bottom: env(safe-area-inset-bottom); + // } } diff --git a/src/pages/entry/entry.tsx b/src/pages/entry/entry.tsx index 9858af1..0ba4f4d 100644 --- a/src/pages/entry/entry.tsx +++ b/src/pages/entry/entry.tsx @@ -1,5 +1,5 @@ import classnames from "classnames"; -import { MpSplashDetail, WCUserLogin } from "../../utils/Interface"; +// import { MpSplashDetail, WCUserLogin } from "../../utils/Interface"; import { Component, PropsWithChildren, useEffect, useState } from "react"; import Taro from "@tarojs/taro"; // 引入 Swiper, SwiperItem 组件 @@ -150,15 +150,10 @@ class Entry extends Component { render() { let { menu, current, welcomeList, navHeight } = this.state; - const navHeightRpx = navHeight * 2; - return ( - + {/* { indicatorDots={false} indicatorColor="#999" indicatorActiveColor="#333" + previousMargin="32rpx" + nextMargin="32rpx" > {welcomeList.map((item, index) => { return ( - + @@ -197,15 +191,24 @@ class Entry extends Component { > - {item.title} - {item.desc} - + + + {item.title} + - 前往主页 + {item.desc} + {welcomeList.map((item, index) => { return ( @@ -225,6 +228,12 @@ class Entry extends Component { ); })} + + + + 前往主页 + + ); diff --git a/src/pages/index/componet/instrument.tsx b/src/pages/index/componet/instrument.tsx new file mode 100644 index 0000000..e69de29 diff --git a/src/pages/index/index.less b/src/pages/index/index.less index a356f42..b4fa4f7 100644 --- a/src/pages/index/index.less +++ b/src/pages/index/index.less @@ -39,7 +39,7 @@ page { } .infobox5 { - padding: 31rpx 30rpx 0; + padding: 44rpx 30rpx 0; } .nurse_plan_box { @@ -104,7 +104,7 @@ page { .add_device .tips { font-size: 26rpx; - font-weight: 500; + font-weight: 400; color: #666666; margin-top: 42rpx; } @@ -176,7 +176,7 @@ page { .nurse_top .detail_txt { font-size: 26rpx; - font-weight: 500; + font-weight: 400; color: #666666; margin-right: 19rpx; } @@ -192,7 +192,7 @@ page { .nurse_progress .txt { font-size: 28rpx; - font-weight: 500; + font-weight: 400; color: #030000; } @@ -215,13 +215,13 @@ page { .nurse_progress .progress_box .progress_num { font-size: 26rpx; - font-weight: 500; + font-weight: 400; color: #999999; } .nurse_progress .day_num { font-size: 26rpx; - font-weight: 500; + font-weight: 400; color: #999999; } @@ -301,7 +301,7 @@ page { .task_info .scene_info { font-size: 22rpx; - font-weight: 500; + font-weight: 400; color: #666666; line-height: 1; white-space: nowrap; @@ -317,7 +317,7 @@ page { background: #000000; border-radius: 30rpx; font-size: 26rpx; - font-weight: 500; + font-weight: 400; color: #ffffff; padding: 0 29rpx; } @@ -337,7 +337,7 @@ page { .next_nurse_time .tip { font-size: 28rpx; - font-weight: 500; + font-weight: 400; color: #030000; } @@ -391,7 +391,7 @@ page { .nurse_recommend_box .txt_box .txt { font-size: 26rpx; - font-weight: 500; + font-weight: 400; color: #666666; } @@ -452,7 +452,7 @@ page { background: #f8f8f8; border-radius: 24rpx; font-size: 24rpx; - font-weight: 500; + font-weight: 400; color: #000000; text-align: center; } @@ -462,7 +462,7 @@ page { .infobox3 { position: relative; - margin: 42rpx 30rpx 0; + margin: 44rpx 30rpx 0; border-radius: 30rpx; overflow: hidden; height: 220rpx; @@ -522,7 +522,7 @@ page { .popbox_text { font-size: 28rpx; - font-weight: 500; + font-weight: 400; color: #000; text-align: center; margin-top: 64rpx; @@ -638,7 +638,7 @@ page { width: 100%; height: 100%; font-size: 28rpx; - font-weight: 500; + font-weight: 400; /*color: #CCCCCC;*/ } @@ -809,7 +809,7 @@ page { .popup-title { font-size: 36rpx; - font-weight: 500; + font-weight: 400; text-align: center; } @@ -980,7 +980,7 @@ page { } .haibaoTip { font-size: 28rpx; - font-weight: 500; + font-weight: 400; color: #000000; line-height: 1; text-align: center; @@ -989,10 +989,13 @@ page { .index { position: relative; - padding-top: 100rpx; + padding-top: 50rpx; background-color: #fff; + box-shadow: 0rpx 2rpx 25rpx 18rpx rgba(210, 210, 210, 0.1); + border-radius: 0rpx 0rpx 30rpx 30rpx; .date-title { position: absolute; + top: 40rpx; right: 16rpx; width: 132rpx; display: flex; @@ -1002,6 +1005,7 @@ page { .text { color: #666; font-size: 26rpx; + font-family: PingFang SC; } } } diff --git a/src/pages/index/index.tsx b/src/pages/index/index.tsx index 7270753..b619d82 100644 --- a/src/pages/index/index.tsx +++ b/src/pages/index/index.tsx @@ -35,16 +35,24 @@ import { GetSitePopupList, GetSiteCarousel, GetSiteAddTag, + InstrumentInfo, + WCUserLogin, } from "../../utils/Interface"; // css引入 import "taro-ui/rn/style/components/calendar.scss"; import "./index.less"; -import { go, goJump, msg } from "../../utils/traoAPI"; +import { + go, + goJump, + msg, + setStorageSync, + getStorageSync, +} from "../../utils/traoAPI"; -// PropsWithChildren class Index extends Component { - pageCtx = Taro.getCurrentInstance().page; + // pageCtx = Taro.getCurrentInstance().page; + $instance = Taro.getCurrentInstance(); constructor(props) { super(props); @@ -76,25 +84,25 @@ class Index extends Component { ], calendarInComplete: [ 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: [], bannerCurrent: 0, + // 绑定仪器弹窗 + isVisibleBinding: false, + typeBinding: 0, }; } async onLoad() { - const isFirst = Taro.getStorageSync("isWelcome"); - if (!isFirst) { - go("/pages/initiate/initiate"); + // 仅非扫码进入页面时,校验跳转欢迎页 + if (!this.$instance.router?.params?.q) { + const isFirst = Taro.getStorageSync("isWelcome"); + if (!isFirst) { + go("/pages/initiate/initiate"); + } } - - const menu = Taro.getMenuButtonBoundingClientRect(); - this.setState({ menu }); } componentDidMount() {} @@ -102,7 +110,7 @@ class Index extends Component { componentWillUnmount() {} componentDidShow() { - const tabbar = Taro.getTabBar(this.pageCtx); + const tabbar = Taro.getTabBar(this.$instance.page); tabbar?.setSelected(0); this.showInit(); @@ -111,8 +119,13 @@ class Index extends Component { componentDidHide() {} showInit() { - const isFirst = Taro.getStorageSync("isWelcome"); - if (isFirst) { + // 非扫码进入小程序,需判断是否跳转欢迎页;扫码进入小程序,直接检测隐私弹窗 + if (!this.$instance.router?.params?.q) { + const isFirst = Taro.getStorageSync("isWelcome"); + if (isFirst) { + this.checkShowPrivacyPopup(); + } + } else { this.checkShowPrivacyPopup(); } } @@ -126,7 +139,8 @@ class Index extends Component { this.setState({ isShowPrivacyPopup: true }); } else { // 用户已经同意过隐私协议,所以不需要再弹出隐私协议,也能调用隐私接口 - this.initData(); + // this.initData(); + this.isSancQrcodeEnter(); } }, fail: () => {}, @@ -135,14 +149,30 @@ class Index extends Component { }, }); } + // 页面初始化 - initData() { + async initData() { + let token = getStorageSync("token"); + if (!token) { + // 如果token过期,先登录,登录完成后自动初始化 + await this.WCUserLogin(); + } else { + // token没过期,直接请求数据 + this.initPageData(); + } + } + + initPageData() { const mobile = Taro.getStorageSync("mobile"); this.GetSiteCarousel(); - if (mobile) { this.GetNoReadMessageNum(); // 查询是否有消息 + // let url = this.$instance.router?.params?.q; + // if (url) { + // } + this.getInstrumentInfoBySerial(); + if (!this.props.isShowIndexFlag) { this.GetSitePopupList(); // 全局内存缓存,仅初次进入首页运行 @@ -216,15 +246,19 @@ class Index extends Component { // 新增设备 addNewDevice = () => { - this.isRegister(); - if (this.isRegister()) { + if (this.isRegister("addNewDevice")) { // todo go("/pages/instrument/instrument"); } }; // 是否已注册 - isRegister() { + isRegister(type = "") { + if (type === "addNewDevice") { + Taro.setStorageSync("isInstrumentJump", "true"); // 判断是否点击新增设备按钮,用于信息完善页判断跳转逻辑 + } else { + Taro.setStorageSync("isInstrumentJump", "false"); // 重置 + } let mobile = Taro.getStorageSync("mobile"); if (!mobile) { this.alertRegister(); @@ -299,6 +333,66 @@ class Index extends Component { 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() { let { calendarComplete, @@ -313,6 +407,9 @@ class Index extends Component { bannerList, bannerCurrent, + // 绑定弹窗 + isVisibleBinding, + typeBinding, } = this.state; console.log("bannerList", bannerList); @@ -343,7 +440,12 @@ class Index extends Component { closePrivacy={this.closePrivacy} /> - + {/* { 添加新设备 @@ -487,7 +589,7 @@ class Index extends Component { key={"banner_" + index} onClick={this.gobanner.bind(this, item)} > - + ); })} diff --git a/src/pages/initiate/initiate.less b/src/pages/initiate/initiate.less index b5138fb..f1a713a 100644 --- a/src/pages/initiate/initiate.less +++ b/src/pages/initiate/initiate.less @@ -26,9 +26,14 @@ .main .middle { 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); - transform: translateX(-50%); + // transform: translateX(-50%); } .main .logo_middle { @@ -41,7 +46,7 @@ width: 100%; height: 38rpx; font-size: 40rpx; - font-weight: 500; + font-weight: 400; color: #ffffff; line-height: 60rpx; text-align: center; @@ -106,7 +111,7 @@ .bottom .text { height: 45rpx; font-size: 48rpx; - font-weight: 500; + font-weight: 400; color: #000; line-height: 60rpx; margin-top: 80rpx; @@ -116,7 +121,7 @@ .bottom .txt { height: 27rpx; font-size: 26rpx; - font-weight: 500; + font-weight: 400; color: #666; } diff --git a/src/pages/initiate/initiate.tsx b/src/pages/initiate/initiate.tsx index 33ef4f0..fb853a5 100644 --- a/src/pages/initiate/initiate.tsx +++ b/src/pages/initiate/initiate.tsx @@ -33,8 +33,6 @@ class Initiate extends Component { height: 0, }, url: "", - touchX: 0, - touchY: 0, }; } @@ -131,20 +129,33 @@ class Initiate extends Component { } } - touchstart(event) { - const { clientX, clientY } = event.changedTouches[0]; - this.setState({ touchX: clientX, touchY: clientY }); - } - touchend(event) { - const { clientX, clientY } = event.changedTouches[0]; - const { touchX, touchY } = this.state; - if (clientX - touchX < -30 && Math.abs(clientY - touchY) < 30) { - this.onEnded(); - } + onFinish(event) { + // const { current } = event.detail; + // const { toRight, isClick, welcomeList } = this.state; + // if (current === welcomeList.length - 1) { + // if (toRight || isClick) { + // this.setState({ toRight: false, isClick: false }); + // } else { + // // this.toHomePage(); + // } + // } + this.onEnded(); } onEnded = () => { let token = Taro.getStorageSync("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; clearTimeout(timeOut); timeOut = setTimeout(() => { @@ -159,26 +170,12 @@ class Initiate extends Component { let { menu, url } = this.state; return ( - {/* - - */} - - - + + + { // this.setState({ succeedShow: true }); // }) // .catch((err) => { - // if (err.data.code != 500) { + // if (err.data.code != 400) { // that.setState({ // errorMsg: err.data.msg, // bindPopup: "errorMsg", @@ -282,10 +281,30 @@ export default class Instrument extends Component { back(); }; + closeDev = () => { + // go("/pages/user/user"); + let isInstrumentJump = Taro.getStorageSync("isInstrumentJump"); + if (isInstrumentJump === "true") { + Taro.reLaunch({ + url: "/pages/user/user", + }); + } + }; + render() { let { isVideo, channelInfo, inputType, style, equipmentList } = this.state; return ( + diff --git a/src/pages/integral_list/integral_list.less b/src/pages/integral_list/integral_list.less index 9a936c1..3a50a02 100644 --- a/src/pages/integral_list/integral_list.less +++ b/src/pages/integral_list/integral_list.less @@ -27,7 +27,7 @@ page { .tip1 { padding-right: 23rpx; font-size: 26rpx; - font-weight: 500; + font-weight: 400; color: #000; } .icon { @@ -48,7 +48,7 @@ page { .info3 { text-align: center; font-size: 26rpx; - font-weight: 500; + font-weight: 400; color: #000000; padding-top: 55rpx; } @@ -86,6 +86,12 @@ page { height: 160rpx; margin-bottom: 34rpx; } + .nodata_text { + font-size: 30rpx; + font-family: PingFang SC; + font-weight: 400; + color: #666666; + } } .list { @@ -94,19 +100,19 @@ page { .list_block { width: 100%; border-bottom: 2rpx solid #dddddd; - padding: 30rpx 34rpx; + padding: 32rpx 0 30rpx 0; box-sizing: border-box; } .left { .tip1 { font-size: 28rpx; - font-weight: 500; + font-weight: 400; color: #030000; } .tip2 { margin-top: 34rpx; font-size: 24rpx; - font-weight: 500; + font-weight: 400; color: #999999; /*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%; } diff --git a/src/pages/integral_list/integral_list.tsx b/src/pages/integral_list/integral_list.tsx index 6681e40..3494293 100644 --- a/src/pages/integral_list/integral_list.tsx +++ b/src/pages/integral_list/integral_list.tsx @@ -181,7 +181,14 @@ class IntegralList extends Component { }); if (res.data.code === 200) { 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 }); } } @@ -327,6 +334,7 @@ class IntegralList extends Component { return ( { confirm={this.integralPopupClose} > { close={this.officialPopupClose} confirm={this.officialPopupConfirm} > + @@ -446,7 +456,7 @@ class IntegralList extends Component { src={require("../../img/user/points.png")} mode="aspectFill" > - 暂无积分记录 + 暂无积分记录 )} {list.map((item: any, key: number) => { diff --git a/src/pages/message/message.less b/src/pages/message/message.less index 064a1ac..f78ff0d 100644 --- a/src/pages/message/message.less +++ b/src/pages/message/message.less @@ -24,7 +24,7 @@ page { } .right { font-size: 24rpx; - font-weight: 500; + font-weight: 400; color: #999999; } } @@ -33,7 +33,8 @@ page { .content { line-height: 50rpx; font-size: 26rpx; - font-weight: 500; + font-family: PingFang SC; + font-weight: 400; color: #666666; } } diff --git a/src/pages/message/message.tsx b/src/pages/message/message.tsx index a2af57e..3cb5341 100644 --- a/src/pages/message/message.tsx +++ b/src/pages/message/message.tsx @@ -1,5 +1,6 @@ import { MpSplashDetail, WCUserLogin } from "../../utils/Interface"; import { Component, PropsWithChildren, useEffect, useState } from "react"; +import dayjs from "dayjs"; import Taro from "@tarojs/taro"; import { Block, @@ -71,10 +72,17 @@ export default class Message extends Component { }); if (res.data.code === 200) { 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(() => { this.setState({ list: newList, dargState: 0, total: res.data.total }); - }, 500); + }, 400); } } }; @@ -198,8 +206,9 @@ export default class Message extends Component { scrollY={this.state.scrollY} scrollWithAnimation > - + + {list.map((item: any) => { return ( { {current === 0 && ( - + - 暂无数据 + 暂无数据 )} {current === 1 && ( - + - 暂无数据 + 暂无数据 )} diff --git a/src/pages/register/register.less b/src/pages/register/register.less index 879c7cd..dcb9181 100644 --- a/src/pages/register/register.less +++ b/src/pages/register/register.less @@ -23,13 +23,12 @@ page { .bg { display: inline-block; width: 100%; - // height: 943rpx; - height: 991rpx; + height: 943rpx; } .footer { position: relative; - margin-top: -60rpx; + margin-top: -62rpx; z-index: 1; width: 100%; height: 570rpx; @@ -42,8 +41,9 @@ page { .title { font-size: 48rpx; - font-weight: 500; - color: #000; + font-family: PingFang SC; + font-weight: 400; + color: #000000; padding-top: 61rpx; padding-bottom: 48rpx; } @@ -51,8 +51,9 @@ page { .content { width: 450rpx; height: 73rpx; + font-family: PingFang SC; font-size: 26rpx; - font-weight: 500; + font-weight: 400; color: #666; margin: auto; } @@ -70,7 +71,7 @@ page { line-height: 90rpx; font-size: 32rpx; font-weight: bold; - margin: 120rpx auto 42rpx; + margin: 118rpx auto 42rpx; text-align: center; } @@ -79,7 +80,7 @@ page { align-items: center; justify-content: center; font-size: 26rpx; - font-weight: 500; + font-weight: 400; color: #666; height: 46rpx; line-height: 46rpx; @@ -123,7 +124,7 @@ page { .text { height: 28rpx; font-size: 30rpx; - font-weight: 500; + font-weight: 400; color: #030000; line-height: 60rpx; margin-bottom: 40rpx; diff --git a/src/pages/shop/shop.tsx b/src/pages/shop/shop.tsx index dbeee3c..0d8a1b7 100644 --- a/src/pages/shop/shop.tsx +++ b/src/pages/shop/shop.tsx @@ -55,7 +55,7 @@ class Shop extends Component { Taro.navigateToMiniProgram({ appId: otherSetting.skipAppid, path: otherSetting.skipPath, - envVersion: otherSetting.envVersion, + // sysVersion: otherSetting.sysVersion, success(res) { // 打开成功 Taro.reLaunch({ @@ -84,7 +84,7 @@ class Shop extends Component { let { otherSetting } = this.state; otherSetting.skipAppid = res.data.data.skipAppid; otherSetting.skipPath = res.data.data.skipPath; - otherSetting.envVersion = res.data.data.envVersion; + otherSetting.sysVersion = res.data.data.sysVersion; this.setState({ otherSetting }); this.goMiniProgram(); } diff --git a/src/pages/user/user.less b/src/pages/user/user.less index bb8fbf2..796e95a 100644 --- a/src/pages/user/user.less +++ b/src/pages/user/user.less @@ -17,6 +17,7 @@ page { background: #ffffff; border-radius: 50rpx 50rpx 0rpx 0rpx; padding: 0 0 150rpx; + height: 1188rpx; } .infobox1 { @@ -52,10 +53,11 @@ page { margin-top: 85rpx; } .infobox1 .info1 .tipbox .tip1 .name { + line-height: 1; font-size: 44rpx; + font-family: PingFang SC; font-weight: bold; color: #000000; - line-height: 1; } .infobox1 .info1 .tipbox .tip1 .level { color: #ffffff; @@ -69,7 +71,8 @@ page { } .infobox1 .info1 .tipbox .tip2 { font-size: 24rpx; - font-weight: 500; + font-family: PingFang SC; + font-weight: 400; color: #999999; line-height: 1; margin-top: 25rpx; @@ -81,14 +84,16 @@ page { } .infobox1 .info3 { margin: 22rpx 30rpx 0; + font-size: 24rpx; + font-family: PingFang SC; + font-weight: 400; + color: #999999; + text-align: center; + width: 690rpx; height: 60rpx; line-height: 60rpx; background: #f8f8f8; border-radius: 30rpx; - font-size: 24rpx; - font-weight: 500; - color: #999999; - text-align: center; } .infobox1 .info2 .block { position: relative; @@ -123,13 +128,14 @@ page { .infobox1 .info2 .block .txt { font-size: 22rpx; - font-weight: 500; + font-weight: 400; color: #a58e6d; } .infobox1 .info2 .block .tip .tip1 { font-size: 26rpx; - font-weight: 500; + font-family: PingFang SC; + font-weight: 400; color: #000000; margin-right: 20rpx; } @@ -147,54 +153,58 @@ page { margin: 64rpx 34rpx 0; background: #fff; border-radius: 20rpx; -} -.infobox2 .title { - font-size: 32rpx; - line-height: 1; - font-weight: bold; - color: #030000; -} -.infobox2 .info { - margin-top: 56rpx; - flex-wrap: wrap; -} -.infobox2 .info .block { - width: 25%; - flex-direction: column; - position: relative; -} + .title, + .title2 { + font-size: 32rpx; + font-family: PingFang SC; + font-weight: bold; + color: #030000; + } + .title2 { + margin-top: 82rpx; + } -.infobox2 .info .block .img image { - width: 40rpx; - height: 40rpx; -} + .info { + margin-top: 56rpx; + flex-wrap: wrap; + .block { + width: 25%; + flex-direction: column; + position: relative; + .img image { + width: 40rpx; + height: 40rpx; + } -.infobox2 .info .block .num { - position: absolute; - top: -5rpx; - right: -15rpx; - border-radius: 50%; - width: 12rpx; - height: 12rpx; - background: #eb5858; - border-radius: 50%; - color: #fff; - display: flex; - align-items: center; - justify-content: center; - font-size: 20rpx; -} -.infobox2 .info .block .img { - position: relative; - /*width: 64rpx;*/ - /*height: 70rpx;*/ - /*margin: auto;*/ -} -.infobox2 .info .block .tip1 { - margin-top: 36rpx; - font-size: 26rpx; - font-weight: 500; - color: #000000; + .num { + position: absolute; + top: -5rpx; + right: -15rpx; + border-radius: 50%; + width: 12rpx; + height: 12rpx; + background: #eb5858; + border-radius: 50%; + color: #fff; + display: flex; + align-items: center; + justify-content: center; + font-size: 20rpx; + } + .img { + position: relative; + /*width: 64rpx;*/ + /*height: 70rpx;*/ + /*margin: auto;*/ + } + .tip1 { + margin-top: 36rpx; + font-size: 26rpx; + font-weight: 400; + color: #000000; + } + } + } } .service-title { @@ -213,14 +223,18 @@ page { background: #ffffff; border: 1px solid #dddddd; border-radius: 3rpx; - padding: 38rpx 30rpx; + padding: 30rpx 30rpx; width: auto; + font-size: 28rpx; + font-family: PingFang SC; + font-weight: 400; + color: #030000; box-sizing: border-box; } .textarea-placeholder { font-size: 28rpx; font-family: PingFang SC; - font-weight: 500; + font-weight: 400; color: #cccccc; line-height: 60rpx; } diff --git a/src/pages/user/user.tsx b/src/pages/user/user.tsx index e1dd88c..6297f84 100644 --- a/src/pages/user/user.tsx +++ b/src/pages/user/user.tsx @@ -254,7 +254,7 @@ class User extends Component { {userInfo.id ? ( - 用户编号 :{userInfo.id} + 用户编号 : {userInfo.id} ) : ( 用户编号 : 001 )} @@ -307,7 +307,7 @@ class User extends Component { - {lastDay}过期积分: {userInfo.expireCredit} + {lastDay} 过期积分: {userInfo.expireCredit} @@ -352,9 +352,7 @@ class User extends Component { 消息中心 - - 其它服务 - + 其它服务 { 更多设置 - { 隐私政策 - + */} @@ -410,6 +408,7 @@ class User extends Component { maxlength={100} showCount={true} placeholder="请在此处写下您的意见与反馈" + placeholderStyle="font-weight: 400;font-size:28rpx;" onInput={this.onInputTextarea} > diff --git a/src/pages/userInfo/userInfo.less b/src/pages/userInfo/userInfo.less index dc764f3..e5cc5cb 100644 --- a/src/pages/userInfo/userInfo.less +++ b/src/pages/userInfo/userInfo.less @@ -24,19 +24,20 @@ page { .main { text-align: center; - padding-bottom: 153rpx; + height: 1451rpx; + // padding-bottom: 153rpx; } .main .title { font-size: 48rpx; - font-weight: 500; + font-weight: 400; color: #000; margin: 73rpx auto 48rpx; } .main .txt { font-size: 26rpx; - font-weight: 500; + font-weight: 400; color: #666; margin-bottom: 10rpx; } @@ -44,7 +45,7 @@ page { .main .avatar_box { position: relative; // width: max-content; - width: 147rpx; + // width: 147rpx; margin: 78rpx auto 50rpx; } @@ -56,6 +57,11 @@ page { } .main .avatar_box .btn_avatar { + // height: 26rpx; + font-size: 28rpx; + font-family: PingFang SC; + font-weight: 400; + color: #000000; background: transparent; } @@ -92,15 +98,15 @@ button::after { .form_item .arrow { position: absolute; - bottom: 30rpx; + bottom: 26rpx; right: 21rpx; width: 30rpx; - height: 20rpx; + height: 30rpx; } .form .form_item .label { font-size: 28rpx; - font-weight: 500; + font-weight: 400; color: #030000; margin-bottom: 28rpx; } @@ -112,14 +118,17 @@ button::after { } .form .form_item .ipt { - width: 100%; + // width: 100%; + + padding-left: 28rpx; + box-sizing: border-box; + + width: 690rpx; height: 80rpx; line-height: 80rpx; background: #ffffff; border: 1px solid #dddddd; border-radius: 3rpx; - padding-left: 28rpx; - box-sizing: border-box; } .footer { @@ -133,6 +142,7 @@ button::after { background: #ffffff; box-shadow: 0rpx -3rpx 7rpx 1rpx rgba(173, 191, 207, 0.21); padding-bottom: env(safe-area-inset-bottom); + box-sizing: border-box; } .btn { @@ -144,9 +154,13 @@ button::after { line-height: 90rpx; text-align: center; margin: 21rpx 49rpx 42rpx 30rpx; + font-family: PingFang SC; } .text { + display: flex; + align-items: center; + font-family: PingFang SC; font-size: 32rpx; font-weight: bold; color: #000; diff --git a/src/pages/userInfo/userInfo.tsx b/src/pages/userInfo/userInfo.tsx index b38cf91..3ed78e4 100644 --- a/src/pages/userInfo/userInfo.tsx +++ b/src/pages/userInfo/userInfo.tsx @@ -38,9 +38,10 @@ class UserInfo extends Component { super(props); this.state = { name: "用户信息", - style: "font-size: 26rpx; font-weight: 500; color: #ccc", + style: "font-size: 26rpx; font-weight: 400; color: #ccc", userInfo: { ...this.props.userInfo, + birthday: "", }, isShowIntegralText: false, cityShow: false, @@ -79,7 +80,7 @@ class UserInfo extends Component { // maxDate: new Date().getTime(), // minDate: new Date("1949-10-01").getTime(), minDate: new Date("1949-10-01").getTime(), - + birthday: dayjs(this.props.userInfo.birthday).valueOf(), isSubmit: false, // 是否允许提交 }; } @@ -172,7 +173,8 @@ class UserInfo extends Component { this.setState({ isShowIntegralText: true }); } else { msg("更新成功"); - this.goUser(); + // this.goUser(); + this.onSkip(); } } } else { @@ -206,7 +208,8 @@ class UserInfo extends Component { this.setState({ isShowIntegralText: true }); } else { msg("更新成功"); - this.goUser(); + // this.goUser(); + this.onSkip(); } } } @@ -260,8 +263,14 @@ class UserInfo extends Component { }; onSkip = () => { - // go("/pages/instrument/instrument"); - this.goUser(); + let isInstrumentJump = Taro.getStorageSync("isInstrumentJump"); + if (isInstrumentJump === "true") { + go("/pages/instrument/instrument"); + } else { + Taro.reLaunch({ + url: "/pages/user/user", + }); + } }; pickerChange = (event) => { @@ -374,7 +383,8 @@ class UserInfo extends Component { closeIntegralText = () => { this.setState({ isShowIntegralText: false }); setTimeout(() => { - this.goUser(); + // this.goUser(); + this.onSkip(); }, 600); }; @@ -393,6 +403,7 @@ class UserInfo extends Component { minDate, isSubmit, isShowIntegralText, + birthday, } = this.state; const formatter = (type, value) => { if (type === "year") { @@ -404,8 +415,6 @@ class UserInfo extends Component { return `${value}日`; }; - let birthday = dayjs(userInfo.birthday).valueOf(); - return ( { )} - 跳过 + 跳过 + diff --git a/src/pages/userInfoDetail/userInfoDetail.css b/src/pages/userInfoDetail/userInfoDetail.css deleted file mode 100644 index bf9966e..0000000 --- a/src/pages/userInfoDetail/userInfoDetail.css +++ /dev/null @@ -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; - /* 设置按钮边框颜色为灰色 */ -} diff --git a/src/pages/userInfoDetail/userInfoDetail.less b/src/pages/userInfoDetail/userInfoDetail.less index d40a284..baf467c 100644 --- a/src/pages/userInfoDetail/userInfoDetail.less +++ b/src/pages/userInfoDetail/userInfoDetail.less @@ -5,15 +5,6 @@ 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; @@ -28,123 +19,153 @@ button:after { button::after { border: none; } -.infobox1 .avatar_box { - width: 100rpx; -} -.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; -} +.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; + height: 100rpx; + margin-left: 34rpx; + margin-right: 32rpx; + .headimg { + width: 100rpx; + height: 100rpx; + border-radius: 50%; + } + } + .nickname { + width: 400rpx; + font-size: 28rpx; + font-weight: bold; + color: #000000; + } + } -.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; -} + .infobox2 { + width: 690rpx; + height: 220rpx; + margin-top: 20rpx; + border-radius: 30rpx; + /*box-shadow: 0px 1px 8px #E5E5E5;*/ + background: #fff; + box-sizing: border-box; + .title { + padding: 39rpx 34rpx 62rpx; + line-height: 1; + font-size: 32rpx; + font-family: PingFang SC; + font-weight: bold; + } + .block_list { + display: flex; + align-items: center; + padding: 0 34rpx 60rpx; + font-size: 28rpx; + color: #000000; + font-weight: 400; + font-family: PingFang SC; + .label { + /*color: #3D3E3E;*/ + text { + color: #eb5858; + margin-left: 6rpx; + } + } + .value { + margin-left: 45rpx; + position: relative; + font-size: 28rpx; + font-family: PingFang SC; + font-weight: 400; + color: #000000; + } + .getmobile { + background: #d3bc8d; + font-size: 24rpx; + color: #fff; + padding: 14rpx 28rpx; + border-radius: 30rpx; + margin-left: 50rpx; + position: relative; + .mobilebtn { + 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; + .infobox3 { + width: 690rpx; + height: 300rpx; + margin-top: 20rpx; + border-radius: 30rpx; + /*box-shadow: 0px 1px 8px #E5E5E5;*/ + background: #fff; + box-sizing: border-box; + .title { + padding: 39rpx 33rpx 62rpx; + font-size: 32rpx; + font-weight: bold; + color: #000000; + line-height: 1; + } + .block_list { + display: flex; + align-items: center; + justify-content: space-between; + padding: 0 30rpx 35rpx; + font-size: 28rpx; + font-family: PingFang SC; + font-weight: 400; + .label { + color: #030000; + } + .label > text { + color: #eb5858; + margin-left: 6rpx; + } + .value { + font-size: 28rpx; + font-family: PingFang SC; + font-weight: 400; + display: flex; + align-items: center; + position: relative; + .picker { + position: absolute; + width: 100%; + top: 0; + bottom: 0; + left: 0; + z-index: 99; + opacity: 0; + } + .input input { + text-align: right; + } + .righticon { + width: 10rpx; + height: 20rpx; + margin-left: 22rpx; + } + } + } + } } .submitbtn { @@ -158,14 +179,20 @@ button::after { .btn_box { position: fixed; bottom: 0; - left: 0; + // left: 0; + z-index: 99; + display: flex; + // align-items: baseline; width: 100%; height: 153rpx; background: #ffffff; 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); + box-sizing: border-box; .btn { + margin-top: 21rpx; width: 690rpx; height: 90rpx; line-height: 90rpx; diff --git a/src/pages/userInfoDetail/userInfoDetail.tsx b/src/pages/userInfoDetail/userInfoDetail.tsx index f1ea463..998ffd1 100644 --- a/src/pages/userInfoDetail/userInfoDetail.tsx +++ b/src/pages/userInfoDetail/userInfoDetail.tsx @@ -40,7 +40,7 @@ class UserInfoDetail extends Component { this.state = { name: "用户信息", - style: "font-size: 26rpx; font-weight: 500; color: #ccc", + style: "font-size: 26rpx; font-weight: 400; color: #ccc", userInfo: { ...this.props.userInfo, }, @@ -424,85 +424,86 @@ class UserInfoDetail extends Component { close={this.closeIntegralText} confirm={this.closeIntegralText} /> - - - - - - - 绑定手机 - - - 手机号* + + + + - {userInfo.mobile} + - - - 基础信息 - - - 地区(省市区)* - - - - {form.province} - {form.city} - {form.area} - - - + + 绑定手机 + + + 手机号* + {userInfo.mobile} - - - 生日* + + + 基础信息 + + + 地区(省市区)* + + + + {form.province} + {form.city} + {form.area} + + + + + - - {/* picker */} - - {userInfo.birthday || dayjs().format("YYYY-MM-DD")} - - + + + 生日* + + + {/* picker */} + + {userInfo.birthday || dayjs().format("YYYY-MM-DD")} + + + - - {/* - 保存 - */} + {isSubmit ? ( 保存 diff --git a/src/utils/Interface.js b/src/utils/Interface.js index f2e9bf8..b0a2dd9 100644 --- a/src/utils/Interface.js +++ b/src/utils/Interface.js @@ -16,6 +16,20 @@ export const WCUserLogin = (data) => { 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) => { //获取用户信息接口 return Ajax({ @@ -214,682 +228,86 @@ export const GetSiteAddTag = (data) => { }); }; +// 仪器管理 +export const InstrumentInfo = { + // serial 序列号 + getInstrumentInfoBySerial: (data) => { + // 根据序列号获取仪器信息 + return Ajax({ + url: + "/instrument/getInstrumentInfoBySerial" + paramsToUrlQueryString(data), + data, + method: "get", + }); + }, + binding: (data) => { + // 绑定仪器 + return Ajax({ + url: "/instrument/binding" + paramsToUrlQueryString(data), + data, + method: "get", + }); + }, + exchangeBinding: (data) => { + // 更换绑定仪器 + return Ajax({ + url: "/instrument/exchangeBinding" + paramsToUrlQueryString(data), + data, + method: "get", + }); + }, + bindingInstrumentList: (data) => { + // 获取当前用户:已绑定仪器列表 + return Ajax({ + url: "/instrument/bindingInstrumentList" + paramsToUrlQueryString(data), + data, + method: "get", + }); + }, + unbindingInstrumentInfoList: (data) => { + // 获取当前用户:未绑定仪器列表 + return Ajax({ + url: + "/instrument/unbindingInstrumentInfoList" + + paramsToUrlQueryString(data), + data, + method: "get", + }); + }, + manualCodeBinding: (data) => { + // 用户手动绑定仪器 + return Ajax({ + url: "/instrument/manualCodeBinding", + data, + method: "post", + }); + }, + instructionInfo: (data) => { + // 根据仪器ID:获取仪器介绍信息 instrumentId + return Ajax({ + url: "/instrument/instructionInfo" + paramsToUrlQueryString(data), + data, + method: "get", + }); + }, + firstNurseInfo: (data) => { + // 根据仪器ID:获取仪器的初次护理信息 + return Ajax({ + url: "/instrument/firstNurseInfo" + paramsToUrlQueryString(data), + data, + method: "get", + }); + }, + modeInfo: (data) => { + // 根据仪器ID:获取仪器模式 + return Ajax({ + url: "/instrument/modeInfo" + paramsToUrlQueryString(data), + data, + method: "get", + }); + }, +}; +//localhost:9204/instrument/getInstrumentInfoBySerial + /////////// /////////// - -export const UserInfoUp = (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({ - url: "/Api/Activejoin", - 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, - method: "get", - }); -}; - -export const CreditSubscribeInfo = (data) => { - // - return Ajax({ - url: "/api/CreditSubscribeInfo", - data, - method: "post", - }); -}; - -export const SubscribeActivityUser = (data) => { - // - return Ajax({ - url: "/api/SubscribeActivityUser", - data, - method: "get", - }); -}; - -export const SubscribeActivityUserAdd = (data) => { - // - return Ajax({ - url: "/api/SubscribeActivityUserAdd", - data, - method: "post", - }); -}; - -export const getReportData = (data) => { - return Ajax({ - url: "/api/Report", - data, - method: "get", - }); -}; - -export const getNursingList = (data) => { - return Ajax({ - url: "/api/NursingList", - data, - method: "get", - }); -}; - -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({ - url: "/api/NursingData", - data, - method: "get", - }); -}; - -//护理记录 -export const NursingList = (data) => { - return Ajax({ - url: "/api/NursingList", - data, - method: "get", - }); -}; - -// 打卡记录 -export const ClockInList = (data) => { - return Ajax({ - url: "/api/ClockInList", - data, - method: "get", - }); -}; - -// 打卡详情列表 -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({ - url: "/Api/SystemSet", - data, - }); -}; - -export const getSceneList = (data) => { - //获取场景列表 - return Ajax({ - url: "/Api/sceneList", - data, - method: "get", - }); -}; diff --git a/src/utils/traoAPI.js b/src/utils/traoAPI.js index 172165e..792bf94 100644 --- a/src/utils/traoAPI.js +++ b/src/utils/traoAPI.js @@ -156,7 +156,6 @@ const jupmFun = (type, data) => { }); break; case 5: // 跳转视频号 - // Taro.getChannelsLiveInfo(); Taro.openChannelsActivity({ finderUserName: data.videoNo, // feedId: data.feedId, @@ -171,17 +170,38 @@ const jupmFun = (type, data) => { }); break; case 6: // 跳转视频号直播间 - Taro.openChannelsLive({ + Taro.getChannelsLiveInfo({ finderUserName: data.videoNo, - feedId: data.feedId, success: (res) => { // 打开成功 - console.log("视频号直播间success", res); + console.log("获取直播间信息success", res); + + if (res.status === 3) { + Taro.showToast({ + title: "直播已结束", + mask: true, + icon: icon || "none", + duration: 2000, + }); + return; + } + Taro.openChannelsLive({ + finderUserName: data.videoNo, + feedId: res.feedId, + success: (res) => { + // 打开成功 + console.log("打开直播间success", res); + }, + fail: (res) => { + console.log("打开直播间fail", res); + }, + }); }, fail: (res) => { - console.log("视频号直播间fail", res); + console.log("获取直播间信息fail", res); }, }); + break; } } 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 ""; + } +};