项目开发完成
This commit is contained in:
@@ -3,7 +3,8 @@ export default defineAppConfig({
|
||||
'pages/index/index',
|
||||
'pages/order/order',
|
||||
'pages/kefu/kefu',
|
||||
'pages/user/user'
|
||||
'pages/user/user',
|
||||
'pages/article/article'
|
||||
],
|
||||
"subpackages": [
|
||||
{
|
||||
@@ -70,38 +71,38 @@ export default defineAppConfig({
|
||||
navigationBarTitleText: 'WeChat',
|
||||
navigationBarTextStyle: 'black'
|
||||
},
|
||||
// tabBar: {
|
||||
// custom: false,
|
||||
// color: "#8a8a8a",
|
||||
// selectedColor: "#9a23d4",
|
||||
// backgroundColor: "#ffffff",
|
||||
// list: [
|
||||
// {
|
||||
// pagePath: "pages/index/index",
|
||||
// iconPath: "assets/tabbar/home.png",
|
||||
// selectedIconPath: "assets/tabbar/home-active.png",
|
||||
// text: "寄件",
|
||||
// },
|
||||
// {
|
||||
// pagePath: "pages/order/order",
|
||||
// iconPath: "assets/tabbar/order.png",
|
||||
// selectedIconPath: "assets/tabbar/order-active.png",
|
||||
// text: "查件",
|
||||
// },
|
||||
tabBar: {
|
||||
custom: false,
|
||||
color: "#8a8a8a",
|
||||
selectedColor: "#9a23d4",
|
||||
backgroundColor: "#ffffff",
|
||||
list: [
|
||||
{
|
||||
pagePath: "pages/index/index",
|
||||
iconPath: "assets/tabbar/home.png",
|
||||
selectedIconPath: "assets/tabbar/home-active.png",
|
||||
text: "首页",
|
||||
},
|
||||
{
|
||||
pagePath: "pages/article/article",
|
||||
iconPath: "assets/tabbar/order.png",
|
||||
selectedIconPath: "assets/tabbar/order-active.png",
|
||||
text: "学习",
|
||||
},
|
||||
// {
|
||||
// pagePath: "pages/kefu/kefu",
|
||||
// iconPath: "assets/tabbar/kefu.png",
|
||||
// selectedIconPath: "assets/tabbar/kefu-active.png",
|
||||
// text: "客服",
|
||||
// },
|
||||
// {
|
||||
// pagePath: "pages/user/user",
|
||||
// iconPath: "assets/tabbar/user.png",
|
||||
// selectedIconPath: "assets/tabbar/user-active.png",
|
||||
// text: "我的",
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
{
|
||||
pagePath: "pages/user/user",
|
||||
iconPath: "assets/tabbar/user.png",
|
||||
selectedIconPath: "assets/tabbar/user-active.png",
|
||||
text: "我的",
|
||||
},
|
||||
],
|
||||
},
|
||||
requiredPrivateInfos: [
|
||||
"getLocation",
|
||||
"chooseLocation"
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
export default definePageConfig({
|
||||
navigationBarTitleText: '帮助中心'
|
||||
navigationBarTitleText: '文章详情'
|
||||
})
|
||||
|
||||
@@ -4,6 +4,7 @@ import {getHjmCar, pageHjmCar} from "@/api/hjm/hjmCar";
|
||||
import {HjmCar} from "@/api/hjm/hjmCar/model";
|
||||
import {Image,Cell} from '@nutui/nutui-react-taro'
|
||||
import './location.scss'
|
||||
import {copyText} from "@/utils/common";
|
||||
|
||||
/**
|
||||
* 文章终极列表
|
||||
@@ -86,7 +87,7 @@ const Query = () => {
|
||||
<div className={'car-info w-full bg-white'}>
|
||||
<Image src={item?.image} mode={'aspectFit'} width={'100%'} height={'300px'}/>
|
||||
<div className={'px-2'}>
|
||||
<Cell className={'car-info-item-title'}>
|
||||
<Cell className={'car-info-item-title'} onClick={() => copyText(`${item?.code}`)}>
|
||||
车辆编号:{item?.code}
|
||||
</Cell>
|
||||
<Cell className={'car-info-item-title'}>
|
||||
|
||||
3
src/pages/article/article.config.ts
Normal file
3
src/pages/article/article.config.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
export default definePageConfig({
|
||||
navigationBarTitleText: '学习'
|
||||
})
|
||||
50
src/pages/article/article.tsx
Normal file
50
src/pages/article/article.tsx
Normal file
@@ -0,0 +1,50 @@
|
||||
import {useEffect, useState} from "react";
|
||||
import {ArrowRight} from '@nutui/icons-react-taro'
|
||||
import {pageCmsArticle} from "@/api/cms/cmsArticle";
|
||||
import {CmsArticle} from "@/api/cms/cmsArticle/model";
|
||||
import Taro from '@tarojs/taro'
|
||||
|
||||
/**
|
||||
* 文章终极列表
|
||||
* @constructor
|
||||
*/
|
||||
const Article = () => {
|
||||
// const {params} = useRouter();
|
||||
// const [categoryId, setCategoryId] = useState<number>(3494)
|
||||
const [list, setList] = useState<CmsArticle[]>([])
|
||||
|
||||
const reload = () => {
|
||||
// if (params.id) {
|
||||
// setCategoryId(Number(params.id))
|
||||
// }
|
||||
pageCmsArticle({}).then(res => {
|
||||
if (res?.list) {
|
||||
setList(res?.list)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
reload()
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className={'px-3 mt-4 mb-10'}>
|
||||
<div className={'flex flex-col justify-between items-center bg-white rounded-lg p-4'}>
|
||||
<div className={'bg-white w-full'}>
|
||||
{
|
||||
list.map((item, index) => {
|
||||
return (
|
||||
<div key={index} className={'flex justify-between items-center py-2'} onClick={() => Taro.navigateTo({url: `/cms/help?id=${item.articleId}`}) }>
|
||||
<div className={'text-sm'}>{item.title}</div>
|
||||
<ArrowRight color={'#cccccc'} size={18} />
|
||||
</div>
|
||||
)
|
||||
})
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
export default Article
|
||||
@@ -42,7 +42,6 @@ const Header = (props: any) => {
|
||||
</div>
|
||||
}
|
||||
>
|
||||
首页
|
||||
</NavBar>
|
||||
<Popup
|
||||
visible={showBasic}
|
||||
|
||||
@@ -130,6 +130,7 @@ function Home() {
|
||||
id: item.id,
|
||||
latitude: item.latitude,
|
||||
longitude: item.longitude,
|
||||
title: `${item.organization}`,
|
||||
name: item.organization
|
||||
})
|
||||
})
|
||||
@@ -151,18 +152,27 @@ function Home() {
|
||||
}
|
||||
|
||||
const reload = () => {
|
||||
setMarkers([])
|
||||
pageHjmCar({keywords}).then(res => {
|
||||
setList(res?.list || [])
|
||||
if (res?.list && res?.list.length > 0) {
|
||||
// const data = res?.list[0];
|
||||
// setLongitude(data?.longitude)
|
||||
// setLatitude(data?.latitude)
|
||||
setScale(16)
|
||||
const data = res?.list[0];
|
||||
setLongitude(data?.longitude)
|
||||
setLatitude(data?.latitude)
|
||||
setMarkers([{
|
||||
id: data.id,
|
||||
latitude: data.latitude,
|
||||
longitude: data.longitude,
|
||||
title: `${data.organization}`,
|
||||
name: `${data.organization}`
|
||||
}])
|
||||
}
|
||||
})
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
Taro.hideTabBar()
|
||||
// Taro.hideTabBar()
|
||||
setScale(14)
|
||||
getLocation().then()
|
||||
// 获取站点信息
|
||||
|
||||
Reference in New Issue
Block a user