From a9a1534750532ddc63d82ff72bd02b495cbc9de1 Mon Sep 17 00:00:00 2001 From: jackie19 Date: Sat, 27 Jan 2024 15:49:41 +0800 Subject: [PATCH] style --- project.config.json | 26 ++++++++-- src/components/calendar/body/isFolding.less | 8 ++- src/components/navbar/navbar.tsx | 8 +-- src/components/popup/popup-drawer.less | 2 +- src/pages/entry/entry.less | 48 +++++++++--------- src/pages/entry/entry.tsx | 56 +++++++++------------ src/pages/index/index.less | 4 +- src/pages/index/index.tsx | 13 +++-- src/pages/integral_list/integral_list.less | 9 ++-- src/pages/integral_list/integral_list.tsx | 20 ++++---- src/pages/message/message.less | 4 +- src/pages/register/register.less | 4 +- src/pages/register/register.tsx | 28 +++++------ src/pages/user/user.less | 14 ++---- src/pages/userInfo/userInfo.less | 12 ++--- src/utils/Interface.js | 2 +- 16 files changed, 124 insertions(+), 134 deletions(-) diff --git a/project.config.json b/project.config.json index b4504db..3e138e4 100644 --- a/project.config.json +++ b/project.config.json @@ -1,8 +1,6 @@ { "miniprogramRoot": "dist/", - "projectname": "flossom_miniapp", "description": "", - "appid": "wx92d11ea506995fa9", "setting": { "urlCheck": true, "es6": false, @@ -16,10 +14,28 @@ "coverView": true, "showShadowRootInWxmlPanel": false, "scopeDataCheck": false, - "useCompilerModule": false + "useCompilerModule": false, + "babelSetting": { + "ignore": [], + "disablePlugins": [], + "outputPath": "" + }, + "packNpmRelationList": [], + "ignoreUploadUnusedFiles": true }, "compileType": "miniprogram", "simulatorType": "wechat", "simulatorPluginLibVersion": {}, - "condition": {} -} + "condition": {}, + "srcMiniprogramRoot": "dist/", + "editorSetting": { + "tabIndent": "insertSpaces", + "tabSize": 2 + }, + "libVersion": "3.3.3", + "packOptions": { + "ignore": [], + "include": [] + }, + "appid": "wx92d11ea506995fa9" +} \ No newline at end of file diff --git a/src/components/calendar/body/isFolding.less b/src/components/calendar/body/isFolding.less index 8f0a8bc..8cef091 100644 --- a/src/components/calendar/body/isFolding.less +++ b/src/components/calendar/body/isFolding.less @@ -25,13 +25,11 @@ } } .at-calendar__header .header__flex-item { - // font-size: 26rpx; width: 22rpx; - height: 19rpx; + //height: 19rpx; font-size: 24rpx !important; - font-family: PingFang SC; font-weight: 500; - color: #666666; + color: #666; } // 覆盖组件原本样式 @@ -39,7 +37,7 @@ font-size: 24rpx !important; color: #333; font-weight: 400; - margin: 10rpx 0; + margin: 8rpx 0; } // 覆盖组件原本样式 diff --git a/src/components/navbar/navbar.tsx b/src/components/navbar/navbar.tsx index 0c67069..d71892b 100644 --- a/src/components/navbar/navbar.tsx +++ b/src/components/navbar/navbar.tsx @@ -2,7 +2,7 @@ import { Component } from "react"; import Taro from "@tarojs/taro"; import { Block, View, Image } from "@tarojs/components"; -import { back } from "../../utils/traoAPI"; +import { back } from "@/utils/traoAPI"; import "./navbar.less"; @@ -87,7 +87,7 @@ export default class Navbar extends Component { className="back-img" src={require("../../img/left.png")} mode="widthFix" - > + /> )} {leftSlot} @@ -109,12 +109,12 @@ export default class Navbar extends Component { /> )} - + + /> ); } diff --git a/src/components/popup/popup-drawer.less b/src/components/popup/popup-drawer.less index 14bce6e..0af520f 100644 --- a/src/components/popup/popup-drawer.less +++ b/src/components/popup/popup-drawer.less @@ -3,7 +3,7 @@ box-sizing: border-box; z-index: 100005; .drawer-popup-title { - margin-bottom: 60rpx; + margin-bottom: 42rpx; } } diff --git a/src/pages/entry/entry.less b/src/pages/entry/entry.less index 918f3db..e693302 100644 --- a/src/pages/entry/entry.less +++ b/src/pages/entry/entry.less @@ -24,7 +24,6 @@ page { font-size: 32rpx; font-family: PingFang SC; font-weight: bold; - color: #ffffff; // left: calc(50% - 135rpx); // margin-bottom: 40rpx; } @@ -125,37 +124,18 @@ page { .text { font-size: 48rpx; font-family: PingFang SC; - font-weight: 400; + font-weight: 500; color: #000000; line-height: 60rpx; - margin-top: 80rpx; + margin-top: 76rpx; } .txt { font-size: 26rpx; - font-weight: 400; + font-weight: 500; color: #666; margin-top: 40rpx; } - .indicator { - display: inline-flex; - - width: 360rpx; - height: 2rpx; - background: transparent; - margin-top: 200rpx; - .dot { - display: inline-flex; - flex: 1; - height: 100%; - background: #fff; - transition-duration: 0.5s; - margin-right: 4rpx; - } - .bg-show { - background: #666; - } - } } // .footer { // margin-top: 59rpx; @@ -165,3 +145,25 @@ page { // // padding-bottom: env(safe-area-inset-bottom); // } } + +.entry-main { + .indicator { + display: inline-flex; + width: 360rpx; + height: 2rpx; + background: transparent; + margin-top: 80rpx; + .dot { + display: inline-flex; + flex: 1; + height: 100%; + background: #fff; + transition-duration: 0.5s; + margin-right: 4rpx; + transition: all 0.6s ease-in-out 0.1s; + } + .bg-show { + background: #666; + } + } +} diff --git a/src/pages/entry/entry.tsx b/src/pages/entry/entry.tsx index b2fb521..33ae05d 100644 --- a/src/pages/entry/entry.tsx +++ b/src/pages/entry/entry.tsx @@ -1,30 +1,20 @@ import classnames from "classnames"; -// import { MpSplashDetail, WCUserLogin } from "../../utils/Interface"; -import { Component, PropsWithChildren, useEffect, useState } from "react"; +import { Component } from "react"; import Taro from "@tarojs/taro"; -// 引入 Swiper, SwiperItem 组件 -import { - Block, - View, - Text, - Image, - Video, - Swiper, - SwiperItem, -} from "@tarojs/components"; - +import {Block, Image, Swiper, SwiperItem, View,} from "@tarojs/components"; /*** redux ***/ import { connect } from "react-redux"; -import { userRefresh } from "../../store/features/userInfo"; +import { userRefresh } from "@/store/features/userInfo"; /*** redux end ***/ -import Navbar from "../../components/navbar/navbar"; +import Navbar from "@/components/navbar/navbar"; import "taro-ui/dist/style/components/button.scss"; // 按需引入 import "./entry.less"; import "./Animista.less"; import "./fade.css"; -import { go, msg } from "../../utils/traoAPI"; + +/*** redux end ***/ class Entry extends Component { constructor(props) { @@ -149,11 +139,11 @@ class Entry extends Component { } render() { - let { menu, current, welcomeList, navHeight } = this.state; + let { menu, current, welcomeList } = this.state; return ( - - + + {/* { className="cover" src={item.image} mode="aspectFill" - > + /> @@ -209,18 +199,7 @@ class Entry extends Component { {item.desc} - - {welcomeList.map((item, index) => { - return ( - - ); - })} - + @@ -233,6 +212,19 @@ class Entry extends Component { 前往主页 + + + {welcomeList.map((_item, index) => { + return ( + + ); + })} + diff --git a/src/pages/index/index.less b/src/pages/index/index.less index a44e245..4a8bb76 100644 --- a/src/pages/index/index.less +++ b/src/pages/index/index.less @@ -994,13 +994,13 @@ page { .index { position: relative; - padding-top: 50rpx; + padding-top: 32rpx; 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; + top: 32rpx; right: 16rpx; width: 132rpx; display: flex; diff --git a/src/pages/index/index.tsx b/src/pages/index/index.tsx index dc058e1..e9f9206 100644 --- a/src/pages/index/index.tsx +++ b/src/pages/index/index.tsx @@ -1,7 +1,7 @@ import classnames from "classnames"; import dayjs from "dayjs"; import Taro from "@tarojs/taro"; -import { Component, PropsWithChildren } from "react"; +import { Component } from "react"; import { Block, View, @@ -46,9 +46,8 @@ import { go, goJump, msg, - setStorageSync, getStorageSync, -} from "../../utils/traoAPI"; +} from "@/utils/traoAPI"; class Index extends Component { // pageCtx = Taro.getCurrentInstance().page; @@ -505,19 +504,19 @@ class Index extends Component { className="message-img" src={require("../../img/index/message.png")} mode="aspectFill" - > - {messagecount ? : ""} + /> + {messagecount ? : ""} } - > + /> 护理记录 + /> {/* */} diff --git a/src/pages/integral_list/integral_list.less b/src/pages/integral_list/integral_list.less index 61441ad..91636cc 100644 --- a/src/pages/integral_list/integral_list.less +++ b/src/pages/integral_list/integral_list.less @@ -1,6 +1,5 @@ page { background: #ffffff; - font-family: PingFang SC; } .integral_box1 { height: 320rpx; @@ -98,10 +97,10 @@ page { background: #fff; // padding: 34rpx; .list_block { - width: 100%; - border-bottom: 2rpx solid #dddddd; - padding: 32rpx 30rpx 30rpx 30rpx; + border-bottom: 1rpx solid #e5e5e5; + padding: 28rpx 0; box-sizing: border-box; + margin: 0 30rpx; } .left { .tip1 { @@ -110,7 +109,7 @@ page { color: #030000; } .tip2 { - margin-top: 34rpx; + margin-top: 18rpx; font-size: 24rpx; font-weight: 400; color: #999999; diff --git a/src/pages/integral_list/integral_list.tsx b/src/pages/integral_list/integral_list.tsx index 0a92b9a..722fa9f 100644 --- a/src/pages/integral_list/integral_list.tsx +++ b/src/pages/integral_list/integral_list.tsx @@ -1,6 +1,6 @@ import Taro from "@tarojs/taro"; import dayjs from "dayjs"; -import { Component, PropsWithChildren, useEffect, useState } from "react"; +import { Component } from "react"; import { Block, View, @@ -105,13 +105,13 @@ class IntegralList extends Component { appId: otherSetting.skipAppid, path: otherSetting.skipPath, envVersion: otherSetting.envVersion, - success(res) { + success() { // 打开成功 // Taro.reLaunch({ // url: "/pages/index/index", // }); }, - fail(res) { + fail() { // Taro.reLaunch({ // url: "/pages/index/index", // }); @@ -311,7 +311,7 @@ class IntegralList extends Component { console.log("滚动到底部事件"); // this.props.Lower() }; - touchEnd = (e) => { + touchEnd = () => { if (this.state.dargState === 1) { this.down(); } else if (this.state.dargState === -1) { @@ -344,7 +344,7 @@ class IntegralList extends Component { textAlgin="center" close={this.integralPopupClose} confirm={this.integralPopupClose} - > + /> { showMenuByLongpress={true} // 长按识别二维码 src={require("../../img/qrcode-test.jpg")} mode="aspectFit" - > + /> 长按图片关注公众号,可以接收积分过期提醒 @@ -376,9 +376,9 @@ class IntegralList extends Component { textAlgin="center" close={this.officialPopupClose} confirm={this.officialPopupConfirm} - > + /> - + @@ -405,7 +405,7 @@ class IntegralList extends Component { className="point_bg" src={require("../../img/user/point-bg.png")} mode="aspectFill" - > + /> @@ -455,7 +455,7 @@ class IntegralList extends Component { className="nodata_img" src={require("../../img/user/points.png")} mode="aspectFill" - > + /> 暂无积分记录 )} diff --git a/src/pages/message/message.less b/src/pages/message/message.less index 8179a96..4b5f3ef 100644 --- a/src/pages/message/message.less +++ b/src/pages/message/message.less @@ -5,7 +5,7 @@ page { background: #fff; border-radius: 30rpx; margin: 20rpx 30rpx 0; - padding: 20rpx 35rpx 48rpx 35rpx; + padding: 20rpx 35rpx 40rpx 35rpx; box-sizing: border-box; .info1 { .left { @@ -29,7 +29,7 @@ page { } } .info2 { - margin-top: 40rpx; + margin-top: 32rpx; .content { line-height: 50rpx; font-size: 26rpx; diff --git a/src/pages/register/register.less b/src/pages/register/register.less index 7f28458..1d14250 100644 --- a/src/pages/register/register.less +++ b/src/pages/register/register.less @@ -41,17 +41,15 @@ page { .title { font-size: 48rpx; - font-family: PingFang SC; font-weight: 400; color: #000000; padding-top: 61rpx; - padding-bottom: 48rpx; + padding-bottom: 40rpx; } .content { width: 450rpx; height: 73rpx; - font-family: PingFang SC; font-size: 26rpx; font-weight: 400; color: #666; diff --git a/src/pages/register/register.tsx b/src/pages/register/register.tsx index 933ff88..36d927c 100644 --- a/src/pages/register/register.tsx +++ b/src/pages/register/register.tsx @@ -1,13 +1,12 @@ import classnames from "classnames"; -import { Component, PropsWithChildren, useEffect, useState } from "react"; +import {Component} from "react"; import Taro from "@tarojs/taro"; // 引入 Swiper, SwiperItem 组件 -import { Block, View, Text, Image, Button } from "@tarojs/components"; - +import {Block, Button, Image, Text, View} from "@tarojs/components"; /*** redux ***/ import { connect } from "react-redux"; -import { setMobile } from "../../store/features/userInfo"; +import { setMobile } from "@/store/features/userInfo"; /*** redux end ***/ import "taro-ui/dist/style/components/button.scss"; // 按需引入 @@ -17,8 +16,8 @@ import "./register.less"; import Navbar from "../../components/navbar/navbar"; /** 自定义组件 **/ -import { GetUserMobile, MpSplashDetail } from "../../utils/Interface"; -import { go, msg } from "../../utils/traoAPI"; +import { GetUserMobile, MpSplashDetail } from "@/utils/Interface"; +import { go, msg } from "@/utils/traoAPI"; class Register extends Component { constructor(props) { @@ -46,7 +45,7 @@ class Register extends Component { /** * 生命周期函数--监听页面加载 */ - async onLoad(options) { + async onLoad() { this.initData(); } @@ -60,9 +59,6 @@ class Register extends Component { onDisagreeTap = () => { // 关闭小程序 Taro.exitMiniProgram({ - success: (res) => {}, - fail: (err) => {}, - complete: (res) => {}, }); }; onClosePrivacyContentPopup = () => { @@ -177,10 +173,10 @@ class Register extends Component { return ( - - + + - + 注册登录 @@ -215,13 +211,13 @@ class Register extends Component { onClick={this.onCheck} className="icon" src={require("../../img/welcome/checked.png")} - > + /> ) : ( + /> )} 我已阅读并同意《用户协议》和《隐私政策》 @@ -233,7 +229,7 @@ class Register extends Component { mode="widthFix" src={require("../../img/close.png")} onClick={this.onSkip} - > + /> diff --git a/src/pages/user/user.less b/src/pages/user/user.less index b33ae74..1355f41 100644 --- a/src/pages/user/user.less +++ b/src/pages/user/user.less @@ -17,7 +17,6 @@ page { background: #ffffff; border-radius: 50rpx 50rpx 0rpx 0rpx; padding: 0 0 150rpx; - height: 1188rpx; } .infobox1 { @@ -55,7 +54,6 @@ page { .infobox1 .info1 .tipbox .tip1 .name { line-height: 1; font-size: 44rpx; - font-family: PingFang SC; font-weight: bold; color: #000000; } @@ -71,7 +69,6 @@ page { } .infobox1 .info1 .tipbox .tip2 { font-size: 24rpx; - font-family: PingFang SC; font-weight: 400; color: #999999; line-height: 1; @@ -85,7 +82,6 @@ page { .infobox1 .info3 { margin: 22rpx 30rpx 0; font-size: 24rpx; - font-family: PingFang SC; font-weight: 400; color: #999999; text-align: center; @@ -134,7 +130,6 @@ page { .infobox1 .info2 .block .tip .tip1 { font-size: 26rpx; - font-family: PingFang SC; font-weight: 400; color: #000000; margin-right: 20rpx; @@ -161,11 +156,11 @@ page { color: #030000; } .title2 { - margin-top: 82rpx; + margin-top: 74rpx; } .info { - margin-top: 56rpx; + margin-top: 50rpx; flex-wrap: wrap; .block { width: 25%; @@ -198,7 +193,7 @@ page { /*margin: auto;*/ } .tip1 { - margin-top: 36rpx; + margin-top: 30rpx; font-size: 26rpx; font-weight: 400; color: #000000; @@ -211,7 +206,6 @@ page { display: flex; justify-content: center; font-size: 36rpx; - font-family: PingFang SC; font-weight: bold; color: #030000; line-height: 60rpx; @@ -226,14 +220,12 @@ page { 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: 400; color: #cccccc; line-height: 60rpx; diff --git a/src/pages/userInfo/userInfo.less b/src/pages/userInfo/userInfo.less index e5cc5cb..6d90f52 100644 --- a/src/pages/userInfo/userInfo.less +++ b/src/pages/userInfo/userInfo.less @@ -32,7 +32,7 @@ page { font-size: 48rpx; font-weight: 400; color: #000; - margin: 73rpx auto 48rpx; + margin: 73rpx auto 34rpx; } .main .txt { @@ -46,12 +46,12 @@ page { position: relative; // width: max-content; // width: 147rpx; - margin: 78rpx auto 50rpx; + margin: 70rpx auto 20rpx; } .main .avatar_box .avatar { - width: 147rpx; - height: 147rpx; + width: 140rpx; + height: 140rpx; border-radius: 50%; margin: 0 auto; } @@ -59,7 +59,6 @@ page { .main .avatar_box .btn_avatar { // height: 26rpx; font-size: 28rpx; - font-family: PingFang SC; font-weight: 400; color: #000000; background: transparent; @@ -154,13 +153,12 @@ button::after { line-height: 90rpx; text-align: center; margin: 21rpx 49rpx 42rpx 30rpx; - font-family: PingFang SC; + font-size: 32rpx; } .text { display: flex; align-items: center; - font-family: PingFang SC; font-size: 32rpx; font-weight: bold; color: #000; diff --git a/src/utils/Interface.js b/src/utils/Interface.js index ba29354..490be9b 100644 --- a/src/utils/Interface.js +++ b/src/utils/Interface.js @@ -50,7 +50,7 @@ export const UpdateUserUploadFile = (formData) => { // 更新用户信息且上传头像文件 return AjaxUploadFile( { - url: "hzwx/user/updateUser", + url: "/hzwx/user/updateUser", filePath: formData.file, }, formData