临时提交

master
blak-kong 2 years ago
parent c590acd528
commit ba3cae78e7

Binary file not shown.

5
package-lock.json generated

@ -27,7 +27,7 @@
"@tarojs/runtime": "3.6.19",
"@tarojs/shared": "3.6.19",
"@tarojs/taro": "3.6.19",
"lodash": "4.17.15",
"lodash": "^4.17.15",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-redux": "^9.0.3",
@ -21760,8 +21760,7 @@
"node_modules/lodash": {
"version": "4.17.15",
"resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.15.tgz",
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
"license": "MIT"
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
},
"node_modules/lodash-es": {
"version": "4.17.21",

@ -54,7 +54,7 @@
"@tarojs/runtime": "3.6.19",
"@tarojs/shared": "3.6.19",
"@tarojs/taro": "3.6.19",
"lodash": "4.17.15",
"lodash": "^4.17.15",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-redux": "^9.0.3",

@ -11,8 +11,24 @@
color: #fff;
font-size: 36rpx;
z-index: 100009;
border: 4px solid #fff;
background-color: #ababab;
border-radius: 50%;
padding: 4px;
padding: 8rpx;
box-sizing: border-box;
}
.site-popup-btn {
position: absolute;
bottom: 100rpx;
left: calc(50% - 120rpx);
width: 240rpx;
height: 70rpx;
line-height: 70rpx;
font-size: 28rpx;
text-align: center;
border: 1rpx solid #000;
border-radius: 40rpx;
background-color: #000;
color: #fff;
box-sizing: border-box;
}

