提交 725577fa 作者: 方治民

Merge branch 'dev' of https://gitlab.yiring.com/digital-agri/agri-app into dev

# APP 名称
VITE_GLOB_APP_NAME = 数字农服
VITE_GLOB_APP_NAME = 湘农数智农服
# APP 描述
VITE_GLOB_APP_DESCRIPTION = 数字农服
VITE_GLOB_APP_DESCRIPTION = 湘农数智农服
# API 接口地址
VITE_GLOB_API_URL=http://111.22.182.169:49600
# VITE_GLOB_API_URL=http://36.133.16.81:42111
# VITE_GLOB_API_URL=http://111.22.182.169:49600
VITE_GLOB_API_URL=http://36.133.16.81:42111
# API 接口地址前缀
VITE_GLOB_API_URL_PREFIX=/jeecgboot
# VITE_GLOB_API_URL_PREFIX=/jeecg-boot
# VITE_GLOB_API_URL_PREFIX=/jeecgboot
VITE_GLOB_API_URL_PREFIX=/jeecg-boot
{
"name": "数字农服",
"version": "1.0.25",
"version": "1.0.29",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "数字农服",
"version": "1.0.25",
"version": "1.0.29",
"dependencies": {
"@dcloudio/uni-app": "3.0.0-4060620250520001",
"@dcloudio/uni-app-plus": "3.0.0-4060620250520001",
{
"name": "数字农服",
"name": "湘农数智农服",
"version": "1.0.29",
"description": "数字农服",
"description": "湘农数智农服",
"keywords": [
"app",
"basic"
......
......@@ -3,6 +3,7 @@ import { otherHttp } from '/@/utils/http/axios'
enum Api {
cascaderHn = '/region/cascader/hn', // 获取湖南省内 市/区县/乡镇级联数据
queryByType = '/banner/queryByType', // 获取开屏页背景图片
}
/**
......@@ -14,3 +15,16 @@ export function cascaderHn() {
url: Api.cascaderHn,
})
}
/**
* 获取开屏页大背景图片
* @returns 大背景图片
*/
export function getQueryByType(params = {}) {
return otherHttp.get({
url: Api.queryByType,
params,
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
}
})
}
\ No newline at end of file
......@@ -7,7 +7,62 @@ enum Api {
employmentDetails = '/employment/queryById', // 查看用工详情
employmentEdit = '/employment/app/edit', // 编辑用工
employmentRegister = '/employment/app/register', // 报名用工
queryConditions = '/sys/region/queryConditions', // 组合条件查询市——村
gitListByCodeDict = '/sys/dictItem/listByCode', // 查询字典
queryByCategoryAndCode = '/sys/labelCategory/queryByCategoryAndCode', // 查询字典
postLaborAdd = '/server/labor/add', // 新增
}
/**
* @param params 请求参数
* @description: 找人干活发布 新增
*/
export function postLaborAdd(params = {}) {
return otherHttp.post({
url: Api.postLaborAdd,
params,
})
}
/**
* @param params 查询指定分类和编码下的子类
* @description: 找人干活发布 获取人员技能
*/
export function queryByCategoryAndCode(params = {}) {
return otherHttp.get({
url: Api.queryByCategoryAndCode,
params,
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
})
}
/**
* @param params 请求参数
* @description: 找人干活发布 获取字典值
*/
export function gitListByCodeDict(params = {}) {
return otherHttp.get({
url: Api.gitListByCodeDict,
params,
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
})
}
/**
* @param params 请求参数
* @description: 找人干活发布 获取到村
*/
export function queryConditions(params = {}) {
return otherHttp.post({
url: Api.queryConditions,
params,
})
}
/**
* @param params 请求参数
* @description: 用工列表
......
......@@ -4,8 +4,10 @@ enum Api {
getUserInfo = '/sys/user/login/setting/getUserData', // 查询登录用户信息
logout = '/sys/logout', // 登出
sysLogin = '/sys/mLogin', // 登陆
/* phoneLogin = '/sys/phoneLogin',
sms = '/sys/sms', */
phoneLogin = '/sys/phoneLogin',
sms = '/sys/sms',
sms = '/sys/getLoginVerifyCode',
dictList = '/sys/dict/queryAllDictItems', // 获取字典数据
location = '/tianditu/geocode', // 根据经纬度获取地址
sysRegister = '/app/user/register', // 注册
......
......@@ -47,3 +47,26 @@
.align-center{
align-items: center;
}
.yr_person_popup{
padding-top: 36rpx;
padding-left: 26rpx;
padding-right: 24rpx;
padding-bottom: 48rpx;
.popup_top{
display:flex;
justify-content: space-between;
.add_person_text{
color: #333333;
font-size: 28rpx;
}
.del_person_btn{
font-size: 28rpx;
color: #FF8063;
}
}
.popup_content{
}
}
{
"name": "数字农服",
"name": "湘农数智农服",
"appid": "__UNI__FD09823",
"description": "数字农服 APP",
"description": "湘农数智农服 APP",
"versionName": "1.0.29",
"versionCode": 10029,
"transformPx": false,
......
{
"pages": [
{
"path": "pages/splash/splash",
"style": {
"navigationStyle": "custom",
"transparentTitle": "auto",
"backgroundColor": "#FFFFFF",
"enablePullDownRefresh": false,
"app-plus": {
"titleNView": {}
}
}
},
{
"path": "pages/login/login",
"style": {
"navigationStyle": "custom",
......@@ -402,6 +414,32 @@
}
},
{
"path": "pages/linghuoyonggong/publishEmployment",
"style": {
"navigationBarTitleText": "发布",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#5DB66F",
"navigationBarTextStyle": "white",
"backgroundColorBottom": "#F2F2F2",
"app-plus": {
"titleNView": {}
}
}
},
{
"path": "pages/linghuoyonggong/details",
"style": {
"navigationBarTitleText": "详情",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#5DB66F",
"navigationBarTextStyle": "white",
"backgroundColorBottom": "#F2F2F2",
"app-plus": {
"titleNView": {}
}
}
},
{
"path": "pages/zhunongjinrong/zhunongjinrong",
"style": {
"navigationBarTitleText": "助农金融",
......
......@@ -8,7 +8,7 @@
const src = ref<string>()
onLoad(({ token, userId }) => {
src.value = `/hybrid/html/chat.html?token=${token}&userId=${userId}`
src.value = `/static/chat.html?token=${token}&userId=${userId}`
})
</script>
......
<script setup lang="ts">
import { reactive, toRefs } from 'vue'
import { onLoad, onShow } from '@dcloudio/uni-app'
import { useUserStore } from '@/store/modules/user'
const userStore = useUserStore()
onLoad((option) => {
console.log(option.id);
uni.setNavigationBarTitle({
title: '详情'+option.id
});
})
onShow(() => {
})
const pageData = reactive({
loading: false,
options: {
area: [],
urgentdegree: [],
type: [],
},
position: [],
})
</script>
<template>
<view class="details_page">
</view>
<fui-loading isFixed v-if="pageData.loading" backgroundColor="rgba(0, 0, 0, 0.4)" />
</template>
<style lang="scss" scoped>
.details_page{
background: rgba(230, 245, 232, 1);
min-height: 100vh;
width: 750rpx;
}
</style>
<script setup lang="ts">
import { reactive } from 'vue'
import { onShow } from '@dcloudio/uni-app'
import WeatherForecast from './components/WeatherForecast.vue'
// import WeatherForecast from './components/WeatherForecast.vue'
import Navigate from '@/utils/page/navigate'
import dayjs from 'dayjs'
......@@ -493,7 +493,7 @@ onHide(() => {
<view class="codefun-flex-col group">
<view class="codefun-flex-col section">
<view class="codefun-flex-col">
<WeatherForecast />
<!-- <WeatherForecast /> -->
<!-- <text class="codefun-self-center font text">{{ pageData.header.title }}</text> -->
<view class="codefun-flex-col codefun-self-stretch !hidden">
<!-- <view class="codefun-flex-row codefun-items-center section_2">
......@@ -548,11 +548,10 @@ onHide(() => {
</view>
</view>
<view class="codefun-flex-col mt-4">
<view class="codefun-flex-row codefun-justify-between codefun-items-center">
<!-- <view class="codefun-flex-row codefun-justify-between codefun-items-center">
<text class="font">我的农场</text>
<!-- <text class="font_6 text_17">全部</text> -->
</view>
<view class="h-300rpx codefun-flex-col mr-3.5 mt-17 nongchang_box relative">
</view> -->
<view class="h-300rpx codefun-flex-col mr-3.5 mt-7 nongchang_box relative">
<image class="w-full h-full" src="/static/images/nongchang/mynongchang-1.png" />
<view
v-show="pageData.hasFarm"
......@@ -807,8 +806,12 @@ onHide(() => {
.group {
.section {
padding: 0 28rpx 98rpx;
background-image: url('/static/images/codefun/7a5dc4ee864fe55da98b41c14ee3b931.png');
// padding: 0 28rpx 98rpx;
// background-image: url('/static/images/codefun/7a5dc4ee864fe55da98b41c14ee3b931.png');
padding-top: 98rpx;
height: 574rpx;
width: 750rpx;
background-image: linear-gradient(179.89deg, rgba(93, 182, 111, 1) 0%, rgba(230, 245, 232, 1) 100%);
background-size: 100% 100%;
background-repeat: no-repeat;
......@@ -936,9 +939,9 @@ onHide(() => {
}
.group_6 {
margin-top: -92rpx;
margin-top: -574rpx;
padding-left: 28rpx;
z-index: 10;
.section_4 {
margin-right: 28rpx;
padding: 28rpx 28rpx 24rpx;
......
......@@ -11,7 +11,9 @@ import Navigate from '@/utils/page/navigate'
import * as AreaDict from '@/utils/dict/area'
import { getList } from '@/api/model/news'
import { getList as getVideoList } from '@/api/model/knowledgeVideo'
import { useUserStore } from '@/store/modules/user'
const userStore = useUserStore()
const dictStore = useDictStore()
const model = reactive({
// 湖南省人民政府
......@@ -86,7 +88,7 @@ onShow(() => {
UserAPI.location({ lat: res.latitude, lon: res.longitude })
.then((res) => {
console.log('UserAPI.location', res)
pageData.weather.detailedLocation = `${res.province}-${res.city}-${res.country}-${res.road
pageData.weather.detailedLocation = `${res.country}-${res.road
}-${res.town}-${res.address}`
})
.catch(() => {
......@@ -152,6 +154,14 @@ onPullDownRefresh(() => {
}, 1000)
})
function openAITools() {
uni.navigateTo({
animationType: 'slide-in-bottom',
// 最新版 SDK Webview 嵌入版本,支持绑定用户 ID,支持自定义样式等
url: `/pages/common/chat/webview?token=&userId=${userStore.getUserInfo?.id}`,
})
}
function getWeatherRecommend(weather: string) {
switch (weather) {
case '晴':
......@@ -464,14 +474,24 @@ onHide(() => {
<image class="w-64 h-64" src="/static/images/home/icon.png" />
<text class="text">{{ pageData.header.title }}</text>
</view>
<text class="text" style="font-family: alimamashuheiti">湖南省</text>
<!-- <text class="text" style="font-family: alimamashuheiti">湖南省</text> -->
</view>
<!-- ai助手 -->
<FuiMovableView top="650" right="10" zIndex="99999">
<!-- <FuiMovableView top="650" right="-12" zIndex="99999">
<view class="h-80rpx flex items-center" @click="openAITools">
<image class="w-117rpx h-118rpx" src="/static/images/codefun/ai.png" alt="" />
</view>
</FuiMovableView>
</FuiMovableView> -->
<view class="top-movable-area">
<movable-area class="movable-area">
<movable-view class="movable-view" direction="vertical" y="650rpx">
<view class="ai_icon" @click="openAITools">
<image class="ai_icon" src="/static/images/codefun/ai.png" alt="" />
</view>
</movable-view>
</movable-area>
</view>
<view class="codefun-flex-col codefun-relative group_3">
<view class="codefun-flex-col">
<view class="codefun-flex-col codefun-self-stretch group_4">
......@@ -1604,4 +1624,22 @@ onHide(() => {
text-overflow: ellipsis;
/* 可选,部分浏览器不生效 */
}
.top-movable-area{
height: 100vh;
width: 122rpx;
position: fixed;
top: 0rpx;
right:0rpx;
z-index: 9999;
overflow: hidden;
.movable-area{
height: 100vh;
width: 122rpx;
.movable-view,.ai_icon{
width: 120rpx;
height: 120rpx;
}
}
}
</style>
<script setup lang="ts">
// import { onMounted, onUnmounted, ref } from 'vue'
import { getQueryByType } from '/@/api/model/dict'
const mediaUrl = ref('')
const seconds = ref(4)
let timer = null
onLoad(() => {
getServiceItems()
})
onMounted(() => {
countdown()
})
onUnmounted(() => {
clearTimerInterval()
})
function clearTimerInterval() {
clearInterval(timer)
}
function getServiceItems() {
getQueryByType({ type: 2 }).then((res) => {
mediaUrl.value = res[0].mediaUrl
})
}
function countdown() {
timer = setInterval(() => {
if (seconds.value > 0) {
seconds.value -= 1
} else {
clearTimerInterval()
navigateToLogin()
}
}, 1000)
}
function navigateToLogin() {
uni.redirectTo({
url: '/pages/login/login',
})
}
</script>
<template>
<view class="container">
<image class="splash_bg" :src="mediaUrl" mode="aspectFill" />
<!-- <view class="middle_logo_content">
<view class="logo_view">
<image class="splash_logo" src="/static/images/home/icon.png" />
</view>
<image class="logo_text_bg" src="/static/images/splash/logo_text.png"></image>
<image class="server_text_bg" src="/static/images/splash/server_text.png"></image>
<image class="outline_bg" src="/static/images/splash/outline.png"></image>
</view> -->
<view class="countdown_view">
<image class="shadow_img" src="/static/images/splash/shadow.png" />
<view class="countdown_val"
><text>{{ seconds }}s</text></view
>
</view>
<view class="under_btn_view">
<fui-button
height="80rpx"
background="linear-gradient(233.81deg, rgba(92, 181, 110, 1) 0%, rgba(100, 214, 62, 1) 100%)"
size="28rpx"
radius="40rpx"
text="立即体验"
@click="navigateToLogin"
/>
</view>
</view>
</template>
<style lang="less" scoped>
.container {
height: 100vh;
width: 750rpx;
position: relative;
.splash_bg {
width: 100%;
height: 100vh;
}
.middle_logo_content {
position: absolute;
top: 250rpx;
left: 0rpx;
right: 0rpx;
display: flex;
flex-direction: column;
align-items: center;
.logo_view {
width: 136rpx;
height: 136rpx;
border-radius: 24rpx;
background-color: #fff;
display: flex;
justify-content: center;
align-items: center;
.splash_logo {
width: 110rpx;
height: 110rpx;
}
}
.logo_text_bg {
margin-top: 32rpx;
width: 192rpx;
height: 64rpx;
}
.server_text_bg {
width: 528rpx;
height: 116rpx;
}
.outline_bg {
margin-top: -36rpx;
width: 464rpx;
height: 54rpx;
}
}
.countdown_view {
position: absolute;
left: 612rpx;
top: 118rpx;
width: 108rpx;
height: 52rpx;
.shadow_img {
width: 108rpx;
height: 52rpx;
}
.countdown_val {
width: 108rpx;
height: 52rpx;
position: absolute;
left: 0rpx;
top: 0rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 26rpx;
color: #fff;
font-weight: 400;
}
}
.under_btn_view {
width: 650rpx;
position: absolute;
bottom: 52rpx;
left: 50rpx;
}
}
</style>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta
content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0,viewport-fit=cover"
name="viewport"
/>
<title>AI Chat</title>
<style>
body {
margin: 0;
padding: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
background-color: #fff;
}
#chat-bot {
position: fixed;
inset: 0;
z-index: 9999;
box-sizing: border-box;
/* 兼容 iOS < 11.2 */
padding-bottom: constant(safe-area-inset-bottom);
/* 兼容 iOS >= 11.2 */
padding-bottom: env(safe-area-inset-bottom);
/* 兼容 iOS < 11.2 */
padding-top: constant(safe-area-inset-top);
/* 兼容 iOS >= 11.2 */
padding-top: env(safe-area-inset-top);
}
.close-btn {
z-index: 99999;
position: absolute;
right: 12px;
top: calc(18px + constant(safe-area-inset-top));
top: calc(18px + env(safe-area-inset-top));
padding: 8px;
}
.android #chat-bot {
/* 兼容 iOS < 11.2 */
padding-top: calc(18px + constant(safe-area-inset-top));
/* 兼容 iOS >= 11.2 */
padding-top: calc(18px + env(safe-area-inset-top));
}
.android .close-btn {
/* 兼容 iOS < 11.2 */
top: calc(18px + 18px + constant(safe-area-inset-top));
/* 兼容 iOS >= 11.2 */
top: calc(18px + 18px + env(safe-area-inset-top));
}
</style>
</head>
<body>
<script
type="text/javascript"
src="https://hntq-res.oss-cn-shenzhen.aliyuncs.com/uni.webview.1.5.6.js"
></script>
<script type="text/javascript">
const u = navigator.userAgent
const isAndroid = u.includes('Android') || u.includes('Adr')
if (isAndroid) {
document.body.classList.add('android')
}
// 待触发 `UniAppJSBridgeReady` 事件后,即可调用 uni 的 API。
document.addEventListener('UniAppJSBridgeReady', function () {
// 添加关闭按钮
const div = document.createElement('div')
div.className = 'close-btn'
div.innerHTML =
'<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24"><path fill="#666" d="m12 13.4l-4.9 4.9q-.275.275-.7.275t-.7-.275t-.275-.7t.275-.7l4.9-4.9l-4.9-4.9q-.275-.275-.275-.7t.275-.7t.7-.275t.7.275l4.9 4.9l4.9-4.9q.275-.275.7-.275t.7.275t.275.7t-.275.7L13.4 12l4.9 4.9q.275.275.275.7t-.275.7t-.7.275t-.7-.275z"/></svg>'
div.onclick = function () {
uni.navigateBack()
}
document.body.appendChild(div)
})
</script>
<div id="chat-bot"></div>
<script src="https://lf-cdn.coze.cn/obj/unpkg/flow-platform/chat-app-sdk/1.1.0-beta.0/libs/cn/index.js"></script>
<script>
function getUrlParams(url) {
const paramsObj = {}
if (!url) {
url = window.location.href
}
const questionIndex = url.indexOf('?')
if (questionIndex !== -1) {
const paramStr = url.slice(questionIndex + 1)
const paramArr = paramStr.split('&')
paramArr.forEach((param) => {
const [key, value] = param.split('=')
paramsObj[key] = decodeURIComponent(value)
})
}
return paramsObj
}
const params = getUrlParams()
const cozeWebSDK = new CozeWebSDK.WebChatClient({
config: {
bot_id: '7571349247409979402',
},
userInfo: {
id: params.userId,
url: 'https://hntq.yiring.com/minio/public/system/ai/hntq-ai-user-2.png',
// nickname: "壹润科技",
},
ui: {
base: {
layout: 'mobile',
lang: 'zh-CN',
icon: 'https://hntq.yiring.com/minio/public/system/ai/hntq-ai-logo.png',
},
header: {
isNeedClose: false,
},
footer: {
isShow: false,
},
chatBot: {
title: 'AI 农技助手',
uploadable: false,
el: document.getElementById('chat-bot'),
},
asstBtn: {
isNeed: false,
},
},
})
cozeWebSDK.showChatBot()
</script>
</body>
</html>
src/static/images/codefun/ai.png

10.4 KB | W: | H:

src/static/images/codefun/ai.png

17.6 KB | W: | H:

src/static/images/codefun/ai.png
src/static/images/codefun/ai.png
src/static/images/codefun/ai.png
src/static/images/codefun/ai.png
  • 2-up
  • Swipe
  • Onion skin
src/static/images/home/icon.png

2.7 KB | W: | H:

src/static/images/home/icon.png

102.2 KB | W: | H:

src/static/images/home/icon.png
src/static/images/home/icon.png
src/static/images/home/icon.png
src/static/images/home/icon.png
  • 2-up
  • Swipe
  • Onion skin
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论