富文本介绍

This commit is contained in:
eric
2022-11-21 13:19:24 +08:00
parent 04cbc3adbd
commit bd3d5652e9
9 changed files with 57 additions and 20 deletions

2
dist/app.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -28,12 +28,18 @@
/*! ./context */
/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */
/*! ./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js */
/*! ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */
/*! ./node_modules/@babel/runtime/helpers/typeof.js */
/*! ./swiper */
/*! ./typeof.js */
/*! ./wxs */
/*! @antmjs/vantui/es/dialog */
@@ -80,6 +86,8 @@
/*! react/jsx-runtime */
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
/*!**********************************!*\
!*** ./src/pages/home/index.tsx ***!
\**********************************/
@@ -132,6 +140,10 @@
!*** ./node_modules/@antmjs/vantui/es/swiper-item/index.js ***!
\*************************************************************/
/*!***********************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js ***!
\***********************************************************************/
/*!************************************************************************************************************************************************!*\
!*** ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[9].use[1]!./src/pages/home/index.tsx ***!
\************************************************************************************************************************************************/

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -9,6 +9,20 @@
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "活动详情",
"pathName": "pages/activityList/components/details/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "山峰介绍",
"pathName": "pages/mountainPeak/index",
"query": "",
"launchMode": "default",
"scene": null
}
]
}

View File

@@ -106,13 +106,14 @@ const Home = () => {
// Toast.show(`onCancel`);
};
const getLocation = () => {
// 获取地理位置
const getLocation = async() => {
// 获取地理位置
Taro.getLocation({
type: "wgs84",
success: function (res) {
success: function (res: any) {
// 地理位置信息-经纬度
console.log('lbsres---',res)
console.log("lbsres---", res);
const latitude = res.latitude;
const longitude = res.longitude;
const speed = res.speed;
@@ -241,8 +242,8 @@ const Home = () => {
text="打卡"
className="iconStyle"
onClick={() => {
getLocation();
// chooseImage();
// getLocation();
chooseImage();
}}
/>
<GridItem

View File

@@ -6,6 +6,7 @@ import { getTable } from "../../utils/index";
const mountainPeak = () => {
const [dataSource, setdataSource] = useState<any>([]);
const [currentIndex, setcurrentIndex] = useState(0);
useEffect(() => {
// 设置标题
@@ -34,29 +35,38 @@ const mountainPeak = () => {
useEffect(() => {
let objParams = {
tableName: "cityNew",
id: "80516fb66370bcf300b8f43c5f4dd52b",
okFun: (res) => {
console.log("res", res);
tableName: "mountains",
// id: "80516fb66370bcf300b8f43c5f4dd52b",
okFun: (res: any) => {
console.log("res--", res);
setdataSource(res?.data ?? []);
},
};
// getTable(objParams)
getTable(objParams);
}, []);
return (
<View className={`peakContent`}>
{/* 边栏 */}
<Sidebar activeKey={0} className={`peak_Sidebar`}>
<SidebarItem title="梧桐山" className={`peak_Sidebar`}/>
<SidebarItem title="梧桐山" className={`peak_Sidebar`} />
<Sidebar
activeKey={0}
className={`peak_Sidebar`}
onChange={(e: any) => {
console.log('e',e)
setcurrentIndex(e?.detail);
}}
>
{(dataSource ?? []).map((item: any) => {
return (
<SidebarItem title={item?.sideTitle} className={`peak_Sidebar`} />
);
})}
</Sidebar>
{/* 富文本 */}
<View onClick={() => {}}>
<View>{dataSource?.[0]?.actTitle}</View>
<RichText nodes={dataSource?.[0]?.richText} />
{/* <View>{dataSource?.[currentIndex]?.actTitle}</View> */}
<RichText nodes={dataSource?.[currentIndex]?.richText} />
</View>
</View>
);

View File

@@ -117,7 +117,7 @@ const my = (props: any) => {
</View>
<View className="cellArr">
{/* <Cell icon="manager" title="打卡记录" isLink /> */}
<Cell icon="manager" title="打卡记录" isLink />
{/* <Cell icon="manager" title="个人资料" isLink /> */}
<Cell