提交 1dbbad7a 作者: 方治民

Merge branch 'main' of https://gitee.com/mrf/agri-app

......@@ -4,7 +4,7 @@ import { CodeGenerator, Property } from 'pont-engine'
// 接口 API 前缀
// 通常与项目的 env 配置中的 VITE_GLOB_API_URL_PREFIX 相同
const API_URL_PREFIX = '/api'
const API_URL_PREFIX = '/jeecgboot'
export default class BasicGenerator extends CodeGenerator {
checkJsonParam(inter: Interface, paramsCode: string): boolean {
......@@ -60,8 +60,8 @@ export default class BasicGenerator extends CodeGenerator {
sourceResponseType === 'File'
? 'void'
: sourceResponseType === 'defs.ResultString'
? 'string'
: sourceResponseType.replace(/defs.Result(.*)/, 'defs.$1')
? 'string'
: sourceResponseType.replace(/defs.Result(.*)/, 'defs.$1')
return `
export ${paramsCode}
......@@ -127,8 +127,8 @@ export default class BasicGenerator extends CodeGenerator {
requestParams.includes('form')
? `headers: { 'Content-Type': 'multipart/form-data;charset=UTF-8' },`
: isBody
? `headers: { 'Content-Type': 'application/json' },`
: ''
? `headers: { 'Content-Type': 'application/json' },`
: ''
}
...config,
......
......@@ -2,6 +2,9 @@ import { otherHttp } from '/@/utils/http/axios'
enum Api {
zoneList = '/online/cgform/api/getData/01fd687ecb164aea914e92047e144d66', // 金刚区菜单数据
productMarketList = '/online/cgform/api/getData/5b71e11020d44366b2d130e200c7a640', // 热门产地行情
serviceStatsList = '/online/cgform/api/getData/491863dde351404da63a1a6e8c699c4c', // 服务展示窗
agricultureClassList = '/online/cgform/api/getData/311c300e05694ba69a063d04c8572e9e', // 农技课堂
}
/**
......@@ -14,3 +17,36 @@ export function zoneList(params = {}) {
params,
})
}
/**
* @param params 请求参数
* @description: 热门产地行情数据
*/
export function productMarketList(params = {}) {
return otherHttp.get({
url: Api.productMarketList,
params,
})
}
/**
* @param params 请求参数
* @description: 服务展示窗数据
*/
export function serviceStatsList(params = {}) {
return otherHttp.get({
url: Api.serviceStatsList,
params,
})
}
/**
* @param params 请求参数
* @description: 农技课堂数据
*/
export function agricultureClassList(params = {}) {
return otherHttp.get({
url: Api.agricultureClassList,
params,
})
}
import { otherHttp } from '/@/utils/http/axios'
enum Api {
zoneList = '/online/cgform/api/getData/01fd687ecb164aea914e92047e144d66', // 功能菜单数据
agricultureModelsList = '/online/cgform/api/getData/7b2983df6ddf416aba68db8b0ab234ab', // 农业模型数据
baseManagementList = '/online/cgform/api/getData/e4e4e6c901254b60b1e7a005097999ec', // 基地管理数据
commonToolsList = '/online/cgform/api/getData/3a7fbb877f304b7d83935caa454859c4', // 常用工具数据
}
/**
* @param params 请求参数
* @description: 金刚区菜单数据
*/
export function zoneList(params = {}) {
return otherHttp.get({
url: Api.zoneList,
params,
})
}
/**
* @param params 请求参数
* @description: 农业模型数据
*/
export function agricultureModelsList(params = {}) {
return otherHttp.get({
url: Api.agricultureModelsList,
params,
})
}
/**
* @param params 请求参数
* @description: 基地管理数据
*/
export function baseManagementList(params = {}) {
return otherHttp.get({
url: Api.baseManagementList,
params,
})
}
/**
* @param params 请求参数
* @description: 常用工具数据
*/
export function commonToolsList(params = {}) {
return otherHttp.get({
url: Api.commonToolsList,
params,
})
}
......@@ -178,53 +178,43 @@
}
}
},
// pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "Basic APP"
}
},
// ================================ 通用页面分割线 ====================================
// === 关于我们 ===
{
"path": "pages/common/about/index",
"style": {
"navigationBarTitleText": "关于我们"
}
},
// === 问题反馈 ===
{
"path": "pages/common/feedback/index",
"style": {
"navigationBarTitleText": "问题反馈"
}
},
// === Webview ===
{
"path": "pages/common/webview/index",
"style": {
"navigationBarTitleText": ""
}
},
// === PDF 文件预览 ===
{
"path": "pages/common/viewer/pdf",
"style": {
"navigationBarTitleText": ""
}
},
// === 空页面(开发中...) ===
{
"path": "pages/common/coding/coding",
"style": {
// #ifdef H5
"titleNView": false,
// #endif
"navigationBarTitleText": "开发中"
}
},
// === 版本更新 ===
{
"path": "uni_modules/uni-upgrade-center-app/pages/upgrade-popup",
"style": {
......@@ -241,7 +231,6 @@
"disableScroll": true
}
},
// === 应用全屏通知弹窗(场景:应用维护通知、用户通知公告等) ===
{
"path": "pages/common/notice/index",
"style": {
......@@ -265,9 +254,7 @@
"easycom": {
"autoscan": true,
"custom": {
// https://doc.firstui.cn/docs/introduce.html
"^fui-(.*)": "@/components/FirstUI/fui-$1/fui-$1.vue",
// https://ext.dcloud.net.cn/plugin?id=55#detail
"^uni-(.*)": "@dcloudio/uni-ui/lib/uni-$1/uni-$1.vue"
}
},
......
......@@ -11,12 +11,14 @@
{ id: 4, name: '采摘' },
{ id: 5, name: '其他' },
],
currentCategoryId: 1,
// 用工类型标签
employmentTabs: [
{ id: 1, name: '推荐用工' },
{ id: 2, name: '我的用工' },
],
currentEmploymentId: 1,
// 用工列表
employmentList: [
......@@ -87,12 +89,14 @@
// 分类标签点击事件
function onCategoryTabClick(tab: any) {
console.log('点击分类标签:', tab)
pageData.currentCategoryId = tab.id
// 在这里添加具体的分类标签点击逻辑
}
// 用工类型标签点击事件
function onEmploymentTabClick(tab: any) {
console.log('点击用工类型标签:', tab)
pageData.currentEmploymentId = tab.id
// 在这里添加具体的用工类型标签点击逻辑
}
......@@ -117,10 +121,13 @@
v-for="tab in pageData.categoryTabs"
:key="tab.id"
class="codefun-flex-col codefun-justify-start codefun-items-center"
:class="[tab.id === 1 ? 'text-wrapper' : 'text-wrapper_2', tab.id > 1 ? 'codefun-ml-12' : '']"
:class="[
tab.id === pageData.currentCategoryId ? 'text-wrapper' : 'text-wrapper_2',
tab.id > 1 ? 'codefun-ml-12' : '',
]"
@click="onCategoryTabClick(tab)"
>
<text class="font_2" :class="[`text_${tab.id + 1}`]">
<text class="font_2 text_2">
{{ tab.name }}
</text>
</view>
......@@ -130,15 +137,11 @@
<view
v-for="tab in pageData.employmentTabs"
:key="tab.id"
class="codefun-flex-col codefun-justify-start codefun-items-center"
:class="[
tab.id === 1 ? 'text-wrapper_3' : '',
tab.id > 1 ? 'codefun-self-start' : '',
tab.id > 1 ? 'ml-55' : '',
]"
class="codefun-flex-col codefun-justify-start codefun-items-center text-50p"
:class="[tab.id === pageData.currentEmploymentId ? 'text-wrapper_3' : 'codefun-self-start']"
@click="onEmploymentTabClick(tab)"
>
<text class="font_2" :class="[`text_${tab.id + 6}`]">
<text class="font_2">
{{ tab.name }}
</text>
</view>
......@@ -309,16 +312,25 @@
border-right: solid 2rpx #ffffffcc;
border-top: solid 2rpx #ffffffcc;
border-bottom: solid 2rpx #ffffffcc;
.text-50p {
width: 50%;
padding: 0.75rem 0 1.625rem;
}
.text-wrapper_3 {
padding: 24rpx 0 52rpx;
background-color: #ffffff;
border-radius: 32rpx;
width: 348rpx;
height: 102rpx;
.text_7 {
color: #333333;
line-height: 26.16rpx;
}
.font_2 {
color: #1f2937;
}
}
.codefun-self-start {
.font_2 {
color: #5db66f;
}
}
.text_8 {
margin-top: 20rpx;
......@@ -343,11 +355,11 @@
.font_4 {
font-size: 24rpx;
font-family: DingTalk Sans;
line-height: 22rpx;
// line-height: 22rpx;
color: #999999;
}
.text_10 {
line-height: 23.36rpx;
// line-height: 23.36rpx;
}
}
.image_8 {
......
<script>
export default {
components: {},
props: {},
data() {
return {}
},
<script setup lang="ts">
import { reactive } from 'vue'
methods: {},
const pageData = reactive({
// 分类标签
categoryTabs: [
{ id: 1, name: '找农机' },
{ id: 2, name: '干农活' },
],
currentCategoryId: 1,
})
// 分类标签点击事件
function onCategoryTabClick(tab: any) {
console.log('点击分类标签:', tab)
pageData.currentCategoryId = tab.id
// 在这里添加具体的分类标签点击逻辑
}
</script>
......@@ -24,10 +32,17 @@
</view>
</view>
<view class="codefun-flex-row section_3">
<view class="codefun-flex-col codefun-justify-start codefun-items-center text-wrapper">
<text class="font_2 text_4">找农机</text>
<view
v-for="item in pageData.categoryTabs"
:key="item.id"
class="codefun-flex-col codefun-justify-start codefun-items-center text-50p"
:class="item.id === pageData.currentCategoryId ? 'text-wrapper' : ''"
@click="onCategoryTabClick(item)"
>
<text class="font_2" :class="item.id === pageData.currentCategoryId ? 'text_4' : 'text_5'">{{
item.name
}}</text>
</view>
<text class="codefun-self-start font_2 text_5 codefun-ml-56">干农活</text>
</view>
<view class="codefun-flex-col codefun-relative section_4">
<view class="codefun-flex-row group_6">
......@@ -272,18 +287,20 @@
background-color: #ffffff66;
border-radius: 32rpx;
border: solid 2rpx #ffffffcc;
.text-50p {
width: 50%;
height: 102rpx;
padding: 0.75rem 0 1.625rem;
}
.text-wrapper {
padding: 24rpx 0 56rpx;
background-color: #ffffff;
border-radius: 32rpx;
width: 348rpx;
height: 102rpx;
.text_4 {
line-height: 26.02rpx;
}
}
.text_5 {
margin-top: 24rpx;
color: #5db66f;
line-height: 25.82rpx;
}
......
<script>
export default {
components: {},
props: {},
data() {
return {}
},
methods: {},
}
</script>
<script setup lang="ts"></script>
<template>
<view class="codefun-flex-col page">
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论