@ -38,6 +38,14 @@ export default class PopupSiteSwiper extends Component<any, any> {
current: 0,
toRight: false,
isClick: false,
typeButton: {
1: "前往内部页面",
2: "",
3: "打开外部链接",
4: "前往小程序",
5: "前往视频号",
6: "前往直播间",
},
};
}
@ -51,7 +59,6 @@ export default class PopupSiteSwiper extends Component<any, any> {
componentDidHide() {}
initData = () => {
console.log("this.props.siteData", this.props.siteData);
if (this.props.siteData) {
let arr = JSON.parse(JSON.stringify(this.props.siteData));
this.setState({ siteList: arr });
@ -62,9 +69,8 @@ export default class PopupSiteSwiper extends Component<any, any> {
this.props.close();
};
onConfirm = () => {
let { type } = this.props;
onConfirm = (item: any) => {
let { type } = item;
// switch (type) {
// case "1": // 未注册
// go("/pages/register/register");
@ -117,10 +123,9 @@ export default class PopupSiteSwiper extends Component<any, any> {
}
render() {
let { confirmButtonText, isShow, siteData } = this.props;
let { confirmButtonText, isShow, siteData, type } = this.props;
let { current } = this.state;
console.log("siteData", siteData);
return (
<Block>
<PageMeta pageStyle={isShow ? "overflow: hidden;" : ""} />
@ -173,6 +178,12 @@ export default class PopupSiteSwiper extends Component<any, any> {
mode="aspectFit"
></Image>
</View>
{/* <Button
className="site-popup-btn"
onClick={this.onConfirm.bind(this, item)}
>
</Button> */}
</SwiperItem>
);
})}

@ -479,6 +479,7 @@ page {
border-radius: 22rpx;
overflow: hidden;
height: 214rpx;
background-color: #ababab;
}
.infobox3 .currentbox {

@ -2,7 +2,14 @@ import classnames from "classnames";
import dayjs from "dayjs";
import Taro from "@tarojs/taro";
import { Component, PropsWithChildren } from "react";
import { Block, View, Text, Image, PageMeta, Button } from "@tarojs/components";
import {
Block,
View,
Text,
Image,
Swiper,
SwiperItem,
} from "@tarojs/components";
/*** redux ***/
import { connect } from "react-redux";
@ -20,13 +27,13 @@ import type CustomTabBar from "../../custom-tab-bar";
import Navbar from "../../components/navbar/navbar";
/** 自定义组件 **/
import { Toast } from "@antmjs/vantui";
import {
RefreshWxUserInfo,
GetNoReadMessageNum,
GetOtherSetting,
GetSitePopupList,
GetSiteCarousel,
GetSiteAddTag,
} from "../../utils/Interface";
// css引入
@ -67,6 +74,9 @@ class Index extends Component<any, any> {
info: {}, // 护理推荐点击参与活动的信息
weekinfo: undefined,
currentDate: dayjs().format("YYYY-MM-DD"),
// 横幅轮播
bannerList: [],
bannerCurrent: 0,
};
}
@ -105,6 +115,7 @@ class Index extends Component<any, any> {
this.RefreshWxUserInfo();
this.GetSitePopupList();
this.GetSiteCarousel();
// if (!this.state.isShowIndexFlag) {
// // 仅初次进入首页运行
// this.GetSitePopupList();
@ -174,7 +185,26 @@ class Index extends Component<any, any> {
if (res.data.data) {
this.setState({ sitePopupList: res.data.data, isShowSiteSwiper: true });
} else {
msg("暂无数据");
// msg("暂无数据");
}
}
};
// 获取站点管理-广告轮播列表
GetSiteCarousel = async () => {
let res = await GetSiteCarousel();
if (res.data.code === 200) {
if (res.data.data) {
this.setState({ bannerList: res.data.data });
}
}
};
GetSiteAddTag = async (id) => {
let res = await GetSiteAddTag(id);
console.log("tag", res.data);
if (res.data.code === 200) {
if (res.data.data) {
}
}
};
@ -267,6 +297,13 @@ class Index extends Component<any, any> {
this.setState({ isShowSiteSwiper: false });
};
bannerSwiperchange() {}
gobanner(item) {
console.log("item", item);
this.GetSiteAddTag(item.id);
}
render() {
let {
currentDate,
@ -276,7 +313,12 @@ class Index extends Component<any, any> {
isNotRegister,
isShowSiteSwiper,
isDev,
bannerList,
bannerCurrent,
} = this.state;
console.log("bannerList", bannerList);
return (
<Block>
<PopupAlert
@ -373,7 +415,72 @@ class Index extends Component<any, any> {
<View className="tips"></View>
</View>
</View>
<Toast id="toast"></Toast>
{/* <View className="infobox7">
<View className="nurse_recommend_box flex aitems sb">
<View className="title"></View>
<View className="txt_box flex jcenter aitems" data-url="/pages/care_plan/list/list" onClick={this.goCarePlanList}>
<View className="txt"></View>
<Image className="right_icon" src="/img/index-right.png" mode="aspectFill"></Image>
</View>
</View>
<ScrollView className="scroll_View" enable-flex scroll-x>
<View className="recommend_list flex">
<Block wx:for="{{carePlanList}}" wx:key="index">
<View className="recommend_item" data-url="/pages/care_plan/detail/detail?id={{item.id}}" onClick={this.gourl}>
<Image className="banner_img" src={imgUrl+item.indexBanner} mode="aspectFill"></Image>
<View className="bottom flex sb fc">
<View className="title ellipsis2">{{item.title}}</View>
<View className="join_in {{carePlan.activity.id==item.id&&carePlan.join.status==1?'disabled':''}}">
<Block wx:if="{{carePlan.activity.id===item.id&&carePlan.join.status==1}}"></Block>
<Block wx:else></Block>
</View>
</View>
</View>
</Block>
</View>
</ScrollView>
</View> */}
{/* {bannerList.length && (
<View className="infobox3">
<Swiper
autoplay={true}
onAnimationFinish={this.bannerSwiperchange.bind(this)}
current={bannerCurrent}
>
{bannerList.map((item, index) => {
return (
<SwiperItem
key={"banner_" + index}
onClick={this.gobanner.bind(this)}
data-item={item}
>
<Image src={item.fileUrl} />
</SwiperItem>
);
})}
</Swiper>
</View>
)} */}
<View className="infobox3">
<Swiper
autoplay={true}
onAnimationFinish={this.bannerSwiperchange.bind(this)}
current={bannerCurrent}
>
{bannerList.map((item, index) => {
return (
<SwiperItem
key={"banner_" + index}
onClick={this.gobanner.bind(this, item)}
>
<Image src={item.fileUrl} />
</SwiperItem>
);
})}
</Swiper>
</View>
</Block>
);
}

@ -272,7 +272,8 @@ class User extends Component<any, any> {
</View>
</View>
<View className="num">{userInfo.credit}</View>
<View className="txt"></View>
<View className="txt"></View>
{/* <View className="txt">过期</View> */}
</View>
</View>
<View className="info3">

@ -10264,7 +10264,7 @@
"resolved" "https://registry.npmmirror.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz"
"version" "4.5.0"
"lodash@^4.17.10", "lodash@^4.17.11", "lodash@^4.17.13", "lodash@^4.17.15", "lodash@^4.17.4", "lodash@>4.17.0", "lodash@4.17.15", "lodash@4.6.1 || ^4.16.1":
"lodash@^4.17.10", "lodash@^4.17.11", "lodash@^4.17.13", "lodash@^4.17.15", "lodash@^4.17.4", "lodash@>4.17.0", "lodash@4.6.1 || ^4.16.1":
"integrity" "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
"resolved" "https://registry.npmmirror.com/lodash/-/lodash-4.17.15.tgz"
"version" "4.17.15"

Loading…
Cancel
Save