页面完善
This commit is contained in:
parent
95ed5eebf2
commit
4b4ea2375e
10
App.vue
10
App.vue
|
@ -46,11 +46,11 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
// .content {
|
||||||
padding: 20rpx 28.5rpx;
|
// padding: 20rpx 28.5rpx;
|
||||||
background-color: #F4F4F4;
|
// background-color: #F4F4F4;
|
||||||
min-height: 100vh;
|
// min-height: 100vh;
|
||||||
}
|
// }
|
||||||
|
|
||||||
.more-jt {
|
.more-jt {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
@ -1,72 +1,11 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="">
|
<view class="">
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="border-bgc">
|
|
||||||
</view>
|
|
||||||
<view class="" style="height: 30rpx;">
|
|
||||||
</view>
|
|
||||||
<view class="card">
|
|
||||||
<view class="card-li">
|
|
||||||
农户名称: {{userInfo.name}}
|
|
||||||
</view>
|
|
||||||
<view class="card-li">
|
|
||||||
种养殖类型: 种植户
|
|
||||||
</view>
|
|
||||||
<view class="card-li">
|
|
||||||
土地面积: {{userInfo.total_land_area}}亩
|
|
||||||
</view>
|
|
||||||
<view class="card-li">
|
|
||||||
地址: {{userInfo.area_name}}{{userInfo.street_name}}{{userInfo.village_name}}{{userInfo.brigade_name}}
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="card" v-for="(item,index) in userInfo.land_detail" :key="index"
|
|
||||||
@click="navgoFn(item.is_cropped,item.land_id)">
|
|
||||||
<view class="tit card-li">
|
|
||||||
<view class="">
|
|
||||||
{{item.land_notes}}
|
|
||||||
</view>
|
|
||||||
<view class="" style="color: #00A15E;" v-if="item.is_cropped">
|
|
||||||
已种植
|
|
||||||
</view>
|
|
||||||
<view class="" style="color: #00A15E;" v-else>
|
|
||||||
未种植
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="card-li">
|
|
||||||
<view class="">
|
|
||||||
面积: {{item.land_area}}亩
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="card-li tit" v-if="item.crop_name">
|
|
||||||
<view class="" style="font-weight: normal;">
|
|
||||||
农作物: {{item.crop_name}}
|
|
||||||
</view>
|
|
||||||
<view class="" style="color: #FF9B66;" v-if="item.ripe_time">
|
|
||||||
已成熟
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="card-li tit" style="font-weight: normal;" v-show="item.crop_yield">
|
|
||||||
<view class="">
|
|
||||||
预计产量: {{item.crop_yield}}kg
|
|
||||||
</view>
|
|
||||||
<view class="" v-if="false">
|
|
||||||
已出售: 500kg
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view style="height: 170rpx;">
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="bottom">
|
|
||||||
<view class="add-btn" @click="navgo('/pages/growRecord/index')">
|
|
||||||
批量处理
|
|
||||||
</view>
|
|
||||||
<!-- <view class="add-btn add" @click="navgo('/pages/InformationAdd/index')">
|
|
||||||
增加种植
|
|
||||||
</view> -->
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -77,6 +16,22 @@
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
userInfo: Object
|
userInfo: Object
|
||||||
})
|
})
|
||||||
|
// 获取位置
|
||||||
|
const getPositionFn = () => {
|
||||||
|
uni.getLocation({
|
||||||
|
type: 'gcj02',
|
||||||
|
geocode: true,
|
||||||
|
isHighAccuracy: true,
|
||||||
|
success: function(res) {
|
||||||
|
uni.request({
|
||||||
|
url: `https://restapi.amap.com/v3/geocode/regeo?output=JSON&location=${res.longitude},${res.latitude}&key=b0c21bc6b220aa882bad8ffb6bce8829&radius=1000&extensions=all`,
|
||||||
|
success: (res) => {
|
||||||
|
console.log(res)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
const userInfo = reactive(props.userInfo)
|
const userInfo = reactive(props.userInfo)
|
||||||
|
|
||||||
|
@ -116,56 +71,5 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.card {
|
|
||||||
position: relative;
|
|
||||||
width: 693.93rpx;
|
|
||||||
margin: auto;
|
|
||||||
background-color: #fff;
|
|
||||||
box-sizing: border-box;
|
|
||||||
border-radius: 21.03rpx 21.03rpx 21.03rpx 21.03rpx;
|
|
||||||
margin-bottom: 40rpx;
|
|
||||||
|
|
||||||
.card-li {
|
|
||||||
// margin-bottom: 17rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tit {
|
|
||||||
display: flex;
|
|
||||||
font-size: 33.29rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
// background-color: red;
|
|
||||||
justify-content: space-between;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.bottom {
|
|
||||||
width: 750rpx;
|
|
||||||
height: 150rpx;
|
|
||||||
background-color: #EAF2EF;
|
|
||||||
position: fixed;
|
|
||||||
bottom: 0;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
|
|
||||||
.add-btn {
|
|
||||||
width: 238.32rpx;
|
|
||||||
height: 84.11rpx;
|
|
||||||
border: #34D190 1px solid;
|
|
||||||
border-radius: 42.06rpx 42.06rpx 42.06rpx 42.06rpx;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
color: #00A15E;
|
|
||||||
font-size: 33.29rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
justify-content: center;
|
|
||||||
margin-right: 20rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.add {
|
|
||||||
background-color: #00A15E;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
|
@ -40,6 +40,7 @@
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
172
manifest.json
172
manifest.json
|
@ -1,77 +1,97 @@
|
||||||
{
|
{
|
||||||
"name": "test",
|
"name" : "test",
|
||||||
"appid": "__UNI__B1D7CFE",
|
"appid" : "__UNI__D087881",
|
||||||
"description": "",
|
"description" : "",
|
||||||
"versionName": "1.0.0",
|
"versionName" : "1.0.1",
|
||||||
"versionCode": "100",
|
"versionCode" : "100",
|
||||||
"transformPx": false,
|
"transformPx" : false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
"app-plus": {
|
"app-plus" : {
|
||||||
"usingComponents": true,
|
"usingComponents" : true,
|
||||||
"nvueStyleCompiler": "uni-app",
|
"nvueStyleCompiler" : "uni-app",
|
||||||
"compilerVersion": 3,
|
"compilerVersion" : 3,
|
||||||
"splashscreen": {
|
"splashscreen" : {
|
||||||
"alwaysShowBeforeRender": true,
|
"alwaysShowBeforeRender" : true,
|
||||||
"waiting": true,
|
"waiting" : true,
|
||||||
"autoclose": true,
|
"autoclose" : true,
|
||||||
"delay": 0
|
"delay" : 0
|
||||||
},
|
},
|
||||||
/* 模块配置 */
|
/* 模块配置 */
|
||||||
"modules": {},
|
"modules" : {
|
||||||
/* 应用发布信息 */
|
"Geolocation" : {},
|
||||||
"distribute": {
|
"Maps" : {},
|
||||||
/* android打包配置 */
|
"LivePusher" : {}
|
||||||
"android": {
|
},
|
||||||
"permissions": [
|
/* 应用发布信息 */
|
||||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
"distribute" : {
|
||||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
/* android打包配置 */
|
||||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
"android" : {
|
||||||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
"permissions" : [
|
||||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||||
],
|
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||||
"minSdkVersion": 21
|
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
|
||||||
},
|
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||||
/* ios打包配置 */
|
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||||
"ios": {
|
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||||
"dSYMs": false
|
],
|
||||||
},
|
"minSdkVersion" : 21
|
||||||
/* SDK配置 */
|
},
|
||||||
"sdkConfigs": {
|
/* ios打包配置 */
|
||||||
"ad": {}
|
"ios" : {
|
||||||
}
|
"dSYMs" : false
|
||||||
}
|
},
|
||||||
},
|
/* SDK配置 */
|
||||||
/* 快应用特有相关 */
|
"sdkConfigs" : {
|
||||||
"quickapp": {},
|
"ad" : {},
|
||||||
/* 小程序特有相关 */
|
"geolocation" : {
|
||||||
"mp-weixin": {
|
"amap" : {
|
||||||
"appid": "",
|
"name" : "amapC2GgorTaY",
|
||||||
"setting": {
|
"__platform__" : [ "android" ],
|
||||||
"urlCheck": false
|
"appkey_ios" : "b0c21bc6b220aa882bad8ffb6bce8829",
|
||||||
},
|
"appkey_android" : "b0c21bc6b220aa882bad8ffb6bce8829"
|
||||||
"usingComponents": true
|
}
|
||||||
},
|
},
|
||||||
"mp-alipay": {
|
"maps" : {
|
||||||
"usingComponents": true
|
"amap" : {
|
||||||
},
|
"name" : "amapC2GgorTaY",
|
||||||
"mp-baidu": {
|
"appkey_ios" : "b0c21bc6b220aa882bad8ffb6bce8829",
|
||||||
"usingComponents": true
|
"appkey_android" : "b0c21bc6b220aa882bad8ffb6bce8829"
|
||||||
},
|
}
|
||||||
"mp-toutiao": {
|
}
|
||||||
"usingComponents": true
|
}
|
||||||
},
|
}
|
||||||
"uniStatistics": {
|
},
|
||||||
"enable": false
|
/* 快应用特有相关 */
|
||||||
},
|
"quickapp" : {},
|
||||||
"vueVersion": "3"
|
/* 小程序特有相关 */
|
||||||
}
|
"mp-weixin" : {
|
||||||
|
"appid" : "",
|
||||||
|
"setting" : {
|
||||||
|
"urlCheck" : false
|
||||||
|
},
|
||||||
|
"usingComponents" : true
|
||||||
|
},
|
||||||
|
"mp-alipay" : {
|
||||||
|
"usingComponents" : true
|
||||||
|
},
|
||||||
|
"mp-baidu" : {
|
||||||
|
"usingComponents" : true
|
||||||
|
},
|
||||||
|
"mp-toutiao" : {
|
||||||
|
"usingComponents" : true
|
||||||
|
},
|
||||||
|
"uniStatistics" : {
|
||||||
|
"enable" : false
|
||||||
|
},
|
||||||
|
"vueVersion" : "3"
|
||||||
|
}
|
||||||
|
|
70
pages.json
70
pages.json
|
@ -332,23 +332,50 @@
|
||||||
"navigationBarTextStyle": "black"
|
"navigationBarTextStyle": "black"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 和撒旦发射点恢复健康快点发货速度较快
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
"path": "pages/test/index",
|
"path": "pages/addLand/addLand",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "uni-app",
|
"navigationBarTitleText": "添加土地信息",
|
||||||
"enablePullDownRefresh": true
|
"enablePullDownRefresh": false,
|
||||||
|
"navigationBarBackgroundColor": "#F4F4F4",
|
||||||
|
"navigationBarTextStyle": "black"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/updatePassword/updatePassword",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "密码修改",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"navigationBarBackgroundColor": "#F4F4F4",
|
||||||
|
"navigationBarTextStyle": "black"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/index/massif",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "地块",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"navigationBarBackgroundColor": "#F4F4F4",
|
||||||
|
"navigationBarTextStyle": "black"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/index/personal",
|
||||||
|
"style": {
|
||||||
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"path": "pages/test/index1",
|
"path": "pages/Login/login",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "uni-app",
|
"navigationStyle": "custom"
|
||||||
"enablePullDownRefresh": true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
"navigationBarTextStyle": "black",
|
"navigationBarTextStyle": "black",
|
||||||
|
@ -356,6 +383,31 @@
|
||||||
"navigationBarBackgroundColor": "#F8F8F8",
|
"navigationBarBackgroundColor": "#F8F8F8",
|
||||||
"backgroundColor": "#F8F8F8"
|
"backgroundColor": "#F8F8F8"
|
||||||
},
|
},
|
||||||
|
"tabBar": {
|
||||||
|
"color": "#B3B3B3",
|
||||||
|
"selectedColor": "#272822",
|
||||||
|
"borderStyle": "white",
|
||||||
|
"backgroundColor": "#EBF1EF",
|
||||||
|
"list": [{
|
||||||
|
"pagePath": "pages/index/index",
|
||||||
|
"text": "首页",
|
||||||
|
"iconPath": "static/tabs-icon/home.png",
|
||||||
|
"selectedIconPath": "static/img/DK.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pagePath": "pages/index/massif",
|
||||||
|
"text": "地块",
|
||||||
|
"iconPath": "static/img/SJ (1).png",
|
||||||
|
"selectedIconPath": "static/img/SJ (1).png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pagePath": "pages/index/personal",
|
||||||
|
"text": "我的",
|
||||||
|
"iconPath": "static/img/WD.png",
|
||||||
|
"selectedIconPath": "static/img/WD.png"
|
||||||
|
}
|
||||||
|
|
||||||
|
]
|
||||||
|
},
|
||||||
"uniIdRouter": {}
|
"uniIdRouter": {}
|
||||||
}
|
}
|
|
@ -0,0 +1,101 @@
|
||||||
|
<template>
|
||||||
|
|
||||||
|
|
||||||
|
<view class="box">
|
||||||
|
<view class="content">
|
||||||
|
<view class="tit">
|
||||||
|
欢迎进入吟龙土壤墒情监测溯系统!
|
||||||
|
</view>
|
||||||
|
<view class="input-card">
|
||||||
|
<view class="login-type">
|
||||||
|
账号登录
|
||||||
|
<view class="line" />
|
||||||
|
</view>
|
||||||
|
<view class="" style="margin: 30rpx 0;">
|
||||||
|
<up-input placeholder="请输入账号"
|
||||||
|
customStyle="background:#F5F5F5;height:80rpx;padding-left:40rpx;border:none" shape='circle'
|
||||||
|
border="surround" v-model="formData.account"></up-input>
|
||||||
|
</view>
|
||||||
|
<view class="">
|
||||||
|
<up-input type="password" shape='circle'
|
||||||
|
customStyle="background:#F5F5F5;height:80rpx;padding-left:40rpx;border:none" placeholder="请输入密码"
|
||||||
|
border="surround" v-model="formData.password"></up-input>
|
||||||
|
</view>
|
||||||
|
<view class="sub-btn">
|
||||||
|
<up-button @click="submitFn" type="primary" customStyle="border:none;height:90rpx" color="#34D190"
|
||||||
|
text="登录"></up-button>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import {
|
||||||
|
reactive,
|
||||||
|
ref
|
||||||
|
} from 'vue';
|
||||||
|
const submitFn = () => {
|
||||||
|
|
||||||
|
uni.switchTab({
|
||||||
|
url: "/pages/index/index"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const formData = reactive({
|
||||||
|
account: "",
|
||||||
|
password: ""
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.box {
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
background-color: $theme-main-color;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
width: 700rpx;
|
||||||
|
|
||||||
|
.tit {
|
||||||
|
color: white;
|
||||||
|
font-size: 45rpx;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-card {
|
||||||
|
width: 620rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
height: auto;
|
||||||
|
padding: 40rpx;
|
||||||
|
border-radius: 30rpx;
|
||||||
|
|
||||||
|
.login-type {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
// align-items: center;
|
||||||
|
justify-content: flex-start;
|
||||||
|
|
||||||
|
.line {
|
||||||
|
border-top: 3px solid #34D190;
|
||||||
|
margin-left: 30rpx;
|
||||||
|
margin-top: 10rpx;
|
||||||
|
width: 60rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.sub-btn {
|
||||||
|
margin-top: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,200 @@
|
||||||
|
<template>
|
||||||
|
<view class="content">
|
||||||
|
|
||||||
|
<view class="card">
|
||||||
|
|
||||||
|
<u--form labelPosition="top" labelWidth='100' :model="formData" :rules="rules" ref="form">
|
||||||
|
<u-form-item label="土地名称" prop="formData.breed" borderBottom ref='item1' required>
|
||||||
|
<up-input placeholder="请输入土地名称" border="surround" v-model="formData.breed"></up-input>
|
||||||
|
</u-form-item>
|
||||||
|
<u-form-item label="土地面积" prop="formData.breed" borderBottom required>
|
||||||
|
<up-input placeholder="请输入土地面积" border="surround" v-model="formData.breed"></up-input>
|
||||||
|
</u-form-item>
|
||||||
|
<u-form-item label="土地地址" prop="formData.breed" borderBottom required>
|
||||||
|
<up-input placeholder="请选择土地地址" border="surround" v-model="formData.breed"></up-input>
|
||||||
|
</u-form-item>
|
||||||
|
<u-form-item label="土地负责人" prop="formData.breed" borderBottom required>
|
||||||
|
<up-input placeholder="请输入土地负责人" border="surround" v-model="formData.breed"></up-input>
|
||||||
|
</u-form-item>
|
||||||
|
<u-form-item label="负责人电话" prop="formData.breed" borderBottom required>
|
||||||
|
<up-input placeholder="请输入负责人电话" type="number" border="surround"
|
||||||
|
v-model="formData.breed"></up-input>
|
||||||
|
</u-form-item>
|
||||||
|
<view class="card-li">
|
||||||
|
<view class="card-li-tit">
|
||||||
|
土地图片
|
||||||
|
</view>
|
||||||
|
<view class="code-img">
|
||||||
|
<view class="" @click="updateImgFn">
|
||||||
|
<view class="" v-if="formData.buy_cert">
|
||||||
|
<u--image :src="formData.buy_cert" width="637.85rpx" height="350.47rpx"></u--image>
|
||||||
|
</view>
|
||||||
|
<view class="carime-icon" v-else>
|
||||||
|
<u--image src="/static/img/DJSC.png" width="91.12rpx" height="91.12rpx"></u--image>
|
||||||
|
<view class="">
|
||||||
|
点击上传图片
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</u--form>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- <view class="up-img confim-btn">
|
||||||
|
+上传播种图片
|
||||||
|
</view> -->
|
||||||
|
<view class="confirm">
|
||||||
|
<view class="confirm-btn" style="color: white;background-color: #0AA565;" @click="addFn">
|
||||||
|
完成添加
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<!-- <view class="today-btn confim-btn" @tap="sowFn">
|
||||||
|
今日播种
|
||||||
|
</view> -->
|
||||||
|
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import {
|
||||||
|
addFishAPI
|
||||||
|
} from "@/api/aquatic.js"
|
||||||
|
import uplodeImg from "@/utils/uplodeImg.js"
|
||||||
|
import {
|
||||||
|
reactive,
|
||||||
|
ref
|
||||||
|
} from "vue";
|
||||||
|
import {
|
||||||
|
onLoad
|
||||||
|
} from "@dcloudio/uni-app"
|
||||||
|
|
||||||
|
|
||||||
|
const form = ref(null)
|
||||||
|
// console.log()
|
||||||
|
const formData = reactive({
|
||||||
|
|
||||||
|
breed: ""
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
const rules = {
|
||||||
|
'formData.breed': {
|
||||||
|
type: 'string',
|
||||||
|
required: true,
|
||||||
|
message: '请填写姓名',
|
||||||
|
trigger: ['blur', 'change']
|
||||||
|
},
|
||||||
|
}
|
||||||
|
const navgo = (url) => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const addFn = () => {
|
||||||
|
form.value.validate().then(res => {
|
||||||
|
console.log(6)
|
||||||
|
}).catch(errors => {
|
||||||
|
uni.$u.toast('校验失败')
|
||||||
|
})
|
||||||
|
console.log()
|
||||||
|
return
|
||||||
|
this.$refs.uForm.validate().then(res => {
|
||||||
|
uni.$u.toast('校验通过')
|
||||||
|
}).catch(errors => {
|
||||||
|
uni.$u.toast('校验失败')
|
||||||
|
})
|
||||||
|
navgo('/pages/index/index')
|
||||||
|
}
|
||||||
|
|
||||||
|
const updateImgFn = async () => {
|
||||||
|
let res = await uplodeImg()
|
||||||
|
formData.buy_cert = res.data.image
|
||||||
|
}
|
||||||
|
onLoad((options) => {
|
||||||
|
|
||||||
|
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang='scss' scoped>
|
||||||
|
.tit {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-li-tit {
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.confim-btn {
|
||||||
|
margin: 0 auto;
|
||||||
|
width: 196.26rpx;
|
||||||
|
height: 66.59rpx;
|
||||||
|
/* border: ; */
|
||||||
|
border: #00A15E 1px solid;
|
||||||
|
color: #00A15E;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
border-radius: 42.06rpx 42.06rpx 42.06rpx 42.06rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.up-img {
|
||||||
|
width: 341.71rpx
|
||||||
|
}
|
||||||
|
|
||||||
|
.today-btn {
|
||||||
|
width: 588.79rpx;
|
||||||
|
background-color: #00A15E;
|
||||||
|
color: white;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 40rpx;
|
||||||
|
/* transform: ; */
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
background: linear-gradient(to right, #00A15E, #4CC593);
|
||||||
|
/* margin: 0 auto; */
|
||||||
|
}
|
||||||
|
|
||||||
|
.code-img {
|
||||||
|
background-color: #F4F4F4;
|
||||||
|
height: 350.47rpx;
|
||||||
|
position: relative;
|
||||||
|
margin-bottom: 100rpx;
|
||||||
|
|
||||||
|
.carime-icon {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.confirm {
|
||||||
|
position: fixed;
|
||||||
|
height: 84.11rpx;
|
||||||
|
display: flex;
|
||||||
|
bottom: 30rpx;
|
||||||
|
width: 750rpx;
|
||||||
|
|
||||||
|
.confirm-btn {
|
||||||
|
width: 315.42rpx;
|
||||||
|
height: 84.11rpx;
|
||||||
|
border: #00A15E 1px solid;
|
||||||
|
margin: 0 auto;
|
||||||
|
border-radius: 80rpx;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 84rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -1,152 +1,12 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<imgCard :imgUrl='landDeatil.pic' text='地址'></imgCard>
|
|
||||||
<view class="bad-info">
|
|
||||||
<view class="" style="display: flex;align-items: center;">
|
|
||||||
<u--image :src="urlFn('sj')" style="margin: 0 5rpx;" width="28.04rpx" height="28.04rpx"></u--image>
|
|
||||||
<text>刷新时间:{{dateFn()}}</text>
|
|
||||||
</view>
|
|
||||||
<view style="display: flex;"
|
|
||||||
@click="navgo(`/pages/allPlant/index?crop_id=${landDeatil.crop_id}&land_id=${landDeatil.land_id}`)">
|
|
||||||
查看历史记录 <u--image src="/static/img/CKGD.png" style="margin-left: 5rpx;" width="31.54rpx"
|
|
||||||
height="31.54rpx"></u--image>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="up-plant-btn" @click="updateImgFn">
|
|
||||||
上传新的种植情况
|
|
||||||
<!-- {{crop_id}} -->
|
|
||||||
</view>
|
|
||||||
<landInfo :land_id='landDeatil.land_id' @getcropid='getcropidFn'></landInfo>
|
|
||||||
<view class="circumstance" v-for="(item,index) in tableDate" :key="index">
|
|
||||||
<!-- {{index}} -->
|
|
||||||
<!-- {{tableDate}}
|
|
||||||
dsfdsf -->
|
|
||||||
<view class="card-tit">
|
|
||||||
<view class="">
|
|
||||||
{{index}}
|
|
||||||
</view>
|
|
||||||
<view class="updata-btn"
|
|
||||||
@click="navgo(`/pages/growRecord/index?type=1&crop_id=${crop_id}&land_id=${landDeatil.land_id}&title=${index}`)">
|
|
||||||
更新{{index.slice(0,-2)}}
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<!-- {{item.action_record}} -->
|
|
||||||
<myTable :tit='`查看${index.slice(0,-2)}`' :dataList="item.action_record"
|
|
||||||
:route='`/pages/records/index?land_id=${landDeatil.land_id}&crop_id=${crop_id}&index=${index}`'>
|
|
||||||
</myTable>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="data">
|
|
||||||
<view class="tit">
|
|
||||||
<view class="" style="display: flex;justify-content: space-between;font-size: 29.79rpx;">
|
|
||||||
<view class="">
|
|
||||||
土地监测数据
|
|
||||||
</view>
|
|
||||||
<view style="display: flex;align-items: center;" @click="navgo('/pages/profile/index')">
|
|
||||||
查看全部检测记录 <u--image src="/static/img/CKGD.png" style="margin-left: 5rpx;" width="31.54rpx"
|
|
||||||
height="31.54rpx"></u--image>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="tit-b">
|
|
||||||
<u--image :src="urlFn('sj')" style="margin: 0 5rpx;" width="28.04rpx" height="28.04rpx"></u--image>
|
|
||||||
<text>刷新时间:{{dateFn()}}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="data-cont">
|
|
||||||
<view class="data-cont-li center" v-for="(item,index) in data " :key="index">
|
|
||||||
<view style="margin:0 20rpx">
|
|
||||||
<view class="center">
|
|
||||||
<!-- <img :src="urlFn('B')" :style="img(38.55,38.55,5)" alt=""> -->
|
|
||||||
<u--image :src="urlFn(item.icon)" style="margin: 0 5rpx;" width="38.55rpx"
|
|
||||||
height="38.54rpx"></u--image>
|
|
||||||
{{item.tit}}
|
|
||||||
</view>
|
|
||||||
<view class="b-cls">
|
|
||||||
<view class="" :style="{color:item.flag?'#0095FF':''}">
|
|
||||||
<text style=" font-size: 70.09rpx;">
|
|
||||||
{{baseData[item.cont]}}
|
|
||||||
</text>{{item.dw}}
|
|
||||||
</view>
|
|
||||||
<view class="" style="display: flex;align-items: center;" v-if="item.flag">
|
|
||||||
<u--image :src="urlFn('D')" style="margin: 0 5rpx;" width="31.54rpx" height="31.54rpx">
|
|
||||||
</u--image>
|
|
||||||
<text style="color: #0095FF;">5</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
</view>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- {{landDeatil.ripe_time}} -->
|
|
||||||
<view class="ripe-btn" v-if="landDeatil.ripe_time" @click="allripeFn">
|
|
||||||
标记为全部收获
|
|
||||||
</view>
|
|
||||||
<view class="ripe-btn" v-else @click="showPop=true">
|
|
||||||
标记为成熟
|
|
||||||
</view>
|
|
||||||
<!-- 组件 -->
|
|
||||||
<!-- navgo('/pages/index/index' -->
|
|
||||||
<u-popup :show="showPop" :round="20" mode="bottom" @close="showPop=false" @open="showPop=true">
|
|
||||||
<view class="mark">
|
|
||||||
<view class="head">
|
|
||||||
<view class="">
|
|
||||||
农作物成熟标记
|
|
||||||
</view>
|
|
||||||
<view class="" @tap="showPop=false">
|
|
||||||
<u--image :src="urlFn('GBAN')" style="margin: 0 5rpx;" width="49.07rpx" height="49.07rpx">
|
|
||||||
</u--image>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="mark-li">
|
|
||||||
<view class="">
|
|
||||||
种植类型:
|
|
||||||
</view>
|
|
||||||
<view class="">
|
|
||||||
{{landDeatil.crop_name}}
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="mark-li">
|
|
||||||
<view class="">
|
|
||||||
种植品牌:
|
|
||||||
</view>
|
|
||||||
<view class="">
|
|
||||||
{{landDeatil.crop_brand}}
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="mark-li">
|
|
||||||
<view class="">
|
|
||||||
本期溯源码:
|
|
||||||
</view>
|
|
||||||
<view class="">
|
|
||||||
{{landDeatil.source_code}}
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="mark-li">
|
|
||||||
<view class="">
|
|
||||||
成熟日期:
|
|
||||||
</view>
|
|
||||||
<view class="">
|
|
||||||
{{dateFn()}}
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="mark-li" style="display: block;border: 0;">
|
|
||||||
<view class="">
|
|
||||||
预计产量:
|
|
||||||
</view>
|
|
||||||
<view class="" style="margin-top: 20rpx;">
|
|
||||||
<up-input placeholder="请输入内容" border="surround" v-model="crop_yield"></up-input>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="ripe-btn" @tap="markFn">
|
|
||||||
确认
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</u-popup>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -1,141 +1,380 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="">
|
<view class="" style="position: relative;">
|
||||||
<view class="tabbar">
|
<view class="top">
|
||||||
<view class="" style="padding-top:var(--status-bar-height) ;">
|
<view class="" style="height: 100rpx;">
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="" style="height: 100rpx;">
|
||||||
|
|
||||||
<view class="" style="display: flex;">
|
</view>
|
||||||
<u--image src="/static/img/FH.png" width="50.82rpx" height="50.82rpx" alt=""></u--image>
|
<view class="content" v-if="false">
|
||||||
<view class="scoll-list">
|
<!-- 土地信息 -->
|
||||||
<view v-for="(item,index) in list" :key="index" class="scoll-list-li"
|
<view class="">
|
||||||
:style="{color:flag==item.id?'white':''}" @tap="scollChangeFn(item.id)">
|
<view class="card">
|
||||||
{{item.tit}}
|
<view class="">
|
||||||
|
<view class="">
|
||||||
|
土地名称: 土地信息1
|
||||||
|
</view>
|
||||||
|
<view class="" style="margin: 10rpx 0;">
|
||||||
|
农作物: 洋芋
|
||||||
|
</view>
|
||||||
|
<view class="">
|
||||||
|
面积: 20亩
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="changeLand" @click="show=true">
|
||||||
|
切换土地
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 苗情监测 -->
|
||||||
|
<view class="">
|
||||||
|
<view class="live-video soil-monitor">
|
||||||
|
<view class="head">
|
||||||
|
<view class="tit">
|
||||||
|
苗情监测数据
|
||||||
|
</view>
|
||||||
|
<view class="flushed-time">
|
||||||
|
<u-icon name="clock"></u-icon>
|
||||||
|
<text>刷新时间: {{getNowTimeFn()}} </text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="video">
|
||||||
|
<u--image :src="url" width="100%" height="300rpx"></u--image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 土壤监测 -->
|
||||||
|
<view class="soil-monitor">
|
||||||
|
<view class="head">
|
||||||
|
<view class="tit">
|
||||||
|
土壤监测数据
|
||||||
|
</view>
|
||||||
|
<view class="flushed-time">
|
||||||
|
<u-icon name="clock"></u-icon>
|
||||||
|
<text>刷新时间: {{getNowTimeFn()}} </text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="monitor-content">
|
||||||
|
<view class="monitor-card" v-for="(item,index) in soilList" :key="index">
|
||||||
|
<view class="name">
|
||||||
|
<view class="">
|
||||||
|
<u--image :src="item.icon" width="38.55rpx" height="38.55rpx"></u--image>
|
||||||
|
</view>
|
||||||
|
<view class="" style="margin-left: 10rpx;">
|
||||||
|
{{item.name}}
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<view class="num">
|
||||||
|
<text style="font-size: 70rpx;">{{item.num}}</text>
|
||||||
|
<text>{{item.unit}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 环境监测 -->
|
||||||
|
<view class="soil-monitor">
|
||||||
|
<view class="head">
|
||||||
|
<view class="tit">
|
||||||
|
环境监测数据
|
||||||
|
</view>
|
||||||
|
<view class="flushed-time">
|
||||||
|
<u-icon name="clock"></u-icon>
|
||||||
|
<text>刷新时间: {{getNowTimeFn()}} </text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="monitor-content">
|
||||||
|
<view class="monitor-card" v-for="(item,index) in environmentList" :key="index">
|
||||||
|
<view class="name">
|
||||||
|
<view class="">
|
||||||
|
<u--image :src="item.icon" width="38.55rpx" height="38.55rpx"></u--image>
|
||||||
|
</view>
|
||||||
|
<view class="" style="margin-left: 10rpx;">
|
||||||
|
{{item.name}}
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<view class="num">
|
||||||
|
<text style="font-size: 70rpx;">{{item.num}}</text>
|
||||||
|
<text>{{item.unit}}</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- 组件 -->
|
||||||
|
|
||||||
|
<u-loading-page :loading="showLoading"></u-loading-page>
|
||||||
|
<u-picker :show="show" :columns="columns" @cancel="show=false" @confirm="confirm"></u-picker>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view style="background-color: #34D190;">
|
<view class="empty" v-else>
|
||||||
<view class="" style="padding-top:var(--status-bar-height) ;">
|
<view class="addLand">
|
||||||
|
<view class="">
|
||||||
|
你还没有土地信息
|
||||||
|
</view>
|
||||||
|
<view class="addBtn" @click="navto('/pages/addLand/addLand')">
|
||||||
|
去添加
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="" style="height: 100rpx;">
|
|
||||||
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
<!-- 种植户首页 -->
|
|
||||||
<planting v-if='flag==1' :userInfo='userInfo'></planting>
|
|
||||||
<!-- 养猪的 -->
|
|
||||||
<cultivation v-if="flag==2" :userInfo='userInfo'></cultivation>
|
|
||||||
<!-- 养鸡的 -->
|
|
||||||
<chick v-if="flag==3" :userInfo='userInfo'> </chick>
|
|
||||||
<!-- 卖鱼的首页 -->
|
|
||||||
<fishing v-if='flag==4' :userInfo='userInfo'></fishing>
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {
|
|
||||||
userInfoAPI
|
|
||||||
} from "@/api/plant.js"
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
reactive,
|
reactive,
|
||||||
ref
|
ref
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
onLoad
|
onLoad
|
||||||
} from "@dcloudio/uni-app"
|
} from "@dcloudio/uni-app"
|
||||||
import cultivation from "@/components/index/cultivation.vue"
|
// 土壤监测数据
|
||||||
import planting from "@/components/index/planting.vue"
|
const url = ref('https://ceshi-worker-task.lihaink.cn//uploads//images//20231121//202311211336582b7920656.jpg')
|
||||||
import fishing from "@/components/index/fishing.vue"
|
const soilList = reactive([{
|
||||||
import chick from "@/components/index/chick.vue"
|
icon: "/static/img/sj.png",
|
||||||
import {
|
name: "土壤温度",
|
||||||
userInfoStore
|
num: 20,
|
||||||
} from '@/store/userInfo'
|
unit: "%",
|
||||||
const userInfoStores = userInfoStore()
|
|
||||||
const flag = ref(1)
|
|
||||||
const scollChangeFn = (index) => {
|
|
||||||
flag.value = index
|
|
||||||
}
|
|
||||||
const list = reactive([])
|
|
||||||
const userInfo = reactive({})
|
|
||||||
const initUserinfoFn = () => {
|
|
||||||
for (const key in userInfoStores.userInfo) {
|
|
||||||
userInfo[key] = (userInfoStores.userInfo)[key]
|
|
||||||
if (key == 'land_detail') {
|
|
||||||
list.push({
|
|
||||||
tit: "土地种植管理",
|
|
||||||
id: 1,
|
|
||||||
}, )
|
|
||||||
} else if (key == 'animal_detail') {
|
|
||||||
list.push({
|
|
||||||
tit: "家畜养殖管理",
|
|
||||||
id: 2,
|
|
||||||
}, )
|
|
||||||
} else if (key == 'poultry_detail') {
|
|
||||||
list.push({
|
|
||||||
tit: "家禽养殖管理",
|
|
||||||
id: 3,
|
|
||||||
}, )
|
|
||||||
} else if (key == 'pond_detail') {
|
|
||||||
list.push({
|
|
||||||
tit: "水产养殖管理",
|
|
||||||
id: 4,
|
|
||||||
}, )
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}, {
|
||||||
list.sort(function(a, b) {
|
icon: "/static/img/sj.png",
|
||||||
return a.id - b.id;
|
name: "土壤湿度",
|
||||||
|
num: 20,
|
||||||
|
unit: "%",
|
||||||
|
|
||||||
|
}, {
|
||||||
|
icon: "/static/img/sj.png",
|
||||||
|
name: "土壤导电率",
|
||||||
|
num: 20,
|
||||||
|
unit: "%",
|
||||||
|
|
||||||
|
}, {
|
||||||
|
icon: "/static/img/sj.png",
|
||||||
|
name: "土壤PH值",
|
||||||
|
num: 20,
|
||||||
|
unit: "",
|
||||||
|
|
||||||
|
}, {
|
||||||
|
icon: "/static/img/sj.png",
|
||||||
|
name: "土壤含氮量",
|
||||||
|
num: 20,
|
||||||
|
unit: "",
|
||||||
|
|
||||||
|
}, {
|
||||||
|
icon: "/static/img/sj.png",
|
||||||
|
name: "土壤含磷量",
|
||||||
|
num: 20,
|
||||||
|
unit: "",
|
||||||
|
|
||||||
|
}, {
|
||||||
|
icon: "/static/img/sj.png",
|
||||||
|
name: "土壤含钾量",
|
||||||
|
num: 20,
|
||||||
|
unit: "",
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
])
|
||||||
|
|
||||||
|
const show = ref(false)
|
||||||
|
const showLoading = ref(false)
|
||||||
|
const columns = reactive([
|
||||||
|
['中国', '美国', '日本']
|
||||||
|
]);
|
||||||
|
// 环境监测数据
|
||||||
|
const environmentList = reactive([{
|
||||||
|
icon: "/static/img/sj.png",
|
||||||
|
name: "风速",
|
||||||
|
num: 20,
|
||||||
|
unit: "%",
|
||||||
|
|
||||||
|
}, {
|
||||||
|
icon: "/static/img/sj.png",
|
||||||
|
name: "风向",
|
||||||
|
num: 20,
|
||||||
|
unit: "%",
|
||||||
|
|
||||||
|
}, {
|
||||||
|
icon: "/static/img/sj.png",
|
||||||
|
name: "温度",
|
||||||
|
num: 20,
|
||||||
|
unit: "%",
|
||||||
|
|
||||||
|
}, {
|
||||||
|
icon: "/static/img/sj.png",
|
||||||
|
name: "湿度",
|
||||||
|
num: 20,
|
||||||
|
unit: "",
|
||||||
|
|
||||||
|
}, {
|
||||||
|
icon: "/static/img/sj.png",
|
||||||
|
name: "二氧化碳",
|
||||||
|
num: 20,
|
||||||
|
unit: "",
|
||||||
|
|
||||||
|
}, {
|
||||||
|
icon: "/static/img/sj.png",
|
||||||
|
name: "气压",
|
||||||
|
num: 20,
|
||||||
|
unit: "",
|
||||||
|
|
||||||
|
}, {
|
||||||
|
icon: "/static/img/sj.png",
|
||||||
|
name: "雨量",
|
||||||
|
num: 20,
|
||||||
|
unit: "",
|
||||||
|
|
||||||
|
}, {
|
||||||
|
icon: "/static/img/sj.png",
|
||||||
|
name: "光照量",
|
||||||
|
num: 20,
|
||||||
|
unit: "",
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
])
|
||||||
|
|
||||||
|
const confirm = (e) => {
|
||||||
|
console.log(e)
|
||||||
|
show.value = false
|
||||||
|
showLoading.value = true
|
||||||
|
setTimeout(() => {
|
||||||
|
showLoading.value = false
|
||||||
|
}, 1000)
|
||||||
|
}
|
||||||
|
const getNowTimeFn = () => {
|
||||||
|
const now = new Date();
|
||||||
|
const hour = now.getHours();
|
||||||
|
const minute = now.getMinutes();
|
||||||
|
const formattedHour = hour < 10 ? '0' + hour : hour;
|
||||||
|
const formattedMinute = minute < 10 ? '0' + minute : minute;
|
||||||
|
const currentTime = formattedHour + ':' + formattedMinute;
|
||||||
|
return currentTime
|
||||||
|
}
|
||||||
|
const navto = (url) => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url
|
||||||
})
|
})
|
||||||
// userInfoAPI({
|
|
||||||
// user_id: 307
|
|
||||||
// }).then(res => {
|
|
||||||
|
|
||||||
// })
|
|
||||||
|
|
||||||
}
|
}
|
||||||
onLoad((option) => {
|
getNowTimeFn()
|
||||||
console.log(option)
|
|
||||||
|
|
||||||
if (option.index) {
|
|
||||||
flag.value = option.index
|
|
||||||
}
|
|
||||||
})
|
|
||||||
initUserinfoFn()
|
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss" scoped>
|
||||||
.tabbar {
|
.top {
|
||||||
z-index: 999;
|
|
||||||
background-color: #34D190;
|
background-color: #34D190;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
padding: 20rpx 0;
|
z-index: 999999;
|
||||||
|
height: 100rpx;
|
||||||
|
width: 750rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.scoll-list {
|
.card {
|
||||||
white-space: nowrap;
|
display: flex;
|
||||||
overflow-x: scroll;
|
justify-content: space-between;
|
||||||
overflow-y: hidden;
|
|
||||||
min-width: 95vw;
|
|
||||||
|
|
||||||
|
.changeLand {
|
||||||
|
width: 200rpx;
|
||||||
|
height: 70rpx;
|
||||||
|
line-height: 70rpx;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 30rpx;
|
||||||
|
background-color: $theme-main-color;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.scoll-list-li {
|
.content {
|
||||||
display: inline-block;
|
min-height: 92vh;
|
||||||
margin-right: 20px;
|
background-color: $theme-bg-color;
|
||||||
white-space: normal;
|
padding: 0 30rpx;
|
||||||
|
padding-top: 20rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.soil-monitor {
|
||||||
|
margin-top: 40rpx;
|
||||||
|
|
||||||
|
.head {
|
||||||
|
|
||||||
|
.tit {
|
||||||
font-size: 33.29rpx;
|
font-size: 33.29rpx;
|
||||||
transform: skewX(-10deg);
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.flushed-time {
|
||||||
|
display: flex;
|
||||||
|
font-size: 26.29rpx;
|
||||||
|
color: #737373;
|
||||||
|
margin-top: 10rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.monitor-content {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
.monitor-card {
|
||||||
|
margin-top: 20rpx;
|
||||||
|
background-color: white;
|
||||||
|
padding: 30rpx 20rpx;
|
||||||
|
border-radius: 30rpx;
|
||||||
|
width: 332.94rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
height: 212.03rpx;
|
||||||
|
|
||||||
|
.name {
|
||||||
|
font-size: 29.79rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.num {
|
||||||
|
margin-top: 30rpx;
|
||||||
|
color: $theme-main-color;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.act {
|
.video {
|
||||||
color: white;
|
margin-top: 20rpx;
|
||||||
|
width: 100%;
|
||||||
|
height: 300rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.empty {
|
||||||
|
height: 100vh;
|
||||||
|
background-color: $theme-bg-color;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.addLand {
|
||||||
|
width: auto;
|
||||||
|
height: 100rpx;
|
||||||
|
color: grey;
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
|
||||||
|
.addBtn {
|
||||||
|
margin-top: 20rpx;
|
||||||
|
width: 250rpx;
|
||||||
|
height: 70rpx;
|
||||||
|
border: 1px solid $theme-main-color;
|
||||||
|
line-height: 70rpx;
|
||||||
|
border-radius: 50rpx;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
|
@ -0,0 +1,157 @@
|
||||||
|
<template>
|
||||||
|
<view class="">
|
||||||
|
<view class="content">
|
||||||
|
|
||||||
|
<view class="" style="height: 30rpx;">
|
||||||
|
</view>
|
||||||
|
<view class="serch">
|
||||||
|
<u-search bgColor="white" :show-action="false" placeholder="搜索你的土地信息" v-model="keyword"
|
||||||
|
shape="round"></u-search>
|
||||||
|
</view>
|
||||||
|
<!-- <view class="card">
|
||||||
|
<view class="card-li">
|
||||||
|
农户名称: 张伟
|
||||||
|
</view>
|
||||||
|
<view class="card-li">
|
||||||
|
种养殖类型: 种植户
|
||||||
|
</view>
|
||||||
|
<view class="card-li">
|
||||||
|
土地面积: 20亩
|
||||||
|
</view>
|
||||||
|
<view class="card-li">
|
||||||
|
地址: 四川省巴中市恩阳区
|
||||||
|
</view>
|
||||||
|
</view> -->
|
||||||
|
|
||||||
|
<view class="card" v-for="(item,index) in [1,1,1]" :key="index"
|
||||||
|
@click="navgoFn(item.is_cropped,item.land_id)">
|
||||||
|
<view class="tit card-li">
|
||||||
|
<view class="">
|
||||||
|
土地名称
|
||||||
|
</view>
|
||||||
|
<view class="" style="color: #00A15E;" v-if="item.is_cropped">
|
||||||
|
已种植
|
||||||
|
</view>
|
||||||
|
<view class="" style="color: #00A15E;" v-else>
|
||||||
|
未种植
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="card-li">
|
||||||
|
<view class="">
|
||||||
|
面积: 20亩
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="card-li tit" v-if="item.crop_name">
|
||||||
|
<view class="" style="font-weight: normal;">
|
||||||
|
农作物: 洋芋
|
||||||
|
</view>
|
||||||
|
<view class="" style="color: #FF9B66;" v-if="item.ripe_time">
|
||||||
|
已成熟
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="card-li tit" style="font-weight: normal;" v-show="item.crop_yield">
|
||||||
|
<view class="">
|
||||||
|
预计产量: 30kg
|
||||||
|
</view>
|
||||||
|
<!-- <view class="" v-if="false">
|
||||||
|
已出售: 500kg
|
||||||
|
</view> -->
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view style="height: 170rpx;">
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import {
|
||||||
|
reactive
|
||||||
|
} from "vue"
|
||||||
|
const props = defineProps({
|
||||||
|
userInfo: Object
|
||||||
|
})
|
||||||
|
// 获取位置
|
||||||
|
const getPositionFn = () => {
|
||||||
|
uni.getLocation({
|
||||||
|
type: 'gcj02',
|
||||||
|
geocode: true,
|
||||||
|
isHighAccuracy: true,
|
||||||
|
success: function(res) {
|
||||||
|
uni.request({
|
||||||
|
url: `https://restapi.amap.com/v3/geocode/regeo?output=JSON&location=${res.longitude},${res.latitude}&key=b0c21bc6b220aa882bad8ffb6bce8829&radius=1000&extensions=all`,
|
||||||
|
success: (res) => {
|
||||||
|
console.log(res)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const userInfo = reactive(props.userInfo)
|
||||||
|
|
||||||
|
const navgo = (url) => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const navgoFn = (is_cropped, land_id) => {
|
||||||
|
|
||||||
|
if (!is_cropped) {
|
||||||
|
navgo(`/pages/InformationAdd/index?land_id=${land_id}`)
|
||||||
|
} else if (is_cropped) {
|
||||||
|
navgo(`/pages/detail/plant?land_id=${land_id}`)
|
||||||
|
}
|
||||||
|
if (is_cropped == 2) {
|
||||||
|
navgo('/pages/detail/plant')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.serch {
|
||||||
|
width: 695rpx;
|
||||||
|
margin: 0 auto;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
min-height: 100vh;
|
||||||
|
position: relative;
|
||||||
|
// padding: 0 20rpx;
|
||||||
|
// padding-top: 50rpx;
|
||||||
|
background-color: #EAF2EF;
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
.border-bgc {
|
||||||
|
height: 200rpx;
|
||||||
|
background-color: #34D190;
|
||||||
|
border-radius: 0 0 40rpx 40rpx;
|
||||||
|
position: absolute;
|
||||||
|
width: 750rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.card {
|
||||||
|
position: relative;
|
||||||
|
width: 693.93rpx;
|
||||||
|
margin: auto;
|
||||||
|
background-color: #fff;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border-radius: 21.03rpx 21.03rpx 21.03rpx 21.03rpx;
|
||||||
|
margin-bottom: 40rpx;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.tit {
|
||||||
|
display: flex;
|
||||||
|
font-size: 33.29rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,121 @@
|
||||||
|
<template>
|
||||||
|
<view class="head">
|
||||||
|
<view class="avater">
|
||||||
|
<u--image @click="previewImageFn" :src="url" width="130.28rpx" height="130.28rpx" shape="circle"></u--image>
|
||||||
|
</view>
|
||||||
|
<view class="">
|
||||||
|
<view class="head-li">
|
||||||
|
姓名: 咋还归纳
|
||||||
|
</view>
|
||||||
|
<view class="head-li">
|
||||||
|
电话: 15884967541
|
||||||
|
</view>
|
||||||
|
<view class="head-li">
|
||||||
|
公司: 里海弄农业科技有限公司
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="content">
|
||||||
|
<view class="card" style="border-radius: 20rpx;">
|
||||||
|
<view class="card-li" v-for="(item,index) in cardLiList" :key="index" @click="navto(item.nav)">
|
||||||
|
<view class="" style="display: flex;align-items: center;">
|
||||||
|
<view class="" style="margin-right: 20rpx;">
|
||||||
|
<u-icon size="20" :name="url"></u-icon>
|
||||||
|
</view>
|
||||||
|
<view class="">
|
||||||
|
{{item.text}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="">
|
||||||
|
<u-icon name="arrow-right" size="16"></u-icon>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="out-btn">
|
||||||
|
<up-button @click="loginOutFn" type="primary" customStyle="border:none;height:90rpx" color="#34D190"
|
||||||
|
text="退出登录"></up-button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import {
|
||||||
|
reactive,
|
||||||
|
ref
|
||||||
|
} from 'vue';
|
||||||
|
const url = ref('https://ceshi-worker-task.lihaink.cn//uploads//images//20231121//202311211336582b7920656.jpg')
|
||||||
|
const previewImageFn = () => {
|
||||||
|
uni.previewImage({
|
||||||
|
urls: [
|
||||||
|
"https://ceshi-worker-task.lihaink.cn//uploads//images//20231121//202311211336582b7920656.jpg"
|
||||||
|
]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const cardLiList = reactive([{
|
||||||
|
text: "片区经s理"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "安全设置",
|
||||||
|
nav: "/pages/updatePassword/updatePassword"
|
||||||
|
},
|
||||||
|
|
||||||
|
])
|
||||||
|
|
||||||
|
const loginOutFn = () => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pages/Login/login"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const navto = (url) => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.head {
|
||||||
|
height: 25vh;
|
||||||
|
background-color: $theme-main-color;
|
||||||
|
color: white;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.head-li {
|
||||||
|
margin: 10rpx 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.avater {
|
||||||
|
margin: 0 40rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
height: 75vh;
|
||||||
|
background-color: $theme-bg-color;
|
||||||
|
padding-top: 30rpx;
|
||||||
|
|
||||||
|
.card {
|
||||||
|
background-color: white;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
|
||||||
|
.card-li {
|
||||||
|
height: 80rpx;
|
||||||
|
line-height: 80rpx;
|
||||||
|
// background-color: red;
|
||||||
|
border-bottom: 1px solid #F5F5F5;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.out-btn {
|
||||||
|
width: 693.93rpx;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -1,44 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="card">
|
|
||||||
<view class="tit">
|
|
||||||
<view class="">
|
|
||||||
编号: 52656
|
|
||||||
</view>
|
|
||||||
<view class="">
|
|
||||||
溯源码: 52656
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="card-li">
|
|
||||||
<view class="">
|
|
||||||
养殖品种: 土豆
|
|
||||||
</view>
|
|
||||||
<view class="">
|
|
||||||
年龄: 的划分等级
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="card-li">
|
|
||||||
<view class="">
|
|
||||||
养殖类型: 20亩
|
|
||||||
</view>
|
|
||||||
<view class="">
|
|
||||||
体重: 45kg
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="card">
|
|
||||||
<view class="card-li">
|
|
||||||
<view class="" style="display: flex;align-items: center;">
|
|
||||||
<u--image src="/static/img/GG.png" style="margin: 0 21rpx;" width="80rpx" height="80rpx"></u--image>
|
|
||||||
当前养殖状态
|
|
||||||
</view>
|
|
||||||
<view class="" style="color: green;">
|
|
||||||
健康
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="">
|
<view class="">
|
||||||
|
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
<template>
|
|
||||||
<view>
|
|
||||||
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
<script setup>
|
|
||||||
|
|
||||||
</script>
|
|
|
@ -1,5 +0,0 @@
|
||||||
<template>
|
|
||||||
<view>
|
|
||||||
dsfsd
|
|
||||||
</view>
|
|
||||||
</template>
|
|
|
@ -1,5 +0,0 @@
|
||||||
<template>
|
|
||||||
<view>
|
|
||||||
dsfsd
|
|
||||||
</view>
|
|
||||||
</template>
|
|
|
@ -0,0 +1,149 @@
|
||||||
|
<template>
|
||||||
|
<view class="content">
|
||||||
|
<view class="reset-password">
|
||||||
|
<u--form ref="formRef" :rules="rules" :model="formData">
|
||||||
|
<u-form-item label="原密码" labelWidth="140rpx" borderBottom prop="old_password">
|
||||||
|
<u--input v-model="formData.old_password" :password="!pwdShow.old_password" placeholder="请输入原密码"
|
||||||
|
maxlength="18">
|
||||||
|
<!-- #ifdef APP-PLUS -->
|
||||||
|
<!-- <template slot="suffix">
|
||||||
|
<uni-icons :type="pwdShow.old_password?'eye-filled':'eye-slash-filled'" @click="pwdShow.old_password=!pwdShow.old_password" color="#999"></uni-icons>
|
||||||
|
</template> -->
|
||||||
|
<!-- #endif -->
|
||||||
|
</u--input>
|
||||||
|
</u-form-item>
|
||||||
|
<u-form-item label="新密码" labelWidth="140rpx" borderBottom prop="password">
|
||||||
|
<u--input v-model="formData.password" :password="!pwdShow.password" placeholder="请输入新密码"
|
||||||
|
maxlength="18">
|
||||||
|
<!-- #ifdef APP-PLUS -->
|
||||||
|
<!-- <template slot="suffix">
|
||||||
|
<u--icon :name="pwdShow.password?'eye-off':'eye-fill'" @click="pwdShow.old_password=!pwdShow.old_password" color="#999"></u--icon>
|
||||||
|
</template> -->
|
||||||
|
<!-- #endif -->
|
||||||
|
</u--input>
|
||||||
|
</u-form-item>
|
||||||
|
<u-form-item label="确认密码" labelWidth="140rpx" borderBottom prop="password_confirm">
|
||||||
|
<u--input v-model="formData.password_confirm" :password="!pwdShow.password_confirm"
|
||||||
|
placeholder="请确认新密码" maxlength="18">
|
||||||
|
<!-- #ifdef APP-PLUS -->
|
||||||
|
<!-- <template slot="suffix">
|
||||||
|
<u--icon :name="pwdShow.password_confirm?'eye-off':'eye-fill'" @click="pwdShow.old_password=!pwdShow.old_password" color="#999"></u--icon>
|
||||||
|
</template> -->
|
||||||
|
<!-- #endif -->
|
||||||
|
</u--input>
|
||||||
|
</u-form-item>
|
||||||
|
<u-button style="margin-top: 28rpx;background-color:#34D190;color: #fff;" @click="submit">提交</u-button>
|
||||||
|
</u--form>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
pwdShow: {
|
||||||
|
old_password: false,
|
||||||
|
password: false,
|
||||||
|
password_confirm: false,
|
||||||
|
},
|
||||||
|
formData: {
|
||||||
|
old_password: '', // 原密码
|
||||||
|
password: '', // 新密码
|
||||||
|
password_confirm: '', // 确认密码
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
old_password: {
|
||||||
|
type: 'string',
|
||||||
|
required: true,
|
||||||
|
min: 6,
|
||||||
|
max: 18,
|
||||||
|
message: '请输入6-18位密码',
|
||||||
|
trigger: ['change', 'blur']
|
||||||
|
},
|
||||||
|
password: {
|
||||||
|
type: 'string',
|
||||||
|
required: true,
|
||||||
|
min: 6,
|
||||||
|
max: 18,
|
||||||
|
message: '请输入6-18位密码',
|
||||||
|
trigger: ['change', 'blur']
|
||||||
|
},
|
||||||
|
password_confirm: {
|
||||||
|
type: 'string',
|
||||||
|
required: true,
|
||||||
|
min: 6,
|
||||||
|
max: 18,
|
||||||
|
message: '请输入6-18位密码',
|
||||||
|
trigger: ['change', 'blur']
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
submit() {
|
||||||
|
this.$refs.formRef.validate().then(async (e) => {
|
||||||
|
if (e) {
|
||||||
|
if (this.formData.password == this.formData.old_password) return Toast('新密码不能与原密码一致');
|
||||||
|
if (this.formData.password !== this.formData.password_confirm) return Toast(
|
||||||
|
'两次新密码不一致');
|
||||||
|
try {
|
||||||
|
await changePassword({
|
||||||
|
...this.formData
|
||||||
|
});
|
||||||
|
Toast('修改成功');
|
||||||
|
this.$u.sleep(500).then(() => {
|
||||||
|
uni.showLoading({
|
||||||
|
mask: true,
|
||||||
|
title: '加载中'
|
||||||
|
})
|
||||||
|
// 密码修改后重新加密缓存
|
||||||
|
let nowData = encrypt.decode('ACT');
|
||||||
|
nowData.password = this.formData.password;
|
||||||
|
encrypt.encode('ACT', nowData);
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
return uni.switchTab({
|
||||||
|
url: '/pages/oaHome/oaHome',
|
||||||
|
success: () => {
|
||||||
|
uni.$emit('initOaTask'); // 更新任务
|
||||||
|
uni.hideLoading()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// #endif
|
||||||
|
return uni.reLaunch({
|
||||||
|
url: '/pages/oaHome/oaHome',
|
||||||
|
success: () => {
|
||||||
|
uni.$emit('initOaTask'); // 更新任务
|
||||||
|
uni.hideLoading()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
} catch (e) {
|
||||||
|
// console.log(e);
|
||||||
|
Toast(e.msg || '修改失败')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.content {
|
||||||
|
padding-top: 10rpx;
|
||||||
|
background-color: $theme-bg-color;
|
||||||
|
height: 100vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reset-password {
|
||||||
|
margin: 28rpx;
|
||||||
|
padding: 28rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 14rpx;
|
||||||
|
}
|
||||||
|
</style>
|
2
uni.scss
2
uni.scss
|
@ -16,6 +16,8 @@
|
||||||
|
|
||||||
/* 行为相关颜色 */
|
/* 行为相关颜色 */
|
||||||
@import 'uview-plus/theme.scss';
|
@import 'uview-plus/theme.scss';
|
||||||
|
$theme-main-color: #34D190;
|
||||||
|
$theme-bg-color: #EAF2EF;
|
||||||
$uni-color-primary: #007aff;
|
$uni-color-primary: #007aff;
|
||||||
$uni-color-success: #4cd964;
|
$uni-color-success: #4cd964;
|
||||||
$uni-color-warning: #f0ad4e;
|
$uni-color-warning: #f0ad4e;
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
Before Width: | Height: | Size: 5.7 KiB |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
Before Width: | Height: | Size: 2.0 KiB |
|
@ -1,23 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8" />
|
|
||||||
<title>View</title>
|
|
||||||
<link rel="stylesheet" href="app.css" />
|
|
||||||
<script>var __uniConfig = {"globalStyle":{},"darkmode":false}</script>
|
|
||||||
<script>
|
|
||||||
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
|
|
||||||
CSS.supports('top: constant(a)'))
|
|
||||||
document.write(
|
|
||||||
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
|
|
||||||
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div id="app"></div>
|
|
||||||
<script src="uni-app-view.umd.js"></script>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,11 +0,0 @@
|
||||||
|
|
||||||
;(function(){
|
|
||||||
let u=void 0,isReady=false,onReadyCallbacks=[],isServiceReady=false,onServiceReadyCallbacks=[];
|
|
||||||
const __uniConfig = {"pages":[],"globalStyle":{"backgroundColor":"#F8F8F8","navigationBar":{"backgroundColor":"#F8F8F8","titleText":"uni-app","type":"default","titleColor":"#000000"},"isNVue":false},"nvue":{"compiler":"uni-app","styleCompiler":"uni-app","flex-direction":"column"},"renderer":"auto","appname":"test","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":true},"compilerVersion":"3.8.12","entryPagePath":"pages/index/index","entryPageQuery":"","realEntryPagePath":"","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000},"locales":{},"darkmode":false,"themeConfig":{}};
|
|
||||||
const __uniRoutes = [{"path":"pages/index/index","meta":{"isQuit":true,"isEntry":true,"enablePullDownRefresh":true,"navigationBar":{"titleText":"uni-app","type":"default"},"isNVue":false}}].map(uniRoute=>(uniRoute.meta.route=uniRoute.path,__uniConfig.pages.push(uniRoute.path),uniRoute.path='/'+uniRoute.path,uniRoute));
|
|
||||||
__uniConfig.styles=[];//styles
|
|
||||||
__uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
|
|
||||||
__uniConfig.onServiceReady=function(callback){if(__uniConfig.serviceReady){callback()}else{onServiceReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"serviceReady",{get:function(){return isServiceReady},set:function(val){isServiceReady=val;if(!isServiceReady){return}const callbacks=onServiceReadyCallbacks.slice(0);onServiceReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
|
|
||||||
service.register("uni-app-config",{create(a,b,c){if(!__uniConfig.viewport){var d=b.weex.config.env.scale,e=b.weex.config.env.deviceWidth,f=Math.ceil(e/d);Object.assign(__uniConfig,{viewport:f,defaultFontSize:16})}return{instance:{__uniConfig:__uniConfig,__uniRoutes:__uniRoutes,global:u,window:u,document:u,frames:u,self:u,location:u,navigator:u,localStorage:u,history:u,Caches:u,screen:u,alert:u,confirm:u,prompt:u,fetch:u,XMLHttpRequest:u,WebSocket:u,webkit:u,print:u}}}});
|
|
||||||
})();
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
(function(){})();
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -1 +0,0 @@
|
||||||
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__B1D7CFE","name":"test","version":{"name":"1.0.0","code":"100"},"description":"","developer":{"name":"","email":"","url":""},"permissions":{"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"autoclose":true,"delay":0,"target":"id:1","waiting":true},"popGesture":"close","launchwebview":{"render":"always","id":"1","kernel":"WKWebview"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"distribute":{"google":{"permissions":["<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-feature android:name=\"android.hardware.camera\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"],"packagename":"uni.UNIB1D7CFE","custompermissions":true},"apple":{"dSYMs":false,"devices":"universal"},"plugins":{"ad":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}},"orientation":"portrait-primary"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#F8F8F8"},"uniStatistics":{"enable":false},"allowsInlineMediaPlayback":true,"uni-app":{"control":"uni-v3","vueVersion":"3","compilerVersion":"3.8.12","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal","webView":{"minUserAgentVersion":"49.0"}},"adid":"128752150510"},"launch_path":"__uniappview.html"}
|
|
File diff suppressed because one or more lines are too long
Binary file not shown.
Before Width: | Height: | Size: 3.9 KiB |
File diff suppressed because one or more lines are too long
|
@ -1,224 +0,0 @@
|
||||||
'use strict'
|
|
||||||
|
|
||||||
// 等待初始化完毕
|
|
||||||
document.addEventListener('UniAppJSBridgeReady', () => {
|
|
||||||
document.body.onclick = function () {
|
|
||||||
return uni.postMessage({
|
|
||||||
data: {
|
|
||||||
action: 'onClick'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
uni.postMessage({
|
|
||||||
data: {
|
|
||||||
action: 'onJSBridgeReady'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
let options
|
|
||||||
let medias = []
|
|
||||||
/**
|
|
||||||
* @description 获取标签的所有属性
|
|
||||||
* @param {Element} ele
|
|
||||||
*/
|
|
||||||
|
|
||||||
function getAttrs(ele) {
|
|
||||||
const attrs = Object.create(null)
|
|
||||||
|
|
||||||
for (let i = ele.attributes.length; i--;) {
|
|
||||||
attrs[ele.attributes[i].name] = ele.attributes[i].value
|
|
||||||
}
|
|
||||||
|
|
||||||
return attrs
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @description 图片加载出错
|
|
||||||
*/
|
|
||||||
|
|
||||||
function onImgError() {
|
|
||||||
if (options[1]) {
|
|
||||||
this.src = options[1]
|
|
||||||
this.onerror = null
|
|
||||||
} // 取消监听点击
|
|
||||||
|
|
||||||
this.onclick = null
|
|
||||||
this.ontouchstart = null
|
|
||||||
uni.postMessage({
|
|
||||||
data: {
|
|
||||||
action: 'onError',
|
|
||||||
source: 'img',
|
|
||||||
attrs: getAttrs(this)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @description 创建 dom 结构
|
|
||||||
* @param {object[]} nodes 节点数组
|
|
||||||
* @param {Element} parent 父节点
|
|
||||||
* @param {string} namespace 命名空间
|
|
||||||
*/
|
|
||||||
|
|
||||||
function createDom(nodes, parent, namespace) {
|
|
||||||
const _loop = function _loop(i) {
|
|
||||||
const node = nodes[i]
|
|
||||||
let ele = void 0
|
|
||||||
|
|
||||||
if (!node.type || node.type == 'node') {
|
|
||||||
let { name } = node // svg 需要设置 namespace
|
|
||||||
|
|
||||||
if (name == 'svg') namespace = 'http://www.w3.org/2000/svg'
|
|
||||||
if (name == 'html' || name == 'body') name = 'div' // 创建标签
|
|
||||||
|
|
||||||
if (!namespace) ele = document.createElement(name); else ele = document.createElementNS(namespace, name) // 设置属性
|
|
||||||
|
|
||||||
for (const item in node.attrs) {
|
|
||||||
ele.setAttribute(item, node.attrs[item])
|
|
||||||
} // 递归创建子节点
|
|
||||||
|
|
||||||
if (node.children) createDom(node.children, ele, namespace) // 处理图片
|
|
||||||
|
|
||||||
if (name == 'img') {
|
|
||||||
if (!ele.src && ele.getAttribute('data-src')) ele.src = ele.getAttribute('data-src')
|
|
||||||
|
|
||||||
if (!node.attrs.ignore) {
|
|
||||||
// 监听图片点击事件
|
|
||||||
ele.onclick = function (e) {
|
|
||||||
e.stopPropagation()
|
|
||||||
uni.postMessage({
|
|
||||||
data: {
|
|
||||||
action: 'onImgTap',
|
|
||||||
attrs: getAttrs(this)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (options[2]) {
|
|
||||||
image = new Image()
|
|
||||||
image.src = ele.src
|
|
||||||
ele.src = options[2]
|
|
||||||
|
|
||||||
image.onload = function () {
|
|
||||||
ele.src = this.src
|
|
||||||
}
|
|
||||||
|
|
||||||
image.onerror = function () {
|
|
||||||
ele.onerror()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ele.onerror = onImgError
|
|
||||||
} // 处理链接
|
|
||||||
else if (name == 'a') {
|
|
||||||
ele.addEventListener('click', function (e) {
|
|
||||||
e.stopPropagation()
|
|
||||||
e.preventDefault() // 阻止默认跳转
|
|
||||||
|
|
||||||
const href = this.getAttribute('href')
|
|
||||||
let offset
|
|
||||||
if (href && href[0] == '#') offset = (document.getElementById(href.substr(1)) || {}).offsetTop
|
|
||||||
uni.postMessage({
|
|
||||||
data: {
|
|
||||||
action: 'onLinkTap',
|
|
||||||
attrs: getAttrs(this),
|
|
||||||
offset
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}, true)
|
|
||||||
} // 处理音视频
|
|
||||||
else if (name == 'video' || name == 'audio') {
|
|
||||||
medias.push(ele)
|
|
||||||
|
|
||||||
if (!node.attrs.autoplay) {
|
|
||||||
if (!node.attrs.controls) ele.setAttribute('controls', 'true') // 空白图占位
|
|
||||||
|
|
||||||
if (!node.attrs.poster) ele.setAttribute('poster', "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'/>")
|
|
||||||
}
|
|
||||||
|
|
||||||
if (options[3]) {
|
|
||||||
ele.onplay = function () {
|
|
||||||
for (let _i = 0; _i < medias.length; _i++) {
|
|
||||||
if (medias[_i] != this) medias[_i].pause()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ele.onerror = function () {
|
|
||||||
uni.postMessage({
|
|
||||||
data: {
|
|
||||||
action: 'onError',
|
|
||||||
source: name,
|
|
||||||
attrs: getAttrs(this)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
} // 处理表格
|
|
||||||
else if (name == 'table' && options[4] && !ele.style.cssText.includes('inline')) {
|
|
||||||
const div = document.createElement('div')
|
|
||||||
div.style.overflow = 'auto'
|
|
||||||
div.appendChild(ele)
|
|
||||||
ele = div
|
|
||||||
} else if (name == 'svg') namespace = void 0
|
|
||||||
} else ele = document.createTextNode(node.text.replace(/&/g, '&'))
|
|
||||||
|
|
||||||
parent.appendChild(ele)
|
|
||||||
}
|
|
||||||
|
|
||||||
for (let i = 0; i < nodes.length; i++) {
|
|
||||||
var image
|
|
||||||
|
|
||||||
_loop(i)
|
|
||||||
}
|
|
||||||
} // 设置 html 内容
|
|
||||||
|
|
||||||
window.setContent = function (nodes, opts, append) {
|
|
||||||
const ele = document.getElementById('content') // 背景颜色
|
|
||||||
|
|
||||||
if (opts[0]) document.body.bgColor = opts[0] // 长按复制
|
|
||||||
|
|
||||||
if (!opts[5]) ele.style.userSelect = 'none'
|
|
||||||
|
|
||||||
if (!append) {
|
|
||||||
ele.innerHTML = '' // 不追加则先清空
|
|
||||||
|
|
||||||
medias = []
|
|
||||||
}
|
|
||||||
|
|
||||||
options = opts
|
|
||||||
const fragment = document.createDocumentFragment()
|
|
||||||
createDom(nodes, fragment)
|
|
||||||
ele.appendChild(fragment) // 触发事件
|
|
||||||
|
|
||||||
let height = ele.scrollHeight
|
|
||||||
uni.postMessage({
|
|
||||||
data: {
|
|
||||||
action: 'onLoad',
|
|
||||||
height
|
|
||||||
}
|
|
||||||
})
|
|
||||||
clearInterval(window.timer)
|
|
||||||
let ready = false
|
|
||||||
window.timer = setInterval(() => {
|
|
||||||
if (ele.scrollHeight != height) {
|
|
||||||
height = ele.scrollHeight
|
|
||||||
uni.postMessage({
|
|
||||||
data: {
|
|
||||||
action: 'onHeightChange',
|
|
||||||
height
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else if (!ready) {
|
|
||||||
ready = true
|
|
||||||
uni.postMessage({
|
|
||||||
data: {
|
|
||||||
action: 'onReady'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}, 350)
|
|
||||||
} // 回收计时器
|
|
||||||
|
|
||||||
window.onunload = function () {
|
|
||||||
clearInterval(window.timer)
|
|
||||||
}
|
|
|
@ -1,19 +0,0 @@
|
||||||
!(function (e, n) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = n() : typeof define === 'function' && define.amd ? define(n) : (e = e || self).uni = n() }(this, (() => {
|
|
||||||
'use strict'
|
|
||||||
|
|
||||||
try { const e = {}; Object.defineProperty(e, 'passive', { get() { !0 } }), window.addEventListener('test-passive', null, e) } catch (e) {} const n = Object.prototype.hasOwnProperty; function t(e, t) { return n.call(e, t) } const i = []; const a = function (e, n) { const t = { options: { timestamp: +new Date() }, name: e, arg: n }; if (window.__dcloud_weex_postMessage || window.__dcloud_weex_) { if (e === 'postMessage') { const a = { data: [n] }; return window.__dcloud_weex_postMessage ? window.__dcloud_weex_postMessage(a) : window.__dcloud_weex_.postMessage(JSON.stringify(a)) } const o = { type: 'WEB_INVOKE_APPSERVICE', args: { data: t, webviewIds: i } }; window.__dcloud_weex_postMessage ? window.__dcloud_weex_postMessageToService(o) : window.__dcloud_weex_.postMessageToService(JSON.stringify(o)) } if (!window.plus) return window.parent.postMessage({ type: 'WEB_INVOKE_APPSERVICE', data: t, pageId: '' }, '*'); if (i.length === 0) { const r = plus.webview.currentWebview(); if (!r) throw new Error('plus.webview.currentWebview() is undefined'); const d = r.parent(); let s = ''; s = d ? d.id : r.id, i.push(s) } if (plus.webview.getWebviewById('__uniapp__service'))plus.webview.postMessageToUniNView({ type: 'WEB_INVOKE_APPSERVICE', args: { data: t, webviewIds: i } }, '__uniapp__service'); else { const w = JSON.stringify(t); plus.webview.getLaunchWebview().evalJS('UniPlusBridge.subscribeHandler("'.concat('WEB_INVOKE_APPSERVICE', '",').concat(w, ',').concat(JSON.stringify(i), ');')) } }; const o = {
|
|
||||||
navigateTo() { const e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; const n = e.url; a('navigateTo', { url: encodeURI(n) }) }, navigateBack() { const e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; const n = e.delta; a('navigateBack', { delta: parseInt(n) || 1 }) }, switchTab() { const e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; const n = e.url; a('switchTab', { url: encodeURI(n) }) }, reLaunch() { const e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; const n = e.url; a('reLaunch', { url: encodeURI(n) }) }, redirectTo() { const e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; const n = e.url; a('redirectTo', { url: encodeURI(n) }) }, getEnv(e) { window.plus ? e({ plus: !0 }) : e({ h5: !0 }) }, postMessage() { const e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; a('postMessage', e.data || {}) }
|
|
||||||
}; const r = /uni-app/i.test(navigator.userAgent); const d = /Html5Plus/i.test(navigator.userAgent); const s = /complete|loaded|interactive/; const w = window.my && navigator.userAgent.indexOf('AlipayClient') > -1; const u = window.swan && window.swan.webView && /swan/i.test(navigator.userAgent); const c = window.qq && window.qq.miniProgram && /QQ/i.test(navigator.userAgent) && /miniProgram/i.test(navigator.userAgent); const g = window.tt && window.tt.miniProgram && /toutiaomicroapp/i.test(navigator.userAgent); const v = window.wx && window.wx.miniProgram && /micromessenger/i.test(navigator.userAgent) && /miniProgram/i.test(navigator.userAgent); const p = window.qa && /quickapp/i.test(navigator.userAgent); for (var l, _ = function () { window.UniAppJSBridge = !0, document.dispatchEvent(new CustomEvent('UniAppJSBridgeReady', { bubbles: !0, cancelable: !0 })) }, f = [function (e) { if (r || d) return window.__dcloud_weex_postMessage || window.__dcloud_weex_ ? document.addEventListener('DOMContentLoaded', e) : window.plus && s.test(document.readyState) ? setTimeout(e, 0) : document.addEventListener('plusready', e), o }, function (e) { if (v) return window.WeixinJSBridge && window.WeixinJSBridge.invoke ? setTimeout(e, 0) : document.addEventListener('WeixinJSBridgeReady', e), window.wx.miniProgram }, function (e) { if (c) return window.QQJSBridge && window.QQJSBridge.invoke ? setTimeout(e, 0) : document.addEventListener('QQJSBridgeReady', e), window.qq.miniProgram }, function (e) {
|
|
||||||
if (w) {
|
|
||||||
document.addEventListener('DOMContentLoaded', e); const n = window.my; return {
|
|
||||||
navigateTo: n.navigateTo, navigateBack: n.navigateBack, switchTab: n.switchTab, reLaunch: n.reLaunch, redirectTo: n.redirectTo, postMessage: n.postMessage, getEnv: n.getEnv
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, function (e) { if (u) return document.addEventListener('DOMContentLoaded', e), window.swan.webView }, function (e) { if (g) return document.addEventListener('DOMContentLoaded', e), window.tt.miniProgram }, function (e) {
|
|
||||||
if (p) {
|
|
||||||
window.QaJSBridge && window.QaJSBridge.invoke ? setTimeout(e, 0) : document.addEventListener('QaJSBridgeReady', e); const n = window.qa; return {
|
|
||||||
navigateTo: n.navigateTo, navigateBack: n.navigateBack, switchTab: n.switchTab, reLaunch: n.reLaunch, redirectTo: n.redirectTo, postMessage: n.postMessage, getEnv: n.getEnv
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, function (e) { return document.addEventListener('DOMContentLoaded', e), o }], m = 0; m < f.length && !(l = f[m](_)); m++);l || (l = {}); const E = typeof uni !== 'undefined' ? uni : {}; if (!E.navigateTo) for (const b in l)t(l, b) && (E[b] = l[b]); return E.webView = l, E
|
|
||||||
})))
|
|
|
@ -1 +0,0 @@
|
||||||
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"><style>body,html{width:100%;height:100%;overflow:hidden}body{margin:0}video{width:300px;height:225px}img{max-width:100%;-webkit-touch-callout:none}@keyframes show{0%{opacity:0}100%{opacity:1}}</style></head><body><div id="content"></div><script type="text/javascript" src="./js/uni.webview.min.js"></script><script type="text/javascript" src="./js/handler.js"></script></body>
|
|
Binary file not shown.
|
@ -16,8 +16,8 @@
|
||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
<script src="uni-app-view.umd.js"></script>
|
<script src="uni-app-view.umd.js"></script>
|
||||||
|
<script src="app-wxs.js"></script>
|
||||||
|
<script src="app-renderjs.js"></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -4,10 +4,10 @@
|
||||||
"iPhone",
|
"iPhone",
|
||||||
"iPad"
|
"iPad"
|
||||||
],
|
],
|
||||||
"id": "__UNI__B1D7CFE",
|
"id": "__UNI__D087881",
|
||||||
"name": "test",
|
"name": "test",
|
||||||
"version": {
|
"version": {
|
||||||
"name": "1.0.0",
|
"name": "1.0.1",
|
||||||
"code": "100"
|
"code": "100"
|
||||||
},
|
},
|
||||||
"description": "",
|
"description": "",
|
||||||
|
@ -17,6 +17,11 @@
|
||||||
"url": ""
|
"url": ""
|
||||||
},
|
},
|
||||||
"permissions": {
|
"permissions": {
|
||||||
|
"Geolocation": {},
|
||||||
|
"Maps": {
|
||||||
|
"coordType": "gcj02"
|
||||||
|
},
|
||||||
|
"LivePusher": {},
|
||||||
"UniNView": {
|
"UniNView": {
|
||||||
"description": "UniNView原生渲染"
|
"description": "UniNView原生渲染"
|
||||||
}
|
}
|
||||||
|
@ -34,7 +39,6 @@
|
||||||
},
|
},
|
||||||
"popGesture": "close",
|
"popGesture": "close",
|
||||||
"launchwebview": {
|
"launchwebview": {
|
||||||
"render": "always",
|
|
||||||
"id": "1",
|
"id": "1",
|
||||||
"kernel": "WKWebview"
|
"kernel": "WKWebview"
|
||||||
},
|
},
|
||||||
|
@ -44,28 +48,47 @@
|
||||||
"distribute": {
|
"distribute": {
|
||||||
"google": {
|
"google": {
|
||||||
"permissions": [
|
"permissions": [
|
||||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
|
||||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||||
]
|
],
|
||||||
|
"minSdkVersion": 21
|
||||||
},
|
},
|
||||||
"apple": {
|
"apple": {
|
||||||
"dSYMs": false
|
"dSYMs": false
|
||||||
},
|
},
|
||||||
"plugins": {
|
"plugins": {
|
||||||
"ad": {},
|
"ad": {},
|
||||||
|
"geolocation": {
|
||||||
|
"amap": {
|
||||||
|
"name": "amapC2GgorTaY",
|
||||||
|
"__platform__": [
|
||||||
|
"android"
|
||||||
|
],
|
||||||
|
"appkey_ios": "b0c21bc6b220aa882bad8ffb6bce8829",
|
||||||
|
"appkey_android": "b0c21bc6b220aa882bad8ffb6bce8829"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"maps": {
|
||||||
|
"amap": {
|
||||||
|
"name": "amapC2GgorTaY",
|
||||||
|
"appkey_ios": "b0c21bc6b220aa882bad8ffb6bce8829",
|
||||||
|
"appkey_android": "b0c21bc6b220aa882bad8ffb6bce8829"
|
||||||
|
}
|
||||||
|
},
|
||||||
"audio": {
|
"audio": {
|
||||||
"mp3": {
|
"mp3": {
|
||||||
"description": "Android平台录音支持MP3格式文件"
|
"description": "Android平台录音支持MP3格式文件"
|
||||||
|
@ -82,10 +105,16 @@
|
||||||
"enable": false
|
"enable": false
|
||||||
},
|
},
|
||||||
"allowsInlineMediaPlayback": true,
|
"allowsInlineMediaPlayback": true,
|
||||||
|
"safearea": {
|
||||||
|
"background": "#EBF1EF",
|
||||||
|
"bottom": {
|
||||||
|
"offset": "auto"
|
||||||
|
}
|
||||||
|
},
|
||||||
"uni-app": {
|
"uni-app": {
|
||||||
"control": "uni-v3",
|
"control": "uni-v3",
|
||||||
"vueVersion": "3",
|
"vueVersion": "3",
|
||||||
"compilerVersion": "3.8.12",
|
"compilerVersion": "3.96",
|
||||||
"nvueCompiler": "uni-app",
|
"nvueCompiler": "uni-app",
|
||||||
"renderer": "auto",
|
"renderer": "auto",
|
||||||
"nvue": {
|
"nvue": {
|
||||||
|
@ -95,6 +124,44 @@
|
||||||
"webView": {
|
"webView": {
|
||||||
"minUserAgentVersion": "49.0"
|
"minUserAgentVersion": "49.0"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"tabBar": {
|
||||||
|
"position": "bottom",
|
||||||
|
"color": "#B3B3B3",
|
||||||
|
"selectedColor": "#272822",
|
||||||
|
"borderStyle": "rgba(255,255,255,0.4)",
|
||||||
|
"blurEffect": "none",
|
||||||
|
"fontSize": "10px",
|
||||||
|
"iconWidth": "24px",
|
||||||
|
"spacing": "3px",
|
||||||
|
"height": "50px",
|
||||||
|
"backgroundColor": "#EBF1EF",
|
||||||
|
"list": [
|
||||||
|
{
|
||||||
|
"pagePath": "pages/index/index",
|
||||||
|
"text": "首页",
|
||||||
|
"iconPath": "/static/tabs-icon/home.png",
|
||||||
|
"selectedIconPath": "/static/img/DK.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pagePath": "pages/index/massif",
|
||||||
|
"text": "地块",
|
||||||
|
"iconPath": "/static/img/SJ (1).png",
|
||||||
|
"selectedIconPath": "/static/img/SJ (1).png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pagePath": "pages/index/personal",
|
||||||
|
"text": "我的",
|
||||||
|
"iconPath": "/static/img/WD.png",
|
||||||
|
"selectedIconPath": "/static/img/WD.png"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"selectedIndex": 0,
|
||||||
|
"shown": true,
|
||||||
|
"child": [
|
||||||
|
"lauchwebview"
|
||||||
|
],
|
||||||
|
"selected": 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"launch_path": "__uniappview.html"
|
"launch_path": "__uniappview.html"
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,224 +0,0 @@
|
||||||
'use strict'
|
|
||||||
|
|
||||||
// 等待初始化完毕
|
|
||||||
document.addEventListener('UniAppJSBridgeReady', () => {
|
|
||||||
document.body.onclick = function () {
|
|
||||||
return uni.postMessage({
|
|
||||||
data: {
|
|
||||||
action: 'onClick'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
uni.postMessage({
|
|
||||||
data: {
|
|
||||||
action: 'onJSBridgeReady'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
let options
|
|
||||||
let medias = []
|
|
||||||
/**
|
|
||||||
* @description 获取标签的所有属性
|
|
||||||
* @param {Element} ele
|
|
||||||
*/
|
|
||||||
|
|
||||||
function getAttrs(ele) {
|
|
||||||
const attrs = Object.create(null)
|
|
||||||
|
|
||||||
for (let i = ele.attributes.length; i--;) {
|
|
||||||
attrs[ele.attributes[i].name] = ele.attributes[i].value
|
|
||||||
}
|
|
||||||
|
|
||||||
return attrs
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @description 图片加载出错
|
|
||||||
*/
|
|
||||||
|
|
||||||
function onImgError() {
|
|
||||||
if (options[1]) {
|
|
||||||
this.src = options[1]
|
|
||||||
this.onerror = null
|
|
||||||
} // 取消监听点击
|
|
||||||
|
|
||||||
this.onclick = null
|
|
||||||
this.ontouchstart = null
|
|
||||||
uni.postMessage({
|
|
||||||
data: {
|
|
||||||
action: 'onError',
|
|
||||||
source: 'img',
|
|
||||||
attrs: getAttrs(this)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @description 创建 dom 结构
|
|
||||||
* @param {object[]} nodes 节点数组
|
|
||||||
* @param {Element} parent 父节点
|
|
||||||
* @param {string} namespace 命名空间
|
|
||||||
*/
|
|
||||||
|
|
||||||
function createDom(nodes, parent, namespace) {
|
|
||||||
const _loop = function _loop(i) {
|
|
||||||
const node = nodes[i]
|
|
||||||
let ele = void 0
|
|
||||||
|
|
||||||
if (!node.type || node.type == 'node') {
|
|
||||||
let { name } = node // svg 需要设置 namespace
|
|
||||||
|
|
||||||
if (name == 'svg') namespace = 'http://www.w3.org/2000/svg'
|
|
||||||
if (name == 'html' || name == 'body') name = 'div' // 创建标签
|
|
||||||
|
|
||||||
if (!namespace) ele = document.createElement(name); else ele = document.createElementNS(namespace, name) // 设置属性
|
|
||||||
|
|
||||||
for (const item in node.attrs) {
|
|
||||||
ele.setAttribute(item, node.attrs[item])
|
|
||||||
} // 递归创建子节点
|
|
||||||
|
|
||||||
if (node.children) createDom(node.children, ele, namespace) // 处理图片
|
|
||||||
|
|
||||||
if (name == 'img') {
|
|
||||||
if (!ele.src && ele.getAttribute('data-src')) ele.src = ele.getAttribute('data-src')
|
|
||||||
|
|
||||||
if (!node.attrs.ignore) {
|
|
||||||
// 监听图片点击事件
|
|
||||||
ele.onclick = function (e) {
|
|
||||||
e.stopPropagation()
|
|
||||||
uni.postMessage({
|
|
||||||
data: {
|
|
||||||
action: 'onImgTap',
|
|
||||||
attrs: getAttrs(this)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (options[2]) {
|
|
||||||
image = new Image()
|
|
||||||
image.src = ele.src
|
|
||||||
ele.src = options[2]
|
|
||||||
|
|
||||||
image.onload = function () {
|
|
||||||
ele.src = this.src
|
|
||||||
}
|
|
||||||
|
|
||||||
image.onerror = function () {
|
|
||||||
ele.onerror()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ele.onerror = onImgError
|
|
||||||
} // 处理链接
|
|
||||||
else if (name == 'a') {
|
|
||||||
ele.addEventListener('click', function (e) {
|
|
||||||
e.stopPropagation()
|
|
||||||
e.preventDefault() // 阻止默认跳转
|
|
||||||
|
|
||||||
const href = this.getAttribute('href')
|
|
||||||
let offset
|
|
||||||
if (href && href[0] == '#') offset = (document.getElementById(href.substr(1)) || {}).offsetTop
|
|
||||||
uni.postMessage({
|
|
||||||
data: {
|
|
||||||
action: 'onLinkTap',
|
|
||||||
attrs: getAttrs(this),
|
|
||||||
offset
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}, true)
|
|
||||||
} // 处理音视频
|
|
||||||
else if (name == 'video' || name == 'audio') {
|
|
||||||
medias.push(ele)
|
|
||||||
|
|
||||||
if (!node.attrs.autoplay) {
|
|
||||||
if (!node.attrs.controls) ele.setAttribute('controls', 'true') // 空白图占位
|
|
||||||
|
|
||||||
if (!node.attrs.poster) ele.setAttribute('poster', "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'/>")
|
|
||||||
}
|
|
||||||
|
|
||||||
if (options[3]) {
|
|
||||||
ele.onplay = function () {
|
|
||||||
for (let _i = 0; _i < medias.length; _i++) {
|
|
||||||
if (medias[_i] != this) medias[_i].pause()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ele.onerror = function () {
|
|
||||||
uni.postMessage({
|
|
||||||
data: {
|
|
||||||
action: 'onError',
|
|
||||||
source: name,
|
|
||||||
attrs: getAttrs(this)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
} // 处理表格
|
|
||||||
else if (name == 'table' && options[4] && !ele.style.cssText.includes('inline')) {
|
|
||||||
const div = document.createElement('div')
|
|
||||||
div.style.overflow = 'auto'
|
|
||||||
div.appendChild(ele)
|
|
||||||
ele = div
|
|
||||||
} else if (name == 'svg') namespace = void 0
|
|
||||||
} else ele = document.createTextNode(node.text.replace(/&/g, '&'))
|
|
||||||
|
|
||||||
parent.appendChild(ele)
|
|
||||||
}
|
|
||||||
|
|
||||||
for (let i = 0; i < nodes.length; i++) {
|
|
||||||
var image
|
|
||||||
|
|
||||||
_loop(i)
|
|
||||||
}
|
|
||||||
} // 设置 html 内容
|
|
||||||
|
|
||||||
window.setContent = function (nodes, opts, append) {
|
|
||||||
const ele = document.getElementById('content') // 背景颜色
|
|
||||||
|
|
||||||
if (opts[0]) document.body.bgColor = opts[0] // 长按复制
|
|
||||||
|
|
||||||
if (!opts[5]) ele.style.userSelect = 'none'
|
|
||||||
|
|
||||||
if (!append) {
|
|
||||||
ele.innerHTML = '' // 不追加则先清空
|
|
||||||
|
|
||||||
medias = []
|
|
||||||
}
|
|
||||||
|
|
||||||
options = opts
|
|
||||||
const fragment = document.createDocumentFragment()
|
|
||||||
createDom(nodes, fragment)
|
|
||||||
ele.appendChild(fragment) // 触发事件
|
|
||||||
|
|
||||||
let height = ele.scrollHeight
|
|
||||||
uni.postMessage({
|
|
||||||
data: {
|
|
||||||
action: 'onLoad',
|
|
||||||
height
|
|
||||||
}
|
|
||||||
})
|
|
||||||
clearInterval(window.timer)
|
|
||||||
let ready = false
|
|
||||||
window.timer = setInterval(() => {
|
|
||||||
if (ele.scrollHeight != height) {
|
|
||||||
height = ele.scrollHeight
|
|
||||||
uni.postMessage({
|
|
||||||
data: {
|
|
||||||
action: 'onHeightChange',
|
|
||||||
height
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else if (!ready) {
|
|
||||||
ready = true
|
|
||||||
uni.postMessage({
|
|
||||||
data: {
|
|
||||||
action: 'onReady'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}, 350)
|
|
||||||
} // 回收计时器
|
|
||||||
|
|
||||||
window.onunload = function () {
|
|
||||||
clearInterval(window.timer)
|
|
||||||
}
|
|
|
@ -1,19 +0,0 @@
|
||||||
!(function (e, n) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = n() : typeof define === 'function' && define.amd ? define(n) : (e = e || self).uni = n() }(this, (() => {
|
|
||||||
'use strict'
|
|
||||||
|
|
||||||
try { const e = {}; Object.defineProperty(e, 'passive', { get() { !0 } }), window.addEventListener('test-passive', null, e) } catch (e) {} const n = Object.prototype.hasOwnProperty; function t(e, t) { return n.call(e, t) } const i = []; const a = function (e, n) { const t = { options: { timestamp: +new Date() }, name: e, arg: n }; if (window.__dcloud_weex_postMessage || window.__dcloud_weex_) { if (e === 'postMessage') { const a = { data: [n] }; return window.__dcloud_weex_postMessage ? window.__dcloud_weex_postMessage(a) : window.__dcloud_weex_.postMessage(JSON.stringify(a)) } const o = { type: 'WEB_INVOKE_APPSERVICE', args: { data: t, webviewIds: i } }; window.__dcloud_weex_postMessage ? window.__dcloud_weex_postMessageToService(o) : window.__dcloud_weex_.postMessageToService(JSON.stringify(o)) } if (!window.plus) return window.parent.postMessage({ type: 'WEB_INVOKE_APPSERVICE', data: t, pageId: '' }, '*'); if (i.length === 0) { const r = plus.webview.currentWebview(); if (!r) throw new Error('plus.webview.currentWebview() is undefined'); const d = r.parent(); let s = ''; s = d ? d.id : r.id, i.push(s) } if (plus.webview.getWebviewById('__uniapp__service'))plus.webview.postMessageToUniNView({ type: 'WEB_INVOKE_APPSERVICE', args: { data: t, webviewIds: i } }, '__uniapp__service'); else { const w = JSON.stringify(t); plus.webview.getLaunchWebview().evalJS('UniPlusBridge.subscribeHandler("'.concat('WEB_INVOKE_APPSERVICE', '",').concat(w, ',').concat(JSON.stringify(i), ');')) } }; const o = {
|
|
||||||
navigateTo() { const e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; const n = e.url; a('navigateTo', { url: encodeURI(n) }) }, navigateBack() { const e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; const n = e.delta; a('navigateBack', { delta: parseInt(n) || 1 }) }, switchTab() { const e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; const n = e.url; a('switchTab', { url: encodeURI(n) }) }, reLaunch() { const e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; const n = e.url; a('reLaunch', { url: encodeURI(n) }) }, redirectTo() { const e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; const n = e.url; a('redirectTo', { url: encodeURI(n) }) }, getEnv(e) { window.plus ? e({ plus: !0 }) : e({ h5: !0 }) }, postMessage() { const e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; a('postMessage', e.data || {}) }
|
|
||||||
}; const r = /uni-app/i.test(navigator.userAgent); const d = /Html5Plus/i.test(navigator.userAgent); const s = /complete|loaded|interactive/; const w = window.my && navigator.userAgent.indexOf('AlipayClient') > -1; const u = window.swan && window.swan.webView && /swan/i.test(navigator.userAgent); const c = window.qq && window.qq.miniProgram && /QQ/i.test(navigator.userAgent) && /miniProgram/i.test(navigator.userAgent); const g = window.tt && window.tt.miniProgram && /toutiaomicroapp/i.test(navigator.userAgent); const v = window.wx && window.wx.miniProgram && /micromessenger/i.test(navigator.userAgent) && /miniProgram/i.test(navigator.userAgent); const p = window.qa && /quickapp/i.test(navigator.userAgent); for (var l, _ = function () { window.UniAppJSBridge = !0, document.dispatchEvent(new CustomEvent('UniAppJSBridgeReady', { bubbles: !0, cancelable: !0 })) }, f = [function (e) { if (r || d) return window.__dcloud_weex_postMessage || window.__dcloud_weex_ ? document.addEventListener('DOMContentLoaded', e) : window.plus && s.test(document.readyState) ? setTimeout(e, 0) : document.addEventListener('plusready', e), o }, function (e) { if (v) return window.WeixinJSBridge && window.WeixinJSBridge.invoke ? setTimeout(e, 0) : document.addEventListener('WeixinJSBridgeReady', e), window.wx.miniProgram }, function (e) { if (c) return window.QQJSBridge && window.QQJSBridge.invoke ? setTimeout(e, 0) : document.addEventListener('QQJSBridgeReady', e), window.qq.miniProgram }, function (e) {
|
|
||||||
if (w) {
|
|
||||||
document.addEventListener('DOMContentLoaded', e); const n = window.my; return {
|
|
||||||
navigateTo: n.navigateTo, navigateBack: n.navigateBack, switchTab: n.switchTab, reLaunch: n.reLaunch, redirectTo: n.redirectTo, postMessage: n.postMessage, getEnv: n.getEnv
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, function (e) { if (u) return document.addEventListener('DOMContentLoaded', e), window.swan.webView }, function (e) { if (g) return document.addEventListener('DOMContentLoaded', e), window.tt.miniProgram }, function (e) {
|
|
||||||
if (p) {
|
|
||||||
window.QaJSBridge && window.QaJSBridge.invoke ? setTimeout(e, 0) : document.addEventListener('QaJSBridgeReady', e); const n = window.qa; return {
|
|
||||||
navigateTo: n.navigateTo, navigateBack: n.navigateBack, switchTab: n.switchTab, reLaunch: n.reLaunch, redirectTo: n.redirectTo, postMessage: n.postMessage, getEnv: n.getEnv
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, function (e) { return document.addEventListener('DOMContentLoaded', e), o }], m = 0; m < f.length && !(l = f[m](_)); m++);l || (l = {}); const E = typeof uni !== 'undefined' ? uni : {}; if (!E.navigateTo) for (const b in l)t(l, b) && (E[b] = l[b]); return E.webView = l, E
|
|
||||||
})))
|
|
|
@ -1 +0,0 @@
|
||||||
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"><style>body,html{width:100%;height:100%;overflow:hidden}body{margin:0}video{width:300px;height:225px}img{max-width:100%;-webkit-touch-callout:none}@keyframes show{0%{opacity:0}100%{opacity:1}}</style></head><body><div id="content"></div><script type="text/javascript" src="./js/uni.webview.min.js"></script><script type="text/javascript" src="./js/handler.js"></script></body>
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
|
@ -3101,11 +3101,6 @@
|
||||||
.card .card-li {
|
.card .card-li {
|
||||||
margin-bottom: 0.53125rem;
|
margin-bottom: 0.53125rem;
|
||||||
}
|
}
|
||||||
.content {
|
|
||||||
padding: 0.625rem 0.89063rem;
|
|
||||||
background-color: #F4F4F4;
|
|
||||||
min-height: 100vh;
|
|
||||||
}
|
|
||||||
.more-jt {
|
.more-jt {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
|
@ -4,10 +4,10 @@
|
||||||
"iPhone",
|
"iPhone",
|
||||||
"iPad"
|
"iPad"
|
||||||
],
|
],
|
||||||
"id": "__UNI__B1D7CFE",
|
"id": "__UNI__D087881",
|
||||||
"name": "test",
|
"name": "test",
|
||||||
"version": {
|
"version": {
|
||||||
"name": "1.0.0",
|
"name": "1.0.1",
|
||||||
"code": "100"
|
"code": "100"
|
||||||
},
|
},
|
||||||
"description": "",
|
"description": "",
|
||||||
|
@ -17,6 +17,11 @@
|
||||||
"url": ""
|
"url": ""
|
||||||
},
|
},
|
||||||
"permissions": {
|
"permissions": {
|
||||||
|
"Geolocation": {},
|
||||||
|
"Maps": {
|
||||||
|
"coordType": "gcj02"
|
||||||
|
},
|
||||||
|
"LivePusher": {},
|
||||||
"UniNView": {
|
"UniNView": {
|
||||||
"description": "UniNView原生渲染"
|
"description": "UniNView原生渲染"
|
||||||
}
|
}
|
||||||
|
@ -34,7 +39,6 @@
|
||||||
},
|
},
|
||||||
"popGesture": "close",
|
"popGesture": "close",
|
||||||
"launchwebview": {
|
"launchwebview": {
|
||||||
"render": "always",
|
|
||||||
"id": "1",
|
"id": "1",
|
||||||
"kernel": "WKWebview"
|
"kernel": "WKWebview"
|
||||||
},
|
},
|
||||||
|
@ -44,20 +48,21 @@
|
||||||
"distribute": {
|
"distribute": {
|
||||||
"google": {
|
"google": {
|
||||||
"permissions": [
|
"permissions": [
|
||||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
|
||||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||||
],
|
],
|
||||||
"minSdkVersion": 21
|
"minSdkVersion": 21
|
||||||
|
@ -67,6 +72,23 @@
|
||||||
},
|
},
|
||||||
"plugins": {
|
"plugins": {
|
||||||
"ad": {},
|
"ad": {},
|
||||||
|
"geolocation": {
|
||||||
|
"amap": {
|
||||||
|
"name": "amapC2GgorTaY",
|
||||||
|
"__platform__": [
|
||||||
|
"android"
|
||||||
|
],
|
||||||
|
"appkey_ios": "b0c21bc6b220aa882bad8ffb6bce8829",
|
||||||
|
"appkey_android": "b0c21bc6b220aa882bad8ffb6bce8829"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"maps": {
|
||||||
|
"amap": {
|
||||||
|
"name": "amapC2GgorTaY",
|
||||||
|
"appkey_ios": "b0c21bc6b220aa882bad8ffb6bce8829",
|
||||||
|
"appkey_android": "b0c21bc6b220aa882bad8ffb6bce8829"
|
||||||
|
}
|
||||||
|
},
|
||||||
"audio": {
|
"audio": {
|
||||||
"mp3": {
|
"mp3": {
|
||||||
"description": "Android平台录音支持MP3格式文件"
|
"description": "Android平台录音支持MP3格式文件"
|
||||||
|
@ -83,10 +105,16 @@
|
||||||
"enable": false
|
"enable": false
|
||||||
},
|
},
|
||||||
"allowsInlineMediaPlayback": true,
|
"allowsInlineMediaPlayback": true,
|
||||||
|
"safearea": {
|
||||||
|
"background": "#EBF1EF",
|
||||||
|
"bottom": {
|
||||||
|
"offset": "auto"
|
||||||
|
}
|
||||||
|
},
|
||||||
"uni-app": {
|
"uni-app": {
|
||||||
"control": "uni-v3",
|
"control": "uni-v3",
|
||||||
"vueVersion": "3",
|
"vueVersion": "3",
|
||||||
"compilerVersion": "3.94",
|
"compilerVersion": "3.96",
|
||||||
"nvueCompiler": "uni-app",
|
"nvueCompiler": "uni-app",
|
||||||
"renderer": "auto",
|
"renderer": "auto",
|
||||||
"nvue": {
|
"nvue": {
|
||||||
|
@ -96,6 +124,44 @@
|
||||||
"webView": {
|
"webView": {
|
||||||
"minUserAgentVersion": "49.0"
|
"minUserAgentVersion": "49.0"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"tabBar": {
|
||||||
|
"position": "bottom",
|
||||||
|
"color": "#B3B3B3",
|
||||||
|
"selectedColor": "#272822",
|
||||||
|
"borderStyle": "rgba(255,255,255,0.4)",
|
||||||
|
"blurEffect": "none",
|
||||||
|
"fontSize": "10px",
|
||||||
|
"iconWidth": "24px",
|
||||||
|
"spacing": "3px",
|
||||||
|
"height": "50px",
|
||||||
|
"backgroundColor": "#EBF1EF",
|
||||||
|
"list": [
|
||||||
|
{
|
||||||
|
"pagePath": "pages/index/index",
|
||||||
|
"text": "首页",
|
||||||
|
"iconPath": "/static/tabs-icon/home.png",
|
||||||
|
"selectedIconPath": "/static/img/DK.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pagePath": "pages/index/massif",
|
||||||
|
"text": "地块",
|
||||||
|
"iconPath": "/static/img/SJ (1).png",
|
||||||
|
"selectedIconPath": "/static/img/SJ (1).png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pagePath": "pages/index/personal",
|
||||||
|
"text": "我的",
|
||||||
|
"iconPath": "/static/img/WD.png",
|
||||||
|
"selectedIconPath": "/static/img/WD.png"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"selectedIndex": 0,
|
||||||
|
"shown": true,
|
||||||
|
"child": [
|
||||||
|
"lauchwebview"
|
||||||
|
],
|
||||||
|
"selected": 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"launch_path": "__uniappview.html"
|
"launch_path": "__uniappview.html"
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue