样式修改,首次进入小程序逻辑修改

master
blak-kong 2 years ago
parent 584daf9d13
commit 2e1eeade29

@ -26,8 +26,9 @@ class App extends Component<PropsWithChildren> {
// Taro.switchTab({ // Taro.switchTab({
// url: "pages/index/index", // url: "pages/index/index",
// }); // });
// go("/pages/initiate/initiate"); // 介绍页
// go("/pages/entry/entry"); // 介绍页 // go("/pages/entry/entry"); // 介绍页
// go("/pages/userInfo/userInfo"); // go("/pages/userInfo/userInfo"); // 个人信息完善
// go("/pages/register/register"); // go("/pages/register/register");
// go("/pages/instrument/instrument"); // go("/pages/instrument/instrument");
} }

@ -434,7 +434,7 @@ export default class AtCalendarBody extends React.Component<any, any> {
className={classnames("arrow", { className={classnames("arrow", {
"arrow-rotate": isFolding, "arrow-rotate": isFolding,
})} })}
src={require("../../../img/index/arrow-down.png")} src={require("../img/arrow-down.png")}
mode="aspectFill" mode="aspectFill"
/> />
</View> </View>
@ -531,7 +531,7 @@ export default class AtCalendarBody extends React.Component<any, any> {
className={classnames("arrow", { className={classnames("arrow", {
"arrow-rotate": isFolding, "arrow-rotate": isFolding,
})} })}
src={require("../../../img/index/arrow-down.png")} src={require("../img/arrow-down.png")}
mode="aspectFill" mode="aspectFill"
/> />
</View> </View>

@ -35,6 +35,14 @@
} }
} }
// .at-calendar__list.flex .flex__item--selected {
// .flex__item-container {
// position: relative;
// background: linear-gradient(0deg, #fff0da, #ffe4c0);
// border-radius: 50%;
// }
// }
.at-calendar__list.flex .flex__item--complete { .at-calendar__list.flex .flex__item--complete {
color: #333 !important; color: #333 !important;
font-weight: 400 !important; font-weight: 400 !important;

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

@ -2,15 +2,37 @@ page {
background: #f3f3f3; background: #f3f3f3;
} }
.cell { .about-box {
border-bottom: 1px solid #f3f3f3; width: 690rpx;
background: #fff; height: 270rpx;
padding: 30rpx; background: #ffffff;
font-size: 28rpx; border-radius: 30rpx;
} margin: 33rpx auto;
.cell .label { // padding: 20rpx 0;
color: #323232; box-sizing: border-box;
} overflow: hidden;
.cell .value { .cell {
color: #a19fa2; border-bottom: 1px solid #f3f3f3;
background: #fff;
padding: 20rpx 30rpx;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 500;
color: #000000;
.label {
color: #000000;
}
.value {
color: #000000;
}
}
.version {
// height: 26rpx;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 500;
color: #000000;
// line-height: 60rpx;
}
} }

@ -1,11 +1,13 @@
import { Component, PropsWithChildren, useEffect, useState } from "react"; import { Component, PropsWithChildren, useEffect, useState } from "react";
import Taro from "@tarojs/taro"; import Taro from "@tarojs/taro";
import { Block, View, Text } from "@tarojs/components"; import { Block, View, Image, Text } from "@tarojs/components";
import Navbar from "../../components/navbar/navbar"; import Navbar from "../../components/navbar/navbar";
import { GetAboutUs } from "../../utils/Interface"; import { GetAboutUs } from "../../utils/Interface";
import { go } from "../../utils/traoAPI";
import "./about.less"; import "./about.less";
export default class About extends Component<any, any> { export default class About extends Component<any, any> {
@ -34,20 +36,49 @@ export default class About extends Component<any, any> {
// this.setState({ version: res.data.data.value }); // this.setState({ version: res.data.data.value });
// } // }
const accountInfo = Taro.getAccountInfoSync(); const accountInfo = Taro.getAccountInfoSync();
this.setState({
version: accountInfo?.miniProgram?.version || "开发版", let version = accountInfo?.miniProgram?.version
// accountInfo?.miniProgram?.envVersion, ? "当前版本V" + accountInfo?.miniProgram?.version
}); : "开发版";
this.setState({ version: version });
} }
goUser = () => {
go("/pages/userPolicy/userPolicy");
};
goPrivacy = () => {
go("/pages/privacyPolicy/privacyPolicy");
};
render() { render() {
let { version } = this.state; let { version } = this.state;
return ( return (
<Block> <Block>
<Navbar titleSlot="更多设置" isBack={true} /> <Navbar titleSlot="更多设置" isBack={true} />
<View className="cell flex aitems sb" style="margin-top:20rpx;"> <View className="about-box">
<View className="label"></View> <View className="cell flex aitems sb" style="margin-top:20rpx;">
<View className="value">{version}</View> <View className="label"></View>
<View className="value version">{version}</View>
</View>
<View className="cell flex aitems sb" onClick={this.goUser}>
<View className="label"></View>
<View className="value">
<Image
src={require("../../img/index/right.png")}
style="width: 20rpx;height:20rpx"
/>
</View>
</View>
<View className="cell flex aitems sb" onClick={this.goPrivacy}>
<View className="label"></View>
<View className="value">
<Image
src={require("../../img/index/right.png")}
style="width: 20rpx;height:20rpx"
/>
</View>
</View>
</View> </View>
</Block> </Block>
); );

@ -0,0 +1,8 @@
.main {
display: flex;
width: 100vw;
height: 100vh;
justify-content: center;
align-items: center;
font-size: 30rpx;
}

@ -9,13 +9,12 @@ import {
Video, Video,
Swiper, Swiper,
SwiperItem, SwiperItem,
Block,
} from "@tarojs/components"; } from "@tarojs/components";
import "taro-ui/dist/style/components/button.scss"; // 按需引入 import "taro-ui/dist/style/components/button.scss"; // 按需引入
import "./activity.less"; import "./activity.less";
const app = Taro.getApp();
import type CustomTabBar from "../../custom-tab-bar"; import type CustomTabBar from "../../custom-tab-bar";
export default class Activity extends Component<any, any> { export default class Activity extends Component<any, any> {
pageCtx = Taro.getCurrentInstance().page; pageCtx = Taro.getCurrentInstance().page;
@ -42,6 +41,11 @@ export default class Activity extends Component<any, any> {
render() { render() {
let { name } = this.state; let { name } = this.state;
return <View>{name}</View>; return (
<Block>
<View>{name}</View>
<View className="main"></View>
</Block>
);
} }
} }

@ -0,0 +1,8 @@
.main {
display: flex;
width: 100vw;
height: 100vh;
justify-content: center;
align-items: center;
font-size: 30rpx;
}

@ -3,6 +3,7 @@ import { Component, PropsWithChildren, useEffect, useState } from "react";
import Taro from "@tarojs/taro"; import Taro from "@tarojs/taro";
// 引入 Swiper, SwiperItem 组件 // 引入 Swiper, SwiperItem 组件
import { import {
Block,
View, View,
Text, Text,
Image, Image,
@ -40,6 +41,11 @@ export default class Detect extends Component<any, any> {
render() { render() {
let { name } = this.state; let { name } = this.state;
return <View>{name}</View>; return (
<Block>
<View>{name}</View>
<View className="main"></View>
</Block>
);
} }
} }

@ -13,15 +13,20 @@ import {
SwiperItem, SwiperItem,
} from "@tarojs/components"; } from "@tarojs/components";
/*** redux ***/
import { connect } from "react-redux";
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 "taro-ui/dist/style/components/button.scss"; // 按需引入
import "./entry.less"; import "./entry.less";
import "./Animista.less"; import "./Animista.less";
import "./fade.css"; import "./fade.css";
import { go } from "../../utils/traoAPI"; import { go, msg } from "../../utils/traoAPI";
export default class Entry extends Component<any, any> { class Entry extends Component<any, any> {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
@ -40,7 +45,7 @@ export default class Entry extends Component<any, any> {
async onLoad() { async onLoad() {
this.setStatusBar(); this.setStatusBar();
this.intData(); this.initData();
} }
componentDidMount() {} componentDidMount() {}
@ -73,12 +78,18 @@ export default class Entry extends Component<any, any> {
}); });
} }
async intData() { async initData() {
let MpSplashDetail_type1 = let MpSplashDetail_type1 =
Taro.getStorageSync("MpSplashDetail_type1") || undefined; Taro.getStorageSync("MpSplashDetail_type1") || undefined;
if (MpSplashDetail_type1) { if (MpSplashDetail_type1) {
let detail = JSON.parse(MpSplashDetail_type1); let detail = JSON.parse(MpSplashDetail_type1);
let list = detail.filter((item: any) => item.fileSuffix === "images"); let list = detail.filter((item: any) => item.fileSuffix === "images");
if (list.length === 0) {
Taro.reLaunch({
url: "/pages/index/index",
});
return;
}
let welcomeList = list.map((item) => { let welcomeList = list.map((item) => {
return { return {
image: item.filePath, image: item.filePath,
@ -88,7 +99,9 @@ export default class Entry extends Component<any, any> {
}); });
this.setState({ welcomeList }); this.setState({ welcomeList });
} else { } else {
go("/pages/index/index"); Taro.reLaunch({
url: "/pages/index/index",
});
} }
} }
@ -115,7 +128,10 @@ export default class Entry extends Component<any, any> {
} }
} }
toHomePage() { toHomePage() {
Taro.switchTab({ // Taro.switchTab({
// url: "/pages/index/index",
// });
Taro.reLaunch({
url: "/pages/index/index", url: "/pages/index/index",
}); });
} }
@ -209,25 +225,18 @@ export default class Entry extends Component<any, any> {
); );
})} })}
</Swiper> </Swiper>
{/* <View className="footer flex aitems jcenter">
<View className="btn" onClick={this.toHomePage.bind(this)}>
</View>
<View className="indicator">
{welcomeList.map((item, index) => {
return (
<View
key={"indicator_" + index}
className={classnames("dot", {
"bg-show": current >= index,
})}
></View>
);
})}
</View>
</View> */}
</View> </View>
</Block> </Block>
); );
} }
} }
const mapStateToProps = (state) => ({
mobile: state.userInfo.mobile,
});
const mapDispatchToProps = (dispatch) => ({
userRefresh(value) {
dispatch(userRefresh(value));
},
});
export default connect(mapStateToProps, mapDispatchToProps)(Entry);

