You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.0 KiB
TypeScript
50 lines
1.0 KiB
TypeScript
import { MpSplashDetail, WCUserLogin } from "../../utils/Interface";
|
|
import { Component, PropsWithChildren, useEffect, useState } from "react";
|
|
import Taro from "@tarojs/taro";
|
|
// 引入 Swiper, SwiperItem 组件
|
|
import {
|
|
View,
|
|
Text,
|
|
Image,
|
|
Video,
|
|
Swiper,
|
|
SwiperItem,
|
|
} from "@tarojs/components";
|
|
|
|
import "taro-ui/dist/style/components/button.scss"; // 按需引入
|
|
import "./shop.less";
|
|
|
|
const app = Taro.getApp();
|
|
|
|
import type CustomTabBar from "../../custom-tab-bar";
|
|
export default class Shop extends Component<any, any> {
|
|
pageCtx = Taro.getCurrentInstance().page;
|
|
constructor(props) {
|
|
super(props);
|
|
this.state = {
|
|
name: "shop",
|
|
};
|
|
}
|
|
|
|
async onLoad() {
|
|
console.log("app", app);
|
|
}
|
|
componentDidMount() {}
|
|
|
|
componentWillUnmount() {}
|
|
|
|
componentDidShow() {
|
|
const tabbar = Taro.getTabBar<CustomTabBar>(this.pageCtx);
|
|
tabbar?.setSelected(3);
|
|
}
|
|
|
|
componentDidHide() {}
|
|
|
|
async initData() {}
|
|
|
|
render() {
|
|
let { name } = this.state;
|
|
return <View>{name}</View>;
|
|
}
|
|
}
|