提交 6cfa2759 作者: 陈楚尹

feat: 更新show

上级 55afdc7e
/**
* @desc 新增
*/
import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios'
export class Params {
/** 组件 */
component?: string
/** 是否启用 */
enable?: boolean
/** 是否隐藏 */
hidden?: boolean
/** 图标 */
icon?: string
/** 元数据 */
meta?: string
/** 名称 */
name: string
/** 路径 */
path?: string
/** 父级ID */
pid?: string
/** 重定向 */
redirect?: string
/** 序号 */
serial?: number
/** 权限类型 */
type: 'DIR' | 'MENU' | 'BUTTON'
/** 标识 */
uid: string
}
export const init = new defs.Result()
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return defHttp.request(
{
url: '/sys/permission/add',
method: 'POST',
data: params,
...config,
},
options,
)
}
<script setup lang="ts">
import Header from './modules/header.vue'
import Weather from './modules/weather.vue'
import MeteService from './modules/meteService.vue'
const title = ref('Hello World')
// const title = ref('Hello World')
onMounted(() => {
// test API
API.example.hello.request().then((body) => {
title.value = body
console.log('[API]', body, $app.name, $app.version)
Message.toast(body)
})
// API.example.hello.request().then((body) => {
// title.value = body
// console.log('[API]', body, $app.name, $app.version)
// Message.toast(body)
// })
})
// const surprise = () => {
......@@ -35,6 +35,7 @@
<view class="content">
<Header />
<Weather />
<MeteService />
<!-- <fui-avatar src="/static/logo.png" radius="14" @click="surprise" /> -->
<!-- <view class="info">
<text class="title">{{ title }}</text>
......
<script setup lang="ts"></script>
<template>
<view class="meteService-container">
<view class="header">
<view class="title">气象服务</view>
<view class="other">全部></view>
</view>
</view>
</template>
<style lang="less" scoped>
.meteService-container {
margin-top: 20rpx;
background-color: #fff;
padding: 28rpx;
.header {
font-size: 30rpx;
line-height: 40rpx;
display: flex;
justify-content: space-between;
.title {
font-size: 32rpx;
}
.other {
color: #ccc;
font-size: 28rpx;
}
}
}
</style>
<script setup lang="ts">
const url = ref<string>('/static/images/weather-little-icon/day3.png')
const url = ref<string>('/static/images/weather-little-icon/day1.png')
// 切换城市
const cityChange = () => {
uni.showToast({ title: '切换城市' })
}
// 预报预览
const previewForecast = () => {
uni.showToast({ title: '预报预览' })
}
</script>
<template>
<view class="weather-container">
<view class="weather-city">
<view class="weather-city" @tap="cityChange">
<FuiIcon name="location" color="#3FA5FF" class="location-icon" />
<text class="location-text">天心区</text>
<text class="right-line" />
</view>
<view class="weather-info">
<image :url="url" />
<image :src="url" />
<text> 晴 39°</text>
<view class="weather-air"></view>
</view>
<view class="weather-detail" />
<view class="weather-detail" @tap="previewForecast"> 未来24小时预报 > </view>
</view>
</template>
......@@ -35,7 +46,7 @@
.location-icon {
font-size: 42rpx !important;
margin-right: 12rpx;
margin-right: 10rpx;
vertical-align: middle;
}
......@@ -48,26 +59,45 @@
width: 2px;
height: 42rpx;
background-color: #eeeeee;
margin-left: 30rpx;
border-radius: 50%;
margin-left: 24rpx;
border-radius: 10%;
}
}
.weather-info {
flex: 1.2;
flex: 1.3;
display: flex;
align-items: center;
justify-content: left;
image {
width: 50rpx;
height: 50rpx;
margin-right: 18rpx;
// margin-bottom: 10rpx;
}
text {
font-size: 40rpx;
vertical-align: top;
}
.weather-air {
width: 65rpx;
// height: 42rpx;
line-height: 42rpx;
background-color: #24e228;
border-radius: 5px;
text-align: center;
font-size: 27rpx;
margin-left: 10rpx;
color: #fff;
}
}
.weather-detail {
flex: 1.6;
flex: 1.4;
font-size: 28rpx;
color: #aaaaaa;
}
}
</style>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论