@ -993,10 +993,11 @@ page {
background-color: #fff; background-color: #fff;
.date-title { .date-title {
position: absolute; position: absolute;
right: 0; right: 16rpx;
width: 140rpx; width: 132rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between;
height: 40rpx; height: 40rpx;
.text { .text {
color: #666; color: #666;

@ -70,8 +70,17 @@ class Index extends Component<any, any> {
weekinfo: undefined, weekinfo: undefined,
// 日历 // 日历
currentDate: dayjs().format("YYYY-MM-DD"), currentDate: dayjs().format("YYYY-MM-DD"),
calendarComplete: [dayjs().subtract(1, "day").format("YYYY-MM-DD")], calendarComplete: [
calendarInComplete: [dayjs().add(1, "day").format("YYYY-MM-DD")], dayjs().subtract(1, "day").format("YYYY-MM-DD"),
dayjs().subtract(3, "day").format("YYYY-MM-DD"),
],
calendarInComplete: [
dayjs().add(1, "day").format("YYYY-MM-DD"),
dayjs().add(3, "day").format("YYYY-MM-DD"),
],
// currentDate: "2023-06-23",
// calendarComplete: ["2023-06-16", "2023-06-19", "2023-06-21"],
// calendarInComplete: ["2023-06-25", "2023-06-27"],
// 横幅轮播 // 横幅轮播
bannerList: [], bannerList: [],
bannerCurrent: 0, bannerCurrent: 0,
@ -138,6 +147,11 @@ class Index extends Component<any, any> {
this.GetSitePopupList(); this.GetSitePopupList();
// 全局内存缓存,仅初次进入首页运行 // 全局内存缓存,仅初次进入首页运行
this.props.setIndexFlag(true); this.props.setIndexFlag(true);
// 小程序切到后台,则清除弹窗缓存
Taro.onAppHide((res) => {
console.log("小程序进入后台:", res);
this.props.setIndexFlag(false);
});
} }
} }
} }
@ -366,7 +380,11 @@ class Index extends Component<any, any> {
<View className="index"> <View className="index">
<View className="date-title" onClick={this.toNursingRecords}> <View className="date-title" onClick={this.toNursingRecords}>
<Text className="text"></Text> <Text className="text"></Text>
<View className="at-icon at-icon-chevron-right"></View> <Image
src={require("../../img/index/right.png")}
style="width: 20rpx;height: 20rpx;"
></Image>
{/* <View className="at-icon at-icon-chevron-right"></View> */}
</View> </View>
<View className="bg-while"> <View className="bg-while">
<AtCalendar <AtCalendar

@ -12,6 +12,8 @@ import {
SwiperItem, SwiperItem,
} from "@tarojs/components"; } from "@tarojs/components";
import Navbar from "../../components/navbar/navbar";
/*** redux ***/ /*** redux ***/
import { connect } from "react-redux"; import { connect } from "react-redux";
import { userRefresh } from "../../store/features/userInfo"; import { userRefresh } from "../../store/features/userInfo";
@ -64,20 +66,39 @@ class Initiate extends Component<any, any> {
componentDidHide() {} componentDidHide() {}
async initData() { async initData() {
Taro.showLoading({
title: "请求中...",
mask: true,
});
const { data } = await MpSplashDetail({ const { data } = await MpSplashDetail({
pageNum: 1, pageNum: 1,
pageSize: 5, pageSize: 5,
type: 1, type: 1,
}); });
Taro.hideLoading();
if (data.code === 200) { if (data.code === 200) {
let url = ""; let url = "";
if (data.rows.length) { if (data.rows.length) {
Taro.setStorageSync("MpSplashDetail_type1", JSON.stringify(data.rows)); Taro.setStorageSync("MpSplashDetail_type1", JSON.stringify(data.rows));
// 1.判断是否设置登录页视频,有则正常显示视频
let bgObj = data.rows.find((item: any) => item.fileSuffix === "video"); let bgObj = data.rows.find((item: any) => item.fileSuffix === "video");
if (bgObj) { if (bgObj) {
url = bgObj.filePath; url = bgObj.filePath;
console.log("url", url);
this.setState({ url }); this.setState({ url });
} else {
// 1-2.判断是否设置介绍页图片,有则跳转介绍登录页
let imgList = data.rows.filter(
(item: any) => item.fileSuffix === "images"
);
if (imgList.length > 0) {
go("/pages/entry/entry");
return;
} else {
// 1-3.如果介绍页图片也没有,直接跳转首页
Taro.reLaunch({
url: "/pages/index/index",
});
}
} }
} else { } else {
Taro.reLaunch({ Taro.reLaunch({
@ -85,20 +106,15 @@ class Initiate extends Component<any, any> {
}); });
} }
} else { } else {
// msg("获取首页视频失败!"); msg("请求失败,请联系管理员");
}
}
setBg() {
let bgData = Taro.getStorageSync("MpSplashDetail_type1");
bgData = JSON.parse(bgData);
let bgObj = bgData.find((item: any) => item.fileSuffix === "video");
if (bgObj) {
this.setState({ url: bgObj.filePath });
} }
} }
async WCUserLogin() { async WCUserLogin() {
Taro.showLoading({
title: "请求中...",
mask: true,
});
const { code } = await Taro.login(); const { code } = await Taro.login();
const { data } = await WCUserLogin({ code }); const { data } = await WCUserLogin({ code });
if (data.code === 200) { if (data.code === 200) {
@ -106,10 +122,12 @@ class Initiate extends Component<any, any> {
Taro.setStorageSync("token", data.data.token); Taro.setStorageSync("token", data.data.token);
Taro.setStorageSync("mobile", data.data.mobile); Taro.setStorageSync("mobile", data.data.mobile);
this.props.userRefresh(data.data); this.props.userRefresh(data.data);
Taro.hideLoading();
this.initData(); this.initData();
} else { } else {
msg("登录失败!"); msg("请求失败,尝试重新请求");
this.WCUserLogin();
} }
} }
@ -125,18 +143,23 @@ class Initiate extends Component<any, any> {
} }
} }
onEnded = () => { onEnded = () => {
let timeOut: any = null; let token = Taro.getStorageSync("token");
clearTimeout(timeOut); if (token) {
timeOut = setTimeout(() => { let timeOut: any = null;
go("/pages/entry/entry"); clearTimeout(timeOut);
}, 300); timeOut = setTimeout(() => {
go("/pages/entry/entry");
}, 300);
} else {
msg("请求中,请稍候");
}
}; };
render() { render() {
let { menu, url } = this.state; let { menu, url } = this.state;
return ( return (
<Block> <Block>
<View {/* <View
className="logo" className="logo"
style={{ style={{
top: (menu?.top != undefined ? menu?.top : 44) + "px", top: (menu?.top != undefined ? menu?.top : 44) + "px",
@ -148,8 +171,8 @@ class Initiate extends Component<any, any> {
src={require("../../img/welcome/top-logo.png")} src={require("../../img/welcome/top-logo.png")}
mode="widthFix" mode="widthFix"
/> />
</View> </View> */}
<Navbar transparent={true}></Navbar>
<View <View
className="main" className="main"
onTouchStart={this.touchstart.bind(this)} onTouchStart={this.touchstart.bind(this)}

@ -73,12 +73,17 @@ page {
} }
.integral_box2 { .integral_box2 {
height: calc(100vh - 400rpx);
.nodata { .nodata {
width: 160rpx; width: 200rpx;
height: 160rpx; height: 300rpx;
margin: 0 auto; margin: 0 auto;
margin-top: 310rpx; margin-top: 310rpx;
text-align: center;
.nodata_img { .nodata_img {
display: inline-block;
width: 160rpx;
height: 160rpx;
margin-bottom: 34rpx; margin-bottom: 34rpx;
} }
} }

@ -446,7 +446,7 @@ class IntegralList extends Component<any, any> {
src={require("../../img/user/points.png")} src={require("../../img/user/points.png")}
mode="aspectFill" mode="aspectFill"
></Image> ></Image>
<View></View> <View style="color:#666"></View>
</View> </View>
)} )}
{list.map((item: any, key: number) => { {list.map((item: any, key: number) => {

@ -72,7 +72,12 @@ class Shop extends Component<any, any> {
// 获取小程序设置 // 获取小程序设置
GetOtherSetting = async () => { GetOtherSetting = async () => {
Taro.showLoading({
title: "请求中...",
mask: true,
});
let res = await GetOtherSetting(); let res = await GetOtherSetting();
Taro.hideLoading();
if (res.data.code === 200) { if (res.data.code === 200) {
this.props.otherSettingRefresh(res.data.data); this.props.otherSettingRefresh(res.data.data);

@ -12,7 +12,7 @@ import { connect } from "react-redux";
import { userRefresh } from "../../store/features/userInfo"; import { userRefresh } from "../../store/features/userInfo";
/*** redux end ***/ /*** redux end ***/
import { RefreshWxUserInfo } from "../../utils/Interface"; import { RefreshWxUserInfo, GetNoReadMessageNum } from "../../utils/Interface";
import "taro-ui/dist/style/components/button.scss"; // 按需引入 import "taro-ui/dist/style/components/button.scss"; // 按需引入
import "./user.less"; import "./user.less";
@ -47,16 +47,19 @@ class User extends Component<any, any> {
}; };
} }
async onLoad() {} async onLoad() {
componentDidMount() {
this.initData(); this.initData();
} }
componentDidMount() {}
componentWillUnmount() {} componentWillUnmount() {}
componentDidShow() { componentDidShow() {
this.setState({ userInfo: this.props.userInfo }); this.setState({ userInfo: this.props.userInfo });
let messagecount = Taro.getStorageSync("messageCount");
this.setState({ messagecount: messagecount });
const tabbar = Taro.getTabBar<CustomTabBar>(this.pageCtx); const tabbar = Taro.getTabBar<CustomTabBar>(this.pageCtx);
tabbar?.setSelected(4); tabbar?.setSelected(4);
} }
@ -65,8 +68,18 @@ class User extends Component<any, any> {
async initData() { async initData() {
this.RefreshWxUserInfo(); this.RefreshWxUserInfo();
this.GetNoReadMessageNum();
} }
// 获取消息数量
GetNoReadMessageNum = async () => {
let res = await GetNoReadMessageNum();
if (res.data.code === 200) {
Taro.setStorageSync("messageCount", res.data.data);
this.setState({ messagecount: res.data.data });
}
};
// 刷新用户信息 // 刷新用户信息
RefreshWxUserInfo = async () => { RefreshWxUserInfo = async () => {
let res = await RefreshWxUserInfo(); let res = await RefreshWxUserInfo();

@ -1,139 +0,0 @@
/* pages/userInfo/userInfo.wxss */
page {
background: #f3f3f3;
}
.nav {
position: fixed;
z-index: 99;
width: 100%;
top: 0;
}
.nav .logo {
width: 223rpx;
}
.nav .nav_box {
position: relative;
display: flex;
align-items: center;
justify-content: center;
padding: 0 32rpx;
}
.main {
text-align: center;
padding-bottom: 153rpx;
}
.main .title {
font-size: 48rpx;
font-weight: 500;
color: #000;
margin: 73rpx auto 48rpx;
}
.main .txt {
font-size: 26rpx;
font-weight: 500;
color: #666;
margin-bottom: 10rpx;
}
.main .avatar_box {
position: relative;
width: max-content;
margin: 78rpx auto 59rpx;
}
.main .avatar_box .avatar {
width: 147rpx;
height: 147rpx;
border-radius: 50%;
margin: 0 auto 13rpx;
}
.main .avatar_box .btn_avatar {
background: transparent;
}
/* 去掉背景色和内外边距 */
button {
margin: 0;
padding: 0;
background-color: inherit;
position: static;
}
button:after {
content: none;
}
/* 去掉边框 */
button::after {
border: none;
}
.main .avatar_box .btn_avatar::after {
border: none;
background: transparent;
}
.form {
width: 690rpx;
text-align: left;
margin: 0 30rpx 0;
}
.form .form_item {
position: relative;
margin-bottom: 35rpx;
}
.form_item .arrow {
position: absolute;
bottom: 30rpx;
right: 51rpx;
width: 30rpx;
height: 20rpx;
}
.form .form_item .label {
font-size: 28rpx;
font-weight: 500;
color: #030000;
margin-bottom: 28rpx;
}
.form .form_item .label::after {
content: "*";
color: #eb5858;
margin-left: 10rpx;
}
.form .form_item .ipt {
width: 100%;
height: 80rpx;
line-height: 80rpx;
background: #ffffff;
border: 1px solid #dddddd;
border-radius: 3rpx;
padding-left: 28rpx;
box-sizing: border-box;
}
.footer {
position: fixed;
bottom: 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);
}
.btn {
width: 540rpx;
height: 90rpx;
background: #000;
border-radius: 45rpx;
color: #fff;
line-height: 90rpx;
text-align: center;
margin: 21rpx 49rpx 42rpx 30rpx;
}
.text {
font-size: 32rpx;
font-weight: bold;
color: #000;
}
.btn-disable {
background-color: #ccc !important;
/* 设置按钮背景颜色为灰色 */
color: #fff !important;
/* 设置按钮文字颜色为白色 */
border-color: #ccc !important;
/* 设置按钮边框颜色为灰色 */
}

@ -43,7 +43,8 @@ page {
.main .avatar_box { .main .avatar_box {
position: relative; position: relative;
width: max-content; // width: max-content;
width: 147rpx;
margin: 78rpx auto 50rpx; margin: 78rpx auto 50rpx;
} }
@ -131,6 +132,7 @@ button::after {
height: 153rpx; height: 153rpx;
background: #ffffff; background: #ffffff;
box-shadow: 0rpx -3rpx 7rpx 1rpx rgba(173, 191, 207, 0.21); box-shadow: 0rpx -3rpx 7rpx 1rpx rgba(173, 191, 207, 0.21);
padding-bottom: env(safe-area-inset-bottom);
} }
.btn { .btn {

@ -157,7 +157,6 @@ class UserInfo extends Component<any, any> {
let res = await UpdateUserUploadFile(formData); let res = await UpdateUserUploadFile(formData);
console.log("Res", res); console.log("Res", res);
if (res.code === 200) { if (res.code === 200) {
msg("更新成功");
userInfo.province = res.data.province; userInfo.province = res.data.province;
userInfo.city = res.data.city; userInfo.city = res.data.city;
userInfo.area = res.data.area; userInfo.area = res.data.area;
@ -169,10 +168,10 @@ class UserInfo extends Component<any, any> {
userInfo.integralText = res.data.integralText; userInfo.integralText = res.data.integralText;
this.props.userRefresh(userInfo); this.props.userRefresh(userInfo);
this.setState({ userInfo: userInfo }); this.setState({ userInfo: userInfo });
if (res.data.integralText) { if (res.data.integralText) {
this.setState({ isShowIntegralText: true }); this.setState({ isShowIntegralText: true });
} else { } else {
msg("更新成功");
this.goUser(); this.goUser();
} }
} }
@ -191,7 +190,6 @@ class UserInfo extends Component<any, any> {
let data = formData.getData(); let data = formData.getData();
let res = await UpdateUser(data); let res = await UpdateUser(data);
if (res.data.code === 200) { if (res.data.code === 200) {
msg("更新成功");
userInfo.province = res.data.data.province; userInfo.province = res.data.data.province;
userInfo.city = res.data.data.city; userInfo.city = res.data.data.city;
userInfo.area = res.data.data.area; userInfo.area = res.data.data.area;
@ -207,6 +205,7 @@ class UserInfo extends Component<any, any> {
if (res.data.data.integralText) { if (res.data.data.integralText) {
this.setState({ isShowIntegralText: true }); this.setState({ isShowIntegralText: true });
} else { } else {
msg("更新成功");
this.goUser(); this.goUser();
} }
} }
@ -419,7 +418,7 @@ class UserInfo extends Component<any, any> {
close={this.closeIntegralText} close={this.closeIntegralText}
confirm={this.closeIntegralText} confirm={this.closeIntegralText}
/> />
<Navbar titleSlot="个人信息完善"></Navbar> <Navbar></Navbar>
<View className="main"> <View className="main">
<View className="title"></View> <View className="title"></View>
<View className="txt"></View> <View className="txt"></View>

@ -29,7 +29,7 @@ button::after {
border: none; border: none;
} }
.infobox1 .avatar_box { .infobox1 .avatar_box {
width: max-content; width: 100rpx;
} }
.infobox1 .avatar_box .headimg { .infobox1 .avatar_box .headimg {
width: 100rpx; width: 100rpx;
@ -164,6 +164,7 @@ button::after {
background: #ffffff; background: #ffffff;
box-shadow: 0rpx -3rpx 7rpx 1rpx rgba(173, 191, 207, 0.21); box-shadow: 0rpx -3rpx 7rpx 1rpx rgba(173, 191, 207, 0.21);
padding-bottom: 21rpx; padding-bottom: 21rpx;
padding-bottom: env(safe-area-inset-bottom);
.btn { .btn {
width: 690rpx; width: 690rpx;
height: 90rpx; height: 90rpx;

@ -52,14 +52,7 @@ export default class UserPolicy extends Component<any, any> {
<Navbar titleSlot="用户协议" isBack={true} /> <Navbar titleSlot="用户协议" isBack={true} />
<View className="nodes"> <View className="nodes">
<RichText <RichText nodes={nodes} />
nodes={
nodes
// "<pre style=' white-space: pre-wrap;word-wrap: break-word;'>" +
// nodes +
// "</pre>"
}
/>
</View> </View>
</Block> </Block>
); );

@ -26,8 +26,11 @@ export default class WebViewPage extends Component<any, any> {
componentDidHide() {} componentDidHide() {}
async initData() { async initData() {
console.log("this.$instance.router", this.$instance.router); let url = this.$instance.router?.params?.url;
this.setState({ url: this.$instance.router?.params?.url }); if (!url?.includes("https://") && !url?.includes("http://")) {
url = "https://" + url;
}
this.setState({ url: url });
} }
render() { render() {

@ -108,7 +108,7 @@ export const Ajax = (params) => {
}); });
}, },
complete() { complete() {
Taro.hideLoading(); // Taro.hideLoading();
// const requestUrlList = global_requestUrlList; // const requestUrlList = global_requestUrlList;
// const newRequestUrlList = requestUrlList.splice( // const newRequestUrlList = requestUrlList.splice(
// requestUrlList.indexOf(params.url), // requestUrlList.indexOf(params.url),
@ -262,7 +262,7 @@ export const AjaxFormData = (params) => {
}); });
}, },
complete() { complete() {
Taro.hideLoading(); // Taro.hideLoading();
const requestUrlList = global_requestUrlList; const requestUrlList = global_requestUrlList;
const newRequestUrlList = requestUrlList.splice( const newRequestUrlList = requestUrlList.splice(
requestUrlList.indexOf(params.url), requestUrlList.indexOf(params.url),

@ -100,15 +100,31 @@ const jupmFun = (type, data) => {
try { try {
switch (type) { switch (type) {
case 1: // 跳转内部链接 case 1: // 跳转内部链接
if (data.linkParams) { let tabbar = [
Taro.reLaunch({ "/pages/index/index",
url: data.link + "?" + data.linkParams, "/pages/activity/activity",
}); "/pages/detect/detect",
} else { "/pages/shop/shop",
Taro.reLaunch({ "/pages/user/user",
];
if (tabbar.includes(data.link)) {
// tabbar页不能带参数
Taro.setStorageSync(data.link + "-jupm-params", data.linkParams);
Taro.switchTab({
url: data.link, url: data.link,
}); });
} else {
if (data.linkParams) {
Taro.navigateTo({
url: data.link + "?" + data.linkParams,
});
} else {
Taro.navigateTo({
url: data.link,
});
}
} }
break; break;
case 3: // 跳转外部链接 case 3: // 跳转外部链接
if (data.linkParams) { if (data.linkParams) {
@ -140,9 +156,10 @@ const jupmFun = (type, data) => {
}); });
break; break;
case 5: // 跳转视频号 case 5: // 跳转视频号
// Taro.getChannelsLiveInfo();
Taro.openChannelsActivity({ Taro.openChannelsActivity({
finderUserName: data.videoNo, finderUserName: data.videoNo,
feedId: data.feedId, // feedId: data.feedId,
success: (res) => { success: (res) => {
// 打开成功 // 打开成功
console.log("跳转视频号success", res); console.log("跳转视频号success", res);

Loading…
Cancel
Save