项目开发完成
This commit is contained in:
@@ -3,7 +3,8 @@ export default defineAppConfig({
|
|||||||
'pages/index/index',
|
'pages/index/index',
|
||||||
'pages/order/order',
|
'pages/order/order',
|
||||||
'pages/kefu/kefu',
|
'pages/kefu/kefu',
|
||||||
'pages/user/user'
|
'pages/user/user',
|
||||||
|
'pages/article/article'
|
||||||
],
|
],
|
||||||
"subpackages": [
|
"subpackages": [
|
||||||
{
|
{
|
||||||
@@ -70,38 +71,38 @@ export default defineAppConfig({
|
|||||||
navigationBarTitleText: 'WeChat',
|
navigationBarTitleText: 'WeChat',
|
||||||
navigationBarTextStyle: 'black'
|
navigationBarTextStyle: 'black'
|
||||||
},
|
},
|
||||||
// tabBar: {
|
tabBar: {
|
||||||
// custom: false,
|
custom: false,
|
||||||
// color: "#8a8a8a",
|
color: "#8a8a8a",
|
||||||
// selectedColor: "#9a23d4",
|
selectedColor: "#9a23d4",
|
||||||
// backgroundColor: "#ffffff",
|
backgroundColor: "#ffffff",
|
||||||
// list: [
|
list: [
|
||||||
// {
|
{
|
||||||
// pagePath: "pages/index/index",
|
pagePath: "pages/index/index",
|
||||||
// iconPath: "assets/tabbar/home.png",
|
iconPath: "assets/tabbar/home.png",
|
||||||
// selectedIconPath: "assets/tabbar/home-active.png",
|
selectedIconPath: "assets/tabbar/home-active.png",
|
||||||
// text: "寄件",
|
text: "首页",
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// pagePath: "pages/order/order",
|
pagePath: "pages/article/article",
|
||||||
// iconPath: "assets/tabbar/order.png",
|
iconPath: "assets/tabbar/order.png",
|
||||||
// selectedIconPath: "assets/tabbar/order-active.png",
|
selectedIconPath: "assets/tabbar/order-active.png",
|
||||||
// text: "查件",
|
text: "学习",
|
||||||
// },
|
},
|
||||||
// {
|
// {
|
||||||
// pagePath: "pages/kefu/kefu",
|
// pagePath: "pages/kefu/kefu",
|
||||||
// iconPath: "assets/tabbar/kefu.png",
|
// iconPath: "assets/tabbar/kefu.png",
|
||||||
// selectedIconPath: "assets/tabbar/kefu-active.png",
|
// selectedIconPath: "assets/tabbar/kefu-active.png",
|
||||||
// text: "客服",
|
// text: "客服",
|
||||||
// },
|
// },
|
||||||
// {
|
{
|
||||||
// pagePath: "pages/user/user",
|
pagePath: "pages/user/user",
|
||||||
// iconPath: "assets/tabbar/user.png",
|
iconPath: "assets/tabbar/user.png",
|
||||||
// selectedIconPath: "assets/tabbar/user-active.png",
|
selectedIconPath: "assets/tabbar/user-active.png",
|
||||||
// text: "我的",
|
text: "我的",
|
||||||
// },
|
},
|
||||||
// ],
|
],
|
||||||
// },
|
},
|
||||||
requiredPrivateInfos: [
|
requiredPrivateInfos: [
|
||||||
"getLocation",
|
"getLocation",
|
||||||
"chooseLocation"
|
"chooseLocation"
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
export default definePageConfig({
|
export default definePageConfig({
|
||||||
navigationBarTitleText: '帮助中心'
|
navigationBarTitleText: '文章详情'
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import {getHjmCar, pageHjmCar} from "@/api/hjm/hjmCar";
|
|||||||
import {HjmCar} from "@/api/hjm/hjmCar/model";
|
import {HjmCar} from "@/api/hjm/hjmCar/model";
|
||||||
import {Image,Cell} from '@nutui/nutui-react-taro'
|
import {Image,Cell} from '@nutui/nutui-react-taro'
|
||||||
import './location.scss'
|
import './location.scss'
|
||||||
|
import {copyText} from "@/utils/common";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文章终极列表
|
* 文章终极列表
|
||||||
@@ -86,7 +87,7 @@ const Query = () => {
|
|||||||
<div className={'car-info w-full bg-white'}>
|
<div className={'car-info w-full bg-white'}>
|
||||||
<Image src={item?.image} mode={'aspectFit'} width={'100%'} height={'300px'}/>
|
<Image src={item?.image} mode={'aspectFit'} width={'100%'} height={'300px'}/>
|
||||||
<div className={'px-2'}>
|
<div className={'px-2'}>
|
||||||
<Cell className={'car-info-item-title'}>
|
<Cell className={'car-info-item-title'} onClick={() => copyText(`${item?.code}`)}>
|
||||||
车辆编号:{item?.code}
|
车辆编号:{item?.code}
|
||||||
</Cell>
|
</Cell>
|
||||||
<Cell className={'car-info-item-title'}>
|
<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>
|
</div>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
首页
|
|
||||||
</NavBar>
|
</NavBar>
|
||||||
<Popup
|
<Popup
|
||||||
visible={showBasic}
|
visible={showBasic}
|
||||||
|
|||||||
@@ -130,6 +130,7 @@ function Home() {
|
|||||||
id: item.id,
|
id: item.id,
|
||||||
latitude: item.latitude,
|
latitude: item.latitude,
|
||||||
longitude: item.longitude,
|
longitude: item.longitude,
|
||||||
|
title: `${item.organization}`,
|
||||||
name: item.organization
|
name: item.organization
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -151,18 +152,27 @@ function Home() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const reload = () => {
|
const reload = () => {
|
||||||
|
setMarkers([])
|
||||||
pageHjmCar({keywords}).then(res => {
|
pageHjmCar({keywords}).then(res => {
|
||||||
setList(res?.list || [])
|
setList(res?.list || [])
|
||||||
if (res?.list && res?.list.length > 0) {
|
if (res?.list && res?.list.length > 0) {
|
||||||
// const data = res?.list[0];
|
setScale(16)
|
||||||
// setLongitude(data?.longitude)
|
const data = res?.list[0];
|
||||||
// setLatitude(data?.latitude)
|
setLongitude(data?.longitude)
|
||||||
|
setLatitude(data?.latitude)
|
||||||
|
setMarkers([{
|
||||||
|
id: data.id,
|
||||||
|
latitude: data.latitude,
|
||||||
|
longitude: data.longitude,
|
||||||
|
title: `${data.organization}`,
|
||||||
|
name: `${data.organization}`
|
||||||
|
}])
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
Taro.hideTabBar()
|
// Taro.hideTabBar()
|
||||||
setScale(14)
|
setScale(14)
|
||||||
getLocation().then()
|
getLocation().then()
|
||||||
// 获取站点信息
|
// 获取站点信息
|
||||||
|
|||||||
Reference in New Issue
Block a user