提交 58b971e1 作者: 宇宙超人

按需修改样式

上级 25740bd7
This source diff could not be displayed because it is too large. You can view the blob instead.
{ {
"prompt": "template" "prompt" : "template"
} }
...@@ -35,3 +35,15 @@ ...@@ -35,3 +35,15 @@
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.fontsize_28{
font-size: 28rpx;
font-weight: 500;
color: #333333;
}
.fontsize_24{
font-size: 24rpx;
font-weight: 400;
}
.align-center{
align-items: center;
}
...@@ -187,13 +187,22 @@ export function flyTo( ...@@ -187,13 +187,22 @@ export function flyTo(
map: MapboxInstance, map: MapboxInstance,
center: [number, number] = DEFAULT_MAP_CENTER, center: [number, number] = DEFAULT_MAP_CENTER,
zoom: number = DEFAULT_MAP_ZOOM, zoom: number = DEFAULT_MAP_ZOOM,
duration?: number,
) { ) {
map.flyTo({ const flyOptions: any = {
center, center,
zoom, zoom,
speed: 0.2,
essential: true, essential: true,
}) }
// 如果提供了时长,使用 duration 参数
if (duration !== undefined) {
flyOptions.duration = duration * 1000 // 转换为毫秒
} else {
flyOptions.speed = 0.2
}
map.flyTo(flyOptions)
} }
/** /**
......
...@@ -39,13 +39,13 @@ export const defaultStyle: mapboxgl.Style = { ...@@ -39,13 +39,13 @@ export const defaultStyle: mapboxgl.Style = {
sprite: `${host}/api/sprites/drainage/sprite`, sprite: `${host}/api/sprites/drainage/sprite`,
glyphs: `${host}/api/fonts/{fontstack}/{range}.pbf`, glyphs: `${host}/api/fonts/{fontstack}/{range}.pbf`,
sources: { sources: {
'wms-img_w-source': { 'wms-cia_w-source': {
type: 'raster', type: 'raster',
tiles: [buildTdtTileUrl('img', tk)], tiles: [buildTdtTileUrl('cia', tk)],
tileSize: 256, tileSize: 256,
maxzoom: 18, maxzoom: 18,
}, },
'wms-cia_w-source': { 'wms-img_w-source': {
type: 'raster', type: 'raster',
tiles: [buildTdtTileUrl('cia', tk)], tiles: [buildTdtTileUrl('cia', tk)],
tileSize: 256, tileSize: 256,
...@@ -58,20 +58,20 @@ export const defaultStyle: mapboxgl.Style = { ...@@ -58,20 +58,20 @@ export const defaultStyle: mapboxgl.Style = {
id: 'background', id: 'background',
type: 'background', type: 'background',
layout: { visibility: 'visible' }, layout: { visibility: 'visible' },
paint: { 'background-color': '#FFFFFF' }, paint: { 'background-color': '#EFF3FA' },
}, },
// 默认图层 - 影像底图 // 默认图层 - 标注底图
{ {
id: 'wms-img_w-layer', id: 'wms-cia_w-layer',
type: 'raster', type: 'raster',
source: 'wms-img_w-source', source: 'wms-cia_w-source',
layout: { visibility: 'visible' }, layout: { visibility: 'visible' },
}, },
// 默认图层 - 标注底图 // 默认图层 - 影像底图
{ {
id: 'wms-cia_w-layer', id: 'wms-img_w-layer',
type: 'raster', type: 'raster',
source: 'wms-cia_w-source', source: 'wms-img_w-source',
layout: { visibility: 'visible' }, layout: { visibility: 'visible' },
}, },
// 天空图层 // 天空图层
......
...@@ -100,7 +100,7 @@ export default { ...@@ -100,7 +100,7 @@ export default {
if (this.map && this.map.remove) { if (this.map && this.map.remove) {
this.map.remove() this.map.remove()
} }
console.log(123123, merge(defaultStyle, options?.style))
// [107.570282, 19.474339], // [107.570282, 19.474339],
// [115.629717, 34.466859], // [115.629717, 34.466859],
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
</view> </view>
<text class="text-black">联系方式<text class="text-grey">(选填)</text> </text> <text class="text-black">联系方式<text class="text-grey">(选填)</text> </text>
<input class="feedback-input" v-model="model.mobile" placeholder="请输入您的手机号" /> <input class="feedback-input" type="number" v-model="model.mobile" placeholder="请输入您的手机号" />
<view class="btn"> <view class="btn">
<fui-button <fui-button
:disabled="!model.content || model.loading" :disabled="!model.content || model.loading"
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
<view class="codefun-mt-12 codefun-flex-col section_4"> <view class="codefun-mt-12 codefun-flex-col section_4">
<text class="codefun-self-start font text_11">郴州市财汇商务咨询有限公司</text> <text class="codefun-self-start font text_11">郴州市财汇商务咨询有限公司</text>
<text class="codefun-self-stretch font_6 text_12"> <text class="codefun-self-stretch font_6 text_12">
州市财汇商务咨询有限公司自2022年成立以来,业务发展迅速,客户群体以政府及公共机构为主。服务涵盖: 州市财汇商务咨询有限公司自2022年成立以来,业务发展迅速,客户群体以政府及公共机构为主。服务涵盖:
</text> </text>
<view class="codefun-flex-col codefun-self-stretch group_5"> <view class="codefun-flex-col codefun-self-stretch group_5">
<view class="codefun-flex-row group_6"> <view class="codefun-flex-row group_6">
...@@ -513,6 +513,7 @@ ...@@ -513,6 +513,7 @@
font-family: SourceHanSansCN; font-family: SourceHanSansCN;
line-height: 24rpx; line-height: 24rpx;
color: #666666; color: #666666;
font-weight: 400;
} }
.group_18 { .group_18 {
margin-top: 24rpx; margin-top: 24rpx;
...@@ -566,8 +567,8 @@ ...@@ -566,8 +567,8 @@
.font_8 { .font_8 {
font-size: 28rpx; font-size: 28rpx;
font-family: SourceHanSansCN; font-family: SourceHanSansCN;
line-height: 26.34rpx;
color: #333333; color: #333333;
font-weight: 500;
} }
} }
.font { .font {
......
...@@ -172,7 +172,7 @@ ...@@ -172,7 +172,7 @@
}, },
], ],
// 农机案例 // 品牌策划
machineryCases: [ machineryCases: [
{ {
id: 1, id: 1,
...@@ -181,7 +181,7 @@ ...@@ -181,7 +181,7 @@
}, },
{ {
id: 2, id: 2,
name: '绿鲜农场', name: '山水有机',
image: '/static/images/codefun/8d11e3cbcb918502bb6582a24cddb930.png', image: '/static/images/codefun/8d11e3cbcb918502bb6582a24cddb930.png',
}, },
], ],
...@@ -378,7 +378,7 @@ ...@@ -378,7 +378,7 @@
@click="onMenuItemClick(item)" @click="onMenuItemClick(item)"
> >
<image class="image_7" :src="item.icon_url" /> <image class="image_7" :src="item.icon_url" />
<text class="font_4" :class="`text_${item.id + 2} mt-13`">{{ item.name }}</text> <text class="fontsize_28" :class="`text_${item.id + 2} mt-13`">{{ item.name }}</text>
</view> </view>
</view> </view>
</view> </view>
...@@ -476,6 +476,9 @@ ...@@ -476,6 +476,9 @@
> >
<view <view
class="codefun-flex-col codefun-justify-start codefun-items-start codefun-self-stretch section_10" class="codefun-flex-col codefun-justify-start codefun-items-start codefun-self-stretch section_10"
:style="{
'background-image': `url(${product.image})`,
}"
> >
<view <view
class="codefun-flex-col codefun-justify-start codefun-items-center text-wrapper_3" class="codefun-flex-col codefun-justify-start codefun-items-center text-wrapper_3"
...@@ -549,7 +552,7 @@ ...@@ -549,7 +552,7 @@
<view <view
class="codefun-flex-row codefun-justify-between codefun-items-center codefun-self-stretch group_14" class="codefun-flex-row codefun-justify-between codefun-items-center codefun-self-stretch group_14"
> >
<text class="font_5">一站式解决农机问题</text> <text class="font_5">品牌策划</text>
<!-- <text class="font_6 text_37" @click="onViewAllMachineryCases">全部案例</text> --> <!-- <text class="font_6 text_37" @click="onViewAllMachineryCases">全部案例</text> -->
</view> </view>
<view class="codefun-flex-col codefun-self-stretch section_14"> <view class="codefun-flex-col codefun-self-stretch section_14">
...@@ -1188,7 +1191,7 @@ ...@@ -1188,7 +1191,7 @@
.section_10 { .section_10 {
padding: 20rpx 0 130rpx; padding: 20rpx 0 130rpx;
border-radius: 16rpx 16rpx 0rpx 0rpx; border-radius: 16rpx 16rpx 0rpx 0rpx;
background-image: url('/static/images/codefun/e1d1e83ba1f6592210e646c5b6ca5b53.png'); // background-image: url('/static/images/codefun/e1d1e83ba1f6592210e646c5b6ca5b53.png');
background-size: 100% 100%; background-size: 100% 100%;
background-repeat: no-repeat; background-repeat: no-repeat;
} }
......
...@@ -308,6 +308,7 @@ ...@@ -308,6 +308,7 @@
v-model="model.form.data.code" v-model="model.form.data.code"
backgroundColor="transparent" backgroundColor="transparent"
borderColor="#DDDDDD" borderColor="#DDDDDD"
type="number"
> >
<template #left> <template #left>
<view class="fui-left__icon mr-2"> <view class="fui-left__icon mr-2">
......
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
@click="toNewsDetail(news)" @click="toNewsDetail(news)"
> >
<view class="flex flex-col justify-between" :style="news.posterUrl ? 'width: 68%' : 'width: 100%'"> <view class="flex flex-col justify-between" :style="news.posterUrl ? 'width: 68%' : 'width: 100%'">
<view class="ellipsis-multiline text-28 color-#333333">{{ news.title }}</view> <view class="ellipsis-multiline fontsize_28 color-#333333">{{ news.title }}</view>
<view class="flex flex-row justify-between text-25 color-#686868"> <view class="flex flex-row justify-between text-25 color-#686868">
<text>{{ dayjs(news.publishDate).format('YYYY年MM月DD日') }}</text> <text>{{ dayjs(news.publishDate).format('YYYY年MM月DD日') }}</text>
<view class="mr-1 flex-center"> <view class="mr-1 flex-center">
...@@ -132,7 +132,7 @@ ...@@ -132,7 +132,7 @@
<view v-show="!news.posterUrl" class="w-4%"></view> <view v-show="!news.posterUrl" class="w-4%"></view>
</view> </view>
</view> </view>
<view v-show="news.posterUrl" class="w-30% h-120"> <view v-show="news.posterUrl" class="w-30% h-130">
<image class="w-full h-full border-rd" :src="news.posterUrl" /> <image class="w-full h-full border-rd" :src="news.posterUrl" />
</view> </view>
</view> </view>
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
console.log('forecasts', forecasts) console.log('forecasts', forecasts)
// 逐 7 天预报数据 // 逐 7 天预报数据
const _7DayForecastData = forecasts.map((item) => { const _7DayForecastData = forecasts.map((item, index) => {
return { return {
minTem: item.tempMin, minTem: item.tempMin,
maxTem: item.tempMax, maxTem: item.tempMax,
...@@ -28,9 +28,12 @@ ...@@ -28,9 +28,12 @@
textNight: item.textNight, textNight: item.textNight,
dayWeather: item.iconDay, dayWeather: item.iconDay,
nightWeather: item.iconNight, nightWeather: item.iconNight,
fxDate: item.fxDate,
...getDayLabelValue(index),
} }
}) })
const _7DayForecastMaxTemValue = Math.max(..._7DayForecastData.map((item) => Number(item.maxTem))) const _7DayForecastMaxTemValue = Math.max(..._7DayForecastData.map((item) => Number(item.maxTem)))
const _7DayForecastMinTemValue = Math.min(..._7DayForecastData.map((item) => Number(item.minTem)))
// 设置逐 7 天预报图表参数 // 设置逐 7 天预报图表参数
Forecast7Chart.setOption({ Forecast7Chart.setOption({
...@@ -41,15 +44,14 @@ ...@@ -41,15 +44,14 @@
}, },
}, },
grid: { grid: {
top: '38%', top: '25%',
bottom: '3%', bottom: '10%',
left: '0%', left: '0',
right: '0%', right: '3%',
}, },
xAxis: [ xAxis: {
{
type: 'category', type: 'category',
data: [], data: _7DayForecastData.map((item) => item.value),
axisLine: { axisLine: {
show: false, show: false,
}, },
...@@ -57,23 +59,9 @@ ...@@ -57,23 +59,9 @@
show: false, show: false,
}, },
axisLabel: { axisLabel: {
interval: 0, show: false, // 隐藏x轴标签
},
}, },
{
type: 'category',
data: [],
axisLine: {
show: false,
}, },
axisTick: {
show: false,
},
axisLabel: {
interval: 0,
},
},
],
yAxis: { yAxis: {
type: 'value', type: 'value',
splitLine: { splitLine: {
...@@ -85,59 +73,70 @@ ...@@ -85,59 +73,70 @@
}, },
series: [ series: [
{ {
label: { name: '最高温度',
show: true,
position: 'top',
formatter: '{c}°c',
},
type: 'line', type: 'line',
data: _7DayForecastData.map((item) => item.maxTem), data: _7DayForecastData.map((item) => item.maxTem),
smooth: true, smooth: true,
color: '#F79D80', color: '#F79D80',
}, symbolSize: 6,
{
label: { label: {
show: true, show: true,
position: 'bottom', position: 'top',
formatter: '{c}°c', formatter: '{c}°',
color: '#F79D80',
fontSize: 11,
},
}, },
{
name: '最低温度',
type: 'line', type: 'line',
data: _7DayForecastData.map((item) => item.minTem), data: _7DayForecastData.map((item) => item.minTem),
smooth: true, smooth: true,
color: '#1890FF', color: '#52C41A',
symbolSize: 6,
label: {
show: true,
position: 'bottom',
formatter: '{c}°',
color: '#52C41A',
fontSize: 11,
},
}, },
{ {
name: '白天天气',
type: 'scatter', type: 'scatter',
data: _7DayForecastData.map((item, index) => { data: _7DayForecastData.map((item, index) => {
const { label, value } = getDayLabelValue(index) console.log('item', item,[index, Number(_7DayForecastMaxTemValue) + 3])
return { return {
value: [index, Number(_7DayForecastMaxTemValue) + 7, item.textDay], value: [index, Number(_7DayForecastMaxTemValue) + 3],
symbol: `image://${getWeatherIcon(String(item.dayWeather))}`, symbol: `image://${getWeatherIcon(String(item.dayWeather))}`,
symbolSize: [24, 24], symbolSize: [20, 20],
symbolOffset: [0, -35], symbolOffset: [0, -12],
label: { label: {
show: true, show: true,
position: 'top', position: 'top',
formatter: `${label}\n\n${value}\n\n{@[2]}`, formatter: `${item.label}\n${item.value}\n${item.textDay}`,
fontSize: 11,
color: '#333',
fontWeight: 'bold', fontWeight: 'bold',
lineHeight: 18,
}, },
} }
}), }),
}, },
{ {
name: '天气描述',
type: 'scatter', type: 'scatter',
data: _7DayForecastData.map((item, index) => { data: _7DayForecastData.map((item, index) => {
return { return {
value: [index, -7, item.textNight], value: [index, Number(_7DayForecastMinTemValue) - 3],
symbol: `image://${getWeatherIcon(String(item.nightWeather))}`, symbolSize: 0,
symbolSize: [24, 24],
symbolOffset: [0, -20],
label: { label: {
show: true, show: true,
position: 'bottom', position: 'bottom',
formatter: '{@[2]}', formatter: item.textDay,
fontWeight: 'bold', fontSize: 10,
color: '#999',
}, },
} }
}), }),
...@@ -153,7 +152,7 @@ ...@@ -153,7 +152,7 @@
<view class="rain-forecast mt-2rpx bg-#fff rd-1.5 shadow flex flex-col px-2"> <view class="rain-forecast mt-2rpx bg-#fff rd-1.5 shadow flex flex-col px-2">
<view class="flex items-center justify-between pt-3 px-2"> <view class="flex items-center justify-between pt-3 px-2">
<view class="text-32 font-600">{{ model.days }} 天预报</view> <view class="text-32 font-600">{{ model.days }} 天预报</view>
<view class="text-24">发布时间:{{ model.updateTime }}</view> <!-- <view class="text-24">发布时间:{{ model.updateTime }}</view> -->
</view> </view>
<scroll-view class="flex-1" scroll-x="true"> <scroll-view class="flex-1" scroll-x="true">
<Echarts @register="register7Forecast" class="w-1400 h-600" /> <Echarts @register="register7Forecast" class="w-1400 h-600" />
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论